MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / writeCheat

Method writeCheat

pcsx2/Patch.cpp:1205–1221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1203template <typename Memory>
1204 requires std::is_base_of_v<MemoryInterface, Memory>
1205void Patch::writeCheat(Memory& memory, ExtendedState& state)
1206{
1207 switch (state.last_type)
1208 {
1209 case 0x0:
1210 memory.IdempotentWrite8(state.prev_cheat_addr, state.iteration_increment & 0xFF);
1211 break;
1212 case 0x1:
1213 memory.IdempotentWrite16(state.prev_cheat_addr, state.iteration_increment & 0xFFFF);
1214 break;
1215 case 0x2:
1216 memory.IdempotentWrite32(state.prev_cheat_addr, state.iteration_increment);
1217 break;
1218 default:
1219 break;
1220 }
1221}
1222
1223template <typename Memory>
1224 requires std::is_base_of_v<MemoryInterface, Memory>

Callers

nothing calls this directly

Calls 3

IdempotentWrite8Method · 0.80
IdempotentWrite16Method · 0.80
IdempotentWrite32Method · 0.80

Tested by

no test coverage detected