Merge branch 'let-release-build' into 'master'

Various fixes to let release builds compile

See merge request KartKrew/Kart!1448
This commit is contained in:
toaster 2023-09-01 20:45:54 +00:00
commit 1d3a7c717e
8 changed files with 43 additions and 38 deletions

View file

@ -38,6 +38,14 @@
"cacheVariables": {
"SRB2_CONFIG_HOSTTESTERS": "ON"
}
},
{
"name": "release",
"description": "Build for game's release",
"inherits": "default",
"cacheVariables": {
"SRB2_CONFIG_DEV_BUILD": "OFF"
}
}
],
"buildPresets": [

View file

@ -26,20 +26,4 @@
#endif
/* Manually defined asset hashes for non-CMake builds
* Last updated 2019 / 01 / 18 - Kart v1.0.2 - Main assets
* Last updated 2020 / 08 / 30 - Kart v1.3 - patch.kart
*/
#define ASSET_HASH_BIOS_PK3 "00000000000000000000000000000000"
#define ASSET_HASH_GFX_PK3 "00000000000000000000000000000000"
#define ASSET_HASH_TEXTURES_GENERAL_PK3 "00000000000000000000000000000000"
#define ASSET_HASH_TEXTURES_SEGA_PK3 "00000000000000000000000000000000"
#define ASSET_HASH_TEXTURES_ORIGINAL_PK3 "00000000000000000000000000000000"
#define ASSET_HASH_CHARS_PK3 "00000000000000000000000000000000"
#define ASSET_HASH_MAPS_PK3 "00000000000000000000000000000000"
#ifdef USE_PATCH_FILE
#define ASSET_HASH_PATCH_PK3 "00000000000000000000000000000000"
#endif
#endif

View file

@ -533,8 +533,7 @@ consvar_t cv_playbackspeed = Server("playbackspeed", "1").min_max(1, 10).dont_sa
consvar_t cv_reducevfx = Server("reducevfx", "No").yes_no();
void RendezvousServer_OnChange(void);
consvar_t cv_rendezvousserver = Server("holepunchserver", "relay.kartkrew.org").onchange(RendezvousServer_OnChange);
consvar_t cv_rendezvousserver = Server("holepunchserver", "relay.kartkrew.org");
void Update_parameters (void);
consvar_t cv_server_contact = Server("server_contact", "").onchange_noinit(Update_parameters);

View file

@ -4186,9 +4186,11 @@ void CL_RemoveSplitscreenPlayer(UINT8 p)
#ifndef TESTERS
static void GotOurIP(UINT32 address)
{
const unsigned char * p = (const unsigned char *)&address;
#ifdef DEVELOP
{
const unsigned char * p = (const unsigned char *)&address;
CONS_Printf("Got IP of %u.%u.%u.%u\n", p[0], p[1], p[2], p[3]);
}
#endif
ourIP = address;
}

View file

@ -96,6 +96,23 @@
#include "lua_script.h"
/* Manually defined asset hashes
* Last updated 2019 / 01 / 18 - Kart v1.0.2 - Main assets
* Last updated 2020 / 08 / 30 - Kart v1.3 - patch.kart
*/
#define ASSET_HASH_BIOS_PK3 "00000000000000000000000000000000"
#define ASSET_HASH_GFX_PK3 "00000000000000000000000000000000"
#define ASSET_HASH_TEXTURES_GENERAL_PK3 "00000000000000000000000000000000"
#define ASSET_HASH_TEXTURES_SEGA_PK3 "00000000000000000000000000000000"
#define ASSET_HASH_TEXTURES_ORIGINAL_PK3 "00000000000000000000000000000000"
#define ASSET_HASH_CHARS_PK3 "00000000000000000000000000000000"
#define ASSET_HASH_FOLLOWERS_PK3 "00000000000000000000000000000000"
#define ASSET_HASH_MAPS_PK3 "00000000000000000000000000000000"
#ifdef USE_PATCH_FILE
#define ASSET_HASH_PATCH_PK3 "00000000000000000000000000000000"
#endif
// Version numbers for netplay :upside_down_face:
int VERSION;
int SUBVERSION;
@ -1479,18 +1496,18 @@ void D_SRB2Main(void)
mainwads = 0;
#ifndef DEVELOP
#ifdef USE_PATCH_FILE
mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_PATCH_PK3); // patch.pk3
#endif
// Check MD5s of autoloaded files
// Note: Do not add any files that ignore MD5!
W_VerifyFileMD5(mainwads, ASSET_HASH_BIOS_PK3); // bios.pk3
#ifdef USE_PATCH_FILE
mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_PATCH_PK3); // patch.pk3
#endif
mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_GFX_PK3); // gfx.pk3
mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_TEXTURES_GENERAL_PK3); // textures_general.pk3
mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_TEXTURES_SEGA_PK3); // textures_segazones.pk3
mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_TEXTURES_ORIGINAL_PK3); // textures_originalzones.pk3
mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_CHARS_PK3); // chars.pk3
mainwads++; W_VerifyFileMd5(mainwads, ASSET_HASH_FOLLOWERS_PK3); // followers.pk3
mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_FOLLOWERS_PK3); // followers.pk3
mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_MAPS_PK3); // maps.pk3
#else
#ifdef USE_PATCH_FILE

View file

@ -616,16 +616,3 @@ void Advertise_OnChange(void)
M_PopupMasterServerRules();
}
#ifdef DEVELOP
void RendezvousServer_OnChange (void);
void RendezvousServer_OnChange (void)
{
consvar_t *cvar = &cv_rendezvousserver;
if (!strcmp(cvar->string, "jart-dev.jameds.org"))
CV_StealthSet(cvar, cvar->defaultvalue);
}
#else
#error "This was an indev thing, remove at release."
#endif

View file

@ -8345,7 +8345,11 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate)
if (mapheaderinfo[gamemap-1])
{
if (encoremode && cv_kartencoremap.value)
if (encoremode
#ifdef DEVELOP
&& cv_kartencoremap.value
#endif
)
{
encoreLump = vres_Find(curmapvirt, "ENCORE");
}

View file

@ -6636,7 +6636,11 @@ void P_InitSpecials(void)
{
mapheader_lighting_t *lighting = &mapheaderinfo[gamemap-1]->lighting;
if (encoremode && cv_kartencoremap.value && mapheaderinfo[gamemap-1]->use_encore_lighting)
if (encoremode
#ifdef DEVELOP
&& cv_kartencoremap.value
#endif
&& mapheaderinfo[gamemap-1]->use_encore_lighting)
{
lighting = &mapheaderinfo[gamemap-1]->lighting_encore;
}