00001
00002
00003
00004
00005 #include <OSTR.H>
00006 #include <ONEWS.H>
00007 #include <OFONT.H>
00008 #include <ODATE.H>
00009 #include <OINFO.H>
00010 #include <OCONFIG.H>
00011
00012 #include <OSYS.H>
00013 #include <OCHANCE.H>
00014 #include <OPSCHOOL.H>
00015 #include <OFINANCE.H>
00016 #include <ODEPT.H>
00017
00018
00019
00020 typedef void (News::*NewsFP)();
00021
00022
00023
00025 struct NewsInfo {
00026 NewsFP news_function_ptr;
00027 };
00028
00029
00030
00031 static NewsInfo news_info_array[NEWS_ID_COUNT] = {
00032 { News::alumni_die },
00033 { News::rape_in_campus },
00034
00035 { News::retrofit_facilities },
00036 { News::earth_quake },
00037
00038 { News::congress_research },
00039 { News::stock_market },
00040 { News::scandalous_fund_use },
00041 { News::new_governor },
00042 { News::court_limit_minority },
00043 { News::risky_research },
00044 { News::scandal_in_athletics },
00045
00046 { News::research_prize },
00047 { News::technology_transfer },
00048 { News::capital_campaign },
00049 { News::student_loans },
00050
00051 { News::plagiarism_scandal },
00052 { News::for_profit_competition },
00053 { News::minority_student_percentage_falls },
00054 { News::successful_grad },
00055 { News::media_obtain_information },
00056
00057 #if(GAME_VERSION>=200)
00058
00059 { News::protagonist_message },
00060 { News::protagonist_message },
00061 { News::protagonist_message },
00062 { News::protagonist_message },
00063 { News::protagonist_message },
00064 { News::protagonist_message },
00065 { News::protagonist_message },
00066 { News::protagonist_message },
00067 { News::protagonist_message },
00068 { News::protagonist_message },
00069
00070 { News::protagonist_message },
00071 { News::protagonist_message },
00072 { News::protagonist_message },
00073 { News::protagonist_message },
00074 { News::protagonist_message },
00075 { News::protagonist_message },
00076 { News::protagonist_message },
00077 { News::protagonist_message },
00078 { News::protagonist_message },
00079 { News::protagonist_message },
00080
00081 { News::protagonist_message },
00082 { News::protagonist_message },
00083 { News::protagonist_message },
00084 { News::protagonist_message },
00085 { News::protagonist_message },
00086 { News::protagonist_message },
00087 { News::protagonist_message },
00088 { News::protagonist_message },
00089 { News::protagonist_message },
00090 { News::protagonist_message },
00091
00092 { News::protagonist_message },
00093 { News::protagonist_message },
00094 { News::protagonist_message },
00095 { News::protagonist_message },
00096 #endif
00097
00098 { News::new_year_start },
00099 { News::scenario_near_end },
00100 { News::scenario_news },
00101 { News::football_game },
00102 { News::basketball_game },
00103
00104 { News::open_game_near_end },
00105 { News::open_game_end },
00106
00107 #if(GAME_VERSION>=200)
00108 { News::bankruptcy_message_lv1 },
00109 { News::bankruptcy_message_lv2 },
00110 { News::bankruptcy_message_lv3 },
00111 #endif
00112
00113 { News::task_msg },
00114 };
00115
00116
00117
00118 String News::str;
00119
00120
00124
00125 NewsFP newsFP = news_info_array[id-1].news_function_ptr;
00126
00127 (this->*newsFP)();
00128
00129 line_count=font_chartsm.count_line(400,str);
00130
00131 return str;
00132 }
00133
00134
00135
00136
00138
00139 sys.set_news_pop_up();
00140 News* newsPtr = this;
00141 chance_event.news_str = newsPtr->msg();
00142 chance_event.news_news_str=chance_event.news_str;
00143
00144
00145
00146 int thisDate = date.julian( date.year(newsPtr->news_date),
00147 date.month(newsPtr->news_date),
00148 date.day(newsPtr->news_date) );
00149
00150
00151 strncpy( chance_event.news_date_str, info.date_str_julian(thisDate), 55);
00152 chance_event.news_date_str[55-1] = '\0';
00153
00154 chance_event.date_str = info.date_str_julian( thisDate, INFO_DATE_DEFAULT|INFO_DATE_SHORT_MONTH|INFO_DATE_NO_DAY);
00155 }
00156
00157
00158
00159
00164
00165
00166
00167
00168
00169
00170
00171 str = "An old ";
00172
00173 if( short_para1 == GENDER_MALE )
00174 str += "alumnus";
00175 else
00176 str += "alumna";
00177
00178 err_when(short_para2<0);
00179
00180 str += " dies and leaves a bequest of $";
00181 str += m.format(short_para2);
00182 str += " thousand which is transferred to the Development Office.";
00183 }
00184
00185
00186
00187
00189
00190 str = "Assaults occur on campus. Student and alumni morale plummet. ";
00191 str += "You need to spend more on \"Administration\" (which includes spending for Security).";
00192 }
00193
00194
00195
00196
00200
00201 str = "More physically challenged students require modification of facilities. Lay out $";
00202 str += m.format(short_para1);
00203 str += " thousand.";
00204 }
00205
00206
00207
00208
00210
00211 str = "Earthquake. Your available square footage drops dramatically. Faculty, staff, and students report that they have insufficient space.";
00212 }
00213
00214
00215
00216
00220
00221 str = "Congress adjusts research funding ";
00222 str += (short_para1>=0) ? "positively.":"negatively.";
00223 }
00224
00225
00226
00227
00231
00232 str = "Stock market ";
00233 str += (short_para1>=0) ? "soars.":"crashes.";
00234 }
00235
00236
00237
00238
00242
00243 str = "Auditors find scandalous use of funds. Senior officer of the University resigns. $";
00244 str += m.format(short_para1);
00245 str += " thousands disappear. Fund-raising depressed.";
00246 }
00247
00248
00249
00250
00254
00255 str = "A new governor of your state is elected. ";
00256
00257 if ( short_para1>=0 ) {
00258 str += "She likes the University and raises the appropriation.";
00259 }
00260 else {
00261 str += "He wants to spend on prisons, not universities. Your appropriation drops.";
00262 }
00263 }
00264
00265
00266
00267
00269
00270 str = "Courts ban favoring admission and financial aid on the basis of race or ethnicity.";
00271 }
00272
00273
00274
00275
00276
00278
00279
00280 str = "Risky genetic research on your campus attracts demostrators, who cause $";
00281 str += m.format(short_para1);
00282 str += " thousand in damage to the laboratory. The insurance company will not pay.";
00283
00284 }
00285
00286
00287
00288
00289
00290
00292
00293 str = "Your athletes took illegal drugs. Your athletic talent drops and you cannot recruit athletes for 3 years. Donations fall.";
00294 }
00295
00296
00297
00298
00299
00300
00302
00303 str = "Plagiarism scandal rocks the University. ";
00304 str += m.format(short_para1,4);
00305 str += " students dismissed. Morale and donations fall.";
00306 }
00307
00308
00309
00310
00311
00312
00314
00315 str = "For-profit universities are growing fast and attracting students. The University cannot raise tuition for the next 3 years.";
00316
00317 }
00318
00319
00320
00321
00322
00323
00325
00326 str = "Courts ban favoring admission and financial aid on the basis of race or ethnicity.";
00327 }
00328
00329
00330
00331
00332
00333
00335
00336 if(m.random(2)>1)
00337 str = "A graduate wins the Oscar for Best Actress and credits the University. Applications rise.";
00338 else
00339 str = "A graduate is elected president of the United States and credits the University. Applications rise.";
00340 }
00341
00342
00343
00344
00345
00346
00350
00351
00352 str = "An investigative reporter obtains information about 'the true cost of education' ";
00353 str += m.format(float_para1,2);
00354
00355 str +=" relative to tuition income";
00356
00357 if(!player_school.is_public())
00358 str +=".";
00359 else
00360 str +=" plus state appropriation";
00361 }
00362
00363
00364
00365
00366
00374
00375 Department *dept = department_array[short_para1];
00376
00377 #if(GAME_VERSION>=200)
00378 str = "Professor ";
00379 if ( dept->faculty_array.is_deleted( short_para2 ) ) {
00380 str += Faculty::name( short_para3, short_para4, short_para5 );
00381 }
00382 else {
00383 str += dept->faculty_array[short_para2]->name();
00384 }
00385 str += " receives the Nobel Prize. Prestige soars.";
00386 #else
00387 str = "Professor ";
00388 str += dept->faculty_array[short_para2]->name();
00389 str += " receives the Nobel Prize. Prestige soars.";
00390 #endif
00391 }
00392
00393
00394
00395
00396
00401
00402 str="Your ";
00403 str += department_array[short_para1]->name();
00404 str += " signs a deal with a company for a breakthrough that the company will market. For the next 5 years, the University receives $";
00405 str += m.format((int)float_para1);
00406 str += " thousand/year.";
00407
00408 }
00409
00410
00411
00412
00413
00414 void News::capital_campaign() {
00415 str="You announce a capital campaign. Note that spending for the Development has increased.";
00416 }
00417
00418
00419
00420
00421 void News::student_loans() {
00422 if ( short_para1 == 0 )
00423 str="Student loans become harder to get. Applications rise at cheaper public institutions and fall at the more expensive privates.";
00424 else
00425 str="Student loans become easier to get. Applications rise at the more expensive privates and fall at cheaper public institutions.";
00426
00427 }
00428
00429
00430
00431
00435
00436 str = "Your football team wins the league title and goes to a New Year's Day Bowl Game. ";
00437 str += "You earn $";
00438 str += m.format(short_para1);
00439 str += " thousand, and donations and applications rise.";
00440 }
00441
00442
00443
00444
00448
00449 str = "Your hoopsters win their league title. ";
00450 str += "You earn $";
00451 str += m.format(short_para1);
00452 str += " thousand, and donations and applications rise.";
00453 }
00454
00455
00456
00457 #if(GAME_VERSION>=200)
00458
00459
00460 void News::bankruptcy_message_lv1() {
00461 str = "The Financial Office projects bankruptcy at year-end. You must act now to avoid fiscal disaster.";
00462 }
00463
00464
00465
00466
00467
00468 void News::bankruptcy_message_lv2() {
00469 str = "The Finance Office projects bankruptcy in warning in ";
00470 str += m.format(short_para1+12);
00471 str += " months. You should take remedial action very soon.";
00472 }
00473
00474
00475
00476
00477
00478 void News::bankruptcy_message_lv3() {
00479 str = "The Finance Office projects bankruptcy in warning in ";
00480 str += m.format(short_para1+24);
00481 str += " months. You should change your budget policies as soon as possible.";
00482 }
00483
00484
00485 #endif
00486
00487
00489
00490 str = "31 August deadline is approaching for next year's budget decisions.";
00491 }
00492
00493
00494
00495
00498
00499 str = "Make haste! You have only one year left to achieve your goal(s).";
00500 }
00501
00502
00503
00504
00507
00508 str = "This is a demo of the custom game and it will end at the end of the upcoming year.";
00509
00510 #ifdef DEMO
00511 str = "This demo game will end at the end of the upcoming year.";
00512 #endif
00513
00514 #ifdef ADMIN
00515 str = "The simulation will complete at the end of the upcoming year.";
00516 #endif
00517 }
00518
00519
00520
00521
00523
00524 str = "This is a demo of the custom game and it has reached its time limit. Please consider buying the Administrator version for fully functional custom games.";
00525
00526 #ifdef DEMO
00527 str = "This demo game has reached its time limit. Please consider buying the full version to extend play.";
00528 #endif
00529
00530 #ifdef ADMIN
00531 str = "You have reached the end of the simulation. Congratulations.";
00532 #endif
00533 }
00534
00535
00536
00537
00543
00544 if ( short_para1 == 0 ) {
00545 #if(GAME_VERSION>=200)
00546 char *plaqueStr[] = { "Summa Cum Laude", "Magna Cum Laude", "Cum Laude" };
00547 #else
00548 char *plaqueStr[] = { "gold", "silver", "bronze" };
00549 #endif
00550
00551 str = "Congratulations! You have achieved the ";
00552 str += plaqueStr[short_para2];
00553 str += " scenario goal by September ";
00554 str += m.format(short_para3,4);
00555 str += ". In honor of this occasion, the Board of Trustees is pleased to present you with this ";
00556 str += plaqueStr[short_para2];
00557 str += " plaque.";
00558 }
00559 else if ( short_para1 == 1 ) {
00560 str = "The time limit for this scenario has expired.";
00561 }
00562 else
00563 err_here();
00564 }
00565
00566
00567
00568