123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670 |
- /*
- * Seven Kingdoms: Ancient Adversaries
- *
- * Copyright 1997,1998 Enlight Software Ltd.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
- // Filename : OGAMENCY.CPP
- // description : view encyclopedia
- #include <ALL.h>
- #include <OIMGRES.h>
- #include <OVGA.h>
- #include <OSYS.h>
- #include <OMOUSE.h>
- #include <OMOUSECR.h>
- #include <OVGALOCK.h>
- #include <OGAME.h>
- #include <OMUSIC.h>
- //--------- define constant ---------//
- #define ENCYC_CLASS_COUNT 7
- #define FRYHTAN_MAX_PAGE 3
- #ifdef AMPLUS
- #define SUB_CLASS_BUTTON_MAX 10
- #else
- #define SUB_CLASS_BUTTON_MAX 8
- #endif
- enum
- {
- ENCYC_PEOPLE=1,
- ENCYC_WEAPONS,
- ENCYC_SHIPS,
- ENCYC_STRUCTURES,
- ENCYC_PALACE,
- ENCYC_GOD,
- ENCYC_FRYHTANS,
- };
- const int START_SLIDE_MODE_TIME = 60000; // 60 seconds
- const int SLIDE_MODE_TIME = 10000; // 10 seconds
- // static int sub_class_count_array[ENCYC_CLASS_COUNT] = { 7, 5, 4, 8, 7, 7, 1 };
- static int sub_class_count_array[ENCYC_CLASS_COUNT] =
- #ifdef AMPLUS
- { 10, 6, 4, 8, 10, 10, 17 };
- #else
- { 7, 5, 4, 8, 7, 7, 17 };
- #endif
- static char *race_name[] =
- #ifdef AMPLUS
- { "CHINESE", "EGYPTIAN", "GREEK", "JAPANESE", "MAYA", "INDIAN", "NORMAN", "PERSIAN", "VIKING", "ZULU" };
- #else
- { "CHINESE", "GREEK", "JAPANESE", "MAYA", "NORMAN", "PERSIAN", "VIKING" };
- #endif
- static char *weapon_name[] =
- #ifdef AMPLUS
- { "CATAPULT", "BALLISTA", "CANNON", "EXPCART", "FLAMETHR", "F_BALLIS" };
- #else
- { "CATAPULT", "BALLISTA", "CANNON", "EXPCART", "FLAMETHR" };
- #endif
- static char *ship_name[] =
- {
- "VESSEL",
- "TRANSPOR",
- "CARAVEL",
- "GALLEON",
- };
- static char *firm_name[] =
- {
- "FORT",
- "FACTORY",
- "WARFACT",
- "MARKET",
- "MINE",
- "INN",
- "SCIENCE",
- "HARBOR",
- };
- static char *god_name[] =
- #ifdef AMPLUS
- { "CHINESE", "GREEK", "PERSIAN", "NORMAN", "JAPANESE", "MAYA", "VIKING", "EGYPTIAN", "ZULU", "INDIAN" };
- #else
- { "CHINESE", "GREEK", "JAPANESE", "MAYA", "NORMAN", "PERSIAN", "VIKING" };
- #endif
- static char *monster_name[] =
- {
- "HOBGLOB",
- "SKELETON",
- "GREMJERM",
- "GNOLL",
- "GIANTET",
- "HEADLESS",
- "GOBLIN",
- "MAN",
- "GITH",
- "LYW",
- "ROCKMAN",
- "LIZARD",
- "FIREKIN",
- "STRUCT_1",
- "STRUCT_2",
- "STRUCT_3",
- "STRUCT_4",
- };
- static char monster_page_index[FRYHTAN_MAX_PAGE+1] = { 0, 7, 13, 17 };
- static char* button_name_array[ENCYC_CLASS_COUNT] =
- {
- "B_PEOP", "B_WEAP", "B_SHIP", "B_STRUCT", "B_PEOP",
- "B_GBEING", "B_FRYH",
- };
- static char* monster_button_name_array[FRYHTAN_MAX_PAGE] =
- {
- "B_FRYH", "B_FRYH2", "B_FRYH3",
- };
- static char std_extension[] = ".ICN";
- static char pal_extension[] = ".COL";
- //-------- define static variables ----------//
- static int main_class_id;
- static int sub_class_id_array[ENCYC_CLASS_COUNT];
- static int fryhtan_page;
- //-------- declare static functions ----------//
- static int detect_main_class_button();
- static int detect_sub_class_button(int n, int firstButton=1);
- static void disp_class_buttons();
- static int disp_picture( int selClass, int selSubClass, int firstDisp=0);
- //-------- Begin of function Game::view_encyclopedia ---------//
- void Game::view_encyclopedia()
- {
- music.stop(); // no music for encyclopedia as it reads files from the CDROM
- //-------- backup and switch palette ----------//
- VgaCustomPalette *backupPal = new VgaCustomPalette(NULL);
- //---- load the interface into the back buffer ----//
- image_encyc.put_to_buf( &vga_back, "ENCYC" );
- //-------- hide and change mouse cursor --------//
- mouse.hide();
- mouse_cursor.set_icon(CURSOR_ENCYC);
- main_class_id = 1;
- for( int i=0 ; i<ENCYC_CLASS_COUNT ; i++ )
- sub_class_id_array[i] = 1;
- unsigned long nextDisplayTime = m.get_time() + START_SLIDE_MODE_TIME;
- //------- display the default picture ----//
- disp_picture(main_class_id, sub_class_id_array[main_class_id-1], 1 );
- //------ turn screen dark and blt the buffer ---------//
- vga_front.bar( 0, 0, VGA_WIDTH-1, VGA_HEIGHT-1, 0 );
- sys.blt_virtual_buf();
- //------- bilt the back buffer to the front ---------//
- vga.blt_buf( 0,0, vga_back.buf_width()-1, vga_back.buf_height()-1, 0 );
- mouse.show();
- disp_class_buttons();
- //---------------------------------------------//
- while(1)
- {
- //-------------- yield ---------------//
- sys.yield();
- mouse.get_event();
- sys.blt_virtual_buf();
- //------ detect main class buttons -------//
- int selClass = detect_main_class_button();
- if( selClass && selClass != main_class_id)
- {
- main_class_id = selClass;
- disp_class_buttons();
- disp_picture(main_class_id, sub_class_id_array[main_class_id-1]);
- }
- //------ detect sub class buttons -------//
- int selSubClass = 0;
- if( main_class_id != ENCYC_FRYHTANS )
- {
- selSubClass = detect_sub_class_button(sub_class_count_array[main_class_id-1]);
- }
- else
- {
- #ifdef AMPLUS
- // two buttons at the bottom are for switching page
- #else
- // (one)two buttons next to the buttons of that page (pictButtonCount) are for switching page
- #endif
- // if in monster class, find out which page
- int monsterSubClass;
- for( monsterSubClass = 1; monsterSubClass <= FRYHTAN_MAX_PAGE &&
- sub_class_id_array[main_class_id-1]-1 >= monster_page_index[monsterSubClass];
- ++monsterSubClass);
- err_when( monsterSubClass > FRYHTAN_MAX_PAGE );
- int pictButtonCount = monster_page_index[monsterSubClass] -
- monster_page_index[monsterSubClass-1];
- #ifdef AMPLUS
- int nextPageButton = SUB_CLASS_BUTTON_MAX-1;
- int prevPageButton = SUB_CLASS_BUTTON_MAX;
- #else
- int nextPageButton = pictButtonCount+1;
- int prevPageButton = pictButtonCount+2;
- #endif
- // translate selSubClass from i-th button to new value of sub_class_count_array[main_class_id-1]
- if( (selSubClass = detect_sub_class_button(pictButtonCount)) > 0)
- {
- // click sub-class buttons
- selSubClass = monster_page_index[monsterSubClass-1]+(selSubClass-1)+1;
- }
- else if( nextPageButton <= SUB_CLASS_BUTTON_MAX &&
- detect_sub_class_button(nextPageButton, nextPageButton) == nextPageButton )
- {
- // click page switching buttons
- // increase monsterSubClass
- if( ++monsterSubClass > FRYHTAN_MAX_PAGE )
- monsterSubClass = 1;
- // switch page, assume the first picture of that page
- selSubClass = monster_page_index[monsterSubClass-1]+1;
- }
- else if( prevPageButton <= SUB_CLASS_BUTTON_MAX &&
- detect_sub_class_button(prevPageButton, prevPageButton) == prevPageButton )
- {
- // decrease monsterSubClass
- if( --monsterSubClass < 1)
- monsterSubClass = FRYHTAN_MAX_PAGE;
- // switch page, assume the first picture of that page
- selSubClass = monster_page_index[monsterSubClass-1]+1;
- }
- else
- selSubClass = 0; // as if not selected anything
- }
- if( selSubClass && selSubClass != sub_class_id_array[main_class_id-1] )
- {
- sub_class_id_array[main_class_id-1] = selSubClass;
- disp_class_buttons();
- disp_picture(main_class_id, selSubClass);
- nextDisplayTime = m.get_time() + START_SLIDE_MODE_TIME;
- }
- //------ detect the "Return" button -------//
- if( mouse.single_click(6, 552, 165, 592) ) // return button
- break;
- //--------- F9 to capture screen ----------//
- if( mouse.single_click(174, 12, 787, 587, 1) ) // right clicking on the picture to save it
- sys.capture_screen();
- //----------- auto slide show -------------//
- if( m.get_time() > nextDisplayTime )
- {
- //--- display next pictures ---//
- if( ++sub_class_id_array[main_class_id-1] > sub_class_count_array[main_class_id-1] )
- {
- sub_class_id_array[main_class_id-1] = 1;
- if( ++main_class_id > ENCYC_CLASS_COUNT )
- main_class_id = 1;
- }
- disp_class_buttons();
- if( disp_picture(main_class_id, sub_class_id_array[main_class_id-1]) )
- nextDisplayTime = m.get_time() + SLIDE_MODE_TIME;
- }
- }
- //------- exiting: turn dark --------//
- // vga.adjust_brightness(-255);
- vga_front.bar(0,0, vga_front.buf_width()-1, vga_front.buf_height()-1, 0 );
- sys.blt_virtual_buf();
- //-------- restore mouse cursor --------//
- mouse_cursor.set_icon(CURSOR_NORMAL);
- //----- palette restore when backupPal destruct ----//
- {
- vga_front.bar( 0, 0, VGA_WIDTH-1, VGA_HEIGHT-1, 0 );
- VgaFrontLock vgaLock;
- delete backupPal;
- }
- }
- //--------- End of function Game::view_encyclopedia ---------//
- //-------- Begin of static function detect_main_class_button ---------//
- static int detect_main_class_button()
- {
- #ifdef AMPLUS
- enum { BUTTON_X = 14, BUTTON_Y = 14, BUTTON_WIDTH = 146, BUTTON_HEIGHT = 28 };
- enum { BUTTON_Y_SPACING = 30 };
- #else
- enum { BUTTON_X = 14, BUTTON_Y = 14, BUTTON_WIDTH = 146, BUTTON_HEIGHT = 31 };
- enum { BUTTON_Y_SPACING = 34 };
- #endif
- for( int c=1 ; c<=ENCYC_CLASS_COUNT ; c++ )
- {
- //if( mouse.press_area( BUTTON_X, BUTTON_Y + (c-1)*BUTTON_Y_SPACING, BUTTON_X + BUTTON_WIDTH-1,
- // BUTTON_Y + c*BUTTON_Y_SPACING-1) )
- if( mouse.single_click( BUTTON_X, BUTTON_Y + (c-1)*BUTTON_Y_SPACING, BUTTON_X + BUTTON_WIDTH-1,
- BUTTON_Y + c*BUTTON_Y_SPACING-1) )
- {
- vga.blt_buf( BUTTON_X, BUTTON_Y + (main_class_id-1)*BUTTON_Y_SPACING, BUTTON_X + BUTTON_WIDTH-1,
- BUTTON_Y + main_class_id*BUTTON_Y_SPACING-1, 0);
- // ###### begin Gilbert 22/9 #######//
- // image_encyc.put_front(BUTTON_X-2, BUTTON_Y + (c-1)*BUTTON_Y_SPACING-2, "B_DOWN");
- image_encyc.put_front(BUTTON_X, BUTTON_Y + (c-1)*BUTTON_Y_SPACING, "B_DOWN");
- // ###### end Gilbert 22/9 #######//
- return c;
- }
- }
- return 0;
- }
- //-------- End of static function detect_main_class_button ---------//
- //-------- Begin of static function detect_sub_class_button ---------//
- static int detect_sub_class_button(int n, int firstButton)
- {
- #ifdef AMPLUS
- enum { BUTTON_X = 14, BUTTON_Y = 236, BUTTON_WIDTH = 146, BUTTON_HEIGHT = 28 };
- enum { BUTTON_Y_SPACING = 31, MAX_BUTTON = 10 };
- #else
- enum { BUTTON_X = 14, BUTTON_Y = 266, BUTTON_WIDTH = 146, BUTTON_HEIGHT = 31 };
- enum { BUTTON_Y_SPACING = 35, MAX_BUTTON = 8 };
- #endif
- for( int c=firstButton ; c<=n && c<=SUB_CLASS_BUTTON_MAX ; c++ )
- {
- //if( mouse.press_area( BUTTON_X, BUTTON_Y + (c-1)*BUTTON_Y_SPACING, BUTTON_X + BUTTON_WIDTH-1,
- // BUTTON_Y + c*BUTTON_Y_SPACING-1) )
- if( mouse.single_click( BUTTON_X, BUTTON_Y + (c-1)*BUTTON_Y_SPACING, BUTTON_X + BUTTON_WIDTH-1,
- BUTTON_Y + c*BUTTON_Y_SPACING-1) )
- {
- // int subClassId = sub_class_id_array[main_class_id-1];
- // vga.blt_buf( BUTTON_X, BUTTON_Y + (subClassId-1)*BUTTON_Y_SPACING, BUTTON_X + BUTTON_WIDTH-1,
- // BUTTON_Y + subClassId*BUTTON_Y_SPACING-1, 0);
- // ###### begin Gilbert 22/9 #######//
- // image_encyc.put_front(BUTTON_X-2, BUTTON_Y + (c-1)*BUTTON_Y_SPACING-2, "B_DOWN");
- image_encyc.put_front(BUTTON_X, BUTTON_Y + (c-1)*BUTTON_Y_SPACING, "B_DOWN");
- // ###### end Gilbert 22/9 #######//
- return c;
- }
- }
- return 0;
- }
- //-------- End of static function detect_sub_class_button ---------//
- //-------- Begin of static function disp_class_buttons ---------//
- //
- static void disp_class_buttons()
- {
- // ###### begin Gilbert 22/9 #######//
- #ifdef AMPLUS
- enum { BUTTON_X=14, BUTTON_WIDTH=146, CLASS_BUTTON_Y=14, CLASS_BUTTON_Y_SPACING=30,
- SUBCLASS_BUTTON_Y=236, SUBCLASS_TOP_BORDER=3, BUTTON_Y_SPACING=31 };
- #else
- enum { BUTTON_X=14, BUTTON_WIDTH=146, CLASS_BUTTON_Y=14, CLASS_BUTTON_Y_SPACING=34,
- SUBCLASS_BUTTON_Y=266, SUBCLASS_TOP_BORDER=4, BUTTON_Y_SPACING=35 };
- #endif
- // ###### end Gilbert 22/9 #######//
- int subClassId = sub_class_id_array[main_class_id-1];
- if( main_class_id != ENCYC_FRYHTANS )
- {
- vga_back.put_bitmap(12, SUBCLASS_BUTTON_Y-SUBCLASS_TOP_BORDER,
- image_encyc.get_ptr(button_name_array[main_class_id-1]) );
- }
- else
- {
- // if in monster class, find out which page
- int monsterSubClass;
- for( monsterSubClass = 1; monsterSubClass <= FRYHTAN_MAX_PAGE &&
- sub_class_id_array[main_class_id-1]-1 >= monster_page_index[monsterSubClass];
- ++monsterSubClass);
- err_when( monsterSubClass > FRYHTAN_MAX_PAGE );
- vga_back.put_bitmap(12, SUBCLASS_BUTTON_Y-SUBCLASS_TOP_BORDER,
- image_encyc.get_ptr(monster_button_name_array[monsterSubClass-1]) );
- // modify subClassId
- subClassId -= monster_page_index[monsterSubClass-1];
- }
- vga.blt_buf( BUTTON_X, 14, BUTTON_X+BUTTON_WIDTH-1, VGA_HEIGHT-40, 0 );
- int y=CLASS_BUTTON_Y;
- // ###### begin Gilbert 22/9 #######//
- image_encyc.put_front( BUTTON_X, y + (main_class_id-1)*CLASS_BUTTON_Y_SPACING, "B_DOWN");
- // ###### end Gilbert 22/9 #######//
- y=SUBCLASS_BUTTON_Y;
- // #### begin Gilbert 22/9 #######//
- image_encyc.put_front( BUTTON_X, y + (subClassId-1)*BUTTON_Y_SPACING, "B_DOWN");
- // #### end Gilbert 22/9 #######//
- }
- //-------- End of static function disp_class_buttons ---------//
- //-------- Begin of static function disp_picture ---------//
- //
- // <int> selClass, selSubClass - currently selected class and subclass id.
- // [int] firstDisp - whether it is the first display action
- // when the encyclopedia is called upl.
- //
- static int disp_picture( int selClass, int selSubClass, int firstDisp)
- {
- if( !DIR_ENCYC[0] )
- return 0;
- char filename[64];
- char palname[64];
- filename[0] = '\0';
- #ifdef AMPLUS
- // alternative path
- char filename2[64];
- char palname2[64];
- filename2[0] = '\0';
- #endif
- switch( selClass )
- {
- case ENCYC_PEOPLE:
- strcpy( filename, DIR_ENCYC );
- strcat( filename, "UNIT\\" );
- strcat( filename, race_name[selSubClass-1] );
- strcpy( palname, filename);
- strcat( palname, pal_extension);
- strcat( filename, std_extension );
- #ifdef AMPLUS
- if( DIR_ENCYC2[0] )
- {
- strcpy( filename2, DIR_ENCYC2 );
- strcat( filename2, "UNIT\\" );
- strcat( filename2, race_name[selSubClass-1] );
- strcpy( palname2, filename2);
- strcat( palname2, pal_extension);
- strcat( filename2, std_extension );
- }
- #endif
- break;
- case ENCYC_WEAPONS:
- strcpy( filename, DIR_ENCYC );
- strcat( filename, "UNIT\\" );
- strcat( filename, weapon_name[selSubClass-1] );
- strcpy( palname, filename);
- strcat( palname, pal_extension);
- strcat( filename, std_extension );
- #ifdef AMPLUS
- if( DIR_ENCYC2[0] )
- {
- strcpy( filename2, DIR_ENCYC2 );
- strcat( filename2, "UNIT\\" );
- strcat( filename2, weapon_name[selSubClass-1] );
- strcpy( palname2, filename2);
- strcat( palname2, pal_extension);
- strcat( filename2, std_extension );
- }
- #endif
- break;
- case ENCYC_SHIPS:
- strcpy( filename, DIR_ENCYC );
- strcat( filename, "UNIT\\" );
- strcat( filename, ship_name[selSubClass-1] );
- strcpy( palname, filename);
- strcat( palname, pal_extension);
- strcat( filename, std_extension );
- #ifdef AMPLUS
- if( DIR_ENCYC2[0] )
- {
- strcpy( filename2, DIR_ENCYC2 );
- strcat( filename2, "UNIT\\" );
- strcat( filename2, ship_name[selSubClass-1] );
- strcpy( palname2, filename2);
- strcat( palname2, pal_extension);
- strcat( filename2, std_extension );
- }
- #endif
- break;
- case ENCYC_STRUCTURES:
- strcpy( filename, DIR_ENCYC );
- strcat( filename, "FIRM\\" );
- strcat( filename, firm_name[selSubClass-1] );
- strcpy( palname, filename);
- strcat( palname, pal_extension);
- strcat( filename, std_extension );
- #ifdef AMPLUS
- if( DIR_ENCYC2[0] )
- {
- strcpy( filename2, DIR_ENCYC2 );
- strcat( filename2, "FIRM\\" );
- strcat( filename2, firm_name[selSubClass-1] );
- strcpy( palname2, filename2);
- strcat( palname2, pal_extension);
- strcat( filename2, std_extension );
- }
- #endif
- break;
- case ENCYC_PALACE:
- strcpy( filename, DIR_ENCYC );
- strcat( filename, "SEAT\\" );
- strcat( filename, race_name[selSubClass-1] );
- strcpy( palname, filename);
- strcat( palname, pal_extension);
- strcat( filename, std_extension );
- #ifdef AMPLUS
- if( DIR_ENCYC2[0] )
- {
- strcpy( filename2, DIR_ENCYC2 );
- strcat( filename2, "SEAT\\" );
- strcat( filename2, race_name[selSubClass-1] );
- strcpy( palname2, filename2);
- strcat( palname2, pal_extension);
- strcat( filename2, std_extension );
- }
- #endif
- break;
- case ENCYC_GOD:
- strcpy( filename, DIR_ENCYC );
- strcat( filename, "GOD\\" );
- strcat( filename, god_name[selSubClass-1] );
- strcpy( palname, filename);
- strcat( palname, pal_extension);
- strcat( filename, std_extension );
- #ifdef AMPLUS
- if( DIR_ENCYC2[0] )
- {
- strcpy( filename2, DIR_ENCYC2 );
- strcat( filename2, "GOD\\" );
- strcat( filename2, god_name[selSubClass-1] );
- strcpy( palname2, filename2);
- strcat( palname2, pal_extension);
- strcat( filename2, std_extension );
- }
- #endif
- break;
- case ENCYC_FRYHTANS:
- strcpy( filename, DIR_ENCYC );
- strcat( filename, "MONSTER\\" );
- strcat( filename, monster_name[selSubClass-1] );
- strcpy( palname, filename);
- strcat( palname, pal_extension);
- strcat( filename, std_extension );
- #ifdef AMPLUS
- if( DIR_ENCYC2[0] )
- {
- strcpy( filename2, DIR_ENCYC2 );
- strcat( filename2, "MONSTER\\" );
- strcat( filename2, monster_name[selSubClass-1] );
- strcpy( palname2, filename2);
- strcat( palname2, pal_extension);
- strcat( filename2, std_extension );
- }
- #endif
- break;
- default:
- err_here();
- return 0;
- }
- File pictFile;
- char *palNamePtr = NULL;
- if(
- #ifdef AMPLUS
- // search DIR_ENCYC2 first
- filename2[0] && m.is_file_exist(filename2) && pictFile.file_open(filename2,0) && (palNamePtr = palname2) ||
- #endif
- filename[0] && m.is_file_exist(filename) && pictFile.file_open(filename,0) && (palNamePtr = palname) )
- {
- vga_back.put_large_bitmap(174, 12, &pictFile);
- if( !firstDisp )
- vga_front.bar(174,12,787,587, 0x00); // wipe the picture screen
- if( palNamePtr && m.is_file_exist(palNamePtr) )
- {
- VgaFrontLock vgaLock;
- VgaCustomPalette::set_custom_palette(palNamePtr);
- }
- if( !firstDisp )
- vga.blt_buf(174,12,787,587, 0);
- return 1;
- }
- return 0;
- }
- //-------- End of static function disp_picture ---------//
|