Skip to content

Commit

Permalink
remove version_3 savegame
Browse files Browse the repository at this point in the history
  • Loading branch information
walkawayy committed Aug 1, 2023
1 parent a8e8f1d commit 798990f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/game/savegame.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ typedef enum SAVEGAME_VERSION {
VERSION_0 = 0,
VERSION_1 = 1,
VERSION_2 = 2,
VERSION_3 = 3,
} SAVEGAME_VERSION;

typedef enum SAVEGAME_FORMAT {
Expand Down
9 changes: 3 additions & 6 deletions src/game/savegame/savegame_bson.c
Original file line number Diff line number Diff line change
Expand Up @@ -1266,12 +1266,9 @@ bool Savegame_BSON_LoadFromFile(MYFILE *fp, GAME_INFO *game_info)
goto cleanup;
}

if (header.version >= VERSION_3) {
struct json_object_s *music_obj =
json_object_get_object(root_obj, "music");
if (!SaveGame_BSON_LoadCurrentMusic(music_obj)) {
goto cleanup;
}
if (!SaveGame_BSON_LoadCurrentMusic(
json_object_get_object(root_obj, "music"))) {
goto cleanup;
}

ret = true;
Expand Down

0 comments on commit 798990f

Please sign in to comment.