00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef __OTASK_H
00016 #define __OTASK_H
00017
00018 #include <ONEWS.H>
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 enum { TASK_WHO_NUM=1 };
00029 enum {
00030 TASK_DISP_ALL=0
00031 };
00032
00033
00034
00035
00036
00037 #define TASK_COUNT 8 //## chea 220999 1 is org. & is the first ele
00038 enum {
00039 TASK_RISE_PERFORMANCE_RATING = 1,
00040 RISE_EDUCATIONAL_QUALITY,
00041 RISE_STUDENT_MORALE,
00042 RISE_DEPARTMENT_MORALE,
00043 RISE_FACULTY_RESEARCH,
00044 RISE_FACULTY_DIVERSITY_INDEX,
00045 RISE_USE_OF_IT,
00046 RISE_STAFF_MORALE,
00047 };
00048
00049
00050
00051
00057 struct Task : News {
00058
00059
00060
00061
00062 bool is_completed_rise_performance();
00063 bool is_completed_rise_educational_quality();
00064 bool is_completed_rise_student_morale();
00065 bool is_completed_rise_department_morale();
00066 bool is_completed_rise_faculty_research_Per();
00067 bool is_completed_rise_faculty_diversity_index();
00068 bool is_completed_rise_use_of_IT();
00069 bool is_completed_rise_staff_morale();
00070
00071
00072 bool is_expired();
00073 void set_completed();
00074 };
00075
00076
00077
00080 class TaskArray : public DynArray {
00081 public:
00082
00083
00084 char task_who_option;
00085 char task_add_flag;
00086 int total_bonus_pt;
00087
00088 float rand_init;
00089
00090 public:
00091 TaskArray();
00092
00093 void init();
00094 void deinit();
00095
00096 int write_file(File* filePtr);
00097 int read_file(File* filePtr);
00098
00099 void enable() { task_add_flag = 1; }
00100 void disable() { task_add_flag = 0; }
00101
00102 void reset();
00103 void default_setting();
00104
00105 void clear_task_disp();
00106
00107 void next_day();
00108 Task* add_task(int taskId);
00109 void remove(int index);
00110 bool can_add_more_task();
00111
00112
00113
00114 void rise_performance_rating(int deptRecno, int ratingType,
00115 int target, int src, int month, int year, int bonus);
00116
00117 void rise_educational_quality(int deptRecno, int ratingType,
00118 int target, int src, int month, int year, int bonus);
00119
00120 void rise_student_morale(int deptRecno, int ratingType,
00121 int target, int src, int month, int year, int bonus);
00122
00123 void rise_department_morale(int deptRecno, int ratingType,
00124 int target, int src, int month, int year, int bonus);
00125
00126 void rise_faculty_research_Per(int deptRecno, int ratingType,
00127 int target, int src, int month, int year, int bonus);
00128
00129 void rise_faculty_diversity_index(int deptRecno, int ratingType,
00130 int target, int src, int month, int year, int bonus);
00131
00132 void rise_use_of_IT(int deptRecno, int ratingType,
00133 int target, int src, int month, int year, int bonus);
00134
00135 void rise_staff_morale(int deptRecno, int ratingType,
00136 int target, int src, int month, int year, int bonus);
00137
00138
00139
00140 Task* operator[](int recNo);
00141 };
00142
00143 extern TaskArray task_array;
00144
00145
00146 #endif