1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-11-04 21:35:54 +00:00
re3/src/core/ControllerConfig.cpp

59 lines
2.3 KiB
C++
Raw Normal View History

#define DIRECTINPUT_VERSION 0x0800
#include <dinput.h>
2019-05-31 17:02:26 +00:00
#include "common.h"
#include "patcher.h"
#include "ControllerConfig.h"
#include "Pad.h"
#include "FileMgr.h"
2019-05-31 17:02:26 +00:00
CControllerConfigManager &ControlsManager = *(CControllerConfigManager*)0x8F43A4;
WRAPPER void CControllerConfigManager::UpdateJoyButtonState(int padnumber) { EAXJMP(0x58F5B0); }
WRAPPER void CControllerConfigManager::UpdateJoyInConfigMenus_ButtonDown(int button, int padnumber) { EAXJMP(0x58C5E0); }
WRAPPER void CControllerConfigManager::AffectControllerStateOn_ButtonDown(int button, eControllerType type) { EAXJMP(0x58C730); }
WRAPPER void CControllerConfigManager::UpdateJoyInConfigMenus_ButtonUp(int button, int padnumber) { EAXJMP(0x58CE80); }
WRAPPER void CControllerConfigManager::AffectControllerStateOn_ButtonUp(int button, int padnumber) { EAXJMP(0x58CFD0); }
WRAPPER void CControllerConfigManager::MakeControllerActionsBlank() { EAXJMP(0x58B7A0); }
WRAPPER void CControllerConfigManager::InitDefaultControlConfiguration() { EAXJMP(0x58B930); }
WRAPPER void CControllerConfigManager::InitDefaultControlConfigMouse(CMouseControllerState const &mousestate) { EAXJMP(0x58BD00); }
2019-06-16 22:16:38 +00:00
WRAPPER int32 CControllerConfigManager::GetJoyButtonJustDown() { EAXJMP(0x58B7D0); }
2019-06-05 19:18:06 +00:00
WRAPPER void CControllerConfigManager::InitDefaultControlConfigJoyPad(unsigned int buttons) { EAXJMP(0x58BD90); }
2019-06-13 00:35:26 +00:00
WRAPPER void CControllerConfigManager::ClearSimButtonPressCheckers() { EAXJMP(0x58D220); }
WRAPPER void CControllerConfigManager::AffectPadFromKeyBoard() { EAXJMP(0x58D0C0); }
WRAPPER void CControllerConfigManager::AffectPadFromMouse() { EAXJMP(0x58D1A0); }
2019-07-10 07:57:08 +00:00
WRAPPER void CControllerConfigManager::ClearSettingsAssociatedWithAction(int, int) { EAXJMP(0x58EB40); }
2019-06-16 22:16:38 +00:00
void CControllerConfigManager::LoadSettings(int32 file)
{
2019-06-16 22:16:38 +00:00
bool bValid = true;
if ( file )
{
2019-06-16 22:16:38 +00:00
char buff[29];
CFileMgr::Read(file, buff, sizeof(buff));
if ( !strncmp(buff, "THIS FILE IS NOT VALID YET", sizeof(buff) - 3) )
bValid = false;
else
CFileMgr::Seek(file, 0, 0);
}
if ( bValid )
{
ControlsManager.MakeControllerActionsBlank();
for ( int i = 0; i < 4; i++ )
{
for ( int j = 0; j < 41; j++ )
{
2019-06-16 22:16:38 +00:00
CFileMgr::Read(file, (char *)&ControlsManager.m_aSettings[j][i], sizeof(tControllerConfigBind));
}
}
}
}
2019-07-03 15:26:15 +00:00
WRAPPER void CControllerConfigManager::SaveSettings(int32 file)
{
EAXJMP(0x58B800);
}