Test new query method for Right Stick availability

This commit is contained in:
Soniccd123
2024-12-18 01:23:36 -03:00
committed by Stefanos Kornilios Mitsis Poiitidis
parent 1e03ff65d8
commit fcd2e4bb91
3 changed files with 13 additions and 10 deletions

View File

@@ -662,6 +662,9 @@ bool CGame::Initialise(const char* datFile)
CCollision::ms_collisionInMemory = currLevel;
for (int i = 0; i < MAX_PADS; i++)
CPad::GetPad(i)->Clear(true);
#ifdef RW_DC
//CPad::GetPad(0)->IsDualAnalog = false;
#endif
return true;
}

View File

@@ -764,11 +764,8 @@ CMenuScreenCustom aScreens[MENUPAGES] = {
// MENUPAGE_OPTIONS = 41
{ "FET_OPT", MENUPAGE_NONE, MENUPAGE_NONE, nil, nil,
#ifdef RW_DC
MENUACTION_CHANGEMENU, "FET_CTL", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS },
#else
MENUACTION_CHANGEMENU, "FET_AGS", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS },
MENUACTION_CHANGEMENU, "FET_CTL", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC },
#endif
MENUACTION_LOADRADIO, "FET_AUD", { nil, SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS },
MENUACTION_CHANGEMENU, "FET_DIS", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },
#ifdef GRAPHICS_MENU_OPTIONS

View File

@@ -1435,8 +1435,7 @@ void CPad::Update(int16 pad)
#ifdef RW_DC
CPad::IsDualAnalog = cont_has_capabilities(contMaple, CONT_CAPABILITIES_DUAL_ANALOG); //Query controller about Dual analog capabilities
//CPad::IsDualAnalog = cont_has_capabilities(contMaple, CONT_CAPABILITIES_DUAL_ANALOG); //Query controller about Dual analog capabilities
if (pad == 0)
{
NewState.DPadUp = state->dpad_up; //This part could be inside a compiler directive to preserve the old code and just use this block if compil
@@ -1480,6 +1479,7 @@ void CPad::Update(int16 pad)
NewState.LeftStickY = 0;
NewState.RightShock = 0;
}
#else
NewState = ReconcileTwoControllersInput(PCTempKeyState, PCTempJoyState);
NewState = ReconcileTwoControllersInput(PCTempMouseState, NewState);
@@ -1497,6 +1497,13 @@ void CPad::Update(int16 pad)
bHornHistory[iCurrHornHistory] = GetHorn();
#ifdef RW_DC
if (((NewState.RightStickX > 64) || (NewState.RightStickX < -64)) || ((NewState.RightStickY > 64) || (NewState.RightStickY < -64)))
{
CPad::GetPad(0)->IsDualAnalog = true;
}
#endif
if ( !bDisplayNoControllerMessage )
CGame::bDemoMode = false;
@@ -3612,8 +3619,6 @@ float axis = 0;
else if ( TheCamera.Cams[0].Using3rdPersonMouseCam() && Abs(axis) > 10 )
return (int16) ( (axis + ( ( axis > 0 ) ? -10 : 10) )
* (127.0f / 64.0f) ); // 1.984375f
return 0;
}
int16 CPad::LookAroundUpDown(void)
@@ -3667,8 +3672,6 @@ int16 axis = 0;
else if ( TheCamera.Cams[0].Using3rdPersonMouseCam() && Abs(axis) > 40 )
return (int16) ( (axis + ( ( axis > 0 ) ? -40 : 40) )
* (127.0f / 64.0f) ); // 1.984375f
return 0;
}
void CPad::ResetAverageWeapon(void)