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 11edfb2aa6
commit eb0458ba5f
7 changed files with 5 additions and 26 deletions

View file

@ -4,6 +4,7 @@ D1X-Rebirth Changelog
--------
arch/sdl/mouse.c, main/game.c, main/net_ipx.c, main/net_ipx.h, 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/menu.h, 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

@ -427,7 +427,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)
@ -439,9 +438,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));
@ -888,8 +884,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

@ -20,7 +20,7 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
#ifndef _MENU_H
#define _MENU_H
extern void hide_menus(void);
extern int hide_menus(void);
extern void show_menus(void);
// called once at program startup to get the player's name

View file

@ -3391,8 +3391,6 @@ net_ipx_level_sync(void)
return(0);
}
void nm_draw_background1(char * filename);
int net_ipx_do_join_game(int choice)
{
if (Active_ipx_games[choice].game_status == NETSTAT_ENDLEVEL)
@ -4020,9 +4018,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

@ -83,7 +83,6 @@ void net_udp_noloss_got_ack(ubyte *data, int data_len);
void net_udp_noloss_init_mdata_queue(void);
void net_udp_noloss_clear_mdata_got(ubyte player_num);
void net_udp_noloss_process_queue(fix time);
extern void nm_draw_background1(char * filename);
extern void game_disable_cheats();
// Variables
@ -4305,9 +4304,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

@ -129,12 +129,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)
@ -1895,7 +1889,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

@ -359,9 +359,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));