mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
New userdef structures "default_volume", "default_skill"
Lets you choose which episode or skill should be selected by default in the menus. Default values are 0 and 1, respectively. Patch from Fox. git-svn-id: https://svn.eduke32.com/eduke32@6596 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
535b7c4d66
commit
740cedefbb
6 changed files with 14 additions and 1 deletions
|
@ -254,6 +254,7 @@ void CONFIG_SetDefaults(void)
|
|||
ud.screenfade = 1;
|
||||
ud.menubackground = 1;
|
||||
ud.hudontop = 0;
|
||||
ud.default_skill = 1;
|
||||
|
||||
ud.config.CheckForUpdates = 1;
|
||||
|
||||
|
|
|
@ -179,6 +179,9 @@ typedef struct {
|
|||
int32_t playerbest;
|
||||
|
||||
int32_t configversion, bgstretch;
|
||||
|
||||
int32_t default_volume, default_skill;
|
||||
|
||||
#if !defined LUNATIC
|
||||
int16_t cameraang, camerasect, camerahoriz;
|
||||
#endif
|
||||
|
|
|
@ -1247,6 +1247,8 @@ const memberlabel_t UserdefsLabels[]=
|
|||
{ "global_r", USERDEFS_GLOBAL_R, 0, 0 },
|
||||
{ "global_g", USERDEFS_GLOBAL_G, 0, 0 },
|
||||
{ "global_b", USERDEFS_GLOBAL_B, 0, 0 },
|
||||
{ "default_volume", USERDEFS_DEFAULT_VOLUME, 0, 0 },
|
||||
{ "default_skill", USERDEFS_DEFAULT_SKILL, 0, 0 },
|
||||
{ NULL, -1, 0, 0 } // END OF LIST
|
||||
};
|
||||
|
||||
|
|
|
@ -544,6 +544,8 @@ enum UserdefsLabel_t
|
|||
USERDEFS_GLOBAL_R,
|
||||
USERDEFS_GLOBAL_G,
|
||||
USERDEFS_GLOBAL_B,
|
||||
USERDEFS_DEFAULT_VOLUME,
|
||||
USERDEFS_DEFAULT_SKILL,
|
||||
USERDEFS_END
|
||||
};
|
||||
|
||||
|
|
|
@ -188,6 +188,8 @@ int32_t __fastcall VM_GetUserdef(int32_t labelNum)
|
|||
case USERDEFS_GLOBAL_R: labelNum = globalr; break;
|
||||
case USERDEFS_GLOBAL_G: labelNum = globalg; break;
|
||||
case USERDEFS_GLOBAL_B: labelNum = globalb; break;
|
||||
case USERDEFS_DEFAULT_VOLUME: labelNum = ud.default_volume; break;
|
||||
case USERDEFS_DEFAULT_SKILL: labelNum = ud.default_skill; break;
|
||||
default: labelNum = -1; break;
|
||||
}
|
||||
|
||||
|
@ -326,6 +328,8 @@ void __fastcall VM_SetUserdef(int32_t const labelNum, int32_t const iSet)
|
|||
case USERDEFS_GLOBAL_R: globalr = iSet; break;
|
||||
case USERDEFS_GLOBAL_G: globalg = iSet; break;
|
||||
case USERDEFS_GLOBAL_B: globalb = iSet; break;
|
||||
case USERDEFS_DEFAULT_VOLUME: ud.default_volume = iSet; break;
|
||||
case USERDEFS_DEFAULT_SKILL: ud.default_skill = iSet; break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1626,6 +1626,7 @@ void Menu_Init(void)
|
|||
MMF_Top_Episode.pos.y = (58 + (3-k)*6)<<16;
|
||||
if (g_skillCnt == 0)
|
||||
MEO_EPISODE.linkID = MENU_NULL;
|
||||
M_EPISODE.currentEntry = ud.default_volume;
|
||||
|
||||
// prepare skills
|
||||
k = -1;
|
||||
|
@ -1644,7 +1645,7 @@ void Menu_Init(void)
|
|||
MEOS_NETOPTIONS_MONSTERS.numOptions = g_skillCnt + 1; // k+1;
|
||||
MEOSN_NetSkills[g_skillCnt] = MenuSkillNone;
|
||||
MMF_Top_Skill.pos.y = (58 + (4-g_skillCnt)*6)<<16;
|
||||
M_SKILL.currentEntry = 1;
|
||||
M_SKILL.currentEntry = ud.default_skill;
|
||||
Menu_AdjustForCurrentEntryAssignmentBlind(&M_SKILL);
|
||||
|
||||
// prepare multiplayer gametypes
|
||||
|
|
Loading…
Reference in a new issue