//--------- Begin of function SpyArray::disp_view_secret_menu ---------// // void SpyArray::disp_view_secret_menu(int spyRecno, int refreshFlag) { // vga.active_buf->put_bitmap( INFO_X1, INFO_Y1, image_gameif.read("BLDGBASE") ); vga.active_buf->put_bitmap( INFO_X1, INFO_Y1, image_gameif.read("MISSBASE") ); //------------------------------------// // vga.d3_panel_up( INFO_X1, INFO_Y1, INFO_X2, INFO_Y1+42 ); // font_san.put_paragraph( INFO_X1+7, INFO_Y1+5, INFO_X2-7, INFO_Y2-5, // "Steal which type of secrets?" ); font_whbl.put_paragraph( INFO_X1+18, INFO_Y1+12, INFO_X2-14, INFO_Y1+72, text_firm.str_spy_steal_info() ); // "Which category of information do you wish to view?" ); //------------------------------------// int y=INFO_Y1+45; err_when( spy_array.is_deleted(spyRecno) ); Spy* spyPtr = spy_array[spyRecno]; int i; for( i=0 ; i<SECRET_REPORT_COUNT ; i++ ) { // button_secret_report_array[i].create( INFO_X1+18, y, INFO_X2-10, y+21, // disp_text_button, ButtonCustomPara( secret_report_str_array[i], i), 0 ); button_secret_report_array[i].create( INFO_X1+18, y, INFO_X2-10, y+21, disp_text_button, ButtonCustomPara( text_reports.str_report_mode(i+1), i), 0 ); button_secret_report_array[i].enable_flag = tech_res[TECH_INFO_THEFT]->get_nation_tech_level(spyPtr->true_nation_recno) && spyPtr->spy_skill >= secret_view_skill_array[i]; y+=23; } // push the first enabled button for( i = 0; i < SECRET_REPORT_COUNT; i++ ) { if( button_secret_report_array[i].enable_flag ) { button_secret_report_array.push(i, 0); break; } } button_secret_report_array.paint(); button_view_secret.create( INFO_X1+13, INFO_Y1+281, 'A', "VSECRET" ); button_secret_report_cancel.create( INFO_X1+13+3*BUTTON_DISTANCE, INFO_Y1+281, 'A', "PREVMENU" ); button_view_secret.enable_flag = button_secret_report_array[button_secret_report_array()].enable_flag; button_view_secret.paint(); button_secret_report_cancel.paint(); }
void FirmIncubator::disp_firm_info(int dispY1, int refreshFlag) { String str; if( refreshFlag == INFO_REPAINT ) { button_select_build.create( INFO_X1 +13, INFO_Y1 +281, 'A', "MAKEWEAP" ); // ###### begin Gilbert 11/3 ########// button_go_rally.create( INFO_X1+13+BUTTON_DISTANCE*2, INFO_Y1+235, 'A', "RALLY-GO" ); button_clear_rally.create( INFO_X1+13+BUTTON_DISTANCE*3, INFO_Y1+235, 'A', "RALLY-NO" ); // ###### end Gilbert 11/3 ########// } disp_war_info(INFO_Y1+54, refreshFlag); if ( build_unit_id ) { int limit = 2; if ( animate_seqno >=(limit*3) ) animate_seqno = 1; char animate[] = "GEARW-0"; animate[6] = '3' - animate_seqno / limit; animate_seqno ++; vga.active_buf->put_bitmap( INFO_X1+140, INFO_Y1+61, image_icon.read( animate ) ); } int x2 = INFO_X1 +13; int y2 = INFO_Y1 +281; button_select_build.enable_flag = 0; if( is_own() ) { button_select_build.enable_flag = 1; button_select_build.paint(); // ------- display rally points button ------// if( (button_go_rally.visible_flag = rally_enable_flag != 0) ) button_go_rally.paint(); if( (button_clear_rally.visible_flag = rally_enable_flag != 0) ) button_clear_rally.paint(); } }
//--------- Begin of function FirmCamp::disp_camp_upgrade ---------// // void FirmCamp::disp_camp_upgrade(int dispY1, int refreshFlag) { if( is_own() ) { int x2 = INFO_X1 +13; int y2 = INFO_Y1 +281; char iconName[]="CTOF-00"; if( refreshFlag==INFO_REPAINT ) { button_camp_upgrade.create( x2 + 162, y2, 'A', iconName ); button_camp_upgrade.set_help_code( "CAMPTOFORT" ); } button_camp_upgrade.enable_flag = 1; if ( upgrading_firm_id ) { iconName[5] = '0' + upgrade_completion_percent/40; iconName[6] = '0' + upgrade_completion_percent/4 % 10; vga.active_buf->put_bitmap( x2 +162, y2, image_spict.read(iconName) ); } else button_camp_upgrade.paint(); } }
void FirmIncubator::disp_war_info(int dispY1, int refreshFlag) { static short lastUnitId=0; String str; if( refreshFlag==INFO_UPDATE && lastUnitId != build_unit_id ) { lastUnitId = build_unit_id; info.disp(); } //---------------- paint the panel --------------// if( refreshFlag == INFO_REPAINT ) { button_cancel_build.create(INFO_X1 +182, INFO_Y1 +5, "WRFC_X-U", "WRFC_X-D"); button_cancel_build.set_help_code( "CANCELWP" ); } if( !build_unit_id ) { // str = "No Weapon"; // font_snds.put( INFO_X1+25, INFO_Y1+13, str ); // str = "is under construction !"; // font_snds.put( INFO_X1+25, INFO_Y1+31, str ); font_snds.put_paragraph( INFO_X1+25, INFO_Y1+13, INFO_X1+140, INFO_Y1+46, text_firm.str_no_build_weapon() ); button_cancel_build.enable_flag = 0; } else { //-------- display the icon of the researching item ---------// UnitInfo* unitInfo = unit_res[build_unit_id]; info.draw_unit_icon( INFO_X1 +53, INFO_Y1 +110, build_unit_id, nation_recno, INFO_X1+12, INFO_Y1+55, INFO_X2, INFO_Y2, 1); str = unitInfo->name; int techLevel = unitInfo->get_nation_tech_level(nation_recno); if( techLevel > 1 ) { str += " "; str += misc.roman_number(techLevel); } font_snds.put( INFO_X1+25, INFO_Y1+13, str, 0, -1, 1 ); //-- unitInfo->build_days is the no. of days take to build the firm when productivity is 100, the actually no. of days will be longer if productivity is less than 100 --// float buildProgressDays = build_progress_days; int x = font_snds.put( INFO_X1+25, INFO_Y1+31, (int) buildProgressDays ); x = font_snds.put( x, INFO_Y1+31, " / " ); font_snds.put( x, INFO_Y1+31, (int) unitInfo->build_days ); button_cancel_build.enable_flag = 1; button_cancel_build.paint(); } }
//--------- Begin of function FirmMonsterFortress::disp_camp_info ---------// // void FirmMonsterFortress::disp_camp_info(int dispY1, int refreshFlag) { if( is_own() ) { int x1 = INFO_X1 +13; int y1 = INFO_Y1 +235; int x2 = INFO_X1 +13; int y2 = INFO_Y1 +281; if( refreshFlag==INFO_REPAINT ) { button_patrol.create( x2, y2, 'A', "PATROL" ); button_transform_grokken.create( x1+BUTTON_DISTANCE, y1, 'A', "FORTRS-2" ); button_reward.create( x1, y1, 'A', "F_REWARD" ); } button_patrol.enable_flag = archer_count > 0; button_patrol.paint(); button_transform_grokken.enable_flag = 1; button_transform_grokken.paint(); if( nation_array[nation_recno]->cash >= REWARD_COST && selected_archer_id > 0 && selected_archer_id <= archer_count && unit_array[archer_unit_recno[selected_archer_id-1]]->rank_id != RANK_KING ) button_reward.enable_flag = 1; // call paint else button_reward.enable_flag = 0; // call paint button_reward.paint(); // display number of supporter info.draw_unit_icon( INFO_X1+40, INFO_Y1+52, support_unit_id, nation_recno, INFO_X1+15, INFO_Y1+5, INFO_X1+68, INFO_Y1+84, 1 ); String str; str = unit_res[support_unit_id]->name; str += " x "; str += extra_builder_count; font_snds.center_put( INFO_X1+88, INFO_Y1+15, INFO_X1+217, INFO_Y1+74, str, 0, 0 ); } }
void FirmIncubator::disp_build_menu(int refreshFlag) { int x1 = INFO_X1+13; int y1 = INFO_Y1+5; vga.active_buf->put_bitmap( INFO_X1, INFO_Y1, image_gameif.read("BLDGWEAP") ); added_count = 0; int unitId, x=INFO_X1+2, y=INFO_Y1; UnitInfo* unitInfo; for( int i = 0; i < MAX_INCUBATE_TYPE; ++i ) { unitId = incubate_unit_id[i]; unitInfo = unit_res[unitId]; if( refreshFlag == INFO_REPAINT ) { button_queue_weapon[added_count].create(x1+20, y1+5, x1+49, y1+34, i_disp_queue_button, ButtonCustomPara(this, unitId) ); button_weapon[added_count].create(x1, y1+35, x1+67, y1+114, i_disp_build_button, ButtonCustomPara(&button_queue_weapon[added_count], unitId) ); } button_weapon[added_count].visible_flag = button_queue_weapon[added_count].visible_flag = unitInfo->get_nation_tech_level(nation_recno) > 0; button_weapon[added_count].paint(); button_queue_weapon[added_count].paint(); added_count++; x1 += 68; if (added_count == 3) { x1 = INFO_X1+13; y1 = INFO_Y1+121; } } if( refreshFlag==INFO_REPAINT ) { // ##### begin Gilbert 8/2 ######// int x1 = INFO_X1 +13 +BUTTON_DISTANCE*3; int y1 = INFO_Y1 +281; // button_cancel.create( x1+7, y1+9, "OK-U", "OK-D" ); button_cancel.create( x1, y1, 'A', "CANCEL" ); // ##### end Gilbert 8/2 ######// } button_cancel.paint(); }
void FirmOffensive::disp_main_menu(int refreshFlag) { Firm::put_info(refreshFlag); button_cast.create( INFO_X1 +13, INFO_Y1 +259, 'A', "GBA-1" ); if( !should_show_info() ) return; vga.active_buf->put_bitmap( INFO_X1, INFO_Y1, image_gameif.read("BLDGBASE") ); // display delay if( cast_delay > 0 ) { short* hitPointBitmap =NULL; int ratio = cast_delay *40 / cast_delay_max; int size = cast_delay *76 / cast_delay_max; //106 x 35 --- 15 to 90 ie. 0 to 40 int offsetX = -35; int offsetY = -40; hitPointBitmap = (short *)mem_add( BitmapW::size(15 +size, 35) ); if (ratio <11) vga.active_buf->put_bitmap_trans( INFO_X1 +80 +20 +offsetX, INFO_Y1 +49 +offsetY, image_spict.read("MTR_10")); else if (ratio <40) vga.active_buf->put_bitmap_trans( INFO_X1 +80 +20 +offsetX, INFO_Y1 +49 +offsetY, image_spict.read("MTR_39")); else vga.active_buf->put_bitmap_trans( INFO_X1 +80 +20 +offsetX, INFO_Y1 +49 +offsetY, image_spict.read("MTR_40")); vga.active_buf->read_bitmapW( INFO_X1 +80 +20 +offsetX, INFO_Y1 +49 +offsetY, INFO_X1 +94 +20 +size +offsetX, INFO_Y1 +80 +offsetY, hitPointBitmap ); vga.active_buf->put_bitmap_trans( INFO_X1 +80 +20 +offsetX, INFO_Y1 +49 +offsetY, image_spict.read("MTR_00")); vga.active_buf->put_bitmapW( INFO_X1 +80 +20 +offsetX, INFO_Y1 +49 +offsetY, hitPointBitmap ); mem_del( hitPointBitmap ); } if( !is_own() ) return; char fileName[] = "GBA-1"; if (button_cast.enable_flag) fileName[4] = '1' + (char) (sys.frame_count%3); button_cast.update_bitmap( fileName ); button_cast.enable_flag = can_cast(magic_id_upper_limit); button_cast.paint(); }
//---------- Begin of function MapMatrix::init_para ------------// void MapMatrix::init_para() { last_map_mode = MAP_MODE_POWER; map_mode = MAP_MODE_POWER; power_mode = 0; zoom_map_building_disappear = 0; filter_object_flag = 0; filter_object_type = 0; filter_object_para = 0; filter_object_locked = 0; filter_nation_flag = 0; filter_nation_locked = 0; button_filter_object.create(MAP_MODE_BUTTON_X1+56+6, MAP_MODE_BUTTON_Y1+8+19, "O-UP", "O-DN", 0 ); button_filter_object.set_help_code( "OBJECT" ); button_filter_nation.create(MAP_MODE_BUTTON_X1+30+17, MAP_MODE_BUTTON_Y1+9, "N-UP", "N-DN", 0 ); button_filter_nation.set_help_code( "NATION" ); }
//--------- Begin of function FirmMarket::put_info ---------// // void FirmMarket::put_info(int refreshFlag) { Firm::put_info(refreshFlag); vga.active_buf->put_bitmap( INFO_X1, INFO_Y1, image_gameif.read("MARKBASE") ); disp_market_info( INFO_Y1, refreshFlag ); //--- only display market info if the player is allowed to trade with this market ---// if( config.show_ai_info || is_own() ) { disp_income(INFO_Y1+209, refreshFlag ); // 1-display income figure } button_hire_caravan.create( INFO_X1+13, INFO_Y1+281, 'A', "HIRECARA" ); button_hire_caravan.enable_flag = 0; if( is_own() ) { button_hire_caravan.enable_flag = can_hire_caravan(); button_hire_caravan.paint(); } /* disp_basic_info(INFO_Y1, refreshFlag); //--- only display market info if the player is allowed to trade with this market ---// put_market_info(INFO_Y1+50, refreshFlag); //------------------------------------------------// if( !config.show_ai_info && nation_recno!=nation_array.player_recno ) return; disp_income(INFO_Y1+209, refreshFlag ); // 1-display income figure button_hire_caravan.paint( INFO_X1, INFO_Y1+236, 'A', "HIRECARA" ); if( can_hire_caravan() ) button_hire_caravan.enable(); else button_hire_caravan.disable(); */ }
//--------- Begin of function FirmResearch::disp_research_class_menu ---------// // void FirmResearch::disp_research_class_menu(int refreshFlag) { int classTechId; int x=INFO_X1+23, y=INFO_Y1+13; int x2 = INFO_X1 +13; int y2 = INFO_Y1 +281; // String str; vga.active_buf->put_bitmap( INFO_X1, INFO_Y1, image_gameif.read("BLDGBASE") ); // ##### patch begin Gilbert 28/9 ########// //str = "Select a technology class to research"; // font_snds.center_put( INFO_X1+7, INFO_Y1+13, INFO_X2, INFO_Y1+28, str ); // font_snds.center_put( INFO_X1+7, INFO_Y1+13, INFO_X2, INFO_Y1+28, // text_firm.str_select_tech_class() ); font_snds.put_paragraph( x, y, INFO_X2-6, INFO_Y1+52, text_firm.str_select_tech_class() ); y = font_snds.next_text_y + 2; for( classTechId=FIRST_TECH_CLASS_RESEARCH ; classTechId<=LAST_TECH_CLASS_RESEARCH ; classTechId++ ) { int b = classTechId-FIRST_TECH_CLASS_RESEARCH; if( tech_res.tech_class(classTechId)->researchable_tech_count(nation_array.player_recno) ==0 ) continue; //-----------------------------------------// // button_research_class_array[b].create( x, y+(b+1)*20, x +187, y+(b+1)*20+17, // i_disp_research_class_button, ButtonCustomPara( this, classTechId) ); button_research_class_array[b].create( x, y+b*20, x +187, y+b*20+17, i_disp_research_class_button, ButtonCustomPara( this, classTechId) ); button_research_class_array[classTechId-1].paint(); } // ##### patch end Gilbert 28/9 ########// x2 += 3 * BUTTON_DISTANCE; button_cancel.create( x2, y2, 'A', "CANCEL" ); button_cancel.paint(); }
//--------- Begin of function UnitCaravan::disp_info ---------// // void UnitCaravan::disp_info(int refreshFlag) { char *nationPict = image_spict.get_ptr("V_COLCOD"); vga.active_buf->put_bitmap_trans_remap_decompress(INFO_X1+16, INFO_Y1-28, nationPict, game.get_color_remap_table(nation_recno, 0) ); vga.active_buf->put_bitmap( INFO_X1, INFO_Y1, image_gameif.read("CARABASE") ); // disp_basic_info(INFO_Y1, refreshFlag); disp_unit_profile(10, refreshFlag); if( !config.show_ai_info && !is_own() ) return; disp_stop(INFO_Y1+54, refreshFlag); // display auto/manual button button_duplicate_caravan.create( INFO_X1+13, INFO_Y1+281, 'A', "CARACOPY" ); // manual button button_auto_trade_group[0].create( INFO_X1+BUTTON_DISTANCE+13, INFO_Y1+235, INFO_X1+BUTTON_DISTANCE+56-1, INFO_Y1+280, i_disp_auto_trade_button, ButtonCustomPara(this, 0), 0 ); // auto button button_auto_trade_group[1].create( INFO_X1+13, INFO_Y1+235, INFO_X1+56-1, INFO_Y1+280, i_disp_auto_trade_button, ButtonCustomPara(this, 1), 0 ); button_auto_trade_group[1].set_help_code( "AUTOPICK" ); button_auto_trade_group.paint( default_market_trade_mode ); button_duplicate_caravan.enable_flag = can_duplicate_caravan(); button_duplicate_caravan.paint(); disp_goods(INFO_Y1+235, refreshFlag); }
void FirmOffensive::disp_magic_menu(int refreshFlag) { // ----- create cancel button -------// button_cancel.create( INFO_X1 +13, INFO_Y1 +235, 'A', "CANCEL" ); if( !should_show_info() ) return; vga.active_buf->put_bitmap(INFO_X1, INFO_Y1, image_gameif.read("BLDGBASE") ); if( !is_own() ) return; // display instruction // String str; switch( menu_mode ) { case FIRM_MAGIC_MENU_CAST: font_snds.center_put_paragraph( INFO_X1 +20 , INFO_Y1 +20, INFO_X2 -10, INFO_Y1 +60, text_firm.str_cast_magic_instruct(menu_mode_para), 2, 0, 0); break; case FIRM_MAGIC_MENU_UNIT: // str = "Select a Unit to Teleport"; font_snds.center_put_paragraph( INFO_X1 +20 , INFO_Y1 +20, INFO_X2 -10, INFO_Y1 +60, text_firm.str_cast_teleport_source(), 2, 0, 0); break; default: err_here(); } // display magic name // font_snds.center_put_paragraph( INFO_X1 +20 , INFO_Y1 +60, INFO_X2 -10, INFO_Y1 +80, // tech_res[magic_info_array[menu_mode_para-1].tech_id]->tech_des(), 2, 0, 0); // display cost if( menu_mode == FIRM_MAGIC_MENU_CAST ) { char mobileType; int pointedXLoc; int pointedYLoc; if( world.zoom_matrix->get_detect_location(mouse.cur_x, mouse.cur_y, &pointedXLoc, &pointedYLoc, &mobileType) ) { // int x2 = font_snds.put( INFO_X1+20, INFO_Y1+70, "Life Point Cost : "); // font_snds.put( x2, INFO_Y1+70, calc_live_point_cost( menu_mode_para, pointedXLoc, pointedYLoc, teleport_unit_recno) ); switch( menu_mode_para ) { case MAGIC_DESTROY_BUILDING: case MAGIC_FREEZE_UNIT: case MAGIC_DAMAGE_AREA: case MAGIC_GOD_POWER: font_snds.center_put_paragraph( INFO_X1 +20 , INFO_Y1 +80, INFO_X2 -10, INFO_Y1 +120, text_firm.str_cast_cost_cash(calc_cash_cost( menu_mode_para, pointedXLoc, pointedYLoc, 0)), 2, 0, 0); break; case MAGIC_TELEPORT: font_snds.center_put_paragraph( INFO_X1 +20 , INFO_Y1 +80, INFO_X2 -10, INFO_Y1 +120, text_firm.str_teleport_cost_cash(calc_cash_cost( menu_mode_para, pointedXLoc, pointedYLoc, teleport_unit_recno)), 2, 0, 0); break; } } } // display cancel button button_cancel.paint(); }
// ------- begin of function FirmMonsterTrain::disp_firm_info -------// // void FirmMonsterTrain::disp_firm_info(int dispY1, int refreshFlag ) { int i; if( refreshFlag == INFO_REPAINT ) { button_mobilize.create( INFO_X1+13, INFO_Y1+235, 'A', "MOBILIZE" ); button_mobilize.enable_flag = 0; if ((train_type_count == 1) && (train_unit_id[0] == UNIT_BEE)) button_patrol.create( INFO_X1+13+BUTTON_DISTANCE, INFO_Y1+235, 'A', "PATROL-B" ); else if ((train_type_count == 1) && (train_unit_id[0] == UNIT_TERMITE)) button_patrol.create( INFO_X1+13+BUTTON_DISTANCE, INFO_Y1+235, 'A', "PATROL-T" ); else button_patrol.create( INFO_X1+13+BUTTON_DISTANCE, INFO_Y1+235, 'A', "PATROL" ); button_patrol.enable_flag = 0; for( i = 0; i < train_type_count; ++i ) { if( i < 4 ) // 4 buttons at bottom line { if ((train_type_count == 1) && (train_unit_id[0] == UNIT_BEE)) button_train[i].create( INFO_X1+13+i*BUTTON_DISTANCE, INFO_Y1+281, 'A', "TRAIN-B" ); else if ((train_type_count == 1) && (train_unit_id[0] == UNIT_TERMITE)) button_train[i].create( INFO_X1+13+i*BUTTON_DISTANCE, INFO_Y1+281, 'A', "TRAIN-T" ); else button_train[i].create( INFO_X1+13+i*BUTTON_DISTANCE, INFO_Y1+281, 'A', "F_TRAIN" ); } else { if ((train_type_count == 1) && (train_unit_id[0] == UNIT_BEE)) button_train[i].create( INFO_X1+13+(7-i)*BUTTON_DISTANCE, INFO_Y1+235, 'A', "TRAIN-B" ); else if ((train_type_count == 1) && (train_unit_id[0] == UNIT_TERMITE)) button_train[i].create( INFO_X1+13+(7-i)*BUTTON_DISTANCE, INFO_Y1+235, 'A', "TRAIN-T" ); else button_train[i].create( INFO_X1+13+(7-i)*BUTTON_DISTANCE, INFO_Y1+235, 'A', "F_TRAIN" ); } button_train[i].enable_flag = 0; } // ###### begin Gilbert 11/3 ########// button_go_rally.create( INFO_X1+13+BUTTON_DISTANCE*2, INFO_Y1+235, 'A', "RALLY-GO" ); button_clear_rally.create( INFO_X1+13+BUTTON_DISTANCE*3, INFO_Y1+235, 'A', "RALLY-NO" ); // ###### end Gilbert 11/3 ########// } if( !should_show_info() ) return; // ------ display mobilize button -------// button_mobilize.enable_flag = 0; if( is_own() ) { if( selected_trainee_id > 0 && selected_trainee_id <= trainee_count ) { MonsterTrainee *traineePtr = trainee_array + selected_trainee_id - 1; button_mobilize.enable_flag = !traineePtr->is_under_training(); } button_mobilize.paint(); // ----- display mobilize all button -------// for( i = 0; i < trainee_count && trainee_array[i].is_under_training(); ++i ); button_patrol.enable_flag = i < trainee_count; button_patrol.paint(); // ----- display train button ----------// for( i = 0; i < train_type_count; ++i ) { button_train[i].enable_flag = can_recruit(train_unit_id[i]); button_train[i].paint(); } // ------- display rally points button ------// if( (button_go_rally.visible_flag = rally_enable_flag != 0) ) button_go_rally.paint(); if( (button_clear_rally.visible_flag = rally_enable_flag != 0) ) button_clear_rally.paint(); } }
// -------- begin of function FirmResearch::disp_firm_info --------// // void FirmResearch::disp_firm_info(int dispY1, int refreshFlag) { String str; int techId = nation_array[nation_recno]->research_tech_id; // ###### begin Gilbert 5/10 ######// //---------------- paint the panel --------------// // techId =1; if( !techId ) { // str = "No Technology is"; // font_snds.center_put( INFO_X1+7, INFO_Y1+31, INFO_X2, INFO_Y1+48, str ); // str = "currently being"; // font_snds.center_put( INFO_X1+7, INFO_Y1+60, INFO_X2, INFO_Y1+77, str ); // str = "researched."; // font_snds.center_put( INFO_X1+7, INFO_Y1+89, INFO_X2, INFO_Y1+106, str ); font_snds.center_put_paragraph( INFO_X1+45, INFO_Y1+31, INFO_X2-40, INFO_Y1+106, text_firm.str_no_research(), 16, 0, 0 ); } else { //-------- display the icon of the researching item ---------// int x = INFO_X1; int y = INFO_Y1; TechInfo* techInfo = tech_res[techId]; //----------- display text ------------// // str = "Research Progress"; font_snds.center_put( INFO_X1+7, INFO_Y1+11, INFO_X2, INFO_Y1+28, text_firm.str_research_progress() ); // <tech> <version> str = techInfo->tech_des(); int researchVersion = techInfo->get_nation_tech_level(nation_recno)+1; // research the next non-researched version if( researchVersion > 1 ) { str += " "; str += m.roman_number(researchVersion); } font_snds.center_put( INFO_X1+7, INFO_Y1+28, INFO_X2, INFO_Y1+45, str ); // str = "Completion Percent"; font_snds.center_put( INFO_X1+7, INFO_Y1+97, INFO_X2, INFO_Y1+114, text_firm.str_completion_percent() ); // <completion> % int researchProgress = (int) nation_array[nation_recno]->research_progress(); str = (int) researchProgress; str += " %"; font_snds.center_put( INFO_X1+7, INFO_Y1+97+18, INFO_X2, INFO_Y1+114+18, str ); short* hitPointBitmap =NULL; int ratio = researchProgress * 40 / 100; int size = researchProgress * 76 / 100; //106 x 35 --- 15 to 90 ie. 0 to 40 // hitPointBitmap = (short *)mem_add( BitmapW::size(15 +size, 35) ); // if (ratio <11) // vga.active_buf->put_bitmap_trans( INFO_X1 +62, INFO_Y1 +59, image_spict.read("MTR_10")); // else // if (ratio <40) // vga.active_buf->put_bitmap_trans( INFO_X1 +62, INFO_Y1 +59, image_spict.read("MTR_39")); // else // vga.active_buf->put_bitmap_trans( INFO_X1 +62, INFO_Y1 +59, image_spict.read("MTR_40")); // vga.active_buf->read_bitmapW( INFO_X1 +62, INFO_Y1 +59, INFO_X1 +75 +size, INFO_Y1 +90, hitPointBitmap ); // vga.active_buf->put_bitmap_trans( INFO_X1 +62, INFO_Y1 +59, image_spict.read("MTR_00")); // vga.active_buf->put_bitmapW( INFO_X1 +62, INFO_Y1 +59, hitPointBitmap ); // mem_del( hitPointBitmap ); // ----- put empty bar ------// vga.active_buf->put_bitmap_trans( INFO_X1 +62, INFO_Y1 +59, image_spict.read("MTR_00")); // ----- put bar content -----// if( size > 0 ) { char *barBitmap; if (ratio <11) barBitmap = image_spict.read("MTR_10"); else if (ratio <40) barBitmap = image_spict.read("MTR_39"); else barBitmap = image_spict.read("MTR_40"); vga.active_buf->put_bitmap_area_trans( INFO_X1+62, INFO_Y1+59, barBitmap, 0, 0, 13+size, ((Bitmap *)barBitmap)->get_height()-1 ); } } // int x1 = INFO_X1 +13; // int y1 = INFO_Y1 +235; // int x2 = INFO_X1 +13; // int y2 = INFO_Y1 +281; if( is_own() ) { if (!is_monster()) button_select_research.create( INFO_X1 +13, INFO_Y1 +281, 'A', "RESEARCH" ); else button_select_research.create( INFO_X1 +13, INFO_Y1 +281, 'A', "F_RESE" ); button_select_research.paint(); } // ###### end Gilbert 5/10 ######// }
// -------- begin of function FirmWar::disp_firm_info --------// // void FirmWar::disp_firm_info(int dispY1, int refreshFlag) { String str; if( refreshFlag == INFO_REPAINT ) { button_select_build.create( INFO_X1 +13, INFO_Y1 +281, 'A', "MAKEWEAP" ); button_select_build2.create( INFO_X1 +13 + BUTTON_DISTANCE, INFO_Y1 +281, 'A', "MAKEWEAP" ); // ###### begin Gilbert 4/5 ########// button_go_rally.create( INFO_X1+13+BUTTON_DISTANCE*2, INFO_Y1+281, 'A', "RALLY-GO" ); button_clear_rally.create( INFO_X1+13+BUTTON_DISTANCE*3, INFO_Y1+281, 'A', "RALLY-NO" ); // ###### end Gilbert 4/5 ########// } disp_war_info(INFO_Y1+54, refreshFlag); if ( (int) productivity > 0 && build_unit_id ) { int limit; if ( (int) productivity > 0 && (int) productivity <= 10 ) limit = 6; if ( (int) productivity > 10 && (int) productivity <= 25 ) limit = 5; if ( (int) productivity > 25 && (int) productivity <= 45 ) limit = 4; if ( (int) productivity > 45 && (int) productivity <= 70 ) limit = 3; if ( (int) productivity > 70 && (int) productivity <=100 ) limit = 2; if ( (int) productivity >100 ) limit = 1; if ( animate_seqno >=(limit*3) ) animate_seqno = 1; char animate[] = "GEARW-0"; animate[6] = '3' - animate_seqno / limit; if (config.frame_speed != 0) animate_seqno ++; vga.active_buf->put_bitmap( INFO_X1+140, INFO_Y1+61, image_icon.read( animate ) ); } if( is_own() ) { button_select_build.paint(); #ifdef DEMO button_select_build2.visible_flag = 0; #else button_select_build2.visible_flag = nation_recno && tech_res.tech_class(TECH_CLASS_MEGA_WEAPON)->total_tech_count(nation_recno) > 0; #endif button_select_build2.paint(); // ------- display rally points button ------// if( (button_go_rally.visible_flag = rally_enable_flag != 0) ) button_go_rally.paint(); if( (button_clear_rally.visible_flag = rally_enable_flag != 0) ) button_clear_rally.paint(); } }
//--------- Begin of function FirmWar::disp_build_menu ---------// // void FirmWar::disp_build_menu(int refreshFlag) { int x1 = INFO_X1+13; int y1 = INFO_Y1+5; vga.active_buf->put_bitmap( INFO_X1, INFO_Y1, image_gameif.read("BLDGWEAP") ); if( refreshFlag == INFO_REPAINT ) { added_count=0; } int b = 0; TechClass *techClass = tech_res.tech_class(war_tech_class); // war_tech_class is set the which tech class of weapon to build // int x=INFO_X1+2, y=INFO_Y1; for( int techId = techClass->first_tech_id; techId<techClass->first_tech_id+techClass->tech_count; ++techId ) { short unitId = tech_res[techId]->unit_id; if( !unitId ) continue; UnitInfo* unitInfo = unit_res[unitId]; if( unitInfo->unit_class != UNIT_CLASS_WEAPON ) continue; if( refreshFlag == INFO_REPAINT ) { err_when( b != added_count); button_queue_weapon[added_count].create(x1+20, y1+5, x1+49, y1+34, i_disp_queue_button, ButtonCustomPara(this, unitId) ); button_queue_weapon[added_count].set_help_code( "WEAPNUM" ); button_weapon[added_count].create(x1, y1+35, x1+67, y1+114, i_disp_build_button, ButtonCustomPara(&button_queue_weapon[added_count], unitId) ); added_count++; x1 += 68; if (added_count == 3) { x1 = INFO_X1+13; y1 = INFO_Y1+121; } err_when(added_count > MAX_WEAPON_TYPE); } if( unitInfo->get_nation_tech_level(nation_recno) > 0 ) button_queue_weapon[b].visible_flag = button_weapon[b].visible_flag = 1; else button_queue_weapon[b].visible_flag = button_weapon[b].visible_flag = 0; button_queue_weapon[b].paint(); button_weapon[b].paint(); ++b; } if( refreshFlag==INFO_REPAINT ) { // ##### begin Gilbert 8/2 ######// int x1 = INFO_X1 +13 +BUTTON_DISTANCE*3; int y1 = INFO_Y1 +281; // button_cancel.create( x1+7, y1+9, "OK-U", "OK-D" ); button_cancel.create( x1, y1, 'A', "CANCEL" ); // ##### end Gilbert 8/2 ######// } button_cancel.paint(); }
//--------- Begin of function FirmWar::disp_war_info ---------// // void FirmWar::disp_war_info(int dispY1, int refreshFlag) { static short lastUnitId=0; String str; if( refreshFlag==INFO_UPDATE && lastUnitId != build_unit_id ) { lastUnitId = build_unit_id; info.disp(); } //---------------- paint the panel --------------// // #### begin Gilbert 5/10 ######// if( refreshFlag == INFO_REPAINT ) { button_cancel_build.create(INFO_X1 +182, INFO_Y1 +5, "WRFC_X-U", "WRFC_X-D"); button_cancel_build.set_help_code( "CANCELWP" ); } // #### end Gilbert 5/10 ######// if( !build_unit_id ) { // str = "No Weapon"; // font_snds.put( INFO_X1+25, INFO_Y1+13, str ); // str = "is under construction !"; // font_snds.put( INFO_X1+25, INFO_Y1+31, str ); font_snds.put_paragraph( INFO_X1+25, INFO_Y1+13, INFO_X1+140, INFO_Y1+46, text_firm.str_no_build_weapon() ); // ##### begin Gilbert 5/10 #######// button_cancel_build.enable_flag = 0; // ##### end Gilbert 5/10 #######// } else { //-------- display the icon of the researching item ---------// UnitInfo* unitInfo = unit_res[build_unit_id]; // info.draw_unit_icon( INFO_X1 +53, INFO_Y1 +110, build_unit_id, // nation_recno, INFO_X1+12, INFO_Y1+55, INFO_X2, INFO_Y2, 1); Bitmap *bitmapPtr = (Bitmap *) unitInfo->soldier_icon_ptr; // int x1 = INFO_X1 +53 + unitInfo->unit_icon_offsetx; // int y1 = INFO_Y1 +110 + unitInfo->unit_icon_offsety; // int x2 = x1 + bitmapPtr->get_width() -1; // int y2 = y1 + bitmapPtr->get_height() -1; int x1 = INFO_X1 + 51 - bitmapPtr->get_width()/2; int y1 = INFO_Y1 + 139 - bitmapPtr->get_height(); int x2 = x1 + bitmapPtr->get_width() -1; int y2 = y1 + bitmapPtr->get_height() -1; int srcX1 = MAX(x1, INFO_X1+13)-x1; int srcY1 = 0; int srcX2 = MIN(x2, INFO_X2)-x1; int srcY2 = MIN(y2, INFO_Y2)-y1; short *colorRemapTable = game.get_color_remap_table(nation_recno, 1); vga.active_buf->put_bitmap_area_trans_remap_decompress(x1, y1, (char *) bitmapPtr, srcX1, srcY1, srcX2, srcY2, colorRemapTable); str = unitInfo->name; // ##### begin Gilbert 24/3 #####// // if( unitInfo->unit_class == UNIT_CLASS_WEAPON ) // add version no. if( unitInfo->class_info.has_weapon_version ) // add version no. // ##### end Gilbert 24/3 #####// { int techLevel = unitInfo->get_nation_tech_level(nation_recno); if( techLevel > 1 ) { str += " "; str += misc.roman_number(techLevel); } } font_snds.center_put( INFO_X1+18, INFO_Y1+13, INFO_X2, INFO_Y1+25, str, 0, 1 ); //-- unitInfo->build_days is the no. of days take to build the firm when productivity is 100, the actually no. of days will be longer if productivity is less than 100 --// // ##### begin Gilbert 30/12 #####// float buildProgressDays = build_progress_days; // + (float) (sys.frame_count-last_process_build_frame_no) / FRAMES_PER_DAY // * (float) (worker_count*6+productivity/2) / 100; // ##### end Gilbert 30/12 #####// // str = (int) buildProgressDays; // str += " / "; // str += (int) unitInfo->build_days; // font_snds.put( INFO_X1+25, INFO_Y1+31, str ); int x = font_snds.put( INFO_X1+100, INFO_Y1+31, (int) buildProgressDays ); x = font_snds.put( x, INFO_Y1+31, " / " ); font_snds.put( x, INFO_Y1+31, (int) unitInfo->build_days ); // ##### begin Gilbert 5/10 #######// button_cancel_build.enable_flag = 1; button_cancel_build.paint(); // ##### end Gilbert 5/10 #######// } }
//--------- Begin of function FirmInn::put_info ---------// // void FirmInn::put_info(int refreshFlag) { if( selected_unit_id < 0 ) selected_unit_id = 0; if( selected_unit_id > inn_unit_count ) selected_unit_id = inn_unit_count; Firm::put_info(refreshFlag); button_hire.create(INFO_X1+13, INFO_Y1+235, 'A', "HIREUNIT" ); button_hire.enable_flag = 0; button_spy_mobilize.create(INFO_X1+13, INFO_Y1+235, 'A', "MOBILSPY" ); button_spy_mobilize.enable_flag = 0; button_buy_item.create( INFO_X1+13+BUTTON_DISTANCE, INFO_Y1+235, INFO_X1+13+BUTTON_DISTANCE+ITEM_ICON_WIDTH, INFO_Y1+235+ITEM_ICON_HEIGHT, disp_item_button, ButtonCustomPara(NULL, 0) ); button_buy_item.visible_flag = 0; button_hire_visible = button_spy_mobilize_visible = 0; if( !should_show_info() ) return; vga.active_buf->put_bitmap( INFO_X1, INFO_Y1, image_gameif.read("INN_BASE") ); disp_unit_list( INFO_Y1, refreshFlag ); disp_unit_info( INFO_Y1 + 165, refreshFlag ); // ------ main interface --------// // ------ display hire button -------// button_hire.enable_flag = 0; button_spy_mobilize.enable_flag = 0; if( selected_unit_id > 0 && selected_unit_id <= inn_unit_count ) { InnUnit *innUnit = inn_unit_array + selected_unit_id - 1; if( innUnit->is_own_spy() ) { button_spy_mobilize.enable_flag = 1; button_spy_mobilize.paint(); button_spy_mobilize_visible = 1; } else if( is_own() ) { button_hire.enable_flag = (~nation_array)->cash >= innUnit->hire_cost; button_hire.paint(); button_hire_visible = 1; } else { button_spy_mobilize.paint(); button_spy_mobilize_visible = 1; } if( (button_buy_item.visible_flag = innUnit->item.id != 0) ) { button_buy_item.enable_flag = is_own() && buy_item( selected_unit_id, 1 ); // checking only button_buy_item.custom_para.value = innUnit->item.id; button_buy_item.paint(); } } else { if( is_own() ) { button_hire.paint(); button_hire_visible = 1; } else { button_spy_mobilize.paint(); button_spy_mobilize_visible = 0; } button_buy_item.visible_flag = 0; } }
// -------- begin of function FirmBase::disp_firm_info --------// // void FirmBase::disp_firm_info(int dispY1, int refreshFlag) { disp_god_info(INFO_Y1+226, refreshFlag); //------ display button -------// int x2 = INFO_X1 +13; int y2 = INFO_Y1 +281; if( refreshFlag == INFO_REPAINT ) { button_clear_text.create( INFO_X1+13+3*BUTTON_DISTANCE, INFO_Y1+281, 'A', "PREVMENU" ); } if( !is_own() ) return; x2 += BUTTON_DISTANCE; char fileName[] = "GB-AX"; char i = (char) (sys.frame_count % 9); if (i > 4) i = 8 - i; fileName[4] = '1' + i; if( (!can_invoke()) && (god_unit_recno == 0) ) { button_invoke.paint( x2, y2, 'A', "INVOKE" ); button_invoke.set_help_code("GDINVOKE"); button_invoke.disable(); } else { if( !god_unit_recno ) { button_invoke.paint( x2, y2-12, 'A', "GB-A1" ); button_invoke.set_help_code("GDINVOKE"); } else { button_invoke.paint( x2, y2-12, 'A', fileName ); button_invoke.set_help_code("GDINVOKE"); } button_invoke.enable(); } x2 += BUTTON_DISTANCE; i = (char) (sys.frame_count % 9); if (i > 4) i = 8 - i; fileName[4] = '1' + i; fileName[3] = 'B'; fileName[4] = '1' + i; if( (!can_make_wish()) && (invoked_effect_id == 0) ) { button_unknown_effect.paint( x2, y2, 'A', "INVOKE" ); button_unknown_effect.set_help_code("BLESS"); button_unknown_effect.disable(); } else { if ( !invoked_effect_id ) { button_unknown_effect.paint( x2, y2-15, 'A', "GB-B1" ); button_unknown_effect.set_help_code("BLESS"); button_unknown_effect.enable(); } else { button_unknown_effect.paint( x2, y2-15, 'A', fileName ); button_unknown_effect.set_help_code("BLESS"); button_unknown_effect.enable(); } } // ----- display clear invoked_effect_text button -----// button_clear_text.visible_flag = invoked_effect_text[0]; // displaying invoked effect text button_clear_text.paint(); }
//--------- Begin of function FirmCamp::disp_camp_info ---------// // void FirmFort::disp_camp_info(int dispY1, int refreshFlag) { FirmCamp::disp_camp_info(dispY1, refreshFlag); // ----- display train button -------// int x2 = INFO_X1 +13; int y2 = INFO_Y1 +281; if (!is_monster()) button_train.create( INFO_X1+13, INFO_Y1+281, 'A', "TRAIN" ); else button_train.create( INFO_X1+13, INFO_Y1+281, 'A', "F_TRAIN" ); // scan any available population to train // ##### begin Gilbert 23/12 #######// if( (button_train.visible_flag = is_own()) ) { button_train.enable_flag = can_recruit(active_link_town_recno); button_train.paint(); } // ##### end Gilbert 23/12 #######// // ------- display tower count -----// button_tower_count.create( INFO_X1+13+3*BUTTON_DISTANCE+6, INFO_Y1+235+6, INFO_X1+13+3*BUTTON_DISTANCE+6+TOWER_COUNT_BUTTON_WIDTH-1, INFO_Y1+235+6+TOWER_COUNT_BUTTON_HEIGHT-1, disp_tower_count, ButtonCustomPara( NULL, 0 ) ); //#ifdef DEBUG // BUGHERE : ARM_TOWERS is longer than 8 characters // button_tower_count.set_help_code("ARM_TOWERS"); button_tower_count.set_help_code("ARM_TOWE"); //#endif button_tower_count.enable_flag = is_own(); button_tower_count.custom_para = ButtonCustomPara( NULL, target_archer_count ); button_tower_count.paint(); // ------- display towers ----------// err_when( !image_spict.read_all ); // must read_all char *towerFull = image_spict.read("TOWER-F"); char *towerEmpty = image_spict.read("TOWER-E"); char *towerBuilding = image_spict.read("TOWER-D"); int towerHeight = ((Bitmap *)towerFull)->get_height(); err_when( ((Bitmap *)towerEmpty)->get_height() != towerHeight ); err_when( ((Bitmap *)towerBuilding)->get_height() != towerHeight ); int towerWidth = ((Bitmap *)towerFull)->get_width(); // static int towerXTable[MAX_FORT_ARCHER] = { 180, 202, 191, 180, 202 }; // static int towerYTable[MAX_FORT_ARCHER] = { 280, 280, 292, 304, 304 }; static int towerXTable[MAX_FORT_ARCHER] = { 180, 202, 191, 180, 202 }; static int towerYTable[MAX_FORT_ARCHER] = { 304, 304, 292, 280, 280 }; for( int i = 0; i < MAX_FORT_ARCHER; ++i ) { int towerX = INFO_X1 + towerXTable[i]; int towerY = INFO_Y1 + towerYTable[i]; if( i < current_archer_count ) { // display full tower vga.active_buf->put_bitmap( towerX, towerY, towerFull ); } else if( i == current_archer_count ) { // display building tower vga.active_buf->put_bitmap( towerX, towerY, towerEmpty ); // display portion of towerFull at bottom int subTowerHeight = train_archer_progress * towerHeight / MAX_TRAIN_ARCHER_PROGRESS; if( subTowerHeight > 0 ) { vga.active_buf->put_bitmap_area( towerX, towerY, towerBuilding, 0, towerHeight-subTowerHeight, towerWidth-1, towerHeight-1 ); } } else { // display disabled tower vga.active_buf->put_bitmap( towerX, towerY, towerEmpty ); } } help.set_help( INFO_X1+176, INFO_Y1+278, INFO_X1+176+39, INFO_Y1+278+48, "TOWERS" ); }
//--------- Begin of function FirmCamp::disp_camp_info ---------// // void FirmCamp::disp_camp_info(int dispY1, int refreshFlag) { if( is_own() ) { int x1 = INFO_X1 +13; int y1 = INFO_Y1 +235; int x2 = INFO_X1 +13; int y2 = INFO_Y1 +281; if( refreshFlag==INFO_REPAINT ) { // ##### begin Gilbert 31/12 #######// // button_patrol.create( INFO_X1+13, INFO_Y1+235, 'A', "PATROL" ); // button_reward.create( INFO_X1+13+BUTTON_DISTANCE, INFO_Y1+235, 'A', "REWARDCB" ); // button_defense.create( INFO_X1+13+2*BUTTON_DISTANCE, INFO_Y1+235, 'A', defense_flag ? "DEFENSE1" : "DEFENSE0" ); if (!is_monster()) button_patrol.create( INFO_X1+13+BUTTON_DISTANCE, INFO_Y1+281, 'A', "PATROL" ); else button_patrol.create( INFO_X1+13+BUTTON_DISTANCE, INFO_Y1+281, 'A', "F_PATROL" ); if (!is_monster()) button_reward.create( INFO_X1+13, INFO_Y1+235, 'A', "REWARD" ); else button_reward.create( INFO_X1+13, INFO_Y1+235, 'A', "F_REWARD" ); if (!is_monster()) button_defense.create( INFO_X1+13+2*BUTTON_DISTANCE, INFO_Y1+281, 'A', defense_flag ? "DEFENSE1" : "DEFENSE0" ); else button_defense.create( INFO_X1+13+2*BUTTON_DISTANCE, INFO_Y1+281, 'A', defense_flag ? "F_DEFEN1" : "F_DEFEN0" ); if (!is_monster()) button_promote.create( INFO_X1+13+2*BUTTON_DISTANCE , INFO_Y1+235, 'A', "PROMOTE" ); else button_promote.create( INFO_X1+13+2*BUTTON_DISTANCE , INFO_Y1+235, 'A', "F_PROMOT" ); // ##### end Gilbert 31/12 #######// } if( overseer_recno ) { button_patrol.enable_flag = 1; } else { for( int i = 0; i < soldier_count && soldier_array[i].is_under_training(); ++i ); button_patrol.enable_flag = i < soldier_count; } String str; switch(patrol_state) { case PATROL_ALL: // str = "Sortie All"; str = ""; break; case PATROL_NO_GENERAL: str = "Sortie No Leader"; break; case PATROL_NO_INJURED_SOILDER: str = "Sortie No Injured"; break; default: break; } button_patrol.paint(); // vga.active_buf->bar_alpha( button_patrol.x1, button_patrol.y1+15, button_patrol.x1+BUTTON_ACTION_WIDTH-1, button_patrol.y1+BUTTON_ACTION_HEIGHT-16, 1, 0 ); font_whbl.center_put_paragraph( button_patrol.x1, button_patrol.y1, button_patrol.x1+BUTTON_ACTION_WIDTH-1, button_patrol.y1+BUTTON_ACTION_HEIGHT-1, str ); // ###### begin Gilbert 15/4 ########// if( nation_array[nation_recno]->cash >= REWARD_COST && ( (overseer_recno && unit_array[overseer_recno]->rank_id != RANK_KING && unit_res[unit_array[overseer_recno]->unit_id]->class_info.has_loyalty) || (selected_soldier_id && selected_soldier_id <= soldier_count && unit_res[soldier_array[selected_soldier_id-1].unit_id]->class_info.has_loyalty)) ) button_reward.enable_flag = 1; // call paint // ###### end Gilbert 15/4 ########// else button_reward.enable_flag = 0; // call paint button_reward.paint(); if (!is_monster()) button_defense.update_bitmap( defense_flag ? "DEFENSE1" : "DEFENSE0" ); // call paint else button_defense.update_bitmap( defense_flag ? "F_DEFEN1" : "F_DEFEN0" ); if( (button_promote.visible_flag = !overseer_recno) ) { button_promote.enable_flag = 0; if( selected_soldier_id > 0 && selected_soldier_id <= soldier_count ) { Soldier *soldierPtr = soldier_array + selected_soldier_id - 1; // ##### begin Gilbert 24/3 ######// err_when( soldierPtr->unit_id == UNIT_WAGON ); if( soldierPtr->race_id != 0 && soldierPtr->rank_id == RANK_SOLDIER && !soldierPtr->is_under_training() && soldierPtr->skill_level() > 0 ) // ##### end Gilbert 24/3 ######// { button_promote.enable_flag = 1; } } button_promote.paint(); } } disp_spy_button( INFO_X1+13+BUTTON_DISTANCE, INFO_Y1+281, refreshFlag); }