MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / GameVersion_Load

Function GameVersion_Load

src/GameVersion.c:73–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71};
72
73void GameVersion_Load(void) {
74 cc_bool hasCPE = !Game_ClassicMode && Options_GetBool(OPT_CPE, true);
75 int version = Options_GetInt(OPT_GAME_VERSION, VERSION_0017, VERSION_0030, VERSION_0030);
76 const struct GameVersion* ver = &version_cpe;
77
78 if (hasCPE) {
79 /* defaults to CPE already */
80 } else if (version == VERSION_0030) {
81 ver = &version_0030;
82 } else if (version == VERSION_0023) {
83 ver = &version_0023;
84 } else if (version == VERSION_0019) {
85 ver = &version_0019;
86 } else if (version == VERSION_0017) {
87 ver = &version_0017;
88 }
89
90 Game_Version = *ver;
91}

Callers 4

NF_SetCPEFunction · 0.85
NostalgiaScreen_VersionFunction · 0.85
Game_LoadFunction · 0.85
Launcher_SetupFunction · 0.85

Calls 2

Options_GetBoolFunction · 0.85
Options_GetIntFunction · 0.85

Tested by

no test coverage detected