version 1.1 | | version 1.2 |
---|
| | |
* Routines for menus. | | * Routines for menus. |
* | | * |
* $Log$ | | * $Log$ |
* Revision 1.1 1999/06/14 22:10:26 donut | | * Revision 1.2 1999/08/05 22:53:41 sekmu |
* Initial revision | | * |
| | * D3D patch(es) from ADB |
| | * |
| | * Revision 1.1.1.1 1999/06/14 22:10:26 donut |
| | * Import of d1x 1.37 source. |
* | | * |
* Revision 2.8 1995/05/26 16:16:28 john | | * Revision 2.8 1995/05/26 16:16:28 john |
* Split SATURN into define's for requiring cd, using cd, etc. | | * Split SATURN into define's for requiring cd, using cd, etc. |
| | |
if (nitems < 1 ) | | if (nitems < 1 ) |
return -1; | | return -1; |
| | |
| | //changed 7/11/99 adb - otherwise d3d problems... |
| | #ifdef D1XD3D |
| | set_screen_mode(SCREEN_MENU); |
| | #else |
//killed 4/23/99 Matt Mueller - don't switch res for menus.. some menus like their own, but they would need editing to put text correctly and stuff anyway | | //killed 4/23/99 Matt Mueller - don't switch res for menus.. some menus like their own, but they would need editing to put text correctly and stuff anyway |
//--killed-- set_screen_mode(SCREEN_MENU); | | //--killed-- set_screen_mode(SCREEN_MENU); |
//end kill -MM | | //end kill -MM |
| | #endif |
| | //end changes - adb |
| | |
//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(); |
| | |
} | | } |
| | |
// Save the background of the display | | // Save the background of the display |
| | //changed 7/11/99 adb - otherwise d3d problems... |
| | #ifdef D1XD3D |
| | bg.menu_canvas = gr_create_sub_canvas( &grd_curscreen->sc_canvas, x, y, w, h ); |
| | #else |
//edited 4/30/99 by Owen Evans to fix res-changing | | //edited 4/30/99 by Owen Evans to fix res-changing |
// bg.menu_canvas = gr_create_sub_canvas( &grd_curscreen->sc_canvas, x, y, w, h ); | | // bg.menu_canvas = gr_create_sub_canvas( &grd_curscreen->sc_canvas, x, y, w, h ); |
bg.menu_canvas = gr_create_sub_canvas(&VR_screen_pages[VR_current_page], x, y, w, h ); | | bg.menu_canvas = gr_create_sub_canvas(&VR_screen_pages[VR_current_page], x, y, w, h ); |
//end this section edit - OE | | //end this section edit - OE |
| | #endif |
gr_set_current_canvas( bg.menu_canvas ); | | gr_set_current_canvas( bg.menu_canvas ); |
| | //end changes - adb |
| | |
if ( filename == NULL ) { | | if ( filename == NULL ) { |
// Save the background under the menu... | | // Save the background under the menu... |
bg.saved = gr_create_bitmap( w, h ); | | bg.saved = gr_create_bitmap( w, h ); |
Assert( bg.saved != NULL ); | | Assert( bg.saved != NULL ); |
gr_bm_bitblt(w, h, 0, 0, 0, 0, &grd_curcanv->cv_bitmap, bg.saved ); | | gr_bm_bitblt(w, h, 0, 0, 0, 0, &grd_curcanv->cv_bitmap, bg.saved ); |
| | //changed 7/11/99 adb - otherwise d3d problems... |
| | #ifdef D1XD3D |
| | gr_set_current_canvas( NULL ); |
| | #else |
//edited 4/30/99 by Owen Evans to fix res-changing | | //edited 4/30/99 by Owen Evans to fix res-changing |
// gr_set_current_canvas( NULL ); | | // gr_set_current_canvas( NULL ); |
gr_set_current_canvas( &VR_screen_pages[VR_current_page] ); | | gr_set_current_canvas( &VR_screen_pages[VR_current_page] ); |
//end this section edit - OE | | //end this section edit - OE |
| | #endif |
| | //end changes - adb |
nm_draw_background(x,y,x+w-1,y+h-1); | | nm_draw_background(x,y,x+w-1,y+h-1); |
bg.background = gr_create_sub_bitmap(&nm_background,0,0,w,h); | | bg.background = gr_create_sub_bitmap(&nm_background,0,0,w,h); |
gr_set_current_canvas( bg.menu_canvas ); | | gr_set_current_canvas( bg.menu_canvas ); |
| | |
if ( w_x < 0 ) w_x = 0; | | if ( w_x < 0 ) w_x = 0; |
if ( w_y < 0 ) w_y = 0; | | if ( w_y < 0 ) w_y = 0; |
| | |
gr_bm_bitblt(320, 200, 0, 0, 0, 0, &(grd_curcanv->cv_bitmap), &(VR_offscreen_buffer->cv_bitmap) ); | | gr_bm_bitblt(320, 200, 0, 0, 0, 0, &(grd_curcanv->cv_bitmap), &(VR_offscreen_menu->cv_bitmap) ); |
nm_draw_background( w_x,w_y,w_x+w_w-1,w_y+w_h-1 ); | | nm_draw_background( w_x,w_y,w_x+w_w-1,w_y+w_h-1 ); |
| | |
grd_curcanv->cv_font = Gamefonts[GFONT_MEDIUM_3]; | | grd_curcanv->cv_font = Gamefonts[GFONT_MEDIUM_3]; |
| | |
keyd_repeat = old_keyd_repeat; | | keyd_repeat = old_keyd_repeat; |
| | |
if ( initialized ) { | | if ( initialized ) { |
gr_bm_bitblt(320, 200, 0, 0, 0, 0, &(VR_offscreen_buffer->cv_bitmap), &(grd_curcanv->cv_bitmap) ); | | gr_bm_bitblt(320, 200, 0, 0, 0, 0, &(VR_offscreen_menu->cv_bitmap), &(grd_curcanv->cv_bitmap) ); |
} | | } |
| | |
if ( filenames ) | | if ( filenames ) |
| | |
if ( wy < title_height ) | | if ( wy < title_height ) |
wy = title_height; | | wy = title_height; |
| | |
gr_bm_bitblt(320, 200, 0, 0, 0, 0, &(grd_curcanv->cv_bitmap), &(VR_offscreen_buffer->cv_bitmap) ); | | gr_bm_bitblt(320, 200, 0, 0, 0, 0, &(grd_curcanv->cv_bitmap), &(VR_offscreen_menu->cv_bitmap) ); |
nm_draw_background( wx-15,wy-title_height-15,wx+width+15,wy+height+15 ); | | nm_draw_background( wx-15,wy-title_height-15,wx+width+15,wy+height+15 ); |
| | |
gr_string( 0x8000, wy - title_height, title ); | | gr_string( 0x8000, wy - title_height, title ); |
| | |
} | | } |
keyd_repeat = old_keyd_repeat; | | keyd_repeat = old_keyd_repeat; |
| | |
gr_bm_bitblt(320, 200, 0, 0, 0, 0, &(VR_offscreen_buffer->cv_bitmap), &(grd_curcanv->cv_bitmap) ); | | gr_bm_bitblt(320, 200, 0, 0, 0, 0, &(VR_offscreen_menu->cv_bitmap), &(grd_curcanv->cv_bitmap) ); |
| | |
return citem; | | return citem; |
} | | } |