From d98cad4ca45447e79687b5c054761c621ade4bc1 Mon Sep 17 00:00:00 2001 From: Bradley Bell Date: Wed, 4 Feb 2015 00:04:12 -0800 Subject: [PATCH] MenuHires now just a macro --- main/automap.c | 1 - main/game.c | 4 +--- main/gameseq.c | 1 - main/gauges.c | 4 ---- main/inferno.c | 8 ++------ main/menu.c | 2 -- main/menu.h | 5 ++++- main/movie.c | 2 -- 8 files changed, 7 insertions(+), 20 deletions(-) diff --git a/main/automap.c b/main/automap.c index ed77a156..16cad869 100644 --- a/main/automap.c +++ b/main/automap.c @@ -610,7 +610,6 @@ int Automap_active = 0; #endif cvar_t Automap_always_hires = { "AutomapHires", "0", 1 }; -extern int MenuHiresAvailable; uint32_t automap_mode = SM(640,480); int automap_width = 640; diff --git a/main/game.c b/main/game.c index cf8637ec..eac015b6 100644 --- a/main/game.c +++ b/main/game.c @@ -122,7 +122,6 @@ grs_canvas VR_editor_canvas; // The canvas that the editor writes to. //do menus work in 640x480 or 320x200? //PC version sets this in main(). Mac versios is always high-res, so set to 1 here int MenuHiresAvailable = 1; //can we do highres menus? -int MenuHires = 1; //are we currently in highres menus? cvar_t menu_use_game_res = { "MenuGameres", "0", 0 }; int Debug_pause=0; //John's debugging pause system @@ -662,7 +661,6 @@ int set_screen_mode(int sm) { case SCREEN_MENU: { - MenuHires = MenuHiresAvailable; //do highres if we can if (Vid_current_mode != MENU_SCREEN_MODE) { if (vid_set_mode(MENU_SCREEN_MODE)) Error("Cannot set screen mode for menu"); @@ -727,7 +725,7 @@ int set_screen_mode(int sm) init_cockpit(); - FontHires = FontHiresAvailable && (MenuHires = SM_HIRES2); + FontHires = FontHiresAvailable && MenuHires; if ( VR_render_mode != VR_NONE ) { // for 640x480 or higher, use hires font. diff --git a/main/gameseq.c b/main/gameseq.c index ec3230f5..98bf738a 100644 --- a/main/gameseq.c +++ b/main/gameseq.c @@ -1813,7 +1813,6 @@ struct { #define NUM_INTRO_MOVIES (sizeof(intro_movie) / sizeof(*intro_movie)) -extern int MenuHiresAvailable; extern int robot_movies; // 0 means none, 1 means lowres, 2 means hires extern int intro_played; // true if big intro movie played diff --git a/main/gauges.c b/main/gauges.c index c975d8f5..9de81f6b 100644 --- a/main/gauges.c +++ b/main/gauges.c @@ -2694,10 +2694,6 @@ void hud_show_kill_list() y += fth+1; } - -#ifdef MACINTOSH - MenuHires = 1; -#endif } #endif diff --git a/main/inferno.c b/main/inferno.c index 2e1b783d..6f0bf713 100644 --- a/main/inferno.c +++ b/main/inferno.c @@ -375,9 +375,6 @@ void do_register_player(ubyte *title_pal) extern char Language[]; -//can we do highres menus? -extern int MenuHiresAvailable; - int Inferno_verbose = 0; //added on 11/18/98 by Victor Rachels to add -mission and -startgame @@ -583,10 +580,9 @@ int main(int argc, char *argv[]) //determine whether we're using high-res menus & movies if (FindArg("-nohires") || FindArg("-nohighres") || (vid_check_mode(MENU_HIRES_MODE) != 0) || disable_high_res) - cvar_setint( &MovieHires, MenuHires = MenuHiresAvailable = 0 ); + cvar_setint( &MovieHires, MenuHiresAvailable = 0 ); else - //NOTE LINK TO ABOVE! - MenuHires = MenuHiresAvailable = 1; + MenuHiresAvailable = 1; if (FindArg( "-lowresmovies" )) cvar_setint( &MovieHires, 0 ); diff --git a/main/menu.c b/main/menu.c index 19c700d6..f9c8ab29 100644 --- a/main/menu.c +++ b/main/menu.c @@ -669,8 +669,6 @@ uint32_t Default_display_mode = SM(640,480); uint32_t Current_display_mode = SM(640,480); #endif -extern int MenuHiresAvailable; - void set_display_mode(uint32_t mode) { diff --git a/main/menu.h b/main/menu.h index 2489e6dd..325874a2 100644 --- a/main/menu.h +++ b/main/menu.h @@ -25,7 +25,10 @@ extern int DoMenu(); extern void do_options_menu(); extern void d2x_options_menu(); -extern int MenuHires; +// can we do highres menus? +extern int MenuHiresAvailable; +// are we currently in highres menus? +#define MenuHires (menu_use_game_res.intval?SM_HIRES2:MenuHiresAvailable) #ifdef RELEASE // read only from hog file #define MENU_PCX_MAC_SHARE ("\x01menub.pcx") diff --git a/main/movie.c b/main/movie.c index 9b96de91..8d9a1921 100644 --- a/main/movie.c +++ b/main/movie.c @@ -48,8 +48,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "physfsrwops.h" -extern int MenuHiresAvailable; - // Subtitle data typedef struct { short first_frame,last_frame; -- 2.39.2