mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
EXI_DeviceAD16: Amend variable naming
Drops Hungarian Notation type prefixing and prefixed underscores.
This commit is contained in:
parent
2f74a6f552
commit
1f14b7f907
@ -13,7 +13,7 @@ CEXIAD16::CEXIAD16() = default;
|
||||
void CEXIAD16::SetCS(int cs)
|
||||
{
|
||||
if (cs)
|
||||
m_uPosition = 0;
|
||||
m_position = 0;
|
||||
}
|
||||
|
||||
bool CEXIAD16::IsPresent() const
|
||||
@ -21,35 +21,35 @@ bool CEXIAD16::IsPresent() const
|
||||
return true;
|
||||
}
|
||||
|
||||
void CEXIAD16::TransferByte(u8& _byte)
|
||||
void CEXIAD16::TransferByte(u8& byte)
|
||||
{
|
||||
if (m_uPosition == 0)
|
||||
if (m_position == 0)
|
||||
{
|
||||
m_uCommand = _byte;
|
||||
m_command = byte;
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (m_uCommand)
|
||||
switch (m_command)
|
||||
{
|
||||
case init:
|
||||
{
|
||||
m_uAD16Register.U32 = 0x04120000;
|
||||
switch (m_uPosition)
|
||||
m_ad16_register.U32 = 0x04120000;
|
||||
switch (m_position)
|
||||
{
|
||||
case 1:
|
||||
_dbg_assert_(EXPANSIONINTERFACE, (_byte == 0x00));
|
||||
_dbg_assert_(EXPANSIONINTERFACE, byte == 0x00);
|
||||
break; // just skip
|
||||
case 2:
|
||||
_byte = m_uAD16Register.U8[0];
|
||||
byte = m_ad16_register.U8[0];
|
||||
break;
|
||||
case 3:
|
||||
_byte = m_uAD16Register.U8[1];
|
||||
byte = m_ad16_register.U8[1];
|
||||
break;
|
||||
case 4:
|
||||
_byte = m_uAD16Register.U8[2];
|
||||
byte = m_ad16_register.U8[2];
|
||||
break;
|
||||
case 5:
|
||||
_byte = m_uAD16Register.U8[3];
|
||||
byte = m_ad16_register.U8[3];
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -57,19 +57,19 @@ void CEXIAD16::TransferByte(u8& _byte)
|
||||
|
||||
case write:
|
||||
{
|
||||
switch (m_uPosition)
|
||||
switch (m_position)
|
||||
{
|
||||
case 1:
|
||||
m_uAD16Register.U8[0] = _byte;
|
||||
m_ad16_register.U8[0] = byte;
|
||||
break;
|
||||
case 2:
|
||||
m_uAD16Register.U8[1] = _byte;
|
||||
m_ad16_register.U8[1] = byte;
|
||||
break;
|
||||
case 3:
|
||||
m_uAD16Register.U8[2] = _byte;
|
||||
m_ad16_register.U8[2] = byte;
|
||||
break;
|
||||
case 4:
|
||||
m_uAD16Register.U8[3] = _byte;
|
||||
m_ad16_register.U8[3] = byte;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -77,19 +77,19 @@ void CEXIAD16::TransferByte(u8& _byte)
|
||||
|
||||
case read:
|
||||
{
|
||||
switch (m_uPosition)
|
||||
switch (m_position)
|
||||
{
|
||||
case 1:
|
||||
_byte = m_uAD16Register.U8[0];
|
||||
byte = m_ad16_register.U8[0];
|
||||
break;
|
||||
case 2:
|
||||
_byte = m_uAD16Register.U8[1];
|
||||
byte = m_ad16_register.U8[1];
|
||||
break;
|
||||
case 3:
|
||||
_byte = m_uAD16Register.U8[2];
|
||||
byte = m_ad16_register.U8[2];
|
||||
break;
|
||||
case 4:
|
||||
_byte = m_uAD16Register.U8[3];
|
||||
byte = m_ad16_register.U8[3];
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -97,12 +97,12 @@ void CEXIAD16::TransferByte(u8& _byte)
|
||||
}
|
||||
}
|
||||
|
||||
m_uPosition++;
|
||||
m_position++;
|
||||
}
|
||||
|
||||
void CEXIAD16::DoState(PointerWrap& p)
|
||||
{
|
||||
p.Do(m_uPosition);
|
||||
p.Do(m_uCommand);
|
||||
p.Do(m_uAD16Register);
|
||||
p.Do(m_position);
|
||||
p.Do(m_command);
|
||||
p.Do(m_ad16_register);
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ class CEXIAD16 : public IEXIDevice
|
||||
{
|
||||
public:
|
||||
CEXIAD16();
|
||||
void SetCS(int _iCS) override;
|
||||
void SetCS(int cs) override;
|
||||
bool IsPresent() const override;
|
||||
void DoState(PointerWrap& p) override;
|
||||
|
||||
@ -24,16 +24,16 @@ private:
|
||||
read = 0xa2
|
||||
};
|
||||
|
||||
union UAD16Reg
|
||||
union AD16Reg
|
||||
{
|
||||
u32 U32 = 0;
|
||||
u32 U8[4];
|
||||
};
|
||||
|
||||
// STATE_TO_SAVE
|
||||
u32 m_uPosition = 0;
|
||||
u32 m_uCommand = 0;
|
||||
UAD16Reg m_uAD16Register;
|
||||
u32 m_position = 0;
|
||||
u32 m_command = 0;
|
||||
AD16Reg m_ad16_register;
|
||||
|
||||
void TransferByte(u8& _uByte) override;
|
||||
void TransferByte(u8& byte) override;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user