Merge branch 'soniccd123/rstickquerytest-2' into 'main'

Implement dual stick, new bindings, lots of other things

See merge request skmp/dca3-game!4
This commit is contained in:
Stefanos Kornilios Mitsis Poiitidis
2024-12-28 15:45:48 +00:00
4 changed files with 993 additions and 354 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 GTA_HANDHELD
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

1324
src/core/Pad.cpp Normal file → Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -23,7 +23,7 @@ public:
int16 DPadUp, DPadDown, DPadLeft, DPadRight;
int16 Start, Select;
int16 Square, Triangle, Cross, Circle;
uint32_t A, B, C, X, Y, Z;
uint32_t A, B, C, D, X, Y, Z;
int16 LeftShock, RightShock;
int16 NetworkTalk;
float GetLeftStickX(void) { return LeftStickX/32767.0f; };
@@ -161,6 +161,13 @@ public:
int32 LastTimeTouched;
int32 AverageWeapon;
int32 AverageEntries;
bool IsKeyboardMouse;
bool IsDualAnalog;
bool CameraJustDown;
bool CameraJustUp;
uint32 CameraJustUpTime;
uint32 CameraLastPressed;
bool CameraIsDoublePressed;
#ifdef DETECT_PAD_INPUT_SWITCH
static bool IsAffectedByController;
@@ -211,7 +218,11 @@ public:
void StopShaking(int16 pad);
static CPad *GetPad(int32 pad);
#ifdef RW_DC
bool CameraSinglePress(void); //Checks if camera modifier was double clicked
bool CameraDoublePress(void);
#endif
int16 GetSteeringLeftRight(void);
int16 GetSteeringUpDown(void);
int16 GetCarGunUpDown(void);