Commit 5c8110d3 authored by Dino Bollinger's avatar Dino Bollinger Committed by Richard Gobeille

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

New userdef struct members: ud.m_newgamecustom, ud.m_newgamecustomsub
parent 54c864c3
......@@ -182,6 +182,7 @@ typedef struct {
int32_t m_ffire,ffire,m_player_skill,m_level_number,m_volume_number,multimode;
int32_t player_skill,level_number,volume_number,m_marker,marker,mouseflip;
int32_t music_episode, music_level, skill_voice;
int32_t m_newgamecustom, m_newgamecustomsub;
int32_t playerbest;
......
......@@ -585,6 +585,8 @@ enum UserdefsLabel_t
USERDEFS_NEWGAMECUSTOMOPEN,
USERDEFS_NEWGAMECUSTOMSUBOPEN,
USERDEFS_GAMEPADACTIVE,
USERDEFS_M_NEWGAMECUSTOM,
USERDEFS_M_NEWGAMECUSTOMSUB,
USERDEFS_END
};
......
......@@ -1351,6 +1351,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)
......@@ -1542,6 +1544,8 @@ int32_t __fastcall VM_GetUserdef(int32_t labelNum, int const lParm2)
case USERDEFS_DRAW_YXASPECT: labelNum = rotatesprite_yxaspect; break;
case USERDEFS_FOV: labelNum = ud.fov; break;
case USERDEFS_GAMEPADACTIVE: labelNum = (CONTROL_LastSeenInput == LastSeenInput::Joystick); 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);
}
......
......@@ -2419,6 +2419,14 @@ static void Menu_Pre(MenuID_t cm)
ud.m_player_skill = M_SKILL.currentEntry+1;
break;
case MENU_NEWGAMECUSTOM:
ud.m_newgamecustom = M_NEWGAMECUSTOM.currentEntry;
break;
case MENU_NEWGAMECUSTOMSUB:
ud.m_newgamecustomsub = M_NEWGAMECUSTOMSUB.currentEntry;
break;
default:
break;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment