diff --git a/src/pc/configfile.c b/src/pc/configfile.c index fcf193e5..eb66ca12 100644 --- a/src/pc/configfile.c +++ b/src/pc/configfile.c @@ -13,6 +13,7 @@ #include "gfx/gfx_window_manager_api.h" #include "controller/controller_api.h" #include "fs/fs.h" +#include "pc/cheats.h" #include "pc/dynamic_options.h" #define ARRAY_LEN(arr) (sizeof(arr) / sizeof(arr[0])) @@ -153,7 +154,29 @@ static const struct ConfigOption options[] = { {.name = "skip_intro", .type = CONFIG_TYPE_BOOL, .boolValue = &configSkipIntro}, #ifdef DISCORDRPC {.name = "discordrpc_enable", .type = CONFIG_TYPE_BOOL, .boolValue = &configDiscordRPC}, - #endif + #endif + {.name = "enable_cheats", .type = CONFIG_TYPE_BOOL, .boolValue = &Cheats.EnableCheats }, + {.name = "moonjump", .type = CONFIG_TYPE_BOOL, .boolValue = &Cheats.MoonJump }, + {.name = "invincible", .type = CONFIG_TYPE_BOOL, .boolValue = &Cheats.GodMode }, + {.name = "infintie_lives", .type = CONFIG_TYPE_BOOL, .boolValue = &Cheats.InfiniteLives }, + {.name = "super_speed", .type = CONFIG_TYPE_BOOL, .boolValue = &Cheats.SuperSpeed }, + {.name = "controls", .type = CONFIG_TYPE_UINT, .uintValue = &Cheats.Responsive }, + {.name = "exit_anywhere", .type = CONFIG_TYPE_BOOL, .boolValue = &Cheats.ExitAnywhere }, + {.name = "huge_mario", .type = CONFIG_TYPE_BOOL, .boolValue = &Cheats.HugeMario }, + {.name = "tiny_mario", .type = CONFIG_TYPE_BOOL, .boolValue = &Cheats.TinyMario }, + {.name = "hover_mode", .type = CONFIG_TYPE_BOOL, .boolValue = &Cheats.Hover }, + {.name = "moon_gravity", .type = CONFIG_TYPE_BOOL, .boolValue = &Cheats.Moon }, + {.name = "run_speed", .type = CONFIG_TYPE_UINT, .uintValue = &Cheats.Run }, + {.name = "no_death_barrier", .type = CONFIG_TYPE_BOOL, .boolValue = &Cheats.NDB }, + {.name = "jumps_higher", .type = CONFIG_TYPE_BOOL, .boolValue = &Cheats.Jump }, + {.name = "speed_display", .type = CONFIG_TYPE_BOOL, .boolValue = &Cheats.SPD }, + {.name = "t_pose_float", .type = CONFIG_TYPE_BOOL, .boolValue = &Cheats.TPF }, + {.name = "cannon_anywhere", .type = CONFIG_TYPE_BOOL, .boolValue = &Cheats.Cann }, + {.name = "auto_wk", .type = CONFIG_TYPE_BOOL, .boolValue = &Cheats.AutoWK }, + {.name = "get_shell", .type = CONFIG_TYPE_BOOL, .boolValue = &Cheats.GetShell }, + {.name = "get_bobomb", .type = CONFIG_TYPE_BOOL, .boolValue = &Cheats.GetBob }, + {.name = "swift_swim", .type = CONFIG_TYPE_BOOL, .boolValue = &Cheats.Swim }, + {.name = "flyer", .type = CONFIG_TYPE_BOOL, .boolValue = &Cheats.Fly }, }; // Reads an entire line from a file (excluding the newline character) and returns an allocated string