Expose newgamecustom menu and submenu index to CON (read-only).

New userdef struct members: ud.m_newgamecustom, ud.m_newgamecustomsub
This commit is contained in:
Dino Bollinger 2020-06-13 09:58:13 +02:00 committed by Christoph Oelckers
parent 79d3a36106
commit a5085c3631
3 changed files with 9 additions and 2 deletions

View file

@ -148,6 +148,7 @@ typedef struct {
int32_t ffire,m_player_skill,m_level_number,m_volume_number,multimode;
int32_t player_skill,level_number,volume_number,marker;
int32_t music_episode, music_level;
int32_t m_newgamecustom, m_newgamecustomsub;
int32_t playerbest;

View file

@ -586,6 +586,8 @@ enum UserdefsLabel_t
USERDEFS_NEWGAMECUSTOMOPEN,
USERDEFS_NEWGAMECUSTOMSUBOPEN,
USERDEFS_GAMEPADACTIVE,
USERDEFS_M_NEWGAMECUSTOM,
USERDEFS_M_NEWGAMECUSTOMSUB,
USERDEFS_END
};

View file

@ -1367,6 +1367,8 @@ memberlabel_t const UserdefsLabels[]=
{ "newgamecustomopen", USERDEFS_NEWGAMECUSTOMOPEN, 0, 0, -1 },
{ "newgamecustomsubopen", USERDEFS_NEWGAMECUSTOMSUBOPEN, LABEL_HASPARM2, MAXMENUGAMEPLAYENTRIES, -1 },
{ "gamepadactive", USERDEFS_GAMEPADACTIVE, 0, 0, -1 },
{ "m_newgamecustom", USERDEFS_M_NEWGAMECUSTOM, 0, 0, -1 },
{ "m_newgamecustomsub", USERDEFS_M_NEWGAMECUSTOMSUB, 0, 0, -1 }
};
int32_t __fastcall VM_GetUserdef(int32_t labelNum, int const lParm2)
@ -1548,8 +1550,10 @@ int32_t __fastcall VM_GetUserdef(int32_t labelNum, int const lParm2)
case USERDEFS_AUTOSAVE: labelNum = cl_autosave; break;
case USERDEFS_DRAW_Y: labelNum = rotatesprite_y_offset; break;
case USERDEFS_DRAW_YXASPECT: labelNum = rotatesprite_yxaspect; break;
case USERDEFS_FOV: labelNum = r_fov; break;
case USERDEFS_GAMEPADACTIVE: labelNum = inputState.gamePadActive(); break;
case USERDEFS_FOV: labelNum = r_fov; break;
case USERDEFS_GAMEPADACTIVE: labelNum = inputState.gamePadActive(); break;
case USERDEFS_M_NEWGAMECUSTOM: labelNum = ud.m_newgamecustom; break;
case USERDEFS_M_NEWGAMECUSTOMSUB: labelNum = ud.m_newgamecustomsub; break;
default: EDUKE32_UNREACHABLE_SECTION(labelNum = -1; break);
}