00001 //Filename : OFACURES.H 00002 //Description : Faculty Template Class Declaration 00003 00004 #ifndef __OFACURES_H 00005 #define __OFACURES_H 00006 00007 #include <OFACULTY.H> 00008 00009 #ifndef __GAMEDEF_H 00010 #include <GAMEDEF.H> 00011 #endif 00012 00013 //-------- Define constant --------// 00014 00015 #define MAX_RANK_AGE_GROUP 7 00016 #define MAX_RANK_AGE_GROUP_N_TOTAL (MAX_RANK_AGE_GROUP+1) 00017 #define FIRST_RANK_AGE_GROUP 0 // zero-based number 00018 #define LAST_RANK_AGE_GROUP MAX_RANK_AGE_GROUP-1 00019 00020 #define FIRST_TEMPLATE_CODE 'A' 00021 00022 //------ Define struct FacultyTemplateRec -------// 00023 00026 struct FacultyTemplateRec { 00027 char template_code[9]; 00028 char rank_age_group_id[9]; 00029 00030 //----- multipliers -----// 00031 00032 char rank_age_multiplier[9]; 00033 char female_multiplier[9]; 00034 char minority_multiplier[9]; 00035 00036 char overall_salary_multiplier[9]; 00037 char female_salary_multiplier[9]; 00038 char minority_salary_multiplier[9]; 00039 00040 char talent_teaching_multiplier[9]; 00041 char talent_scholarship_multiplier[9]; 00042 char talent_research_multiplier[9]; 00043 00044 char normal_teaching_load_multiplier[9]; 00045 00046 char discretionary_time_pref[DISCRETIONARY_TYPE_COUNT][9]; 00047 }; 00048 00049 //------ Define struct FacultyTemplate -------// 00050 00054 struct FacultyTemplate { 00055 char template_code; 00056 char rank_age_group_id; 00057 00058 //----- multipliers -----// 00059 float rank_age_multiplier; 00060 float female_multiplier; 00061 float minority_multiplier; 00062 00063 float overall_salary_multiplier; 00064 float female_salary_multiplier; 00065 float minority_salary_multiplier; 00066 00067 float talent_teaching_multiplier; 00068 float talent_scholarship_multiplier; 00069 float talent_research_multiplier; 00070 00071 float normal_teaching_load_multiplier; // NTL multiplier 00072 00073 // discretionary time preference // 0-100 00074 char discretionary_time_pref[DISCRETIONARY_TYPE_COUNT]; 00075 }; 00076 00077 //------- Define class FacultyRes ---------// 00078 00081 class FacultyRes { 00082 public: 00083 char init_flag; 00084 int report_type; 00085 int report_list_mode; 00086 int report_det_mode; 00087 int report_faculty_recno; 00088 int report_research_recno; 00089 00090 short faculty_template_count; 00091 FacultyTemplate* faculty_template_array; 00092 00093 #if(GAME_VERSION>=200) 00094 short show_department_detail_count; // This is just used in Faculty report 00095 char is_year_end_report; // This is just used in Faculty turnover report 00096 #endif 00097 00098 //--------------------------------------------------// 00099 // The following vars are for storing percentages 00100 // that are not realized because the percentage 00101 // are too small to produce one integer faculty. 00102 // They are accumulated here, so that they will 00103 // be added to the following calculations to 00104 // produce a overall population that reflects 00105 // the percentages calculated. They are set to zero 00106 // in init(). 00107 //--------------------------------------------------// 00108 00109 // since it's a fraction of an integer, so the var type is float 00110 float unused_faculty_count_array[GENDER_ETHNIC_TYPE_COUNT]; 00111 00112 public: 00113 FacultyRes(); 00114 00115 void init(); 00116 void deinit(); 00117 00118 int write_file(File* filePtr); 00119 int read_file(File* filePtr); 00120 00121 void report(int refreshFlag); 00122 #if(GAME_VERSION>=200) 00123 void report_faculty_hired(int refreshFlag); 00124 int report_hired_detect(); 00125 #endif 00126 void report_detect(); 00127 int current_report_type; 00128 #if(GAME_VERSION>=200) 00129 int current_year_report; 00130 int last_report_type; 00131 #endif 00132 void summary_report(int refreshFlag); 00133 void summary_report_1(int refreshFlag); 00134 void summary_report_2(int refreshFlag); 00135 void summary_report_3(int refreshFlag); 00136 void summary_report_4(int refreshFlag); 00137 void summary_report_5(int refreshFlag); 00138 void summary_report_6(int refreshFlag); 00139 void summary_report_7(int refreshFlag); 00140 void summary_report_8(int refreshFlag); 00141 #if(GAME_VERSION>=200) 00142 void summary_report_9(int refreshFlag); 00143 void summary_report_10(int refreshFlag); 00144 #endif 00145 int summary_report_detect(); 00146 void summary_report_deinit(); 00147 00148 FacultyTemplate* get_faculty_template(char* templateCode, int rankAgeGroup); 00149 00150 private: 00151 void load_template(); 00152 void free_template(); 00153 void report_paint_button(int refreshFlag); 00154 }; 00155 00156 //------- Define class FacultySummary ---------// 00157 00158 extern FacultyRes faculty_res; 00159 00160 //-----------------------------------------// 00161 #endif