[saco] Implement/match CGame::ToggleKeyInputsDisabled(...)

This commit is contained in:
RD42 2024-07-28 23:07:50 +08:00
parent 6f842890eb
commit a9e6635686
2 changed files with 70 additions and 0 deletions

View File

@ -266,6 +266,75 @@ void CGame::ProcessInputDisabling()
//-----------------------------------------------------------
void CGame::ToggleKeyInputsDisabled(int a2, BOOL a3)
{
if(a2 == 2)
{
UnFuck(0x541DF5,5);
memset((PVOID)0x541DF5,0x90,5); // disable call
DisableMouseProcess();
DIResetMouse();
UpdatePads();
UnFuck(0x6194A0u,1);
*(BYTE*)0x6194A0 = 0xC3;
pD3DDevice->ShowCursor(TRUE);
field_61 = 2;
}
else if(a2 == 1)
{
if(field_61 != 1)
{
UnFuck(0x541DF5,5);
memset((PVOID)0x541DF5,0x90,5); // disable call
field_61 = 1;
}
}
else if(a2 == 3)
{
if(field_61 != 3)
{
DisableMouseProcess();
DIResetMouse();
UpdatePads();
UnFuck(0x6194A0,1);
*(BYTE*)0x6194A0 = 0xC3;
pD3DDevice->ShowCursor(TRUE);
field_61 = 3;
}
}
else if(a2 == 4)
{
if(field_61 != 4)
{
DisableMousePositionUpdate();
DIResetMouse();
UpdatePads();
UnFuck(0x6194A0,1);
*(BYTE*)0x6194A0 = 0xC3;
field_61 = 4;
}
}
else
{
if(!a2 && field_61)
{
field_65 = a3 != 0 ? 0 : 10;
pD3DDevice->ShowCursor(FALSE);
field_61 = 0;
}
}
}
//-----------------------------------------------------------
void CGame::InitGame()
{
// Create a buffer for game text.

View File

@ -39,6 +39,7 @@ public:
int GetWeaponModelIDFromWeapon(int iWeaponID);
BOOL IsKeyPressed(int iKeyIdentifier);
float FindGroundZForCoord(float x, float y, float z);
void ToggleKeyInputsDisabled(int a2, BOOL a3);
void StartGame();
void InitGame();
BOOL IsGameLoaded();