Cheats: Implement C1 command
This commit is contained in:
parent
ea9829946d
commit
09495b1d93
|
@ -1014,6 +1014,18 @@ void CheatCode::Apply() const
|
|||
}
|
||||
break;
|
||||
|
||||
case InstructionCode::DelayActivation: // C1
|
||||
{
|
||||
// A value of around 4000 or 5000 will usually give you a good 20-30 second delay before codes are activated.
|
||||
// Frame number * 0.3 -> (20 * 60) * 10 / 3 => 4000
|
||||
const u32 comp_value = (System::GetFrameNumber() * 10) / 3;
|
||||
if (comp_value < inst.value16)
|
||||
index = count;
|
||||
else
|
||||
index++;
|
||||
}
|
||||
break;
|
||||
|
||||
case InstructionCode::Slide:
|
||||
{
|
||||
if ((index + 1) >= instructions.size())
|
||||
|
|
|
@ -30,6 +30,7 @@ struct CheatCode
|
|||
Decrement16 = 0x11,
|
||||
Increment8 = 0x20,
|
||||
Decrement8 = 0x21,
|
||||
DelayActivation = 0xC1,
|
||||
SkipIfNotEqual16 = 0xC0,
|
||||
SkipIfButtonsNotEqual = 0xD5,
|
||||
SkipIfButtonsEqual = 0xD6,
|
||||
|
|
Loading…
Reference in New Issue