From 26e34a1fa15849f2512beb083b39b0a374005f2e Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Mon, 16 Sep 2019 03:04:26 -0400 Subject: [PATCH] Use maps.pk3 --- assets/CMakeLists.txt | 2 +- src/config.h.in | 4 ++-- src/d_main.c | 14 +++++++++++--- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/assets/CMakeLists.txt b/assets/CMakeLists.txt index 89be796ad..e5cfa5ca2 100644 --- a/assets/CMakeLists.txt +++ b/assets/CMakeLists.txt @@ -17,7 +17,7 @@ set(SRB2_ASSET_HASHED gfx.pk3;\ textures.pk3;\ chars.pk3;\ -maps.wad;\ +maps.pk3;\ patch.pk3" CACHE STRING "Asset filenames to apply MD5 checks. No spaces between entries!" ) diff --git a/src/config.h.in b/src/config.h.in index 4bf84ff1d..964207e34 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -15,7 +15,7 @@ #define ASSET_HASH_GFX_PK3 "${SRB2_ASSET_gfx.pk3_HASH}" #define ASSET_HASH_TEXTURES_PK3 "${SRB2_ASSET_textures.pk3_HASH}" #define ASSET_HASH_CHARS_PK3 "${SRB2_ASSET_chars.pk3_HASH}" -#define ASSET_HASH_MAPS_WAD "${SRB2_ASSET_maps.wad_HASH}" +#define ASSET_HASH_MAPS_PK3 "${SRB2_ASSET_maps.pk3_HASH}" #ifdef USE_PATCH_FILE #define ASSET_HASH_PATCH_PK3 "${SRB2_ASSET_patch.pk3_HASH}" #endif @@ -36,7 +36,7 @@ #define ASSET_HASH_GFX_PK3 "00000000000000000000000000000000" #define ASSET_HASH_TEXTURES_PK3 "00000000000000000000000000000000" #define ASSET_HASH_CHARS_PK3 "00000000000000000000000000000000" -#define ASSET_HASH_MAPS_WAD "00000000000000000000000000000000" +#define ASSET_HASH_MAPS_PK3 "00000000000000000000000000000000" #ifdef USE_PATCH_FILE #define ASSET_HASH_PATCH_PK3 "00000000000000000000000000000000" #endif diff --git a/src/d_main.c b/src/d_main.c index 1404a5e61..5c8e34bde 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -896,11 +896,18 @@ static void IdentifyVersion(void) D_AddFile(va(pandf,srb2waddir,"gfx.pk3"), startupwadfiles); D_AddFile(va(pandf,srb2waddir,"textures.pk3"), startupwadfiles); D_AddFile(va(pandf,srb2waddir,"chars.pk3"), startupwadfiles); - D_AddFile(va(pandf,srb2waddir,"maps.wad"), startupwadfiles); // TODO: make this a pk3 too! + D_AddFile(va(pandf,srb2waddir,"maps.pk3"), startupwadfiles); #ifdef USE_PATCH_FILE D_AddFile(va(pandf,srb2waddir,"patch.pk3"), startupwadfiles); #endif +#if 0 + // TODO: pk3 doesn't support music replacement IIRC + // music barely benefits from the compression anyway + // would be nice for the folders, though + D_AddFile(va(pandf,srb2waddir,"sounds.pk3"), startupwadfiles); + D_AddFile(va(pandf,srb2waddir,"music.pk3"), startupwadfiles); +#else #if !defined (HAVE_SDL) || defined (HAVE_MIXER) #define MUSICTEST(str) \ {\ @@ -915,6 +922,7 @@ static void IdentifyVersion(void) MUSICTEST("music.wad") #undef MUSICTEST #endif +#endif } /* ======================================================================== */ @@ -1200,7 +1208,7 @@ void D_SRB2Main(void) mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_GFX_PK3); // gfx.pk3 mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_TEXTURES_PK3); // textures.pk3 mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_CHARS_PK3); // chars.pk3 - mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_MAPS_WAD); // maps.wad -- 4 - If you touch this, make sure to touch up the majormods stuff below. + mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_MAPS_PK3); // maps.pk3 -- 4 - If you touch this, make sure to touch up the majormods stuff below. #ifdef USE_PATCH_FILE mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_PATCH_PK3); // patch.pk3 #endif @@ -1208,7 +1216,7 @@ void D_SRB2Main(void) mainwads++; // gfx.pk3 mainwads++; // textures.pk3 mainwads++; // chars.pk3 - mainwads++; // maps.wad + mainwads++; // maps.pk3 #ifdef USE_PATCH_FILE mainwads++; // patch.pk3 #endif