Remove all traces of "srb2.wad" support, since it is no longer needed now that srb2.pk3 is the IWAD (...IPK3?). srb2.wad cannot exactly be a pk3 file after all.

Additionally, rename any remaining "srb2.srb" to "srb2.pk3" in the main source code files. Not sure whether to bother dealing with srb2.srb/srb2.wad mentions in project files for now.
This commit is contained in:
Monster Iestyn 2017-12-07 18:26:12 +00:00
parent 91097fb48e
commit 75bc76e9b4
5 changed files with 21 additions and 43 deletions

View file

@ -79,7 +79,7 @@
# SRB2 data files
D_DIR?=../bin/Resources
D_FILES=$(D_DIR)/srb2.srb \
D_FILES=$(D_DIR)/srb2.pk3 \
$(D_DIR)/player.dta \
$(D_DIR)/rings.wpn \
$(D_DIR)/drill.dta \

View file

@ -11,7 +11,7 @@
#ifdef CMAKECONFIG
#define ASSET_HASH_SRB2_SRB "${SRB2_ASSET_srb2.srb_HASH}"
#define ASSET_HASH_SRB2_PK3 "${SRB2_ASSET_srb2.pk3_HASH}"
#define ASSET_HASH_PLAYER_DTA "${SRB2_ASSET_player.dta_HASH}"
#define ASSET_HASH_RINGS_DTA "${SRB2_ASSET_rings.dta_HASH}"
#define ASSET_HASH_ZONES_DTA "${SRB2_ASSET_zones.dta_HASH}"
@ -31,7 +31,7 @@
/* Manually defined asset hashes for non-CMake builds
* Last updated 2015 / 05 / 03
*/
#define ASSET_HASH_SRB2_SRB "c1b9577687f8a795104aef4600720ea7"
#define ASSET_HASH_SRB2_PK3 "c1b9577687f8a795104aef4600720ea7"
#define ASSET_HASH_ZONES_DTA "303838c6c534d9540288360fa49cca60"
#define ASSET_HASH_PLAYER_DTA "cfca0f1c73023cbbd8f844f45480f799"
#define ASSET_HASH_RINGS_DTA "85901ad4bf94637e5753d2ac2c03ea26"

View file

@ -784,7 +784,7 @@ static inline void D_CleanFile(void)
static void IdentifyVersion(void)
{
char *srb2wad1, *srb2wad2;
char *srb2wad;
const char *srb2waddir = NULL;
#if (defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON) || defined (HAVE_SDL)
@ -813,31 +813,24 @@ static void IdentifyVersion(void)
srb2waddir = I_GetWadDir();
#endif
// Commercial.
srb2wad1 = malloc(strlen(srb2waddir)+1+8+1);
srb2wad2 = malloc(strlen(srb2waddir)+1+8+1);
if (srb2wad1 == NULL && srb2wad2 == NULL)
srb2wad = malloc(strlen(srb2waddir)+1+8+1);
if (srb2wad == NULL)
I_Error("No more free memory to look in %s", srb2waddir);
if (srb2wad1 != NULL)
sprintf(srb2wad1, pandf, srb2waddir, "srb2.pk3");
if (srb2wad2 != NULL)
sprintf(srb2wad2, pandf, srb2waddir, "srb2.wad");
else
sprintf(srb2wad, pandf, srb2waddir, "srb2.pk3");
// will be overwritten in case of -cdrom or unix/win home
snprintf(configfile, sizeof configfile, "%s" PATHSEP CONFIGFILENAME, srb2waddir);
configfile[sizeof configfile - 1] = '\0';
// Load the IWAD
if (srb2wad2 != NULL && FIL_ReadFileOK(srb2wad2))
D_AddFile(srb2wad2);
else if (srb2wad1 != NULL && FIL_ReadFileOK(srb2wad1))
D_AddFile(srb2wad1);
if (srb2wad != NULL && FIL_ReadFileOK(srb2wad))
D_AddFile(srb2wad);
else
I_Error("SRB2.SRB/SRB2.WAD not found! Expected in %s, ss files: %s and %s\n", srb2waddir, srb2wad1, srb2wad2);
I_Error("srb2.pk3 not found! Expected in %s, ss file: %s\n", srb2waddir, srb2wad);
if (srb2wad1)
free(srb2wad1);
if (srb2wad2)
free(srb2wad2);
if (srb2wad)
free(srb2wad);
// if you change the ordering of this or add/remove a file, be sure to update the md5
// checking in D_SRB2Main
@ -1132,7 +1125,7 @@ void D_SRB2Main(void)
#ifndef DEVELOP // md5s last updated 12/14/14
// Check MD5s of autoloaded files
//W_VerifyFileMD5(0, ASSET_HASH_SRB2_SRB); // srb2.srb/srb2.wad
//W_VerifyFileMD5(0, ASSET_HASH_SRB2_PK3); // srb2.pk3
//W_VerifyFileMD5(1, ASSET_HASH_ZONES_DTA); // zones.dta
//W_VerifyFileMD5(2, ASSET_HASH_PLAYER_DTA); // player.dta
#ifdef USE_PATCH_DTA

View file

@ -333,7 +333,7 @@ INT32 CL_CheckFiles(void)
// return 1;
// the first is the iwad (the main wad file)
// we don't care if it's called srb2.srb or srb2.wad.
// we don't care if it's called srb2.pk3 or not.
// Never download the IWAD, just assume it's there and identical
fileneeded[0].status = FS_OPEN;
@ -754,6 +754,7 @@ void Got_Filetxpak(void)
static INT32 filetime = 0;
if (!(strcmp(filename, "srb2.pk3")
&& strcmp(filename, "srb2.srb")
&& strcmp(filename, "srb2.wad")
&& strcmp(filename, "zones.dta")
&& strcmp(filename, "player.dta")

View file

@ -124,7 +124,7 @@ typedef LPVOID (WINAPI *p_MapViewOfFile) (HANDLE, DWORD, DWORD, DWORD, SIZE_T);
#include "macosx/mac_resources.h"
#endif
// Locations for searching the srb2.srb
// Locations for searching the srb2.pk3
#if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON)
#define DEFAULTWADLOCATION1 "/usr/local/share/games/SRB2"
#define DEFAULTWADLOCATION2 "/usr/local/games/SRB2"
@ -143,7 +143,6 @@ typedef LPVOID (WINAPI *p_MapViewOfFile) (HANDLE, DWORD, DWORD, DWORD, SIZE_T);
/** \brief WAD file to look for
*/
#define WADKEYWORD1 "srb2.pk3"
#define WADKEYWORD2 "srb2.wad"
/** \brief holds wad path
*/
static char returnWadPath[256];
@ -2511,14 +2510,6 @@ static boolean isWadPathOk(const char *path)
return true;
}
sprintf(wad3path, pandf, path, WADKEYWORD2);
if (FIL_ReadFileOK(wad3path))
{
free(wad3path);
return true;
}
free(wad3path);
return false;
}
@ -2536,7 +2527,7 @@ static void pathonly(char *s)
}
}
/** \brief search for srb2.srb in the given path
/** \brief search for srb2.pk3 in the given path
\param searchDir starting path
@ -2557,19 +2548,12 @@ static const char *searchWad(const char *searchDir)
return tempsw;
}
strcpy(tempsw, WADKEYWORD2);
fstemp = filesearch(tempsw, searchDir, NULL, true, 20);
if (fstemp == FS_FOUND)
{
pathonly(tempsw);
return tempsw;
}
return NULL;
}
/** \brief go through all possible paths and look for srb2.srb
/** \brief go through all possible paths and look for srb2.pk3
\return path to srb2.srb if any
\return path to srb2.pk3 if any
*/
static const char *locateWad(void)
{
@ -2698,7 +2682,7 @@ const char *I_LocateWad(void)
if (waddir)
{
// change to the directory where we found srb2.srb
// change to the directory where we found srb2.pk3
#if defined (_WIN32)
SetCurrentDirectoryA(waddir);
#else