Dynamically get level count for all levels cheat

This commit is contained in:
Matt Penny 2024-01-14 00:09:40 -05:00
parent bf482724bc
commit 7e699a4324

View File

@ -5,6 +5,7 @@
#include "../scene/scene.h"
#include "../build/src/audio/clips.h"
#include "../savefile/savefile.h"
#include "../levels/levels.h"
struct CheatCodePattern gCheatCodes[CheatCodeCount] = {
[CheatCodeUnlockGun] = {
@ -46,7 +47,7 @@ void cheatCodeApply(enum CheatCode cheat) {
playerToggleInvincibility(&gScene.player);
break;
case CheatCodeAllLevels:
savefileMarkChapterProgress(7);
savefileMarkChapterProgress(levelCount() - 1);
break;
case CheatCodeCount:
break;