00001
00002
00003
00004 #ifndef __OFACULTY_H
00005 #define __OFACULTY_H
00006
00007 #include <OINFO.H>
00008 #include <GAMEDEF.H>
00009
00010 #ifndef __ODYNARRB_H
00011 #include <ODYNARRB.H>
00012 #endif
00013
00014
00015
00016 #define NORMAL_TEACHING_CONTACT_HOUR 6 // A faculty normally spend 6 hours a week in teaching
00017 #define NORMAL_FACULTY_TOTAL_HOUR 44 // A faculty normally spend 44 hours in teaching and other activities in discretionary time
00018 #define NORMAL_DISCRETIONARY_HOUR (NORMAL_FACULTY_TOTAL_HOUR-NORMAL_TEACHING_CONTACT_HOUR)
00019 #define GCON 3 //## chea 161099
00020 #define DCON 12 //## chea 161099
00021
00022
00023
00024 enum { FACULTY_RANK_LEVEL_COUNT = 5 };
00025
00026 enum {
00027 ASST_PROF, ASSOC_PROF, FULL_PROF, LONG_TERM_ADJUNCT, SHORT_TERM_ADJUNCT
00028 };
00029
00030 enum { DISCRETIONARY_TYPE_COUNT = 6 };
00031
00032 enum {
00033 DT_COURSE_PREPARATION,
00034 DT_OUT_OF_CLASS_STUDENT_CONTACT,
00035 DT_EDUCATIONAL_DEVELOPMENT,
00036 DT_RESEARCH,
00037 DT_SCHOLARSHIP,
00038 DT_INSTITUTIONAL_AND_PUBLIC_SERVICE
00039 };
00040
00041
00042
00043 enum {
00044 DISCRETIONARY_TYPE_COUNT_N_TOTAL = DISCRETIONARY_TYPE_COUNT + 1,
00045
00046 FACULTY_RANK_LEVEL_COUNT_N_TOTAL = FACULTY_RANK_LEVEL_COUNT + 1,
00047 FACULTY_RANK_LEVEL_TOTAL = FACULTY_RANK_LEVEL_COUNT,
00048 };
00049
00050
00051 #if(GAME_VERSION>=200)
00052 #define MAX_RESEARCH_PROPOSAL 12
00053 #else
00054 #define MAX_RESEARCH_PROPOSAL 5
00055 #endif
00056 #define MAX_ACTIVE_RESEARCH_MONTH 12 // maximum number of months for a research
00057 #define MAX_PROPOSED_RESEARCH_MONTH 6
00058
00059
00060
00061 enum {
00062 RESEARCH_PROPOSED, RESEARCH_ACTIVE
00063 };
00064
00067 struct ResearchProposal {
00068
00069 int total_dollars;
00070
00071 float overhead_rate;
00072
00073 char status;
00074 int date_to_next_status;
00075
00076
00077
00078 float prob_proposal_funded;
00079 };
00080
00081
00082
00086 class Faculty {
00087 public:
00088 short faculty_recno;
00089 short department_recno;
00090
00091 short photo_id;
00092
00093 char* name();
00094 #if(GAME_VERSION>=200)
00095 static char *name(short firstNameId, short middleNameId, short lastNameId);
00096 #endif
00097 short first_name_id;
00098 short middle_name_id;
00099 short last_name_id;
00100
00101 char rank_level;
00102 char gender_ethnic_group;
00103 int birthday;
00104 int age() { return int( float(info.game_date - birthday) / 365.25 ); }
00105
00106
00107 static int rank_age_group(char rank, int age);
00108 int rank_age_group() { return rank_age_group(rank_level, age()); };
00109
00110 static int rank_age_group_2_rank(int rag);
00111 bool is_regular();
00112 static bool is_adjunct_faculty(char rank) { return rank == LONG_TERM_ADJUNCT || rank == SHORT_TERM_ADJUNCT; };
00113
00114 static int get_min_age(int rankAgeGroup);
00115
00116 int start_teaching_date;
00117 int last_promotion_date;
00118 int salary;
00119 int last_salary_increase;
00120 char* employed_period();
00121
00122 char teaching_contact_hour;
00123 #if(GAME_VERSION>=200)
00124 float discretionary_hour_array[DISCRETIONARY_TYPE_COUNT];
00125 #else
00126 char discretionary_hour_array[DISCRETIONARY_TYPE_COUNT];
00127 #endif
00128
00129 char last_discretionary_hour_array[DISCRETIONARY_TYPE_COUNT];
00130 float total_hour();
00131
00132 #if(GAME_VERSION>=200)
00133 char employ_status;
00134 char is_dismissed;
00135 char dismiss_trimester;
00136 #endif
00137
00138 float strain_priority;
00139 float strain_on_discretionary_time;
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149 ResearchProposal research_proposal_array[MAX_RESEARCH_PROPOSAL];
00150
00151 bool is_investigator;
00152
00153 char research_proposal_count;
00154 int research_month_expense;
00155 int research_month_expense_direct;
00156
00157
00158
00159 char off_duty_trimester;
00160 char is_third_trimester_teaching;
00161
00162 float reaction_summer_teaching, reaction_summer_teaching_last;
00163
00164
00165
00166 float talent_teaching;
00167 float talent_scholarship;
00168 float talent_research;
00169
00170 float performance_teaching;
00171 float performance_scholarship;
00172 float performance_research;
00173 float p_discretionary_hour_it_percent;
00174 float p_discretionary_hour_it;
00175
00176 #if(GAME_VERSION>=200)
00177 float time_shifted_scholarship;
00178 #endif
00179
00180 float satisfaction_index;
00181 float satisfaction_index_last;
00182 #if(GAME_VERSION>=200)
00183 float satisfaction_index_last_tri;
00184 #endif
00185
00186
00187
00188 float extra_effect_satisfaction_index;
00189 float extra_effect_performance_research;
00190
00191
00192
00193
00194
00195 float proj_count_mult;
00196 float proj_size_mult;
00197 float award_prob;
00198
00199 float ave_proj_count;
00200 float ave_proj_size;
00201
00202
00203
00204 public:
00205
00206 void init(int departmentRecno, int rankLevel, int genderEthnicGroup, int facultyAge, int startTeachingDate, int facultySalary,
00207 int talentTeaching, int talentScholarship, int talentResearch);
00208
00209 void init_research();
00210
00211 int write_file(File* filePtr);
00212 int read_file(File* filePtr);
00213
00214 void next_day();
00215 void next_trimester();
00216
00217 void calc_all_performance();
00218
00219 #if(GAME_VERSION>=200)
00220 void disp_summary_basic(int x, int y, int xColumn2, int refreshFlag, int displayModeFlag);
00221 #else
00222 void disp_summary_basic(int x, int y, int xColumn2, int refreshFlag);
00223 #endif
00224 void disp_summary_activity(int x, int y, int xColumn2, int refreshFlag);
00225 void disp_summary_assess(int x, int y, int xColumn2, int refreshFlag);
00226
00227 void disp_detail_std(int refreshFlag);
00228 void disp_research_proposal(int y, int refreshFlag);
00229
00230 private:
00231 void init_photo();
00232
00233 char* hour_str(float hourCount);
00234
00235 int think_departure();
00236 #if(GAME_VERSION>=200)
00237 int think_dismiss();
00238 #endif
00239 int think_promotion();
00240 void think_discretionary_time();
00241 void think_research();
00242
00243 void calc_performance_teaching();
00244 public:
00245 void calc_performance_scholarship();
00246 void calc_performance_research();
00247 void calc_satisfaction_index();
00248
00249 private:
00250 void calc_discretionary_hour_it();
00251
00252 public:
00253 int think_accept_retire(int retireOffer);
00254 void update_history(char update_flag);
00255 float get_quality_driver();
00256 };
00257
00258
00259
00260
00261
00264 class FacultyArray: public DynArrayB {
00265 public:
00266 int department_recno;
00267 int faculty_count;
00268
00269
00270
00271 public:
00272 FacultyArray();
00273 ~FacultyArray();
00274
00275 int write_file(File* filePtr);
00276 int read_file(File* filePtr);
00277
00278 int add(int departmentRecno, int rankLevel, int genderEthnicGroup, int facultyAge, int startTeachingDate, int facultySalary,
00279 int talentTeaching, int talentScholarship, int talentResearch);
00280
00281 #if(GAME_VERSION>=200)
00282 void del(int recNo, int isQuiting=0);
00283 #else
00284 void del(int recNo);
00285 #endif
00286
00287 int avg_discretionary_hour(int discretionaryType);
00288
00289 void next_day();
00290 void next_trimester();
00291
00292 Faculty* get_unpacked_faculty(int recNo);
00293
00294 int is_deleted(int recNo);
00295
00296 #ifdef DEBUG
00297 Faculty* operator[](int recNo);
00298 #else
00299 Faculty* operator[](int recNo) { return (Faculty*) get(recNo); }
00300 #endif
00301
00302
00303
00304 public:
00305
00306 float talent_teaching[HISTORY_TRIMESTER_COUNT];
00307 float talent_scholarship[HISTORY_TRIMESTER_COUNT];
00308 float talent_research[HISTORY_TRIMESTER_COUNT];
00309
00310
00311 float performance_teaching[HISTORY_TRIMESTER_COUNT];
00312 float performance_scholarship[HISTORY_TRIMESTER_COUNT];
00313
00314 float performance_research[HISTORY_TRIMESTER_COUNT];
00315
00316 float satisfaction_index[HISTORY_MONTH_COUNT];
00317
00318 char percent_research[HISTORY_TRIMESTER_COUNT];
00319
00320
00321 float teaching_contact_hour[HISTORY_TRIMESTER_COUNT];
00322 float discretionary_hour_array[DISCRETIONARY_TYPE_COUNT_N_TOTAL][HISTORY_TRIMESTER_COUNT];
00323 #if(GAME_VERSION>=200)
00324 float time_shifted_scholarship;
00325 #endif
00326
00327
00328 #if(GAME_VERSION>=200)
00329 float initial_teaching_contact_hour;
00330 float initial_discretionary_hour_array[DISCRETIONARY_TYPE_COUNT_N_TOTAL];
00331
00332 float initial_talent_teaching;
00333 float initial_talent_scholarship;
00334 float initial_talent_research;
00335
00336 float initial_performance_teaching;
00337 float initial_performance_scholarship;
00338 float initial_performance_research;
00339
00340 float initial_time_shifted_scholarship;
00341 #endif
00342
00343
00344 public:
00345 void update_history(char update_flag);
00346
00347 #if(GAME_VERSION>=200)
00348 void save_initial_data();
00349 #endif
00350
00351
00352 private:
00353 void think_summer_teaching();
00354 void calc_history_monthly();
00355 void calc_history_trimester();
00356 };
00357
00358
00359 #endif