Code cleanup

Altered some variable names and comments. Removed some redundant parentheses.
This commit is contained in:
tadatada 2014-09-26 06:55:00 +09:00
parent c66ea9f740
commit 728840b7c5
1 changed files with 55 additions and 55 deletions

View File

@ -190,12 +190,12 @@ void handle_extended_t(IniPatch *p)
memWrite8(p->addr & 0x0FFFFFFF, (u8)p->data & 0x000000FF);
PrevCheatType = 0;
}
else if ((p->addr & 0xF0000000) == 0x10000000) // 0aaaaaaa 0000vvvv
else if ((p->addr & 0xF0000000) == 0x10000000) // 1aaaaaaa 0000vvvv
{
memWrite16(p->addr & 0x0FFFFFFF, (u16)p->data & 0x0000FFFF);
PrevCheatType = 0;
}
else if ((p->addr & 0xF0000000) == 0x20000000) // 0aaaaaaa vvvvvvvv
else if ((p->addr & 0xF0000000) == 0x20000000) // 2aaaaaaa vvvvvvvv
{
memWrite32(p->addr & 0x0FFFFFFF, (u32)p->data);
PrevCheatType = 0;
@ -328,14 +328,14 @@ void handle_extended_t(IniPatch *p)
}
else if (p->addr < 0xF0000000)
{
if ((((u32)p->data & 0xF0000000) == 0x00000000)) // Ezyyvvvv 0aaaaaaa
if (((u32)p->data & 0xF0000000) == 0x00000000) // Ezyyvvvv 0aaaaaaa
{
u8 z = ((u32)p->addr & 0x0F000000) / 0x01000000;
if (z == 0) // E0yyvvvv 0aaaaaaa
{
u16 mem16 = memRead16((u32)p->data & 0x0FFFFFFF);
if (mem16 != (0x0000FFFF & (u32)p->addr))
u16 mem = memRead16((u32)p->data & 0x0FFFFFFF);
if (mem != (0x0000FFFF & (u32)p->addr))
{
SkipCount = ((u32)p->addr & 0x00FF0000) / 0x10000;
}
@ -343,22 +343,22 @@ void handle_extended_t(IniPatch *p)
}
else if (z == 1) // E1yy00vv 0aaaaaaa
{
u8 mem8 = memRead8((u32)p->data & 0x0FFFFFFF);
if (mem8 != (0x000000FF & (u32)p->addr))
u8 mem = memRead8((u32)p->data & 0x0FFFFFFF);
if (mem != (0x000000FF & (u32)p->addr))
{
SkipCount = ((u32)p->addr & 0x00FF0000) / 0x10000;
}
PrevCheatType = 0;
}
}
else if ((((u32)p->data & 0xF0000000) == 0x10000000)) // Ezyyvvvv 1aaaaaaa
else if (((u32)p->data & 0xF0000000) == 0x10000000) // Ezyyvvvv 1aaaaaaa
{
u8 z = ((u32)p->addr & 0x0F000000) / 0x01000000;
if (z == 0) // E0yyvvvv 1aaaaaaa
{
u16 mem16 = memRead16((u32)p->data & 0x0FFFFFFF);
if (mem16 == (0x0000FFFF & (u32)p->addr))
u16 mem = memRead16((u32)p->data & 0x0FFFFFFF);
if (mem == (0x0000FFFF & (u32)p->addr))
{
SkipCount = ((u32)p->addr & 0x00FF0000) / 0x10000;
}
@ -366,22 +366,22 @@ void handle_extended_t(IniPatch *p)
}
else if (z == 1) // E1yy00vv 1aaaaaaa
{
u8 mem8 = memRead8((u32)p->data & 0x0FFFFFFF);
if (mem8 == (0x000000FF & (u32)p->addr))
u8 mem = memRead8((u32)p->data & 0x0FFFFFFF);
if (mem == (0x000000FF & (u32)p->addr))
{
SkipCount = ((u32)p->addr & 0x00FF0000) / 0x10000;
}
PrevCheatType = 0;
}
}
else if ((((u32)p->data & 0xF0000000) == 0x20000000)) // Ezyyvvvv 2aaaaaaa
else if (((u32)p->data & 0xF0000000) == 0x20000000) // Ezyyvvvv 2aaaaaaa
{
u8 z = ((u32)p->addr & 0x0F000000) / 0x01000000;
if (z == 0) // E0yyvvvv 2aaaaaaa
{
u16 mem16 = memRead16((u32)p->data & 0x0FFFFFFF);
if (mem16 >= (0x0000FFFF & (u32)p->addr))
u16 mem = memRead16((u32)p->data & 0x0FFFFFFF);
if (mem >= (0x0000FFFF & (u32)p->addr))
{
SkipCount = ((u32)p->addr & 0x00FF0000) / 0x10000;
}
@ -389,22 +389,22 @@ void handle_extended_t(IniPatch *p)
}
else if (z == 1) // E1yy00vv 2aaaaaaa
{
u8 mem8 = memRead8((u32)p->data & 0x0FFFFFFF);
if (mem8 >= (0x000000FF & (u32)p->addr))
u8 mem = memRead8((u32)p->data & 0x0FFFFFFF);
if (mem >= (0x000000FF & (u32)p->addr))
{
SkipCount = ((u32)p->addr & 0x00FF0000) / 0x10000;
}
PrevCheatType = 0;
}
}
else if ((((u32)p->data & 0xF0000000) == 0x30000000)) // Ezyyvvvv 3aaaaaaa
else if (((u32)p->data & 0xF0000000) == 0x30000000) // Ezyyvvvv 3aaaaaaa
{
u8 z = ((u32)p->addr & 0x0F000000) / 0x01000000;
if (z == 0) // E0yyvvvv 3aaaaaaa
{
u16 mem16 = memRead16((u32)p->data & 0x0FFFFFFF);
if (mem16 <= (0x0000FFFF & (u32)p->addr))
u16 mem = memRead16((u32)p->data & 0x0FFFFFFF);
if (mem <= (0x0000FFFF & (u32)p->addr))
{
SkipCount = ((u32)p->addr & 0x00FF0000) / 0x10000;
}
@ -412,8 +412,8 @@ void handle_extended_t(IniPatch *p)
}
else if (z == 1) // E1yy00vv 3aaaaaaa
{
u8 mem8 = memRead8((u32)p->data & 0x0FFFFFFF);
if (mem8 <= (0x000000FF & (u32)p->addr))
u8 mem = memRead8((u32)p->data & 0x0FFFFFFF);
if (mem <= (0x000000FF & (u32)p->addr))
{
SkipCount = ((u32)p->addr & 0x00FF0000) / 0x10000;
}