Reactivate CheatJump

This commit is contained in:
Snesrev
2023-03-06 04:18:49 +01:00
parent 8db5f5fd36
commit 9bac343452
3 changed files with 6 additions and 4 deletions

2
sm.ini
View File

@@ -64,7 +64,7 @@ Controls = Up, Down, Left, Right, Right Shift, Return, x, z, s, a, c, v
#Controls = Up, Down, Left, Right, Right Shift, Return, x, w, s, q, c, v #Controls = Up, Down, Left, Right, Right Shift, Return, x, w, s, q, c, v
CheatLife = w CheatLife = w
CheatJump = o CheatJump = Ctrl+q
ClearKeyLog = k ClearKeyLog = k
StopReplay = l StopReplay = l
Fullscreen = Alt+Return Fullscreen = Alt+Return

View File

@@ -39,6 +39,8 @@ static const uint16 kDefaultKbdControls[kKeys_Total] = {
_(SDLK_w), _(SDLK_q), S(SDLK_r), _(SDLK_w), _(SDLK_q), S(SDLK_r),
// ClearKeyLog, StopReplay, Fullscreen, Reset, Pause, PauseDimmed, Turbo, ReplayTurbo, WindowBigger, WindowSmaller, DisplayPerf, ToggleRenderer // ClearKeyLog, StopReplay, Fullscreen, Reset, Pause, PauseDimmed, Turbo, ReplayTurbo, WindowBigger, WindowSmaller, DisplayPerf, ToggleRenderer
_(SDLK_k), _(SDLK_l), A(SDLK_RETURN), C(SDLK_r), S(SDLK_p), _(SDLK_p), _(SDLK_TAB), _(SDLK_t), N, N, _(SDLK_f), _(SDLK_r), _(SDLK_k), _(SDLK_l), A(SDLK_RETURN), C(SDLK_r), S(SDLK_p), _(SDLK_p), _(SDLK_TAB), _(SDLK_t), N, N, _(SDLK_f), _(SDLK_r),
// VolumeUp VolumeDown
0, 0,
}; };
#undef _ #undef _
#undef A #undef A

View File

@@ -682,9 +682,9 @@ void RtlCheat(char c) {
if (c == 'w') { if (c == 'w') {
samus_health = samus_max_health; samus_health = samus_max_health;
StateRecorder_RecordPatchByte(&state_recorder, 0x9C2, (uint8 *)&samus_health, 2); StateRecorder_RecordPatchByte(&state_recorder, 0x9C2, (uint8 *)&samus_health, 2);
} else if (c == 'q' && 0) { } else if (c == 'q') {
samus_y_pos -= 32; samus_y_pos -= 4;
samus_y_speed = 0; samus_y_speed = -8;
StateRecorder_RecordPatchByte(&state_recorder, 0xafa, (uint8 *)&samus_y_pos, 2); StateRecorder_RecordPatchByte(&state_recorder, 0xafa, (uint8 *)&samus_y_pos, 2);
StateRecorder_RecordPatchByte(&state_recorder, 0xb2e, (uint8 *)&samus_y_speed, 2); StateRecorder_RecordPatchByte(&state_recorder, 0xb2e, (uint8 *)&samus_y_speed, 2);
menu_index = 0; menu_index = 0;