//-------- Begin of function i_disp_build_button --------// // static void i_disp_build_button(ButtonCustom *button, int repaintBody) { int x1 = button->x1; int y1 = button->y1; int x2 = button->x2; int y2 = button->y2; if( !button->pushed_flag ) { if( repaintBody ) { vga_util.blt_buf(x1, y1, x2, y2, 0); vga_util.d3_panel2_up( x1, y1, x2, y2, 1 ); } x2--; y2--; } else { if( repaintBody ) { vga_util.blt_buf(x1, y1, x2, y2, 0); vga_util.d3_panel2_down( x1, y1, x2, y2, 1 ); } x1++; y1++; } ButtonCustom *queueButton = (ButtonCustom *)button->custom_para.ptr; if( repaintBody) { // display unit large icon short unitId = button->custom_para.value; UnitInfo* unitInfo = unit_res[unitId]; vga_front.put_bitmap(x1+6, y1+4, unitInfo->get_large_icon_ptr(0)); err_when( button->custom_para.value != queueButton->custom_para.value); //-------- display unit name --------// String str; str = unitInfo->name; if( unitInfo->unit_class == UNIT_CLASS_WEAPON ) // add version no. { FirmHarbor *harbor = (FirmHarbor *)queueButton->custom_para.ptr; int techLevel = unitInfo->get_nation_tech_level(harbor->nation_recno); if( techLevel > 1 ) { str += " "; str += misc.roman_number(techLevel); } } font_bible.put( x1+60, y1+13, str ); } // display small button queueButton->paint(-1, repaintBody); }
//--------- Begin of function FirmBase::disp_god_info ---------// // void FirmBase::disp_god_info(int dispY1, int refreshFlag) { //---------------- paint the panel --------------// if( refreshFlag == INFO_REPAINT ) vga_util.d3_panel_up( INFO_X1, dispY1, INFO_X2, dispY1+50 ); //-------- display the icon of the mythical creature -------// int x=INFO_X1+4, y=dispY1+4; UnitInfo* unitInfo = unit_res[ god_res[god_id]->unit_id ]; if( refreshFlag == INFO_REPAINT ) { vga_util.d3_panel_down( x, y, x+UNIT_LARGE_ICON_WIDTH+3, y+UNIT_LARGE_ICON_HEIGHT+3, 2 ); vga_front.put_bitmap( x+2, y+2, unitInfo->get_large_icon_ptr(0) ); //----------- display text ------------// x += UNIT_LARGE_ICON_WIDTH+10; font_san.put( x, y+2, unitInfo->name ); } else { x += UNIT_LARGE_ICON_WIDTH+10; } vga_front.indicator( 0x00, x-3, y+18, pray_points, (float) MAX_PRAY_POINTS, 0 ); }