mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-18 03:31:31 +12:00
Format
This commit is contained in:
parent
0588b99674
commit
5d8f75a385
1 changed files with 27 additions and 16 deletions
|
@ -96,6 +96,7 @@ void ActionReplay::runInstruction(const Cheat& cheat, u32 instruction) {
|
|||
break;
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
#define MAKE_IF_INSTRUCTION(opcode, comparator) \
|
||||
case opcode: { \
|
||||
const u32 baseAddr = Helpers::getBits<0, 28>(instruction); \
|
||||
|
@ -112,12 +113,22 @@ void ActionReplay::runInstruction(const Cheat& cheat, u32 instruction) {
|
|||
// Less Than (YYYYYYYY < [XXXXXXX + offset]) (Unsigned)
|
||||
MAKE_IF_INSTRUCTION(4, <)
|
||||
|
||||
// Equal to (YYYYYYYY == [XXXXXXX + offset]) (Unsigned)
|
||||
// Equal to (YYYYYYYY == [XXXXXXX + offset])
|
||||
MAKE_IF_INSTRUCTION(5, ==)
|
||||
|
||||
// Not Equal (YYYYYYYY != [XXXXXXX + offset]) (Unsigned)
|
||||
// Not Equal (YYYYYYYY != [XXXXXXX + offset])
|
||||
MAKE_IF_INSTRUCTION(6, !=)
|
||||
#undef MAKE_IF_INSTRUCTION
|
||||
// clang-format on
|
||||
|
||||
// BXXXXXXX 00000000 - offset = *(XXXXXXX + offset)
|
||||
case 0xB: {
|
||||
const u32 baseAddr = Helpers::getBits<0, 28>(instruction);
|
||||
*activeOffset = read32(baseAddr + *activeOffset);
|
||||
|
||||
pc++; // Eat up dummy word
|
||||
break;
|
||||
}
|
||||
|
||||
case 0xD: executeDType(cheat, instruction); break;
|
||||
default: Helpers::panic("Unimplemented ActionReplay instruction type %X", type); break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue