Skip to content

Commit

Permalink
add config key "autospawn_mario_on_start"
Browse files Browse the repository at this point in the history
when set to 1, Mario will be automatically spawned once loading a save file or starting a new game.
  • Loading branch information
headshot2017 committed Feb 4, 2024
1 parent bbeb7e6 commit 11aab30
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

std::unordered_map<std::string, int> config = {
{"skip_sha1_checksum", 0},
{"use_wasapi_audio", 0}
{"use_wasapi_audio", 0},
{"autospawn_mario_on_start", 0},
};

void saveConfig()
Expand Down
2 changes: 2 additions & 0 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ class sm64_san_andreas {
{
if (!loaded) return;
if (marioSpawned()) marioDestroy();

if (config["autospawn_mario_on_start"]) marioSpawn();
}

static void destroy()
Expand Down

0 comments on commit 11aab30

Please sign in to comment.