//--------- Begin of function FirmCamp::put_info ---------// // void FirmCamp::put_info(int refreshFlag) { // ##### begin Gilbert 21/9 ######// if( refreshFlag == INFO_REPAINT ) { last_menu_mode = firm_menu_mode = FIRM_MENU_MAIN; disp_combat_or_skill = 0; // display combat } // ##### end Gilbert 21/9 ######// else { if( last_menu_mode != firm_menu_mode ) // if changing menu mode pass repaint to sub-menu { refreshFlag = INFO_REPAINT; last_menu_mode = firm_menu_mode; } } Firm::put_info(refreshFlag); switch( firm_menu_mode ) { case FIRM_MENU_MAIN: if( should_show_info() ) { vga.active_buf->put_bitmap( INFO_X1, INFO_Y1, image_gameif.read("FORTBASE") ); disp_camp_info(INFO_Y1, refreshFlag); Firm *firmPtr = firm_array[firm_recno]; if( firm_id == FIRM_CAMP ) disp_camp_upgrade(INFO_Y1, refreshFlag); disp_soldier_list(INFO_Y1, refreshFlag, 0); disp_soldier_info(INFO_Y1+178, refreshFlag); // disp_debug_info(this, refreshFlag); } break; case FIRM_MENU_TRAIN: vga.active_buf->put_bitmap( INFO_X1, INFO_Y1, image_gameif.read("FORTBASE") ); disp_train_menu(refreshFlag); break; case FIRM_MENU_SPY: case FIRM_MENU_SELECT_BRIBER: vga.active_buf->put_bitmap( INFO_X1, INFO_Y1, image_gameif.read("FORTBASE") ); disp_spy_menu(refreshFlag); break; case FIRM_MENU_SET_BRIBE_AMOUNT: // vga.active_buf->put_bitmap( INFO_X1, INFO_Y1, image_gameif.read("FORTBASE") ); vga.active_buf->put_bitmap( INFO_X1, INFO_Y1, image_gameif.read("BLDGBASE") ); disp_bribe_menu(refreshFlag); break; case FIRM_MENU_BRIBE_RESULT: // vga.active_buf->put_bitmap( INFO_X1, INFO_Y1, image_gameif.read("FORTBASE") ); vga.active_buf->put_bitmap( INFO_X1, INFO_Y1, image_gameif.read("BLDGBASE") ); disp_bribe_result(refreshFlag); break; case FIRM_MENU_VIEW_SECRET: spy_array.disp_view_secret_menu(action_spy_recno, refreshFlag); break; case FIRM_MENU_ASSASSINATE_CONFIRM: vga.active_buf->put_bitmap( INFO_X1, INFO_Y1, image_gameif.read("BLDGBASE") ); disp_assassinate_confirm(refreshFlag); break; case FIRM_MENU_ASSASSINATE_RESULT: vga.active_buf->put_bitmap( INFO_X1, INFO_Y1, image_gameif.read("BLDGBASE") ); disp_assassinate_result(refreshFlag); break; case FIRM_MENU_STEAL_TECH_CONFIRM: vga.active_buf->put_bitmap( INFO_X1, INFO_Y1, image_gameif.read("BLDGBASE") ); disp_steal_tech_confirm(refreshFlag); break; case FIRM_MENU_STEAL_TECH_RESULT: vga.active_buf->put_bitmap( INFO_X1, INFO_Y1, image_gameif.read("BLDGBASE") ); disp_steal_tech_result(refreshFlag); break; case FIRM_MENU_INCIDENT_NATION: vga.active_buf->put_bitmap( INFO_X1, INFO_Y1, image_gameif.read("BLDGBASE") ); disp_incident_nation(refreshFlag); break; case FIRM_MENU_INCIDENT_CONFIRM: vga.active_buf->put_bitmap( INFO_X1, INFO_Y1, image_gameif.read("BLDGBASE") ); disp_incident_confirm(refreshFlag); break; case FIRM_MENU_INCIDENT_RESULT: vga.active_buf->put_bitmap( INFO_X1, INFO_Y1, image_gameif.read("BLDGBASE") ); disp_incident_result(refreshFlag); break; default: err_when( firm_menu_mode < FIRM_MENU_CAMP_LAST ); // if firm_menu_mode >= FIRM_MENU_CAMP_LAST, handled by sub-class } }
//--------- Begin of function Firm::disp_info_both ---------// // void Firm::disp_info_both(int refreshFlag) { static char lastUnderConstruction; static short lastFirmRecno; static char lastShouldShowInfo; static short lastPlayerSpyCount; //------ check if under_construction has been changed -----// if( lastUnderConstruction != under_construction ) { lastUnderConstruction = under_construction; if( refreshFlag == INFO_UPDATE ) info.disp(); // refresh the display } //--------------------------------------------// if( under_construction ) { disp_basic_info(INFO_Y1, refreshFlag); if( refreshFlag == INFO_REPAINT ) font_san.d3_put( INFO_X1, INFO_Y1+54, INFO_X2, INFO_Y1+74, _("Under Construction") ); } else { //------ check if should_show_info() has been changed -----// int shouldShowInfo = should_show_info(); if( shouldShowInfo != lastShouldShowInfo || player_spy_count != lastPlayerSpyCount ) { lastShouldShowInfo = shouldShowInfo; lastPlayerSpyCount = player_spy_count; if( refreshFlag == INFO_UPDATE ) { info.disp(); return; } } //----------------------------------------// if( lastFirmRecno != firm_recno || (firm_menu_mode != FIRM_MENU_ASSASSINATE_RESULT && player_spy_count==0 && bribe_result==BRIBE_NONE) ) // don't refresh mode if the player spy in the firm has just failed the bribing and executed, and we now need to display the failure message { firm_menu_mode = FIRM_MENU_MAIN; lastFirmRecno = firm_recno; bribe_result = BRIBE_NONE; } switch( firm_menu_mode ) { case FIRM_MENU_MAIN: put_info(refreshFlag); break; case FIRM_MENU_SPY: case FIRM_MENU_SELECT_BRIBER: disp_spy_menu(refreshFlag); break; case FIRM_MENU_SET_BRIBE_AMOUNT: disp_bribe_menu(refreshFlag); break; case FIRM_MENU_VIEW_SECRET: spy_array.disp_view_secret_menu(action_spy_recno, refreshFlag); break; case FIRM_MENU_ASSASSINATE_RESULT: disp_assassinate_result(refreshFlag); break; } #ifdef DEBUG if(debug2_enable_flag) { font_san.d3_put( INFO_X1, INFO_Y2-30, INFO_X2, INFO_Y2, "" ); font_san.field( INFO_X1+10, INFO_Y2-20, " ", INFO_X1+20, firm_recno, 1, INFO_X2-10, refreshFlag); font_san.field( INFO_X1+40, INFO_Y2-20, " ", INFO_X1+50, loc_x1, 1, INFO_X2-10, refreshFlag); font_san.field( INFO_X1+70, INFO_Y2-20, " ", INFO_X1+80, loc_y1, 1, INFO_X2-10, refreshFlag); font_san.field( INFO_X1+100, INFO_Y2-20, " ", INFO_X1+110, ai_link_checked, 1, INFO_X2-10, refreshFlag); } #endif } }