mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-22 10:52:23 +00:00
Also set cv_analog for tutorialgcs
* M_TutorialSaveControlResponse CV_Set adjustment
This commit is contained in:
parent
acd922886a
commit
40e5a2104b
6 changed files with 12 additions and 3 deletions
|
@ -742,6 +742,7 @@ void D_StartTitle(void)
|
|||
CV_SetValue(&cv_usemouse, tutorialusemouse);
|
||||
CV_SetValue(&cv_alwaysfreelook, tutorialfreelook);
|
||||
CV_SetValue(&cv_mousemove, tutorialmousemove);
|
||||
CV_SetValue(&cv_analog, tutorialanalog);
|
||||
M_StartMessage("Do you want to \x82save the recommended \x82movement controls?\x80\n\nPress 'Y' or 'Enter' to confirm\nPress 'N' or any key to keep \nyour current controls",
|
||||
M_TutorialSaveControlResponse, MM_YESNO);
|
||||
}
|
||||
|
|
|
@ -1814,6 +1814,7 @@ static void Command_Map_f(void)
|
|||
CV_SetValue(&cv_usemouse, tutorialusemouse);
|
||||
CV_SetValue(&cv_alwaysfreelook, tutorialfreelook);
|
||||
CV_SetValue(&cv_mousemove, tutorialmousemove);
|
||||
CV_SetValue(&cv_analog, tutorialanalog);
|
||||
}
|
||||
tutorialmode = false; // warping takes us out of tutorial mode
|
||||
|
||||
|
|
|
@ -135,6 +135,7 @@ extern INT32 tutorialgcs; // which control scheme is loaded?
|
|||
extern INT32 tutorialusemouse; // store cv_usemouse user value
|
||||
extern INT32 tutorialfreelook; // store cv_alwaysfreelook user value
|
||||
extern INT32 tutorialmousemove; // store cv_mousemove user value
|
||||
extern INT32 tutorialanalog; // store cv_analog user value
|
||||
|
||||
extern boolean looptitle;
|
||||
|
||||
|
|
|
@ -133,6 +133,7 @@ INT32 tutorialgcs = gcs_custom; // which control scheme is loaded?
|
|||
INT32 tutorialusemouse = 0; // store cv_usemouse user value
|
||||
INT32 tutorialfreelook = 0; // store cv_alwaysfreelook user value
|
||||
INT32 tutorialmousemove = 0; // store cv_mousemove user value
|
||||
INT32 tutorialanalog = 0; // store cv_analog user value
|
||||
|
||||
boolean looptitle = false;
|
||||
|
||||
|
|
|
@ -6139,9 +6139,10 @@ void M_TutorialSaveControlResponse(INT32 ch)
|
|||
if (ch == 'y' || ch == KEY_ENTER)
|
||||
{
|
||||
G_CopyControls(gamecontrol, gamecontroldefault[tutorialgcs], gclist_tutorial, num_gclist_tutorial);
|
||||
CV_SetValue(&cv_usemouse, 1);
|
||||
CV_SetValue(&cv_alwaysfreelook, 0);
|
||||
CV_SetValue(&cv_mousemove, 0);
|
||||
CV_Set(&cv_usemouse, cv_usemouse->defaultvalue);
|
||||
CV_Set(&cv_alwaysfreelook, cv_alwaysfreelook->defaultvalue);
|
||||
CV_Set(&cv_mousemove, cv_mousemove->defaultvalue);
|
||||
CV_Set(&cv_analog, cv_analog->defaultvalue);
|
||||
S_StartSound(NULL, sfx_itemup);
|
||||
}
|
||||
else
|
||||
|
@ -6159,11 +6160,13 @@ static void M_TutorialControlResponse(INT32 ch)
|
|||
tutorialusemouse = cv_usemouse.value;
|
||||
tutorialfreelook = cv_alwaysfreelook.value;
|
||||
tutorialmousemove = cv_mousemove.value;
|
||||
tutorialanalog = cv_analog.value;
|
||||
|
||||
G_CopyControls(gamecontrol, gamecontroldefault[tutorialgcs], gclist_tutorial, num_gclist_tutorial);
|
||||
CV_Set(&cv_usemouse, cv_usemouse->defaultvalue);
|
||||
CV_Set(&cv_alwaysfreelook, cv_alwaysfreelook->defaultvalue);
|
||||
CV_Set(&cv_mousemove, cv_mousemove->defaultvalue);
|
||||
CV_Set(&cv_analog, cv_analog->defaultvalue);
|
||||
|
||||
//S_StartSound(NULL, sfx_itemup);
|
||||
}
|
||||
|
|
|
@ -544,10 +544,12 @@ void M_SaveConfig(const char *filename)
|
|||
CV_SetValue(&cv_usemouse, tutorialusemouse);
|
||||
CV_SetValue(&cv_alwaysfreelook, tutorialfreelook);
|
||||
CV_SetValue(&cv_mousemove, tutorialmousemove);
|
||||
CV_SetValue(&cv_analog, tutorialanalog);
|
||||
CV_SaveVariables(f);
|
||||
CV_Set(&cv_usemouse, cv_usemouse->defaultvalue);
|
||||
CV_Set(&cv_alwaysfreelook, cv_alwaysfreelook->defaultvalue);
|
||||
CV_Set(&cv_mousemove, cv_mousemove->defaultvalue);
|
||||
CV_Set(&cv_analog, cv_analog->default);
|
||||
}
|
||||
else
|
||||
CV_SaveVariables(f);
|
||||
|
|
Loading…
Reference in a new issue