mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-01-03 11:30:22 +00:00
SNESMAX: minor rename for member vars
This commit is contained in:
parent
685b93f387
commit
ad8a7e2810
@ -67,7 +67,7 @@ BYTE __stdcall SNESMAXCard::IORead(WORD pc, WORD addr, BYTE bWrite, BYTE value,
|
|||||||
switch (addr & 0xF)
|
switch (addr & 0xF)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
output = (output & 0x3F) | ((pCard->controller2Buttons & 0x1) << 6) | ((pCard->controller1Buttons & 0x1) << 7);
|
output = (output & 0x3F) | ((pCard->m_controller2Buttons & 0x1) << 6) | ((pCard->m_controller1Buttons & 0x1) << 7);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@ -88,13 +88,13 @@ BYTE __stdcall SNESMAXCard::IOWrite(WORD pc, WORD addr, BYTE bWrite, BYTE value,
|
|||||||
infoEx.dwSize = sizeof(infoEx);
|
infoEx.dwSize = sizeof(infoEx);
|
||||||
infoEx.dwFlags = JOY_RETURNPOV | JOY_RETURNBUTTONS;
|
infoEx.dwFlags = JOY_RETURNPOV | JOY_RETURNBUTTONS;
|
||||||
|
|
||||||
UINT& controller1Buttons = pCard->controller1Buttons; // ref to object's controller1Buttons
|
UINT& controller1Buttons = pCard->m_controller1Buttons; // ref to object's controller1Buttons
|
||||||
UINT& controller2Buttons = pCard->controller2Buttons; // ref to object's controller2Buttons
|
UINT& controller2Buttons = pCard->m_controller2Buttons; // ref to object's controller2Buttons
|
||||||
|
|
||||||
switch (addr & 0xF)
|
switch (addr & 0xF)
|
||||||
{
|
{
|
||||||
case 0: // Latch
|
case 0: // Latch
|
||||||
pCard->buttonIndex = 0;
|
pCard->m_buttonIndex = 0;
|
||||||
controller1Buttons = 0;
|
controller1Buttons = 0;
|
||||||
controller2Buttons = 0;
|
controller2Buttons = 0;
|
||||||
|
|
||||||
@ -188,9 +188,9 @@ BYTE __stdcall SNESMAXCard::IOWrite(WORD pc, WORD addr, BYTE bWrite, BYTE value,
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
case 1: // Clock
|
case 1: // Clock
|
||||||
if (pCard->buttonIndex <= 16)
|
if (pCard->m_buttonIndex <= 16)
|
||||||
{
|
{
|
||||||
pCard->buttonIndex++;
|
pCard->m_buttonIndex++;
|
||||||
controller1Buttons = controller1Buttons >> 1;
|
controller1Buttons = controller1Buttons >> 1;
|
||||||
controller2Buttons = controller2Buttons >> 1;
|
controller2Buttons = controller2Buttons >> 1;
|
||||||
}
|
}
|
||||||
@ -224,7 +224,7 @@ void SNESMAXCard::SaveSnapshot(YamlSaveHelper& yamlSaveHelper)
|
|||||||
YamlSaveHelper::Slot slot(yamlSaveHelper, GetSnapshotCardName(), m_slot, kUNIT_VERSION);
|
YamlSaveHelper::Slot slot(yamlSaveHelper, GetSnapshotCardName(), m_slot, kUNIT_VERSION);
|
||||||
|
|
||||||
YamlSaveHelper::Label unit(yamlSaveHelper, "%s:\n", SS_YAML_KEY_STATE);
|
YamlSaveHelper::Label unit(yamlSaveHelper, "%s:\n", SS_YAML_KEY_STATE);
|
||||||
yamlSaveHelper.SaveUint(SS_YAML_KEY_BUTTON_INDEX, buttonIndex);
|
yamlSaveHelper.SaveUint(SS_YAML_KEY_BUTTON_INDEX, m_buttonIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SNESMAXCard::LoadSnapshot(YamlLoadHelper& yamlLoadHelper, UINT slot, UINT version)
|
bool SNESMAXCard::LoadSnapshot(YamlLoadHelper& yamlLoadHelper, UINT slot, UINT version)
|
||||||
@ -232,7 +232,7 @@ bool SNESMAXCard::LoadSnapshot(YamlLoadHelper& yamlLoadHelper, UINT slot, UINT v
|
|||||||
if (version < 1 || version > kUNIT_VERSION)
|
if (version < 1 || version > kUNIT_VERSION)
|
||||||
throw std::string("Card: wrong version");
|
throw std::string("Card: wrong version");
|
||||||
|
|
||||||
buttonIndex = yamlLoadHelper.LoadUint(SS_YAML_KEY_BUTTON_INDEX);
|
m_buttonIndex = yamlLoadHelper.LoadUint(SS_YAML_KEY_BUTTON_INDEX);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -10,9 +10,9 @@ public:
|
|||||||
Card(CT_SNESMAX),
|
Card(CT_SNESMAX),
|
||||||
m_slot(slot)
|
m_slot(slot)
|
||||||
{
|
{
|
||||||
buttonIndex = 0;
|
m_buttonIndex = 0;
|
||||||
controller1Buttons = 0;
|
m_controller1Buttons = 0;
|
||||||
controller2Buttons = 0;
|
m_controller2Buttons = 0;
|
||||||
|
|
||||||
m_altControllerType[0] = g_cmdLine.snesMaxAltControllerType[0];
|
m_altControllerType[0] = g_cmdLine.snesMaxAltControllerType[0];
|
||||||
m_altControllerType[1] = g_cmdLine.snesMaxAltControllerType[1];
|
m_altControllerType[1] = g_cmdLine.snesMaxAltControllerType[1];
|
||||||
@ -34,9 +34,9 @@ public:
|
|||||||
private:
|
private:
|
||||||
UINT m_slot;
|
UINT m_slot;
|
||||||
|
|
||||||
UINT buttonIndex;
|
UINT m_buttonIndex;
|
||||||
UINT controller1Buttons;
|
UINT m_controller1Buttons;
|
||||||
UINT controller2Buttons;
|
UINT m_controller2Buttons;
|
||||||
|
|
||||||
bool m_altControllerType[2];
|
bool m_altControllerType[2];
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user