Remove calls to nm_draw_background1 to show newmenus stacked

This commit is contained in:
kreatordxx 2010-04-03 09:10:20 +00:00
parent c430dd214e
commit 33545ae73f
6 changed files with 4 additions and 25 deletions

View file

@ -4,6 +4,7 @@ D2X-Rebirth Changelog
--------
arch/sdl/mouse.c, main/game.c, main/net_ipx.c, main/newmenu.c, main/newmenu.h, main/state.c: Make newmenu_do3 and newmenu_dotiny return as soon as the newmenu is created, which will allow the main menu (and others) to persist
main/menu.c: Make main menu persist to streamline redrawing (later)
main/kconfig.c, main/net_ipx.c, main/net_udp.c, main/newmenu.c, main/scores.c: Remove calls to nm_draw_background1 to show newmenus stacked
20100402
--------

View file

@ -90,7 +90,6 @@ ubyte system_keys[] = { KEY_ESC, KEY_F1, KEY_F2, KEY_F3, KEY_F4, KEY_F5, KEY_F6,
extern void transfer_energy_to_shield(fix);
extern void CyclePrimary(),CycleSecondary(),InitMarkerInput();
extern ubyte DefiningMarkerMessage;
extern void nm_draw_background1(char * filename);
control_info Controls;
@ -466,7 +465,6 @@ int get_item_height(kc_item *item)
return h;
}
void nm_draw_background1(char * filename);
void kc_drawquestion( kc_menu *menu, kc_item *item );
void kconfig_draw(kc_menu *menu)
@ -478,9 +476,6 @@ void kconfig_draw(kc_menu *menu)
int w = FSPACX(290), h = FSPACY(170);
gr_set_current_canvas(NULL);
#ifdef OGL
nm_draw_background1(NULL);
#endif
nm_draw_background(((SWIDTH-w)/2)-BORDERX,((SHEIGHT-h)/2)-BORDERY,((SWIDTH-w)/2)+w+BORDERX,((SHEIGHT-h)/2)+h+BORDERY);
gr_set_current_canvas(window_get_canvas(menu->wind));
@ -938,8 +933,6 @@ void kconfig_sub(kc_item * items,int nitems, char *title)
menu->changing = 0;
menu->mouse_state = 0;
nm_draw_background1(NULL);
if (!(menu->wind = window_create(&grd_curscreen->sc_canvas, (SWIDTH - FSPACX(320))/2, (SHEIGHT - FSPACY(200))/2, FSPACX(320), FSPACY(200),
(int (*)(window *, d_event *, void *))kconfig_handler, menu)))
d_free(menu);

View file

@ -4147,7 +4147,6 @@ int net_ipx_do_join_game(int choice)
}
void nm_draw_background1(char * filename);
int net_ipx_show_game_stats(int choice);
int net_ipx_do_join_game(int choice);
@ -5687,9 +5686,6 @@ static int show_game_rules_handler(window *wind, d_event *event, netgame_info *n
case EVENT_WINDOW_DRAW:
gr_set_current_canvas(NULL);
#ifdef OGL
nm_draw_background1(NULL);
#endif
nm_draw_background(((SWIDTH-w)/2)-BORDERX,((SHEIGHT-h)/2)-BORDERY,((SWIDTH-w)/2)+w+BORDERX,((SHEIGHT-h)/2)+h+BORDERY);
gr_set_current_canvas(window_get_canvas(wind));

View file

@ -102,7 +102,6 @@ extern void multi_send_door_open_specific(int pnum,int segnum, int side,ubyte fl
extern void multi_send_wall_status_specific (int pnum,int wallnum,ubyte type,ubyte flags,ubyte state);
extern void multi_send_light_specific (int pnum,int segnum,ubyte val);
extern void multi_send_trigger_specific (char pnum,char trig);
extern void nm_draw_background1(char * filename);
extern void game_disable_cheats();
// Variables
@ -4736,9 +4735,6 @@ static int show_game_rules_handler(window *wind, d_event *event, netgame_info *n
case EVENT_WINDOW_DRAW:
gr_set_current_canvas(NULL);
#ifdef OGL
nm_draw_background1(NULL);
#endif
nm_draw_background(((SWIDTH-w)/2)-BORDERX,((SHEIGHT-h)/2)-BORDERY,((SWIDTH-w)/2)+w+BORDERX,((SHEIGHT-h)/2)+h+BORDERY);
gr_set_current_canvas(window_get_canvas(wind));

View file

@ -138,12 +138,6 @@ void nm_draw_background1(char * filename)
{
int pcx_error;
if (filename == NULL)
filename = Menu_pcx_name;
if (!strcmp(filename, Menu_pcx_name) && Function_mode != FMODE_MENU)
return;
if (filename != NULL)
{
if (nm_background1.bm_data == NULL)
@ -1904,7 +1898,6 @@ int listbox_draw(window *wind, listbox *lb)
int i;
gr_set_current_canvas(NULL);
nm_draw_background1(NULL);
nm_draw_background( lb->box_x-BORDERX,lb->box_y-lb->title_height-BORDERY,lb->box_x+lb->box_w+BORDERX,lb->box_y+lb->height+BORDERY );
gr_set_curfont(MEDIUM3_FONT);
gr_string( 0x8000, lb->box_y - lb->title_height, lb->title );

View file

@ -365,9 +365,9 @@ int scores_handler(window *wind, d_event *event, scores_menu *menu)
case EVENT_WINDOW_DRAW:
gr_set_current_canvas(NULL);
#ifdef OGL
nm_draw_background1(Menu_pcx_name);
#endif
if (Game_wind)
nm_draw_background1(Menu_pcx_name); // haven't closed the game yet, need to draw menu pcx here
nm_draw_background(((SWIDTH-w)/2)-BORDERX,((SHEIGHT-h)/2)-BORDERY,((SWIDTH-w)/2)+w+BORDERX,((SHEIGHT-h)/2)+h+BORDERY);
gr_set_current_canvas(window_get_canvas(wind));