diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 843ac0b52..cec4a0be5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRB2_CONFIG_YASM OFF CACHE BOOL "Use YASM in place of NASM.") set(SRB2_CONFIG_DEV_BUILD OFF CACHE BOOL "Compile a development build of SRB2Kart.") -set(SRB2_CONFIG_TESTERS OFF CACHE BOOL - "Compile a build for testers.") -set(SRB2_CONFIG_HOSTTESTERS OFF CACHE BOOL - "Compile a build to host netgames for testers builds.") set(SRB2_CONFIG_SKIP_COMPTIME OFF CACHE BOOL "Skip Comptime rebuild.") @@ -393,12 +389,6 @@ target_compile_definitions(SRB2SDL2 PRIVATE -DCMAKECONFIG) if(SRB2_CONFIG_DEBUGMODE) target_compile_definitions(SRB2SDL2 PRIVATE -DZDEBUG -DPARANOIA -DRANGECHECK -DPACKETDROP) endif() -if(SRB2_CONFIG_TESTERS) - target_compile_definitions(SRB2SDL2 PRIVATE -DTESTERS) -endif() -if(SRB2_CONFIG_HOSTTESTERS) - target_compile_definitions(SRB2SDL2 PRIVATE -DHOSTTESTERS) -endif() if(SRB2_CONFIG_MOBJCONSISTANCY) target_compile_definitions(SRB2SDL2 PRIVATE -DMOBJCONSISTANCY) endif() diff --git a/src/Makefile.d/features.mk b/src/Makefile.d/features.mk index eec507156..de56b4753 100644 --- a/src/Makefile.d/features.mk +++ b/src/Makefile.d/features.mk @@ -6,7 +6,7 @@ passthru_opts+=\ NONET NO_IPV6 NOHW NOMD5 NOPOSTPROCESSING\ MOBJCONSISTANCY PACKETDROP ZDEBUG\ HAVE_MINIUPNPC\ - HAVE_DISCORDRPC TESTERS HOSTTESTERS DEVELOP + HAVE_DISCORDRPC DEVELOP # build with debugging information ifdef DEBUGMODE diff --git a/src/config.h.in b/src/config.h.in index aa8cd4aa1..b76c49fe1 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -15,10 +15,11 @@ */ #define ASSET_HASH_MAIN_PK3 "00000000000000000000000000000000" -#define ASSET_HASH_GFX_PK3 "00000000000000000000000000000000" -#define ASSET_HASH_TEXTURES_PK3 "00000000000000000000000000000000" +#define ASSET_HASH_SRB2_SRB "c1b9577687f8a795104aef4600720ea7" +#define ASSET_HASH_GFX_KART "06f86ee16136eb8a7043b15001797034" +#define ASSET_HASH_TEXTURES_KART "abb53d56aba47c3a8cb0f764da1c8b80" #define ASSET_HASH_CHARS_PK3 "00000000000000000000000000000000" -#define ASSET_HASH_MAPS_PK3 "00000000000000000000000000000000" +#define ASSET_HASH_MAPS_KART "d051e55141ba736582228c456953cd98" #define ASSET_HASH_FOLLOWERS_PK3 "00000000000000000000000000000000" #ifdef USE_PATCH_FILE #define ASSET_HASH_PATCH_PK3 "00000000000000000000000000000000" diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 8204589b3..f2ebe04bf 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -3861,11 +3861,7 @@ boolean Playing(void) boolean SV_SpawnServer(void) { -#ifdef TESTERS - /* Just don't let the testers play. Easy. */ - I_Error("What do you think you're doing?"); - return false; -#else + // Screw Testers mode, worst idea ever. boolean result = false; if (demo.playback) G_StopDemo(); // reset engine parameter @@ -3897,7 +3893,6 @@ boolean SV_SpawnServer(void) result |= SV_AddWaitingPlayers(node, cv_playername[0].zstring, cv_playername[1].zstring, cv_playername[2].zstring, cv_playername[3].zstring); } return result; -#endif } void SV_StopServer(void) diff --git a/src/d_main.c b/src/d_main.c index f2af8e891..64becf217 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -1132,36 +1132,33 @@ static void IdentifyVersion(void) // if you change the ordering of this or add/remove a file, be sure to update the md5 // checking in D_SRB2Main -#if defined (TESTERS) || defined (HOSTTESTERS) -//// -#define TEXTURESNAME "MISC_TEXTURES.pk3" -#define MAPSNAME "MISC_MAPS.pk3" -#define PATCHNAME "MISC_PATCH.pk3" -#define MUSICNAME "MISC_MUSIC.PK3" -//// -#else -//// -#define TEXTURESNAME "textures.pk3" -#define MAPSNAME "maps.pk3" +#define SRB2NAME "srb2.srb" +#define TEXTURESNAME "textures.kart" +#define MAPSNAME "maps.kart" #define PATCHNAME "patch.pk3" -#define MUSICNAME "music.pk3" -//// -#endif -//// -#if !defined (TESTERS) && !defined (HOSTTESTERS) - D_AddFile(startupiwads, va(pandf,srb2waddir,"gfx.pk3")); -#endif +#define MUSICNAME "music.kart" +#define FOLLOWERSNAME "followers.pk3" +#define CHARSNAME "chars.pk3" +#define GRAPHICSNAME "gfx.kart" +#define SOUNDSNAME "sounds.kart" + + D_AddFile(startupiwads, va(pandf,srb2waddir,SRB2NAME)); + D_AddFile(startupiwads, va(pandf,srb2waddir,GRAPHICSNAME)); D_AddFile(startupiwads, va(pandf,srb2waddir,TEXTURESNAME)); - D_AddFile(startupiwads, va(pandf,srb2waddir,"chars.pk3")); + D_AddFile(startupiwads, va(pandf,srb2waddir,CHARSNAME)); D_AddFile(startupiwads, va(pandf,srb2waddir,MAPSNAME)); - D_AddFile(startupiwads, va(pandf,srb2waddir,"followers.pk3")); + //D_AddFile(startupiwads, va(pandf,srb2waddir,FOLLOWERSNAME)); #ifdef USE_PATCH_FILE D_AddFile(startupiwads, va(pandf,srb2waddir,PATCHNAME)); #endif //// +#undef SRB2NAME #undef TEXTURESNAME #undef MAPSNAME #undef PATCHNAME +#undef FOLLOWERSNAME +#undef CHARSNAME +#undef GRAPHICSNAME #if !defined (HAVE_SDL) || defined (HAVE_MIXER) @@ -1175,11 +1172,13 @@ static void IdentifyVersion(void) I_Error("File "str" has been modified with non-music/sound lumps"); \ } - MUSICTEST("sounds.pk3") + MUSICTEST(SOUNDSNAME) MUSICTEST(MUSICNAME) #undef MUSICNAME #undef MUSICTEST +#undef SOUNDSNAME + #endif } @@ -1371,7 +1370,6 @@ void D_SRB2Main(void) // Do this up here so that WADs loaded through the command line can use ExecCfg COM_Init(); -#ifndef TESTERS // add any files specified on the command line with -file wadfile // to the wad list if (!((M_GetUrlProtocolArg() || M_CheckParm("-connect")) && !M_CheckParm("-server"))) @@ -1389,7 +1387,6 @@ void D_SRB2Main(void) } } } -#endif // get map from parms @@ -1434,22 +1431,22 @@ void D_SRB2Main(void) // Check MD5s of autoloaded files // Note: Do not add any files that ignore MD5! W_VerifyFileMD5(mainwads, ASSET_HASH_MAIN_PK3); // main.pk3 - 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_SRB2_SRB); // gfx.pk3 + mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_GFX_KART); // gfx.pk3 + mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_TEXTURES_KART); // textures.pk3 mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_CHARS_PK3); // chars.pk3 - mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_MAPS_PK3); // maps.pk3 -- 4 - If you touch this, make sure to touch up the majormods stuff below. - mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_FOLLOWERS_PK3); // followers.pk3 + mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_MAPS_KART); // maps.pk3 -- 4 - If you touch this, make sure to touch up the majormods stuff below. + //mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_FOLLOWERS_PK3); // followers.pk3 #ifdef USE_PATCH_FILE mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_PATCH_PK3); // patch.pk3 #endif #else -#if !defined (TESTERS) && !defined (HOSTTESTERS) - mainwads++; // gfx.pk3 -#endif - mainwads++; // textures.pk3 + mainwads++; // srb2.srb + mainwads++; // gfx.kart + mainwads++; // textures.kart mainwads++; // chars.pk3 - mainwads++; // maps.pk3 - mainwads++; // followers.pk3 + mainwads++; // maps.kart + //mainwads++; // followers.pk3 #ifdef USE_PATCH_FILE mainwads++; // patch.pk3 #endif diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 6f3e3d8f8..e464bba6a 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -3832,10 +3832,7 @@ static void Command_Login_f(void) boolean IsPlayerAdmin(INT32 playernum) { -#if defined (TESTERS) || defined (HOSTTESTERS) - (void)playernum; - return false; -#elif defined (DEVELOP) +#if defined (DEVELOP) return playernum != serverplayer; #else INT32 i; @@ -4336,7 +4333,6 @@ static void Got_RunSOCcmd(UINT8 **cp, INT32 playernum) */ static void Command_Addfile(void) { -#ifndef TESTERS size_t argc = COM_Argc(); // amount of arguments total size_t curarg; // current argument index @@ -4473,7 +4469,6 @@ static void Command_Addfile(void) else SendNetXCmd(XD_ADDFILE, buf, buf_p - buf); } -#endif/*TESTERS*/ } static void Got_RequestAddfilecmd(UINT8 **cp, INT32 playernum) @@ -4778,11 +4773,7 @@ static void Command_Version_f(void) #endif // DEVELOP build -#if defined(TESTERS) - CONS_Printf("\x88" "TESTERS " "\x80"); -#elif defined(HOSTTESTERS) - CONS_Printf("\x82" "HOSTTESTERS " "\x80"); -#elif defined(DEVELOP) +#if defined(DEVELOP) CONS_Printf("\x87" "DEVELOP " "\x80"); #endif diff --git a/src/d_netfil.c b/src/d_netfil.c index ee75f8efd..bc5f206ce 100644 --- a/src/d_netfil.c +++ b/src/d_netfil.c @@ -288,16 +288,11 @@ boolean CL_CheckDownloadable(void) } // Downloading locally disabled -#ifndef TESTERS if (!dlstatus && M_CheckParm("-nodownload")) dlstatus = 3; if (!dlstatus) return true; -#else - if (!dlstatus) - dlstatus = 3; -#endif // not downloadable, put reason in console CONS_Alert(CONS_NOTICE, M_GetText("You need additional files to connect to this server:\n")); @@ -1320,13 +1315,14 @@ void PT_FileFragment(void) nameonly(filename); if (!strcmp(filename, "main.pk3") - || !strcmp(filename, "gfx.pk3") - || !strcmp(filename, "textures.pk3") + || !strcmp(filename, "srb2.srb") + || !strcmp(filename, "gfx.kart") + || !strcmp(filename, "textures.kart") || !strcmp(filename, "chars.pk3") - || !strcmp(filename, "maps.pk3") + || !strcmp(filename, "maps.kart") || !strcmp(filename, "patch.pk3") - || !strcmp(filename, "sounds.pk3") - || !strcmp(filename, "music.pk3") + || !strcmp(filename, "sounds.kart") + || !strcmp(filename, "music.kart") ) { I_Error("Tried to download \"%s\"", filename); diff --git a/src/doomdef.h b/src/doomdef.h index 49121447a..40280e4a5 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -108,7 +108,7 @@ extern "C" { #endif -//#define NOMD5 +#define NOMD5 // Uncheck this to compile debugging code //#define RANGECHECK diff --git a/src/g_demo.c b/src/g_demo.c index de6077cbf..33ea2a84d 100644 --- a/src/g_demo.c +++ b/src/g_demo.c @@ -53,13 +53,8 @@ #include "k_color.h" #include "k_follower.h" -#ifdef TESTERS -static CV_PossibleValue_t recordmultiplayerdemos_cons_t[] = {{2, "Auto Save"}, {0, NULL}}; -consvar_t cv_recordmultiplayerdemos = CVAR_INIT ("netdemo_record", "Auto Save", CV_SAVE, recordmultiplayerdemos_cons_t, NULL); -#else static CV_PossibleValue_t recordmultiplayerdemos_cons_t[] = {{0, "Disabled"}, {1, "Manual Save"}, {2, "Auto Save"}, {0, NULL}}; consvar_t cv_recordmultiplayerdemos = CVAR_INIT ("netdemo_record", "Manual Save", CV_SAVE, recordmultiplayerdemos_cons_t, NULL); -#endif static CV_PossibleValue_t netdemosyncquality_cons_t[] = {{1, "MIN"}, {35, "MAX"}, {0, NULL}}; consvar_t cv_netdemosyncquality = CVAR_INIT ("netdemo_syncquality", "1", CV_SAVE, netdemosyncquality_cons_t, NULL); diff --git a/src/m_cheat.c b/src/m_cheat.c index 7db86b13f..3425e361f 100644 --- a/src/m_cheat.c +++ b/src/m_cheat.c @@ -78,7 +78,7 @@ static UINT8 cheatf_warp(void) boolean success = false; /*if (modifiedgame) - return 0;*/ + * return 0;*/ if (menuactive && currentMenu != &MainDef) return 0; // Only on the main menu! @@ -257,9 +257,9 @@ boolean cht_Responder(event_t *ev) //ret += cht_CheckCheat(&cheat_ultimate_joy, (char)ch); ret += cht_CheckCheat(&cheat_warp, (char)ch); ret += cht_CheckCheat(&cheat_warp_joy, (char)ch); -#ifdef DEVELOP + #ifdef DEVELOP ret += cht_CheckCheat(&cheat_devmode, (char)ch); -#endif + #endif return (ret != 0); } diff --git a/src/m_cond.c b/src/m_cond.c index 275d11c12..8320607e0 100644 --- a/src/m_cond.c +++ b/src/m_cond.c @@ -160,7 +160,21 @@ extraemblem_t extraemblems[MAXEXTRAEMBLEMS] = }; // Unlockables -unlockable_t unlockables[MAXUNLOCKABLES]; +// Default Unlockables +unlockable_t unlockables[MAXUNLOCKABLES] = +{ + // Name, Objective, Showing Conditionset, ConditionSet, Unlock Type, Variable, NoCecho, NoChecklist + /* 01 */ {"Egg Cup", "", -1, 1, SECRET_NONE, 0, false, false, 0}, + /* 02 */ {"Chao Cup", "", -1, 2, SECRET_NONE, 0, false, false, 0}, + /* 03 */ {"SMK Cup", "", 2, 3, SECRET_NONE, 0, false, false, 0}, + + /* 04 */ {"Hard Game Speed", "", -1, 4, SECRET_HARDSPEED, 0, false, false, 0}, + /* 05 */ {"Encore Mode", "", 4, 5, SECRET_ENCORE, 0, false, false, 0}, + /* 06 */ {"Hell Attack", "", 6, 6, SECRET_HELLATTACK, 0, false, false, 0}, + + /* 07 */ {"Record Attack", "", -1, -1, SECRET_TIMEATTACK, 0, true, true, 0}, + /* 08 */ {"Capsule Attack", "", -1, -1, SECRET_BREAKTHECAPSULES, 0, true, true, 0}, +}; // Number of emblems and extra emblems INT32 numemblems = 110; diff --git a/src/m_menu.c b/src/m_menu.c index ffe09f6d1..25832dfdb 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -105,7 +105,7 @@ int snprintf(char *str, size_t n, const char *fmt, ...); #define SLIDER_WIDTH (8*SLIDER_RANGE+6) #define SERVERS_PER_PAGE 11 -#if defined (NONET) || defined (TESTERS) +#if defined (NONET) #define NOMENUHOST #endif @@ -236,9 +236,7 @@ static char *M_GetConditionString(condition_t cond); menu_t SR_MainDef, SR_UnlockChecklistDef; // Misc. Main Menu -#ifndef TESTERS static void M_SinglePlayerMenu(INT32 choice); -#endif static void M_Options(INT32 choice); static void M_Manual(INT32 choice); static void M_SelectableClearMenus(INT32 choice); @@ -278,17 +276,13 @@ static menu_t SP_TimeAttackDef, SP_ReplayDef, SP_GuestReplayDef, SP_GhostDef; // Multiplayer #ifndef NONET -#ifndef TESTERS static void M_StartServerMenu(INT32 choice); -#endif static void M_ConnectMenu(INT32 choice); static void M_ConnectMenuModChecks(INT32 choice); static void M_Refresh(INT32 choice); static void M_Connect(INT32 choice); #endif -#ifndef TESTERS static void M_StartOfflineServerMenu(INT32 choice); -#endif static void M_StartServer(INT32 choice); static void M_SetupMultiPlayer(INT32 choice); static void M_SetupMultiPlayer2(INT32 choice); @@ -517,11 +511,7 @@ static consvar_t cv_dummygpcup = CVAR_INIT ("dummygpcup", "TEMP", CV_HIDEN, dumm static menuitem_t MainMenu[] = { {IT_SUBMENU|IT_STRING, NULL, "Extras", {.submenu = &SR_MainDef}, 76}, -#ifdef TESTERS - {IT_GRAYEDOUT, NULL, "1 Player", {NULL}, 84}, -#else {IT_CALL |IT_STRING, NULL, "1 Player", {.routine = M_SinglePlayerMenu}, 84}, -#endif {IT_SUBMENU|IT_STRING, NULL, "Multiplayer", {.submenu = &MP_MainDef}, 92}, {IT_CALL |IT_STRING, NULL, "Options", {.routine = M_Options}, 100}, /* I don't think is useful at all... */ @@ -788,9 +778,7 @@ static menuitem_t SR_PandorasBox[] = // Sky Room Custom Unlocks static menuitem_t SR_MainMenu[] = { -#ifndef TESTERS {IT_STRING|IT_SUBMENU, NULL, "Unlockables", {.submenu = &SR_UnlockChecklistDef}, 100}, -#endif {IT_CALL|IT_STRING|IT_CALL_NOTMODIFIED, NULL, "Statistics", {.routine = M_Statistics}, 108}, {IT_CALL|IT_STRING, NULL, "Replay Hut", {.routine = M_ReplayHut}, 116}, {IT_DISABLED, NULL, "", {NULL}, 0}, // Custom1 @@ -1027,11 +1015,7 @@ static menuitem_t MP_MainMenu[] = #else {IT_GRAYEDOUT, NULL, "Internet/LAN...", {NULL}, 110-24}, #endif -#ifdef TESTERS - {IT_GRAYEDOUT, NULL, "Offline...", {NULL}, 118-24}, -#else {IT_STRING|IT_CALL, NULL, "Offline...", {.routine = M_StartOfflineServerMenu}, 118-24}, -#endif {IT_HEADER, NULL, "Join a game", {NULL}, 132-24}, #ifndef NONET @@ -3191,13 +3175,7 @@ void M_Drawer(void) else { // Development -- show revision / branch info -#if defined(TESTERS) - addtext(V_ALLOWLOWERCASE|V_SKYMAP, "Tester client"); - addtext(V_ALLOWLOWERCASE|V_TRANSLUCENT, va("%s", compdate)); -#elif defined(HOSTTESTERS) - addtext(V_ALLOWLOWERCASE|V_REDMAP, "Netgame host for testers"); - addtext(V_ALLOWLOWERCASE|V_TRANSLUCENT, va("%s", compdate)); -#elif defined(DEVELOP) +#if defined(DEVELOP) addtext(V_ALLOWLOWERCASE|V_GREENMAP|V_TRANSLUCENT, comprevision); addtext(V_ALLOWLOWERCASE|V_YELLOWMAP|V_TRANSLUCENT, compbranch); V_DrawThinString(0, 0, V_ALLOWLOWERCASE|V_ORANGEMAP|V_TRANSLUCENT|V_SNAPTOTOP, va("%s", complast)); @@ -3247,11 +3225,7 @@ void M_StartControlPanel(void) //MainMenu[secrets].status = (M_AnySecretUnlocked()) ? (IT_STRING | IT_CALL) : (IT_DISABLED); currentMenu = &MainDef; -#ifdef TESTERS - itemOn = multiplr; -#else itemOn = singleplr; -#endif } else if (modeattacking) { @@ -6897,7 +6871,6 @@ static void M_Credits(INT32 choice) // SINGLE PLAYER MENU // ================== -#ifndef TESTERS static void M_SinglePlayerMenu(INT32 choice) { (void)choice; @@ -6910,7 +6883,6 @@ static void M_SinglePlayerMenu(INT32 choice) M_SetupNextMenu(&SP_MainDef); } -#endif /*static void M_LoadGameLevelSelect(INT32 choice) { @@ -9107,7 +9079,6 @@ static void M_MapChange(INT32 choice) M_SetupNextMenu(&MISC_ChangeLevelDef); } -#ifndef TESTERS static void M_StartOfflineServerMenu(INT32 choice) { (void)choice; @@ -9115,10 +9086,8 @@ static void M_StartOfflineServerMenu(INT32 choice) M_PrepareLevelSelect(); M_SetupNextMenu(&MP_OfflineServerDef); } -#endif #ifndef NONET -#ifndef TESTERS static void M_StartServerMenu(INT32 choice) { (void)choice; @@ -9127,7 +9096,6 @@ static void M_StartServerMenu(INT32 choice) M_SetupNextMenu(&MP_ServerDef); } -#endif // ============== // CONNECT VIA IP @@ -9155,12 +9123,10 @@ Update the maxplayers label... ((itemOn == 4) ? highlightflags : 0), "(2-16 players)"); #endif -#ifndef TESTERS V_DrawRightAlignedString(BASEVIDWIDTH-x, y+MP_MainMenu[5].alphaKey, ((itemOn == 5) ? highlightflags : 0), "(2-4 players)" ); -#endif #ifndef NONET y += MP_MainMenu[8].alphaKey; diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index 93c333159..771c94fca 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -2061,13 +2061,10 @@ void I_Error(const char *error, ...) // Shutdown. Here might be other errors. - /* Prevent segmentation fault if testers go to Record Attack... */ -#ifndef TESTERS if (demo.recording) G_CheckDemoStatus(); if (metalrecording) G_StopMetalRecording(false); -#endif D_QuitNetGame(); CL_AbortDownloadResume();