//--------- Begin of function Unit::disp_main_menu ---------// // void Unit::disp_main_menu(int refreshFlag) { disp_basic_info(INFO_Y1, refreshFlag); disp_unit_profile( INFO_Y1+52, refreshFlag ); if( !should_show_info() ) return; //---------------------------------// int y=INFO_Y1+98; if( race_id ) { disp_unit_info( y, refreshFlag ); y += 89; } //---------------------------------// if( is_own_spy() ) { disp_spy_menu(y, refreshFlag); y+=spy_menu_height()+3; } if( is_own() ) { if( refreshFlag == INFO_REPAINT ) disp_button(y); y+=BUTTON_ACTION_HEIGHT; } #ifdef DEBUG if( sys.debug_session || sys.testing_session ) disp_debug_info(this, INFO_Y2-68, refreshFlag); #endif }
//--------- 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); }
//--------- Begin of function UnitGod::disp_info ---------// // void UnitGod::disp_info(int refreshFlag) { disp_basic_info(INFO_Y1, refreshFlag); disp_unit_profile( INFO_Y1+54, refreshFlag ); if( !is_own() ) return; if( game.game_mode == GAME_TEST ) return; if( god_res[god_id]->can_cast_power ) { //-------- get the button name --------// const char* buttonName; switch(god_id) { case GOD_PERSIAN: buttonName = "GODHEAL"; break; case GOD_JAPANESE: buttonName = "GODMIND"; break; case GOD_MAYA: buttonName = "GODINCCL"; break; case GOD_VIKING: buttonName = "GODRAIN"; break; case GOD_EGYPTIAN: buttonName = "GODEGYPT"; break; case GOD_INDIAN: buttonName = "GODMUGL"; break; case GOD_ZULU: buttonName = "GODZULU"; break; default: err_here(); } //----------- create the cast button -----------// button_cast.paint(INFO_X1, INFO_Y1+101, 'A', buttonName ); if( hit_points >= god_res[god_id]->power_pray_points ) button_cast.enable(); else button_cast.disable(); //------ The viking gods have two types of power ------// if( god_id == GOD_VIKING ) { button_cast2.paint(INFO_X1+BUTTON_ACTION_WIDTH, INFO_Y1+101, 'A', "GODTORNA" ); if( hit_points >= god_res[god_id]->power_pray_points ) button_cast2.enable(); else button_cast2.disable(); } } }