New userdef structure "menubackground"

Set to 0 to disable the black transparent mask below the in-game menu.

Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6585 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2018-01-26 04:34:43 +00:00
parent cf64b480f1
commit 85d0a3c520
6 changed files with 7 additions and 2 deletions

View file

@ -248,6 +248,7 @@ void CONFIG_SetDefaults(void)
ud.weaponscale = 100; ud.weaponscale = 100;
ud.textscale = 200; ud.textscale = 200;
ud.screenfade = 1; ud.screenfade = 1;
ud.menubackground = 1;
ud.config.CheckForUpdates = 1; ud.config.CheckForUpdates = 1;

View file

@ -244,7 +244,7 @@ typedef struct {
char wchoice[MAX_WEAPONS]; char wchoice[MAX_WEAPONS];
uint8_t user_map; uint8_t user_map;
uint8_t screenfade; uint8_t screenfade, menubackground;
} user_defs; } user_defs;
extern user_defs ud; extern user_defs ud;

View file

@ -1235,6 +1235,7 @@ const memberlabel_t UserdefsLabels[]=
{ "screenarea_x2", USERDEFS_SCREENAREA_X2, 0, 0 }, { "screenarea_x2", USERDEFS_SCREENAREA_X2, 0, 0 },
{ "screenarea_y2", USERDEFS_SCREENAREA_Y2, 0, 0 }, { "screenarea_y2", USERDEFS_SCREENAREA_Y2, 0, 0 },
{ "screenfade", USERDEFS_SCREENFADE, 0, 0 }, { "screenfade", USERDEFS_SCREENFADE, 0, 0 },
{ "menubackground", USERDEFS_MENUBACKGROUND, 0, 0 },
{ NULL, -1, 0, 0 } // END OF LIST { NULL, -1, 0, 0 } // END OF LIST
}; };

View file

@ -533,6 +533,7 @@ enum UserdefsLabel_t
USERDEFS_SCREENAREA_X2, USERDEFS_SCREENAREA_X2,
USERDEFS_SCREENAREA_Y2, USERDEFS_SCREENAREA_Y2,
USERDEFS_SCREENFADE, USERDEFS_SCREENFADE,
USERDEFS_MENUBACKGROUND,
USERDEFS_END USERDEFS_END
}; };

View file

@ -177,6 +177,7 @@ int32_t __fastcall VM_GetUserdef(int32_t labelNum)
case USERDEFS_SCREENAREA_X2: labelNum = ud.screenarea_x2; break; case USERDEFS_SCREENAREA_X2: labelNum = ud.screenarea_x2; break;
case USERDEFS_SCREENAREA_Y2: labelNum = ud.screenarea_y2; break; case USERDEFS_SCREENAREA_Y2: labelNum = ud.screenarea_y2; break;
case USERDEFS_SCREENFADE: labelNum = ud.screenfade; break; case USERDEFS_SCREENFADE: labelNum = ud.screenfade; break;
case USERDEFS_MENUBACKGROUND: labelNum = ud.menubackground; break;
default: labelNum = -1; break; default: labelNum = -1; break;
} }
@ -304,6 +305,7 @@ void __fastcall VM_SetUserdef(int32_t const labelNum, int32_t const iSet)
case USERDEFS_SCREENAREA_X2: ud.screenarea_x2 = iSet; break; case USERDEFS_SCREENAREA_X2: ud.screenarea_x2 = iSet; break;
case USERDEFS_SCREENAREA_Y2: ud.screenarea_y2 = iSet; break; case USERDEFS_SCREENAREA_Y2: ud.screenarea_y2 = iSet; break;
case USERDEFS_SCREENFADE: ud.screenfade = iSet; break; case USERDEFS_SCREENFADE: ud.screenfade = iSet; break;
case USERDEFS_MENUBACKGROUND: ud.menubackground = iSet; break;
default: break; default: break;
} }
} }

View file

@ -6508,7 +6508,7 @@ void M_DisplayMenus(void)
g_player[myconnectindex].ps->gm &= (0xff-MODE_TYPE); g_player[myconnectindex].ps->gm &= (0xff-MODE_TYPE);
// g_player[myconnectindex].ps->fta = 0; // g_player[myconnectindex].ps->fta = 0;
int32_t const backgroundOK = Menu_BlackTranslucentBackgroundOK(g_currentMenu); int32_t const backgroundOK = ud.menubackground && Menu_BlackTranslucentBackgroundOK(g_currentMenu);
// need EVENT_DISPLAYMENUBACKGROUND here // need EVENT_DISPLAYMENUBACKGROUND here