version 1.10 | | version 1.11 |
---|
| | |
* Routines for menus. | | * Routines for menus. |
* | | * |
* $Log$ | | * $Log$ |
| | * Revision 1.11 2000/10/27 10:12:54 donut |
| | * fixed segv if menu res and game res were different, due to fonts getting swapped by set_screen_mode but still using the old pointers |
| | * |
* Revision 1.10 2000/10/27 09:25:09 donut | | * Revision 1.10 2000/10/27 09:25:09 donut |
* made newmenu_do3_real take fonts to use, and make newmenu_do3 and newmenu_do_fixedfont call that | | * made newmenu_do3_real take fonts to use, and make newmenu_do3 and newmenu_do_fixedfont call that |
* | | * |
| | |
if (nitems < 1 ) | | if (nitems < 1 ) |
return -1; | | return -1; |
| | |
set_screen_mode(SCREEN_MENU); | | // set_screen_mode(SCREEN_MENU);// caller is responsible for setting screen mode first, else fonts can get screwed up. Not a big deal since (at the moment) only the 2 funcs below call this one directly. |
| | |
//NO_SOUND_PAUSE if ( Function_mode == FMODE_GAME ) { | | //NO_SOUND_PAUSE if ( Function_mode == FMODE_GAME ) { |
//NO_SOUND_PAUSE digi_pause_all(); | | //NO_SOUND_PAUSE digi_pause_all(); |
| | |
bg.background = gr_create_bitmap( w, h ); | | bg.background = gr_create_bitmap( w, h ); |
Assert( bg.background != NULL ); | | Assert( bg.background != NULL ); |
gr_bm_bitblt(w, h, 0, 0, 0, 0, &grd_curcanv->cv_bitmap, bg.background ); | | gr_bm_bitblt(w, h, 0, 0, 0, 0, &grd_curcanv->cv_bitmap, bg.background ); |
printf("hello #######\n");//############## | | |
} | | } |
| | |
// ty = 15 + (yborder/4); | | // ty = 15 + (yborder/4); |
| | |
} | | } |
| | |
int newmenu_do_fixedfont( char * title, char * subtitle, int nitems, newmenu_item * item, void (*subfunction)(int nitems,newmenu_item * items, int * last_key, int citem), int citem, char * filename, int width, int height){ | | int newmenu_do_fixedfont( char * title, char * subtitle, int nitems, newmenu_item * item, void (*subfunction)(int nitems,newmenu_item * items, int * last_key, int citem), int citem, char * filename, int width, int height){ |
| | set_screen_mode(SCREEN_MENU);//hafta set the screen mode before calling or fonts might get changed/freed up if screen res changes |
return newmenu_do3_real( title, subtitle, nitems, item, subfunction, citem, filename, width,height, GAME_FONT, GAME_FONT, GAME_FONT, GAME_FONT); | | return newmenu_do3_real( title, subtitle, nitems, item, subfunction, citem, filename, width,height, GAME_FONT, GAME_FONT, GAME_FONT, GAME_FONT); |
} | | } |
| | |
int newmenu_do3( char * title, char * subtitle, int nitems, newmenu_item * item, void (*subfunction)(int nitems,newmenu_item * items, int * last_key, int citem), int citem, char * filename, int width, int height){ | | int newmenu_do3( char * title, char * subtitle, int nitems, newmenu_item * item, void (*subfunction)(int nitems,newmenu_item * items, int * last_key, int citem), int citem, char * filename, int width, int height){ |
| | set_screen_mode(SCREEN_MENU);//hafta set the screen mode before calling or fonts might get changed/freed up if screen res changes |
return newmenu_do3_real( title, subtitle, nitems, item, subfunction, citem, filename, width,height, TITLE_FONT, SUBTITLE_FONT, MENU_FONT, NORMAL_FONT); | | return newmenu_do3_real( title, subtitle, nitems, item, subfunction, citem, filename, width,height, TITLE_FONT, SUBTITLE_FONT, MENU_FONT, NORMAL_FONT); |
} | | } |
| | |