From bc519ad132334b1e764884a468de490c007e4a35 Mon Sep 17 00:00:00 2001 From: Arthur Date: Sat, 31 Dec 2022 22:07:22 -0500 Subject: [PATCH 001/195] Fix for issue #933 - special stage tokens should divert player until after the special stage with a custom exit map --- src/g_game.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/g_game.c b/src/g_game.c index b4a127a73..ab399cfa2 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -4161,7 +4161,7 @@ static void G_DoCompleted(void) { token--; - if (!nextmapoverride) +// if (!nextmapoverride) // Having a token should pull the player into the special stage before going to the overridden map (Issue #933) for (i = 0; i < 7; i++) if (!(emeralds & (1< Date: Sat, 10 Jun 2023 12:12:41 +0200 Subject: [PATCH 002/195] Add absolute z height flag for mapthings in UDMF --- src/doomdata.h | 4 ++++ src/p_mobj.c | 17 +++++++++-------- src/p_mobj.h | 2 +- src/p_setup.c | 2 ++ 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/doomdata.h b/src/doomdata.h index 4c5bdefaf..45cbb2557 100644 --- a/src/doomdata.h +++ b/src/doomdata.h @@ -62,6 +62,10 @@ enum #define MTF_AMBUSH 8 // Do not use bit five or after, as they are used for object z-offsets. +// Unless it's exclusive to UDMF. + +// Flag to use Z as absolute spawn height, ignoring the floor and ceiling. +#define MTF_ABSOLUTEZ 16 #if defined(_MSC_VER) #pragma pack(1) diff --git a/src/p_mobj.c b/src/p_mobj.c index a04351ae7..0622ff601 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -11812,7 +11812,7 @@ void P_MovePlayerToStarpost(INT32 playernum) mapthing_t *huntemeralds[MAXHUNTEMERALDS]; INT32 numhuntemeralds; -fixed_t P_GetMobjSpawnHeight(const mobjtype_t mobjtype, const fixed_t x, const fixed_t y, const fixed_t dz, const fixed_t offset, const boolean flip, const fixed_t scale) +fixed_t P_GetMobjSpawnHeight(const mobjtype_t mobjtype, const fixed_t x, const fixed_t y, const fixed_t dz, const fixed_t offset, const boolean flip, const fixed_t scale, const boolean absolutez) { const subsector_t *ss = R_PointInSubsector(x, y); @@ -11822,9 +11822,9 @@ fixed_t P_GetMobjSpawnHeight(const mobjtype_t mobjtype, const fixed_t x, const f // Establish height. if (flip) - return P_GetSectorCeilingZAt(ss->sector, x, y) - dz - FixedMul(scale, offset + mobjinfo[mobjtype].height); + return (absolutez ? dz : P_GetSectorCeilingZAt(ss->sector, x, y) - dz) - FixedMul(scale, offset + mobjinfo[mobjtype].height); else - return P_GetSectorFloorZAt(ss->sector, x, y) + dz + FixedMul(scale, offset); + return (absolutez ? dz : P_GetSectorFloorZAt(ss->sector, x, y) + dz) + FixedMul(scale, offset); } fixed_t P_GetMapThingSpawnHeight(const mobjtype_t mobjtype, const mapthing_t* mthing, const fixed_t x, const fixed_t y) @@ -11832,6 +11832,7 @@ fixed_t P_GetMapThingSpawnHeight(const mobjtype_t mobjtype, const mapthing_t* mt fixed_t dz = mthing->z << FRACBITS; // Base offset from the floor. fixed_t offset = 0; // Specific scaling object offset. boolean flip = (!!(mobjinfo[mobjtype].flags & MF_SPAWNCEILING) ^ !!(mthing->options & MTF_OBJECTFLIP)); + boolean absolutez = !!(mthing->options & MTF_ABSOLUTEZ); switch (mobjtype) { @@ -11887,7 +11888,7 @@ fixed_t P_GetMapThingSpawnHeight(const mobjtype_t mobjtype, const mapthing_t* mt offset += mthing->args[0] ? 0 : 24*FRACUNIT; } - if (!(dz + offset)) // Snap to the surfaces when there's no offset set. + if (!(dz + offset) && !absolutez) // Snap to the surfaces when there's no offset set. { if (flip) return ONCEILINGZ; @@ -11895,7 +11896,7 @@ fixed_t P_GetMapThingSpawnHeight(const mobjtype_t mobjtype, const mapthing_t* mt return ONFLOORZ; } - return P_GetMobjSpawnHeight(mobjtype, x, y, dz, offset, flip, mthing->scale); + return P_GetMobjSpawnHeight(mobjtype, x, y, dz, offset, flip, mthing->scale, absolutez); } static boolean P_SpawnNonMobjMapThing(mapthing_t *mthing) @@ -13389,7 +13390,7 @@ void P_SpawnHoop(mapthing_t *mthing) vector4_t v, res; fixed_t x = mthing->x << FRACBITS; fixed_t y = mthing->y << FRACBITS; - fixed_t z = P_GetMobjSpawnHeight(MT_HOOP, x, y, mthing->z << FRACBITS, 0, false, mthing->scale); + fixed_t z = P_GetMobjSpawnHeight(MT_HOOP, x, y, mthing->z << FRACBITS, 0, false, mthing->scale, !!(mthing->options & MTF_ABSOLUTEZ)); hoopcenter = P_SpawnMobj(x, y, z, MT_HOOPCENTER); hoopcenter->spawnpoint = mthing; @@ -13516,7 +13517,7 @@ static void P_SpawnItemRow(mapthing_t *mthing, mobjtype_t *itemtypes, UINT8 numi itemtypes[r] = P_GetMobjtypeSubstitute(&dummything, itemtypes[r]); } } - z = P_GetMobjSpawnHeight(itemtypes[0], x, y, z, 0, mthing->options & MTF_OBJECTFLIP, mthing->scale); + z = P_GetMobjSpawnHeight(itemtypes[0], x, y, z, 0, mthing->options & MTF_OBJECTFLIP, mthing->scale, !!(mthing->options & MTF_ABSOLUTEZ)); for (r = 0; r < numitems; r++) { @@ -13575,7 +13576,7 @@ static void P_SpawnItemCircle(mapthing_t *mthing, mobjtype_t *itemtypes, UINT8 n itemtypes[i] = P_GetMobjtypeSubstitute(&dummything, itemtypes[i]); } } - z = P_GetMobjSpawnHeight(itemtypes[0], x, y, z, 0, false, mthing->scale); + z = P_GetMobjSpawnHeight(itemtypes[0], x, y, z, 0, false, mthing->scale, !!(mthing->options & MTF_ABSOLUTEZ)); for (i = 0; i < numitems; i++) { diff --git a/src/p_mobj.h b/src/p_mobj.h index 6717c4add..d7d660078 100644 --- a/src/p_mobj.h +++ b/src/p_mobj.h @@ -489,7 +489,7 @@ void P_MovePlayerToSpawn(INT32 playernum, mapthing_t *mthing); void P_MovePlayerToStarpost(INT32 playernum); void P_AfterPlayerSpawn(INT32 playernum); -fixed_t P_GetMobjSpawnHeight(const mobjtype_t mobjtype, const fixed_t x, const fixed_t y, const fixed_t dz, const fixed_t offset, const boolean flip, const fixed_t scale); +fixed_t P_GetMobjSpawnHeight(const mobjtype_t mobjtype, const fixed_t x, const fixed_t y, const fixed_t dz, const fixed_t offset, const boolean flip, const fixed_t scale, const boolean absolutez); fixed_t P_GetMapThingSpawnHeight(const mobjtype_t mobjtype, const mapthing_t* mthing, const fixed_t x, const fixed_t y); mobj_t *P_SpawnMapThing(mapthing_t *mthing); diff --git a/src/p_setup.c b/src/p_setup.c index 74645e877..167e1baac 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -1916,6 +1916,8 @@ static void ParseTextmapThingParameter(UINT32 i, const char *param, const char * // Flags else if (fastcmp(param, "flip") && fastcmp("true", val)) mapthings[i].options |= MTF_OBJECTFLIP; + else if (fastcmp(param, "absolutez") && fastcmp("true", val)) + mapthings[i].options |= MTF_ABSOLUTEZ; else if (fastncmp(param, "stringarg", 9) && strlen(param) > 9) { From f416c6a98d78cefc6acd9d94396ce9e438f784c3 Mon Sep 17 00:00:00 2001 From: spherallic Date: Sun, 11 Jun 2023 12:42:10 +0200 Subject: [PATCH 003/195] Add absolute Z flag to MAPTHINGFLAG_LIST --- src/deh_lua.c | 4 ++-- src/deh_tables.c | 5 +++-- src/deh_tables.h | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/deh_lua.c b/src/deh_lua.c index 6dabb7e2d..a8bc63377 100644 --- a/src/deh_lua.c +++ b/src/deh_lua.c @@ -271,8 +271,8 @@ static int ScanConstants(lua_State *L, boolean mathlib, const char *word) } else if (fastncmp("MTF_", word, 4)) { p = word+4; - for (i = 0; i < 4; i++) - if (MAPTHINGFLAG_LIST[i] && fastcmp(p, MAPTHINGFLAG_LIST[i])) { + for (i = 0; MAPTHINGFLAG_LIST[i]; i++) + if (fastcmp(p, MAPTHINGFLAG_LIST[i])) { CacheAndPushConstant(L, word, ((lua_Integer)1< \t"\1", // \2 extern const char *const MOBJEFLAG_LIST[]; -extern const char *const MAPTHINGFLAG_LIST[4]; +extern const char *const MAPTHINGFLAG_LIST[]; extern const char *const PLAYERFLAG_LIST[]; extern const char *const GAMETYPERULE_LIST[]; extern const char *const ML_LIST[]; // Linedef flags From 90d95d13057a24b1556dd43fa02dd8b78a8a0b7f Mon Sep 17 00:00:00 2001 From: spherallic Date: Sun, 11 Jun 2023 13:40:18 +0200 Subject: [PATCH 004/195] Clean options field of binary-converted things --- src/p_mobj.c | 6 +++--- src/p_setup.c | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index 0622ff601..b7295da4c 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -13390,7 +13390,7 @@ void P_SpawnHoop(mapthing_t *mthing) vector4_t v, res; fixed_t x = mthing->x << FRACBITS; fixed_t y = mthing->y << FRACBITS; - fixed_t z = P_GetMobjSpawnHeight(MT_HOOP, x, y, mthing->z << FRACBITS, 0, false, mthing->scale, !!(mthing->options & MTF_ABSOLUTEZ)); + fixed_t z = P_GetMobjSpawnHeight(MT_HOOP, x, y, mthing->z << FRACBITS, 0, false, mthing->scale, mthing->options & MTF_ABSOLUTEZ); hoopcenter = P_SpawnMobj(x, y, z, MT_HOOPCENTER); hoopcenter->spawnpoint = mthing; @@ -13517,7 +13517,7 @@ static void P_SpawnItemRow(mapthing_t *mthing, mobjtype_t *itemtypes, UINT8 numi itemtypes[r] = P_GetMobjtypeSubstitute(&dummything, itemtypes[r]); } } - z = P_GetMobjSpawnHeight(itemtypes[0], x, y, z, 0, mthing->options & MTF_OBJECTFLIP, mthing->scale, !!(mthing->options & MTF_ABSOLUTEZ)); + z = P_GetMobjSpawnHeight(itemtypes[0], x, y, z, 0, mthing->options & MTF_OBJECTFLIP, mthing->scale, mthing->options & MTF_ABSOLUTEZ); for (r = 0; r < numitems; r++) { @@ -13576,7 +13576,7 @@ static void P_SpawnItemCircle(mapthing_t *mthing, mobjtype_t *itemtypes, UINT8 n itemtypes[i] = P_GetMobjtypeSubstitute(&dummything, itemtypes[i]); } } - z = P_GetMobjSpawnHeight(itemtypes[0], x, y, z, 0, false, mthing->scale, !!(mthing->options & MTF_ABSOLUTEZ)); + z = P_GetMobjSpawnHeight(itemtypes[0], x, y, z, 0, false, mthing->scale, mthing->options & MTF_ABSOLUTEZ); for (i = 0; i < numitems; i++) { diff --git a/src/p_setup.c b/src/p_setup.c index 167e1baac..482330599 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -6681,7 +6681,6 @@ static void P_ConvertBinaryThingTypes(void) break; case 1704: //NiGHTS bumper mapthings[i].pitch = 30 * (((mapthings[i].options & 15) + 9) % 12); - mapthings[i].options &= ~0xF; break; case 1705: //Hoop case 1713: //Hoop (Customizable) @@ -6690,7 +6689,6 @@ static void P_ConvertBinaryThingTypes(void) mapthings[i].angle = (mapthings[i].extrainfo == 1) ? oldangle - 90 : ((oldangle >> 8)*360)/256; mapthings[i].pitch = (mapthings[i].extrainfo == 1) ? oldangle / 360 : ((oldangle & 255)*360)/256; mapthings[i].args[0] = (mapthings[i].type == 1705) ? 96 : (mapthings[i].options & 0xF)*16 + 32; - mapthings[i].options &= ~0xF; mapthings[i].type = 1713; break; } @@ -6718,6 +6716,9 @@ static void P_ConvertBinaryThingTypes(void) default: break; } + + // Clear binary thing height hacks, to prevent interfering with UDMF-only flags + mapthings[i].options &= 8; } } From 056d3dcf31ea2c7443b27eaf6982eda9f63d243f Mon Sep 17 00:00:00 2001 From: spherallic Date: Sun, 11 Jun 2023 17:15:36 +0200 Subject: [PATCH 005/195] Actually clear options field properly --- src/p_setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_setup.c b/src/p_setup.c index 482330599..66d7bff42 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -6718,7 +6718,7 @@ static void P_ConvertBinaryThingTypes(void) } // Clear binary thing height hacks, to prevent interfering with UDMF-only flags - mapthings[i].options &= 8; + mapthings[i].options &= 0xF; } } From 8f75141c0779c6ec6e8ee91dc796341029f691e8 Mon Sep 17 00:00:00 2001 From: spherallic Date: Thu, 6 Jul 2023 12:38:02 +0200 Subject: [PATCH 006/195] Give drop shadows to weapon rings & panels --- src/p_mobj.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/p_mobj.c b/src/p_mobj.c index a43afc9b1..44140042e 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -10581,6 +10581,8 @@ static fixed_t P_DefaultMobjShadowScale (mobj_t *thing) if (thing->flags & (MF_ENEMY|MF_BOSS)) return FRACUNIT; + else if (P_WeaponOrPanel(thing->type)) + return 2*FRACUNIT/3; else return 0; } From 73ded4787c9c2c5d529917ab456510e9f32fa6a6 Mon Sep 17 00:00:00 2001 From: spherallic Date: Tue, 11 Jul 2023 19:00:47 +0200 Subject: [PATCH 007/195] Fix ammo/panel/emerald hitboxes, add shadows to thrown rings --- src/info.c | 38 +++++++++++++++++++------------------- src/p_mobj.c | 25 +++++++++++++++++++++++-- 2 files changed, 42 insertions(+), 21 deletions(-) diff --git a/src/info.c b/src/info.c index abcf4b499..eab6ac82a 100644 --- a/src/info.c +++ b/src/info.c @@ -7194,7 +7194,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = sfx_cgot, // deathsound EMERALD1, // speed 16*FRACUNIT, // radius - 32*FRACUNIT, // height + 24*FRACUNIT, // height 0, // display offset 16, // mass 0, // damage @@ -7220,7 +7220,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = sfx_cgot, // deathsound EMERALD2, // speed 16*FRACUNIT, // radius - 32*FRACUNIT, // height + 24*FRACUNIT, // height 0, // display offset 16, // mass 0, // damage @@ -7246,7 +7246,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = sfx_cgot, // deathsound EMERALD3, // speed 16*FRACUNIT, // radius - 32*FRACUNIT, // height + 24*FRACUNIT, // height 0, // display offset 16, // mass 0, // damage @@ -7272,7 +7272,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = sfx_cgot, // deathsound EMERALD4, // speed 16*FRACUNIT, // radius - 32*FRACUNIT, // height + 24*FRACUNIT, // height 0, // display offset 16, // mass 0, // damage @@ -7298,7 +7298,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = sfx_cgot, // deathsound EMERALD5, // speed 16*FRACUNIT, // radius - 32*FRACUNIT, // height + 24*FRACUNIT, // height 0, // display offset 16, // mass 0, // damage @@ -7324,7 +7324,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = sfx_cgot, // deathsound EMERALD6, // speed 16*FRACUNIT, // radius - 32*FRACUNIT, // height + 24*FRACUNIT, // height 0, // display offset 16, // mass 0, // damage @@ -7350,7 +7350,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = sfx_cgot, // deathsound EMERALD7, // speed 16*FRACUNIT, // radius - 32*FRACUNIT, // height + 24*FRACUNIT, // height 0, // display offset 16, // mass 0, // damage @@ -18344,7 +18344,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_NULL, // xdeathstate sfx_itemup, // deathsound 60*FRACUNIT, // speed - 24*FRACUNIT, // radius + 16*FRACUNIT, // radius 24*FRACUNIT, // height 0, // display offset pw_bouncering, // mass @@ -18371,7 +18371,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_NULL, // xdeathstate sfx_itemup, // deathsound 60*FRACUNIT, // speed - 24*FRACUNIT, // radius + 16*FRACUNIT, // radius 24*FRACUNIT, // height 0, // display offset pw_railring, // mass @@ -18425,7 +18425,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_NULL, // xdeathstate sfx_itemup, // deathsound 60*FRACUNIT, // speed - 24*FRACUNIT, // radius + 16*FRACUNIT, // radius 24*FRACUNIT, // height 0, // display offset pw_automaticring, // mass @@ -18452,7 +18452,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_NULL, // xdeathstate sfx_itemup, // deathsound 60*FRACUNIT, // speed - 24*FRACUNIT, // radius + 16*FRACUNIT, // radius 24*FRACUNIT, // height 0, // display offset pw_explosionring, // mass @@ -18479,7 +18479,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_NULL, // xdeathstate sfx_itemup, // deathsound 60*FRACUNIT, // speed - 24*FRACUNIT, // radius + 16*FRACUNIT, // radius 24*FRACUNIT, // height 0, // display offset pw_scatterring, // mass @@ -18506,7 +18506,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_NULL, // xdeathstate sfx_itemup, // deathsound 60*FRACUNIT, // speed - 24*FRACUNIT, // radius + 16*FRACUNIT, // radius 24*FRACUNIT, // height 0, // display offset pw_grenadering, // mass @@ -18535,7 +18535,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = sfx_ncitem, // deathsound 60*FRACUNIT, // speed 24*FRACUNIT, // radius - 24*FRACUNIT, // height + 40*FRACUNIT, // height 0, // display offset pw_bouncering, // mass 2*TICRATE, // damage @@ -18562,7 +18562,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = sfx_ncitem, // deathsound 60*FRACUNIT, // speed 24*FRACUNIT, // radius - 24*FRACUNIT, // height + 40*FRACUNIT, // height 0, // display offset pw_railring, // mass 2*TICRATE, // damage @@ -18589,7 +18589,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = sfx_ncitem, // deathsound 60*FRACUNIT, // speed 24*FRACUNIT, // radius - 24*FRACUNIT, // height + 40*FRACUNIT, // height 0, // display offset pw_automaticring, // mass 2*TICRATE, // damage @@ -18616,7 +18616,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = sfx_ncitem, // deathsound 60*FRACUNIT, // speed 24*FRACUNIT, // radius - 24*FRACUNIT, // height + 40*FRACUNIT, // height 0, // display offset pw_explosionring, // mass 2*TICRATE, // damage @@ -18643,7 +18643,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = sfx_ncitem, // deathsound 60*FRACUNIT, // speed 24*FRACUNIT, // radius - 24*FRACUNIT, // height + 40*FRACUNIT, // height 0, // display offset pw_scatterring, // mass 2*TICRATE, // damage @@ -18670,7 +18670,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = sfx_ncitem, // deathsound 60*FRACUNIT, // speed 24*FRACUNIT, // radius - 24*FRACUNIT, // height + 40*FRACUNIT, // height 0, // display offset pw_grenadering, // mass 2*TICRATE, // damage diff --git a/src/p_mobj.c b/src/p_mobj.c index 44140042e..152513d1b 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -10541,6 +10541,29 @@ static fixed_t P_DefaultMobjShadowScale (mobj_t *thing) case MT_REDFLAG: case MT_BLUEFLAG: + case MT_BOUNCERING: + case MT_AUTOMATICRING: + case MT_INFINITYRING: + case MT_RAILRING: + case MT_EXPLOSIONRING: + case MT_SCATTERRING: + case MT_GRENADERING: + + case MT_BOUNCEPICKUP: + case MT_RAILPICKUP: + case MT_AUTOPICKUP: + case MT_EXPLODEPICKUP: + case MT_SCATTERPICKUP: + case MT_GRENADEPICKUP: + + case MT_REDRING: + case MT_THROWNBOUNCE: + case MT_THROWNINFINITY: + case MT_THROWNAUTOMATIC: + case MT_THROWNSCATTER: + case MT_THROWNEXPLOSION: + case MT_THROWNGRENADE: + case MT_EMBLEM: case MT_TOKEN: @@ -10581,8 +10604,6 @@ static fixed_t P_DefaultMobjShadowScale (mobj_t *thing) if (thing->flags & (MF_ENEMY|MF_BOSS)) return FRACUNIT; - else if (P_WeaponOrPanel(thing->type)) - return 2*FRACUNIT/3; else return 0; } From 28849c31a8bed7854f1f28cdd37cb3fad0623287 Mon Sep 17 00:00:00 2001 From: spherallic Date: Sat, 15 Jul 2023 11:26:13 +0200 Subject: [PATCH 008/195] Update (U)ZB config with hitbox tweaks --- extras/conf/SRB2-22.cfg | 15 ++++++++++----- extras/conf/udb/Includes/SRB222_things.cfg | 21 ++++++++++++++++----- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/extras/conf/SRB2-22.cfg b/extras/conf/SRB2-22.cfg index dd5cdb46b..bcb6e6241 100644 --- a/extras/conf/SRB2-22.cfg +++ b/extras/conf/SRB2-22.cfg @@ -4367,7 +4367,6 @@ thingtypes { color = 14; // Yellow title = "Rings and Weapon Panels"; - width = 24; height = 24; flags8height = 24; flags8text = "[8] Float"; @@ -4377,7 +4376,6 @@ thingtypes { title = "Ring"; sprite = "RINGA0"; - width = 16; } 301 { @@ -4393,6 +4391,7 @@ thingtypes { title = "Infinity Ring"; sprite = "RNGIA0"; + width = 24; } 304 { @@ -4418,43 +4417,48 @@ thingtypes { title = "CTF Team Ring (Red)"; sprite = "internal:TRNGA0R"; - width = 16; } 309 { title = "CTF Team Ring (Blue)"; sprite = "internal:TRNGA0B"; - width = 16; } 330 { title = "Bounce Ring Panel"; sprite = "PIKBA0"; + width = 24; + height = 40; } 331 { title = "Rail Ring Panel"; sprite = "PIKRA0"; + width = 24; } 332 { title = "Automatic Ring Panel"; sprite = "PIKAA0"; + width = 24; } 333 { title = "Explosion Ring Panel"; sprite = "PIKEA0"; + width = 24; } 334 { title = "Scatter Ring Panel"; sprite = "PIKSA0"; + width = 24; } 335 { title = "Grenade Ring Panel"; sprite = "PIKGA0"; + width = 24; } } @@ -4463,7 +4467,7 @@ thingtypes color = 10; // Light Green title = "Other Collectibles"; width = 16; - height = 32; + height = 24; sort = 1; sprite = "CEMGA0"; @@ -4529,6 +4533,7 @@ thingtypes { title = "Emerald Hunt Location"; sprite = "SHRDA0"; + height = 32; flags8height = 24; flags8text = "[8] Float"; } diff --git a/extras/conf/udb/Includes/SRB222_things.cfg b/extras/conf/udb/Includes/SRB222_things.cfg index df08e3ac5..9eb227974 100644 --- a/extras/conf/udb/Includes/SRB222_things.cfg +++ b/extras/conf/udb/Includes/SRB222_things.cfg @@ -1185,7 +1185,7 @@ udmf { color = 14; // Yellow title = "Rings and Weapon Panels"; - width = 24; + width = 16; height = 24; sprite = "RINGA0"; @@ -1193,7 +1193,6 @@ udmf { title = "Ring"; sprite = "RINGA0"; - width = 16; arg0 { title = "Float?"; @@ -1227,6 +1226,7 @@ udmf { title = "Infinity Ring"; sprite = "RNGIA0"; + width = 24; arg0 { title = "Float?"; @@ -1282,7 +1282,6 @@ udmf { title = "CTF Team Ring (Red)"; sprite = "internal:TRNGA0R"; - width = 16; arg0 { title = "Float?"; @@ -1294,7 +1293,6 @@ udmf { title = "CTF Team Ring (Blue)"; sprite = "internal:TRNGA0B"; - width = 16; arg0 { title = "Float?"; @@ -1306,6 +1304,8 @@ udmf { title = "Bounce Ring Panel"; sprite = "PIKBA0"; + width = 24; + height = 40; arg0 { title = "Float?"; @@ -1317,6 +1317,8 @@ udmf { title = "Rail Ring Panel"; sprite = "PIKRA0"; + width = 24; + height = 40; arg0 { title = "Float?"; @@ -1328,6 +1330,8 @@ udmf { title = "Automatic Ring Panel"; sprite = "PIKAA0"; + width = 24; + height = 40; arg0 { title = "Float?"; @@ -1339,6 +1343,8 @@ udmf { title = "Explosion Ring Panel"; sprite = "PIKEA0"; + width = 24; + height = 40; arg0 { title = "Float?"; @@ -1350,6 +1356,8 @@ udmf { title = "Scatter Ring Panel"; sprite = "PIKSA0"; + width = 24; + height = 40; arg0 { title = "Float?"; @@ -1361,6 +1369,8 @@ udmf { title = "Grenade Ring Panel"; sprite = "PIKGA0"; + width = 24; + height = 40; arg0 { title = "Float?"; @@ -1375,7 +1385,7 @@ udmf color = 10; // Light_Green title = "Other Collectibles"; width = 16; - height = 32; + height = 24; sort = 1; sprite = "CEMGA0"; @@ -1445,6 +1455,7 @@ udmf { title = "Emerald Hunt Location"; sprite = "SHRDA0"; + height = 32; arg0 { title = "Float?"; From c64b242f012adbaa6d3e77070baebbf190313247 Mon Sep 17 00:00:00 2001 From: spherallic Date: Sat, 15 Jul 2023 13:07:55 +0200 Subject: [PATCH 009/195] Note to self: don't do busywork right after waking up from a short night of sleep --- extras/conf/SRB2-22.cfg | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/extras/conf/SRB2-22.cfg b/extras/conf/SRB2-22.cfg index bcb6e6241..41ad99889 100644 --- a/extras/conf/SRB2-22.cfg +++ b/extras/conf/SRB2-22.cfg @@ -4435,30 +4435,35 @@ thingtypes title = "Rail Ring Panel"; sprite = "PIKRA0"; width = 24; + height = 40; } 332 { title = "Automatic Ring Panel"; sprite = "PIKAA0"; width = 24; + height = 40; } 333 { title = "Explosion Ring Panel"; sprite = "PIKEA0"; width = 24; + height = 40; } 334 { title = "Scatter Ring Panel"; sprite = "PIKSA0"; width = 24; + height = 40; } 335 { title = "Grenade Ring Panel"; sprite = "PIKGA0"; width = 24; + height = 40; } } From d01f25d91dff89f318801962f53b8bd966c13078 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustaf=20Alh=C3=A4ll?= Date: Wed, 26 Jul 2023 23:18:07 +0200 Subject: [PATCH 010/195] Fix FreeBSD build errors --- src/Makefile.d/nix.mk | 2 +- src/sdl/i_system.c | 43 ++++++++++--------------------------------- 2 files changed, 11 insertions(+), 34 deletions(-) diff --git a/src/Makefile.d/nix.mk b/src/Makefile.d/nix.mk index 767b64c12..728795771 100644 --- a/src/Makefile.d/nix.mk +++ b/src/Makefile.d/nix.mk @@ -29,7 +29,7 @@ endif # Tested by Steel, as of release 2.2.8. ifdef FREEBSD opts+=-I/usr/X11R6/include -DLINUX -DFREEBSD -libs+=-L/usr/X11R6/lib -lipx -lkvm +libs+=-L/usr/X11R6/lib -lkvm -lexecinfo endif # FIXME: UNTESTED diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index c21226ac3..3616300c1 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -96,7 +96,7 @@ typedef LPVOID (WINAPI *p_MapViewOfFile) (HANDLE, DWORD, DWORD, DWORD, SIZE_T); #include #endif #include -#include +#include #endif #endif @@ -3037,40 +3037,17 @@ static long get_entry(const char* name, const char* buf) size_t I_GetFreeMem(size_t *total) { #ifdef FREEBSD - struct vmmeter sum; - kvm_t *kd; - struct nlist namelist[] = - { -#define X_SUM 0 - {"_cnt"}, - {NULL} - }; - if ((kd = kvm_open(NULL, NULL, NULL, O_RDONLY, "kvm_open")) == NULL) - { - if (total) - *total = 0L; - return 0; - } - if (kvm_nlist(kd, namelist) != 0) - { - kvm_close (kd); - if (total) - *total = 0L; - return 0; - } - if (kvm_read(kd, namelist[X_SUM].n_value, &sum, - sizeof (sum)) != sizeof (sum)) - { - kvm_close(kd); - if (total) - *total = 0L; - return 0; - } - kvm_close(kd); + u_int v_free_count, v_page_size, v_page_count; + size_t size = sizeof(v_free_count); + sysctlbyname("vm.stat.vm.v_free_count", &v_free_count, &size, NULL, 0); + size_t size = sizeof(v_page_size); + sysctlbyname("vm.stat.vm.v_page_size", &v_page_size, &size, NULL, 0); + size_t size = sizeof(v_page_count); + sysctlbyname("vm.stat.vm.v_page_count", &v_page_count, &size, NULL, 0); if (total) - *total = sum.v_page_count * sum.v_page_size; - return sum.v_free_count * sum.v_page_size; + *total = v_page_count * v_page_size; + return v_free_count * v_page_size; #elif defined (SOLARIS) /* Just guess */ if (total) From 97311dc5b00ab232a6e898c085c20d2f6bdbfa3b Mon Sep 17 00:00:00 2001 From: Lactozilla Date: Thu, 27 Jul 2023 19:15:35 -0300 Subject: [PATCH 011/195] Use separate table for maskedtexturecol --- src/r_defs.h | 4 +- src/r_main.c | 1 + src/r_plane.c | 6 - src/r_plane.h | 3 - src/r_segs.c | 729 +++++++++++++++++++++++++------------------------- src/r_segs.h | 1 + 6 files changed, 365 insertions(+), 379 deletions(-) diff --git a/src/r_defs.h b/src/r_defs.h index a9b9a4a08..dfd2d6d70 100644 --- a/src/r_defs.h +++ b/src/r_defs.h @@ -757,12 +757,12 @@ typedef struct drawseg_s // Pointers to lists for sprite clipping, all three adjusted so [x1] is first value. INT16 *sprtopclip; INT16 *sprbottomclip; - INT16 *maskedtexturecol; + fixed_t *maskedtexturecol; struct visplane_s *ffloorplanes[MAXFFLOORS]; INT32 numffloorplanes; struct ffloor_s *thicksides[MAXFFLOORS]; - INT16 *thicksidecol; + fixed_t *thicksidecol; INT32 numthicksides; fixed_t frontscale[MAXVIDWIDTH]; diff --git a/src/r_main.c b/src/r_main.c index 55bb9c4ff..952171405 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -1479,6 +1479,7 @@ void R_RenderPlayerView(player_t *player) R_ClearClipSegs(); } R_ClearDrawSegs(); + R_ClearSegTables(); R_ClearSprites(); Portal_InitList(); diff --git a/src/r_plane.c b/src/r_plane.c index c568484b6..29ce26b29 100644 --- a/src/r_plane.c +++ b/src/r_plane.c @@ -53,10 +53,6 @@ INT32 numffloors; #define visplane_hash(picnum,lightlevel,height) \ ((unsigned)((picnum)*3+(lightlevel)+(height)*7) & VISPLANEHASHMASK) -//SoM: 3/23/2000: Use boom opening limit removal -size_t maxopenings; -INT16 *openings, *lastopening; /// \todo free leak - // // Clip values are the solid pixel bounding the range. // floorclip starts out SCREENHEIGHT @@ -366,8 +362,6 @@ void R_ClearPlanes(void) freehead = &(*freehead)->next; } - lastopening = openings; - // texture calculation memset(cachedheight, 0, sizeof (cachedheight)); } diff --git a/src/r_plane.h b/src/r_plane.h index 9870a43e2..917e8b041 100644 --- a/src/r_plane.h +++ b/src/r_plane.h @@ -60,9 +60,6 @@ extern visplane_t *floorplane; extern visplane_t *ceilingplane; // Visplane related. -extern INT16 *lastopening, *openings; -extern size_t maxopenings; - extern INT16 floorclip[MAXVIDWIDTH], ceilingclip[MAXVIDWIDTH]; extern fixed_t frontscale[MAXVIDWIDTH], yslopetab[MAXVIDHEIGHT*16]; extern fixed_t cachedheight[MAXVIDHEIGHT]; diff --git a/src/r_segs.c b/src/r_segs.c index facab62ab..9ee3bcfec 100644 --- a/src/r_segs.c +++ b/src/r_segs.c @@ -71,9 +71,22 @@ static fixed_t topfrac, topstep; static fixed_t bottomfrac, bottomstep; static lighttable_t **walllights; -static INT16 *maskedtexturecol; +static fixed_t *maskedtexturecol; static fixed_t *maskedtextureheight = NULL; +//SoM: 3/23/2000: Use boom opening limit removal +static size_t numopenings; +static INT16 *openings, *lastopening; + +static size_t texturecolumntablesize; +static fixed_t *texturecolumntable, *curtexturecolumntable; + +void R_ClearSegTables(void) +{ + lastopening = openings; + curtexturecolumntable = texturecolumntable; +} + // ========================================================================== // R_RenderMaskedSegRange // ========================================================================== @@ -350,170 +363,115 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2) dc_texturemid += (textureheight[texnum])*times + textureheight[texnum]; else dc_texturemid -= (textureheight[texnum])*times; - // calculate lighting - if (maskedtexturecol[dc_x] != INT16_MAX) + + // Check for overflows first + overflow_test = (INT64)centeryfrac - (((INT64)dc_texturemid*spryscale)>>FRACBITS); + if (overflow_test < 0) overflow_test = -overflow_test; + if ((UINT64)overflow_test&0xFFFFFFFF80000000ULL) { - // Check for overflows first - overflow_test = (INT64)centeryfrac - (((INT64)dc_texturemid*spryscale)>>FRACBITS); - if (overflow_test < 0) overflow_test = -overflow_test; - if ((UINT64)overflow_test&0xFFFFFFFF80000000ULL) + // Eh, no, go away, don't waste our time + if (dc_numlights) { - // Eh, no, go away, don't waste our time - if (dc_numlights) + for (i = 0; i < dc_numlights; i++) { - for (i = 0; i < dc_numlights; i++) + rlight = &dc_lightlist[i]; + rlight->height += rlight->heightstep; + } + } + spryscale += rw_scalestep; + continue; + } + + // calculate lighting + if (dc_numlights) + { + lighttable_t **xwalllights; + + sprbotscreen = INT32_MAX; + sprtopscreen = windowtop = (centeryfrac - FixedMul(dc_texturemid, spryscale)); + + realbot = windowbottom = FixedMul(textureheight[texnum], spryscale) + sprtopscreen; + dc_iscale = 0xffffffffu / (unsigned)spryscale; + + // draw the texture + col = (column_t *)((UINT8 *)R_GetColumn(texnum, (maskedtexturecol[dc_x] >> FRACBITS)) - 3); + + for (i = 0; i < dc_numlights; i++) + { + rlight = &dc_lightlist[i]; + + if ((rlight->flags & FOF_NOSHADE)) + continue; + + if (rlight->lightnum < 0) + xwalllights = scalelight[0]; + else if (rlight->lightnum >= LIGHTLEVELS) + xwalllights = scalelight[LIGHTLEVELS-1]; + else + xwalllights = scalelight[rlight->lightnum]; + + pindex = FixedMul(spryscale, LIGHTRESOLUTIONFIX)>>LIGHTSCALESHIFT; + + if (pindex >= MAXLIGHTSCALE) + pindex = MAXLIGHTSCALE - 1; + + if (rlight->extra_colormap) + rlight->rcolormap = rlight->extra_colormap->colormap + (xwalllights[pindex] - colormaps); + else + rlight->rcolormap = xwalllights[pindex]; + + height = rlight->height; + rlight->height += rlight->heightstep; + + if (height <= windowtop) + { + dc_colormap = rlight->rcolormap; + continue; + } + + windowbottom = height; + if (windowbottom >= realbot) + { + windowbottom = realbot; + colfunc_2s(col); + for (i++; i < dc_numlights; i++) { rlight = &dc_lightlist[i]; rlight->height += rlight->heightstep; } + + continue; } - spryscale += rw_scalestep; - continue; - } - - if (dc_numlights) - { - lighttable_t **xwalllights; - - sprbotscreen = INT32_MAX; - sprtopscreen = windowtop = (centeryfrac - FixedMul(dc_texturemid, spryscale)); - - realbot = windowbottom = FixedMul(textureheight[texnum], spryscale) + sprtopscreen; - dc_iscale = 0xffffffffu / (unsigned)spryscale; - - // draw the texture - col = (column_t *)((UINT8 *)R_GetColumn(texnum, maskedtexturecol[dc_x]) - 3); - - for (i = 0; i < dc_numlights; i++) - { - rlight = &dc_lightlist[i]; - - if ((rlight->flags & FOF_NOSHADE)) - continue; - - if (rlight->lightnum < 0) - xwalllights = scalelight[0]; - else if (rlight->lightnum >= LIGHTLEVELS) - xwalllights = scalelight[LIGHTLEVELS-1]; - else - xwalllights = scalelight[rlight->lightnum]; - - pindex = FixedMul(spryscale, LIGHTRESOLUTIONFIX)>>LIGHTSCALESHIFT; - - if (pindex >= MAXLIGHTSCALE) - pindex = MAXLIGHTSCALE - 1; - - if (rlight->extra_colormap) - rlight->rcolormap = rlight->extra_colormap->colormap + (xwalllights[pindex] - colormaps); - else - rlight->rcolormap = xwalllights[pindex]; - - height = rlight->height; - rlight->height += rlight->heightstep; - - if (height <= windowtop) - { - dc_colormap = rlight->rcolormap; - continue; - } - - windowbottom = height; - if (windowbottom >= realbot) - { - windowbottom = realbot; - colfunc_2s(col); - for (i++; i < dc_numlights; i++) - { - rlight = &dc_lightlist[i]; - rlight->height += rlight->heightstep; - } - - continue; - } - colfunc_2s(col); - windowtop = windowbottom + 1; - dc_colormap = rlight->rcolormap; - } - windowbottom = realbot; - if (windowtop < windowbottom) - colfunc_2s(col); - - spryscale += rw_scalestep; - continue; - } - - // calculate lighting - pindex = FixedMul(spryscale, LIGHTRESOLUTIONFIX)>>LIGHTSCALESHIFT; - - if (pindex >= MAXLIGHTSCALE) - pindex = MAXLIGHTSCALE - 1; - - dc_colormap = walllights[pindex]; - - if (frontsector->extra_colormap) - dc_colormap = frontsector->extra_colormap->colormap + (dc_colormap - colormaps); - - sprtopscreen = centeryfrac - FixedMul(dc_texturemid, spryscale); - dc_iscale = 0xffffffffu / (unsigned)spryscale; - - // draw the texture - col = (column_t *)((UINT8 *)R_GetColumn(texnum, maskedtexturecol[dc_x]) - 3); - -#if 0 // Disabling this allows inside edges to render below the planes, for until the clipping is fixed to work right when POs are near the camera. -Red - if (curline->dontrenderme && curline->polyseg && (curline->polyseg->flags & POF_RENDERPLANES)) - { - fixed_t my_topscreen; - fixed_t my_bottomscreen; - fixed_t my_yl, my_yh; - - my_topscreen = sprtopscreen + spryscale*col->topdelta; - my_bottomscreen = sprbotscreen == INT32_MAX ? my_topscreen + spryscale*col->length - : sprbotscreen + spryscale*col->length; - - my_yl = (my_topscreen+FRACUNIT-1)>>FRACBITS; - my_yh = (my_bottomscreen-1)>>FRACBITS; - // CONS_Debug(DBG_RENDER, "my_topscreen: %d\nmy_bottomscreen: %d\nmy_yl: %d\nmy_yh: %d\n", my_topscreen, my_bottomscreen, my_yl, my_yh); - - if (numffloors) - { - INT32 top = my_yl; - INT32 bottom = my_yh; - - for (i = 0; i < numffloors; i++) - { - if (!ffloor[i].polyobj || ffloor[i].polyobj != curline->polyseg) - continue; - - if (ffloor[i].height < viewz) - { - INT32 top_w = ffloor[i].plane->top[dc_x]; - - // CONS_Debug(DBG_RENDER, "Leveltime : %d\n", leveltime); - // CONS_Debug(DBG_RENDER, "Top is %d, top_w is %d\n", top, top_w); - if (top_w < top) - { - ffloor[i].plane->top[dc_x] = (INT16)top; - ffloor[i].plane->picnum = 0; - } - // CONS_Debug(DBG_RENDER, "top_w is now %d\n", ffloor[i].plane->top[dc_x]); - } - else if (ffloor[i].height > viewz) - { - INT32 bottom_w = ffloor[i].plane->bottom[dc_x]; - - if (bottom_w > bottom) - { - ffloor[i].plane->bottom[dc_x] = (INT16)bottom; - ffloor[i].plane->picnum = 0; - } - } - } - } - } - else -#endif colfunc_2s(col); + windowtop = windowbottom + 1; + dc_colormap = rlight->rcolormap; + } + windowbottom = realbot; + if (windowtop < windowbottom) + colfunc_2s(col); + + spryscale += rw_scalestep; + continue; } + + // calculate lighting + pindex = FixedMul(spryscale, LIGHTRESOLUTIONFIX)>>LIGHTSCALESHIFT; + + if (pindex >= MAXLIGHTSCALE) + pindex = MAXLIGHTSCALE - 1; + + dc_colormap = walllights[pindex]; + + if (frontsector->extra_colormap) + dc_colormap = frontsector->extra_colormap->colormap + (dc_colormap - colormaps); + + sprtopscreen = centeryfrac - FixedMul(dc_texturemid, spryscale); + dc_iscale = 0xffffffffu / (unsigned)spryscale; + + // draw the texture + col = (column_t *)((UINT8 *)R_GetColumn(texnum, (maskedtexturecol[dc_x] >> FRACBITS)) - 3); + colfunc_2s(col); + spryscale += rw_scalestep; } } @@ -857,183 +815,182 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor) // draw the columns for (dc_x = x1; dc_x <= x2; dc_x++) { - if (maskedtexturecol[dc_x] != INT16_MAX) + // skew FOF walls + if (ffloortextureslide) { - if (ffloortextureslide) { // skew FOF walls - if (oldx != -1) - dc_texturemid += FixedMul(ffloortextureslide, (maskedtexturecol[oldx]-maskedtexturecol[dc_x])< (INT64)CLAMPMAX) sprtopscreen = windowtop = CLAMPMAX; - else if (top_frac > (INT64)CLAMPMIN) sprtopscreen = windowtop = (fixed_t)top_frac; - else sprtopscreen = windowtop = CLAMPMIN; - if (bottom_frac > (INT64)CLAMPMAX) sprbotscreen = windowbottom = CLAMPMAX; - else if (bottom_frac > (INT64)CLAMPMIN) sprbotscreen = windowbottom = (fixed_t)bottom_frac; - else sprbotscreen = windowbottom = CLAMPMIN; + // Calculate bounds + // clamp the values if necessary to avoid overflows and rendering glitches caused by them + if (top_frac > (INT64)CLAMPMAX) sprtopscreen = windowtop = CLAMPMAX; + else if (top_frac > (INT64)CLAMPMIN) sprtopscreen = windowtop = (fixed_t)top_frac; + else sprtopscreen = windowtop = CLAMPMIN; + if (bottom_frac > (INT64)CLAMPMAX) sprbotscreen = windowbottom = CLAMPMAX; + else if (bottom_frac > (INT64)CLAMPMIN) sprbotscreen = windowbottom = (fixed_t)bottom_frac; + else sprbotscreen = windowbottom = CLAMPMIN; - top_frac += top_step; - bottom_frac += bottom_step; + top_frac += top_step; + bottom_frac += bottom_step; - // SoM: If column is out of range, why bother with it?? - if (windowbottom < topbounds || windowtop > bottombounds) + // SoM: If column is out of range, why bother with it?? + if (windowbottom < topbounds || windowtop > bottombounds) + { + if (dc_numlights) { - if (dc_numlights) + for (i = 0; i < dc_numlights; i++) { - for (i = 0; i < dc_numlights; i++) + rlight = &dc_lightlist[i]; + rlight->height += rlight->heightstep; + if (rlight->flags & FOF_CUTLEVEL) + rlight->botheight += rlight->botheightstep; + } + } + spryscale += rw_scalestep; + continue; + } + + dc_iscale = 0xffffffffu / (unsigned)spryscale; + + // Get data for the column + col = (column_t *)((UINT8 *)R_GetColumn(texnum, (maskedtexturecol[dc_x] >> FRACBITS)) - 3); + + // SoM: New code does not rely on R_DrawColumnShadowed_8 which + // will (hopefully) put less strain on the stack. + if (dc_numlights) + { + lighttable_t **xwalllights; + fixed_t height; + fixed_t bheight = 0; + INT32 solid = 0; + INT32 lighteffect = 0; + + for (i = 0; i < dc_numlights; i++) + { + // Check if the current light effects the colormap/lightlevel + rlight = &dc_lightlist[i]; + lighteffect = !(dc_lightlist[i].flags & FOF_NOSHADE); + if (lighteffect) + { + lightnum = rlight->lightnum; + + if (lightnum < 0) + xwalllights = scalelight[0]; + else if (lightnum >= LIGHTLEVELS) + xwalllights = scalelight[LIGHTLEVELS-1]; + else + xwalllights = scalelight[lightnum]; + + pindex = FixedMul(spryscale, LIGHTRESOLUTIONFIX)>>LIGHTSCALESHIFT; + + if (pindex >= MAXLIGHTSCALE) + pindex = MAXLIGHTSCALE-1; + + if (pfloor->fofflags & FOF_FOG) + { + if (pfloor->master->frontsector->extra_colormap) + rlight->rcolormap = pfloor->master->frontsector->extra_colormap->colormap + (xwalllights[pindex] - colormaps); + else + rlight->rcolormap = xwalllights[pindex]; + } + else + { + if (rlight->extra_colormap) + rlight->rcolormap = rlight->extra_colormap->colormap + (xwalllights[pindex] - colormaps); + else + rlight->rcolormap = xwalllights[pindex]; + } + } + + solid = 0; // don't carry over solid-cutting flag from the previous light + + // Check if the current light can cut the current 3D floor. + if (rlight->flags & FOF_CUTSOLIDS && !(pfloor->fofflags & FOF_EXTRA)) + solid = 1; + else if (rlight->flags & FOF_CUTEXTRA && pfloor->fofflags & FOF_EXTRA) + { + if (rlight->flags & FOF_EXTRA) + { + // The light is from an extra 3D floor... Check the flags so + // there are no undesired cuts. + if ((rlight->flags & (FOF_FOG|FOF_SWIMMABLE)) == (pfloor->fofflags & (FOF_FOG|FOF_SWIMMABLE))) + solid = 1; + } + else + solid = 1; + } + else + solid = 0; + + height = rlight->height; + rlight->height += rlight->heightstep; + + if (solid) + { + bheight = rlight->botheight - (FRACUNIT >> 1); + rlight->botheight += rlight->botheightstep; + } + + if (height <= windowtop) + { + if (lighteffect) + dc_colormap = rlight->rcolormap; + if (solid && windowtop < bheight) + windowtop = bheight; + continue; + } + + windowbottom = height; + if (windowbottom >= sprbotscreen) + { + windowbottom = sprbotscreen; + // draw the texture + colfunc_2s (col); + for (i++; i < dc_numlights; i++) { rlight = &dc_lightlist[i]; rlight->height += rlight->heightstep; if (rlight->flags & FOF_CUTLEVEL) rlight->botheight += rlight->botheightstep; } + continue; } - spryscale += rw_scalestep; - continue; + // draw the texture + colfunc_2s (col); + if (solid) + windowtop = bheight; + else + windowtop = windowbottom + 1; + if (lighteffect) + dc_colormap = rlight->rcolormap; } + windowbottom = sprbotscreen; + // draw the texture, if there is any space left + if (windowtop < windowbottom) + colfunc_2s (col); - dc_iscale = 0xffffffffu / (unsigned)spryscale; - - // Get data for the column - col = (column_t *)((UINT8 *)R_GetColumn(texnum,maskedtexturecol[dc_x]) - 3); - - // SoM: New code does not rely on R_DrawColumnShadowed_8 which - // will (hopefully) put less strain on the stack. - if (dc_numlights) - { - lighttable_t **xwalllights; - fixed_t height; - fixed_t bheight = 0; - INT32 solid = 0; - INT32 lighteffect = 0; - - for (i = 0; i < dc_numlights; i++) - { - // Check if the current light effects the colormap/lightlevel - rlight = &dc_lightlist[i]; - lighteffect = !(dc_lightlist[i].flags & FOF_NOSHADE); - if (lighteffect) - { - lightnum = rlight->lightnum; - - if (lightnum < 0) - xwalllights = scalelight[0]; - else if (lightnum >= LIGHTLEVELS) - xwalllights = scalelight[LIGHTLEVELS-1]; - else - xwalllights = scalelight[lightnum]; - - pindex = FixedMul(spryscale, LIGHTRESOLUTIONFIX)>>LIGHTSCALESHIFT; - - if (pindex >= MAXLIGHTSCALE) - pindex = MAXLIGHTSCALE-1; - - if (pfloor->fofflags & FOF_FOG) - { - if (pfloor->master->frontsector->extra_colormap) - rlight->rcolormap = pfloor->master->frontsector->extra_colormap->colormap + (xwalllights[pindex] - colormaps); - else - rlight->rcolormap = xwalllights[pindex]; - } - else - { - if (rlight->extra_colormap) - rlight->rcolormap = rlight->extra_colormap->colormap + (xwalllights[pindex] - colormaps); - else - rlight->rcolormap = xwalllights[pindex]; - } - } - - solid = 0; // don't carry over solid-cutting flag from the previous light - - // Check if the current light can cut the current 3D floor. - if (rlight->flags & FOF_CUTSOLIDS && !(pfloor->fofflags & FOF_EXTRA)) - solid = 1; - else if (rlight->flags & FOF_CUTEXTRA && pfloor->fofflags & FOF_EXTRA) - { - if (rlight->flags & FOF_EXTRA) - { - // The light is from an extra 3D floor... Check the flags so - // there are no undesired cuts. - if ((rlight->flags & (FOF_FOG|FOF_SWIMMABLE)) == (pfloor->fofflags & (FOF_FOG|FOF_SWIMMABLE))) - solid = 1; - } - else - solid = 1; - } - else - solid = 0; - - height = rlight->height; - rlight->height += rlight->heightstep; - - if (solid) - { - bheight = rlight->botheight - (FRACUNIT >> 1); - rlight->botheight += rlight->botheightstep; - } - - if (height <= windowtop) - { - if (lighteffect) - dc_colormap = rlight->rcolormap; - if (solid && windowtop < bheight) - windowtop = bheight; - continue; - } - - windowbottom = height; - if (windowbottom >= sprbotscreen) - { - windowbottom = sprbotscreen; - // draw the texture - colfunc_2s (col); - for (i++; i < dc_numlights; i++) - { - rlight = &dc_lightlist[i]; - rlight->height += rlight->heightstep; - if (rlight->flags & FOF_CUTLEVEL) - rlight->botheight += rlight->botheightstep; - } - continue; - } - // draw the texture - colfunc_2s (col); - if (solid) - windowtop = bheight; - else - windowtop = windowbottom + 1; - if (lighteffect) - dc_colormap = rlight->rcolormap; - } - windowbottom = sprbotscreen; - // draw the texture, if there is any space left - if (windowtop < windowbottom) - colfunc_2s (col); - - spryscale += rw_scalestep; - continue; - } - - // calculate lighting - pindex = FixedMul(spryscale, LIGHTRESOLUTIONFIX)>>LIGHTSCALESHIFT; - - if (pindex >= MAXLIGHTSCALE) - pindex = MAXLIGHTSCALE - 1; - - dc_colormap = walllights[pindex]; - - if (pfloor->fofflags & FOF_FOG && pfloor->master->frontsector->extra_colormap) - dc_colormap = pfloor->master->frontsector->extra_colormap->colormap + (dc_colormap - colormaps); - else if (frontsector->extra_colormap) - dc_colormap = frontsector->extra_colormap->colormap + (dc_colormap - colormaps); - - // draw the texture - colfunc_2s (col); spryscale += rw_scalestep; + continue; } + + // calculate lighting + pindex = FixedMul(spryscale, LIGHTRESOLUTIONFIX)>>LIGHTSCALESHIFT; + + if (pindex >= MAXLIGHTSCALE) + pindex = MAXLIGHTSCALE - 1; + + dc_colormap = walllights[pindex]; + + if (pfloor->fofflags & FOF_FOG && pfloor->master->frontsector->extra_colormap) + dc_colormap = pfloor->master->frontsector->extra_colormap->colormap + (dc_colormap - colormaps); + else if (frontsector->extra_colormap) + dc_colormap = frontsector->extra_colormap->colormap + (dc_colormap - colormaps); + + // draw the texture + colfunc_2s (col); + spryscale += rw_scalestep; } colfunc = colfuncs[BASEDRAWFUNC]; @@ -1270,7 +1227,7 @@ static void R_RenderSegLoop (void) } oldtexturecolumn = texturecolumn; - texturecolumn >>= FRACBITS; + INT32 itexturecolumn = texturecolumn >> FRACBITS; // texturecolumn and lighting are independent of wall tiers if (segtextured) @@ -1336,7 +1293,7 @@ static void R_RenderSegLoop (void) dc_yl = yl; dc_yh = yh; dc_texturemid = rw_midtexturemid; - dc_source = R_GetColumn(midtexture,texturecolumn + (rw_offset_mid>>FRACBITS)); + dc_source = R_GetColumn(midtexture, itexturecolumn + (rw_offset_mid>>FRACBITS)); dc_texheight = textureheight[midtexture]>>FRACBITS; //profile stuff --------------------------------------------------------- @@ -1397,7 +1354,7 @@ static void R_RenderSegLoop (void) dc_yl = yl; dc_yh = mid; dc_texturemid = rw_toptexturemid; - dc_source = R_GetColumn(toptexture,texturecolumn + (rw_offset_top>>FRACBITS)); + dc_source = R_GetColumn(toptexture, itexturecolumn + (rw_offset_top>>FRACBITS)); dc_texheight = textureheight[toptexture]>>FRACBITS; colfunc(); ceilingclip[rw_x] = (INT16)mid; @@ -1433,8 +1390,7 @@ static void R_RenderSegLoop (void) dc_yl = mid; dc_yh = yh; dc_texturemid = rw_bottomtexturemid; - dc_source = R_GetColumn(bottomtexture, - texturecolumn + (rw_offset_bot>>FRACBITS)); + dc_source = R_GetColumn(bottomtexture, itexturecolumn + (rw_offset_bot>>FRACBITS)); dc_texheight = textureheight[bottomtexture]>>FRACBITS; colfunc(); floorclip[rw_x] = (INT16)mid; @@ -1453,7 +1409,7 @@ static void R_RenderSegLoop (void) { // save texturecol // for backdrawing of masked mid texture - maskedtexturecol[rw_x] = (INT16)(texturecolumn + (rw_offset_mid>>FRACBITS)); + maskedtexturecol[rw_x] = texturecolumn + rw_offset_mid; if (maskedtextureheight != NULL) { maskedtextureheight[rw_x] = (curline->linedef->flags & ML_MIDPEG) ? @@ -1512,6 +1468,67 @@ static INT64 R_CalcSegDist(seg_t* seg, INT64 x2, INT64 y2) } } +//SoM: Code to remove limits on openings. +static void R_AllocClippingTables(size_t range) +{ + size_t pos = lastopening - openings; + size_t need = range * 2; // for both sprtopclip and sprbottomclip + + if (pos + need < numopenings) + return; + + INT16 *oldopenings = openings; + INT16 *oldlast = lastopening; + + if (numopenings == 0) + numopenings = 16384; + + numopenings += need; + openings = Z_Realloc(openings, numopenings * sizeof (*openings), PU_STATIC, NULL); + lastopening = openings + pos; + + // borrowed fix from *cough* zdoom *cough* + // [RH] We also need to adjust the openings pointers that + // were already stored in drawsegs. + for (drawseg_t *ds = drawsegs; ds < ds_p; ds++) + { + // Check if it's in range of the openings + if (ds->sprtopclip + ds->x1 >= oldopenings && ds->sprtopclip + ds->x1 <= oldlast) + ds->sprtopclip = (ds->sprtopclip - oldopenings) + openings; + if (ds->sprbottomclip + ds->x1 >= oldopenings && ds->sprbottomclip + ds->x1 <= oldlast) + ds->sprbottomclip = (ds->sprbottomclip - oldopenings) + openings; + } +} + +static void R_AllocTextureColumnTables(size_t range) +{ + size_t pos = curtexturecolumntable - texturecolumntable; + + // For both tables, we reserve exactly an amount of memory that's equivalent to + // how many columns the seg will take on the entire screen (think about it) + if (pos + range < texturecolumntablesize) + return; + + fixed_t *oldtable = texturecolumntable; + fixed_t *oldlast = curtexturecolumntable; + + if (texturecolumntablesize == 0) + texturecolumntablesize = 16384; + + texturecolumntablesize += range; + texturecolumntable = Z_Realloc(texturecolumntable, texturecolumntablesize * sizeof (*texturecolumntable), PU_STATIC, NULL); + curtexturecolumntable = texturecolumntable + pos; + + for (drawseg_t *ds = drawsegs; ds < ds_p; ds++) + { + // Check if it's in range of the tables + if (ds->maskedtexturecol + ds->x1 >= oldtable && ds->maskedtexturecol + ds->x1 <= oldlast) + ds->maskedtexturecol = (ds->maskedtexturecol - oldtable) + texturecolumntable; + if (ds->thicksidecol + ds->x1 >= oldtable && ds->thicksidecol + ds->x1 <= oldlast) + ds->thicksidecol = (ds->thicksidecol - oldtable) + texturecolumntable; + } +} + // // R_StoreWallRange // A wall segment will be drawn @@ -1580,37 +1597,6 @@ void R_StoreWallRange(INT32 start, INT32 stop) ds_p->curline = curline; rw_stopx = stop+1; - //SoM: Code to remove limits on openings. - { - size_t pos = lastopening - openings; - size_t need = (rw_stopx - start)*4 + pos; - if (need > maxopenings) - { - drawseg_t *ds; //needed for fix from *cough* zdoom *cough* - INT16 *oldopenings = openings; - INT16 *oldlast = lastopening; - - do - maxopenings = maxopenings ? maxopenings*2 : 16384; - while (need > maxopenings); - openings = Z_Realloc(openings, maxopenings * sizeof (*openings), PU_STATIC, NULL); - lastopening = openings + pos; - - // borrowed fix from *cough* zdoom *cough* - // [RH] We also need to adjust the openings pointers that - // were already stored in drawsegs. - for (ds = drawsegs; ds < ds_p; ds++) - { -#define ADJUST(p) if (ds->p + ds->x1 >= oldopenings && ds->p + ds->x1 <= oldlast) ds->p = ds->p - oldopenings + openings; - ADJUST(maskedtexturecol); - ADJUST(sprtopclip); - ADJUST(sprbottomclip); - ADJUST(thicksidecol); -#undef ADJUST - } - } - } // end of code to remove limits on openings - // calculate scale at both ends and step ds_p->scale1 = rw_scale = R_ScaleFromGlobalAngle(viewangle + xtoviewangle[start]); @@ -2026,6 +2012,8 @@ void R_StoreWallRange(INT32 start, INT32 stop) rw_toptexturemid += sidedef->rowoffset + sidedef->offsety_top; rw_bottomtexturemid += sidedef->rowoffset + sidedef->offsety_bot; + R_AllocTextureColumnTables(rw_stopx - start); + // allocate space for masked texture tables if (frontsector && backsector && !Tag_Compare(&frontsector->tags, &backsector->tags) && (backsector->ffloors || frontsector->ffloors)) { @@ -2040,8 +2028,8 @@ void R_StoreWallRange(INT32 start, INT32 stop) //markceiling = markfloor = true; maskedtexture = true; - ds_p->thicksidecol = maskedtexturecol = lastopening - rw_x; - lastopening += rw_stopx - rw_x; + ds_p->thicksidecol = maskedtexturecol = curtexturecolumntable - rw_x; + curtexturecolumntable += rw_stopx - rw_x; lowcut = max(worldbottom, worldlow) + viewz; highcut = min(worldtop, worldhigh) + viewz; @@ -2224,8 +2212,8 @@ void R_StoreWallRange(INT32 start, INT32 stop) // masked midtexture if (!ds_p->thicksidecol) { - ds_p->maskedtexturecol = maskedtexturecol = lastopening - rw_x; - lastopening += rw_stopx - rw_x; + ds_p->maskedtexturecol = maskedtexturecol = curtexturecolumntable - rw_x; + curtexturecolumntable += rw_stopx - rw_x; } else ds_p->maskedtexturecol = ds_p->thicksidecol; @@ -2737,29 +2725,34 @@ void R_StoreWallRange(INT32 start, INT32 stop) ds_p->portalpass = 0; // save sprite clipping info - if (((ds_p->silhouette & SIL_TOP) || maskedtexture) && !ds_p->sprtopclip) + if (maskedtexture || (ds_p->silhouette & (SIL_TOP | SIL_BOTTOM))) { - M_Memcpy(lastopening, ceilingclip+start, 2*(rw_stopx - start)); - ds_p->sprtopclip = lastopening - start; - lastopening += rw_stopx - start; - } + R_AllocClippingTables(rw_stopx - start); - if (((ds_p->silhouette & SIL_BOTTOM) || maskedtexture) && !ds_p->sprbottomclip) - { - M_Memcpy(lastopening, floorclip + start, 2*(rw_stopx-start)); - ds_p->sprbottomclip = lastopening - start; - lastopening += rw_stopx - start; + if (((ds_p->silhouette & SIL_TOP) || maskedtexture) && !ds_p->sprtopclip) + { + M_Memcpy(lastopening, ceilingclip + start, 2*(rw_stopx - start)); + ds_p->sprtopclip = lastopening - start; + lastopening += rw_stopx - start; + } + + if (((ds_p->silhouette & SIL_BOTTOM) || maskedtexture) && !ds_p->sprbottomclip) + { + M_Memcpy(lastopening, floorclip + start, 2*(rw_stopx - start)); + ds_p->sprbottomclip = lastopening - start; + lastopening += rw_stopx - start; + } } if (maskedtexture && !(ds_p->silhouette & SIL_TOP)) { ds_p->silhouette |= SIL_TOP; - ds_p->tsilheight = (sidedef->midtexture > 0 && sidedef->midtexture < numtextures) ? INT32_MIN: INT32_MAX; + ds_p->tsilheight = (sidedef->midtexture > 0 && sidedef->midtexture < numtextures) ? INT32_MIN : INT32_MAX; } if (maskedtexture && !(ds_p->silhouette & SIL_BOTTOM)) { ds_p->silhouette |= SIL_BOTTOM; - ds_p->bsilheight = (sidedef->midtexture > 0 && sidedef->midtexture < numtextures) ? INT32_MAX: INT32_MIN; + ds_p->bsilheight = (sidedef->midtexture > 0 && sidedef->midtexture < numtextures) ? INT32_MAX : INT32_MIN; } ds_p++; } diff --git a/src/r_segs.h b/src/r_segs.h index 09c68b27e..cad014674 100644 --- a/src/r_segs.h +++ b/src/r_segs.h @@ -22,5 +22,6 @@ transnum_t R_GetLinedefTransTable(fixed_t alpha); void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2); void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pffloor); void R_StoreWallRange(INT32 start, INT32 stop); +void R_ClearSegTables(void); #endif From b120d00c9f0987aeb2c29b42d1eb76b894d301ea Mon Sep 17 00:00:00 2001 From: James R Date: Thu, 3 Aug 2023 16:39:17 -0700 Subject: [PATCH 012/195] Fix glibc 2.38 compile glibc 2.38 added strlcpy and strlcat. --- src/doomtype.h | 7 ++++++- src/string.c | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/doomtype.h b/src/doomtype.h index f6c236e20..dd5fb0f8d 100644 --- a/src/doomtype.h +++ b/src/doomtype.h @@ -122,6 +122,11 @@ int endswith (const char *base, const char *tag); #define HAVE_DOSSTR_FUNCS #endif +// glibc 2.38: added strlcpy and strlcat to _DEFAULT_SOURCE +#if defined (__APPLE__) || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 38) +#define HAVE_STRLCPY +#endif + #ifndef HAVE_DOSSTR_FUNCS int strupr(char *n); // from dosstr.c int strlwr(char *n); // from dosstr.c @@ -129,7 +134,7 @@ int strlwr(char *n); // from dosstr.c #include // for size_t -#ifndef __APPLE__ +#ifndef HAVE_STRLCPY size_t strlcat(char *dst, const char *src, size_t siz); size_t strlcpy(char *dst, const char *src, size_t siz); #endif diff --git a/src/string.c b/src/string.c index dd3080a97..cbc8ea582 100644 --- a/src/string.c +++ b/src/string.c @@ -15,7 +15,7 @@ #include #include "doomdef.h" -#if !defined (__APPLE__) +#ifndef HAVE_STRLCPY // Like the OpenBSD version, but it doesn't check for src not being a valid // C string. From d06098c0aaa8712f018dd6cf05bb12be1c2bac09 Mon Sep 17 00:00:00 2001 From: MIDIMan Date: Sat, 5 Aug 2023 20:22:11 -0400 Subject: [PATCH 013/195] Changed P_ConvertBinaryLinedefTypes to use args[1] instead of args[3] for linedef type 442 --- src/p_setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_setup.c b/src/p_setup.c index cbb817d83..0c8ea656e 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -5467,7 +5467,7 @@ static void P_ConvertBinaryLinedefTypes(void) break; case 442: //Change object type state lines[i].args[0] = tag; - lines[i].args[3] = (lines[i].sidenum[1] == 0xffff) ? 1 : 0; + lines[i].args[1] = (lines[i].sidenum[1] == 0xffff) ? 1 : 0; break; case 443: //Call Lua function if (lines[i].stringargs[0] == NULL) From b92dc42848a5023a5be32b2185ff9f5520b1ad14 Mon Sep 17 00:00:00 2001 From: Lactozilla Date: Sat, 5 Aug 2023 22:15:38 -0300 Subject: [PATCH 014/195] Add gametype parameter to G_SetCustomExitVars and G_ExitLevel (cherry picked from commit 86367e4ec123f3912a91d41a626c11bf3ad00761) --- src/d_netcmd.c | 9 ++++----- src/doomstat.h | 1 + src/g_game.c | 32 +++++++++++++++++++++++--------- src/lua_baselib.c | 13 ++++++++----- 4 files changed, 36 insertions(+), 19 deletions(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 77a271825..967a69cc0 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -2120,11 +2120,13 @@ static void Got_Mapcmd(UINT8 **cp, INT32 playernum) lastgametype = gametype; gametype = READUINT8(*cp); - G_SetGametype(gametype); // I fear putting that macro as an argument if (gametype < 0 || gametype >= gametypecount) gametype = lastgametype; - else if (gametype != lastgametype) + else + G_SetGametype(gametype); + + if (gametype != lastgametype) D_GameTypeChanged(lastgametype); // emulate consvar_t behavior for gametype skipprecutscene = ((flags & (1<<2)) != 0); @@ -4252,9 +4254,6 @@ void D_GameTypeChanged(INT32 lastgametype) else if (!multiplayer && !netgame) { G_SetGametype(GT_COOP); - // These shouldn't matter anymore - //CV_Set(&cv_itemrespawntime, cv_itemrespawntime.defaultvalue); - //CV_SetValue(&cv_itemrespawn, 0); } // reset timelimit and pointlimit in race/coop, prevent stupid cheats diff --git a/src/doomstat.h b/src/doomstat.h index a812cc304..fdd0d0b83 100644 --- a/src/doomstat.h +++ b/src/doomstat.h @@ -249,6 +249,7 @@ extern textprompt_t *textprompts[MAX_PROMPTS]; // For the Custom Exit linedef. extern INT16 nextmapoverride; extern UINT8 skipstats; +extern INT16 nextgametype; extern UINT32 ssspheres; // Total # of spheres in a level diff --git a/src/g_game.c b/src/g_game.c index 04b1ffe4d..ecae11f04 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -156,6 +156,7 @@ textprompt_t *textprompts[MAX_PROMPTS]; INT16 nextmapoverride; UINT8 skipstats; +INT16 nextgametype = -1; // Pointers to each CTF flag mobj_t *redflag; @@ -3461,9 +3462,7 @@ UINT32 gametypedefaultrules[NUMGAMETYPES] = }; // -// G_SetGametype -// -// Set a new gametype, also setting gametype rules accordingly. Yay! +// Sets a new gametype. // void G_SetGametype(INT16 gtype) { @@ -4053,6 +4052,13 @@ static void G_DoCompleted(void) nextmap = 1100-1; // No infinite loop for you } + INT16 gametype_to_use; + + if (nextgametype >= 0 && nextgametype < gametypecount) + gametype_to_use = nextgametype; + else + gametype_to_use = gametype; + // If nextmap is actually going to get used, make sure it points to // a map of the proper gametype -- skip levels that don't support // the current gametype. (Helps avoid playing boss levels in Race, @@ -4061,8 +4067,8 @@ static void G_DoCompleted(void) { if (nextmap >= 0 && nextmap < NUMMAPS) { - register INT16 cm = nextmap; - UINT32 tolflag = G_TOLFlag(gametype); + INT16 cm = nextmap; + UINT32 tolflag = G_TOLFlag(gametype_to_use); UINT8 visitedmap[(NUMMAPS+7)/8]; memset(visitedmap, 0, sizeof (visitedmap)); @@ -4142,7 +4148,7 @@ static void G_DoCompleted(void) if (cv_advancemap.value == 0) // Stay on same map. nextmap = prevmap; else if (cv_advancemap.value == 2) // Go to random map. - nextmap = RandMap(G_TOLFlag(gametype), prevmap); + nextmap = RandMap(G_TOLFlag(gametype_to_use), prevmap); } // We are committed to this map now. @@ -4151,7 +4157,6 @@ static void G_DoCompleted(void) if (nextmap < NUMMAPS && !mapheaderinfo[nextmap]) P_AllocMapHeader(nextmap); - // If the current gametype has no intermission screen set, then don't start it. Y_DetermineIntermissionType(); if ((skipstats && !modeattacking) || (modeattacking && stagefailed) || (intertype == int_none)) @@ -4217,12 +4222,21 @@ static void G_DoWorldDone(void) { if (server) { + INT16 gametype_to_use; + + if (nextgametype >= 0 && nextgametype < gametypecount) + gametype_to_use = nextgametype; + else + gametype_to_use = gametype; + if (gametyperules & GTR_CAMPAIGN) // don't reset player between maps - D_MapChange(nextmap+1, gametype, ultimatemode, false, 0, false, false); + D_MapChange(nextmap+1, gametype_to_use, ultimatemode, false, 0, false, false); else // resetplayer in match/chaos/tag/CTF/race for more equality - D_MapChange(nextmap+1, gametype, ultimatemode, true, 0, false, false); + D_MapChange(nextmap+1, gametype_to_use, ultimatemode, true, 0, false, false); + + nextgametype = -1; } gameaction = ga_nothing; diff --git a/src/lua_baselib.c b/src/lua_baselib.c index 915669bb2..a03ede8ca 100644 --- a/src/lua_baselib.c +++ b/src/lua_baselib.c @@ -3826,7 +3826,7 @@ static int lib_gDoReborn(lua_State *L) } // Another Lua function that doesn't actually exist! -// Sets nextmapoverride & skipstats without instantly ending the level, for instances where other sources should be exiting the level, like normal signposts. +// Sets nextmapoverride, skipstats and nextgametype without instantly ending the level, for instances where other sources should be exiting the level, like normal signposts. static int lib_gSetCustomExitVars(lua_State *L) { int n = lua_gettop(L); // Num arguments @@ -3835,18 +3835,21 @@ static int lib_gSetCustomExitVars(lua_State *L) // LUA EXTENSION: Custom exit like support // Supported: - // G_SetCustomExitVars(); [reset to defaults] - // G_SetCustomExitVars(int) [nextmap override only] - // G_SetCustomExitVars(nil, int) [skipstats only] - // G_SetCustomExitVars(int, int) [both of the above] + // G_SetCustomExitVars(); [reset to defaults] + // G_SetCustomExitVars(int) [nextmap override only] + // G_SetCustomExitVars(nil, int) [skipstats only] + // G_SetCustomExitVars(int, int) [both of the above] + // G_SetCustomExitVars(int, int, int) [nextmapoverride, skipstats and nextgametype] nextmapoverride = 0; skipstats = 0; + nextgametype = -1; if (n >= 1) { nextmapoverride = (INT16)luaL_optinteger(L, 1, 0); skipstats = (INT16)luaL_optinteger(L, 2, 0); + nextgametype = (INT16)luaL_optinteger(L, 3, 0); } return 0; From f17493f379c5f53e75f7c8983c4b8425462ccb73 Mon Sep 17 00:00:00 2001 From: Lactozilla Date: Mon, 7 Aug 2023 14:30:39 -0300 Subject: [PATCH 015/195] Use -1 as the default, not 0 --- src/lua_baselib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lua_baselib.c b/src/lua_baselib.c index a03ede8ca..4af5066ae 100644 --- a/src/lua_baselib.c +++ b/src/lua_baselib.c @@ -3849,7 +3849,7 @@ static int lib_gSetCustomExitVars(lua_State *L) { nextmapoverride = (INT16)luaL_optinteger(L, 1, 0); skipstats = (INT16)luaL_optinteger(L, 2, 0); - nextgametype = (INT16)luaL_optinteger(L, 3, 0); + nextgametype = (INT16)luaL_optinteger(L, 3, -1); } return 0; From 20e4e8a5c42dfa54463face8f04de5ab1bd06372 Mon Sep 17 00:00:00 2001 From: SteelT Date: Mon, 7 Aug 2023 14:06:24 -0400 Subject: [PATCH 016/195] Fix crash handler showing garbage string for signal title MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes the signal title being shown as something like "Process killed by signal: Process killed by signal: ó>" Did some minor cleaning while I'm also here --- src/sdl/i_system.c | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index 075199a19..c60e86a08 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -325,8 +325,10 @@ static void write_backtrace(INT32 signal) static void I_ReportSignal(int num, int coredumped) { //static char msg[] = "oh no! back to reality!\r\n"; - const char *sigmsg, *sigttl; + const char *sigmsg, *signame; char ttl[128]; + char sigttl[512] = "Process killed by signal: "; + const char *reportmsg = "\n\nTo help us figure out the cause, you can visit our official Discord server\nwhere you will find more instructions on how to submit a crash report.\n\nSorry for the inconvenience!"; switch (num) { @@ -335,16 +337,16 @@ static void I_ReportSignal(int num, int coredumped) // sigmsg = "SRB2 was interrupted prematurely by the user."; // break; case SIGILL: - sigmsg = "SRB2 has attempted to execute an illegal instruction and needs to close. %s"; - sigttl = "SIGILL"; // illegal instruction - invalid function image + sigmsg = "SRB2 has attempted to execute an illegal instruction and needs to close."; + signame = "SIGILL"; // illegal instruction - invalid function image break; case SIGFPE: - sigmsg = "SRB2 has encountered a mathematical exception and needs to close. %s"; - sigttl = "SIGFPE"; // mathematical exception + sigmsg = "SRB2 has encountered a mathematical exception and needs to close."; + signame = "SIGFPE"; // mathematical exception break; case SIGSEGV: - sigmsg = "SRB2 has attempted to access a memory location that it shouldn't and needs to close. %s"; - sigttl = "SIGSEGV"; // segment violation + sigmsg = "SRB2 has attempted to access a memory location that it shouldn't and needs to close."; + signame = "SIGSEGV"; // segment violation break; // case SIGTERM: // sigmsg = "SRB2 was terminated by a kill signal."; @@ -355,34 +357,31 @@ static void I_ReportSignal(int num, int coredumped) // sigttl = "SIGBREAK" // Ctrl-Break sequence // break; case SIGABRT: - sigmsg = "SRB2 was terminated by an abort signal. %s"; - sigttl = "SIGABRT"; // abnormal termination triggered by abort call + sigmsg = "SRB2 was terminated by an abort signal."; + signame = "SIGABRT"; // abnormal termination triggered by abort call break; default: - sigmsg = "SRB2 was terminated by an unknown signal. %s"; + sigmsg = "SRB2 was terminated by an unknown signal."; sprintf(ttl, "number %d", num); if (coredumped) - sigttl = 0; + signame = 0; else - sigttl = ttl; + signame = ttl; } if (coredumped) { - if (sigttl) - sprintf(ttl, "%s (core dumped)", sigttl); + if (signame) + sprintf(ttl, "%s (core dumped)", signame); else strcat(ttl, " (core dumped)"); - sigttl = ttl; + signame = ttl; } - sprintf(ttl, "Process killed by signal: %s", sigttl); - - sigttl = ttl; - - I_OutputMsg("\n%s\n\n", sigttl); + strcat(sigttl, signame); + I_OutputMsg("%s\n", sigttl); if (M_CheckParm("-dedicated")) return; @@ -396,8 +395,7 @@ static void I_ReportSignal(int num, int coredumped) SDL_MESSAGEBOX_ERROR, /* .flags */ NULL, /* .window */ sigttl, /* .title */ - va(sigmsg, - "\n\nTo help us figure out the cause, you can visit our official Discord server\nwhere you will find more instructions on how to submit a crash report.\n\nSorry for the inconvenience!"), /* .message */ + va("%s %s", sigmsg, reportmsg), /* .message */ SDL_arraysize(buttons), /* .numbuttons */ buttons, /* .buttons */ NULL /* .colorScheme */ From 492fe94597a6985f320fc5ff73b6ff2b5f86e911 Mon Sep 17 00:00:00 2001 From: Sal Date: Mon, 7 Aug 2023 18:35:20 +0000 Subject: [PATCH 017/195] Warp cheat adjustments --- src/d_main.c | 13 ++--- src/d_netcmd.c | 123 +++++++++++++++++++++++++++++++---------------- src/d_netcmd.h | 1 + src/f_finale.c | 2 +- src/g_game.c | 4 +- src/lua_hudlib.c | 3 +- src/m_cond.c | 51 ++++++++++++++++++++ src/m_cond.h | 1 + src/p_inter.c | 18 +++---- src/p_setup.c | 2 +- src/p_user.c | 4 +- src/y_inter.c | 3 +- 12 files changed, 158 insertions(+), 67 deletions(-) diff --git a/src/d_main.c b/src/d_main.c index 22a676255..24c70843a 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -1737,14 +1737,15 @@ void D_SRB2Main(void) // Prevent warping to nonexistent levels if (W_CheckNumForName(G_BuildMapName(pstartmap)) == LUMPERROR) I_Error("Could not warp to %s (map not found)\n", G_BuildMapName(pstartmap)); - // Prevent warping to locked levels - // ... unless you're in a dedicated server. Yes, technically this means you can view any level by - // running a dedicated server and joining it yourself, but that's better than making dedicated server's - // lives hell. - else if (!dedicated && M_MapLocked(pstartmap, serverGamedata)) - I_Error("You need to unlock this level before you can warp to it!\n"); else { + if (M_CampaignWarpIsCheat(gametype, pstartmap, serverGamedata)) + { + // If you're warping via command line, you know what you're doing. + // No need to I_Error over this. + G_SetUsedCheats(false); + } + D_MapChange(pstartmap, gametype, ultimatemode, true, 0, false, false); } } diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 77a271825..6df79c7bd 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -1902,8 +1902,8 @@ static void Command_Map_f(void) size_t option_gametype; const char *gametypename; boolean newresetplayers; - - boolean wouldSetCheats; + boolean prevent_cheat; + boolean set_cheated; INT32 newmapnum; @@ -1924,21 +1924,33 @@ static void Command_Map_f(void) option_gametype = COM_CheckPartialParm("-g"); newresetplayers = ! COM_CheckParm("-noresetplayers"); - wouldSetCheats = - !( netgame || multiplayer ) && - !( usedCheats ); + prevent_cheat = !( usedCheats ) && !( option_force || cv_debug ); - if (wouldSetCheats && !option_force) + if (!( netgame || multiplayer )) { - /* May want to be more descriptive? */ - CONS_Printf(M_GetText("Sorry, level change disabled in single player.\n")); - return; + if (prevent_cheat) + { + /* May want to be more descriptive? */ + CONS_Printf(M_GetText("Cheats must be enabled to level change in single player.\n")); + return; + } + else + { + set_cheated = true; + } } - if (!newresetplayers && !cv_debug) + if (!newresetplayers) { - CONS_Printf(M_GetText("DEVMODE must be enabled.\n")); - return; + if (prevent_cheat) + { + CONS_Printf(M_GetText("Cheats must be enabled to use -noresetplayers.\n")); + return; + } + else + { + set_cheated = true; + } } if (option_gametype) @@ -1946,7 +1958,7 @@ static void Command_Map_f(void) if (!multiplayer) { CONS_Printf(M_GetText( - "You can't switch gametypes in single player!\n")); + "You can't switch gametypes in single player!\n")); return; } else if (COM_Argc() < option_gametype + 2)/* no argument after? */ @@ -1959,7 +1971,9 @@ static void Command_Map_f(void) } if (!( first_option = COM_FirstOption() )) + { first_option = COM_Argc(); + } if (first_option < 2) { @@ -1982,11 +1996,6 @@ static void Command_Map_f(void) return; } - if (wouldSetCheats && option_force) - { - G_SetUsedCheats(false); - } - // new gametype value // use current one by default if (option_gametype) @@ -2028,15 +2037,13 @@ static void Command_Map_f(void) } // don't use a gametype the map doesn't support - if (cv_debug || option_force || cv_skipmapcheck.value) - fromlevelselect = false; // The player wants us to trek on anyway. Do so. // G_TOLFlag handles both multiplayer gametype and ignores it for !multiplayer - else + if (!( + mapheaderinfo[newmapnum-1] && + mapheaderinfo[newmapnum-1]->typeoflevel & G_TOLFlag(newgametype) + )) { - if (!( - mapheaderinfo[newmapnum-1] && - mapheaderinfo[newmapnum-1]->typeoflevel & G_TOLFlag(newgametype) - )) + if (prevent_cheat && !cv_skipmapcheck.value) { CONS_Alert(CONS_WARNING, M_GetText("%s (%s) doesn't support %s mode!\n(Use -force to override)\n"), realmapname, G_BuildMapName(newmapnum), (multiplayer ? gametype_cons_t[newgametype].strvalue : "Single Player")); @@ -2046,23 +2053,33 @@ static void Command_Map_f(void) } else { - fromlevelselect = - ( netgame || multiplayer ) && - newgametype == gametype && - gametypedefaultrules[newgametype] & GTR_CAMPAIGN; + // The player wants us to trek on anyway. Do so. + fromlevelselect = false; + set_cheated = ((gametypedefaultrules[newgametype] & GTR_CAMPAIGN) == GTR_CAMPAIGN); } } + else + { + fromlevelselect = + ( netgame || multiplayer ) && + newgametype == gametype && + (gametypedefaultrules[newgametype] & GTR_CAMPAIGN); + } // Prevent warping to locked levels - // ... unless you're in a dedicated server. Yes, technically this means you can view any level by - // running a dedicated server and joining it yourself, but that's better than making dedicated server's - // lives hell. - if (!dedicated && M_MapLocked(newmapnum, serverGamedata)) + if (M_CampaignWarpIsCheat(newgametype, newmapnum, serverGamedata)) { - CONS_Alert(CONS_NOTICE, M_GetText("You need to unlock this level before you can warp to it!\n")); - Z_Free(realmapname); - Z_Free(mapname); - return; + if (prevent_cheat) + { + CONS_Alert(CONS_NOTICE, M_GetText("Cheats must be enabled to warp to a locked level!\n")); + Z_Free(realmapname); + Z_Free(mapname); + return; + } + else + { + set_cheated = true; + } } // Ultimate Mode only in SP via menu @@ -2079,6 +2096,11 @@ static void Command_Map_f(void) } tutorialmode = false; // warping takes us out of tutorial mode + if (set_cheated && !usedCheats) + { + G_SetUsedCheats(false); + } + D_MapChange(newmapnum, newgametype, false, newresetplayers, 0, false, fromlevelselect); Z_Free(realmapname); @@ -4555,25 +4577,37 @@ static void Command_Mapmd5_f(void) CONS_Printf(M_GetText("You must be in a level to use this.\n")); } +void D_SendExitLevel(boolean cheat) +{ + UINT8 buf[8]; + UINT8 *buf_p = buf; + + WRITEUINT8(buf_p, cheat); + + SendNetXCmd(XD_EXITLEVEL, &buf, buf_p - buf); +} + static void Command_ExitLevel_f(void) { - if (!(netgame || (multiplayer && gametype != GT_COOP)) && !cv_debug) - CONS_Printf(M_GetText("This only works in a netgame.\n")); - else if (!(server || (IsPlayerAdmin(consoleplayer)))) + if (!(server || (IsPlayerAdmin(consoleplayer)))) CONS_Printf(M_GetText("Only the server or a remote admin can use this.\n")); else if (( gamestate != GS_LEVEL && gamestate != GS_CREDITS ) || demoplayback) CONS_Printf(M_GetText("You must be in a level to use this.\n")); else - SendNetXCmd(XD_EXITLEVEL, NULL, 0); + D_SendExitLevel(true); } static void Got_ExitLevelcmd(UINT8 **cp, INT32 playernum) { - (void)cp; + boolean cheat = false; + + cheat = (boolean)READUINT8(*cp); // Ignore duplicate XD_EXITLEVEL commands. if (gameaction == ga_completed) + { return; + } if (playernum != serverplayer && !IsPlayerAdmin(playernum)) { @@ -4583,6 +4617,11 @@ static void Got_ExitLevelcmd(UINT8 **cp, INT32 playernum) return; } + if (G_CoopGametype() && cheat) + { + G_SetUsedCheats(false); + } + G_ExitLevel(); } diff --git a/src/d_netcmd.h b/src/d_netcmd.h index 26bf4d5c6..8bbc801d0 100644 --- a/src/d_netcmd.h +++ b/src/d_netcmd.h @@ -201,6 +201,7 @@ void D_SendPlayerConfig(void); void Command_ExitGame_f(void); void Command_Retry_f(void); void D_GameTypeChanged(INT32 lastgametype); // not a real _OnChange function anymore +void D_SendExitLevel(boolean cheat); void D_MapChange(INT32 pmapnum, INT32 pgametype, boolean pultmode, boolean presetplayers, INT32 pdelay, boolean pskipprecutscene, boolean pfromlevelselect); boolean IsPlayerAdmin(INT32 playernum); void SetAdminPlayer(INT32 playernum); diff --git a/src/f_finale.c b/src/f_finale.c index d03795dc4..162e87d29 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -1644,7 +1644,7 @@ void F_GameEvaluationTicker(void) sparklloop = 0; } - if (finalecount == 5*TICRATE) + if (G_CoopGametype() && !stagefailed && finalecount == 5*TICRATE) { serverGamedata->timesBeaten++; clientGamedata->timesBeaten++; diff --git a/src/g_game.c b/src/g_game.c index 04b1ffe4d..24a771372 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -2137,7 +2137,7 @@ boolean G_Responder(event_t *ev) if (! netgame) F_StartGameEvaluation(); else if (server || IsPlayerAdmin(consoleplayer)) - SendNetXCmd(XD_EXITLEVEL, NULL, 0); + D_SendExitLevel(false); return true; } } @@ -3861,7 +3861,7 @@ static INT16 RandMap(UINT32 tolflags, INT16 pprevmap) for (ix = 0; ix < NUMMAPS; ix++) if (mapheaderinfo[ix] && (mapheaderinfo[ix]->typeoflevel & tolflags) == tolflags && ix != pprevmap // Don't pick the same map. - && (dedicated || !M_MapLocked(ix+1, serverGamedata)) // Don't pick locked maps. + && (!M_MapLocked(ix+1, serverGamedata)) // Don't pick locked maps. ) okmaps[numokmaps++] = ix; diff --git a/src/lua_hudlib.c b/src/lua_hudlib.c index 2e3bb9c68..63a866606 100644 --- a/src/lua_hudlib.c +++ b/src/lua_hudlib.c @@ -1487,7 +1487,6 @@ void LUA_SetHudHook(int hook, huddrawlist_h list) break; case HUD_HOOK(intermission): - lua_pushboolean(gL, intertype == int_spec && - stagefailed); + lua_pushboolean(gL, stagefailed); } } diff --git a/src/m_cond.c b/src/m_cond.c index 13a483ea2..3dfb1dceb 100644 --- a/src/m_cond.c +++ b/src/m_cond.c @@ -467,6 +467,15 @@ UINT8 M_SecretUnlocked(INT32 type, gamedata_t *data) UINT8 M_MapLocked(INT32 mapnum, gamedata_t *data) { + if (dedicated) + { + // If you're in a dedicated server, every level is unlocked. + // Yes, technically this means you can view any level by + // running a dedicated server and joining it yourself, but + // that's better than making dedicated server's lives hell. + return false; + } + if (!mapheaderinfo[mapnum-1] || mapheaderinfo[mapnum-1]->unlockrequired < 0) { return false; @@ -480,6 +489,48 @@ UINT8 M_MapLocked(INT32 mapnum, gamedata_t *data) return false; } +UINT8 M_CampaignWarpIsCheat(INT32 gt, INT32 mapnum, gamedata_t *data) +{ + if (M_MapLocked(mapnum, data) == true) + { + // Warping to locked maps is definitely always a cheat + return true; + } + + if ((gametypedefaultrules[gt] & GTR_CAMPAIGN) == 0) + { + // Not a campaign, do whatever you want. + return false; + } + + if (G_IsSpecialStage(mapnum)) + { + // Warping to special stages is a cheat + return true; + } + + if (mapheaderinfo[mapnum-1]->menuflags & LF2_HIDEINMENU) + { + // You're never allowed to warp to this level. + return true; + } + + if (mapheaderinfo[mapnum-1]->menuflags & LF2_NOVISITNEEDED) + { + // You're always allowed to warp to this level. + return false; + } + + if (mapnum == spstage_start) + { + // Warping to the first level is never a cheat + return false; + } + + // It's only a cheat if you've never been there. + return (!(data->mapvisited[mapnum])); +} + INT32 M_CountEmblems(gamedata_t *data) { INT32 found = 0, i; diff --git a/src/m_cond.h b/src/m_cond.h index 2be8d564b..2491a384c 100644 --- a/src/m_cond.h +++ b/src/m_cond.h @@ -252,6 +252,7 @@ void M_SilentUpdateSkinAvailabilites(void); UINT8 M_AnySecretUnlocked(gamedata_t *data); UINT8 M_SecretUnlocked(INT32 type, gamedata_t *data); UINT8 M_MapLocked(INT32 mapnum, gamedata_t *data); +UINT8 M_CampaignWarpIsCheat(INT32 gt, INT32 mapnum, gamedata_t *data); INT32 M_CountEmblems(gamedata_t *data); // Emblem shit diff --git a/src/p_inter.c b/src/p_inter.c index 4d22ba343..74ca6972f 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -2235,7 +2235,7 @@ void P_CheckTimeLimit(void) } if (server) - SendNetXCmd(XD_EXITLEVEL, NULL, 0); + D_SendExitLevel(false); } //Optional tie-breaker for Match/CTF @@ -2298,11 +2298,11 @@ void P_CheckTimeLimit(void) } } if (server) - SendNetXCmd(XD_EXITLEVEL, NULL, 0); + D_SendExitLevel(false); } if (server) - SendNetXCmd(XD_EXITLEVEL, NULL, 0); + D_SendExitLevel(false); } /** Checks if a player's score is over the pointlimit and the round should end. @@ -2331,7 +2331,7 @@ void P_CheckPointLimit(void) if ((UINT32)cv_pointlimit.value <= redscore || (UINT32)cv_pointlimit.value <= bluescore) { if (server) - SendNetXCmd(XD_EXITLEVEL, NULL, 0); + D_SendExitLevel(false); } } else @@ -2344,7 +2344,7 @@ void P_CheckPointLimit(void) if ((UINT32)cv_pointlimit.value <= players[i].score) { if (server) - SendNetXCmd(XD_EXITLEVEL, NULL, 0); + D_SendExitLevel(false); return; } } @@ -2388,7 +2388,7 @@ void P_CheckSurvivors(void) { CONS_Printf(M_GetText("The IT player has left the game.\n")); if (server) - SendNetXCmd(XD_EXITLEVEL, NULL, 0); + D_SendExitLevel(false); return; } @@ -2408,7 +2408,7 @@ void P_CheckSurvivors(void) { CONS_Printf(M_GetText("All players have been tagged!\n")); if (server) - SendNetXCmd(XD_EXITLEVEL, NULL, 0); + D_SendExitLevel(false); } return; @@ -2420,7 +2420,7 @@ void P_CheckSurvivors(void) { CONS_Printf(M_GetText("There are no players able to become IT.\n")); if (server) - SendNetXCmd(XD_EXITLEVEL, NULL, 0); + D_SendExitLevel(false); } return; @@ -2432,7 +2432,7 @@ void P_CheckSurvivors(void) { CONS_Printf(M_GetText("All players have been tagged!\n")); if (server) - SendNetXCmd(XD_EXITLEVEL, NULL, 0); + D_SendExitLevel(false); } } diff --git a/src/p_setup.c b/src/p_setup.c index cbb817d83..a1440c0ce 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -8238,7 +8238,7 @@ static boolean P_LoadAddon(UINT16 numlumps) { CONS_Printf(M_GetText("Current map %d replaced by added file, ending the level to ensure consistency.\n"), gamemap); if (server) - SendNetXCmd(XD_EXITLEVEL, NULL, 0); + D_SendExitLevel(false); } return true; diff --git a/src/p_user.c b/src/p_user.c index cf4818298..84d0c0abf 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -11758,7 +11758,7 @@ void P_PlayerThink(player_t *player) if (!total || ((4*exiting)/total) >= numneeded) { if (server) - SendNetXCmd(XD_EXITLEVEL, NULL, 0); + D_SendExitLevel(false); } else player->exiting = 3; @@ -11766,7 +11766,7 @@ void P_PlayerThink(player_t *player) else { if (server) - SendNetXCmd(XD_EXITLEVEL, NULL, 0); + D_SendExitLevel(false); } } diff --git a/src/y_inter.c b/src/y_inter.c index 5e071171f..796ced8b8 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -998,8 +998,7 @@ void Y_Ticker(void) if (paused || P_AutoPause()) return; - LUA_HookBool(intertype == int_spec && stagefailed, - HOOK(IntermissionThinker)); + LUA_HookBool(stagefailed, HOOK(IntermissionThinker)); intertic++; From 3d14d155e08090c4e13f95072ba8846a5c101ad9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustaf=20Alh=C3=A4ll?= Date: Sat, 12 Aug 2023 12:31:59 +0200 Subject: [PATCH 018/195] Fix segfault when spectating on an Emerald Hunt map --- src/st_stuff.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/st_stuff.c b/src/st_stuff.c index c6e6befc6..a6bd77cfa 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -2512,6 +2512,8 @@ num: static INT32 ST_drawEmeraldHuntIcon(mobj_t *hunt, patch_t **patches, INT32 offset) { INT32 interval, i; + if (stplyr->mo == NULL) + return 0; // player just joined after spectating, can happen on custom gamemodes. UINT32 dist = ((UINT32)P_AproxDistance(P_AproxDistance(stplyr->mo->x - hunt->x, stplyr->mo->y - hunt->y), stplyr->mo->z - hunt->z))>>FRACBITS; if (dist < 128) From 5830ff500fdef29b1cc05938dede65073bf30e6b Mon Sep 17 00:00:00 2001 From: Zwip-Zwap Zapony Date: Mon, 14 Aug 2023 19:05:48 +0200 Subject: [PATCH 019/195] Fix mobj flag fumblings --- src/p_mobj.c | 2 +- src/p_user.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index 2a40175dc..e89298fdd 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -9228,7 +9228,7 @@ static void P_DragonbomberThink(mobj_t *mobj) else { fixed_t vspeed = FixedMul(mobj->info->speed >> 3, mobj->scale); - fixed_t z = mobj->target->z + (mobj->height >> 1) + (mobj->flags & MFE_VERTICALFLIP ? -128*mobj->scale : 128*mobj->scale + mobj->target->height); + fixed_t z = mobj->target->z + (mobj->height >> 1) + (mobj->eflags & MFE_VERTICALFLIP ? -128*mobj->scale : (128*mobj->scale + mobj->target->height)); angle_t diff = R_PointToAngle2(mobj->x, mobj->y, mobj->target->x, mobj->target->y) - mobj->angle; if (diff > ANGLE_180) mobj->angle -= DRAGONTURNSPEED; diff --git a/src/p_user.c b/src/p_user.c index 84d0c0abf..8a0af41d9 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -2005,7 +2005,7 @@ mobj_t *P_SpawnGhostMobj(mobj_t *mobj) ghost->standingslope = mobj->standingslope; if (mobj->flags2 & MF2_OBJECTFLIP) - ghost->flags |= MF2_OBJECTFLIP; + ghost->flags2 |= MF2_OBJECTFLIP; if (mobj->player && mobj->player->followmobj) { @@ -11507,7 +11507,7 @@ static void P_DoMetalJetFume(player_t *player, mobj_t *fume) } fume->movecount = dashmode; // keeps track of previous dashmode value so we know whether Metal is entering or leaving it - fume->eflags = (fume->flags2 & ~MF2_OBJECTFLIP) | (mo->flags2 & MF2_OBJECTFLIP); // Make sure to flip in reverse gravity! + fume->flags2 = (fume->flags2 & ~MF2_OBJECTFLIP) | (mo->flags2 & MF2_OBJECTFLIP); // Make sure to flip in reverse gravity! fume->eflags = (fume->eflags & ~MFE_VERTICALFLIP) | (mo->eflags & MFE_VERTICALFLIP); // Make sure to flip in reverse gravity! // Finally, set its position From db59ec59989eba4a053557e2e7ae4444e983cb1a Mon Sep 17 00:00:00 2001 From: Zwip-Zwap Zapony Date: Thu, 17 Aug 2023 17:39:24 +0200 Subject: [PATCH 020/195] Fix interpolation when curling up while flipped Also fix scaling interpolation while flipped, and fix the NiGHTS Drone flip interpolation on its first tic --- src/hardware/hw_main.c | 5 ++++- src/hardware/hw_md2.c | 7 ++++++- src/p_mobj.c | 2 +- src/p_user.c | 5 ++++- src/r_things.c | 6 +++++- 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 36ff86abd..f253861de 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -5378,7 +5378,10 @@ static void HWR_ProjectSprite(mobj_t *thing) if (vflip) { - gz = FIXED_TO_FLOAT(interp.z + thing->height) - (FIXED_TO_FLOAT(spr_topoffset) * this_yscale); + if (thing->scale != thing->old_scale) // Interpolate heights in reverse gravity when scaling mobjs + gz = FIXED_TO_FLOAT(interp.z + FixedMul(thing->height, FixedDiv(interp.scale, thing->scale))) - (FIXED_TO_FLOAT(spr_topoffset) * this_yscale); + else + gz = FIXED_TO_FLOAT(interp.z + thing->height) - (FIXED_TO_FLOAT(spr_topoffset) * this_yscale); gzt = gz + (FIXED_TO_FLOAT(spr_height) * this_yscale); } else diff --git a/src/hardware/hw_md2.c b/src/hardware/hw_md2.c index d005f0037..87881be8d 100644 --- a/src/hardware/hw_md2.c +++ b/src/hardware/hw_md2.c @@ -1585,7 +1585,12 @@ boolean HWR_DrawModel(gl_vissprite_t *spr) p.y = FIXED_TO_FLOAT(interp.y)+md2->offset; if (flip) - p.z = FIXED_TO_FLOAT(interp.z + spr->mobj->height); + { + if (spr->mobj->scale != spr->mobj->old_scale) // Interpolate heights in reverse gravity when scaling mobjs + p.z = FIXED_TO_FLOAT(interp.z + FixedMul(spr->mobj->height, FixedDiv(interp.scale, spr->mobj->scale))); + else + p.z = FIXED_TO_FLOAT(interp.z + spr->mobj->height); + } else p.z = FIXED_TO_FLOAT(interp.z); diff --git a/src/p_mobj.c b/src/p_mobj.c index 2a40175dc..9550535f1 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -12593,7 +12593,7 @@ static boolean P_SetupNiGHTSDrone(mapthing_t *mthing, mobj_t *mobj) dronemangoaldiff = max(mobjinfo[MT_NIGHTSDRONE_MAN].height - mobjinfo[MT_NIGHTSDRONE_GOAL].height, 0); if (flip && mobj->height != oldheight) - P_MoveOrigin(mobj, mobj->x, mobj->y, mobj->z - (mobj->height - oldheight)); + P_SetOrigin(mobj, mobj->x, mobj->y, mobj->z - (mobj->height - oldheight)); if (!flip) { diff --git a/src/p_user.c b/src/p_user.c index 84d0c0abf..48141815c 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -8717,7 +8717,10 @@ void P_MovePlayer(player_t *player) player->mo->height = P_GetPlayerHeight(player); if (player->mo->eflags & MFE_VERTICALFLIP && player->mo->height != oldheight) // adjust z height for reverse gravity, similar to how it's done for scaling - player->mo->z -= player->mo->height - oldheight; + { + player->mo->z -= player->mo->height - oldheight; + player->mo->old_z -= player->mo->height - oldheight; // Snap the Z adjustment, while keeping the Z interpolation + } // Crush test... if ((player->mo->ceilingz - player->mo->floorz < player->mo->height) diff --git a/src/r_things.c b/src/r_things.c index 90b80dda8..e69fe1b82 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -2114,7 +2114,11 @@ static void R_ProjectSprite(mobj_t *thing) // When vertical flipped, draw sprites from the top down, at least as far as offsets are concerned. // sprite height - sprite topoffset is the proper inverse of the vertical offset, of course. // remember gz and gzt should be seperated by sprite height, not thing height - thing height can be shorter than the sprite itself sometimes! - gz = interp.z + oldthing->height - FixedMul(spr_topoffset, FixedMul(spriteyscale, this_scale)); + + if (oldthing->scale != oldthing->old_scale) // Interpolate heights in reverse gravity when scaling mobjs + gz = interp.z + FixedMul(oldthing->height, FixedDiv(interp.scale, oldthing->scale)) - FixedMul(spr_topoffset, FixedMul(spriteyscale, this_scale)); + else + gz = interp.z + oldthing->height - FixedMul(spr_topoffset, FixedMul(spriteyscale, this_scale)); gzt = gz + FixedMul(spr_height, FixedMul(spriteyscale, this_scale)); } else From 9b296a15476c48a7cdaaadc9fa016051057b4d15 Mon Sep 17 00:00:00 2001 From: spherallic Date: Thu, 17 Aug 2023 19:27:33 +0200 Subject: [PATCH 021/195] Disable Makefile deprecation warning for now --- src/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index e1d9cb384..41cef2a17 100644 --- a/src/Makefile +++ b/src/Makefile @@ -392,4 +392,4 @@ else @: endif -$(warning The handwritten GNU Makefile for SRB2 is deprecated, and may be removed in the future. Please consider switching to CMake.) +#$(warning The handwritten GNU Makefile for SRB2 is deprecated, and may be removed in the future. Please consider switching to CMake.) From 66cc6a5f44bfab88ed73f33699bd49ba2f80c4b7 Mon Sep 17 00:00:00 2001 From: spherallic Date: Thu, 17 Aug 2023 19:31:55 +0200 Subject: [PATCH 022/195] Correct flags for partially intangible FOFs --- src/p_spec.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/p_spec.c b/src/p_spec.c index 169f129b9..b4f6cdb3f 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -6565,10 +6565,10 @@ void P_SpawnSpecials(boolean fromnetsave) //Cutting options if (ffloorflags & FOF_RENDERALL) { - //If inside is visible, cut inner walls - if ((lines[i].args[1] < 255) || (lines[i].args[3] & TMFA_SPLAT) || (lines[i].args[4] & TMFT_VISIBLEFROMINSIDE)) + //If inside is visible from the outside, cut inner walls + if (lines[i].args[1] < 255 || (lines[i].args[3] & TMFA_SPLAT)) ffloorflags |= FOF_CUTEXTRA|FOF_EXTRA; - else + else if (!(lines[i].args[3] & TMFT_VISIBLEFROMINSIDE)) ffloorflags |= FOF_CUTLEVEL; } @@ -6624,20 +6624,19 @@ void P_SpawnSpecials(boolean fromnetsave) if (lines[i].args[4] & TMFC_SPLAT) ffloorflags |= FOF_SPLAT; - //If inside is visible, cut inner walls - if (lines[i].args[1] < 0xff || (lines[i].args[3] & TMFT_VISIBLEFROMINSIDE) || (lines[i].args[4] & TMFC_SPLAT)) + //If inside is visible from the outside, cut inner walls + if (lines[i].args[1] < 255 || (lines[i].args[4] & TMFC_SPLAT)) ffloorflags |= FOF_CUTEXTRA|FOF_EXTRA; - else - ffloorflags |= FOF_CUTLEVEL; - - //If player can enter it, render insides - if (lines[i].args[3] & TMFT_VISIBLEFROMINSIDE) + //If player can view it from the inside, render insides + else if (lines[i].args[3] & TMFT_VISIBLEFROMINSIDE) { if (ffloorflags & FOF_RENDERPLANES) ffloorflags |= FOF_BOTHPLANES; if (ffloorflags & FOF_RENDERSIDES) ffloorflags |= FOF_ALLSIDES; } + else + ffloorflags |= FOF_CUTLEVEL; P_AddFakeFloorsByLine(i, lines[i].args[1], lines[i].args[2], ffloorflags, secthinkers); if (lines[i].args[4] & TMFC_AIRBOB) @@ -6688,10 +6687,10 @@ void P_SpawnSpecials(boolean fromnetsave) //Cutting options if (ffloorflags & FOF_RENDERALL) { - //If inside is visible, cut inner walls - if ((lines[i].args[1] < 255) || (lines[i].args[3] & TMFA_SPLAT) || (lines[i].args[4] & TMFT_VISIBLEFROMINSIDE)) + //If inside is visible from the outside, cut inner walls + if (lines[i].args[1] < 255 || (lines[i].args[3] & TMFA_SPLAT)) ffloorflags |= FOF_CUTEXTRA|FOF_EXTRA; - else + else if (!(lines[i].args[3] & TMFT_VISIBLEFROMINSIDE)) ffloorflags |= FOF_CUTLEVEL; } From 07ef7c46392c9fffd8f8a3ea6fd2b4c555970901 Mon Sep 17 00:00:00 2001 From: spherallic Date: Thu, 17 Aug 2023 20:15:03 +0200 Subject: [PATCH 023/195] Prevent FOF alpha from wrapping around in OpenGL --- src/hardware/hw_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 36ff86abd..d83ee710d 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -1699,7 +1699,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom if ((rover->fofflags & FOF_TRANSLUCENT && !(rover->fofflags & FOF_SPLAT)) || rover->blend) { blendmode = rover->blend ? HWR_GetBlendModeFlag(rover->blend) : PF_Translucent; - Surf.PolyColor.s.alpha = (UINT8)rover->alpha-1 > 255 ? 255 : rover->alpha-1; + Surf.PolyColor.s.alpha = max(0, min(rover->alpha, 255)); } if (gl_frontsector->numlights) @@ -1822,7 +1822,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom if ((rover->fofflags & FOF_TRANSLUCENT && !(rover->fofflags & FOF_SPLAT)) || rover->blend) { blendmode = rover->blend ? HWR_GetBlendModeFlag(rover->blend) : PF_Translucent; - Surf.PolyColor.s.alpha = (UINT8)rover->alpha-1 > 255 ? 255 : rover->alpha-1; + Surf.PolyColor.s.alpha = max(0, min(rover->alpha, 255)); } if (gl_backsector->numlights) @@ -3095,7 +3095,7 @@ static void HWR_Subsector(size_t num) false, *rover->bottomheight, *gl_frontsector->lightlist[light].lightlevel, - rover->alpha-1 > 255 ? 255 : rover->alpha-1, rover->master->frontsector, + max(0, min(rover->alpha, 255)), rover->master->frontsector, HWR_RippleBlend(gl_frontsector, rover, false) | (rover->blend ? HWR_GetBlendModeFlag(rover->blend) : PF_Translucent), false, *gl_frontsector->lightlist[light].extra_colormap); } @@ -3141,7 +3141,7 @@ static void HWR_Subsector(size_t num) true, *rover->topheight, *gl_frontsector->lightlist[light].lightlevel, - rover->alpha-1 > 255 ? 255 : rover->alpha-1, rover->master->frontsector, + max(0, min(rover->alpha, 255)), rover->master->frontsector, HWR_RippleBlend(gl_frontsector, rover, false) | (rover->blend ? HWR_GetBlendModeFlag(rover->blend) : PF_Translucent), false, *gl_frontsector->lightlist[light].extra_colormap); } From 623fa126ad73d5be389816a74c61dafcebe278dd Mon Sep 17 00:00:00 2001 From: spherallic Date: Fri, 18 Aug 2023 15:08:12 +0200 Subject: [PATCH 024/195] Fix backside ceiling vertex slopes --- src/p_slopes.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/p_slopes.c b/src/p_slopes.c index 6aca116a5..1c0ee81a7 100644 --- a/src/p_slopes.c +++ b/src/p_slopes.c @@ -566,6 +566,7 @@ static void line_SpawnViaMapthingVertexes(const int linenum, const boolean spawn case TMSP_BACKCEILING: slopetoset = &line->backsector->c_slope; side = &sides[line->sidenum[1]]; + break; default: return; } From 93f11508fc5298f04fb9b3f53aa8a2e3385cd94b Mon Sep 17 00:00:00 2001 From: bitten2up Date: Sat, 19 Aug 2023 19:52:10 -0500 Subject: [PATCH 025/195] remove stray else --- src/sdl/i_video.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index d2fbb9006..4cac59ced 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -1593,7 +1593,6 @@ boolean VID_CheckRenderer(void) else if (vid.glstate == VID_GL_LIBRARY_ERROR) rendererchanged = false; } - else #endif if (!contextcreated) From 7ef7de1bc58a87c2e7131a60bc26e04f76ff3114 Mon Sep 17 00:00:00 2001 From: Sal Date: Sun, 20 Aug 2023 03:16:14 +0000 Subject: [PATCH 026/195] Level select cheat fixes --- src/d_netcmd.c | 1 + src/m_cond.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 9d4156e1d..33281e992 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -1925,6 +1925,7 @@ static void Command_Map_f(void) newresetplayers = ! COM_CheckParm("-noresetplayers"); prevent_cheat = !( usedCheats ) && !( option_force || cv_debug ); + set_cheated = false; if (!( netgame || multiplayer )) { diff --git a/src/m_cond.c b/src/m_cond.c index 3dfb1dceb..6c87ebf6e 100644 --- a/src/m_cond.c +++ b/src/m_cond.c @@ -528,7 +528,7 @@ UINT8 M_CampaignWarpIsCheat(INT32 gt, INT32 mapnum, gamedata_t *data) } // It's only a cheat if you've never been there. - return (!(data->mapvisited[mapnum])); + return (!(data->mapvisited[mapnum-1])); } INT32 M_CountEmblems(gamedata_t *data) From d589953fc4287ee998f6751553e018bf367e9b2d Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Sat, 19 Aug 2023 23:39:54 -0400 Subject: [PATCH 027/195] Fix P_WriteSkincolor --- src/p_setup.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/p_setup.c b/src/p_setup.c index 13187bb41..77f5370dd 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -50,6 +50,7 @@ #include "m_random.h" #include "dehacked.h" // for map headers +#include "deh_tables.h" // FREE_SKINCOLORS #include "r_main.h" #include "m_cond.h" // for emblems @@ -1266,12 +1267,19 @@ static void P_WriteDuplicateText(const char *text, char **target) static void P_WriteSkincolor(INT32 constant, char **target) { + const char *color_name; + if (constant <= SKINCOLOR_NONE || constant >= (INT32)numskincolors) return; + if (constant >= SKINCOLOR_FIRSTFREESLOT) + color_name = FREE_SKINCOLORS[constant - SKINCOLOR_FIRSTFREESLOT]; + else + color_name = COLOR_ENUMS[constant]; + P_WriteDuplicateText( - va("SKINCOLOR_%s", skincolors[constant].name), + va("SKINCOLOR_%s", color_name), target ); } From 9d9b6d83c25a74ab7635413eb9185f89aa0ac5cc Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Sat, 19 Aug 2023 23:58:43 -0400 Subject: [PATCH 028/195] Don't NiGHTS pull emblems you can't collect --- src/p_inter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_inter.c b/src/p_inter.c index 74ca6972f..271b6ebc4 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -1144,7 +1144,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) if (!(mo2->type == MT_RING || mo2->type == MT_COIN || mo2->type == MT_BLUESPHERE || mo2->type == MT_BOMBSPHERE || mo2->type == MT_NIGHTSCHIP || mo2->type == MT_NIGHTSSTAR - || ((mo2->type == MT_EMBLEM) && (mo2->reactiontime & GE_NIGHTSPULL)))) + || ((mo2->type == MT_EMBLEM) && (mo2->reactiontime & GE_NIGHTSPULL) && P_CanPickupEmblem(player, mo2->health - 1) && !P_EmblemWasCollected(mo2->health - 1)))) continue; // Yay! The thing's in reach! Pull it in! From 909e07be65d74eb50fc7a41b27852ae387475738 Mon Sep 17 00:00:00 2001 From: James R Date: Sun, 6 Aug 2023 19:34:50 -0700 Subject: [PATCH 029/195] Rename HAVE_STRLCPY to SRB2_HAVE_STRLCPY, fix non-glibc compile - Fix compile with msvcrt - Fix compile with SDL 2.28.2 --- src/doomtype.h | 12 ++++++++---- src/string.c | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/doomtype.h b/src/doomtype.h index dd5fb0f8d..4321c707d 100644 --- a/src/doomtype.h +++ b/src/doomtype.h @@ -122,9 +122,13 @@ int endswith (const char *base, const char *tag); #define HAVE_DOSSTR_FUNCS #endif -// glibc 2.38: added strlcpy and strlcat to _DEFAULT_SOURCE -#if defined (__APPLE__) || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 38) -#define HAVE_STRLCPY +#if defined (__APPLE__) + #define SRB2_HAVE_STRLCPY +#elif defined (__GLIBC_PREREQ) + // glibc 2.38: added strlcpy and strlcat to _DEFAULT_SOURCE + #if __GLIBC_PREREQ(2, 38) + #define SRB2_HAVE_STRLCPY + #endif #endif #ifndef HAVE_DOSSTR_FUNCS @@ -134,7 +138,7 @@ int strlwr(char *n); // from dosstr.c #include // for size_t -#ifndef HAVE_STRLCPY +#ifndef SRB2_HAVE_STRLCPY size_t strlcat(char *dst, const char *src, size_t siz); size_t strlcpy(char *dst, const char *src, size_t siz); #endif diff --git a/src/string.c b/src/string.c index cbc8ea582..2f16fa4c6 100644 --- a/src/string.c +++ b/src/string.c @@ -15,7 +15,7 @@ #include #include "doomdef.h" -#ifndef HAVE_STRLCPY +#ifndef SRB2_HAVE_STRLCPY // Like the OpenBSD version, but it doesn't check for src not being a valid // C string. From 2f1db66e78975f265bd7e3f9064398928090130f Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Sun, 20 Aug 2023 07:23:07 -0400 Subject: [PATCH 030/195] Fix drawing of final color --- src/m_menu.c | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/src/m_menu.c b/src/m_menu.c index 3451b90d6..ff9d04c53 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -12183,21 +12183,36 @@ colordraw: { for (i = 0; i < 16; i++) { - if (skincolors[mc->color].accessible && !stoprow) + if (skincolors[mc->color].accessible) { M_DrawColorRamp(x + i*w, y + j*16, w, 1, skincolors[mc->color]); - if (mc->color == setupm_fakecolor->color) // store current color position - { - cx = x + i*w; - cy = y + j*16; - } + + if (mc == setupm_fakecolor) // store current color position + { + cx = x + i*w; + cy = y + j*16; + } } - mc = mc->next; - while (!skincolors[mc->color].accessible && !stoprow) // Find accessible color after this one + + if (stoprow) + { + break; + } + + // Find accessible color after this one + do { mc = mc->next; - if (mc == menucolortail) stoprow = true; - } + if (mc == menucolortail) + { + stoprow = true; + } + } while (!skincolors[mc->color].accessible && !stoprow); + } + + if (stoprow) + { + break; } } From 4d1e6df2d7c7e0c62d76e32ace11cd6b05af602e Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Sun, 20 Aug 2023 11:28:39 -0400 Subject: [PATCH 031/195] Fix color grid input bugs There's still some slight awkwardness trying to wrap downwards into uneven row grids, but this is significantly better and this already took up way more time than I wanted it to. --- src/m_menu.c | 205 +++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 190 insertions(+), 15 deletions(-) diff --git a/src/m_menu.c b/src/m_menu.c index ff9d04c53..653152451 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -12054,6 +12054,136 @@ static INT32 setupm_fakeskin; static menucolor_t *setupm_fakecolor; static boolean colorgrid; +#define COLOR_GRID_ROW_SIZE (16) + +static UINT16 M_GetColorGridIndex(UINT16 color) +{ + menucolor_t *look; + UINT16 i = 0; + + if (!skincolors[color].accessible) + { + return 0; + } + + for (look = menucolorhead; ; i++, look = look->next) + { + while (!skincolors[look->color].accessible) // skip inaccessible colors + { + if (look == menucolortail) + { + return 0; + } + + look = look->next; + } + + if (look->color == color) + { + return i; + } + + if (look == menucolortail) + { + return 0; + } + } +} + +static INT32 M_GridIndexToX(UINT16 index) +{ + return (index % COLOR_GRID_ROW_SIZE); +} + +static INT32 M_GridIndexToY(UINT16 index) +{ + return (index / COLOR_GRID_ROW_SIZE); +} + +static UINT16 M_ColorGridLen(void) +{ + menucolor_t *look; + UINT16 i = 0; + + for (look = menucolorhead; ; i++) + { + do + { + if (look == menucolortail) + { + return i; + } + + look = look->next; + } + while (!skincolors[look->color].accessible); // skip inaccessible colors + } +} + +static UINT16 M_GridPosToGridIndex(INT32 x, INT32 y) +{ + const UINT16 grid_len = M_ColorGridLen(); + const UINT16 grid_height = ((grid_len - 1) / COLOR_GRID_ROW_SIZE) + 1; + const UINT16 last_row_len = COLOR_GRID_ROW_SIZE - ((grid_height * COLOR_GRID_ROW_SIZE) - grid_len); + + UINT16 row_len = COLOR_GRID_ROW_SIZE; + UINT16 new_index = 0; + + while (y < 0) + { + y += grid_height; + } + y = (y % grid_height); + + if (y >= grid_height-1 && last_row_len > 0) + { + row_len = last_row_len; + } + + while (x < 0) + { + x += row_len; + } + x = (x % row_len); + + new_index = (y * COLOR_GRID_ROW_SIZE) + x; + if (new_index >= grid_len) + { + new_index = grid_len - 1; + } + + return new_index; +} + +static menucolor_t *M_GridIndexToMenuColor(UINT16 index) +{ + menucolor_t *look = menucolorhead; + UINT16 i = 0; + + for (look = menucolorhead; ; i++, look = look->next) + { + while (!skincolors[look->color].accessible) // skip inaccessible colors + { + if (look == menucolortail) + { + return menucolorhead; + } + + look = look->next; + } + + if (i == index) + { + return look; + } + + if (look == menucolortail) + { + return menucolorhead; + } + } +} + static void M_DrawSetupMultiPlayerMenu(void) { INT32 x, y, cursory = 0, flags = 0; @@ -12333,15 +12463,16 @@ static void M_HandleSetupMultiPlayer(INT32 choice) case KEY_DOWNARROW: case KEY_UPARROW: { - UINT8 i; if (itemOn == 2 && colorgrid) { - for (i = 0; i < 16; i++) - { - setupm_fakecolor = (choice == KEY_UPARROW) ? setupm_fakecolor->prev : setupm_fakecolor->next; - while (!skincolors[setupm_fakecolor->color].accessible) // skip inaccessible colors - setupm_fakecolor = (choice == KEY_UPARROW) ? setupm_fakecolor->prev : setupm_fakecolor->next; - } + UINT16 index = M_GetColorGridIndex(setupm_fakecolor->color); + INT32 x = M_GridIndexToX(index); + INT32 y = M_GridIndexToY(index); + + y += (choice == KEY_UPARROW) ? -1 : 1; + + index = M_GridPosToGridIndex(x, y); + setupm_fakecolor = M_GridIndexToMenuColor(index); } else if (choice == KEY_UPARROW) M_PrevOpt(); @@ -12368,8 +12499,23 @@ static void M_HandleSetupMultiPlayer(INT32 choice) } else if (itemOn == 2) // player color { + if (colorgrid) + { + UINT16 index = M_GetColorGridIndex(setupm_fakecolor->color); + INT32 x = M_GridIndexToX(index); + INT32 y = M_GridIndexToY(index); + + x--; + + index = M_GridPosToGridIndex(x, y); + setupm_fakecolor = M_GridIndexToMenuColor(index); + } + else + { + setupm_fakecolor = setupm_fakecolor->prev; + } + S_StartSound(NULL,sfx_menu1); // Tails - setupm_fakecolor = setupm_fakecolor->prev; } break; @@ -12408,8 +12554,23 @@ static void M_HandleSetupMultiPlayer(INT32 choice) } else if (itemOn == 2) // player color { + if (colorgrid) + { + UINT16 index = M_GetColorGridIndex(setupm_fakecolor->color); + INT32 x = M_GridIndexToX(index); + INT32 y = M_GridIndexToY(index); + + x++; + + index = M_GridPosToGridIndex(x, y); + setupm_fakecolor = M_GridIndexToMenuColor(index); + } + else + { + setupm_fakecolor = setupm_fakecolor->next; + } + S_StartSound(NULL,sfx_menu1); // Tails - setupm_fakecolor = setupm_fakecolor->next; } break; @@ -12419,13 +12580,28 @@ static void M_HandleSetupMultiPlayer(INT32 choice) UINT8 i; if (itemOn == 2) // player color { - S_StartSound(NULL,sfx_menu1); - for (i = 0; i < (colorgrid ? 64 : 13); i++) // or (282-charw)/(2*indexwidth) + if (colorgrid) { - setupm_fakecolor = (choice == KEY_PGUP) ? setupm_fakecolor->prev : setupm_fakecolor->next; - while (!skincolors[setupm_fakecolor->color].accessible) // skip inaccessible colors - setupm_fakecolor = (choice == KEY_PGUP) ? setupm_fakecolor->prev : setupm_fakecolor->next; + UINT16 index = M_GetColorGridIndex(setupm_fakecolor->color); + INT32 x = M_GridIndexToX(index); + INT32 y = M_GridIndexToY(index); + + y += (choice == KEY_UPARROW) ? -4 : 4; + + index = M_GridPosToGridIndex(x, y); + setupm_fakecolor = M_GridIndexToMenuColor(index); } + else + { + for (i = 0; i < 13; i++) // or (282-charw)/(2*indexwidth) + { + setupm_fakecolor = (choice == KEY_PGUP) ? setupm_fakecolor->prev : setupm_fakecolor->next; + while (!skincolors[setupm_fakecolor->color].accessible) // skip inaccessible colors + setupm_fakecolor = (choice == KEY_PGUP) ? setupm_fakecolor->prev : setupm_fakecolor->next; + } + } + + S_StartSound(NULL, sfx_menu1); // Tails } } break; @@ -12455,7 +12631,6 @@ static void M_HandleSetupMultiPlayer(INT32 choice) } } break; - break; case KEY_DEL: if (itemOn == 0 && (l = strlen(setupm_name))!=0) From 259732cccb4b7e37338bfa347bf1d67c37fc46d0 Mon Sep 17 00:00:00 2001 From: spherallic Date: Sun, 20 Aug 2023 17:42:27 +0200 Subject: [PATCH 032/195] Make FOF fades use 0-255 alpha, not 1-256 --- src/p_spec.c | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/src/p_spec.c b/src/p_spec.c index b4f6cdb3f..45619014d 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -3286,19 +3286,18 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec) foundrover = true; // If fading an invisible FOF whose render flags we did not yet set, - // initialize its alpha to 1 - // for relative alpha calc + // initialize its alpha to 0 for relative alpha calculation if (!(line->args[3] & TMST_DONTDOTRANSLUCENT) && // do translucent (rover->spawnflags & FOF_NOSHADE) && // do not include light blocks, which don't set FOF_NOSHADE !(rover->spawnflags & FOF_RENDERSIDES) && !(rover->spawnflags & FOF_RENDERPLANES) && !(rover->fofflags & FOF_RENDERALL)) - rover->alpha = 1; + rover->alpha = 0; P_RemoveFakeFloorFader(rover); P_FadeFakeFloor(rover, rover->alpha, - max(1, min(256, (line->args[3] & TMST_RELATIVE) ? rover->alpha + destvalue : destvalue)), + max(0, min(255, (line->args[3] & TMST_RELATIVE) ? rover->alpha + destvalue : destvalue)), 0, // set alpha immediately false, NULL, // tic-based logic false, // do not handle FOF_EXISTS @@ -3372,19 +3371,18 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec) else { // If fading an invisible FOF whose render flags we did not yet set, - // initialize its alpha to 1 - // for relative alpha calc + // initialize its alpha to 1 for relative alpha calculation if (!(line->args[4] & TMFT_DONTDOTRANSLUCENT) && // do translucent (rover->spawnflags & FOF_NOSHADE) && // do not include light blocks, which don't set FOF_NOSHADE !(rover->spawnflags & FOF_RENDERSIDES) && !(rover->spawnflags & FOF_RENDERPLANES) && !(rover->fofflags & FOF_RENDERALL)) - rover->alpha = 1; + rover->alpha = 0; P_RemoveFakeFloorFader(rover); P_FadeFakeFloor(rover, rover->alpha, - max(1, min(256, (line->args[4] & TMFT_RELATIVE) ? rover->alpha + destvalue : destvalue)), + max(0, min(255, (line->args[4] & TMFT_RELATIVE) ? rover->alpha + destvalue : destvalue)), 0, // set alpha immediately false, NULL, // tic-based logic !(line->args[4] & TMFT_DONTDOEXISTS), // do not handle FOF_EXISTS @@ -7755,15 +7753,14 @@ static boolean P_FadeFakeFloor(ffloor_t *rover, INT16 sourcevalue, INT16 destval if (rover->master->special == 258) // Laser block return false; - // If fading an invisible FOF whose render flags we did not yet set, - // initialize its alpha to 1 + // If fading an invisible FOF whose render flags we did not yet set, initialize its alpha to 1 if (dotranslucent && (rover->spawnflags & FOF_NOSHADE) && // do not include light blocks, which don't set FOF_NOSHADE !(rover->fofflags & FOF_FOG) && // do not include fog !(rover->spawnflags & FOF_RENDERSIDES) && !(rover->spawnflags & FOF_RENDERPLANES) && !(rover->fofflags & FOF_RENDERALL)) - rover->alpha = 1; + rover->alpha = 0; if (fadingdata) alpha = fadingdata->alpha; @@ -7849,7 +7846,7 @@ static boolean P_FadeFakeFloor(ffloor_t *rover, INT16 sourcevalue, INT16 destval { if (doexists && !(rover->spawnflags & FOF_BUSTUP)) { - if (alpha <= 1) + if (alpha <= 0) rover->fofflags &= ~FOF_EXISTS; else rover->fofflags |= FOF_EXISTS; @@ -7861,7 +7858,7 @@ static boolean P_FadeFakeFloor(ffloor_t *rover, INT16 sourcevalue, INT16 destval if (dotranslucent && !(rover->fofflags & FOF_FOG)) { - if (alpha >= 256) + if (alpha >= 255) { if (!(rover->fofflags & FOF_CUTSOLIDS) && (rover->spawnflags & FOF_CUTSOLIDS)) @@ -7961,11 +7958,11 @@ static boolean P_FadeFakeFloor(ffloor_t *rover, INT16 sourcevalue, INT16 destval else // clamp fadingdata->alpha to software's alpha levels { if (alpha < 12) - rover->alpha = destvalue < 12 ? destvalue : 1; // Don't even draw it + rover->alpha = destvalue < 12 ? destvalue : 0; // Don't even draw it else if (alpha < 38) rover->alpha = destvalue >= 12 && destvalue < 38 ? destvalue : 25; else if (alpha < 64) - rover->alpha = destvalue >=38 && destvalue < 64 ? destvalue : 51; + rover->alpha = destvalue >= 38 && destvalue < 64 ? destvalue : 51; else if (alpha < 89) rover->alpha = destvalue >= 64 && destvalue < 89 ? destvalue : 76; else if (alpha < 115) @@ -7981,7 +7978,7 @@ static boolean P_FadeFakeFloor(ffloor_t *rover, INT16 sourcevalue, INT16 destval else if (alpha < 243) rover->alpha = destvalue >= 217 && destvalue < 243 ? destvalue : 230; else // Opaque - rover->alpha = destvalue >= 243 ? destvalue : 256; + rover->alpha = destvalue >= 243 ? destvalue : 255; } } @@ -8011,17 +8008,16 @@ static void P_AddFakeFloorFader(ffloor_t *rover, size_t sectornum, size_t ffloor { fade_t *d; - // If fading an invisible FOF whose render flags we did not yet set, - // initialize its alpha to 1 + // If fading an invisible FOF whose render flags we did not yet set, initialize its alpha to 1 if (dotranslucent && (rover->spawnflags & FOF_NOSHADE) && // do not include light blocks, which don't set FOF_NOSHADE !(rover->spawnflags & FOF_RENDERSIDES) && !(rover->spawnflags & FOF_RENDERPLANES) && !(rover->fofflags & FOF_RENDERALL)) - rover->alpha = 1; + rover->alpha = 0; // already equal, nothing to do - if (rover->alpha == max(1, min(256, relative ? rover->alpha + destvalue : destvalue))) + if (rover->alpha == max(0, min(255, relative ? rover->alpha + destvalue : destvalue))) return; d = Z_Malloc(sizeof *d, PU_LEVSPEC, NULL); @@ -8032,7 +8028,7 @@ static void P_AddFakeFloorFader(ffloor_t *rover, size_t sectornum, size_t ffloor d->ffloornum = (UINT32)ffloornum; d->alpha = d->sourcevalue = rover->alpha; - d->destvalue = max(1, min(256, relative ? rover->alpha + destvalue : destvalue)); // rover->alpha is 1-256 + d->destvalue = max(0, min(255, relative ? rover->alpha + destvalue : destvalue)); // rover->alpha is 0-255 if (ticbased) { From f62c2f4c7541e887705fe58248c141b3d2e82b93 Mon Sep 17 00:00:00 2001 From: spherallic Date: Sun, 20 Aug 2023 17:55:06 +0200 Subject: [PATCH 033/195] Fix arg # typos for "visible from inside" checks --- src/p_spec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/p_spec.c b/src/p_spec.c index 45619014d..28ecc60f4 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -6566,7 +6566,7 @@ void P_SpawnSpecials(boolean fromnetsave) //If inside is visible from the outside, cut inner walls if (lines[i].args[1] < 255 || (lines[i].args[3] & TMFA_SPLAT)) ffloorflags |= FOF_CUTEXTRA|FOF_EXTRA; - else if (!(lines[i].args[3] & TMFT_VISIBLEFROMINSIDE)) + else if (!(lines[i].args[4] & TMFT_VISIBLEFROMINSIDE)) ffloorflags |= FOF_CUTLEVEL; } @@ -6688,7 +6688,7 @@ void P_SpawnSpecials(boolean fromnetsave) //If inside is visible from the outside, cut inner walls if (lines[i].args[1] < 255 || (lines[i].args[3] & TMFA_SPLAT)) ffloorflags |= FOF_CUTEXTRA|FOF_EXTRA; - else if (!(lines[i].args[3] & TMFT_VISIBLEFROMINSIDE)) + else if (!(lines[i].args[4] & TMFT_VISIBLEFROMINSIDE)) ffloorflags |= FOF_CUTLEVEL; } From 9c8dd5475111d2b66f1a9a1d18836e9f14703ecb Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Sun, 20 Aug 2023 11:56:55 -0400 Subject: [PATCH 034/195] Fix color grid not extending to the very bottom --- src/m_menu.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/m_menu.c b/src/m_menu.c index 653152451..6a694b8e3 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -12302,16 +12302,23 @@ colordraw: boolean stoprow = false; menucolor_t *mc; // Last accessed color + const UINT16 grid_len = M_ColorGridLen(); + const UINT16 grid_end_y = M_GridIndexToY(grid_len - 1); + + INT32 grid_select = M_GetColorGridIndex(setupm_fakecolor->color); + INT32 grid_select_y = M_GridIndexToY(grid_select); + x = 132; y = 66; - pos = min(max(0, 16*((M_GetColorIndex(setupm_fakecolor->color)-1)/16) - 64), 16*(M_GetColorIndex(menucolortail->color)/16-1) - 128); - mc = M_GetColorFromIndex(pos); + + pos = M_GridPosToGridIndex(0, max(0, min(grid_select_y - 3, grid_end_y - 7))); + mc = M_GridIndexToMenuColor(pos); // Draw grid V_DrawFill(x-2, y-2, 132, 132, 159); for (j = 0; j < 8; j++) { - for (i = 0; i < 16; i++) + for (i = 0; i < COLOR_GRID_ROW_SIZE; i++) { if (skincolors[mc->color].accessible) { From 40c37ce4c2997dbb3487dcda00b9dfc11d30c895 Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Sun, 20 Aug 2023 12:05:58 -0400 Subject: [PATCH 035/195] Revert left/right movement --- src/m_menu.c | 34 ++-------------------------------- 1 file changed, 2 insertions(+), 32 deletions(-) diff --git a/src/m_menu.c b/src/m_menu.c index 6a694b8e3..c49442141 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -12506,22 +12506,7 @@ static void M_HandleSetupMultiPlayer(INT32 choice) } else if (itemOn == 2) // player color { - if (colorgrid) - { - UINT16 index = M_GetColorGridIndex(setupm_fakecolor->color); - INT32 x = M_GridIndexToX(index); - INT32 y = M_GridIndexToY(index); - - x--; - - index = M_GridPosToGridIndex(x, y); - setupm_fakecolor = M_GridIndexToMenuColor(index); - } - else - { - setupm_fakecolor = setupm_fakecolor->prev; - } - + setupm_fakecolor = setupm_fakecolor->prev; S_StartSound(NULL,sfx_menu1); // Tails } break; @@ -12561,22 +12546,7 @@ static void M_HandleSetupMultiPlayer(INT32 choice) } else if (itemOn == 2) // player color { - if (colorgrid) - { - UINT16 index = M_GetColorGridIndex(setupm_fakecolor->color); - INT32 x = M_GridIndexToX(index); - INT32 y = M_GridIndexToY(index); - - x++; - - index = M_GridPosToGridIndex(x, y); - setupm_fakecolor = M_GridIndexToMenuColor(index); - } - else - { - setupm_fakecolor = setupm_fakecolor->next; - } - + setupm_fakecolor = setupm_fakecolor->next; S_StartSound(NULL,sfx_menu1); // Tails } break; From 50fc1abf9a0d6721012a42aa6bf53127854aca1c Mon Sep 17 00:00:00 2001 From: spherallic Date: Sun, 20 Aug 2023 18:30:30 +0200 Subject: [PATCH 036/195] Revert invcolor tweaks for Red/Rosy/Lavender --- src/info.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/info.c b/src/info.c index abcf4b499..54f3822e2 100644 --- a/src/info.c +++ b/src/info.c @@ -21604,15 +21604,15 @@ skincolor_t skincolors[MAXSKINCOLORS] = { {"Moss", {0x58, 0x58, 0x59, 0x59, 0x5a, 0x5a, 0x5b, 0x5b, 0x5b, 0x5c, 0x5d, 0x5d, 0x5e, 0x5e, 0x5f, 0x5f}, SKINCOLOR_BEIGE, 13, V_GREENMAP, true}, // SKINCOLOR_MOSS {"Azure", {0x90, 0x90, 0x91, 0x91, 0xaa, 0xaa, 0xab, 0xab, 0xab, 0xac, 0xad, 0xad, 0xae, 0xae, 0xaf, 0xaf}, SKINCOLOR_PINK, 5, V_AZUREMAP, true}, // SKINCOLOR_AZURE {"Eggplant", { 4, 8, 11, 11, 16, 195, 195, 195, 196, 186, 187, 187, 254, 254, 30, 31}, SKINCOLOR_ROSEBUSH, 5, V_PURPLEMAP, true}, // SKINCOLOR_EGGPLANT - {"Lavender", {0xc0, 0xc0, 0xc1, 0xc1, 0xc2, 0xc2, 0xc3, 0xc3, 0xc3, 0xc4, 0xc5, 0xc5, 0xc6, 0xc6, 0xc7, 0xc7}, SKINCOLOR_HEADLIGHT, 8, V_PURPLEMAP, true}, // SKINCOLOR_LAVENDER + {"Lavender", {0xc0, 0xc0, 0xc1, 0xc1, 0xc2, 0xc2, 0xc3, 0xc3, 0xc3, 0xc4, 0xc5, 0xc5, 0xc6, 0xc6, 0xc7, 0xc7}, SKINCOLOR_GOLD, 4, V_PURPLEMAP, true}, // SKINCOLOR_LAVENDER // Viv's vivid colours (toast 21/07/17) // Tweaks & additions (Lach, sphere, Alice, MotorRoach 26/10/22) {"Ruby", {0xb0, 0xb0, 0xc9, 0xca, 0xcc, 0x26, 0x27, 0x28, 0x29, 0x2a, 0xb9, 0xb9, 0xba, 0xba, 0xbb, 0xfd}, SKINCOLOR_EMERALD, 10, V_REDMAP, true}, // SKINCOLOR_RUBY {"Cherry", { 202, 203, 204, 205, 206, 40, 41, 42, 43, 44, 186, 187, 28, 29, 30, 31}, SKINCOLOR_MIDNIGHT, 10, V_REDMAP, true}, // SKINCOLOR_CHERRY {"Salmon", {0xd0, 0xd0, 0xd1, 0xd2, 0x20, 0x21, 0x24, 0x25, 0x26, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e}, SKINCOLOR_FOREST, 6, V_REDMAP, true}, // SKINCOLOR_SALMON - {"Pepper", { 210, 32, 33, 34, 35, 35, 36, 37, 38, 39, 41, 43, 45, 45, 46, 47}, SKINCOLOR_GREEN, 10, V_REDMAP, true}, // SKINCOLOR_PEPPER - {"Red", {0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x47, 0x2e, 0x2f}, SKINCOLOR_MASTER, 8, V_REDMAP, true}, // SKINCOLOR_RED + {"Pepper", { 210, 32, 33, 34, 35, 35, 36, 37, 38, 39, 41, 43, 45, 45, 46, 47}, SKINCOLOR_MASTER, 8, V_REDMAP, true}, // SKINCOLOR_PEPPER + {"Red", {0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x47, 0x2e, 0x2f}, SKINCOLOR_GREEN, 10, V_REDMAP, true}, // SKINCOLOR_RED {"Crimson", {0x27, 0x27, 0x28, 0x28, 0x29, 0x2a, 0x2b, 0x2b, 0x2c, 0x2d, 0x2e, 0x2e, 0x2e, 0x2f, 0x2f, 0x1f}, SKINCOLOR_ICY, 10, V_REDMAP, true}, // SKINCOLOR_CRIMSON {"Flame", {0x31, 0x32, 0x33, 0x36, 0x22, 0x22, 0x25, 0x25, 0x25, 0xcd, 0xcf, 0xcf, 0xc5, 0xc5, 0xc7, 0xc7}, SKINCOLOR_PURPLE, 8, V_REDMAP, true}, // SKINCOLOR_FLAME {"Garnet", { 0, 83, 50, 53, 34, 35, 37, 38, 39, 40, 42, 44, 45, 46, 47, 47}, SKINCOLOR_AQUAMARINE, 6, V_REDMAP, true}, // SKINCOLOR_GARNET @@ -21626,7 +21626,7 @@ skincolor_t skincolors[MAXSKINCOLORS] = { {"Orange", { 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 42, 44, 45, 46, 46}, SKINCOLOR_BLUE, 4, V_ORANGEMAP, true}, // SKINCOLOR_ORANGE {"Pumpkin", { 51, 52, 53, 54, 56, 58, 59, 59, 61, 61, 63, 45, 46, 47, 47, 31}, SKINCOLOR_ARCTIC, 12, V_ORANGEMAP, true}, // SKINCOLOR_PUMPKIN {"Rust", {0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3c, 0x3d, 0x3d, 0x3d, 0x3f, 0x2c, 0x2d, 0x47, 0x2e, 0x2f, 0x2f}, SKINCOLOR_YOGURT, 8, V_ORANGEMAP, true}, // SKINCOLOR_RUST - {"Gold", {0x51, 0x51, 0x54, 0x54, 0x41, 0x42, 0x43, 0x43, 0x44, 0x45, 0x46, 0x3f, 0x2d, 0x2e, 0x2f, 0x2f}, SKINCOLOR_MAUVE, 8, V_YELLOWMAP, true}, // SKINCOLOR_GOLD + {"Gold", {0x51, 0x51, 0x54, 0x54, 0x41, 0x42, 0x43, 0x43, 0x44, 0x45, 0x46, 0x3f, 0x2d, 0x2e, 0x2f, 0x2f}, SKINCOLOR_LAVENDER, 10, V_YELLOWMAP, true}, // SKINCOLOR_GOLD {"Topaz", { 0, 81, 83, 73, 74, 74, 65, 52, 53, 54, 56, 58, 60, 42, 43, 45}, SKINCOLOR_METEORITE, 10, V_YELLOWMAP, true}, // SKINCOLOR_TOPAZ {"Sandy", {0x53, 0x40, 0x41, 0x42, 0x43, 0xe6, 0xe9, 0xe9, 0xea, 0xec, 0xec, 0xc6, 0xc6, 0xc7, 0xc7, 0xfe}, SKINCOLOR_SKY, 8, V_YELLOWMAP, true}, // SKINCOLOR_SANDY {"Goldenrod", { 0, 80, 81, 81, 83, 73, 73, 64, 65, 66, 67, 68, 69, 62, 44, 45}, SKINCOLOR_MAJESTY, 8, V_YELLOWMAP, true}, // SKINCOLOR_GOLDENROD @@ -21638,18 +21638,18 @@ skincolor_t skincolors[MAXSKINCOLORS] = { {"Peridot", {0x58, 0x58, 0xbc, 0xbc, 0xbd, 0xbd, 0xbe, 0xbe, 0xbe, 0xbf, 0x5e, 0x5e, 0x5f, 0x5f, 0x77, 0x77}, SKINCOLOR_COBALT, 2, V_PERIDOTMAP, true}, // SKINCOLOR_PERIDOT {"Apple", {0x49, 0x49, 0xbc, 0xbd, 0xbe, 0xbe, 0xbe, 0x67, 0x69, 0x6a, 0x6b, 0x6b, 0x6c, 0x6d, 0x6d, 0x6d}, SKINCOLOR_RASPBERRY, 13, V_PERIDOTMAP, true}, // SKINCOLOR_APPLE {"Chartreuse", { 80, 82, 72, 73, 188, 188, 113, 114, 114, 125, 126, 137, 138, 139, 253, 254}, SKINCOLOR_NOBLE, 9, V_PERIDOTMAP, true}, // SKINCOLOR_CHARTREUSE - {"Green", {0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f}, SKINCOLOR_PEPPER, 8, V_GREENMAP, true}, // SKINCOLOR_GREEN + {"Green", {0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f}, SKINCOLOR_RED, 6, V_GREENMAP, true}, // SKINCOLOR_GREEN {"Forest", {0x65, 0x66, 0x67, 0x68, 0x69, 0x69, 0x6a, 0x6b, 0x6b, 0x6c, 0x6d, 0x6d, 0x6e, 0x6e, 0x6e, 0x6f}, SKINCOLOR_SALMON, 9, V_GREENMAP, true}, // SKINCOLOR_FOREST {"Shamrock", {0x70, 0x70, 0x71, 0x71, 0x72, 0x72, 0x73, 0x73, 0x73, 0x74, 0x75, 0x75, 0x76, 0x76, 0x77, 0x77}, SKINCOLOR_CRYSTAL, 10, V_GREENMAP, true}, // SKINCOLOR_SHAMROCK - {"Jade", { 128, 120, 121, 122, 122, 113, 114, 114, 115, 116, 117, 118, 119, 110, 111, 30}, SKINCOLOR_ROSY, 7, V_GREENMAP, true}, // SKINCOLOR_JADE - {"Headlight", { 0, 80, 81, 82, 73, 84, 64, 65, 91, 91, 124, 125, 126, 137, 138, 139}, SKINCOLOR_LAVENDER, 10, V_YELLOWMAP, true}, // SKINCOLOR_HEADLIGHT + {"Jade", { 128, 120, 121, 122, 122, 113, 114, 114, 115, 116, 117, 118, 119, 110, 111, 30}, SKINCOLOR_TAFFY, 10, V_GREENMAP, true}, // SKINCOLOR_JADE + {"Headlight", { 0, 80, 81, 82, 73, 84, 64, 65, 91, 91, 124, 125, 126, 137, 138, 139}, SKINCOLOR_MAUVE, 8, V_YELLOWMAP, true}, // SKINCOLOR_HEADLIGHT {"Mint", {0x00, 0x00, 0x58, 0x58, 0x59, 0x62, 0x62, 0x62, 0x64, 0x67, 0x7e, 0x7e, 0x8f, 0x8f, 0x8a, 0x8a}, SKINCOLOR_VIOLET, 5, V_GREENMAP, true}, // SKINCOLOR_MINT - {"Master", { 0, 80, 88, 96, 112, 113, 99, 100, 124, 125, 126, 117, 107, 118, 119, 111}, SKINCOLOR_RED, 6, V_GREENMAP, true}, // SKINCOLOR_MASTER + {"Master", { 0, 80, 88, 96, 112, 113, 99, 100, 124, 125, 126, 117, 107, 118, 119, 111}, SKINCOLOR_PEPPER, 8, V_GREENMAP, true}, // SKINCOLOR_MASTER {"Emerald", { 80, 96, 112, 113, 114, 114, 125, 125, 126, 126, 137, 137, 138, 138, 139, 139}, SKINCOLOR_RUBY, 9, V_GREENMAP, true}, // SKINCOLOR_EMERALD {"Bottle", { 0, 1, 3, 4, 5, 140, 141, 141, 124, 125, 126, 127, 118, 119, 111, 111}, SKINCOLOR_LATTE, 14, V_AQUAMAP, true}, // SKINCOLOR_BOTTLE {"Seafoam", {0x01, 0x58, 0x59, 0x5a, 0x7c, 0x7d, 0x7d, 0x7e, 0x7e, 0x8f, 0x8f, 0x8a, 0x8a, 0x8b, 0xfd, 0xfd}, SKINCOLOR_PLUM, 6, V_AQUAMAP, true}, // SKINCOLOR_SEAFOAM {"Island", { 96, 97, 113, 113, 114, 124, 142, 136, 136, 150, 151, 153, 168, 168, 169, 169}, SKINCOLOR_GALAXY, 7, V_AQUAMAP, true}, // SKINCOLOR_ISLAND - {"Aqua", {0x78, 0x79, 0x7a, 0x7a, 0x7b, 0x7b, 0x7c, 0x7c, 0x7c, 0x7d, 0x7e, 0x7e, 0x7f, 0x7f, 0x76, 0x77}, SKINCOLOR_TAFFY, 10, V_AQUAMAP, true}, // SKINCOLOR_AQUA + {"Aqua", {0x78, 0x79, 0x7a, 0x7a, 0x7b, 0x7b, 0x7c, 0x7c, 0x7c, 0x7d, 0x7e, 0x7e, 0x7f, 0x7f, 0x76, 0x77}, SKINCOLOR_ROSY, 7, V_AQUAMAP, true}, // SKINCOLOR_AQUA {"Teal", {0x78, 0x78, 0x8c, 0x8c, 0x8d, 0x8d, 0x8d, 0x8e, 0x8e, 0x8f, 0x8f, 0x8f, 0x8a, 0x8a, 0x8a, 0x8a}, SKINCOLOR_PEACHY, 7, V_SKYMAP, true}, // SKINCOLOR_TEAL {"Wave", {0x00, 0x78, 0x78, 0x79, 0x8d, 0x87, 0x88, 0x89, 0x89, 0xae, 0xa8, 0xa8, 0xa9, 0xa9, 0xfd, 0xfd}, SKINCOLOR_QUAIL, 5, V_SKYMAP, true}, // SKINCOLOR_WAVE {"Cyan", {0x80, 0x81, 0xff, 0xff, 0x83, 0x83, 0x8d, 0x8d, 0x8d, 0x8e, 0x7e, 0x7f, 0x76, 0x76, 0x77, 0x6e}, SKINCOLOR_APRICOT, 6, V_SKYMAP, true}, // SKINCOLOR_CYAN @@ -21682,12 +21682,12 @@ skincolor_t skincolors[MAXSKINCOLORS] = { {"Violet", {0xd0, 0xd1, 0xd2, 0xca, 0xcc, 0xb8, 0xb9, 0xb9, 0xba, 0xa8, 0xa8, 0xa9, 0xa9, 0xfd, 0xfe, 0xfe}, SKINCOLOR_MINT, 6, V_MAGENTAMAP, true}, // SKINCOLOR_VIOLET {"Royal", { 208, 209, 192, 192, 192, 193, 193, 194, 194, 172, 173, 174, 175, 175, 139, 139}, SKINCOLOR_FANCY, 9, V_PURPLEMAP, true}, // SKINCOLOR_ROYAL {"Lilac", {0x00, 0xd0, 0xd1, 0xd2, 0xd3, 0xc1, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc5, 0xc6, 0xc6, 0xfe, 0x1f}, SKINCOLOR_VAPOR, 4, V_ROSYMAP, true}, // SKINCOLOR_LILAC - {"Mauve", { 176, 177, 178, 192, 193, 194, 195, 195, 196, 185, 185, 186, 186, 187, 187, 253}, SKINCOLOR_GOLD, 4, V_PURPLEMAP, true}, // SKINCOLOR_MAUVE + {"Mauve", { 176, 177, 178, 192, 193, 194, 195, 195, 196, 185, 185, 186, 186, 187, 187, 253}, SKINCOLOR_HEADLIGHT, 8, V_PURPLEMAP, true}, // SKINCOLOR_MAUVE {"Eventide", { 51, 52, 53, 33, 34, 204, 183, 183, 184, 184, 166, 167, 168, 169, 253, 254}, SKINCOLOR_DAYBREAK, 13, V_MAGENTAMAP, true}, // SKINCOLOR_EVENTIDE {"Plum", {0xc8, 0xd3, 0xd5, 0xd6, 0xd7, 0xce, 0xcf, 0xb9, 0xb9, 0xba, 0xba, 0xa9, 0xa9, 0xa9, 0xfd, 0xfe}, SKINCOLOR_MINT, 7, V_ROSYMAP, true}, // SKINCOLOR_PLUM {"Raspberry", {0xc8, 0xc9, 0xca, 0xcb, 0xcb, 0xcc, 0xcd, 0xcd, 0xce, 0xb9, 0xb9, 0xba, 0xba, 0xbb, 0xfe, 0xfe}, SKINCOLOR_APPLE, 13, V_ROSYMAP, true}, // SKINCOLOR_RASPBERRY - {"Taffy", { 1, 176, 176, 177, 178, 179, 202, 203, 204, 204, 205, 206, 207, 44, 45, 46}, SKINCOLOR_AQUA, 1, V_ROSYMAP, true}, // SKINCOLOR_TAFFY - {"Rosy", {0xfc, 0xc8, 0xc8, 0xc9, 0xc9, 0xca, 0xca, 0xcb, 0xcb, 0xcc, 0xcc, 0xcd, 0xcd, 0xce, 0xce, 0xcf}, SKINCOLOR_JADE, 8, V_ROSYMAP, true}, // SKINCOLOR_ROSY + {"Taffy", { 1, 176, 176, 177, 178, 179, 202, 203, 204, 204, 205, 206, 207, 44, 45, 46}, SKINCOLOR_JADE, 8, V_ROSYMAP, true}, // SKINCOLOR_TAFFY + {"Rosy", {0xfc, 0xc8, 0xc8, 0xc9, 0xc9, 0xca, 0xca, 0xcb, 0xcb, 0xcc, 0xcc, 0xcd, 0xcd, 0xce, 0xce, 0xcf}, SKINCOLOR_AQUA, 1, V_ROSYMAP, true}, // SKINCOLOR_ROSY {"Fancy", { 0, 208, 49, 210, 210, 202, 202, 203, 204, 204, 205, 206, 207, 207, 186, 186}, SKINCOLOR_ROYAL, 9, V_ROSYMAP, true}, // SKINCOLOR_FANCY {"Sangria", { 210, 32, 33, 34, 34, 215, 215, 207, 207, 185, 186, 186, 186, 169, 169, 253}, SKINCOLOR_TURQUOISE, 12, V_ROSYMAP, true}, // SKINCOLOR_SANGRIA {"Volcanic", { 35, 38, 41, 42, 44, 46, 46, 169, 169, 159, 253, 254, 30, 30, 31, 31}, SKINCOLOR_BRONZE, 9, V_REDMAP, true}, // SKINCOLOR_VOLCANIC From b52a36f04ca311087d32b064c75f9eb8d2f63133 Mon Sep 17 00:00:00 2001 From: spherallic Date: Sun, 20 Aug 2023 18:38:14 +0200 Subject: [PATCH 037/195] Small tweaks to Foundation and Midnight --- src/info.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/info.c b/src/info.c index 54f3822e2..023303035 100644 --- a/src/info.c +++ b/src/info.c @@ -21619,7 +21619,7 @@ skincolor_t skincolors[MAXSKINCOLORS] = { {"Ketchup", {0x48, 0x49, 0x40, 0x33, 0x34, 0x36, 0x22, 0x24, 0x26, 0x28, 0x2a, 0x2b, 0x2c, 0x47, 0x2e, 0x2f}, SKINCOLOR_BOULDER, 8, V_REDMAP, true}, // SKINCOLOR_KETCHUP {"Peachy", {0xd0, 0x30, 0x31, 0x31, 0x32, 0x32, 0xdc, 0xdc, 0xdc, 0xd3, 0xd4, 0xd4, 0xcc, 0xcd, 0xce, 0xcf}, SKINCOLOR_TEAL, 7, V_ROSYMAP, true}, // SKINCOLOR_PEACHY {"Quail", {0xd8, 0xd9, 0xdb, 0xdc, 0xde, 0xdf, 0xd5, 0xd5, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0x1d, 0x1f}, SKINCOLOR_WAVE, 5, V_BROWNMAP, true}, // SKINCOLOR_QUAIL - {"Foundation", { 80, 81, 82, 84, 219, 221, 221, 212, 213, 214, 215, 195, 196, 186, 187, 30}, SKINCOLOR_DREAM, 6, V_ORANGEMAP, true}, // SKINCOLOR_FOUNDATION + {"Foundation", { 80, 81, 82, 84, 219, 221, 221, 212, 213, 214, 215, 197, 186, 187, 187, 30}, SKINCOLOR_DREAM, 6, V_ORANGEMAP, true}, // SKINCOLOR_FOUNDATION {"Sunset", {0x51, 0x52, 0x40, 0x40, 0x34, 0x36, 0xd5, 0xd5, 0xd6, 0xd7, 0xcf, 0xcf, 0xc6, 0xc6, 0xc7, 0xfe}, SKINCOLOR_SAPPHIRE, 5, V_ORANGEMAP, true}, // SKINCOLOR_SUNSET {"Copper", {0x58, 0x54, 0x40, 0x34, 0x35, 0x38, 0x3a, 0x3c, 0x3d, 0x2a, 0x2b, 0x2c, 0x2c, 0xba, 0xba, 0xbb}, SKINCOLOR_BLUEBELL, 5, V_ORANGEMAP, true}, // SKINCOLOR_COPPER {"Apricot", {0x00, 0xd8, 0xd9, 0xda, 0xdb, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e}, SKINCOLOR_CYAN, 4, V_ORANGEMAP, true}, // SKINCOLOR_APRICOT @@ -21666,7 +21666,7 @@ skincolor_t skincolors[MAXSKINCOLORS] = { {"Cornflower", {0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x9a, 0x9c, 0x9d, 0x9d, 0x9e, 0x9e, 0x9e}, SKINCOLOR_YELLOW, 4, V_BLUEMAP, true}, // SKINCOLOR_CORNFLOWER {"Blue", {0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xfd, 0xfe}, SKINCOLOR_ORANGE, 5, V_BLUEMAP, true}, // SKINCOLOR_BLUE {"Cobalt", { 145, 147, 149, 150, 151, 153, 154, 155, 156, 157, 158, 159, 253, 253, 254, 254}, SKINCOLOR_PERIDOT, 5, V_BLUEMAP, true}, // SKINCOLOR_COBALT - {"Midnight", { 171, 171, 172, 173, 173, 174, 155, 156, 157, 159, 253, 253, 254, 254, 31, 31}, SKINCOLOR_CHERRY, 10, V_GRAYMAP, true}, // SKINCOLOR_MIDNIGHT + {"Midnight", { 171, 171, 172, 173, 173, 174, 156, 157, 158, 159, 253, 253, 254, 254, 31, 31}, SKINCOLOR_CHERRY, 10, V_GRAYMAP, true}, // SKINCOLOR_MIDNIGHT {"Galaxy", { 160, 161, 162, 163, 164, 165, 166, 166, 154, 155, 156, 157, 159, 253, 254, 31}, SKINCOLOR_ISLAND, 7, V_PURPLEMAP, true}, // SKINCOLOR_GALAXY {"Vapor", {0x80, 0x81, 0x83, 0x86, 0x94, 0x94, 0xa3, 0xa3, 0xa4, 0xa6, 0xa6, 0xa6, 0xa8, 0xa8, 0xa9, 0xa9}, SKINCOLOR_LILAC, 4, V_SKYMAP, true}, // SKINCOLOR_VAPOR {"Dusk", {0x92, 0x93, 0x94, 0x94, 0xac, 0xad, 0xad, 0xad, 0xae, 0xae, 0xaf, 0xaf, 0xa9, 0xa9, 0xfd, 0xfd}, SKINCOLOR_OLIVE, 0, V_BLUEMAP, true}, // SKINCOLOR_DUSK From 1a0d9eab796bef404e7eb011fa7cd518da39391b Mon Sep 17 00:00:00 2001 From: katsy <205-katsy@users.noreply.git.do.srb2.org> Date: Sun, 20 Aug 2023 17:29:03 +0000 Subject: [PATCH 038/195] Add supername parameter to S_SKIN: displays a custom super name on the GOT THEM ALL screen --- src/r_skins.c | 46 ++++++++++++++++++++++++++++++++++++++++------ src/r_skins.h | 3 ++- src/y_inter.c | 8 ++++---- 3 files changed, 46 insertions(+), 11 deletions(-) diff --git a/src/r_skins.c b/src/r_skins.c index 86c0bbc54..f8b5216b2 100644 --- a/src/r_skins.c +++ b/src/r_skins.c @@ -113,6 +113,7 @@ static void Sk_SetDefaultValue(skin_t *skin) strcpy(skin->realname, "Someone"); strcpy(skin->hudname, "???"); + strcpy(skin->supername, "Someone super"); skin->starttranscolor = 96; skin->prefcolor = SKINCOLOR_GREEN; @@ -680,7 +681,7 @@ void R_AddSkins(UINT16 wadnum, boolean mainfile) char *value; size_t size; skin_t *skin; - boolean hudname, realname; + boolean hudname, realname, supername; // // search for all skin markers in pwad @@ -710,7 +711,7 @@ void R_AddSkins(UINT16 wadnum, boolean mainfile) skin = &skins[numskins]; Sk_SetDefaultValue(skin); skin->wadnum = wadnum; - hudname = realname = false; + hudname = realname = supername = false; // parse stoken = strtok (buf2, "\r\n= "); while (stoken) @@ -753,7 +754,7 @@ void R_AddSkins(UINT16 wadnum, boolean mainfile) Z_Free(value2); } - // copy to hudname and fullname as a default. + // copy to hudname, realname, and supername as a default. if (!realname) { STRBUFCPY(skin->realname, skin->name); @@ -769,6 +770,19 @@ void R_AddSkins(UINT16 wadnum, boolean mainfile) strupr(skin->hudname); SYMBOLCONVERT(skin->hudname) } + else if (!supername) + { + char super[7], someone[SKINNAMESIZE+1]; + strcpy(super, "Super "); + strcpy(someone, skin->realname); + STRBUFCPY(skin->supername, strcat(super, someone)); + } + } + else if (!stricmp(stoken, "supername")) + { // Super name (eg. "Super Knuckles") + supername = true; + STRBUFCPY(skin->supername, value); + SYMBOLCONVERT(skin->supername) } else if (!stricmp(stoken, "realname")) { // Display name (eg. "Knuckles") @@ -777,6 +791,13 @@ void R_AddSkins(UINT16 wadnum, boolean mainfile) SYMBOLCONVERT(skin->realname) if (!hudname) HUDNAMEWRITE(skin->realname); + if (!supername) //copy over default to capitalise the name + { + char super[7], someone[SKINNAMESIZE+1]; + strcpy(super, "Super "); + strcpy(someone, skin->realname); + STRBUFCPY(skin->supername, strcat(super, someone)); + } } else if (!stricmp(stoken, "hudname")) { // Life icon name (eg. "K.T.E") @@ -829,7 +850,7 @@ void R_PatchSkins(UINT16 wadnum, boolean mainfile) char *value; size_t size; skin_t *skin; - boolean noskincomplain, realname, hudname; + boolean noskincomplain, realname, hudname, supername; // // search for all skin patch markers in pwad @@ -853,7 +874,7 @@ void R_PatchSkins(UINT16 wadnum, boolean mainfile) buf2[size] = '\0'; skin = NULL; - noskincomplain = realname = hudname = false; + noskincomplain = realname = hudname = supername = false; /* Parse. Has more phases than the parser in R_AddSkins because it needs to have the patching name first (no default skin name is acceptible for patching, unlike skin creation) @@ -892,13 +913,26 @@ void R_PatchSkins(UINT16 wadnum, boolean mainfile) else // Get the properties! { // Some of these can't go in R_ProcessPatchableFields because they have side effects for future lines. - if (!stricmp(stoken, "realname")) + if (!stricmp(stoken, "supername")) + { // Super name (eg. "Super Knuckles") + supername = true; + STRBUFCPY(skin->supername, value); + SYMBOLCONVERT(skin->supername) + } + else if (!stricmp(stoken, "realname")) { // Display name (eg. "Knuckles") realname = true; STRBUFCPY(skin->realname, value); SYMBOLCONVERT(skin->realname) if (!hudname) HUDNAMEWRITE(skin->realname); + if (!supername) //copy over default to capitalise the name + { + char super[7], someone[SKINNAMESIZE+1]; + strcpy(super, "Super "); + strcpy(someone, skin->realname); + STRBUFCPY(skin->supername, strcat(super, someone)); + } } else if (!stricmp(stoken, "hudname")) { // Life icon name (eg. "K.T.E") diff --git a/src/r_skins.h b/src/r_skins.h index a38997f4d..5f71850bf 100644 --- a/src/r_skins.h +++ b/src/r_skins.h @@ -35,8 +35,9 @@ typedef struct UINT16 wadnum; skinflags_t flags; - char realname[SKINNAMESIZE+1]; // Display name for level completion. + char realname[SKINNAMESIZE+1]; // Display name for level completion char hudname[SKINNAMESIZE+1]; // HUD name to display (officially exactly 5 characters long) + char supername[SKINNAMESIZE+7]; // Super name to display when collecting all emeralds UINT8 ability; // ability definition UINT8 ability2; // secondary ability definition diff --git a/src/y_inter.c b/src/y_inter.c index 288a821e6..4815b5520 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -1451,10 +1451,10 @@ void Y_StartIntermission(void) if (players[consoleplayer].charflags & SF_SUPER) { strcpy(data.spec.passed3, "can now become"); - snprintf(data.spec.passed4, - sizeof data.spec.passed4, "Super %s", - skins[players[consoleplayer].skin].realname); - data.spec.passed4[sizeof data.spec.passed4 - 1] = '\0'; + if (strlen(skins[players[consoleplayer].skin].supername) > 20) //too long, use generic + strcpy(data.spec.passed4, "their super form"); + else + strcpy(data.spec.passed4, skins[players[consoleplayer].skin].supername); } } else From ce721f9f782b052ad474d2e4e1a3c8363df8869e Mon Sep 17 00:00:00 2001 From: spherallic Date: Sun, 20 Aug 2023 23:40:13 +0200 Subject: [PATCH 039/195] Allow input during title animation after 1st play --- src/g_game.c | 2 +- src/m_menu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/g_game.c b/src/g_game.c index 6b4890a1c..fce9919f1 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -2080,7 +2080,7 @@ boolean G_Responder(event_t *ev) if (gameaction == ga_nothing && !singledemo && ((demoplayback && !modeattacking && !titledemo) || gamestate == GS_TITLESCREEN)) { - if (ev->type == ev_keydown && ev->key != 301 && !(gamestate == GS_TITLESCREEN && finalecount < TICRATE)) + if (ev->type == ev_keydown && ev->key != 301 && !(gamestate == GS_TITLESCREEN && finalecount < TICRATE && cv_tutorialprompt.value)) { M_StartControlPanel(); return true; diff --git a/src/m_menu.c b/src/m_menu.c index c49442141..81ff0f679 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -3196,7 +3196,7 @@ boolean M_Responder(event_t *ev) || gamestate == GS_CREDITS || gamestate == GS_EVALUATION || gamestate == GS_GAMEEND) return false; - if (gamestate == GS_TITLESCREEN && finalecount < TICRATE) + if (gamestate == GS_TITLESCREEN && finalecount < TICRATE && cv_tutorialprompt.value) return false; if (CON_Ready() && gamestate != GS_WAITINGPLAYERS) From 40d9614c32c0332c1056b479abf04f8d62f4f69c Mon Sep 17 00:00:00 2001 From: spherallic Date: Mon, 21 Aug 2023 00:43:01 +0200 Subject: [PATCH 040/195] Clear thing flags for NiGHTS bumpers/hoops again --- src/p_setup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/p_setup.c b/src/p_setup.c index e7d86cf16..e289b8346 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -6783,6 +6783,7 @@ static void P_ConvertBinaryThingTypes(void) break; case 1704: //NiGHTS bumper mapthings[i].pitch = 30 * (((mapthings[i].options & 15) + 9) % 12); + mapthings[i].options &= ~0xF; break; case 1705: //Hoop case 1713: //Hoop (Customizable) @@ -6791,6 +6792,7 @@ static void P_ConvertBinaryThingTypes(void) mapthings[i].angle = (mapthings[i].extrainfo == 1) ? oldangle - 90 : ((oldangle >> 8)*360)/256; mapthings[i].pitch = (mapthings[i].extrainfo == 1) ? oldangle / 360 : ((oldangle & 255)*360)/256; mapthings[i].args[0] = (mapthings[i].type == 1705) ? 96 : (mapthings[i].options & 0xF)*16 + 32; + mapthings[i].options &= ~0xF; mapthings[i].type = 1713; break; } From 5548b67462a242a54942cb4faf62a0cd687556f5 Mon Sep 17 00:00:00 2001 From: spherallic Date: Tue, 22 Aug 2023 16:32:21 +0200 Subject: [PATCH 041/195] Set spritexscale/spriteyscale in objectplace --- src/m_cheat.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/m_cheat.c b/src/m_cheat.c index e370335f8..7ad86353a 100644 --- a/src/m_cheat.c +++ b/src/m_cheat.c @@ -1102,6 +1102,8 @@ static mapthing_t *OP_CreateNewMapThing(player_t *player, UINT16 type, boolean c mt->options = (mt->z << ZSHIFT) | (UINT16)cv_opflags.value; mt->scale = player->mo->scale; + mt->spritexscale = player->mo->spritexscale; + mt->spriteyscale = player->mo->spriteyscale; memset(mt->args, 0, NUMMAPTHINGARGS*sizeof(*mt->args)); memset(mt->stringargs, 0x00, NUMMAPTHINGSTRINGARGS*sizeof(*mt->stringargs)); mt->pitch = mt->roll = 0; From 55b4458001b2ffe76774ff07a11b56ebf1f70de9 Mon Sep 17 00:00:00 2001 From: Lactozilla Date: Tue, 22 Aug 2023 13:34:09 -0300 Subject: [PATCH 042/195] Fix a possible crash in R_RenderMaskedSegRange R_AllocTextureColumnTables wasn't checking if the tables were never allocated, making the renderer later attempt to render midtextures for drawsegs that don't contain actual midtextures. --- src/r_segs.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/r_segs.c b/src/r_segs.c index 9ee3bcfec..9af83f0c7 100644 --- a/src/r_segs.c +++ b/src/r_segs.c @@ -1487,6 +1487,9 @@ static void R_AllocClippingTables(size_t range) openings = Z_Realloc(openings, numopenings * sizeof (*openings), PU_STATIC, NULL); lastopening = openings + pos; + if (oldopenings == NULL) + return; + // borrowed fix from *cough* zdoom *cough* // [RH] We also need to adjust the openings pointers that // were already stored in drawsegs. @@ -1519,6 +1522,9 @@ static void R_AllocTextureColumnTables(size_t range) texturecolumntable = Z_Realloc(texturecolumntable, texturecolumntablesize * sizeof (*texturecolumntable), PU_STATIC, NULL); curtexturecolumntable = texturecolumntable + pos; + if (oldtable == NULL) + return; + for (drawseg_t *ds = drawsegs; ds < ds_p; ds++) { // Check if it's in range of the tables From d8d352a11a12068a9d54130814edf937491eab02 Mon Sep 17 00:00:00 2001 From: katsy Date: Tue, 22 Aug 2023 15:11:47 -0500 Subject: [PATCH 043/195] fix some issues with supername code --- src/r_skins.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/r_skins.c b/src/r_skins.c index 3e918de6e..72598f381 100644 --- a/src/r_skins.c +++ b/src/r_skins.c @@ -772,12 +772,12 @@ void R_AddSkins(UINT16 wadnum, boolean mainfile) strupr(skin->hudname); SYMBOLCONVERT(skin->hudname) } - else if (!supername) + if (!supername) { - char super[7], someone[SKINNAMESIZE+1]; - strcpy(super, "Super "); - strcpy(someone, skin->realname); - STRBUFCPY(skin->supername, strcat(super, someone)); + char superstring[SKINNAMESIZE+7]; + strcpy(superstring, "Super "); + strlcat(superstring, skin->name, sizeof(superstring)); + STRBUFCPY(skin->supername, superstring); } } else if (!stricmp(stoken, "supername")) @@ -795,10 +795,10 @@ void R_AddSkins(UINT16 wadnum, boolean mainfile) HUDNAMEWRITE(skin->realname); if (!supername) //copy over default to capitalise the name { - char super[7], someone[SKINNAMESIZE+1]; - strcpy(super, "Super "); - strcpy(someone, skin->realname); - STRBUFCPY(skin->supername, strcat(super, someone)); + char superstring[SKINNAMESIZE+7]; + strcpy(superstring, "Super "); + strlcat(superstring, skin->realname, sizeof(superstring)); + STRBUFCPY(skin->supername, superstring); } } else if (!stricmp(stoken, "hudname")) @@ -930,10 +930,10 @@ void R_PatchSkins(UINT16 wadnum, boolean mainfile) HUDNAMEWRITE(skin->realname); if (!supername) //copy over default to capitalise the name { - char super[7], someone[SKINNAMESIZE+1]; - strcpy(super, "Super "); - strcpy(someone, skin->realname); - STRBUFCPY(skin->supername, strcat(super, someone)); + char superstring[SKINNAMESIZE+7]; + strcpy(superstring, "Super "); + strlcat(superstring, skin->realname, sizeof(superstring)); + STRBUFCPY(skin->supername, superstring); } } else if (!stricmp(stoken, "hudname")) From 6c416c61b1876b75a01e3dfddb6f1be9b3991de3 Mon Sep 17 00:00:00 2001 From: spherallic Date: Thu, 24 Aug 2023 13:33:38 +0200 Subject: [PATCH 044/195] Final 2.2.12 skincolor changes: - Replaced Mercury & Pumpkin with Ocean & Tangerine - Renamed Crystal to Siberite & Meteorite to Moonstone - Tiny tweaks to color ordering and NiGHTS link colors --- src/deh_tables.c | 14 +++++++------- src/doomdef.h | 14 +++++++------- src/info.c | 22 +++++++++++----------- src/st_stuff.c | 2 +- 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/deh_tables.c b/src/deh_tables.c index 3580e15c6..0801cf935 100644 --- a/src/deh_tables.c +++ b/src/deh_tables.c @@ -4614,8 +4614,7 @@ const char *COLOR_ENUMS[] = { // Desaturated "AETHER", // SKINCOLOR_AETHER, "SLATE", // SKINCOLOR_SLATE, - "METEORITE", // SKINCOLOR_METEORITE, - "MERCURY", // SKINCOLOR_MERCURY, + "MOONSTONE", // SKINCOLOR_MOONSTONE, "BLUEBELL", // SKINCOLOR_BLUEBELL, "PINK", // SKINCOLOR_PINK, "ROSEWOOD", // SKINCOLOR_ROSEWOOD, @@ -4652,10 +4651,10 @@ const char *COLOR_ENUMS[] = { "COPPER", // SKINCOLOR_COPPER, "APRICOT", // SKINCOLOR_APRICOT, "ORANGE", // SKINCOLOR_ORANGE, - "PUMPKIN", // SKINCOLOR_PUMPKIN, "RUST", // SKINCOLOR_RUST, - "GOLD", // SKINCOLOR_GOLD, + "TANGERINE", // SKINCOLOR_TANGERINE, "TOPAZ", // SKINCOLOR_TOPAZ, + "GOLD", // SKINCOLOR_GOLD, "SANDY", // SKINCOLOR_SANDY, "GOLDENROD", // SKINCOLOR_GOLDENROD, "YELLOW", // SKINCOLOR_YELLOW, @@ -4665,20 +4664,21 @@ const char *COLOR_ENUMS[] = { "LIME", // SKINCOLOR_LIME, "PERIDOT", // SKINCOLOR_PERIDOT, "APPLE", // SKINCOLOR_APPLE, + "HEADLIGHT", // SKINCOLOR_HEADLIGHT, "CHARTREUSE", // SKINCOLOR_CHARTREUSE, "GREEN", // SKINCOLOR_GREEN, "FOREST", // SKINCOLOR_FOREST, "SHAMROCK", // SKINCOLOR_SHAMROCK, "JADE", // SKINCOLOR_JADE, - "HEADLIGHT", // SKINCOLOR_HEADLIGHT, "MINT", // SKINCOLOR_MINT, "MASTER", // SKINCOLOR_MASTER, "EMERALD", // SKINCOLOR_EMERALD, - "BOTTLE", // SKINCOLOR_BOTTLE, "SEAFOAM", // SKINCOLOR_SEAFOAM, "ISLAND", // SKINCOLOR_ISLAND, + "BOTTLE", // SKINCOLOR_BOTTLE, "AQUA", // SKINCOLOR_AQUA, "TEAL", // SKINCOLOR_TEAL, + "OCEAN", // SKINCOLOR_OCEAN, "WAVE", // SKINCOLOR_WAVE, "CYAN", // SKINCOLOR_CYAN, "TURQUOISE", // SKINCOLOR_TURQUOISE, @@ -4704,7 +4704,7 @@ const char *COLOR_ENUMS[] = { "NOBLE", // SKINCOLOR_NOBLE, "FUCHSIA", // SKINCOLOR_FUCHSIA, "BUBBLEGUM", // SKINCOLOR_BUBBLEGUM, - "CRYSTAL", // SKINCOLOR_CRYSTAL, + "SIBERITE", // SKINCOLOR_SIBERITE, "MAGENTA", // SKINCOLOR_MAGENTA, "NEON", // SKINCOLOR_NEON, "VIOLET", // SKINCOLOR_VIOLET, diff --git a/src/doomdef.h b/src/doomdef.h index f82b0a4cd..45d6645fa 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -269,8 +269,7 @@ typedef enum // Desaturated SKINCOLOR_AETHER, SKINCOLOR_SLATE, - SKINCOLOR_METEORITE, - SKINCOLOR_MERCURY, + SKINCOLOR_MOONSTONE, SKINCOLOR_BLUEBELL, SKINCOLOR_PINK, SKINCOLOR_ROSEWOOD, @@ -307,10 +306,10 @@ typedef enum SKINCOLOR_COPPER, SKINCOLOR_APRICOT, SKINCOLOR_ORANGE, - SKINCOLOR_PUMPKIN, SKINCOLOR_RUST, - SKINCOLOR_GOLD, + SKINCOLOR_TANGERINE, SKINCOLOR_TOPAZ, + SKINCOLOR_GOLD, SKINCOLOR_SANDY, SKINCOLOR_GOLDENROD, SKINCOLOR_YELLOW, @@ -320,20 +319,21 @@ typedef enum SKINCOLOR_LIME, SKINCOLOR_PERIDOT, SKINCOLOR_APPLE, + SKINCOLOR_HEADLIGHT, SKINCOLOR_CHARTREUSE, SKINCOLOR_GREEN, SKINCOLOR_FOREST, SKINCOLOR_SHAMROCK, SKINCOLOR_JADE, - SKINCOLOR_HEADLIGHT, SKINCOLOR_MINT, SKINCOLOR_MASTER, SKINCOLOR_EMERALD, - SKINCOLOR_BOTTLE, SKINCOLOR_SEAFOAM, SKINCOLOR_ISLAND, + SKINCOLOR_BOTTLE, SKINCOLOR_AQUA, SKINCOLOR_TEAL, + SKINCOLOR_OCEAN, SKINCOLOR_WAVE, SKINCOLOR_CYAN, SKINCOLOR_TURQUOISE, @@ -359,7 +359,7 @@ typedef enum SKINCOLOR_NOBLE, SKINCOLOR_FUCHSIA, SKINCOLOR_BUBBLEGUM, - SKINCOLOR_CRYSTAL, + SKINCOLOR_SIBERITE, SKINCOLOR_MAGENTA, SKINCOLOR_NEON, SKINCOLOR_VIOLET, diff --git a/src/info.c b/src/info.c index 11e9c9fe8..399b5c936 100644 --- a/src/info.c +++ b/src/info.c @@ -21586,8 +21586,7 @@ skincolor_t skincolors[MAXSKINCOLORS] = { // Desaturated {"Aether", {0x00, 0x00, 0x01, 0x02, 0x02, 0x03, 0x91, 0x91, 0x91, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xaf}, SKINCOLOR_GREY, 15, 0, true}, // SKINCOLOR_AETHER {"Slate", {0x00, 0x02, 0x04, 0x06, 0x08, 0x0a, 0xaa, 0xaa, 0xaa, 0xab, 0xac, 0xac, 0xad, 0xad, 0xae, 0xaf}, SKINCOLOR_SILVER, 12, 0, true}, // SKINCOLOR_SLATE - {"Meteorite", { 0, 4, 8, 9, 11, 12, 14, 15, 171, 172, 173, 174, 175, 27, 29, 31}, SKINCOLOR_TOPAZ, 15, V_GRAYMAP, true}, // SKINCOLOR_METEORITE - {"Mercury", { 0, 3, 4, 7, 11, 12, 14, 15, 171, 172, 173, 155, 157, 159, 253, 254}, SKINCOLOR_ECRU, 15, V_AZUREMAP, true}, // SKINCOLOR_MERCURY + {"Moonstone", { 0, 4, 8, 9, 11, 12, 14, 15, 171, 172, 173, 174, 175, 27, 29, 31}, SKINCOLOR_TOPAZ, 15, V_GRAYMAP, true}, // SKINCOLOR_MOONSTONE {"Bluebell", {0x90, 0x91, 0x92, 0x93, 0x94, 0x94, 0x95, 0xac, 0xac, 0xad, 0xad, 0xa8, 0xa8, 0xa9, 0xfd, 0xfe}, SKINCOLOR_COPPER, 4, V_BLUEMAP, true}, // SKINCOLOR_BLUEBELL {"Pink", {0xd0, 0xd0, 0xd1, 0xd1, 0xd2, 0xd2, 0xd3, 0xd3, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0x2b, 0x2c, 0x2e}, SKINCOLOR_AZURE, 9, V_REDMAP, true}, // SKINCOLOR_PINK {"Rosewood", { 209, 210, 211, 212, 213, 214, 228, 230, 232, 234, 235, 237, 26, 27, 28, 29}, SKINCOLOR_SEPIA, 5, V_BROWNMAP, true}, // SKINCOLOR_ROSEWOOD @@ -21597,7 +21596,7 @@ skincolor_t skincolors[MAXSKINCOLORS] = { {"Boulder", {0xde, 0xe0, 0xe1, 0xe4, 0xe7, 0xe9, 0xeb, 0xec, 0xed, 0xed, 0xed, 0x19, 0x19, 0x1b, 0x1d, 0x1e}, SKINCOLOR_KETCHUP, 0, V_BROWNMAP, true}, // SKINCOLOR_BOULDER {"Bronze", { 82, 84, 50, 51, 223, 228, 230, 232, 234, 236, 237, 238, 239, 239, 30, 31}, SKINCOLOR_VOLCANIC, 9, V_BROWNMAP, true}, // SKINCOLOR_BRONZE {"Sepia", { 88, 84, 85, 86, 224, 226, 228, 230, 232, 235, 236, 237, 238, 239, 28, 28}, SKINCOLOR_ROSEWOOD, 5, V_BROWNMAP, true}, // SKINCOLOR_SEPIA - {"Ecru", { 80, 83, 84, 85, 86, 242, 243, 245, 230, 232, 234, 236, 238, 239, 47, 47}, SKINCOLOR_MERCURY, 15, V_BROWNMAP, true}, // SKINCOLOR_ECRU + {"Ecru", { 80, 83, 84, 85, 86, 242, 243, 245, 230, 232, 234, 236, 238, 239, 47, 47}, SKINCOLOR_ARCTIC, 12, V_BROWNMAP, true}, // SKINCOLOR_ECRU {"Tan", {0x51, 0x51, 0x54, 0x54, 0x55, 0x55, 0x56, 0x56, 0x56, 0x57, 0xf5, 0xf5, 0xf9, 0xf9, 0xed, 0xed}, SKINCOLOR_BROWN, 12, V_BROWNMAP, true}, // SKINCOLOR_TAN {"Beige", {0x54, 0x55, 0x56, 0x56, 0xf2, 0xf3, 0xf3, 0xf4, 0xf5, 0xf6, 0xf8, 0xf9, 0xfa, 0xfb, 0xed, 0xed}, SKINCOLOR_MOSS, 5, V_BROWNMAP, true}, // SKINCOLOR_BEIGE {"Rosebush", { 208, 216, 209, 85, 90, 91, 91, 92, 191, 93, 94, 107, 109, 110, 111, 111}, SKINCOLOR_EGGPLANT, 5, V_GREENMAP, true}, // SKINCOLOR_ROSEBUSH @@ -21624,10 +21623,10 @@ skincolor_t skincolors[MAXSKINCOLORS] = { {"Copper", {0x58, 0x54, 0x40, 0x34, 0x35, 0x38, 0x3a, 0x3c, 0x3d, 0x2a, 0x2b, 0x2c, 0x2c, 0xba, 0xba, 0xbb}, SKINCOLOR_BLUEBELL, 5, V_ORANGEMAP, true}, // SKINCOLOR_COPPER {"Apricot", {0x00, 0xd8, 0xd9, 0xda, 0xdb, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e}, SKINCOLOR_CYAN, 4, V_ORANGEMAP, true}, // SKINCOLOR_APRICOT {"Orange", { 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 42, 44, 45, 46, 46}, SKINCOLOR_BLUE, 4, V_ORANGEMAP, true}, // SKINCOLOR_ORANGE - {"Pumpkin", { 51, 52, 53, 54, 56, 58, 59, 59, 61, 61, 63, 45, 46, 47, 47, 31}, SKINCOLOR_ARCTIC, 12, V_ORANGEMAP, true}, // SKINCOLOR_PUMPKIN {"Rust", {0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3c, 0x3d, 0x3d, 0x3d, 0x3f, 0x2c, 0x2d, 0x47, 0x2e, 0x2f, 0x2f}, SKINCOLOR_YOGURT, 8, V_ORANGEMAP, true}, // SKINCOLOR_RUST + {"Tangerine", { 81, 83, 64, 64, 51, 52, 53, 54, 56, 58, 60, 61, 63, 45, 46, 47}, SKINCOLOR_OCEAN, 12, V_ORANGEMAP, true}, // SKINCOLOR_TANGERINE + {"Topaz", { 0, 81, 83, 73, 74, 74, 65, 52, 53, 54, 56, 58, 60, 42, 43, 45}, SKINCOLOR_MOONSTONE, 10, V_YELLOWMAP, true}, // SKINCOLOR_TOPAZ {"Gold", {0x51, 0x51, 0x54, 0x54, 0x41, 0x42, 0x43, 0x43, 0x44, 0x45, 0x46, 0x3f, 0x2d, 0x2e, 0x2f, 0x2f}, SKINCOLOR_LAVENDER, 10, V_YELLOWMAP, true}, // SKINCOLOR_GOLD - {"Topaz", { 0, 81, 83, 73, 74, 74, 65, 52, 53, 54, 56, 58, 60, 42, 43, 45}, SKINCOLOR_METEORITE, 10, V_YELLOWMAP, true}, // SKINCOLOR_TOPAZ {"Sandy", {0x53, 0x40, 0x41, 0x42, 0x43, 0xe6, 0xe9, 0xe9, 0xea, 0xec, 0xec, 0xc6, 0xc6, 0xc7, 0xc7, 0xfe}, SKINCOLOR_SKY, 8, V_YELLOWMAP, true}, // SKINCOLOR_SANDY {"Goldenrod", { 0, 80, 81, 81, 83, 73, 73, 64, 65, 66, 67, 68, 69, 62, 44, 45}, SKINCOLOR_MAJESTY, 8, V_YELLOWMAP, true}, // SKINCOLOR_GOLDENROD {"Yellow", {0x52, 0x53, 0x49, 0x49, 0x4a, 0x4a, 0x4b, 0x4b, 0x4b, 0x4c, 0x4d, 0x4d, 0x4e, 0x4e, 0x4f, 0xed}, SKINCOLOR_CORNFLOWER, 8, V_YELLOWMAP, true}, // SKINCOLOR_YELLOW @@ -21637,20 +21636,21 @@ skincolor_t skincolors[MAXSKINCOLORS] = { {"Lime", {0x50, 0x51, 0x52, 0x53, 0x48, 0xbc, 0xbd, 0xbe, 0xbe, 0xbf, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f}, SKINCOLOR_MAGENTA, 9, V_PERIDOTMAP, true}, // SKINCOLOR_LIME {"Peridot", {0x58, 0x58, 0xbc, 0xbc, 0xbd, 0xbd, 0xbe, 0xbe, 0xbe, 0xbf, 0x5e, 0x5e, 0x5f, 0x5f, 0x77, 0x77}, SKINCOLOR_COBALT, 2, V_PERIDOTMAP, true}, // SKINCOLOR_PERIDOT {"Apple", {0x49, 0x49, 0xbc, 0xbd, 0xbe, 0xbe, 0xbe, 0x67, 0x69, 0x6a, 0x6b, 0x6b, 0x6c, 0x6d, 0x6d, 0x6d}, SKINCOLOR_RASPBERRY, 13, V_PERIDOTMAP, true}, // SKINCOLOR_APPLE + {"Headlight", { 0, 80, 81, 82, 73, 84, 64, 65, 91, 91, 124, 125, 126, 137, 138, 139}, SKINCOLOR_MAUVE, 8, V_YELLOWMAP, true}, // SKINCOLOR_HEADLIGHT {"Chartreuse", { 80, 82, 72, 73, 188, 188, 113, 114, 114, 125, 126, 137, 138, 139, 253, 254}, SKINCOLOR_NOBLE, 9, V_PERIDOTMAP, true}, // SKINCOLOR_CHARTREUSE {"Green", {0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f}, SKINCOLOR_RED, 6, V_GREENMAP, true}, // SKINCOLOR_GREEN {"Forest", {0x65, 0x66, 0x67, 0x68, 0x69, 0x69, 0x6a, 0x6b, 0x6b, 0x6c, 0x6d, 0x6d, 0x6e, 0x6e, 0x6e, 0x6f}, SKINCOLOR_SALMON, 9, V_GREENMAP, true}, // SKINCOLOR_FOREST - {"Shamrock", {0x70, 0x70, 0x71, 0x71, 0x72, 0x72, 0x73, 0x73, 0x73, 0x74, 0x75, 0x75, 0x76, 0x76, 0x77, 0x77}, SKINCOLOR_CRYSTAL, 10, V_GREENMAP, true}, // SKINCOLOR_SHAMROCK + {"Shamrock", {0x70, 0x70, 0x71, 0x71, 0x72, 0x72, 0x73, 0x73, 0x73, 0x74, 0x75, 0x75, 0x76, 0x76, 0x77, 0x77}, SKINCOLOR_SIBERITE, 10, V_GREENMAP, true}, // SKINCOLOR_SHAMROCK {"Jade", { 128, 120, 121, 122, 122, 113, 114, 114, 115, 116, 117, 118, 119, 110, 111, 30}, SKINCOLOR_TAFFY, 10, V_GREENMAP, true}, // SKINCOLOR_JADE - {"Headlight", { 0, 80, 81, 82, 73, 84, 64, 65, 91, 91, 124, 125, 126, 137, 138, 139}, SKINCOLOR_MAUVE, 8, V_YELLOWMAP, true}, // SKINCOLOR_HEADLIGHT {"Mint", {0x00, 0x00, 0x58, 0x58, 0x59, 0x62, 0x62, 0x62, 0x64, 0x67, 0x7e, 0x7e, 0x8f, 0x8f, 0x8a, 0x8a}, SKINCOLOR_VIOLET, 5, V_GREENMAP, true}, // SKINCOLOR_MINT {"Master", { 0, 80, 88, 96, 112, 113, 99, 100, 124, 125, 126, 117, 107, 118, 119, 111}, SKINCOLOR_PEPPER, 8, V_GREENMAP, true}, // SKINCOLOR_MASTER {"Emerald", { 80, 96, 112, 113, 114, 114, 125, 125, 126, 126, 137, 137, 138, 138, 139, 139}, SKINCOLOR_RUBY, 9, V_GREENMAP, true}, // SKINCOLOR_EMERALD - {"Bottle", { 0, 1, 3, 4, 5, 140, 141, 141, 124, 125, 126, 127, 118, 119, 111, 111}, SKINCOLOR_LATTE, 14, V_AQUAMAP, true}, // SKINCOLOR_BOTTLE {"Seafoam", {0x01, 0x58, 0x59, 0x5a, 0x7c, 0x7d, 0x7d, 0x7e, 0x7e, 0x8f, 0x8f, 0x8a, 0x8a, 0x8b, 0xfd, 0xfd}, SKINCOLOR_PLUM, 6, V_AQUAMAP, true}, // SKINCOLOR_SEAFOAM {"Island", { 96, 97, 113, 113, 114, 124, 142, 136, 136, 150, 151, 153, 168, 168, 169, 169}, SKINCOLOR_GALAXY, 7, V_AQUAMAP, true}, // SKINCOLOR_ISLAND + {"Bottle", { 0, 1, 3, 4, 5, 140, 141, 141, 124, 125, 126, 127, 118, 119, 111, 111}, SKINCOLOR_LATTE, 14, V_AQUAMAP, true}, // SKINCOLOR_BOTTLE {"Aqua", {0x78, 0x79, 0x7a, 0x7a, 0x7b, 0x7b, 0x7c, 0x7c, 0x7c, 0x7d, 0x7e, 0x7e, 0x7f, 0x7f, 0x76, 0x77}, SKINCOLOR_ROSY, 7, V_AQUAMAP, true}, // SKINCOLOR_AQUA {"Teal", {0x78, 0x78, 0x8c, 0x8c, 0x8d, 0x8d, 0x8d, 0x8e, 0x8e, 0x8f, 0x8f, 0x8f, 0x8a, 0x8a, 0x8a, 0x8a}, SKINCOLOR_PEACHY, 7, V_SKYMAP, true}, // SKINCOLOR_TEAL + {"Ocean", { 120, 121, 122, 122, 123, 141, 142, 142, 136, 137, 138, 138, 139, 139, 253, 253}, SKINCOLOR_TANGERINE, 4, V_AQUAMAP, true}, // SKINCOLOR_OCEAN {"Wave", {0x00, 0x78, 0x78, 0x79, 0x8d, 0x87, 0x88, 0x89, 0x89, 0xae, 0xa8, 0xa8, 0xa9, 0xa9, 0xfd, 0xfd}, SKINCOLOR_QUAIL, 5, V_SKYMAP, true}, // SKINCOLOR_WAVE {"Cyan", {0x80, 0x81, 0xff, 0xff, 0x83, 0x83, 0x8d, 0x8d, 0x8d, 0x8e, 0x7e, 0x7f, 0x76, 0x76, 0x77, 0x6e}, SKINCOLOR_APRICOT, 6, V_SKYMAP, true}, // SKINCOLOR_CYAN {"Turquoise", { 0, 120, 121, 122, 123, 141, 141, 135, 136, 136, 150, 153, 155, 157, 159, 253}, SKINCOLOR_SANGRIA, 12, V_SKYMAP, true}, // SKINCOLOR_TURQUOISE @@ -21661,8 +21661,8 @@ skincolor_t skincolors[MAXSKINCOLORS] = { {"Dream", { 80, 208, 200, 200, 146, 146, 133, 134, 135, 136, 137, 138, 139, 139, 254, 254}, SKINCOLOR_FOUNDATION, 9, V_SKYMAP, true}, // SKINCOLOR_DREAM {"Icy", {0x00, 0x00, 0x00, 0x00, 0x80, 0x81, 0x83, 0x83, 0x86, 0x87, 0x95, 0x95, 0xad, 0xad, 0xae, 0xaf}, SKINCOLOR_CRIMSON, 0, V_SKYMAP, true}, // SKINCOLOR_ICY {"Daybreak", { 80, 81, 82, 72, 64, 9, 11, 171, 149, 150, 151, 153, 156, 157, 159, 253}, SKINCOLOR_EVENTIDE, 12, V_BLUEMAP, true}, // SKINCOLOR_DAYBREAK - {"Sapphire", {0x80, 0x82, 0x86, 0x87, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xfd, 0xfe}, SKINCOLOR_SUNSET, 5, V_SKYMAP, true}, // SKINCOLOR_SAPPHIRE - {"Arctic", { 0, 1, 3, 4, 146, 146, 147, 148, 148, 149, 150, 153, 156, 159, 253, 254}, SKINCOLOR_PUMPKIN, 6, V_BLUEMAP, true}, // SKINCOLOR_ARCTIC + {"Sapphire", {0x80, 0x82, 0x86, 0x87, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xfd, 0xfe}, SKINCOLOR_SUNSET, 5, V_BLUEMAP, true}, // SKINCOLOR_SAPPHIRE + {"Arctic", { 0, 1, 3, 4, 145, 146, 147, 148, 148, 149, 150, 153, 156, 159, 253, 254}, SKINCOLOR_ECRU, 15, V_BLUEMAP, true}, // SKINCOLOR_ARCTIC {"Cornflower", {0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x9a, 0x9c, 0x9d, 0x9d, 0x9e, 0x9e, 0x9e}, SKINCOLOR_YELLOW, 4, V_BLUEMAP, true}, // SKINCOLOR_CORNFLOWER {"Blue", {0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xfd, 0xfe}, SKINCOLOR_ORANGE, 5, V_BLUEMAP, true}, // SKINCOLOR_BLUE {"Cobalt", { 145, 147, 149, 150, 151, 153, 154, 155, 156, 157, 158, 159, 253, 253, 254, 254}, SKINCOLOR_PERIDOT, 5, V_BLUEMAP, true}, // SKINCOLOR_COBALT @@ -21676,7 +21676,7 @@ skincolor_t skincolors[MAXSKINCOLORS] = { {"Noble", { 144, 146, 147, 148, 149, 164, 164, 165, 166, 185, 186, 186, 187, 187, 28, 29}, SKINCOLOR_CHARTREUSE, 12, V_PURPLEMAP, true}, // SKINCOLOR_NOBLE {"Fuchsia", { 200, 201, 203, 204, 204, 183, 184, 184, 165, 166, 167, 168, 169, 159, 253, 254}, SKINCOLOR_LEMON, 10, V_PURPLEMAP, true}, // SKINCOLOR_FUCHSIA {"Bubblegum", { 0, 208, 208, 176, 177, 178, 179, 180, 181, 182, 164, 166, 167, 168, 169, 253}, SKINCOLOR_PASTEL, 8, V_MAGENTAMAP, true}, // SKINCOLOR_BUBBLEGUM - {"Crystal", { 252, 177, 179, 180, 181, 181, 182, 182, 183, 164, 166, 167, 167, 168, 169, 159}, SKINCOLOR_EMERALD, 8, V_MAGENTAMAP, true}, // SKINCOLOR_CRYSTAL + {"Siberite", { 252, 177, 179, 180, 181, 181, 182, 182, 183, 164, 166, 167, 167, 168, 169, 159}, SKINCOLOR_EMERALD, 8, V_MAGENTAMAP, true}, // SKINCOLOR_SIBERITE {"Magenta", {0xb3, 0xb3, 0xb4, 0xb5, 0xb6, 0xb6, 0xb7, 0xb7, 0xb7, 0xb8, 0xb9, 0xb9, 0xba, 0xba, 0xbb, 0xbb}, SKINCOLOR_LIME, 6, V_MAGENTAMAP, true}, // SKINCOLOR_MAGENTA {"Neon", {0xb3, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xb9, 0xba, 0xba, 0xbb, 0xbb, 0xc7, 0xc7, 0x1d, 0x1d, 0x1e}, SKINCOLOR_CERULEAN, 2, V_MAGENTAMAP, true}, // SKINCOLOR_NEON {"Violet", {0xd0, 0xd1, 0xd2, 0xca, 0xcc, 0xb8, 0xb9, 0xb9, 0xba, 0xa8, 0xa8, 0xa9, 0xa9, 0xfd, 0xfe, 0xfe}, SKINCOLOR_MINT, 6, V_MAGENTAMAP, true}, // SKINCOLOR_VIOLET diff --git a/src/st_stuff.c b/src/st_stuff.c index a6bd77cfa..b9f0c6bb9 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -174,7 +174,7 @@ static huddrawlist_h luahuddrawlist_titlecard; skincolornum_t linkColor[3][NUMLINKCOLORS] = { {SKINCOLOR_SHAMROCK, SKINCOLOR_AQUA, SKINCOLOR_SKY, SKINCOLOR_BLUE, SKINCOLOR_PURPLE, SKINCOLOR_MAGENTA, SKINCOLOR_ROSY, SKINCOLOR_RED, SKINCOLOR_ORANGE, SKINCOLOR_GOLD, SKINCOLOR_YELLOW, SKINCOLOR_PERIDOT}, -{SKINCOLOR_EMERALD, SKINCOLOR_AQUAMARINE, SKINCOLOR_WAVE, SKINCOLOR_SAPPHIRE, SKINCOLOR_GALAXY, SKINCOLOR_CRYSTAL, +{SKINCOLOR_EMERALD, SKINCOLOR_OCEAN, SKINCOLOR_AQUAMARINE, SKINCOLOR_SAPPHIRE, SKINCOLOR_GALAXY, SKINCOLOR_SIBERITE, SKINCOLOR_TAFFY, SKINCOLOR_RUBY, SKINCOLOR_GARNET, SKINCOLOR_TOPAZ, SKINCOLOR_LEMON, SKINCOLOR_LIME}, {SKINCOLOR_ISLAND, SKINCOLOR_TURQUOISE, SKINCOLOR_DREAM, SKINCOLOR_DAYBREAK, SKINCOLOR_VAPOR, SKINCOLOR_FUCHSIA, SKINCOLOR_VIOLET, SKINCOLOR_EVENTIDE, SKINCOLOR_KETCHUP, SKINCOLOR_FOUNDATION, SKINCOLOR_HEADLIGHT, SKINCOLOR_CHARTREUSE}}; From f42c2403f9a1bd3db9dea5923f95884b49efe442 Mon Sep 17 00:00:00 2001 From: Zwip-Zwap Zapony Date: Fri, 25 Aug 2023 10:42:12 +0200 Subject: [PATCH 045/195] Interpolate radius/height when scaling mobjs --- src/hardware/hw_main.c | 28 +++++++++--------------- src/hardware/hw_md2.c | 11 +++------- src/r_fps.c | 20 ++++++++++++++++- src/r_fps.h | 2 ++ src/r_things.c | 49 +++++++++++++++++++++--------------------- 5 files changed, 58 insertions(+), 52 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index bc66955fc..4208a4486 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -3595,7 +3595,7 @@ static void HWR_DrawDropShadow(mobj_t *thing, fixed_t scale) return; } - floordiff = abs((flip < 0 ? thing->height : 0) + interp.z - groundz); + floordiff = abs((flip < 0 ? interp.height : 0) + interp.z - groundz); alpha = floordiff / (4*FRACUNIT) + 75; if (alpha >= 255) return; @@ -3606,9 +3606,7 @@ static void HWR_DrawDropShadow(mobj_t *thing, fixed_t scale) HWR_GetPatch(gpatch); scalemul = FixedMul(FRACUNIT - floordiff/640, scale); - scalemul = FixedMul(scalemul, (thing->radius*2) / gpatch->height); - if ((thing->scale != thing->old_scale) && (thing->scale >= FRACUNIT/1024)) // Interpolate shadows when scaling mobjs - scalemul = FixedMul(scalemul, FixedDiv(interp.scale, thing->scale)); + scalemul = FixedMul(scalemul, (interp.radius*2) / gpatch->height); fscale = FIXED_TO_FLOAT(scalemul); fx = FIXED_TO_FLOAT(interp.x); @@ -3720,7 +3718,7 @@ static void HWR_RotateSpritePolyToAim(gl_vissprite_t *spr, FOutVector *wallVerts if (P_MobjFlip(spr->mobj) == -1) { - basey = FIXED_TO_FLOAT(interp.z + spr->mobj->height); + basey = FIXED_TO_FLOAT(interp.z + interp.height); } else { @@ -5326,7 +5324,7 @@ static void HWR_ProjectSprite(mobj_t *thing) } groundz = R_GetShadowZ(thing, NULL); - floordiff = abs(((thing->eflags & MFE_VERTICALFLIP) ? caster->height : 0) + casterinterp.z - groundz); + floordiff = abs(((thing->eflags & MFE_VERTICALFLIP) ? casterinterp.height : 0) + casterinterp.z - groundz); shadowheight = FIXED_TO_FLOAT(floordiff); shadowscale = FIXED_TO_FLOAT(FixedMul(FRACUNIT - floordiff/640, casterinterp.scale)); @@ -5378,10 +5376,7 @@ static void HWR_ProjectSprite(mobj_t *thing) if (vflip) { - if (thing->scale != thing->old_scale) // Interpolate heights in reverse gravity when scaling mobjs - gz = FIXED_TO_FLOAT(interp.z + FixedMul(thing->height, FixedDiv(interp.scale, thing->scale))) - (FIXED_TO_FLOAT(spr_topoffset) * this_yscale); - else - gz = FIXED_TO_FLOAT(interp.z + thing->height) - (FIXED_TO_FLOAT(spr_topoffset) * this_yscale); + gz = FIXED_TO_FLOAT(interp.z + interp.height) - (FIXED_TO_FLOAT(spr_topoffset) * this_yscale); gzt = gz + (FIXED_TO_FLOAT(spr_height) * this_yscale); } else @@ -5687,7 +5682,6 @@ static void HWR_ProjectBoundingBox(mobj_t *thing) gl_vissprite_t *vis; float tr_x, tr_y; float tz; - float rad; if (!thing) return; @@ -5722,15 +5716,13 @@ static void HWR_ProjectBoundingBox(mobj_t *thing) tr_x += gl_viewx; tr_y += gl_viewy; - rad = FIXED_TO_FLOAT(thing->radius); - vis = HWR_NewVisSprite(); - vis->x1 = tr_x - rad; - vis->x2 = tr_x + rad; - vis->z1 = tr_y - rad; - vis->z2 = tr_y + rad; + vis->x1 = tr_x - FIXED_TO_FLOAT(interp.radius); + vis->x2 = tr_x + FIXED_TO_FLOAT(interp.radius); + vis->z1 = tr_y - FIXED_TO_FLOAT(interp.radius); + vis->z2 = tr_y + FIXED_TO_FLOAT(interp.radius); vis->gz = FIXED_TO_FLOAT(interp.z); - vis->gzt = vis->gz + FIXED_TO_FLOAT(thing->height); + vis->gzt = vis->gz + FIXED_TO_FLOAT(interp.height); vis->mobj = thing; vis->precip = false; diff --git a/src/hardware/hw_md2.c b/src/hardware/hw_md2.c index 87881be8d..6123eb9a9 100644 --- a/src/hardware/hw_md2.c +++ b/src/hardware/hw_md2.c @@ -1585,12 +1585,7 @@ boolean HWR_DrawModel(gl_vissprite_t *spr) p.y = FIXED_TO_FLOAT(interp.y)+md2->offset; if (flip) - { - if (spr->mobj->scale != spr->mobj->old_scale) // Interpolate heights in reverse gravity when scaling mobjs - p.z = FIXED_TO_FLOAT(interp.z + FixedMul(spr->mobj->height, FixedDiv(interp.scale, spr->mobj->scale))); - else - p.z = FIXED_TO_FLOAT(interp.z + spr->mobj->height); - } + p.z = FIXED_TO_FLOAT(interp.z + interp.height); else p.z = FIXED_TO_FLOAT(interp.z); @@ -1626,8 +1621,8 @@ boolean HWR_DrawModel(gl_vissprite_t *spr) p.roll = true; // rotation pivot - p.centerx = FIXED_TO_FLOAT(spr->mobj->radius / 2); - p.centery = FIXED_TO_FLOAT(spr->mobj->height / 2); + p.centerx = FIXED_TO_FLOAT(interp.radius / 2); + p.centery = FIXED_TO_FLOAT(interp.height / 2); // rotation axes relative to camera p.rollx = FIXED_TO_FLOAT(FINECOSINE(FixedAngle(camAngleDiff) >> ANGLETOFINESHIFT)); diff --git a/src/r_fps.c b/src/r_fps.c index c6eb59482..de450aaa7 100644 --- a/src/r_fps.c +++ b/src/r_fps.c @@ -292,6 +292,8 @@ void R_InterpolateMobjState(mobj_t *mobj, fixed_t frac, interpmobjstate_t *out) out->y = mobj->y; out->z = mobj->z; out->scale = mobj->scale; + out->radius = mobj->radius; + out->height = mobj->height; out->subsector = mobj->subsector; out->angle = mobj->player ? mobj->player->drawangle : mobj->angle; out->pitch = mobj->pitch; @@ -307,10 +309,22 @@ void R_InterpolateMobjState(mobj_t *mobj, fixed_t frac, interpmobjstate_t *out) out->x = R_LerpFixed(mobj->old_x, mobj->x, frac); out->y = R_LerpFixed(mobj->old_y, mobj->y, frac); out->z = R_LerpFixed(mobj->old_z, mobj->z, frac); - out->scale = mobj->resetinterp ? mobj->scale : R_LerpFixed(mobj->old_scale, mobj->scale, frac); out->spritexscale = mobj->resetinterp ? mobj->spritexscale : R_LerpFixed(mobj->old_spritexscale, mobj->spritexscale, frac); out->spriteyscale = mobj->resetinterp ? mobj->spriteyscale : R_LerpFixed(mobj->old_spriteyscale, mobj->spriteyscale, frac); + if (mobj->scale == mobj->old_scale) // Tiny optimisation - scale is usually unchanging, so let's skip a lerp, two FixedMuls, and two FixedDivs + { + out->scale = mobj->scale; + out->radius = mobj->radius; + out->height = mobj->height; + } + else + { + out->scale = R_LerpFixed(mobj->old_scale, mobj->scale, frac); + out->radius = FixedMul(mobj->radius, FixedDiv(out->scale, mobj->scale)); + out->height = FixedMul(mobj->height, FixedDiv(out->scale, mobj->scale)); + } + // Sprite offsets are not interpolated until we have a way to interpolate them explicitly in Lua. // It seems existing mods visually break more often than not if it is interpolated. out->spritexoffset = mobj->spritexoffset; @@ -340,6 +354,8 @@ void R_InterpolatePrecipMobjState(precipmobj_t *mobj, fixed_t frac, interpmobjst out->y = mobj->y; out->z = mobj->z; out->scale = FRACUNIT; + out->radius = mobj->radius; + out->height = mobj->height; out->subsector = mobj->subsector; out->angle = mobj->angle; out->pitch = mobj->angle; @@ -356,6 +372,8 @@ void R_InterpolatePrecipMobjState(precipmobj_t *mobj, fixed_t frac, interpmobjst out->y = R_LerpFixed(mobj->old_y, mobj->y, frac); out->z = R_LerpFixed(mobj->old_z, mobj->z, frac); out->scale = FRACUNIT; + out->radius = mobj->radius; + out->height = mobj->height; out->spritexscale = R_LerpFixed(mobj->old_spritexscale, mobj->spritexscale, frac); out->spriteyscale = R_LerpFixed(mobj->old_spriteyscale, mobj->spriteyscale, frac); out->spritexoffset = R_LerpFixed(mobj->old_spritexoffset, mobj->spritexoffset, frac); diff --git a/src/r_fps.h b/src/r_fps.h index 9a8bfa38a..f43d29f30 100644 --- a/src/r_fps.h +++ b/src/r_fps.h @@ -63,6 +63,8 @@ typedef struct { angle_t roll; angle_t spriteroll; fixed_t scale; + fixed_t radius; + fixed_t height; fixed_t spritexscale; fixed_t spriteyscale; fixed_t spritexoffset; diff --git a/src/r_things.c b/src/r_things.c index e69fe1b82..cd92c3b4b 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -1184,7 +1184,7 @@ fixed_t R_GetShadowZ(mobj_t *thing, pslope_t **shadowslope) R_InterpolateMobjState(thing, FRACUNIT, &interp); } - halfHeight = interp.z + (thing->height >> 1); + halfHeight = interp.z + (interp.height >> 1); floorz = P_GetFloorZ(thing, interp.subsector->sector, interp.x, interp.y, NULL); ceilingz = P_GetCeilingZ(thing, interp.subsector->sector, interp.x, interp.y, NULL); @@ -1248,8 +1248,8 @@ fixed_t R_GetShadowZ(mobj_t *thing, pslope_t **shadowslope) } } - if (isflipped ? (ceilingz < groundz - (!groundslope ? 0 : FixedMul(abs(groundslope->zdelta), thing->radius*3/2))) - : (floorz > groundz + (!groundslope ? 0 : FixedMul(abs(groundslope->zdelta), thing->radius*3/2)))) + if (isflipped ? (ceilingz < groundz - (!groundslope ? 0 : FixedMul(abs(groundslope->zdelta), interp.radius*3/2))) + : (floorz > groundz + (!groundslope ? 0 : FixedMul(abs(groundslope->zdelta), interp.radius*3/2)))) { groundz = isflipped ? ceilingz : floorz; groundslope = NULL; @@ -1292,9 +1292,9 @@ static void R_SkewShadowSprite( //CONS_Printf("Shadow is sloped by %d %d\n", xslope, zslope); if (viewz < groundz) - *shadowyscale += FixedMul(FixedMul(thing->radius*2 / spriteheight, scalemul), zslope); + *shadowyscale += FixedMul(FixedMul(interp.radius*2 / spriteheight, scalemul), zslope); else - *shadowyscale -= FixedMul(FixedMul(thing->radius*2 / spriteheight, scalemul), zslope); + *shadowyscale -= FixedMul(FixedMul(interp.radius*2 / spriteheight, scalemul), zslope); *shadowyscale = abs((*shadowyscale)); *shadowskew = xslope; @@ -1345,20 +1345,18 @@ static void R_ProjectDropShadow(mobj_t *thing, vissprite_t *vis, fixed_t scale, return; } - floordiff = abs((isflipped ? thing->height : 0) + interp.z - groundz); + floordiff = abs((isflipped ? interp.height : 0) + interp.z - groundz); trans = floordiff / (100*FRACUNIT) + 3; if (trans >= 9) return; scalemul = FixedMul(FRACUNIT - floordiff/640, scale); - if ((thing->scale != thing->old_scale) && (thing->scale >= FRACUNIT/1024)) // Interpolate shadows when scaling mobjs - scalemul = FixedMul(scalemul, FixedDiv(interp.scale, thing->scale)); patch = W_CachePatchName("DSHADOW", PU_SPRITE); xscale = FixedDiv(projection, tz); yscale = FixedDiv(projectiony, tz); - shadowxscale = FixedMul(thing->radius*2, scalemul); - shadowyscale = FixedMul(FixedMul(thing->radius*2, scalemul), FixedDiv(abs(groundz - viewz), tz)); + shadowxscale = FixedMul(interp.radius*2, scalemul); + shadowyscale = FixedMul(FixedMul(interp.radius*2, scalemul), FixedDiv(abs(groundz - viewz), tz)); shadowyscale = min(shadowyscale, shadowxscale) / patch->height; shadowxscale /= patch->width; shadowskew = 0; @@ -1484,8 +1482,8 @@ static void R_ProjectBoundingBox(mobj_t *thing, vissprite_t *vis) // 0--2 // start in the (0) corner - gx = interp.x - thing->radius - viewx; - gy = interp.y - thing->radius - viewy; + gx = interp.x - interp.radius - viewx; + gy = interp.y - interp.radius - viewy; tz = FixedMul(gx, viewcos) + FixedMul(gy, viewsin); @@ -1507,14 +1505,14 @@ static void R_ProjectBoundingBox(mobj_t *thing, vissprite_t *vis) box = R_NewVisSprite(); box->mobj = thing; box->mobjflags = thing->flags; - box->thingheight = thing->height; + box->thingheight = interp.height; box->cut = SC_BBOX; box->gx = tx; box->gy = tz; - box->scale = 2 * FixedMul(thing->radius, viewsin); - box->xscale = 2 * FixedMul(thing->radius, viewcos); + box->scale = 2 * FixedMul(interp.radius, viewsin); + box->xscale = 2 * FixedMul(interp.radius, viewcos); box->pz = interp.z; box->pzt = box->pz + box->thingheight; @@ -1563,6 +1561,7 @@ static void R_ProjectSprite(mobj_t *thing) fixed_t tr_x, tr_y; fixed_t tx, tz; fixed_t xscale, yscale; //added : 02-02-98 : aaargll..if I were a math-guy!!! + fixed_t radius, height; // For drop shadows fixed_t sortscale, sortsplat = 0; fixed_t linkscale = 0; fixed_t sort_x = 0, sort_y = 0, sort_z; @@ -1638,6 +1637,8 @@ static void R_ProjectSprite(mobj_t *thing) } this_scale = interp.scale; + radius = interp.radius; // For drop shadows + height = interp.height; // Ditto // transform the origin point tr_x = interp.x - viewx; @@ -1977,6 +1978,8 @@ static void R_ProjectSprite(mobj_t *thing) { R_InterpolateMobjState(thing, FRACUNIT, &tracer_interp); } + radius = tracer_interp.radius; // For drop shadows + height = tracer_interp.height; // Ditto tr_x = (tracer_interp.x + sort_x) - viewx; tr_y = (tracer_interp.y + sort_y) - viewy; @@ -2068,7 +2071,7 @@ static void R_ProjectSprite(mobj_t *thing) if (abs(groundz-viewz)/tz > 4) return; // Prevent stretchy shadows and possible crashes - floordiff = abs((isflipped ? caster->height : 0) + casterinterp.z - groundz); + floordiff = abs((isflipped ? casterinterp.height : 0) + casterinterp.z - groundz); trans += ((floordiff / (100*FRACUNIT)) + 3); shadowscale = FixedMul(FRACUNIT - floordiff/640, casterinterp.scale); } @@ -2083,8 +2086,8 @@ static void R_ProjectSprite(mobj_t *thing) if (shadowdraw) { - spritexscale = FixedMul(thing->radius * 2, FixedMul(shadowscale, spritexscale)); - spriteyscale = FixedMul(thing->radius * 2, FixedMul(shadowscale, spriteyscale)); + spritexscale = FixedMul(radius * 2, FixedMul(shadowscale, spritexscale)); + spriteyscale = FixedMul(radius * 2, FixedMul(shadowscale, spriteyscale)); spriteyscale = FixedMul(spriteyscale, FixedDiv(abs(groundz - viewz), tz)); spriteyscale = min(spriteyscale, spritexscale) / patch->height; spritexscale /= patch->width; @@ -2099,7 +2102,7 @@ static void R_ProjectSprite(mobj_t *thing) { R_SkewShadowSprite(thing, thing->standingslope, groundz, patch->height, shadowscale, &spriteyscale, &sheartan); - gzt = (isflipped ? (interp.z + thing->height) : interp.z) + patch->height * spriteyscale / 2; + gzt = (isflipped ? (interp.z + height) : interp.z) + patch->height * spriteyscale / 2; gz = gzt - patch->height * spriteyscale; cut |= SC_SHEAR; @@ -2114,11 +2117,7 @@ static void R_ProjectSprite(mobj_t *thing) // When vertical flipped, draw sprites from the top down, at least as far as offsets are concerned. // sprite height - sprite topoffset is the proper inverse of the vertical offset, of course. // remember gz and gzt should be seperated by sprite height, not thing height - thing height can be shorter than the sprite itself sometimes! - - if (oldthing->scale != oldthing->old_scale) // Interpolate heights in reverse gravity when scaling mobjs - gz = interp.z + FixedMul(oldthing->height, FixedDiv(interp.scale, oldthing->scale)) - FixedMul(spr_topoffset, FixedMul(spriteyscale, this_scale)); - else - gz = interp.z + oldthing->height - FixedMul(spr_topoffset, FixedMul(spriteyscale, this_scale)); + gz = interp.z + interp.height - FixedMul(spr_topoffset, FixedMul(spriteyscale, this_scale)); gzt = gz + FixedMul(spr_height, FixedMul(spriteyscale, this_scale)); } else @@ -2197,7 +2196,7 @@ static void R_ProjectSprite(mobj_t *thing) vis->gy = interp.y; vis->gz = gz; vis->gzt = gzt; - vis->thingheight = thing->height; + vis->thingheight = height; vis->pz = interp.z; vis->pzt = vis->pz + vis->thingheight; vis->texturemid = FixedDiv(gzt - viewz, spriteyscale); From 91a17fdbdd78c121d00731ff009fd07901d5ecc7 Mon Sep 17 00:00:00 2001 From: Zwip-Zwap Zapony Date: Fri, 25 Aug 2023 10:42:25 +0200 Subject: [PATCH 046/195] Use decimal instead of octal vertex IDs --- src/hardware/hw_main.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 4208a4486..f2022bcea 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -4053,32 +4053,32 @@ static void HWR_DrawBoundingBox(gl_vissprite_t *vis) // repeat this 4 times (overhead) // // - // 17 20 21 11 - // 16 15 14 10 - // 27 22 *--* 07 12 + // 15 16 17 09 + // 14 13 12 08 + // 23 18 *--* 07 10 // | | - // 26 23 *--* 06 13 - // 24 00 01 02 - // 25 05 04 03 + // 22 19 *--* 06 11 + // 20 00 01 02 + // 21 05 04 03 // - v[000].x = v[005].x = v[015].x = v[016].x = v[017].x = v[020].x = - v[022].x = v[023].x = v[024].x = v[025].x = v[026].x = v[027].x = vis->x1; // west + v[ 0].x = v[ 5].x = v[13].x = v[14].x = v[15].x = v[16].x = + v[18].x = v[19].x = v[20].x = v[21].x = v[22].x = v[23].x = vis->x1; // west - v[001].x = v[002].x = v[003].x = v[004].x = v[006].x = v[007].x = - v[010].x = v[011].x = v[012].x = v[013].x = v[014].x = v[021].x = vis->x2; // east + v[ 1].x = v[ 2].x = v[ 3].x = v[ 4].x = v[ 6].x = v[ 7].x = + v[ 8].x = v[ 9].x = v[10].x = v[11].x = v[12].x = v[17].x = vis->x2; // east - v[000].z = v[001].z = v[002].z = v[003].z = v[004].z = v[005].z = - v[006].z = v[013].z = v[023].z = v[024].z = v[025].z = v[026].z = vis->z1; // south + v[ 0].z = v[ 1].z = v[ 2].z = v[ 3].z = v[ 4].z = v[ 5].z = + v[ 6].z = v[11].z = v[19].z = v[20].z = v[21].z = v[22].z = vis->z1; // south - v[007].z = v[010].z = v[011].z = v[012].z = v[014].z = v[015].z = - v[016].z = v[017].z = v[020].z = v[021].z = v[022].z = v[027].z = vis->z2; // north + v[ 7].z = v[ 8].z = v[ 9].z = v[10].z = v[12].z = v[13].z = + v[14].z = v[15].z = v[16].z = v[17].z = v[18].z = v[23].z = vis->z2; // north - v[000].y = v[001].y = v[002].y = v[006].y = v[007].y = v[010].y = - v[014].y = v[015].y = v[016].y = v[022].y = v[023].y = v[024].y = vis->gz; // bottom + v[ 0].y = v[ 1].y = v[ 2].y = v[ 6].y = v[ 7].y = v[ 8].y = + v[12].y = v[13].y = v[14].y = v[18].y = v[19].y = v[20].y = vis->gz; // bottom - v[003].y = v[004].y = v[005].y = v[011].y = v[012].y = v[013].y = - v[017].y = v[020].y = v[021].y = v[025].y = v[026].y = v[027].y = vis->gzt; // top + v[ 3].y = v[ 4].y = v[ 5].y = v[ 9].y = v[10].y = v[11].y = + v[15].y = v[16].y = v[17].y = v[21].y = v[22].y = v[23].y = vis->gzt; // top Surf.PolyColor = V_GetColor(R_GetBoundingBoxColor(vis->mobj)); From 7a1f952d9eadada9f419d38b19d9d118d780f670 Mon Sep 17 00:00:00 2001 From: Zwip-Zwap Zapony Date: Tue, 29 Aug 2023 17:11:52 +0200 Subject: [PATCH 047/195] Make a comment clearer --- src/p_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_user.c b/src/p_user.c index cb6f9d9b9..035ae35b7 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -2012,7 +2012,7 @@ mobj_t *P_SpawnGhostMobj(mobj_t *mobj) mobj_t *ghost2 = P_SpawnGhostMobj(mobj->player->followmobj); P_SetTarget(&ghost2->tracer, ghost); P_SetTarget(&ghost->tracer, ghost2); - P_SetTarget(&ghost2->dontdrawforviewmobj, mobj); // Hide the follow-ghost for the non-follow object + P_SetTarget(&ghost2->dontdrawforviewmobj, mobj); // Hide the follow-ghost for the non-follow target ghost2->flags2 |= (mobj->player->followmobj->flags2 & MF2_LINKDRAW); } From 2febb6ced95fdbc3c55d1d114c68caa2c639d11e Mon Sep 17 00:00:00 2001 From: Zwip-Zwap Zapony Date: Tue, 29 Aug 2023 17:12:04 +0200 Subject: [PATCH 048/195] Don't copy dontdrawforviewmobj to MT_OVERLAYs --- src/p_mobj.c | 1 - src/p_user.c | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index de2c3a72c..f72e18ee1 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -6882,7 +6882,6 @@ void P_RunOverlays(void) mo->eflags = (mo->eflags & ~MFE_VERTICALFLIP) | (mo->target->eflags & MFE_VERTICALFLIP); mo->scale = mo->destscale = mo->target->scale; mo->angle = (mo->target->player ? mo->target->player->drawangle : mo->target->angle) + mo->movedir; - P_SetTarget(&mo->dontdrawforviewmobj, mo->target->dontdrawforviewmobj); // Hide the overlay from the view that its target is hidden from - But don't copy drawonlyforplayer! if (!(mo->state->frame & FF_ANIMATE)) zoffs = FixedMul(((signed)mo->state->var2)*FRACUNIT, mo->scale); diff --git a/src/p_user.c b/src/p_user.c index 035ae35b7..f6f1a7588 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -1855,6 +1855,7 @@ void P_SpawnShieldOrb(player_t *player) { ov = P_SpawnMobj(shieldobj->x, shieldobj->y, shieldobj->z, MT_OVERLAY); P_SetTarget(&ov->target, shieldobj); + P_SetTarget(&ov->dontdrawforviewmobj, player->mo); // Hide the shield in first-person P_SetMobjState(ov, shieldobj->info->seestate); P_SetTarget(&shieldobj->tracer, ov); } @@ -1862,12 +1863,14 @@ void P_SpawnShieldOrb(player_t *player) { ov = P_SpawnMobj(shieldobj->x, shieldobj->y, shieldobj->z, MT_OVERLAY); P_SetTarget(&ov->target, shieldobj); + P_SetTarget(&ov->dontdrawforviewmobj, player->mo); // Hide the shield in first-person P_SetMobjState(ov, shieldobj->info->meleestate); } if (shieldobj->info->missilestate) { ov = P_SpawnMobj(shieldobj->x, shieldobj->y, shieldobj->z, MT_OVERLAY); P_SetTarget(&ov->target, shieldobj); + P_SetTarget(&ov->dontdrawforviewmobj, player->mo); // Hide the shield in first-person P_SetMobjState(ov, shieldobj->info->missilestate); } if (player->powers[pw_shield] & SH_FORCE) From b98bec9a03bbe83f6dfeda13c2e2c1b0bdaab6b4 Mon Sep 17 00:00:00 2001 From: spherallic Date: Wed, 30 Aug 2023 00:07:49 +0200 Subject: [PATCH 049/195] Final final 2.2.12 color tweaks (real) - Tweaked Aether, Midnight and Volcanic - Credit Chrispy & Saneko for new skincolors --- src/info.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/info.c b/src/info.c index 399b5c936..36389d849 100644 --- a/src/info.c +++ b/src/info.c @@ -21584,7 +21584,7 @@ skincolor_t skincolors[MAXSKINCOLORS] = { {"Black", {0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1b, 0x1b, 0x1c, 0x1d, 0x1d, 0x1e, 0x1e, 0x1f, 0x1f}, SKINCOLOR_WHITE, 7, V_GRAYMAP, true}, // SKINCOLOR_BLACK // Desaturated - {"Aether", {0x00, 0x00, 0x01, 0x02, 0x02, 0x03, 0x91, 0x91, 0x91, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xaf}, SKINCOLOR_GREY, 15, 0, true}, // SKINCOLOR_AETHER + {"Aether", {0x00, 0x00, 0x01, 0x01, 0x90, 0x90, 0x91, 0x91, 0x92, 0xaa, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xae}, SKINCOLOR_GREY, 15, 0, true}, // SKINCOLOR_AETHER {"Slate", {0x00, 0x02, 0x04, 0x06, 0x08, 0x0a, 0xaa, 0xaa, 0xaa, 0xab, 0xac, 0xac, 0xad, 0xad, 0xae, 0xaf}, SKINCOLOR_SILVER, 12, 0, true}, // SKINCOLOR_SLATE {"Moonstone", { 0, 4, 8, 9, 11, 12, 14, 15, 171, 172, 173, 174, 175, 27, 29, 31}, SKINCOLOR_TOPAZ, 15, V_GRAYMAP, true}, // SKINCOLOR_MOONSTONE {"Bluebell", {0x90, 0x91, 0x92, 0x93, 0x94, 0x94, 0x95, 0xac, 0xac, 0xad, 0xad, 0xa8, 0xa8, 0xa9, 0xfd, 0xfe}, SKINCOLOR_COPPER, 4, V_BLUEMAP, true}, // SKINCOLOR_BLUEBELL @@ -21606,7 +21606,7 @@ skincolor_t skincolors[MAXSKINCOLORS] = { {"Lavender", {0xc0, 0xc0, 0xc1, 0xc1, 0xc2, 0xc2, 0xc3, 0xc3, 0xc3, 0xc4, 0xc5, 0xc5, 0xc6, 0xc6, 0xc7, 0xc7}, SKINCOLOR_GOLD, 4, V_PURPLEMAP, true}, // SKINCOLOR_LAVENDER // Viv's vivid colours (toast 21/07/17) - // Tweaks & additions (Lach, sphere, Alice, MotorRoach 26/10/22) + // Tweaks & additions (Lach, Chrispy, sphere, Alice, MotorRoach & Saneko 26/10/22) {"Ruby", {0xb0, 0xb0, 0xc9, 0xca, 0xcc, 0x26, 0x27, 0x28, 0x29, 0x2a, 0xb9, 0xb9, 0xba, 0xba, 0xbb, 0xfd}, SKINCOLOR_EMERALD, 10, V_REDMAP, true}, // SKINCOLOR_RUBY {"Cherry", { 202, 203, 204, 205, 206, 40, 41, 42, 43, 44, 186, 187, 28, 29, 30, 31}, SKINCOLOR_MIDNIGHT, 10, V_REDMAP, true}, // SKINCOLOR_CHERRY {"Salmon", {0xd0, 0xd0, 0xd1, 0xd2, 0x20, 0x21, 0x24, 0x25, 0x26, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e}, SKINCOLOR_FOREST, 6, V_REDMAP, true}, // SKINCOLOR_SALMON @@ -21666,7 +21666,7 @@ skincolor_t skincolors[MAXSKINCOLORS] = { {"Cornflower", {0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x9a, 0x9c, 0x9d, 0x9d, 0x9e, 0x9e, 0x9e}, SKINCOLOR_YELLOW, 4, V_BLUEMAP, true}, // SKINCOLOR_CORNFLOWER {"Blue", {0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xfd, 0xfe}, SKINCOLOR_ORANGE, 5, V_BLUEMAP, true}, // SKINCOLOR_BLUE {"Cobalt", { 145, 147, 149, 150, 151, 153, 154, 155, 156, 157, 158, 159, 253, 253, 254, 254}, SKINCOLOR_PERIDOT, 5, V_BLUEMAP, true}, // SKINCOLOR_COBALT - {"Midnight", { 171, 171, 172, 173, 173, 174, 156, 157, 158, 159, 253, 253, 254, 254, 31, 31}, SKINCOLOR_CHERRY, 10, V_GRAYMAP, true}, // SKINCOLOR_MIDNIGHT + {"Midnight", { 171, 171, 172, 173, 173, 174, 175, 157, 158, 159, 253, 253, 254, 254, 31, 31}, SKINCOLOR_CHERRY, 10, V_GRAYMAP, true}, // SKINCOLOR_MIDNIGHT {"Galaxy", { 160, 161, 162, 163, 164, 165, 166, 166, 154, 155, 156, 157, 159, 253, 254, 31}, SKINCOLOR_ISLAND, 7, V_PURPLEMAP, true}, // SKINCOLOR_GALAXY {"Vapor", {0x80, 0x81, 0x83, 0x86, 0x94, 0x94, 0xa3, 0xa3, 0xa4, 0xa6, 0xa6, 0xa6, 0xa8, 0xa8, 0xa9, 0xa9}, SKINCOLOR_LILAC, 4, V_SKYMAP, true}, // SKINCOLOR_VAPOR {"Dusk", {0x92, 0x93, 0x94, 0x94, 0xac, 0xad, 0xad, 0xad, 0xae, 0xae, 0xaf, 0xaf, 0xa9, 0xa9, 0xfd, 0xfd}, SKINCOLOR_OLIVE, 0, V_BLUEMAP, true}, // SKINCOLOR_DUSK @@ -21690,7 +21690,7 @@ skincolor_t skincolors[MAXSKINCOLORS] = { {"Rosy", {0xfc, 0xc8, 0xc8, 0xc9, 0xc9, 0xca, 0xca, 0xcb, 0xcb, 0xcc, 0xcc, 0xcd, 0xcd, 0xce, 0xce, 0xcf}, SKINCOLOR_AQUA, 1, V_ROSYMAP, true}, // SKINCOLOR_ROSY {"Fancy", { 0, 208, 49, 210, 210, 202, 202, 203, 204, 204, 205, 206, 207, 207, 186, 186}, SKINCOLOR_ROYAL, 9, V_ROSYMAP, true}, // SKINCOLOR_FANCY {"Sangria", { 210, 32, 33, 34, 34, 215, 215, 207, 207, 185, 186, 186, 186, 169, 169, 253}, SKINCOLOR_TURQUOISE, 12, V_ROSYMAP, true}, // SKINCOLOR_SANGRIA - {"Volcanic", { 35, 38, 41, 42, 44, 46, 46, 169, 169, 159, 253, 254, 30, 30, 31, 31}, SKINCOLOR_BRONZE, 9, V_REDMAP, true}, // SKINCOLOR_VOLCANIC + {"Volcanic", { 54, 36, 42, 44, 45, 46, 46, 47, 28, 253, 253, 254, 254, 30, 31, 31}, SKINCOLOR_BRONZE, 9, V_REDMAP, true}, // SKINCOLOR_VOLCANIC // super {"Super Silver 1", {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x02, 0x03}, SKINCOLOR_BLACK, 15, 0, false}, // SKINCOLOR_SUPERSILVER1 From 25c220d363f91449d3bbaad3910a247fe0063749 Mon Sep 17 00:00:00 2001 From: spherallic Date: Thu, 31 Aug 2023 16:25:14 +0200 Subject: [PATCH 050/195] Some credits updates --- src/f_finale.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/f_finale.c b/src/f_finale.c index 162e87d29..11ea909e9 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -1062,12 +1062,14 @@ static const char *credits[] = { "\"Golden\"", "Vivian \"toaster\" Grannell", "Julio \"Chaos Zero 64\" Guir", + "\"Hanicef\"", "\"Hannu_Hanhi\"", // For many OpenGL performance improvements! "Kepa \"Nev3r\" Iceta", "Thomas \"Shadow Hog\" Igoe", "Iestyn \"Monster Iestyn\" Jealous", "\"Kaito Sinclaire\"", "\"Kalaron\"", // Coded some of Sryder13's collection of OpenGL fixes, especially fog + "\"katsy\"", "Ronald \"Furyhunter\" Kinard", // The SDL2 port "\"Lat'\"", // SRB2-CHAT, the chat window from Kart "\"LZA\"", @@ -1090,6 +1092,7 @@ static const char *credits[] = { "Ben \"Cue\" Woodford", "Lachlan \"Lach\" Wright", "Marco \"mazmazz\" Zafra", + "\"Zwip-Zwap Zapony\"", "", "\1Art", "Victor \"VAdaPEGA\" Ara\x1Fjo", // Araújo -- sorry for our limited font! D: @@ -1197,6 +1200,7 @@ static const char *credits[] = { "FreeDoom Project", // Used some of the mancubus and rocket launcher sprites for Brak "Kart Krew", "Alex \"MistaED\" Fuller", + "Howard Drossin", // Virtual Sonic - Sonic & Knuckles Theme "Pascal \"CodeImp\" vd Heiden", // Doom Builder developer "Randi Heit ()", // For their MSPaint sprite that we nicked "Simon \"sirjuddington\" Judd", // SLADE developer From 6414e9db79771494f87662f902999a028aa385cd Mon Sep 17 00:00:00 2001 From: Lactozilla Date: Thu, 31 Aug 2023 15:02:59 -0300 Subject: [PATCH 051/195] Fix possible crashes in the Lua API when accessing invalid fields --- src/lua_consolelib.c | 2 +- src/lua_hudlib.c | 3 +-- src/lua_maplib.c | 12 ++++++++---- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/lua_consolelib.c b/src/lua_consolelib.c index 9e5d1e2ee..3783b8f7b 100644 --- a/src/lua_consolelib.c +++ b/src/lua_consolelib.c @@ -615,7 +615,7 @@ static int cvar_get(lua_State *L) break; default: if (devparm) - return luaL_error(L, LUA_QL("consvar_t") " has no field named " LUA_QS, field); + return luaL_error(L, LUA_QL("consvar_t") " has no field named " LUA_QS ".", lua_tostring(L, 2)); else return 0; } diff --git a/src/lua_hudlib.c b/src/lua_hudlib.c index 63a866606..6eec91273 100644 --- a/src/lua_hudlib.c +++ b/src/lua_hudlib.c @@ -282,7 +282,6 @@ static int patch_get(lua_State *L) patch_t *patch = *((patch_t **)luaL_checkudata(L, 1, META_PATCH)); enum patch field = Lua_optoption(L, 2, -1, patch_fields_ref); - // patches are invalidated when switching renderers if (!patch) { if (field == patch_valid) { lua_pushboolean(L, 0); @@ -436,7 +435,7 @@ static int camera_set(lua_State *L) cam->momz = luaL_checkfixed(L, 3); break; default: - return luaL_error(L, LUA_QL("camera_t") " has no field named " LUA_QS, camera_opt[field]); + return luaL_error(L, LUA_QL("camera_t") " has no field named " LUA_QS ".", lua_tostring(L, 2)); } return 0; } diff --git a/src/lua_maplib.c b/src/lua_maplib.c index 3d95cdb75..e34397993 100644 --- a/src/lua_maplib.c +++ b/src/lua_maplib.c @@ -800,8 +800,9 @@ static int sector_set(lua_State *L) case sector_fslope: // f_slope case sector_cslope: // c_slope case sector_friction: // friction - default: return luaL_error(L, "sector_t field " LUA_QS " cannot be set.", sector_opt[field]); + default: + return luaL_error(L, "sector_t has no field named " LUA_QS ".", lua_tostring(L, 2)); case sector_floorheight: { // floorheight boolean flag; mobj_t *ptmthing = tmthing; @@ -1279,8 +1280,9 @@ static int side_set(lua_State *L) case side_sector: case side_special: case side_text: - default: return luaL_error(L, "side_t field " LUA_QS " cannot be set.", side_opt[field]); + default: + return luaL_error(L, "side_t has no field named " LUA_QS ".", lua_tostring(L, 2)); case side_textureoffset: side->textureoffset = luaL_checkfixed(L, 3); break; @@ -2291,8 +2293,9 @@ static int ffloor_set(lua_State *L) case ffloor_target: // target case ffloor_next: // next case ffloor_prev: // prev - default: return luaL_error(L, "ffloor_t field " LUA_QS " cannot be set.", ffloor_opt[field]); + default: + return luaL_error(L, "ffloor_t has no field named " LUA_QS ".", lua_tostring(L, 2)); case ffloor_topheight: { // topheight boolean flag; fixed_t lastpos = *ffloor->topheight; @@ -2426,8 +2429,9 @@ static int slope_set(lua_State *L) case slope_d: // d case slope_flags: // flags case slope_normal: // normal - default: return luaL_error(L, "pslope_t field " LUA_QS " cannot be set.", slope_opt[field]); + default: + return luaL_error(L, "pslope_t has no field named " LUA_QS ".", lua_tostring(L, 2)); case slope_o: { // o luaL_checktype(L, 3, LUA_TTABLE); From 3faa29ded9e0d21d885713aef328becc10fa16b6 Mon Sep 17 00:00:00 2001 From: Zwip-Zwap Zapony Date: Fri, 1 Sep 2023 22:36:15 +0200 Subject: [PATCH 052/195] Fix the Record Attack background jumping --- src/f_finale.c | 2 +- src/m_menu.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/f_finale.c b/src/f_finale.c index 11ea909e9..91c06b316 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -2260,7 +2260,7 @@ void F_InitMenuPresValues(void) curfadevalue = 16; curbgcolor = -1; curbgxspeed = (gamestate == GS_TIMEATTACK) ? 0 : titlescrollxspeed; - curbgyspeed = (gamestate == GS_TIMEATTACK) ? 22 : titlescrollyspeed; + curbgyspeed = (gamestate == GS_TIMEATTACK) ? 18 : titlescrollyspeed; curbghide = (gamestate == GS_TIMEATTACK) ? false : true; curhidepics = hidetitlepics; diff --git a/src/m_menu.c b/src/m_menu.c index c49442141..9fcd1e85a 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -2649,7 +2649,7 @@ static boolean MIT_SetCurBackground(UINT32 menutype, INT32 level, INT32 *retval, { strncpy(curbgname, defaultname, 9); curbgxspeed = (gamestate == GS_TIMEATTACK) ? 0 : titlescrollxspeed; - curbgyspeed = (gamestate == GS_TIMEATTACK) ? 0 : titlescrollyspeed; + curbgyspeed = (gamestate == GS_TIMEATTACK) ? 18 : titlescrollyspeed; } } return false; @@ -2843,8 +2843,8 @@ static void M_HandleMenuPresState(menu_t *newMenu) curfadevalue = 16; curhidepics = hidetitlepics; curbgcolor = -1; - curbgxspeed = titlescrollxspeed; - curbgyspeed = titlescrollyspeed; + curbgxspeed = (gamestate == GS_TIMEATTACK) ? 0 : titlescrollxspeed; + curbgyspeed = (gamestate == GS_TIMEATTACK) ? 18 : titlescrollyspeed; curbghide = (gamestate != GS_TIMEATTACK); // show in time attack, hide in other menus curttmode = ttmode; From d4a2bb5675bfcc8dfbe9c886b0831c40d07f86dd Mon Sep 17 00:00:00 2001 From: Eidolon Date: Sun, 3 Sep 2023 10:08:03 -0500 Subject: [PATCH 053/195] Fix sprite scale column iteration crash --- src/r_things.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/r_things.c b/src/r_things.c index e69fe1b82..412635825 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -2235,7 +2235,7 @@ static void R_ProjectSprite(mobj_t *thing) vis->xscale = FixedMul(spritexscale, xscale); //SoM: 4/17/2000 vis->scale = FixedMul(spriteyscale, yscale); //<thingscale = interp.scale; + vis->thingscale = this_scale; vis->spritexscale = spritexscale; vis->spriteyscale = spriteyscale; From b8313ceda283ac0c8dd9ab6141e83a31f0bb9639 Mon Sep 17 00:00:00 2001 From: Lactozilla Date: Sun, 3 Sep 2023 17:02:35 -0300 Subject: [PATCH 054/195] Optimize sprite rendering by ignoring completely occluded sprites --- src/r_main.c | 28 +++----------------- src/r_main.h | 2 +- src/r_things.c | 71 ++++++++++++++++++++++++++++++++++++++++---------- src/r_things.h | 29 +++++++++++---------- 4 files changed, 77 insertions(+), 53 deletions(-) diff --git a/src/r_main.c b/src/r_main.c index 952171405..54f7d7639 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -41,16 +41,6 @@ #include "hardware/hw_main.h" #endif -//profile stuff --------------------------------------------------------- -//#define TIMING -#ifdef TIMING -#include "p5prof.h" -INT64 mycount; -INT64 mytotal = 0; -//unsigned long nombre = 100000; -#endif -//profile stuff --------------------------------------------------------- - // Fineangles in the SCREENWIDTH wide window. #define FIELDOFVIEW 2048 @@ -157,7 +147,8 @@ consvar_t cv_flipcam2 = CVAR_INIT ("flipcam2", "No", CV_SAVE|CV_CALL|CV_NOINIT, consvar_t cv_shadow = CVAR_INIT ("shadow", "On", CV_SAVE, CV_OnOff, NULL); consvar_t cv_skybox = CVAR_INIT ("skybox", "On", CV_SAVE, CV_OnOff, NULL); -consvar_t cv_ffloorclip = CVAR_INIT ("ffloorclip", "On", CV_SAVE, CV_OnOff, NULL); +consvar_t cv_ffloorclip = CVAR_INIT ("r_ffloorclip", "On", CV_SAVE, CV_OnOff, NULL); +consvar_t cv_spriteclip = CVAR_INIT ("r_spriteclip", "On", CV_SAVE, CV_OnOff, NULL); consvar_t cv_allowmlook = CVAR_INIT ("allowmlook", "Yes", CV_NETVAR|CV_ALLOWLUA, CV_YesNo, NULL); consvar_t cv_showhud = CVAR_INIT ("showhud", "Yes", CV_CALL|CV_ALLOWLUA, CV_YesNo, R_SetViewSize); consvar_t cv_translucenthud = CVAR_INIT ("translucenthud", "10", CV_SAVE, translucenthud_cons_t, NULL); @@ -1490,29 +1481,17 @@ void R_RenderPlayerView(player_t *player) Mask_Pre(&masks[nummasks - 1]); curdrawsegs = ds_p; -//profile stuff --------------------------------------------------------- -#ifdef TIMING - mytotal = 0; - ProfZeroTimer(); -#endif ps_numbspcalls.value.i = ps_numpolyobjects.value.i = ps_numdrawnodes.value.i = 0; PS_START_TIMING(ps_bsptime); R_RenderBSPNode((INT32)numnodes - 1); PS_STOP_TIMING(ps_bsptime); - ps_numsprites.value.i = visspritecount; -#ifdef TIMING - RDMSR(0x10, &mycount); - mytotal += mycount; // 64bit add - - CONS_Debug(DBG_RENDER, "RenderBSPNode: 0x%d %d\n", *((INT32 *)&mytotal + 1), (INT32)mytotal); -#endif -//profile stuff --------------------------------------------------------- Mask_Post(&masks[nummasks - 1]); PS_START_TIMING(ps_sw_spritecliptime); R_ClipSprites(drawsegs, NULL); PS_STOP_TIMING(ps_sw_spritecliptime); + ps_numsprites.value.i = numvisiblesprites; // Add skybox portals caused by sky visplanes. if (cv_skybox.value && skyboxmo[0]) @@ -1603,6 +1582,7 @@ void R_RegisterEngineStuff(void) CV_RegisterVar(&cv_shadow); CV_RegisterVar(&cv_skybox); CV_RegisterVar(&cv_ffloorclip); + CV_RegisterVar(&cv_spriteclip); CV_RegisterVar(&cv_cam_dist); CV_RegisterVar(&cv_cam_still); diff --git a/src/r_main.h b/src/r_main.h index f08070d0f..a6fb42ba2 100644 --- a/src/r_main.h +++ b/src/r_main.h @@ -114,7 +114,7 @@ extern consvar_t cv_chasecam, cv_chasecam2; extern consvar_t cv_flipcam, cv_flipcam2; extern consvar_t cv_shadow; -extern consvar_t cv_ffloorclip; +extern consvar_t cv_ffloorclip, cv_spriteclip; extern consvar_t cv_translucency; extern consvar_t cv_drawdist, cv_drawdist_nights, cv_drawdist_precip; extern consvar_t cv_fov; diff --git a/src/r_things.c b/src/r_things.c index e69fe1b82..ba262a8b0 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -524,7 +524,8 @@ void R_AddSpriteDefs(UINT16 wadnum) // // GAME FUNCTIONS // -UINT32 visspritecount; +UINT32 visspritecount, numvisiblesprites; + static UINT32 clippedvissprites; static vissprite_t *visspritechunks[MAXVISSPRITES >> VISSPRITECHUNKBITS] = {NULL}; @@ -598,7 +599,7 @@ void R_InitSprites(void) // void R_ClearSprites(void) { - visspritecount = clippedvissprites = 0; + visspritecount = numvisiblesprites = clippedvissprites = 0; } // @@ -2637,6 +2638,14 @@ static void R_SortVisSprites(vissprite_t* vsprsortedhead, UINT32 start, UINT32 e // bundle linkdraw for (ds = unsorted.prev; ds != &unsorted; ds = ds->prev) { + // Remove this sprite if it was determined to not be visible + if (ds->cut & SC_NOTVISIBLE) + { + ds->next->prev = ds->prev; + ds->prev->next = ds->next; + continue; + } + if (!(ds->cut & SC_LINKDRAW)) continue; @@ -2663,21 +2672,27 @@ static void R_SortVisSprites(vissprite_t* vsprsortedhead, UINT32 start, UINT32 e continue; // don't connect if the tracer's top is cut off, but lower than the link's top - if ((dsfirst->cut & SC_TOP) - && dsfirst->szt > ds->szt) + if ((dsfirst->cut & SC_TOP) && dsfirst->szt > ds->szt) continue; // don't connect if the tracer's bottom is cut off, but higher than the link's bottom - if ((dsfirst->cut & SC_BOTTOM) - && dsfirst->sz < ds->sz) + if ((dsfirst->cut & SC_BOTTOM) && dsfirst->sz < ds->sz) continue; + // If the object isn't visible, then the bounding box isn't either + if (ds->cut & SC_BBOX && dsfirst->cut & SC_NOTVISIBLE) + ds->cut |= SC_NOTVISIBLE; + break; } // remove from chain ds->next->prev = ds->prev; ds->prev->next = ds->next; + + if (ds->cut & SC_NOTVISIBLE) + continue; + linkedvissprites++; if (dsfirst != &unsorted) @@ -2729,12 +2744,15 @@ static void R_SortVisSprites(vissprite_t* vsprsortedhead, UINT32 start, UINT32 e best = ds; } } - best->next->prev = best->prev; - best->prev->next = best->next; - best->next = vsprsortedhead; - best->prev = vsprsortedhead->prev; - vsprsortedhead->prev->next = best; - vsprsortedhead->prev = best; + if (best) + { + best->next->prev = best->prev; + best->prev->next = best->next; + best->next = vsprsortedhead; + best->prev = vsprsortedhead->prev; + vsprsortedhead->prev->next = best; + vsprsortedhead->prev = best; + } } } @@ -3308,8 +3326,7 @@ static void R_ClipVisSprite(vissprite_t *spr, INT32 x1, INT32 x2, portal_t* port spr->clipbot[x] = (INT16)viewheight; if (spr->cliptop[x] == -2) - //Fab : 26-04-98: was -1, now clips against console bottom - spr->cliptop[x] = (INT16)con_clipviewtop; + spr->cliptop[x] = -1; } if (portal) @@ -3334,6 +3351,23 @@ static void R_ClipVisSprite(vissprite_t *spr, INT32 x1, INT32 x2, portal_t* port spr->cliptop[x] = -1; } } + + // Check if it'll be visible + // Not done for floorsprites. + if (cv_spriteclip.value && (spr->cut & SC_SPLAT) == 0) + { + for (x = x1; x <= x2; x++) + { + if (spr->cliptop[x] < spr->clipbot[x] + && spr->sz > spr->cliptop[x] + && spr->szt < spr->clipbot[x]) + { + return; + } + } + + spr->cut |= SC_NOTVISIBLE; + } } void R_ClipSprites(drawseg_t* dsstart, portal_t* portal) @@ -3402,6 +3436,12 @@ void R_ClipSprites(drawseg_t* dsstart, portal_t* portal) { vissprite_t *spr = R_GetVisSprite(clippedvissprites); + if (spr->szt > vid.height || spr->sz < 0) + { + spr->cut |= SC_NOTVISIBLE; + continue; + } + if (spr->cut & SC_BBOX) continue; @@ -3425,6 +3465,9 @@ void R_ClipSprites(drawseg_t* dsstart, portal_t* portal) } R_ClipVisSprite(spr, x1, x2, portal); + + if ((spr->cut & SC_NOTVISIBLE) == 0) + numvisiblesprites++; } } diff --git a/src/r_things.h b/src/r_things.h index e11005363..318234886 100644 --- a/src/r_things.h +++ b/src/r_things.h @@ -123,21 +123,22 @@ typedef enum SC_NONE = 0, SC_TOP = 1, SC_BOTTOM = 1<<1, + SC_NOTVISIBLE = 1<<2, // other flags - SC_PRECIP = 1<<2, - SC_LINKDRAW = 1<<3, - SC_FULLBRIGHT = 1<<4, - SC_SEMIBRIGHT = 1<<5, - SC_FULLDARK = 1<<6, - SC_VFLIP = 1<<7, - SC_ISSCALED = 1<<8, - SC_ISROTATED = 1<<9, - SC_SHADOW = 1<<10, - SC_SHEAR = 1<<11, - SC_SPLAT = 1<<12, - SC_BBOX = 1<<13, + SC_PRECIP = 1<<3, + SC_LINKDRAW = 1<<4, + SC_FULLBRIGHT = 1<<5, + SC_SEMIBRIGHT = 1<<6, + SC_FULLDARK = 1<<7, + SC_VFLIP = 1<<8, + SC_ISSCALED = 1<<9, + SC_ISROTATED = 1<<10, + SC_SHADOW = 1<<11, + SC_SHEAR = 1<<12, + SC_SPLAT = 1<<13, + SC_BBOX = 1<<14, // masks - SC_CUTMASK = SC_TOP|SC_BOTTOM, + SC_CUTMASK = SC_TOP|SC_BOTTOM|SC_NOTVISIBLE, SC_FLAGMASK = ~SC_CUTMASK } spritecut_e; @@ -219,7 +220,7 @@ typedef struct vissprite_s INT32 dispoffset; // copy of mobj->dispoffset, affects ordering but not drawing } vissprite_t; -extern UINT32 visspritecount; +extern UINT32 visspritecount, numvisiblesprites; void R_ClipSprites(drawseg_t* dsstart, portal_t* portal); From 58bd31fdca435770499cd7e9ad6b0a3a99cbd6a3 Mon Sep 17 00:00:00 2001 From: Lactozilla Date: Sun, 3 Sep 2023 17:14:48 -0300 Subject: [PATCH 055/195] Make hitboxes count towards the total sprite count This has the effect of misrepresenting how many sprites are actually visible, but it's more "accurate". --- src/r_things.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/r_things.c b/src/r_things.c index ba262a8b0..b1790933d 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -3443,7 +3443,10 @@ void R_ClipSprites(drawseg_t* dsstart, portal_t* portal) } if (spr->cut & SC_BBOX) + { + numvisiblesprites++; continue; + } INT32 x1 = (spr->cut & SC_SPLAT) ? 0 : spr->x1; INT32 x2 = (spr->cut & SC_SPLAT) ? viewwidth : spr->x2; From c35456d5cb1569ae6c1eb9bbe2a0d13c33bc91c5 Mon Sep 17 00:00:00 2001 From: Eidolon Date: Sun, 3 Sep 2023 16:31:08 -0500 Subject: [PATCH 056/195] Actually fix papersprites near camera crash --- src/r_things.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/r_things.c b/src/r_things.c index 412635825..6e334990b 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -844,6 +844,15 @@ static void R_DrawVisSprite(vissprite_t *vis) if ((UINT64)overflow_test&0xFFFFFFFF80000000ULL) return; // ditto } + // TODO This check should not be necessary. But Papersprites near to the camera will sometimes create invalid values + // for the vissprite's startfrac. This happens because they are not depth culled like other sprites. + // Someone who is more familiar with papersprites pls check and try to fix <3 + if (vis->startfrac < 0 || vis->startfrac > (patch->width << FRACBITS)) + { + // never draw vissprites with startfrac out of patch range + return; + } + colfunc = colfuncs[BASEDRAWFUNC]; // hack: this isn't resetting properly somewhere. dc_colormap = vis->colormap; dc_translation = R_GetSpriteTranslation(vis); @@ -2235,7 +2244,7 @@ static void R_ProjectSprite(mobj_t *thing) vis->xscale = FixedMul(spritexscale, xscale); //SoM: 4/17/2000 vis->scale = FixedMul(spriteyscale, yscale); //<thingscale = this_scale; + vis->thingscale = interp.scale; vis->spritexscale = spritexscale; vis->spriteyscale = spriteyscale; From d777b62e1bd24eb89e2dcf246f83c38beb460a08 Mon Sep 17 00:00:00 2001 From: Lactozilla Date: Sun, 3 Sep 2023 18:59:39 -0300 Subject: [PATCH 057/195] Improve checks for papersprites --- src/r_things.c | 68 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 50 insertions(+), 18 deletions(-) diff --git a/src/r_things.c b/src/r_things.c index b1790933d..f8456fa11 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -888,7 +888,7 @@ static void R_DrawVisSprite(vissprite_t *vis) frac = vis->startfrac; windowtop = windowbottom = sprbotscreen = INT32_MAX; - if (!(vis->cut & SC_PRECIP) && vis->mobj->skin && ((skin_t *)vis->mobj->skin)->flags & SF_HIRES) + if (vis->cut & SC_SHADOW && vis->mobj->skin && ((skin_t *)vis->mobj->skin)->flags & SF_HIRES) this_scale = FixedMul(this_scale, ((skin_t *)vis->mobj->skin)->highresscale); if (this_scale <= 0) this_scale = 1; @@ -898,10 +898,10 @@ static void R_DrawVisSprite(vissprite_t *vis) { vis->scale = FixedMul(vis->scale, this_scale); vis->scalestep = FixedMul(vis->scalestep, this_scale); - vis->xiscale = FixedDiv(vis->xiscale,this_scale); + vis->xiscale = FixedDiv(vis->xiscale, this_scale); vis->cut |= SC_ISSCALED; } - dc_texturemid = FixedDiv(dc_texturemid,this_scale); + dc_texturemid = FixedDiv(dc_texturemid, this_scale); } spryscale = vis->scale; @@ -1759,9 +1759,6 @@ static void R_ProjectSprite(mobj_t *thing) I_Assert(lump < max_spritelumps); - if (thing->skin && ((skin_t *)thing->skin)->flags & SF_HIRES) - this_scale = FixedMul(this_scale, ((skin_t *)thing->skin)->highresscale); - spr_width = spritecachedinfo[lump].width; spr_height = spritecachedinfo[lump].height; spr_offset = spritecachedinfo[lump].offset; @@ -1811,6 +1808,14 @@ static void R_ProjectSprite(mobj_t *thing) // calculate edges of the shape spritexscale = interp.spritexscale; spriteyscale = interp.spriteyscale; + + if (thing->skin && ((skin_t *)thing->skin)->flags & SF_HIRES) + { + fixed_t highresscale = ((skin_t *)thing->skin)->highresscale; + spritexscale = FixedMul(spritexscale, highresscale); + spriteyscale = FixedMul(spriteyscale, highresscale); + } + if (spritexscale < 1 || spriteyscale < 1) return; @@ -3183,6 +3188,40 @@ static void R_HeightSecClip(vissprite_t *spr, INT32 x1, INT32 x2) } } +static boolean R_CheckSpriteVisible(vissprite_t *spr, INT32 x1, INT32 x2) +{ + INT16 sz = spr->sz; + INT16 szt = spr->szt; + + fixed_t texturemid, yscale, scalestep = spr->scalestep; + + if (scalestep) + { + yscale = spr->scale; + scalestep = FixedMul(scalestep, spr->spriteyscale); + + if (spr->thingscale != FRACUNIT) + texturemid = FixedDiv(spr->texturemid, max(spr->thingscale, 1)); + else + texturemid = spr->texturemid; + } + + for (INT32 x = x1; x <= x2; x++) + { + if (scalestep) + { + szt = (INT16)((centeryfrac - FixedMul(texturemid, yscale))>>FRACBITS); + sz = (INT16)((centeryfrac - FixedMul(texturemid, yscale))>>FRACBITS); + yscale += scalestep; + } + + if (spr->cliptop[x] < spr->clipbot[x] && sz > spr->cliptop[x] && szt < spr->clipbot[x]) + return true; + } + + return false; +} + // R_ClipVisSprite // Clips vissprites without drawing, so that portals can work. -Red static void R_ClipVisSprite(vissprite_t *spr, INT32 x1, INT32 x2, portal_t* portal) @@ -3356,17 +3395,8 @@ static void R_ClipVisSprite(vissprite_t *spr, INT32 x1, INT32 x2, portal_t* port // Not done for floorsprites. if (cv_spriteclip.value && (spr->cut & SC_SPLAT) == 0) { - for (x = x1; x <= x2; x++) - { - if (spr->cliptop[x] < spr->clipbot[x] - && spr->sz > spr->cliptop[x] - && spr->szt < spr->clipbot[x]) - { - return; - } - } - - spr->cut |= SC_NOTVISIBLE; + if (!R_CheckSpriteVisible(spr, x1, x2)) + spr->cut |= SC_NOTVISIBLE; } } @@ -3436,7 +3466,9 @@ void R_ClipSprites(drawseg_t* dsstart, portal_t* portal) { vissprite_t *spr = R_GetVisSprite(clippedvissprites); - if (spr->szt > vid.height || spr->sz < 0) + if (cv_spriteclip.value + && (spr->szt > vid.height || spr->sz < 0) + && !((spr->cut & SC_SPLAT) || spr->scalestep)) { spr->cut |= SC_NOTVISIBLE; continue; From 57a880a286e53ccbdd8ee0f9df59522afd733cbc Mon Sep 17 00:00:00 2001 From: Lactozilla Date: Sun, 3 Sep 2023 19:35:58 -0300 Subject: [PATCH 058/195] Fix a bug --- src/r_things.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/r_things.c b/src/r_things.c index f8456fa11..385cbaaa5 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -3194,9 +3194,11 @@ static boolean R_CheckSpriteVisible(vissprite_t *spr, INT32 x1, INT32 x2) INT16 szt = spr->szt; fixed_t texturemid, yscale, scalestep = spr->scalestep; + INT32 height; if (scalestep) { + height = spr->patch->height; yscale = spr->scale; scalestep = FixedMul(scalestep, spr->spriteyscale); @@ -3210,8 +3212,10 @@ static boolean R_CheckSpriteVisible(vissprite_t *spr, INT32 x1, INT32 x2) { if (scalestep) { - szt = (INT16)((centeryfrac - FixedMul(texturemid, yscale))>>FRACBITS); - sz = (INT16)((centeryfrac - FixedMul(texturemid, yscale))>>FRACBITS); + fixed_t top = centeryfrac - FixedMul(texturemid, yscale); + fixed_t bottom = top + (height * yscale); + szt = (INT16)(top >> FRACBITS); + sz = (INT16)(bottom >> FRACBITS); yscale += scalestep; } From 01670bd96feebfeceffdb58c2338b631fe442cce Mon Sep 17 00:00:00 2001 From: SteelT Date: Mon, 4 Sep 2023 13:45:45 -0400 Subject: [PATCH 059/195] gitignore: add CMakeUserPresets.json --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 2b4d9d2fb..268e36329 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ Win32_LIB_ASM_Release /bin /build /build/* +/CMakeUserPresets.json \ No newline at end of file From 52d356d09e647aa19f1c36db5a0963305e9a058e Mon Sep 17 00:00:00 2001 From: spherallic Date: Tue, 5 Sep 2023 14:43:30 +0200 Subject: [PATCH 060/195] Don't attract bomb spheres with Nightopian Helper --- src/p_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_user.c b/src/p_user.c index cb6f9d9b9..085e9e901 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -11867,7 +11867,7 @@ void P_PlayerThink(player_t *player) mo2 = (mobj_t *)th; if (!(mo2->type == MT_RING || mo2->type == MT_COIN - || mo2->type == MT_BLUESPHERE || mo2->type == MT_BOMBSPHERE + || mo2->type == MT_BLUESPHERE // || mo2->type == MT_BOMBSPHERE || mo2->type == MT_NIGHTSCHIP || mo2->type == MT_NIGHTSSTAR)) continue; From a29d1ca219df070ee1b3fbed814c22dfb9427a34 Mon Sep 17 00:00:00 2001 From: spherallic Date: Tue, 5 Sep 2023 18:03:51 +0200 Subject: [PATCH 061/195] Make camera noclip during NiGHTS gameplay --- src/p_map.c | 7 +++---- src/p_mobj.c | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/p_map.c b/src/p_map.c index 132a3cf85..80135db74 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -2524,7 +2524,6 @@ boolean P_CheckCameraPosition(fixed_t x, fixed_t y, camera_t *thiscam) boolean P_TryCameraMove(fixed_t x, fixed_t y, camera_t *thiscam) { subsector_t *s = R_PointInSubsector(x, y); - boolean retval = true; boolean itsatwodlevel = false; floatok = false; @@ -2539,8 +2538,8 @@ boolean P_TryCameraMove(fixed_t x, fixed_t y, camera_t *thiscam) fixed_t tryx = thiscam->x; fixed_t tryy = thiscam->y; - if ((thiscam == &camera && (players[displayplayer].pflags & PF_NOCLIP)) - || (thiscam == &camera2 && (players[secondarydisplayplayer].pflags & PF_NOCLIP))) + if ((thiscam == &camera && (players[displayplayer].pflags & PF_NOCLIP || players[displayplayer].powers[pw_carry] == CR_NIGHTSMODE)) + || (thiscam == &camera2 && (players[secondarydisplayplayer].pflags & PF_NOCLIP || players[secondarydisplayplayer].powers[pw_carry] == CR_NIGHTSMODE))) { // Noclipping player camera noclips too!! floatok = true; thiscam->floorz = thiscam->z; @@ -2608,7 +2607,7 @@ boolean P_TryCameraMove(fixed_t x, fixed_t y, camera_t *thiscam) thiscam->y = y; thiscam->subsector = s; - return retval; + return true; } // diff --git a/src/p_mobj.c b/src/p_mobj.c index de2c3a72c..5f25608e8 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -3688,7 +3688,7 @@ boolean P_CameraThinker(player_t *player, camera_t *thiscam, boolean resetcalled dummy.y = thiscam->y; dummy.z = thiscam->z; dummy.height = thiscam->height; - if (!resetcalled && !(player->pflags & PF_NOCLIP) && !P_CheckSight(&dummy, player->mo)) // TODO: "P_CheckCameraSight" instead. + if (!resetcalled && !(player->pflags & PF_NOCLIP || player->powers[pw_carry] == CR_NIGHTSMODE) && !P_CheckSight(&dummy, player->mo)) // TODO: "P_CheckCameraSight" instead. P_ResetCamera(player, thiscam); else { @@ -3719,7 +3719,7 @@ boolean P_CameraThinker(player_t *player, camera_t *thiscam, boolean resetcalled // adjust height thiscam->z += thiscam->momz + player->mo->pmomz; - if (!itsatwodlevel && !(player->pflags & PF_NOCLIP)) + if (!itsatwodlevel && !(player->pflags & PF_NOCLIP || player->powers[pw_carry] == CR_NIGHTSMODE)) { // clip movement if (thiscam->z <= thiscam->floorz) // hit the floor From 969e21017d83bbd9a4f81f6fb68d90d80334790e Mon Sep 17 00:00:00 2001 From: katsy <205-katsy@users.noreply.git.do.srb2.org> Date: Tue, 5 Sep 2023 17:23:34 +0000 Subject: [PATCH 062/195] Make renderhitbox a netvar to prevent clientside wallhacking --- src/r_bbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/r_bbox.c b/src/r_bbox.c index 4302d1b9a..6d468e47d 100644 --- a/src/r_bbox.c +++ b/src/r_bbox.c @@ -34,7 +34,7 @@ static CV_PossibleValue_t renderhitbox_cons_t[] = { {RENDERHITBOX_RINGS, "Rings"}, {0}}; -consvar_t cv_renderhitbox = CVAR_INIT ("renderhitbox", "Off", CV_CHEAT, renderhitbox_cons_t, NULL); +consvar_t cv_renderhitbox = CVAR_INIT ("renderhitbox", "Off", CV_CHEAT|CV_NETVAR, renderhitbox_cons_t, NULL); consvar_t cv_renderhitboxinterpolation = CVAR_INIT ("renderhitbox_interpolation", "On", CV_SAVE, CV_OnOff, NULL); consvar_t cv_renderhitboxgldepth = CVAR_INIT ("renderhitbox_gldepth", "Off", CV_SAVE, CV_OnOff, NULL); From b7b1e0b1e5259bc0d05a6c87ec339460039651a1 Mon Sep 17 00:00:00 2001 From: sphere Date: Tue, 5 Sep 2023 17:24:03 +0000 Subject: [PATCH 063/195] Add toggle for instant retry in Record Attack --- src/d_netcmd.c | 2 ++ src/g_game.c | 6 ++++-- src/g_game.h | 2 ++ src/hu_stuff.c | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 33281e992..3426c1f83 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -776,6 +776,8 @@ void D_RegisterClientCommands(void) CV_RegisterVar(&cv_showfocuslost); CV_RegisterVar(&cv_pauseifunfocused); + CV_RegisterVar(&cv_instantretry); + // g_input.c CV_RegisterVar(&cv_sideaxis); CV_RegisterVar(&cv_sideaxis2); diff --git a/src/g_game.c b/src/g_game.c index 9780bcd4d..a5f969243 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -316,6 +316,8 @@ consvar_t cv_consolechat = CVAR_INIT ("chatmode", "Window", CV_SAVE, consolechat // Pause game upon window losing focus consvar_t cv_pauseifunfocused = CVAR_INIT ("pauseifunfocused", "Yes", CV_SAVE, CV_YesNo, NULL); +consvar_t cv_instantretry = CVAR_INIT ("instantretry", "No", CV_SAVE, CV_YesNo, NULL); + consvar_t cv_crosshair = CVAR_INIT ("crosshair", "Cross", CV_SAVE, crosshair_cons_t, NULL); consvar_t cv_crosshair2 = CVAR_INIT ("crosshair2", "Cross", CV_SAVE, crosshair_cons_t, NULL); consvar_t cv_invertmouse = CVAR_INIT ("invertmouse", "Off", CV_SAVE, CV_OnOff, NULL); @@ -2173,9 +2175,9 @@ boolean G_Responder(event_t *ev) if (menuactive || pausedelay < 0 || leveltime < 2) return true; - if (pausedelay < 1+(NEWTICRATE/2)) + if (!cv_instantretry.value && pausedelay < 1+(NEWTICRATE/2)) pausedelay = 1+(NEWTICRATE/2); - else if (++pausedelay > 1+(NEWTICRATE/2)+(NEWTICRATE/3)) + else if (cv_instantretry.value || ++pausedelay > 1+(NEWTICRATE/2)+(NEWTICRATE/3)) { G_SetModeAttackRetryFlag(); return true; diff --git a/src/g_game.h b/src/g_game.h index a8c285f79..9873430b9 100644 --- a/src/g_game.h +++ b/src/g_game.h @@ -49,6 +49,8 @@ extern boolean promptactive; extern consvar_t cv_pauseifunfocused; +extern consvar_t cv_instantretry; + // used in game menu extern consvar_t cv_tutorialprompt; extern consvar_t cv_chatwidth, cv_chatnotifications, cv_chatheight, cv_chattime, cv_consolechat, cv_chatbacktint, cv_chatspamprotection, cv_compactscoreboard; diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 091e2b2fb..e223d3208 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -2025,7 +2025,7 @@ void HU_Drawer(void) V_DrawCenteredString(BASEVIDWIDTH/2, 180, V_YELLOWMAP | V_ALLOWLOWERCASE, resynch_text); } - if (modeattacking && pausedelay > 0 && !pausebreakkey) + if (modeattacking && pausedelay > 0 && !(pausebreakkey || cv_instantretry.value)) { INT32 strength = ((pausedelay - 1 - NEWTICRATE/2)*10)/(NEWTICRATE/3); INT32 y = hudinfo[HUD_LIVES].y - 13; From 85fc55bfc1b0f14f22a966e7a83bce00acf2ba0b Mon Sep 17 00:00:00 2001 From: spherallic Date: Tue, 5 Sep 2023 19:38:45 +0200 Subject: [PATCH 064/195] Prevent title input during negative finalecount --- src/g_game.c | 2 +- src/m_menu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/g_game.c b/src/g_game.c index fce9919f1..4140a91eb 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -2080,7 +2080,7 @@ boolean G_Responder(event_t *ev) if (gameaction == ga_nothing && !singledemo && ((demoplayback && !modeattacking && !titledemo) || gamestate == GS_TITLESCREEN)) { - if (ev->type == ev_keydown && ev->key != 301 && !(gamestate == GS_TITLESCREEN && finalecount < TICRATE && cv_tutorialprompt.value)) + if (ev->type == ev_keydown && ev->key != 301 && !(gamestate == GS_TITLESCREEN && finalecount < (cv_tutorialprompt.value ? TICRATE : 0))) { M_StartControlPanel(); return true; diff --git a/src/m_menu.c b/src/m_menu.c index 81ff0f679..f7b65910d 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -3196,7 +3196,7 @@ boolean M_Responder(event_t *ev) || gamestate == GS_CREDITS || gamestate == GS_EVALUATION || gamestate == GS_GAMEEND) return false; - if (gamestate == GS_TITLESCREEN && finalecount < TICRATE && cv_tutorialprompt.value) + if (gamestate == GS_TITLESCREEN && finalecount < (cv_tutorialprompt.value ? TICRATE : 0)) return false; if (CON_Ready() && gamestate != GS_WAITINGPLAYERS) From 49ee744ba17fa613c181fbc652dbc591959d1a47 Mon Sep 17 00:00:00 2001 From: Krabs <75001008+krabsisa@users.noreply.github.com> Date: Wed, 6 Sep 2023 12:50:32 -0400 Subject: [PATCH 065/195] Update version number --- appveyor.yml | 2 +- src/version.h | 4 ++-- src/win32/Srb2win.rc | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 9770cb37d..9c39e3fac 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -version: 2.2.11.{branch}-{build} +version: 2.2.12.{branch}-{build} os: MinGW environment: diff --git a/src/version.h b/src/version.h index 083c53134..c3ec0ad49 100644 --- a/src/version.h +++ b/src/version.h @@ -1,4 +1,4 @@ -#define SRB2VERSION "2.2.11"/* this must be the first line, for cmake !! */ +#define SRB2VERSION "2.2.12"/* this must be the first line, for cmake !! */ // The Modification ID; must be obtained from a Master Server Admin ( https://mb.srb2.org/members/?key=ms_admin ). // DO NOT try to set this otherwise, or your modification will be unplayable through the Master Server. @@ -9,7 +9,7 @@ // it's only for detection of the version the player is using so the MS can alert them of an update. // Only set it higher, not lower, obviously. // Note that we use this to help keep internal testing in check; this is why v2.2.0 is not version "1". -#define MODVERSION 52 +#define MODVERSION 53 // Define this as a prerelease version suffix (pre#, RC#) //#define BETAVERSION "pre1" diff --git a/src/win32/Srb2win.rc b/src/win32/Srb2win.rc index 869c0e7d3..54687a831 100644 --- a/src/win32/Srb2win.rc +++ b/src/win32/Srb2win.rc @@ -77,8 +77,8 @@ END #include "../doomdef.h" // Needed for version string VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,2,11,0 - PRODUCTVERSION 2,2,11,0 + FILEVERSION 2,2,12,0 + PRODUCTVERSION 2,2,12,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 858f102ca4e82fa8af6a9caea72028c447857448 Mon Sep 17 00:00:00 2001 From: Krabs <75001008+krabsisa@users.noreply.github.com> Date: Wed, 6 Sep 2023 12:50:51 -0400 Subject: [PATCH 066/195] Update hash for patch.pk3 --- src/config.h.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.h.in b/src/config.h.in index 0ca0f26e9..daa3857a3 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -43,7 +43,7 @@ #define ASSET_HASH_ZONES_PK3 "1c8adf8d079ecb87d00081f158acf3c7" #define ASSET_HASH_PLAYER_DTA "2e7aaae8a6b1b77d90ffe7606ceadb6c" #ifdef USE_PATCH_DTA -#define ASSET_HASH_PATCH_PK3 "2e69558bce3b9610624549a75e29e19b" +#define ASSET_HASH_PATCH_PK3 "3c7b73f34af7e9a7bceb2d5260f76172" #endif #endif From 11a2fe86133a63ab5597a66529ee723714179048 Mon Sep 17 00:00:00 2001 From: Zwip-Zwap Zapony Date: Wed, 6 Sep 2023 21:02:04 +0200 Subject: [PATCH 067/195] Expose skin.supername to Lua --- src/lua_skinlib.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lua_skinlib.c b/src/lua_skinlib.c index 13e0dd987..041c5d598 100644 --- a/src/lua_skinlib.c +++ b/src/lua_skinlib.c @@ -25,6 +25,7 @@ enum skin { skin_flags, skin_realname, skin_hudname, + skin_supername, skin_ability, skin_ability2, skin_thokitem, @@ -63,6 +64,7 @@ static const char *const skin_opt[] = { "flags", "realname", "hudname", + "supername", "ability", "ability2", "thokitem", @@ -126,6 +128,9 @@ static int skin_get(lua_State *L) case skin_hudname: lua_pushstring(L, skin->hudname); break; + case skin_supername: + lua_pushstring(L, skin->supername); + break; case skin_ability: lua_pushinteger(L, skin->ability); break; From 72662efc8d0aee01b31718f102dbdaf1b037870a Mon Sep 17 00:00:00 2001 From: SteelT Date: Fri, 8 Sep 2023 13:25:20 -0400 Subject: [PATCH 068/195] Replace CV_NETVAR with CV_NOTINNET for cv_renderhitbox The CV_NETVAR flag being used for cvars not registered in a dedicated server context will completely mess with the internal netid to cvar linkage. And I'm not really keen on registering a cvar purely for rendering on dedicated servers, so let's just prevent renderhitbox from being changed in netgames entirely. --- src/r_bbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/r_bbox.c b/src/r_bbox.c index 6d468e47d..6b4c4c4fb 100644 --- a/src/r_bbox.c +++ b/src/r_bbox.c @@ -34,7 +34,7 @@ static CV_PossibleValue_t renderhitbox_cons_t[] = { {RENDERHITBOX_RINGS, "Rings"}, {0}}; -consvar_t cv_renderhitbox = CVAR_INIT ("renderhitbox", "Off", CV_CHEAT|CV_NETVAR, renderhitbox_cons_t, NULL); +consvar_t cv_renderhitbox = CVAR_INIT ("renderhitbox", "Off", CV_CHEAT|CV_NOTINNET, renderhitbox_cons_t, NULL); consvar_t cv_renderhitboxinterpolation = CVAR_INIT ("renderhitbox_interpolation", "On", CV_SAVE, CV_OnOff, NULL); consvar_t cv_renderhitboxgldepth = CVAR_INIT ("renderhitbox_gldepth", "Off", CV_SAVE, CV_OnOff, NULL); From 14eb589611a69f154f58a77a3f0f87a9c12f9d05 Mon Sep 17 00:00:00 2001 From: Lactozilla Date: Fri, 8 Sep 2023 17:26:42 -0300 Subject: [PATCH 069/195] Fix floorsprite rendering with 1x1 images --- src/r_splats.c | 56 ++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 47 insertions(+), 9 deletions(-) diff --git a/src/r_splats.c b/src/r_splats.c index 737b6d110..6f2887aae 100644 --- a/src/r_splats.c +++ b/src/r_splats.c @@ -314,7 +314,7 @@ static void R_RasterizeFloorSplat(floorsplat_t *pSplat, vector2_t *verts, visspr fixed_t planeheight = 0; fixed_t step; - int spanfunctype = SPANDRAWFUNC_SPRITE; + int spanfunctype; prepare_rastertab(); @@ -379,9 +379,12 @@ static void R_RasterizeFloorSplat(floorsplat_t *pSplat, vector2_t *verts, visspr ds_source = (UINT8 *)pSplat->pic; ds_flatwidth = pSplat->width; ds_flatheight = pSplat->height; - ds_powersoftwo = false; - if (R_CheckPowersOfTwo()) + ds_powersoftwo = ds_solidcolor = false; + + if (R_CheckSolidColorFlat()) + ds_solidcolor = true; + else if (R_CheckPowersOfTwo()) { R_SetFlatVars(ds_flatwidth * ds_flatheight); ds_powersoftwo = true; @@ -392,7 +395,6 @@ static void R_RasterizeFloorSplat(floorsplat_t *pSplat, vector2_t *verts, visspr R_SetTiltedSpan(0); R_SetScaledSlopePlane(pSplat->slope, vis->viewpoint.x, vis->viewpoint.y, vis->viewpoint.z, pSplat->xscale, pSplat->yscale, -pSplat->verts[0].x, pSplat->verts[0].y, vis->viewpoint.angle, pSplat->angle); R_CalculateSlopeVectors(); - spanfunctype = SPANDRAWFUNC_TILTEDSPRITE; } else { @@ -429,19 +431,55 @@ static void R_RasterizeFloorSplat(floorsplat_t *pSplat, vector2_t *verts, visspr ds_colormap = &vis->extra_colormap->colormap[ds_colormap - colormaps]; } - if (vis->transmap) - { - ds_transmap = vis->transmap; + ds_transmap = vis->transmap; + // Determine which R_DrawWhatever to use + + // Solid color + if (ds_solidcolor) + { + UINT16 px = *(UINT16 *)ds_source; + + // Uh, it's not visible. + if (!(px & 0xFF00)) + return; + + // Pixel color is contained in the lower 8 bits (upper 8 are the opacity), so advance the pointer + ds_source++; + + if (pSplat->slope) + { + if (ds_transmap) + spanfunctype = SPANDRAWFUNC_TILTEDTRANSSOLID; + else + spanfunctype = SPANDRAWFUNC_TILTEDSOLID; + } + else + { + if (ds_transmap) + spanfunctype = SPANDRAWFUNC_TRANSSOLID; + else + spanfunctype = SPANDRAWFUNC_SOLID; + } + } + // Transparent + else if (ds_transmap) + { if (pSplat->slope) spanfunctype = SPANDRAWFUNC_TILTEDTRANSSPRITE; else spanfunctype = SPANDRAWFUNC_TRANSSPRITE; } + // Opaque else - ds_transmap = NULL; + { + if (pSplat->slope) + spanfunctype = SPANDRAWFUNC_TILTEDSPRITE; + else + spanfunctype = SPANDRAWFUNC_SPRITE; + } - if (ds_powersoftwo) + if (ds_powersoftwo || ds_solidcolor) spanfunc = spanfuncs[spanfunctype]; else spanfunc = spanfuncs_npo2[spanfunctype]; From 27021d29218310fb9d508ba6f30e813d10197b58 Mon Sep 17 00:00:00 2001 From: Lactozilla Date: Fri, 8 Sep 2023 17:43:55 -0300 Subject: [PATCH 070/195] Optimize --- src/r_splats.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/r_splats.c b/src/r_splats.c index 6f2887aae..0b482d798 100644 --- a/src/r_splats.c +++ b/src/r_splats.c @@ -316,8 +316,6 @@ static void R_RasterizeFloorSplat(floorsplat_t *pSplat, vector2_t *verts, visspr int spanfunctype; - prepare_rastertab(); - #define RASTERPARAMS(vnum1, vnum2, tv1, tv2, tc, dir) \ x1 = verts[vnum1].x; \ ry1 = verts[vnum1].y; \ @@ -367,15 +365,6 @@ static void R_RasterizeFloorSplat(floorsplat_t *pSplat, vector2_t *verts, visspr if (ry1 > maxy) \ maxy = ry1; - // do segment a -> top of texture - RASTERPARAMS(3,2,0,pSplat->width-1,0,0); - // do segment b -> right side of texture - RASTERPARAMS(2,1,0,pSplat->width-1,pSplat->height-1,0); - // do segment c -> bottom of texture - RASTERPARAMS(1,0,pSplat->width-1,0,pSplat->height-1,0); - // do segment d -> left side of texture - RASTERPARAMS(0,3,pSplat->width-1,0,0,1); - ds_source = (UINT8 *)pSplat->pic; ds_flatwidth = pSplat->width; ds_flatheight = pSplat->height; @@ -396,7 +385,7 @@ static void R_RasterizeFloorSplat(floorsplat_t *pSplat, vector2_t *verts, visspr R_SetScaledSlopePlane(pSplat->slope, vis->viewpoint.x, vis->viewpoint.y, vis->viewpoint.z, pSplat->xscale, pSplat->yscale, -pSplat->verts[0].x, pSplat->verts[0].y, vis->viewpoint.angle, pSplat->angle); R_CalculateSlopeVectors(); } - else + else if (!ds_solidcolor) { planeheight = abs(pSplat->z - vis->viewpoint.z); @@ -484,6 +473,17 @@ static void R_RasterizeFloorSplat(floorsplat_t *pSplat, vector2_t *verts, visspr else spanfunc = spanfuncs_npo2[spanfunctype]; + prepare_rastertab(); + + // do segment a -> top of texture + RASTERPARAMS(3,2,0,pSplat->width-1,0,0); + // do segment b -> right side of texture + RASTERPARAMS(2,1,0,pSplat->width-1,pSplat->height-1,0); + // do segment c -> bottom of texture + RASTERPARAMS(1,0,pSplat->width-1,0,pSplat->height-1,0); + // do segment d -> left side of texture + RASTERPARAMS(0,3,pSplat->width-1,0,0,1); + if (maxy >= vid.height) maxy = vid.height-1; @@ -538,7 +538,7 @@ static void R_RasterizeFloorSplat(floorsplat_t *pSplat, vector2_t *verts, visspr if (x2 < x1) continue; - if (!pSplat->slope) + if (!ds_solidcolor && !pSplat->slope) { fixed_t xstep, ystep; fixed_t distance, span; @@ -587,7 +587,7 @@ static void R_RasterizeFloorSplat(floorsplat_t *pSplat, vector2_t *verts, visspr rastertab[y].maxx = INT32_MIN; } - if (pSplat->angle && !pSplat->slope) + if (!ds_solidcolor && pSplat->angle && !pSplat->slope) memset(cachedheight, 0, sizeof(cachedheight)); } From 82568f81fc1b98b5673caf59f3259f6dd7488162 Mon Sep 17 00:00:00 2001 From: katsy Date: Fri, 8 Sep 2023 17:46:13 -0500 Subject: [PATCH 071/195] Disable renderhitbox in multiplaye altogether --- src/r_bbox.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/r_bbox.c b/src/r_bbox.c index 6b4c4c4fb..cf417ec37 100644 --- a/src/r_bbox.c +++ b/src/r_bbox.c @@ -268,6 +268,9 @@ boolean R_ThingBoundingBoxVisible(mobj_t *thing) { INT32 cvmode = cv_renderhitbox.value; + if (multiplayer) // No hitboxes in multiplayer to avoid cheating + return false; + // Do not render bbox for these switch (thing->type) { From a4a3b5b0944720a536a94c9d471b64c822cdac61 Mon Sep 17 00:00:00 2001 From: spherallic Date: Sat, 9 Sep 2023 01:16:28 +0200 Subject: [PATCH 072/195] 2.2.13 --- appveyor.yml | 2 +- src/config.h.in | 2 ++ src/version.h | 4 ++-- src/win32/Srb2win.rc | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 9c39e3fac..63d801b73 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -version: 2.2.12.{branch}-{build} +version: 2.2.13.{branch}-{build} os: MinGW environment: diff --git a/src/config.h.in b/src/config.h.in index daa3857a3..6d49a6989 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -38,6 +38,8 @@ * Last updated 2021 / 05 / 06 - v2.2.9 - patch.pk3 & zones.pk3 * Last updated 2022 / 03 / 06 - v2.2.10 - main assets * Last updated 2023 / 05 / 02 - v2.2.11 - patch.pk3 & zones.pk3 + * Last updated 2023 / 09 / 06 - v2.2.12 - patch.pk3 + * Last updated 2023 / 09 / 09 - v2.2.13 - none */ #define ASSET_HASH_SRB2_PK3 "ad911f29a28a18968ee5b2d11c2acb39" #define ASSET_HASH_ZONES_PK3 "1c8adf8d079ecb87d00081f158acf3c7" diff --git a/src/version.h b/src/version.h index c3ec0ad49..3242cad67 100644 --- a/src/version.h +++ b/src/version.h @@ -1,4 +1,4 @@ -#define SRB2VERSION "2.2.12"/* this must be the first line, for cmake !! */ +#define SRB2VERSION "2.2.13"/* this must be the first line, for cmake !! */ // The Modification ID; must be obtained from a Master Server Admin ( https://mb.srb2.org/members/?key=ms_admin ). // DO NOT try to set this otherwise, or your modification will be unplayable through the Master Server. @@ -9,7 +9,7 @@ // it's only for detection of the version the player is using so the MS can alert them of an update. // Only set it higher, not lower, obviously. // Note that we use this to help keep internal testing in check; this is why v2.2.0 is not version "1". -#define MODVERSION 53 +#define MODVERSION 54 // Define this as a prerelease version suffix (pre#, RC#) //#define BETAVERSION "pre1" diff --git a/src/win32/Srb2win.rc b/src/win32/Srb2win.rc index 54687a831..b69900746 100644 --- a/src/win32/Srb2win.rc +++ b/src/win32/Srb2win.rc @@ -77,8 +77,8 @@ END #include "../doomdef.h" // Needed for version string VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,2,12,0 - PRODUCTVERSION 2,2,12,0 + FILEVERSION 2,2,13,0 + PRODUCTVERSION 2,2,13,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From d5703be3e7482a312cbfa8f31339e7d1a098ba20 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 8 Sep 2023 22:48:10 -0400 Subject: [PATCH 073/195] CircleCI: try using new cimg base image --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3faca372c..7ce2ba5be 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ jobs: build: working_directory: /root/SRB2 docker: - - image: debian:stretch + - image: cimg/base:current environment: CC: ccache gcc -m32 PKG_CONFIG_LIBDIR: /usr/lib/i386-linux-gnu/pkgconfig From dcdb09769fab9cd17823668e71ffdd0aa92322ee Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 8 Sep 2023 23:20:11 -0400 Subject: [PATCH 074/195] CircleCI: try to build binary as circleci user --- .circleci/config.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7ce2ba5be..4c78f974c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,7 @@ version: 2 jobs: build: - working_directory: /root/SRB2 + working_directory: /home/circleci/SRB2 docker: - image: cimg/base:current environment: @@ -25,39 +25,39 @@ jobs: steps: - run: name: Add i386 arch - command: dpkg --add-architecture i386 + command: sudo dpkg --add-architecture i386 - run: name: Add STJr PPA command: | - apt-get -qq update - apt-get -qq -y install dirmngr - apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0B1702D71499D9C25F986507F240F4449D3B0EC6 - echo "deb http://ppa.launchpad.net/stjr/srb2/ubuntu trusty main" >> /etc/apt/sources.list + sudo apt-get -qq update + sudo apt-get -qq -y install dirmngr + sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0B1702D71499D9C25F986507F240F4449D3B0EC6 + echo "deb http://ppa.launchpad.net/stjr/srb2/ubuntu trusty main" | sudo tee -a /etc/apt/sources.list - run: name: Make APT cache folder - command: mkdir -p /root/.cache/apt/archives/partial + command: mkdir -p /home/circleci/.cache/apt/archives/partial - run: name: Make APT cache usage by _apt - command: chown -Rv _apt:root /root/.cache/apt/archives/partial + command: sudo chown -Rv _apt:root /home/circleci/.cache/apt/archives/partial - run: name: Update APT listing - command: apt-get -qq update + command: sudo apt-get -qq update - run: name: Support S3 upload - command: apt-get -qq -y install ca-certificates + command: sudo apt-get -qq -y install ca-certificates - restore_cache: keys: - v1-SRB2-APT - run: name: Install SDK - command: apt-get -o Dir::Cache="/root/.cache/apt" -qq -y --no-install-recommends install git build-essential libpng-dev:i386 libsdl2-mixer-dev:i386 libgme-dev:i386 libcurl4-openssl-dev:i386 libopenmpt-dev:i386 gettext ccache wget gcc-multilib upx openssh-client + command: sudo apt-get -o Dir::Cache="/home/circleci/.cache/apt" -qq -y --no-install-recommends install git build-essential libpng-dev:i386 libsdl2-mixer-dev:i386 libgme-dev:i386 libcurl4-openssl-dev:i386 libopenmpt-dev:i386 gettext ccache wget gcc-multilib upx openssh-client - run: name: make md5sum - command: find /root/.cache/apt/archives -type f -print0 | sort -z | xargs -r0 md5sum > /root/.cache/apt_archives.md5 + command: find /home/circleci/.cache/apt/archives -type f -print0 | sort -z | sudo xargs -r0 md5sum > /home/circleci/.cache/apt_archives.md5 - save_cache: - key: v1-SRB2-APT-{{ checksum "/root/.cache/apt_archives.md5" }} + key: v1-SRB2-APT-{{ checksum "/home/circleci/.cache/apt_archives.md5" }} paths: - - /root/.cache/apt + - /home/circleci/.cache/apt - checkout - run: name: Compile without network support @@ -78,9 +78,9 @@ jobs: name: Compile command: make -C src LINUX=1 ERRORMODE=1 -k -j4 - store_artifacts: - path: /root/SRB2/bin/ + path: /home/circleci/SRB2/bin/ destination: bin - save_cache: key: v1-SRB2-{{ .Branch }}-{{ checksum "make/linux/SDL.deps" }} paths: - - /root/.ccache + - /home/circleci/.ccache From 9851c8775611799d603aac3357aa6d829d64c503 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 9 Sep 2023 09:36:26 -0400 Subject: [PATCH 075/195] CircieCI: remove curl amd64 SDK so we can install the i386 version --- .circleci/config.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4c78f974c..e20244367 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -49,7 +49,10 @@ jobs: keys: - v1-SRB2-APT - run: - name: Install SDK + name: Uninstall amd64 SDK + command: sudo apt-get -o Dir::Cache="/home/circleci/.cache/apt" -qq -y --no-install-recommends remove libcurl4-openssl-dev:amd64 + - run: + name: Install i386 SDK command: sudo apt-get -o Dir::Cache="/home/circleci/.cache/apt" -qq -y --no-install-recommends install git build-essential libpng-dev:i386 libsdl2-mixer-dev:i386 libgme-dev:i386 libcurl4-openssl-dev:i386 libopenmpt-dev:i386 gettext ccache wget gcc-multilib upx openssh-client - run: name: make md5sum From 5037483a1ea307a019a085b5c784d8eaa0fc5d61 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 9 Sep 2023 15:48:14 -0400 Subject: [PATCH 076/195] CircleCI: look for files as root --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e20244367..bad816286 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -56,7 +56,7 @@ jobs: command: sudo apt-get -o Dir::Cache="/home/circleci/.cache/apt" -qq -y --no-install-recommends install git build-essential libpng-dev:i386 libsdl2-mixer-dev:i386 libgme-dev:i386 libcurl4-openssl-dev:i386 libopenmpt-dev:i386 gettext ccache wget gcc-multilib upx openssh-client - run: name: make md5sum - command: find /home/circleci/.cache/apt/archives -type f -print0 | sort -z | sudo xargs -r0 md5sum > /home/circleci/.cache/apt_archives.md5 + command: sudo find /home/circleci/.cache/apt/archives -type f -print0 | sort -z | sudo xargs -r0 md5sum > /home/circleci/.cache/apt_archives.md5 - save_cache: key: v1-SRB2-APT-{{ checksum "/home/circleci/.cache/apt_archives.md5" }} paths: From 4d217014152bd39d76702035c32e9529d64cd1b0 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 9 Sep 2023 16:03:46 -0400 Subject: [PATCH 077/195] CircleCI: compile for GCC 8,1+ --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index bad816286..b3b97363e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,7 +11,7 @@ jobs: LIBGME_LDFLAGS: -lgme CCACHE_COMPRESS: true WFLAGS: -Wno-unsuffixed-float-constants - GCC49: true + GCC81: true #- image: ubuntu:trusty # environment: # CC: ccache gcc -m32 From 05223fbc6de63621ce4503dd707ccbbfff39124f Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 9 Sep 2023 16:10:42 -0400 Subject: [PATCH 078/195] backtrace: store result of write() in a junk var --- src/sdl/i_system.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index 902194f4f..7b64d6fff 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -259,10 +259,10 @@ UINT8 keyboard_started = false; #ifdef UNIXBACKTRACE #define STDERR_WRITE(string) if (fd != -1) I_OutputMsg("%s", string) -#define CRASHLOG_WRITE(string) if (fd != -1) write(fd, string, strlen(string)) +#define CRASHLOG_WRITE(string) if (fd != -1) junk = write(fd, string, strlen(string)) #define CRASHLOG_STDERR_WRITE(string) \ if (fd != -1)\ - write(fd, string, strlen(string));\ + junk = write(fd, string, strlen(string));\ I_OutputMsg("%s", string) static void write_backtrace(INT32 signal) @@ -271,6 +271,7 @@ static void write_backtrace(INT32 signal) size_t size; time_t rawtime; struct tm timeinfo; + ssize_t junk; enum { BT_SIZE = 1024, STR_SIZE = 32 }; void *array[BT_SIZE]; From 64eb1b0bffc836abb148eef16ee2254340d1d437 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 9 Sep 2023 16:21:04 -0400 Subject: [PATCH 079/195] backtrace: do not care for junk var --- src/sdl/i_system.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index 7b64d6fff..23b82da73 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -315,7 +315,7 @@ static void write_backtrace(INT32 signal) backtrace_symbols_fd(array, size, STDERR_FILENO); CRASHLOG_WRITE("\n"); // Write another newline to the log so it looks nice :) - + (void)junk; close(fd); } #undef STDERR_WRITE From 8558d123ee0511e47656307c0759370986b654ea Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Tue, 12 Sep 2023 19:32:47 -0400 Subject: [PATCH 080/195] SDL: add version check for SDL_OPenURL() --- src/sdl/i_system.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index 23b82da73..be46cd804 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -406,8 +406,10 @@ static void I_ReportSignal(int num, int coredumped) SDL_ShowMessageBox(&messageboxdata, &buttonid); +#if SDL_VERSION_ATLEAST(2,0,14) if (buttonid == 1) SDL_OpenURL("https://www.srb2.org/discord"); +#endif } #ifndef NEWSIGNALHANDLER From 5aa89a712ab29c514e0aa6e7df493abdb5a2fbd7 Mon Sep 17 00:00:00 2001 From: Logan Arias Date: Tue, 10 Oct 2023 23:40:41 +0000 Subject: [PATCH 081/195] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..d260df55c --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,35 @@ +# This file is a template, and might need editing before it works on your project. +# This is a sample GitLab CI/CD configuration file that should run without any modifications. +# It demonstrates a basic 3 stage CI/CD pipeline. Instead of real tests or scripts, +# it uses echo commands to simulate the pipeline execution. +# +# A pipeline is composed of independent jobs that run scripts, grouped into stages. +# Stages run in sequential order, but jobs within stages run in parallel. +# +# For more information, see: https://docs.gitlab.com/ee/ci/yaml/index.html#stages +# +# You can copy and paste this template into a new `.gitlab-ci.yml` file. +# You should not add this template to an existing `.gitlab-ci.yml` file by using the `include:` keyword. +# +# To contribute improvements to CI/CD templates, please follow the Development guide at: +# https://docs.gitlab.com/ee/development/cicd/templates.html +# This specific template is located at: +# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Getting-Started.gitlab-ci.yml + +stages: # List of stages for jobs, and their order of execution + - build + + +build-job: # This job runs in the build stage, which runs first. + stage: build + image: cimg + #artifacts: + # paths: + # - "*.bin" + + script: + - "ls" + + + + From eb44efbc2f412474ffcec9136bd43337edd980f9 Mon Sep 17 00:00:00 2001 From: Logan Arias Date: Tue, 10 Oct 2023 23:43:50 +0000 Subject: [PATCH 082/195] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d260df55c..cc2f89868 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,7 +29,7 @@ build-job: # This job runs in the build stage, which runs first. script: - "ls" - + - "pwd" From 124aca3267da8b4f4f504f6e8feb55bc265c5429 Mon Sep 17 00:00:00 2001 From: Logan Arias Date: Tue, 10 Oct 2023 23:46:11 +0000 Subject: [PATCH 083/195] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cc2f89868..443295881 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,7 +22,7 @@ stages: # List of stages for jobs, and their order of execution build-job: # This job runs in the build stage, which runs first. stage: build - image: cimg + image: debian #artifacts: # paths: # - "*.bin" From 9f8bc2125363eef882e62ef9f42f011bc45f31d6 Mon Sep 17 00:00:00 2001 From: Logan Arias Date: Tue, 10 Oct 2023 23:54:46 +0000 Subject: [PATCH 084/195] Update .gitlab-ci.yml file try running the makefile with nothing --- .gitlab-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 443295881..76f4783ca 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,8 +28,9 @@ build-job: # This job runs in the build stage, which runs first. # - "*.bin" script: - - "ls" - - "pwd" + - "apt update" + - "apt-get install --no-install-recommends --yes make" + - "make --directory=src" From 959c1753d3c7e7abc5593fa3907ee620296cc372 Mon Sep 17 00:00:00 2001 From: Logan Arias Date: Wed, 11 Oct 2023 00:05:38 +0000 Subject: [PATCH 085/195] Update .gitlab-ci.yml file try running the makefile with some dispends libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev upx git libopenmpt-dev gettext --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 76f4783ca..aac53e06b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,7 +29,7 @@ build-job: # This job runs in the build stage, which runs first. script: - "apt update" - - "apt-get install --no-install-recommends --yes make" + - "apt-get install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev upx git libopenmpt-dev gettext" - "make --directory=src" From 7083dffc01be2e91bda59c96fa40d75fbfbb0037 Mon Sep 17 00:00:00 2001 From: Logan Arias Date: Wed, 11 Oct 2023 00:08:16 +0000 Subject: [PATCH 086/195] Update .gitlab-ci.yml file remove upx install --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index aac53e06b..e768c1735 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,8 +29,8 @@ build-job: # This job runs in the build stage, which runs first. script: - "apt update" - - "apt-get install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev upx git libopenmpt-dev gettext" - - "make --directory=src" + - "apt-get install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext" + - "make --directory=src " From 4adce8e3cddad16d48e7244edd0616a166ed17f4 Mon Sep 17 00:00:00 2001 From: Logan Arias Date: Wed, 11 Oct 2023 00:23:05 +0000 Subject: [PATCH 087/195] Update .gitlab-ci.yml file keep artifacts try using ccache --- .gitlab-ci.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e768c1735..de3ff8a73 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,14 +23,15 @@ stages: # List of stages for jobs, and their order of execution build-job: # This job runs in the build stage, which runs first. stage: build image: debian - #artifacts: - # paths: - # - "*.bin" + artifacts: + paths: + - "bin/*" script: + - "" - "apt update" - - "apt-get install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext" - - "make --directory=src " + - "apt-get install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache" + - "CC=\"ccache gcc\" make --directory=src " From b3273a899aa5773c86a9110a7f57403b8544f6e8 Mon Sep 17 00:00:00 2001 From: Logan Arias Date: Wed, 11 Oct 2023 00:40:49 +0000 Subject: [PATCH 088/195] Update .gitlab-ci.yml file cache the ccache --- .gitlab-ci.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index de3ff8a73..913823b67 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,15 +23,22 @@ stages: # List of stages for jobs, and their order of execution build-job: # This job runs in the build stage, which runs first. stage: build image: debian + cache: + - key: + files: + - .ccache/stats + paths: + - .ccache artifacts: paths: - "bin/*" script: - - "" - "apt update" - "apt-get install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache" - - "CC=\"ccache gcc\" make --directory=src " + - "ccache --max-size 10M" + - "CC=\"ccache gcc\" make --directory=src" + - "ccache --show-stats" From 67dcc2dd0af4f48e4232b6c9d358fbfae5138f9c Mon Sep 17 00:00:00 2001 From: Logan Arias Date: Wed, 11 Oct 2023 00:49:43 +0000 Subject: [PATCH 089/195] Update .gitlab-ci.yml file cache the ccache part two --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 913823b67..a8eb0854f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,7 +28,7 @@ build-job: # This job runs in the build stage, which runs first. files: - .ccache/stats paths: - - .ccache + - .ccache/ artifacts: paths: - "bin/*" From 219691895df27ad5314304c4fe5eaca1977cc407 Mon Sep 17 00:00:00 2001 From: Logan Arias Date: Wed, 11 Oct 2023 01:10:02 +0000 Subject: [PATCH 090/195] Update .gitlab-ci.yml file use variables to test if we are using DigitalOcean --- .gitlab-ci.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a8eb0854f..b593c478c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,6 +16,8 @@ # This specific template is located at: # https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Getting-Started.gitlab-ci.yml + + stages: # List of stages for jobs, and their order of execution - build @@ -23,6 +25,9 @@ stages: # List of stages for jobs, and their order of execution build-job: # This job runs in the build stage, which runs first. stage: build image: debian + variables: + CCMaxSize: "10M" + CCC: "ccache gcc" cache: - key: files: @@ -36,9 +41,10 @@ build-job: # This job runs in the build stage, which runs first. script: - "apt update" - "apt-get install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache" - - "ccache --max-size 10M" - - "CC=\"ccache gcc\" make --directory=src" + - "ccache --max-size $CCMaxSize" + - "CC=\"$CCC\" make --directory=src" - "ccache --show-stats" + - "echo Are we running on DO? $DigitalOceanDebianMirror" From 0f2d3e9134ed658ac7f94de87b83f2b18b1931bb Mon Sep 17 00:00:00 2001 From: Logan Arias Date: Wed, 11 Oct 2023 01:26:22 +0000 Subject: [PATCH 091/195] Update .gitlab-ci.yml file fix ccache path --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b593c478c..d2c27a221 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -31,9 +31,9 @@ build-job: # This job runs in the build stage, which runs first. cache: - key: files: - - .ccache/stats + - .cache/ccache/stats paths: - - .ccache/ + - .cache/ccache/ artifacts: paths: - "bin/*" From 2fae2b54db1f203a7b5d538372924491fdb98798 Mon Sep 17 00:00:00 2001 From: Logan Arias Date: Wed, 11 Oct 2023 01:39:08 +0000 Subject: [PATCH 092/195] Update .gitlab-ci.yml file fix ccache path part two --- .gitlab-ci.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d2c27a221..7ee079494 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -27,7 +27,8 @@ build-job: # This job runs in the build stage, which runs first. image: debian variables: CCMaxSize: "10M" - CCC: "ccache gcc" + CC: "ccache gcc" + CCACHE_DIR: "$CI_BUILDS_DIR/.cache/ccache" cache: - key: files: @@ -39,10 +40,13 @@ build-job: # This job runs in the build stage, which runs first. - "bin/*" script: + - "export $CC" + - "export $CCACHE_DIR" + - "export $CI_BUILDS_DIR" - "apt update" - "apt-get install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache" - "ccache --max-size $CCMaxSize" - - "CC=\"$CCC\" make --directory=src" + - "make --directory=src" - "ccache --show-stats" - "echo Are we running on DO? $DigitalOceanDebianMirror" From 16741b2cb0577d8c5ad917a5909187ed359a4c63 Mon Sep 17 00:00:00 2001 From: Logan Arias Date: Wed, 11 Oct 2023 02:08:04 +0000 Subject: [PATCH 093/195] Update .gitlab-ci.yml file fix ccache path part three --- .gitlab-ci.yml | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7ee079494..738895268 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -27,28 +27,37 @@ build-job: # This job runs in the build stage, which runs first. image: debian variables: CCMaxSize: "10M" - CC: "ccache gcc" - CCACHE_DIR: "$CI_BUILDS_DIR/.cache/ccache" cache: - - key: - files: - - .cache/ccache/stats + - key: ccache-$CI_JOB_NAME_SLUG + fallback_keys: + - cache-$CI_DEFAULT_BRANCH + - cache-default paths: - - .cache/ccache/ + - ccache artifacts: paths: - "bin/*" + before_script: + - export PATH="/usr/lib/ccache:$PATH" + - export CCACHE_BASEDIR="$PWD" + - export CCACHE_DIR="$PWD/ccache" + - export CCACHE_COMPILERCHECK=content + - ccache --max-size $CCMaxSize + - ccache --zero-stats || true + - ccache --show-stats || true + after_script: + - export CCACHE_DIR="$PWD/ccache" + - ccache --show-stats + script: - - "export $CC" - - "export $CCACHE_DIR" - - "export $CI_BUILDS_DIR" - - "apt update" - - "apt-get install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache" - - "ccache --max-size $CCMaxSize" - - "make --directory=src" - - "ccache --show-stats" - - "echo Are we running on DO? $DigitalOceanDebianMirror" + - pwd + - echo "$CI_JOB_NAME_SLUG" + - echo "$CCACHE_DIR" + - echo Are we running on DO? "$DigitalOceanDebianMirror" + - apt update + - apt-get install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache + - make --directory=src From 84a2463d2f45287e04a69056fc1485692c824d18 Mon Sep 17 00:00:00 2001 From: Logan Arias Date: Wed, 11 Oct 2023 02:09:54 +0000 Subject: [PATCH 094/195] Update .gitlab-ci.yml file fix ccache path part four --- .gitlab-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 738895268..2f089efc9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -42,6 +42,8 @@ build-job: # This job runs in the build stage, which runs first. - export CCACHE_BASEDIR="$PWD" - export CCACHE_DIR="$PWD/ccache" - export CCACHE_COMPILERCHECK=content + - apt update + - apt-get install --no-install-recommends ccache - ccache --max-size $CCMaxSize - ccache --zero-stats || true - ccache --show-stats || true @@ -55,8 +57,7 @@ build-job: # This job runs in the build stage, which runs first. - echo "$CI_JOB_NAME_SLUG" - echo "$CCACHE_DIR" - echo Are we running on DO? "$DigitalOceanDebianMirror" - - apt update - - apt-get install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache + - apt-get install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext - make --directory=src From 0ff83947ac4349f89d5f46835aeedff7364a4b9b Mon Sep 17 00:00:00 2001 From: Logan Arias Date: Wed, 11 Oct 2023 02:11:04 +0000 Subject: [PATCH 095/195] Update .gitlab-ci.yml file fix ccache path part 5 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2f089efc9..037608416 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -43,7 +43,7 @@ build-job: # This job runs in the build stage, which runs first. - export CCACHE_DIR="$PWD/ccache" - export CCACHE_COMPILERCHECK=content - apt update - - apt-get install --no-install-recommends ccache + - apt-get install --no-install-recommends --yes ccache - ccache --max-size $CCMaxSize - ccache --zero-stats || true - ccache --show-stats || true From 4b015c91e12dcc7d8a7056e0d16c2431f2272884 Mon Sep 17 00:00:00 2001 From: Logan Arias Date: Wed, 11 Oct 2023 03:03:37 +0000 Subject: [PATCH 096/195] Update .gitlab-ci.yml file rename ccache keys up ccache size to 30M --- .gitlab-ci.yml | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 037608416..68d5c5eb1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,16 +22,16 @@ stages: # List of stages for jobs, and their order of execution - build -build-job: # This job runs in the build stage, which runs first. +build-native: # This job runs in the build stage, which runs first. stage: build image: debian variables: - CCMaxSize: "10M" + CCACHE_MAXSIZE: "30M" cache: - - key: ccache-$CI_JOB_NAME_SLUG + - key: ccache-$CI_PROJECT_PATH_SLUG-$CI_JOB_NAME_SLUG fallback_keys: - - cache-$CI_DEFAULT_BRANCH - - cache-default + - cache-$CI_PROJECT_PATH_SLUG-$CI_DEFAULT_BRANCH + - cache-$CI_PROJECT_PATH_SLUG-default paths: - ccache artifacts: @@ -44,19 +44,12 @@ build-job: # This job runs in the build stage, which runs first. - export CCACHE_COMPILERCHECK=content - apt update - apt-get install --no-install-recommends --yes ccache - - ccache --max-size $CCMaxSize - ccache --zero-stats || true - ccache --show-stats || true after_script: - export CCACHE_DIR="$PWD/ccache" - ccache --show-stats - - script: - - pwd - - echo "$CI_JOB_NAME_SLUG" - - echo "$CCACHE_DIR" - - echo Are we running on DO? "$DigitalOceanDebianMirror" - apt-get install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext - make --directory=src From 92f16c8142cd035049cbde95008400072cdade28 Mon Sep 17 00:00:00 2001 From: Logan Arias Date: Wed, 11 Oct 2023 04:11:56 +0000 Subject: [PATCH 097/195] Update .gitlab-ci.yml file use git clone options up CCACHE size to 50M --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 68d5c5eb1..3a0eff4ad 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,7 +26,9 @@ build-native: # This job runs in the build stage, which runs first. stage: build image: debian variables: - CCACHE_MAXSIZE: "30M" + CCACHE_MAXSIZE: "50M" + GIT_STRATEGY: clone + GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_PATH cache: - key: ccache-$CI_PROJECT_PATH_SLUG-$CI_JOB_NAME_SLUG fallback_keys: From 3ee5ed2dacfadfcfad4ddc38bfae17c24379a6ab Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 11 Oct 2023 04:25:05 +0000 Subject: [PATCH 098/195] Update .gitlab-ci.yml file cache apt packages --- .gitlab-ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3a0eff4ad..48cf42697 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -36,6 +36,9 @@ build-native: # This job runs in the build stage, which runs first. - cache-$CI_PROJECT_PATH_SLUG-default paths: - ccache + - key: apt + paths: + - /var/cache/apt artifacts: paths: - "bin/*" @@ -44,7 +47,7 @@ build-native: # This job runs in the build stage, which runs first. - export CCACHE_BASEDIR="$PWD" - export CCACHE_DIR="$PWD/ccache" - export CCACHE_COMPILERCHECK=content - - apt update + - apt-get update - apt-get install --no-install-recommends --yes ccache - ccache --zero-stats || true - ccache --show-stats || true From 3ef89e990216233abbd95db7201d25d70da261a0 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 11 Oct 2023 04:27:50 +0000 Subject: [PATCH 099/195] Update .gitlab-ci.yml file cache apt packages, part 2 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 48cf42697..37c6d76e8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -38,7 +38,7 @@ build-native: # This job runs in the build stage, which runs first. - ccache - key: apt paths: - - /var/cache/apt + - /var/cache/apt/ artifacts: paths: - "bin/*" From 9597a19ecf0106f5198df19b7bb9e8847f6ec858 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 11 Oct 2023 04:37:01 +0000 Subject: [PATCH 100/195] Update .gitlab-ci.yml file cache apt packages, part 3 --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 37c6d76e8..22724f679 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -38,7 +38,7 @@ build-native: # This job runs in the build stage, which runs first. - ccache - key: apt paths: - - /var/cache/apt/ + - apt artifacts: paths: - "bin/*" @@ -47,6 +47,7 @@ build-native: # This job runs in the build stage, which runs first. - export CCACHE_BASEDIR="$PWD" - export CCACHE_DIR="$PWD/ccache" - export CCACHE_COMPILERCHECK=content + - echo Dir::Cache="$PWD/apt" > /etc/apt/apt.conf.d/99cache - apt-get update - apt-get install --no-install-recommends --yes ccache - ccache --zero-stats || true From 7231631a3ff391be9b3fb889ee20cfc6d033d84c Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 11 Oct 2023 04:39:48 +0000 Subject: [PATCH 101/195] Update .gitlab-ci.yml file cache apt packages, part 4 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 22724f679..2e388ac18 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,7 +47,7 @@ build-native: # This job runs in the build stage, which runs first. - export CCACHE_BASEDIR="$PWD" - export CCACHE_DIR="$PWD/ccache" - export CCACHE_COMPILERCHECK=content - - echo Dir::Cache="$PWD/apt" > /etc/apt/apt.conf.d/99cache + - echo Dir::Cache="$PWD/apt" | tee /etc/apt/apt.conf.d/99cache - apt-get update - apt-get install --no-install-recommends --yes ccache - ccache --zero-stats || true From eb6ed2e7e7e657abf48b63e0faa17058d111b509 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 11 Oct 2023 04:43:22 +0000 Subject: [PATCH 102/195] Update .gitlab-ci.yml file cache apt packages, part 5 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2e388ac18..18ae4459c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,7 +47,7 @@ build-native: # This job runs in the build stage, which runs first. - export CCACHE_BASEDIR="$PWD" - export CCACHE_DIR="$PWD/ccache" - export CCACHE_COMPILERCHECK=content - - echo Dir::Cache="$PWD/apt" | tee /etc/apt/apt.conf.d/99cache + - echo -n Dir::Cache="$PWD/apt" | tee /etc/apt/apt.conf.d/99cache - apt-get update - apt-get install --no-install-recommends --yes ccache - ccache --zero-stats || true From 3db57df3532db301b4dd4374fcf119ffbb68f584 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 11 Oct 2023 04:57:29 +0000 Subject: [PATCH 103/195] Update .gitlab-ci.yml file cache apt packages, part 6 --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 18ae4459c..7bc250338 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,7 +47,9 @@ build-native: # This job runs in the build stage, which runs first. - export CCACHE_BASEDIR="$PWD" - export CCACHE_DIR="$PWD/ccache" - export CCACHE_COMPILERCHECK=content - - echo -n Dir::Cache="$PWD/apt" | tee /etc/apt/apt.conf.d/99cache + - export APT_CACHE_DIR=`pwd`/apt-cache + - mkdir --parents --verbose $APT_CACHE_DIR/partial/ + - echo dir::cache::archives="$APT_CACHE_DIR" | tee --append /etc/apt/apt.conf.d/99cache - apt-get update - apt-get install --no-install-recommends --yes ccache - ccache --zero-stats || true From 97096445dfb445f1eb35c3e4d573100a65043930 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 11 Oct 2023 05:00:08 +0000 Subject: [PATCH 104/195] Update .gitlab-ci.yml file cache apt packages, part 7 --- .gitlab-ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7bc250338..30db01e1e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -49,16 +49,15 @@ build-native: # This job runs in the build stage, which runs first. - export CCACHE_COMPILERCHECK=content - export APT_CACHE_DIR=`pwd`/apt-cache - mkdir --parents --verbose $APT_CACHE_DIR/partial/ - - echo dir::cache::archives="$APT_CACHE_DIR" | tee --append /etc/apt/apt.conf.d/99cache - apt-get update - - apt-get install --no-install-recommends --yes ccache + - apt-get -o dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes ccache - ccache --zero-stats || true - ccache --show-stats || true after_script: - export CCACHE_DIR="$PWD/ccache" - ccache --show-stats script: - - apt-get install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext + - apt-get -o dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext - make --directory=src From 37909c95b18a328381a587c440a49695821732f9 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 11 Oct 2023 05:03:19 +0000 Subject: [PATCH 105/195] Update .gitlab-ci.yml file cache apt packages, part 8 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 30db01e1e..02b2edc92 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -38,7 +38,7 @@ build-native: # This job runs in the build stage, which runs first. - ccache - key: apt paths: - - apt + - apt-cache artifacts: paths: - "bin/*" From e7417ea11653ed3f52d9c813150ab63a35e4f16a Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 11 Oct 2023 05:07:25 +0000 Subject: [PATCH 106/195] Update .gitlab-ci.yml file switch docker image to debian, slim version --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 02b2edc92..2e21653d7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,7 +24,7 @@ stages: # List of stages for jobs, and their order of execution build-native: # This job runs in the build stage, which runs first. stage: build - image: debian + image: debian-slim variables: CCACHE_MAXSIZE: "50M" GIT_STRATEGY: clone From 4b43f92b134f2d8841a8b1af65460d44e6b28bd5 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 11 Oct 2023 05:10:23 +0000 Subject: [PATCH 107/195] Update .gitlab-ci.yml file switch docker image to debian, slim version, part 2 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2e21653d7..597a6cb8a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,7 +24,7 @@ stages: # List of stages for jobs, and their order of execution build-native: # This job runs in the build stage, which runs first. stage: build - image: debian-slim + image: debian:stable-slim variables: CCACHE_MAXSIZE: "50M" GIT_STRATEGY: clone From 8b4548384249d211a8d8f82bb18281f8d75dace5 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 01:06:00 +0000 Subject: [PATCH 108/195] Update .gitlab-ci.yml file autoclean apt cache and change cache key to image name --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 597a6cb8a..0cf36d679 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -36,7 +36,7 @@ build-native: # This job runs in the build stage, which runs first. - cache-$CI_PROJECT_PATH_SLUG-default paths: - ccache - - key: apt + - key: apt-$CI_JOB_IMAGE paths: - apt-cache artifacts: @@ -50,14 +50,14 @@ build-native: # This job runs in the build stage, which runs first. - export APT_CACHE_DIR=`pwd`/apt-cache - mkdir --parents --verbose $APT_CACHE_DIR/partial/ - apt-get update - - apt-get -o dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes ccache + - pt-get -o dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache - ccache --zero-stats || true - ccache --show-stats || true after_script: - export CCACHE_DIR="$PWD/ccache" - ccache --show-stats + - apt-get autoclean script: - - apt-get -o dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext - make --directory=src From 53eafa046cef88f21d347fd71769da72fbce4c7f Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 01:07:42 +0000 Subject: [PATCH 109/195] Update .gitlab-ci.yml file fixup typo --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0cf36d679..c7301e418 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -50,7 +50,7 @@ build-native: # This job runs in the build stage, which runs first. - export APT_CACHE_DIR=`pwd`/apt-cache - mkdir --parents --verbose $APT_CACHE_DIR/partial/ - apt-get update - - pt-get -o dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache + - apt-get -o dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache - ccache --zero-stats || true - ccache --show-stats || true after_script: From d7ea647f9bc74ff8787c9d3fa817d8bc01aa81ab Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 01:21:23 +0000 Subject: [PATCH 110/195] Update .gitlab-ci.yml file apt cache do not need to be protected also, name artifact for binaries from build-native job --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c7301e418..e182098b5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -39,9 +39,11 @@ build-native: # This job runs in the build stage, which runs first. - key: apt-$CI_JOB_IMAGE paths: - apt-cache + unprotect: true artifacts: paths: - "bin/*" + name: "Debian native" before_script: - export PATH="/usr/lib/ccache:$PATH" - export CCACHE_BASEDIR="$PWD" @@ -51,12 +53,12 @@ build-native: # This job runs in the build stage, which runs first. - mkdir --parents --verbose $APT_CACHE_DIR/partial/ - apt-get update - apt-get -o dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache + - apt-get autoclean - ccache --zero-stats || true - ccache --show-stats || true after_script: - export CCACHE_DIR="$PWD/ccache" - ccache --show-stats - - apt-get autoclean script: - make --directory=src From dc2a5b949692c35505d60910afbf22fd1ccfb331 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 01:36:29 +0000 Subject: [PATCH 111/195] Update .gitlab-ci.yml file do not play games with $PATH --- .gitlab-ci.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e182098b5..14f171d04 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,21 +45,24 @@ build-native: # This job runs in the build stage, which runs first. - "bin/*" name: "Debian native" before_script: - - export PATH="/usr/lib/ccache:$PATH" - - export CCACHE_BASEDIR="$PWD" - - export CCACHE_DIR="$PWD/ccache" - - export CCACHE_COMPILERCHECK=content - export APT_CACHE_DIR=`pwd`/apt-cache - mkdir --parents --verbose $APT_CACHE_DIR/partial/ - apt-get update - apt-get -o dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache - apt-get autoclean + - export CCACHE_BASEDIR="$PWD" + - export CCACHE_DIR="$PWD/ccache" - ccache --zero-stats || true - ccache --show-stats || true after_script: + - export CCACHE_BASEDIR="$PWD" - export CCACHE_DIR="$PWD/ccache" - ccache --show-stats script: + - export CC="ccache gcc" + - export CCACHE_BASEDIR="$PWD" + - export CCACHE_DIR="$PWD/ccache" + - export CCACHE_COMPILERCHECK=content - make --directory=src From dbd40ef4220ad83100a42dacc6d7228fc32439b3 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 01:52:52 +0000 Subject: [PATCH 112/195] Update .gitlab-ci.yml file auto cache our apt cache --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 14f171d04..7abbfc980 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -49,7 +49,7 @@ build-native: # This job runs in the build stage, which runs first. - mkdir --parents --verbose $APT_CACHE_DIR/partial/ - apt-get update - apt-get -o dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache - - apt-get autoclean + - apt-get -o dir::cache::archives="$APT_CACHE_DIR" autoclean - export CCACHE_BASEDIR="$PWD" - export CCACHE_DIR="$PWD/ccache" - ccache --zero-stats || true From 01fc7810e28028304a899f55007e7808d33f594c Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 02:03:04 +0000 Subject: [PATCH 113/195] Update .gitlab-ci.yml file use DO mirror? --- .gitlab-ci.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7abbfc980..94e1676a2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,11 +45,13 @@ build-native: # This job runs in the build stage, which runs first. - "bin/*" name: "Debian native" before_script: + - sed --expression="s/deb.debian.org/mirrors.digitalocean.com/g" /etc/apt/sources.list > /etc/apt/sources.list.d/debian.list + - rm --force /etc/apt/sources.list + - apt-get update - export APT_CACHE_DIR=`pwd`/apt-cache - mkdir --parents --verbose $APT_CACHE_DIR/partial/ - - apt-get update - - apt-get -o dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache - - apt-get -o dir::cache::archives="$APT_CACHE_DIR" autoclean + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" autoclean - export CCACHE_BASEDIR="$PWD" - export CCACHE_DIR="$PWD/ccache" - ccache --zero-stats || true From 27776173ca16431067aeadeba06b8b0ef8bd8701 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 02:08:24 +0000 Subject: [PATCH 114/195] Update .gitlab-ci.yml file let see what in the /etc/apt folder --- .gitlab-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 94e1676a2..61c03e315 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,8 +45,9 @@ build-native: # This job runs in the build stage, which runs first. - "bin/*" name: "Debian native" before_script: - - sed --expression="s/deb.debian.org/mirrors.digitalocean.com/g" /etc/apt/sources.list > /etc/apt/sources.list.d/debian.list - - rm --force /etc/apt/sources.list + - ls --human-readable --all -l /etc/apt/sources.list* + - rem sed --expression="s/deb.debian.org/mirrors.digitalocean.com/g" /etc/apt/sources.list > /etc/apt/sources.list.d/debian.list + - rem rm --force /etc/apt/sources.list - apt-get update - export APT_CACHE_DIR=`pwd`/apt-cache - mkdir --parents --verbose $APT_CACHE_DIR/partial/ From 58a10836f0520c05b22422f9e49d7ec00e1c244d Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 02:15:47 +0000 Subject: [PATCH 115/195] Update .gitlab-ci.yml file try to overwrite mirrors file --- .gitlab-ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 61c03e315..edc47f3b9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,9 +45,7 @@ build-native: # This job runs in the build stage, which runs first. - "bin/*" name: "Debian native" before_script: - - ls --human-readable --all -l /etc/apt/sources.list* - - rem sed --expression="s/deb.debian.org/mirrors.digitalocean.com/g" /etc/apt/sources.list > /etc/apt/sources.list.d/debian.list - - rem rm --force /etc/apt/sources.list + - if [ $DigitalOceanDebianMirror == "1" ]; then echo http://mirrors.digitalocean.com/debian | tee /etc/apt/mirrors/debian.list; fi - apt-get update - export APT_CACHE_DIR=`pwd`/apt-cache - mkdir --parents --verbose $APT_CACHE_DIR/partial/ From f015b6ea68b5a1df40ea63b03bb36936246f7253 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 02:18:29 +0000 Subject: [PATCH 116/195] Update .gitlab-ci.yml file let look inside debian.sources --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index edc47f3b9..172fba5bc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,7 +45,8 @@ build-native: # This job runs in the build stage, which runs first. - "bin/*" name: "Debian native" before_script: - - if [ $DigitalOceanDebianMirror == "1" ]; then echo http://mirrors.digitalocean.com/debian | tee /etc/apt/mirrors/debian.list; fi + - cat /etc/apt/sources.list.d/debian.sources + - if [ $DigitalOceanDebianMirror == "1" ]; then echo http://mirrors.digitalocean.com/debian | tee /etc/apt/mirrors/debian.list; fi || true - apt-get update - export APT_CACHE_DIR=`pwd`/apt-cache - mkdir --parents --verbose $APT_CACHE_DIR/partial/ From 735b8314e82a50bfb8f22a28d622dd0a62670790 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 02:23:36 +0000 Subject: [PATCH 117/195] Update .gitlab-ci.yml file forget about change the Debian mirror --- .gitlab-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 172fba5bc..529d5d914 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,8 +45,6 @@ build-native: # This job runs in the build stage, which runs first. - "bin/*" name: "Debian native" before_script: - - cat /etc/apt/sources.list.d/debian.sources - - if [ $DigitalOceanDebianMirror == "1" ]; then echo http://mirrors.digitalocean.com/debian | tee /etc/apt/mirrors/debian.list; fi || true - apt-get update - export APT_CACHE_DIR=`pwd`/apt-cache - mkdir --parents --verbose $APT_CACHE_DIR/partial/ From 95c81696a5594442ae9795fedccace91dd7b72d7 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 03:00:34 +0000 Subject: [PATCH 118/195] Update .gitlab-ci.yml file build Mingw64 binary --- .gitlab-ci.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 529d5d914..75415adc9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -48,7 +48,7 @@ build-native: # This job runs in the build stage, which runs first. - apt-get update - export APT_CACHE_DIR=`pwd`/apt-cache - mkdir --parents --verbose $APT_CACHE_DIR/partial/ - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache mingw-w64 - apt-get --option dir::cache::archives="$APT_CACHE_DIR" autoclean - export CCACHE_BASEDIR="$PWD" - export CCACHE_DIR="$PWD/ccache" @@ -59,11 +59,10 @@ build-native: # This job runs in the build stage, which runs first. - export CCACHE_DIR="$PWD/ccache" - ccache --show-stats script: - - export CC="ccache gcc" - export CCACHE_BASEDIR="$PWD" - export CCACHE_DIR="$PWD/ccache" - export CCACHE_COMPILERCHECK=content - - make --directory=src - + - make --directory=src CCACHE=1 + - make --directory=src CCACHE=1 MINGW64=1 PREFIX=x86_64-w64 From ae25f9ac4495e18bfc0c6c119e7dea9356477d3d Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 03:06:17 +0000 Subject: [PATCH 119/195] Update .gitlab-ci.yml file yea the Mingw-w64 is called "x86_64-w64-mingw32", not "x86_64-w64" --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 75415adc9..1ceaa1ef1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -63,6 +63,6 @@ build-native: # This job runs in the build stage, which runs first. - export CCACHE_DIR="$PWD/ccache" - export CCACHE_COMPILERCHECK=content - make --directory=src CCACHE=1 - - make --directory=src CCACHE=1 MINGW64=1 PREFIX=x86_64-w64 + - make --directory=src CCACHE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 From ff4c4c806a9a9a41915b4eff736dd75eb01eb3dd Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 04:12:15 +0000 Subject: [PATCH 120/195] Update .gitlab-ci.yml file split build job for each target: x86-64, Win32, Win64 --- .gitlab-ci.yml | 47 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 12 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1ceaa1ef1..88872359f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,8 +21,7 @@ stages: # List of stages for jobs, and their order of execution - build - -build-native: # This job runs in the build stage, which runs first. +.job_template: &job_build # This job runs in the build stage, which runs first. stage: build image: debian:stable-slim variables: @@ -40,10 +39,6 @@ build-native: # This job runs in the build stage, which runs first. paths: - apt-cache unprotect: true - artifacts: - paths: - - "bin/*" - name: "Debian native" before_script: - apt-get update - export APT_CACHE_DIR=`pwd`/apt-cache @@ -58,11 +53,39 @@ build-native: # This job runs in the build stage, which runs first. - export CCACHE_BASEDIR="$PWD" - export CCACHE_DIR="$PWD/ccache" - ccache --show-stats + +.default_Scripts: &ccache + - export CCACHE_BASEDIR="$PWD" + - export CCACHE_DIR="$PWD/ccache" + - export CCACHE_COMPILERCHECK=content + +build-x86_64-linux-gnu: + <<: *job_build + artifacts: + paths: + - "bin/lsdl2srb2*" + name: "x86-64" script: - - export CCACHE_BASEDIR="$PWD" - - export CCACHE_DIR="$PWD/ccache" - - export CCACHE_COMPILERCHECK=content - - make --directory=src CCACHE=1 + - *ccache + - export CC="x86_64-linux-gnu-gcc + - make --directory=src CCACHE=1 LINUX64=1 + +build-i686-w64-mingw32: + <<: *job_build + artifacts: + paths: + - "bin/srb2win.exe*" + name: "Win32" + script: + - *ccache + - make --directory=src CCACHE=1 MINGW=1 PREFIX=i686-w64-mingw32 + +build-x86_64-w64-mingw32: + <<: *job_build + artifacts: + paths: + - "bin/srb2win64.exe*" + name: "Win64" + script: + - *ccache - make --directory=src CCACHE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 - - From bd1adb266771c7272e9b01edc9c8a5298a6c44de Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 04:22:15 +0000 Subject: [PATCH 121/195] Update .gitlab-ci.yml file inline the script to setup ccache should be done in one line? --- .gitlab-ci.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 88872359f..5c1f4a3ee 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,6 +21,9 @@ stages: # List of stages for jobs, and their order of execution - build +.default_Scripts: &ccache + export CCACHE_BASEDIR="$PWD";export CCACHE_DIR="$PWD/ccache";export CCACHE_COMPILERCHECK=content + .job_template: &job_build # This job runs in the build stage, which runs first. stage: build image: debian:stable-slim @@ -45,20 +48,13 @@ stages: # List of stages for jobs, and their order of execution - mkdir --parents --verbose $APT_CACHE_DIR/partial/ - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache mingw-w64 - apt-get --option dir::cache::archives="$APT_CACHE_DIR" autoclean - - export CCACHE_BASEDIR="$PWD" - - export CCACHE_DIR="$PWD/ccache" + - *ccache - ccache --zero-stats || true - ccache --show-stats || true after_script: - - export CCACHE_BASEDIR="$PWD" - - export CCACHE_DIR="$PWD/ccache" + - *ccache - ccache --show-stats -.default_Scripts: &ccache - - export CCACHE_BASEDIR="$PWD" - - export CCACHE_DIR="$PWD/ccache" - - export CCACHE_COMPILERCHECK=content - build-x86_64-linux-gnu: <<: *job_build artifacts: From ce760342c22e4a204408d6269268bcf4d7ee0059 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 04:26:02 +0000 Subject: [PATCH 122/195] Update .gitlab-ci.yml file fix setting $CC in build-x86_64-linux-gnu job --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5c1f4a3ee..5e0f91923 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -63,7 +63,7 @@ build-x86_64-linux-gnu: name: "x86-64" script: - *ccache - - export CC="x86_64-linux-gnu-gcc + - export CC="x86_64-linux-gnu-gcc" - make --directory=src CCACHE=1 LINUX64=1 build-i686-w64-mingw32: From 82b29bdfcf349795fafb28384b3d8b251d14a0f7 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 05:04:02 +0000 Subject: [PATCH 123/195] Update .gitlab-ci.yml file Name the artifacts by project name,branch, then SHA --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5e0f91923..f2c9573dc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -60,7 +60,7 @@ build-x86_64-linux-gnu: artifacts: paths: - "bin/lsdl2srb2*" - name: "x86-64" + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" script: - *ccache - export CC="x86_64-linux-gnu-gcc" @@ -71,7 +71,7 @@ build-i686-w64-mingw32: artifacts: paths: - "bin/srb2win.exe*" - name: "Win32" + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" script: - *ccache - make --directory=src CCACHE=1 MINGW=1 PREFIX=i686-w64-mingw32 @@ -81,7 +81,7 @@ build-x86_64-w64-mingw32: artifacts: paths: - "bin/srb2win64.exe*" - name: "Win64" + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64" script: - *ccache - make --directory=src CCACHE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 From ea02f5c8104ea3b157323835131240113156b28b Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 05:22:42 +0000 Subject: [PATCH 124/195] Update .gitlab-ci.yml file since each build job run in their own docker, only install packages as needed for each job --- .gitlab-ci.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f2c9573dc..63fcb805b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -46,7 +46,7 @@ stages: # List of stages for jobs, and their order of execution - apt-get update - export APT_CACHE_DIR=`pwd`/apt-cache - mkdir --parents --verbose $APT_CACHE_DIR/partial/ - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache mingw-w64 + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes make git ccache - apt-get --option dir::cache::archives="$APT_CACHE_DIR" autoclean - *ccache - ccache --zero-stats || true @@ -63,6 +63,8 @@ build-x86_64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" script: - *ccache + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev gcc + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" autoclean - export CC="x86_64-linux-gnu-gcc" - make --directory=src CCACHE=1 LINUX64=1 @@ -74,6 +76,8 @@ build-i686-w64-mingw32: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" script: - *ccache + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-mingw-w64 + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" autoclean - make --directory=src CCACHE=1 MINGW=1 PREFIX=i686-w64-mingw32 build-x86_64-w64-mingw32: @@ -84,4 +88,6 @@ build-x86_64-w64-mingw32: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64" script: - *ccache + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-mingw-w64-x86-64 + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" autoclean - make --directory=src CCACHE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 From caf2b486c4716f68e7e03d2bd065091ab92deb7c Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 05:31:31 +0000 Subject: [PATCH 125/195] Update .gitlab-ci.yml file do not install posix version of mingw-w64 --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 63fcb805b..4498c1d85 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -76,7 +76,7 @@ build-i686-w64-mingw32: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" script: - *ccache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-mingw-w64 + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-mingw-w64-win32 - apt-get --option dir::cache::archives="$APT_CACHE_DIR" autoclean - make --directory=src CCACHE=1 MINGW=1 PREFIX=i686-w64-mingw32 @@ -88,6 +88,6 @@ build-x86_64-w64-mingw32: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64" script: - *ccache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-mingw-w64-x86-64 + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-mingw-w64-x86-64-win32 - apt-get --option dir::cache::archives="$APT_CACHE_DIR" autoclean - make --directory=src CCACHE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 From 567565968d0487e57ab04ca865cc38f52da54024 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 05:38:11 +0000 Subject: [PATCH 126/195] Update .gitlab-ci.yml file use gcc-mingw-w64-(i686|x86-64)-win32 package --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4498c1d85..805ad781c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -76,7 +76,7 @@ build-i686-w64-mingw32: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" script: - *ccache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-mingw-w64-win32 + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-mingw-w64-i686-win32 - apt-get --option dir::cache::archives="$APT_CACHE_DIR" autoclean - make --directory=src CCACHE=1 MINGW=1 PREFIX=i686-w64-mingw32 From 50c32451fb9b0353667c74c01109e615da14dee9 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 12:55:10 +0000 Subject: [PATCH 127/195] Update .gitlab-ci.yml file Try to build i686 linux binaries --- .gitlab-ci.yml | 50 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 805ad781c..97ec84372 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,13 +16,18 @@ # This specific template is located at: # https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Getting-Started.gitlab-ci.yml - - stages: # List of stages for jobs, and their order of execution - build -.default_Scripts: &ccache - export CCACHE_BASEDIR="$PWD";export CCACHE_DIR="$PWD/ccache";export CCACHE_COMPILERCHECK=content +.ccache_Scripts: &ccache + - export CCACHE_BASEDIR="$PWD" + - export CCACHE_DIR="$PWD/ccache" + - export CCACHE_COMPILERCHECK=content + +.aptcache_Scripts: &aptcache + - export APT_CACHE_DIR=`pwd`/apt-cache + - mkdir --parents --verbose $APT_CACHE_DIR/partial/ + .job_template: &job_build # This job runs in the build stage, which runs first. stage: build @@ -43,18 +48,34 @@ stages: # List of stages for jobs, and their order of execution - apt-cache unprotect: true before_script: + - dpkg --add-architecture i386 + - dpkg --add-architecture amd64 - apt-get update - - export APT_CACHE_DIR=`pwd`/apt-cache - - mkdir --parents --verbose $APT_CACHE_DIR/partial/ + - *aptcache - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes make git ccache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" autoclean - *ccache - ccache --zero-stats || true - ccache --show-stats || true after_script: + - *aptcache + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" autoclean - *ccache - ccache --show-stats +build-i686-linux-gnu: + <<: *job_build + artifacts: + paths: + - "bin/lsdl2srb2*" + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686" + script: + - *aptcache + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-i686-linux-gnu + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 + - export CC="i686-linux-gnu-gcc" + - *ccache + - make --directory=src CCACHE=1 LINUX=1 + build-x86_64-linux-gnu: <<: *job_build artifacts: @@ -62,10 +83,11 @@ build-x86_64-linux-gnu: - "bin/lsdl2srb2*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" script: - - *ccache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev gcc - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" autoclean + - *aptcache + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-x86-64-linux-gnu + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 - export CC="x86_64-linux-gnu-gcc" + - *ccache - make --directory=src CCACHE=1 LINUX64=1 build-i686-w64-mingw32: @@ -75,9 +97,9 @@ build-i686-w64-mingw32: - "bin/srb2win.exe*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" script: - - *ccache + - *aptcache - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-mingw-w64-i686-win32 - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" autoclean + - *ccache - make --directory=src CCACHE=1 MINGW=1 PREFIX=i686-w64-mingw32 build-x86_64-w64-mingw32: @@ -87,7 +109,7 @@ build-x86_64-w64-mingw32: - "bin/srb2win64.exe*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64" script: - - *ccache + - *aptcache - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-mingw-w64-x86-64-win32 - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" autoclean + - *ccache - make --directory=src CCACHE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 From 83628d6049b00c5e01b48de191d54eb65288bd2c Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 13:11:16 +0000 Subject: [PATCH 128/195] Update .gitlab-ci.yml file Set PKG_CONFIG_PATH for targeted archs --- .gitlab-ci.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 97ec84372..76d62bab5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -52,7 +52,7 @@ stages: # List of stages for jobs, and their order of execution - dpkg --add-architecture amd64 - apt-get update - *aptcache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes make git ccache + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes make git ccache gcc - *ccache - ccache --zero-stats || true - ccache --show-stats || true @@ -70,9 +70,10 @@ build-i686-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686" script: - *aptcache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-i686-linux-gnu + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-i686-linux-gnu || true - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 - export CC="i686-linux-gnu-gcc" + - export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig - *ccache - make --directory=src CCACHE=1 LINUX=1 @@ -84,9 +85,10 @@ build-x86_64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" script: - *aptcache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-x86-64-linux-gnu + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-x86-64-linux-gnu || true - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 - export CC="x86_64-linux-gnu-gcc" + - export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig - *ccache - make --directory=src CCACHE=1 LINUX64=1 From 7ba7c5e6a0f101538dfa2513a41d6d07239fe45e Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 16:17:10 +0000 Subject: [PATCH 129/195] Update .gitlab-ci.yml file Add build for ARM64 --- .gitlab-ci.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 76d62bab5..83320aac1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -77,6 +77,21 @@ build-i686-linux-gnu: - *ccache - make --directory=src CCACHE=1 LINUX=1 +build-aarch64-linux-gnu: + <<: *job_build + artifacts: + paths: + - "bin/lsdl2srb2*" + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-aarch64" + script: + - *aptcache + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-aarch64-linux-gnu || true + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 + - export CC="aarch64-linux-gnu-gcc" + - export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig + - *ccache + - make --directory=src CCACHE=1 LINUX64=1 NONX86=1 + build-x86_64-linux-gnu: <<: *job_build artifacts: From f5cf1ce5a5ab7f6fe7256cb20ba985b4cc35e3d4 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 16:53:32 +0000 Subject: [PATCH 130/195] Update .gitlab-ci.yml file Forget to add arm64 arch to the Debian system --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 83320aac1..00072725b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -50,6 +50,7 @@ stages: # List of stages for jobs, and their order of execution before_script: - dpkg --add-architecture i386 - dpkg --add-architecture amd64 + - dpkg --add-architecture arm64 - apt-get update - *aptcache - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes make git ccache gcc From 88ec9233b5973fe102f201bbfb4b9d517188e0ec Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 17:36:37 +0000 Subject: [PATCH 131/195] Update .gitlab-ci.yml file Overwrite OBJCOPY and OBJDUMP settings for Linux targets --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 00072725b..5828037ac 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -76,7 +76,7 @@ build-i686-linux-gnu: - export CC="i686-linux-gnu-gcc" - export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig - *ccache - - make --directory=src CCACHE=1 LINUX=1 + - make --directory=src CCACHE=1 LINUX=1 OBJCOPY=i686-linux-gnu-objcopy OBJDUMP=i686-linux-gnu-objdump build-aarch64-linux-gnu: <<: *job_build @@ -91,7 +91,7 @@ build-aarch64-linux-gnu: - export CC="aarch64-linux-gnu-gcc" - export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig - *ccache - - make --directory=src CCACHE=1 LINUX64=1 NONX86=1 + - make --directory=src CCACHE=1 LINUX64=1 NONX86=1 OBJCOPY=aarch64-linux-gnu-objcopy OBJDUMP=aarch64-linux-gnu-objdump build-x86_64-linux-gnu: <<: *job_build @@ -106,7 +106,7 @@ build-x86_64-linux-gnu: - export CC="x86_64-linux-gnu-gcc" - export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig - *ccache - - make --directory=src CCACHE=1 LINUX64=1 + - make --directory=src CCACHE=1 LINUX64=1 OBJCOPY=x86_64-linux-gnu-objcopy OBJDUMP=x86_64-linux-gnu-objdump build-i686-w64-mingw32: <<: *job_build From fa76733feeffb1184413e2dcd310449596e3fe23 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 18:01:44 +0000 Subject: [PATCH 132/195] Update .gitlab-ci.yml file let see if the Makefile system will just read from env --- .gitlab-ci.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5828037ac..681c6e61f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -73,10 +73,12 @@ build-i686-linux-gnu: - *aptcache - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-i686-linux-gnu || true - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 - - export CC="i686-linux-gnu-gcc" + - export CC=i686-linux-gnu-gcc + - export OBJCOPY=i686-linux-gnu-objcopy + - export OBJDUMP=i686-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig - *ccache - - make --directory=src CCACHE=1 LINUX=1 OBJCOPY=i686-linux-gnu-objcopy OBJDUMP=i686-linux-gnu-objdump + - make --directory=src CCACHE=1 LINUX=1 build-aarch64-linux-gnu: <<: *job_build @@ -88,10 +90,12 @@ build-aarch64-linux-gnu: - *aptcache - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-aarch64-linux-gnu || true - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 - - export CC="aarch64-linux-gnu-gcc" + - export CC=aarch64-linux-gnu-gcc + - export OBJCOPY=aarch64-linux-gnu-objcopy + - export OBJDUMP=aarch64-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig - *ccache - - make --directory=src CCACHE=1 LINUX64=1 NONX86=1 OBJCOPY=aarch64-linux-gnu-objcopy OBJDUMP=aarch64-linux-gnu-objdump + - make --directory=src CCACHE=1 LINUX64=1 NONX86=1 build-x86_64-linux-gnu: <<: *job_build @@ -103,10 +107,12 @@ build-x86_64-linux-gnu: - *aptcache - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-x86-64-linux-gnu || true - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 - - export CC="x86_64-linux-gnu-gcc" + - export CC=x86_64-linux-gnu-gcc + - export OBJCOPY=x86_64-linux-gnu-objcopy + - export OBJDUMP=x86_64-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig - *ccache - - make --directory=src CCACHE=1 LINUX64=1 OBJCOPY=x86_64-linux-gnu-objcopy OBJDUMP=x86_64-linux-gnu-objdump + - make --directory=src CCACHE=1 LINUX64=1 build-i686-w64-mingw32: <<: *job_build From fe65f2b27150afb550919e7429574967a2c36e66 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 18:12:23 +0000 Subject: [PATCH 133/195] Update cpdebug.mk Allow Env to overwrite Makefile's default OBJCOPY and OBJDUMP, just like CC --- cpdebug.mk | 64 +++++++++++++++++++++++++++--------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/cpdebug.mk b/cpdebug.mk index 6baedf227..e7b076303 100644 --- a/cpdebug.mk +++ b/cpdebug.mk @@ -1,32 +1,32 @@ -#Add-on Makefile for wxDev-C++ project file -ifdef ComSpec -COMSPEC=$(ComSpec) -endif -ifdef COMSPEC -OBJCOPY=objcopy.exe -OBJDUMP=objdump.exe -GZIP?=gzip.exe -else -OBJCOPY=objcopy -OBJDUMP=objdump -GZIP?=gzip -endif -DBGNAME=$(BIN).debug -OBJDUMP_OPTS?=--wide --source --line-numbers -GZIP_OPTS?=-9 -f -n -GZIP_OPT2=$(GZIP_OPTS) --rsyncable -UPX?=upx -UPX_OPTS?=--best --preserve-build-id -UPX_OPTS+=-q - -all-after: - $(OBJDUMP) $(OBJDUMP_OPTS) "$(BIN)" > "$(DBGNAME).txt" - $(OBJCOPY) $(BIN) $(DBGNAME) - $(OBJCOPY) --strip-debug $(BIN) - -$(OBJCOPY) --add-gnu-debuglink=$(DBGNAME) $(BIN) - -$(GZIP) $(GZIP_OPTS) "$(DBGNAME).txt" -ifndef COMSPEC - -$(GZIP) $(GZIP_OPT2) "$(DBGNAME).txt" -endif - -$(UPX) $(UPX_OPTS) $(BIN) - +#Add-on Makefile for wxDev-C++ project file +ifdef ComSpec +COMSPEC=$(ComSpec) +endif +ifdef COMSPEC +OBJCOPY?=objcopy.exe +OBJDUMP?=objdump.exe +GZIP?=gzip.exe +else +OBJCOPY?=objcopy +OBJDUMP?=objdump +GZIP?=gzip +endif +DBGNAME=$(BIN).debug +OBJDUMP_OPTS?=--wide --source --line-numbers +GZIP_OPTS?=-9 -f -n +GZIP_OPT2=$(GZIP_OPTS) --rsyncable +UPX?=upx +UPX_OPTS?=--best --preserve-build-id +UPX_OPTS+=-q + +all-after: + $(OBJDUMP) $(OBJDUMP_OPTS) "$(BIN)" > "$(DBGNAME).txt" + $(OBJCOPY) $(BIN) $(DBGNAME) + $(OBJCOPY) --strip-debug $(BIN) + -$(OBJCOPY) --add-gnu-debuglink=$(DBGNAME) $(BIN) + -$(GZIP) $(GZIP_OPTS) "$(DBGNAME).txt" +ifndef COMSPEC + -$(GZIP) $(GZIP_OPT2) "$(DBGNAME).txt" +endif + -$(UPX) $(UPX_OPTS) $(BIN) + From 5449ca2dbfb3ddaa3ee6336b7b461757bf93fdba Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 18:25:02 +0000 Subject: [PATCH 134/195] Update .gitlab-ci.yml file force the Makefile system to use our cross-compile binutil package --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 681c6e61f..e2ec24996 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -78,7 +78,7 @@ build-i686-linux-gnu: - export OBJDUMP=i686-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig - *ccache - - make --directory=src CCACHE=1 LINUX=1 + - make --directory=src CCACHE=1 OBJCOPY=$OBJCOPY OBJDUMP=$OBJDUMP LINUX=1 build-aarch64-linux-gnu: <<: *job_build @@ -95,7 +95,7 @@ build-aarch64-linux-gnu: - export OBJDUMP=aarch64-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig - *ccache - - make --directory=src CCACHE=1 LINUX64=1 NONX86=1 + - make --directory=src CCACHE=1 OBJCOPY=$OBJCOPY OBJDUMP=$OBJDUMP LINUX64=1 NONX86=1 build-x86_64-linux-gnu: <<: *job_build @@ -112,7 +112,7 @@ build-x86_64-linux-gnu: - export OBJDUMP=x86_64-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig - *ccache - - make --directory=src CCACHE=1 LINUX64=1 + - make --directory=src CCACHE=1 OBJCOPY=$OBJCOPY OBJDUMP=$OBJDUMP LINUX64=1 build-i686-w64-mingw32: <<: *job_build From 4e2324216d6d3c276322fe4c4ef722221265c10f Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 19:40:35 -0400 Subject: [PATCH 135/195] Makefile Also allow overwrite of OBJCOPY, OBJDUMP and WINDRES --- .gitlab-ci.yml | 6 ++--- cpdebug.mk | 64 +++++++++++++++++++++++++------------------------- src/Makefile | 6 ++--- 3 files changed, 38 insertions(+), 38 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e2ec24996..681c6e61f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -78,7 +78,7 @@ build-i686-linux-gnu: - export OBJDUMP=i686-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig - *ccache - - make --directory=src CCACHE=1 OBJCOPY=$OBJCOPY OBJDUMP=$OBJDUMP LINUX=1 + - make --directory=src CCACHE=1 LINUX=1 build-aarch64-linux-gnu: <<: *job_build @@ -95,7 +95,7 @@ build-aarch64-linux-gnu: - export OBJDUMP=aarch64-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig - *ccache - - make --directory=src CCACHE=1 OBJCOPY=$OBJCOPY OBJDUMP=$OBJDUMP LINUX64=1 NONX86=1 + - make --directory=src CCACHE=1 LINUX64=1 NONX86=1 build-x86_64-linux-gnu: <<: *job_build @@ -112,7 +112,7 @@ build-x86_64-linux-gnu: - export OBJDUMP=x86_64-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig - *ccache - - make --directory=src CCACHE=1 OBJCOPY=$OBJCOPY OBJDUMP=$OBJDUMP LINUX64=1 + - make --directory=src CCACHE=1 LINUX64=1 build-i686-w64-mingw32: <<: *job_build diff --git a/cpdebug.mk b/cpdebug.mk index e7b076303..75f08c66f 100644 --- a/cpdebug.mk +++ b/cpdebug.mk @@ -1,32 +1,32 @@ -#Add-on Makefile for wxDev-C++ project file -ifdef ComSpec -COMSPEC=$(ComSpec) -endif -ifdef COMSPEC -OBJCOPY?=objcopy.exe -OBJDUMP?=objdump.exe -GZIP?=gzip.exe -else -OBJCOPY?=objcopy -OBJDUMP?=objdump -GZIP?=gzip -endif -DBGNAME=$(BIN).debug -OBJDUMP_OPTS?=--wide --source --line-numbers -GZIP_OPTS?=-9 -f -n -GZIP_OPT2=$(GZIP_OPTS) --rsyncable -UPX?=upx -UPX_OPTS?=--best --preserve-build-id -UPX_OPTS+=-q - -all-after: - $(OBJDUMP) $(OBJDUMP_OPTS) "$(BIN)" > "$(DBGNAME).txt" - $(OBJCOPY) $(BIN) $(DBGNAME) - $(OBJCOPY) --strip-debug $(BIN) - -$(OBJCOPY) --add-gnu-debuglink=$(DBGNAME) $(BIN) - -$(GZIP) $(GZIP_OPTS) "$(DBGNAME).txt" -ifndef COMSPEC - -$(GZIP) $(GZIP_OPT2) "$(DBGNAME).txt" -endif - -$(UPX) $(UPX_OPTS) $(BIN) - +#Add-on Makefile for wxDev-C++ project file +ifdef ComSpec +COMSPEC=$(ComSpec) +endif +ifdef COMSPEC +OBJCOPY?=objcopy.exe +OBJDUMP?=objdump.exe +GZIP?=gzip.exe +else +OBJCOPY?=objcopy +OBJDUMP?=objdump +GZIP?=gzip +endif +DBGNAME=$(BIN).debug +OBJDUMP_OPTS?=--wide --source --line-numbers +GZIP_OPTS?=-9 -f -n +GZIP_OPT2=$(GZIP_OPTS) --rsyncable +UPX?=upx +UPX_OPTS?=--best --preserve-build-id +UPX_OPTS+=-q + +all-after: + $(OBJDUMP) $(OBJDUMP_OPTS) "$(BIN)" > "$(DBGNAME).txt" + $(OBJCOPY) $(BIN) $(DBGNAME) + $(OBJCOPY) --strip-debug $(BIN) + -$(OBJCOPY) --add-gnu-debuglink=$(DBGNAME) $(BIN) + -$(GZIP) $(GZIP_OPTS) "$(DBGNAME).txt" +ifndef COMSPEC + -$(GZIP) $(GZIP_OPT2) "$(DBGNAME).txt" +endif + -$(UPX) $(UPX_OPTS) $(BIN) + diff --git a/src/Makefile b/src/Makefile index 41cef2a17..539c2fa74 100644 --- a/src/Makefile +++ b/src/Makefile @@ -141,9 +141,9 @@ endif OBJDUMP_OPTS?=--wide --source --line-numbers -OBJCOPY:=$(call Prefix,objcopy) -OBJDUMP:=$(call Prefix,objdump) -WINDRES:=$(call Prefix,windres) +OBJCOPY?=$(call Prefix,objcopy) +OBJDUMP?=$(call Prefix,objdump) +WINDRES?=$(call Prefix,windres) GZIP?=gzip GZIP_OPTS?=-9 -f -n From 903792f1090f5c0f72bae544c1d63a93dc50c80d Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 20:07:22 -0400 Subject: [PATCH 136/195] Update .gitlib-ci.yml Remove whitespace --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 681c6e61f..bad819d34 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -27,7 +27,6 @@ stages: # List of stages for jobs, and their order of execution .aptcache_Scripts: &aptcache - export APT_CACHE_DIR=`pwd`/apt-cache - mkdir --parents --verbose $APT_CACHE_DIR/partial/ - .job_template: &job_build # This job runs in the build stage, which runs first. stage: build From 008efa9b0edc00dca994d55c3b11c4454e4bd4dc Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 13 Oct 2023 02:08:53 +0000 Subject: [PATCH 137/195] Update .gitlab-ci.yml file We do not need to install GCC for w64-mingw32 jobs --- .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bad819d34..aa63365a5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -52,7 +52,7 @@ stages: # List of stages for jobs, and their order of execution - dpkg --add-architecture arm64 - apt-get update - *aptcache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes make git ccache gcc + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes make git ccache - *ccache - ccache --zero-stats || true - ccache --show-stats || true @@ -70,7 +70,7 @@ build-i686-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686" script: - *aptcache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-i686-linux-gnu || true + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-i686-linux-gnu || apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 - export CC=i686-linux-gnu-gcc - export OBJCOPY=i686-linux-gnu-objcopy @@ -87,7 +87,7 @@ build-aarch64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-aarch64" script: - *aptcache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-aarch64-linux-gnu || true + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-aarch64-linux-gnu || apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 - export CC=aarch64-linux-gnu-gcc - export OBJCOPY=aarch64-linux-gnu-objcopy @@ -104,7 +104,7 @@ build-x86_64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" script: - *aptcache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-x86-64-linux-gnu || true + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-x86-64-linux-gnu || apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 - export CC=x86_64-linux-gnu-gcc - export OBJCOPY=x86_64-linux-gnu-objcopy From 4f116673f3e03ab0e95b4e8ca15577a6902467ab Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 22:26:43 -0400 Subject: [PATCH 138/195] Undo src/Makefile Let see, revert OBJCOPY,OBJDUMP and WINDRES statements --- src/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Makefile b/src/Makefile index 539c2fa74..41cef2a17 100644 --- a/src/Makefile +++ b/src/Makefile @@ -141,9 +141,9 @@ endif OBJDUMP_OPTS?=--wide --source --line-numbers -OBJCOPY?=$(call Prefix,objcopy) -OBJDUMP?=$(call Prefix,objdump) -WINDRES?=$(call Prefix,windres) +OBJCOPY:=$(call Prefix,objcopy) +OBJDUMP:=$(call Prefix,objdump) +WINDRES:=$(call Prefix,windres) GZIP?=gzip GZIP_OPTS?=-9 -f -n From dfe181058033d4f5a94ae2433ffd1cef33d69149 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 22:30:26 -0400 Subject: [PATCH 139/195] Revert "Undo src/Makefile" This reverts commit 4f116673f3e03ab0e95b4e8ca15577a6902467ab. --- src/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Makefile b/src/Makefile index 41cef2a17..539c2fa74 100644 --- a/src/Makefile +++ b/src/Makefile @@ -141,9 +141,9 @@ endif OBJDUMP_OPTS?=--wide --source --line-numbers -OBJCOPY:=$(call Prefix,objcopy) -OBJDUMP:=$(call Prefix,objdump) -WINDRES:=$(call Prefix,windres) +OBJCOPY?=$(call Prefix,objcopy) +OBJDUMP?=$(call Prefix,objdump) +WINDRES?=$(call Prefix,windres) GZIP?=gzip GZIP_OPTS?=-9 -f -n From 5acceaa2389b35307ecf973dcc0019426da198d2 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 13 Oct 2023 02:46:00 +0000 Subject: [PATCH 140/195] Update .gitlab-ci.yml file Let see if we can pass an option for what architecture we are installing for --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index aa63365a5..d5a92e5e6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -71,7 +71,7 @@ build-i686-linux-gnu: script: - *aptcache - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-i686-linux-gnu || apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" --option APT::Architecture="i386" install --no-install-recommends --yes libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev - export CC=i686-linux-gnu-gcc - export OBJCOPY=i686-linux-gnu-objcopy - export OBJDUMP=i686-linux-gnu-objdump @@ -88,7 +88,7 @@ build-aarch64-linux-gnu: script: - *aptcache - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-aarch64-linux-gnu || apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" --option APT::Architecture="arm64" install --no-install-recommends --yes libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev - export CC=aarch64-linux-gnu-gcc - export OBJCOPY=aarch64-linux-gnu-objcopy - export OBJDUMP=aarch64-linux-gnu-objdump @@ -105,7 +105,7 @@ build-x86_64-linux-gnu: script: - *aptcache - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-x86-64-linux-gnu || apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" --option APT::Architecture="amd64" install --no-install-recommends --yes libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev - export CC=x86_64-linux-gnu-gcc - export OBJCOPY=x86_64-linux-gnu-objcopy - export OBJDUMP=x86_64-linux-gnu-objdump From 8b33dd604b21b5c8e00082a50163df2e51ecb1b1 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 22:48:34 -0400 Subject: [PATCH 141/195] Revert "Update .gitlab-ci.yml file" This reverts commit 5acceaa2389b35307ecf973dcc0019426da198d2. --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d5a92e5e6..aa63365a5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -71,7 +71,7 @@ build-i686-linux-gnu: script: - *aptcache - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-i686-linux-gnu || apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" --option APT::Architecture="i386" install --no-install-recommends --yes libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 - export CC=i686-linux-gnu-gcc - export OBJCOPY=i686-linux-gnu-objcopy - export OBJDUMP=i686-linux-gnu-objdump @@ -88,7 +88,7 @@ build-aarch64-linux-gnu: script: - *aptcache - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-aarch64-linux-gnu || apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" --option APT::Architecture="arm64" install --no-install-recommends --yes libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 - export CC=aarch64-linux-gnu-gcc - export OBJCOPY=aarch64-linux-gnu-objcopy - export OBJDUMP=aarch64-linux-gnu-objdump @@ -105,7 +105,7 @@ build-x86_64-linux-gnu: script: - *aptcache - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-x86-64-linux-gnu || apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" --option APT::Architecture="amd64" install --no-install-recommends --yes libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 - export CC=x86_64-linux-gnu-gcc - export OBJCOPY=x86_64-linux-gnu-objcopy - export OBJDUMP=x86_64-linux-gnu-objdump From 0368a1ce8b95169d0663bb4ebdfc196273411fae Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 22:49:44 -0400 Subject: [PATCH 142/195] cleanup whitespace in .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index aa63365a5..f1ec1edab 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -71,7 +71,7 @@ build-i686-linux-gnu: script: - *aptcache - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-i686-linux-gnu || apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 - export CC=i686-linux-gnu-gcc - export OBJCOPY=i686-linux-gnu-objcopy - export OBJDUMP=i686-linux-gnu-objdump From aa9d84b6d23d31f28474e86d05dad9b2f98a7c5d Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 13 Oct 2023 16:13:31 +0000 Subject: [PATCH 143/195] Update .gitlab-ci.yml file Let try building on Debian Testing --- .gitlab-ci.yml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f1ec1edab..cacb68744 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,9 +28,11 @@ stages: # List of stages for jobs, and their order of execution - export APT_CACHE_DIR=`pwd`/apt-cache - mkdir --parents --verbose $APT_CACHE_DIR/partial/ -.job_template: &job_build # This job runs in the build stage, which runs first. - stage: build +default: image: debian:stable-slim + +.job_template: &job_build # This job runs in the build stage, which runs first. + stage: build variables: CCACHE_MAXSIZE: "50M" GIT_STRATEGY: clone @@ -136,3 +138,18 @@ build-x86_64-w64-mingw32: - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-mingw-w64-x86-64-win32 - *ccache - make --directory=src CCACHE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 + +build-testing: + <<: *job_build + image: debian:testing-slim + allow_failure: true + artifacts: + paths: + - "bin/lsdl2srb2*" + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing" + script: + - *aptcache + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev + - *ccache + - make --directory=src CCACHE=1 NONX86=1 \ No newline at end of file From f6d37d504b2eb73589dc99153b385454e3cd54a9 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 13 Oct 2023 16:37:06 +0000 Subject: [PATCH 144/195] Update .gitlab-ci.yml file quiet out the apt-get commands --- .gitlab-ci.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cacb68744..927ad705e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -52,15 +52,15 @@ default: - dpkg --add-architecture i386 - dpkg --add-architecture amd64 - dpkg --add-architecture arm64 - - apt-get update + - apt-get --quiet update - *aptcache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes make git ccache + - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install make git ccache - *ccache - ccache --zero-stats || true - ccache --show-stats || true after_script: - *aptcache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" autoclean + - apt-get --quiet --option dir::cache::archives="$APT_CACHE_DIR" autoclean - *ccache - ccache --show-stats @@ -72,8 +72,8 @@ build-i686-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686" script: - *aptcache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-i686-linux-gnu || apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 + - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-i686-linux-gnu || apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc + - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 - export CC=i686-linux-gnu-gcc - export OBJCOPY=i686-linux-gnu-objcopy - export OBJDUMP=i686-linux-gnu-objdump @@ -89,8 +89,8 @@ build-aarch64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-aarch64" script: - *aptcache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-aarch64-linux-gnu || apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 + - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-aarch64-linux-gnu || apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc + - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 - export CC=aarch64-linux-gnu-gcc - export OBJCOPY=aarch64-linux-gnu-objcopy - export OBJDUMP=aarch64-linux-gnu-objdump @@ -106,8 +106,8 @@ build-x86_64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" script: - *aptcache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-x86-64-linux-gnu || apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 + - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-x86-64-linux-gnu || apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc + - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 - export CC=x86_64-linux-gnu-gcc - export OBJCOPY=x86_64-linux-gnu-objcopy - export OBJDUMP=x86_64-linux-gnu-objdump @@ -123,7 +123,7 @@ build-i686-w64-mingw32: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" script: - *aptcache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-mingw-w64-i686-win32 + - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-mingw-w64-i686-win32 - *ccache - make --directory=src CCACHE=1 MINGW=1 PREFIX=i686-w64-mingw32 @@ -135,7 +135,7 @@ build-x86_64-w64-mingw32: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64" script: - *aptcache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-mingw-w64-x86-64-win32 + - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-mingw-w64-x86-64-win32 - *ccache - make --directory=src CCACHE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 @@ -149,7 +149,7 @@ build-testing: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing" script: - *aptcache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev + - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc + - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev - *ccache - make --directory=src CCACHE=1 NONX86=1 \ No newline at end of file From b8fb0280ab322a54ea7fa57873b0b383ed8660f1 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 13 Oct 2023 16:45:02 +0000 Subject: [PATCH 145/195] Update .gitlab-ci.yml file more quiet out the apt-get commands --- .gitlab-ci.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 927ad705e..1efb639fb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -52,15 +52,15 @@ default: - dpkg --add-architecture i386 - dpkg --add-architecture amd64 - dpkg --add-architecture arm64 - - apt-get --quiet update + - apt-get --quiet --quiet update - *aptcache - - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install make git ccache + - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install make git ccache - *ccache - ccache --zero-stats || true - ccache --show-stats || true after_script: - *aptcache - - apt-get --quiet --option dir::cache::archives="$APT_CACHE_DIR" autoclean + - apt-get --quiet --quiet --option dir::cache::archives="$APT_CACHE_DIR" autoclean - *ccache - ccache --show-stats @@ -72,8 +72,8 @@ build-i686-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686" script: - *aptcache - - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-i686-linux-gnu || apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc - - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 + - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-i686-linux-gnu || apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc + - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 - export CC=i686-linux-gnu-gcc - export OBJCOPY=i686-linux-gnu-objcopy - export OBJDUMP=i686-linux-gnu-objdump @@ -89,8 +89,8 @@ build-aarch64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-aarch64" script: - *aptcache - - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-aarch64-linux-gnu || apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc - - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 + - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-aarch64-linux-gnu || apt-get --no-install-recommend --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc + - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 - export CC=aarch64-linux-gnu-gcc - export OBJCOPY=aarch64-linux-gnu-objcopy - export OBJDUMP=aarch64-linux-gnu-objdump @@ -106,8 +106,8 @@ build-x86_64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" script: - *aptcache - - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-x86-64-linux-gnu || apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc - - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 + - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-x86-64-linux-gnu || apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc + - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 - export CC=x86_64-linux-gnu-gcc - export OBJCOPY=x86_64-linux-gnu-objcopy - export OBJDUMP=x86_64-linux-gnu-objdump @@ -123,7 +123,7 @@ build-i686-w64-mingw32: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" script: - *aptcache - - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-mingw-w64-i686-win32 + - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-mingw-w64-i686-win32 - *ccache - make --directory=src CCACHE=1 MINGW=1 PREFIX=i686-w64-mingw32 @@ -135,7 +135,7 @@ build-x86_64-w64-mingw32: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64" script: - *aptcache - - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-mingw-w64-x86-64-win32 + - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-mingw-w64-x86-64-win32 - *ccache - make --directory=src CCACHE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 @@ -149,7 +149,7 @@ build-testing: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing" script: - *aptcache - - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc - - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev + - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc + - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev - *ccache - make --directory=src CCACHE=1 NONX86=1 \ No newline at end of file From a6038dd6f2a226cd439c3bfb750b4308caaeae92 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 13 Oct 2023 19:49:43 +0000 Subject: [PATCH 146/195] Update detect.mk Add support for GCC 13.2 --- src/Makefile.d/detect.mk | 215 ++++++++++++++++++++------------------- 1 file changed, 109 insertions(+), 106 deletions(-) diff --git a/src/Makefile.d/detect.mk b/src/Makefile.d/detect.mk index aca498721..4719d6593 100644 --- a/src/Makefile.d/detect.mk +++ b/src/Makefile.d/detect.mk @@ -1,106 +1,109 @@ -# -# Detect the host system and compiler version. -# - -# Previously featured:\ - PANDORA\ - HAIKU\ - DUMMY\ - DJGPPDOS\ - SOLARIS\ - MACOSX\ - -all_systems:=\ - LINUX64\ - MINGW64\ - MINGW\ - UNIX\ - LINUX\ - FREEBSD\ - -# check for user specified system -ifeq (,$(filter $(all_systems),$(.VARIABLES))) -ifeq ($(OS),Windows_NT) # all windows are Windows_NT... - -_m=Detected a Windows system,\ - compiling for 32-bit MinGW SDL...) -$(call Print,$(_m)) - -# go for a 32-bit sdl mingw exe by default -MINGW:=1 - -else # if you on the *nix - -system:=$(shell uname -s) - -ifeq ($(system),Linux) -new_system:=LINUX -else - -$(error \ - Could not automatically detect your system,\ - try specifying a system manually) - -endif - -ifeq ($(shell getconf LONG_BIT),64) -system+=64-bit -new_system:=$(new_system)64 -endif - -$(call Print,Detected $(system) ($(new_system))...) -$(new_system):=1 - -endif -endif - -# This must have high to low order. -gcc_versions:=\ - 102 101\ - 93 92 91\ - 84 83 82 81\ - 75 74 73 72 71\ - 64 63 62 61\ - 55 54 53 52 51\ - 49 48 47 46 45 44 43 42 41 40 - -latest_gcc_version:=10.2 - -# Automatically set version flag, but not if one was -# manually set. And don't bother if this is a clean only -# run. -ifeq (,$(call Wildvar,GCC% destructive)) - -# can't use $(CC) --version here since that uses argv[0] to display the name -# also gcc outputs the information to stderr, so I had to do 2>&1 -# this program really doesn't like identifying itself -version:=$(shell $(CC) -v 2>&1) - -# check if this is in fact GCC -ifneq (,$(findstring gcc version,$(version))) - -# in stark contrast to the name, gcc will give me a nicely formatted version number for free -version:=$(shell $(CC) -dumpfullversion) - -# Turn version into words of major, minor -v:=$(subst ., ,$(version)) -# concat. major minor -v:=$(word 1,$(v))$(word 2,$(v)) - -# If this version is not in the list, -# default to the latest supported -ifeq (,$(filter $(v),$(gcc_versions))) -define line = -Your compiler version, GCC $(version), \ -is not supported by the Makefile. -The Makefile will assume GCC $(latest_gcc_version). -endef -$(call Print,$(line)) -GCC$(subst .,,$(latest_gcc_version)):=1 -else -$(call Print,Detected GCC $(version) (GCC$(v))) -GCC$(v):=1 -endif - -endif -endif +# +# Detect the host system and compiler version. +# + +# Previously featured:\ + PANDORA\ + HAIKU\ + DUMMY\ + DJGPPDOS\ + SOLARIS\ + MACOSX\ + +all_systems:=\ + LINUX64\ + MINGW64\ + MINGW\ + UNIX\ + LINUX\ + FREEBSD\ + +# check for user specified system +ifeq (,$(filter $(all_systems),$(.VARIABLES))) +ifeq ($(OS),Windows_NT) # all windows are Windows_NT... + +_m=Detected a Windows system,\ + compiling for 32-bit MinGW SDL...) +$(call Print,$(_m)) + +# go for a 32-bit sdl mingw exe by default +MINGW:=1 + +else # if you on the *nix + +system:=$(shell uname -s) + +ifeq ($(system),Linux) +new_system:=LINUX +else + +$(error \ + Could not automatically detect your system,\ + try specifying a system manually) + +endif + +ifeq ($(shell getconf LONG_BIT),64) +system+=64-bit +new_system:=$(new_system)64 +endif + +$(call Print,Detected $(system) ($(new_system))...) +$(new_system):=1 + +endif +endif + +# This must have high to low order. +gcc_versions:=\ + 132 131\ + 123 122 121\ + 114 113 112 111\ + 105 104 103 102 101\ + 95 94 93 92 91\ + 85 84 83 82 81\ + 75 74 73 72 71\ + 64 63 62 61\ + 55 54 53 52 51\ + 49 48 47 46 45 44 43 42 41 40 + +latest_gcc_version:=13.2 + +# Automatically set version flag, but not if one was +# manually set. And don't bother if this is a clean only +# run. +ifeq (,$(call Wildvar,GCC% destructive)) + +# can't use $(CC) --version here since that uses argv[0] to display the name +# also gcc outputs the information to stderr, so I had to do 2>&1 +# this program really doesn't like identifying itself +version:=$(shell $(CC) -v 2>&1) + +# check if this is in fact GCC +ifneq (,$(findstring gcc version,$(version))) + +# in stark contrast to the name, gcc will give me a nicely formatted version number for free +version:=$(shell $(CC) -dumpfullversion) + +# Turn version into words of major, minor +v:=$(subst ., ,$(version)) +# concat. major minor +v:=$(word 1,$(v))$(word 2,$(v)) + +# If this version is not in the list, +# default to the latest supported +ifeq (,$(filter $(v),$(gcc_versions))) +define line = +Your compiler version, GCC $(version), \ +is not supported by the Makefile. +The Makefile will assume GCC $(latest_gcc_version). +endef +$(call Print,$(line)) +GCC$(subst .,,$(latest_gcc_version)):=1 +else +$(call Print,Detected GCC $(version) (GCC$(v))) +GCC$(v):=1 +endif + +endif +endif From fb299dd63e6f4cb0067538ee07807e13db118c8d Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 13 Oct 2023 20:09:00 +0000 Subject: [PATCH 147/195] Update .gitlab-ci.yml file Make the buildbot yell at us for warnings --- .gitlab-ci.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1efb639fb..ec1e7dc0a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -54,6 +54,7 @@ default: - dpkg --add-architecture arm64 - apt-get --quiet --quiet update - *aptcache + - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install apt-utils - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install make git ccache - *ccache - ccache --zero-stats || true @@ -79,7 +80,7 @@ build-i686-linux-gnu: - export OBJDUMP=i686-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig - *ccache - - make --directory=src CCACHE=1 LINUX=1 + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 build-aarch64-linux-gnu: <<: *job_build @@ -96,7 +97,7 @@ build-aarch64-linux-gnu: - export OBJDUMP=aarch64-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig - *ccache - - make --directory=src CCACHE=1 LINUX64=1 NONX86=1 + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 build-x86_64-linux-gnu: <<: *job_build @@ -113,7 +114,7 @@ build-x86_64-linux-gnu: - export OBJDUMP=x86_64-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig - *ccache - - make --directory=src CCACHE=1 LINUX64=1 + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 build-i686-w64-mingw32: <<: *job_build @@ -125,7 +126,7 @@ build-i686-w64-mingw32: - *aptcache - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-mingw-w64-i686-win32 - *ccache - - make --directory=src CCACHE=1 MINGW=1 PREFIX=i686-w64-mingw32 + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 build-x86_64-w64-mingw32: <<: *job_build @@ -137,7 +138,7 @@ build-x86_64-w64-mingw32: - *aptcache - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-mingw-w64-x86-64-win32 - *ccache - - make --directory=src CCACHE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 build-testing: <<: *job_build @@ -152,4 +153,4 @@ build-testing: - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev - *ccache - - make --directory=src CCACHE=1 NONX86=1 \ No newline at end of file + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 \ No newline at end of file From af020810bf0a1a500222a01e674c2a6a7fbe656f Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 13 Oct 2023 17:02:33 -0400 Subject: [PATCH 148/195] fix compiling for GCC 11+ --- src/Makefile.d/detect.mk | 4 ++-- src/p_map.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Makefile.d/detect.mk b/src/Makefile.d/detect.mk index 4719d6593..ab6268757 100644 --- a/src/Makefile.d/detect.mk +++ b/src/Makefile.d/detect.mk @@ -57,8 +57,8 @@ endif # This must have high to low order. gcc_versions:=\ 132 131\ - 123 122 121\ - 114 113 112 111\ + 123 122 121\ + 114 113 112 111\ 105 104 103 102 101\ 95 94 93 92 91\ 85 84 83 82 81\ diff --git a/src/p_map.c b/src/p_map.c index 80135db74..a9d2cf45d 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -3732,6 +3732,8 @@ void P_SlideMove(mobj_t *mo) vertex_t v1, v2; // fake vertexes line_t junk; // fake linedef + memset(&junk, 1, sizeof(junk)); + if (tmhitthing && mo->z + mo->height > tmhitthing->z && mo->z < tmhitthing->z + tmhitthing->height) { // Don't mess with your momentum if it's a pushable object. Pushables do their own crazy things already. From 796adec979834ca55ba2d2fa547fe8b4105800ce Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 13 Oct 2023 21:40:41 +0000 Subject: [PATCH 149/195] Update .gitlab-ci.yml file Retry building so we point out why it failed to compile --- .gitlab-ci.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ec1e7dc0a..4d59ef1a6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -37,6 +37,7 @@ default: CCACHE_MAXSIZE: "50M" GIT_STRATEGY: clone GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_PATH + ENV DEBIAN_FRONTEND: noninteractive cache: - key: ccache-$CI_PROJECT_PATH_SLUG-$CI_JOB_NAME_SLUG fallback_keys: @@ -80,7 +81,7 @@ build-i686-linux-gnu: - export OBJDUMP=i686-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig - *ccache - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 build-aarch64-linux-gnu: <<: *job_build @@ -97,7 +98,7 @@ build-aarch64-linux-gnu: - export OBJDUMP=aarch64-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig - *ccache - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 build-x86_64-linux-gnu: <<: *job_build @@ -114,7 +115,7 @@ build-x86_64-linux-gnu: - export OBJDUMP=x86_64-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig - *ccache - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 build-i686-w64-mingw32: <<: *job_build @@ -126,7 +127,7 @@ build-i686-w64-mingw32: - *aptcache - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-mingw-w64-i686-win32 - *ccache - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 build-x86_64-w64-mingw32: <<: *job_build @@ -138,7 +139,7 @@ build-x86_64-w64-mingw32: - *aptcache - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-mingw-w64-x86-64-win32 - *ccache - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 build-testing: <<: *job_build @@ -153,4 +154,4 @@ build-testing: - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev - *ccache - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 \ No newline at end of file + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 \ No newline at end of file From 96beee1d4d61c8b6cd1413db8a6e8c4b5f80acbf Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 13 Oct 2023 21:43:15 +0000 Subject: [PATCH 150/195] Update .gitlab-ci.yml file set DEBIAN_FRONTEND envvar in aptcache --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4d59ef1a6..347aeea94 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -27,6 +27,7 @@ stages: # List of stages for jobs, and their order of execution .aptcache_Scripts: &aptcache - export APT_CACHE_DIR=`pwd`/apt-cache - mkdir --parents --verbose $APT_CACHE_DIR/partial/ + - export DEBIAN_FRONTEND=noninteractive default: image: debian:stable-slim @@ -37,7 +38,6 @@ default: CCACHE_MAXSIZE: "50M" GIT_STRATEGY: clone GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_PATH - ENV DEBIAN_FRONTEND: noninteractive cache: - key: ccache-$CI_PROJECT_PATH_SLUG-$CI_JOB_NAME_SLUG fallback_keys: From 1bf78686e27fb61449ea652a9bdc70f9c0cb8754 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 13 Oct 2023 19:33:31 -0400 Subject: [PATCH 151/195] let not pass a point of a temp stack var around --- src/p_map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_map.c b/src/p_map.c index a9d2cf45d..2911e4d40 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -3730,7 +3730,7 @@ void P_SlideMove(mobj_t *mo) boolean papercol = false; vertex_t v1, v2; // fake vertexes - line_t junk; // fake linedef + static line_t junk; // fake linedef memset(&junk, 1, sizeof(junk)); From fc586b5c62bf34212b51dc245427f33c204e4607 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 13 Oct 2023 23:46:44 +0000 Subject: [PATCH 152/195] Update .gitlab-ci.yml file Build in the following order: testing, win32, amd64, i386, arm64 then win64 --- .gitlab-ci.yml | 90 +++++++++++++++++++++++++------------------------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 347aeea94..9f3229d5c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -66,6 +66,50 @@ default: - *ccache - ccache --show-stats +build-testing: + <<: *job_build + image: debian:testing-slim + allow_failure: true + artifacts: + paths: + - "bin/lsdl2srb2*" + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing" + script: + - *aptcache + - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc + - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev + - *ccache + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 + +build-i686-w64-mingw32: + <<: *job_build + artifacts: + paths: + - "bin/srb2win.exe*" + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" + script: + - *aptcache + - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-mingw-w64-i686-win32 + - *ccache + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 + +build-x86_64-linux-gnu: + <<: *job_build + artifacts: + paths: + - "bin/lsdl2srb2*" + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" + script: + - *aptcache + - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-x86-64-linux-gnu || apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc + - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 + - export CC=x86_64-linux-gnu-gcc + - export OBJCOPY=x86_64-linux-gnu-objcopy + - export OBJDUMP=x86_64-linux-gnu-objdump + - export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig + - *ccache + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 + build-i686-linux-gnu: <<: *job_build artifacts: @@ -100,35 +144,6 @@ build-aarch64-linux-gnu: - *ccache - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 -build-x86_64-linux-gnu: - <<: *job_build - artifacts: - paths: - - "bin/lsdl2srb2*" - name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" - script: - - *aptcache - - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-x86-64-linux-gnu || apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc - - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 - - export CC=x86_64-linux-gnu-gcc - - export OBJCOPY=x86_64-linux-gnu-objcopy - - export OBJDUMP=x86_64-linux-gnu-objdump - - export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig - - *ccache - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 - -build-i686-w64-mingw32: - <<: *job_build - artifacts: - paths: - - "bin/srb2win.exe*" - name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" - script: - - *aptcache - - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-mingw-w64-i686-win32 - - *ccache - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 - build-x86_64-w64-mingw32: <<: *job_build artifacts: @@ -139,19 +154,4 @@ build-x86_64-w64-mingw32: - *aptcache - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-mingw-w64-x86-64-win32 - *ccache - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 - -build-testing: - <<: *job_build - image: debian:testing-slim - allow_failure: true - artifacts: - paths: - - "bin/lsdl2srb2*" - name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing" - script: - - *aptcache - - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc - - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev - - *ccache - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 \ No newline at end of file + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 \ No newline at end of file From 8f00667abec65a57f3b2a5581b9bbf42536d2846 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 13 Oct 2023 20:10:34 -0400 Subject: [PATCH 153/195] Update src/Makefile.d/*.mk both Makefile and *.mk should be in the same EOL --- .gitattributes | 4 +- .gitlab-ci.yml | 4 +- src/Makefile.d/detect.mk | 218 ++++++++++++++++++------------------- src/Makefile.d/features.mk | 136 +++++++++++------------ 4 files changed, 182 insertions(+), 180 deletions(-) diff --git a/.gitattributes b/.gitattributes index 7751149ac..c2e507352 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,15 +1,17 @@ #Source code +/Makefile text=auto /src/*.c text=auto /src/*.h text=auto /src/*.s text=auto /src/*.m text=auto /src/*.xpm text=auto /src/Makefile text=auto +/tools/Makefile text=auto /src/Make*.cfg text=auto /src/CMakeLists.txt text=auto +*.mk -whitespace text=auto # Windows EOL *.cs -crlf -whitespace -*.mk -crlf -whitespace *.bat -crlf -whitespace *.dev -crlf -whitespace *.dsp -crlf -whitespace diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9f3229d5c..7ea13db6a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -33,7 +33,7 @@ default: image: debian:stable-slim .job_template: &job_build # This job runs in the build stage, which runs first. - stage: build + stage: build variables: CCACHE_MAXSIZE: "50M" GIT_STRATEGY: clone @@ -154,4 +154,4 @@ build-x86_64-w64-mingw32: - *aptcache - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-mingw-w64-x86-64-win32 - *ccache - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 \ No newline at end of file + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 diff --git a/src/Makefile.d/detect.mk b/src/Makefile.d/detect.mk index ab6268757..0cd618c69 100644 --- a/src/Makefile.d/detect.mk +++ b/src/Makefile.d/detect.mk @@ -1,109 +1,109 @@ -# -# Detect the host system and compiler version. -# - -# Previously featured:\ - PANDORA\ - HAIKU\ - DUMMY\ - DJGPPDOS\ - SOLARIS\ - MACOSX\ - -all_systems:=\ - LINUX64\ - MINGW64\ - MINGW\ - UNIX\ - LINUX\ - FREEBSD\ - -# check for user specified system -ifeq (,$(filter $(all_systems),$(.VARIABLES))) -ifeq ($(OS),Windows_NT) # all windows are Windows_NT... - -_m=Detected a Windows system,\ - compiling for 32-bit MinGW SDL...) -$(call Print,$(_m)) - -# go for a 32-bit sdl mingw exe by default -MINGW:=1 - -else # if you on the *nix - -system:=$(shell uname -s) - -ifeq ($(system),Linux) -new_system:=LINUX -else - -$(error \ - Could not automatically detect your system,\ - try specifying a system manually) - -endif - -ifeq ($(shell getconf LONG_BIT),64) -system+=64-bit -new_system:=$(new_system)64 -endif - -$(call Print,Detected $(system) ($(new_system))...) -$(new_system):=1 - -endif -endif - -# This must have high to low order. -gcc_versions:=\ - 132 131\ - 123 122 121\ - 114 113 112 111\ - 105 104 103 102 101\ - 95 94 93 92 91\ - 85 84 83 82 81\ - 75 74 73 72 71\ - 64 63 62 61\ - 55 54 53 52 51\ - 49 48 47 46 45 44 43 42 41 40 - -latest_gcc_version:=13.2 - -# Automatically set version flag, but not if one was -# manually set. And don't bother if this is a clean only -# run. -ifeq (,$(call Wildvar,GCC% destructive)) - -# can't use $(CC) --version here since that uses argv[0] to display the name -# also gcc outputs the information to stderr, so I had to do 2>&1 -# this program really doesn't like identifying itself -version:=$(shell $(CC) -v 2>&1) - -# check if this is in fact GCC -ifneq (,$(findstring gcc version,$(version))) - -# in stark contrast to the name, gcc will give me a nicely formatted version number for free -version:=$(shell $(CC) -dumpfullversion) - -# Turn version into words of major, minor -v:=$(subst ., ,$(version)) -# concat. major minor -v:=$(word 1,$(v))$(word 2,$(v)) - -# If this version is not in the list, -# default to the latest supported -ifeq (,$(filter $(v),$(gcc_versions))) -define line = -Your compiler version, GCC $(version), \ -is not supported by the Makefile. -The Makefile will assume GCC $(latest_gcc_version). -endef -$(call Print,$(line)) -GCC$(subst .,,$(latest_gcc_version)):=1 -else -$(call Print,Detected GCC $(version) (GCC$(v))) -GCC$(v):=1 -endif - -endif -endif +# +# Detect the host system and compiler version. +# + +# Previously featured:\ + PANDORA\ + HAIKU\ + DUMMY\ + DJGPPDOS\ + SOLARIS\ + MACOSX\ + +all_systems:=\ + LINUX64\ + MINGW64\ + MINGW\ + UNIX\ + LINUX\ + FREEBSD\ + +# check for user specified system +ifeq (,$(filter $(all_systems),$(.VARIABLES))) +ifeq ($(OS),Windows_NT) # all windows are Windows_NT... + +_m=Detected a Windows system,\ + compiling for 32-bit MinGW SDL...) +$(call Print,$(_m)) + +# go for a 32-bit sdl mingw exe by default +MINGW:=1 + +else # if you on the *nix + +system:=$(shell uname -s) + +ifeq ($(system),Linux) +new_system:=LINUX +else + +$(error \ + Could not automatically detect your system,\ + try specifying a system manually) + +endif + +ifeq ($(shell getconf LONG_BIT),64) +system+=64-bit +new_system:=$(new_system)64 +endif + +$(call Print,Detected $(system) ($(new_system))...) +$(new_system):=1 + +endif +endif + +# This must have high to low order. +gcc_versions:=\ + 132 131\ + 123 122 121\ + 114 113 112 111\ + 105 104 103 102 101\ + 95 94 93 92 91\ + 85 84 83 82 81\ + 75 74 73 72 71\ + 64 63 62 61\ + 55 54 53 52 51\ + 49 48 47 46 45 44 43 42 41 40 + +latest_gcc_version:=13.2 + +# Automatically set version flag, but not if one was +# manually set. And don't bother if this is a clean only +# run. +ifeq (,$(call Wildvar,GCC% destructive)) + +# can't use $(CC) --version here since that uses argv[0] to display the name +# also gcc outputs the information to stderr, so I had to do 2>&1 +# this program really doesn't like identifying itself +version:=$(shell $(CC) -v 2>&1) + +# check if this is in fact GCC +ifneq (,$(findstring gcc version,$(version))) + +# in stark contrast to the name, gcc will give me a nicely formatted version number for free +version:=$(shell $(CC) -dumpfullversion) + +# Turn version into words of major, minor +v:=$(subst ., ,$(version)) +# concat. major minor +v:=$(word 1,$(v))$(word 2,$(v)) + +# If this version is not in the list, +# default to the latest supported +ifeq (,$(filter $(v),$(gcc_versions))) +define line = +Your compiler version, GCC $(version), \ +is not supported by the Makefile. +The Makefile will assume GCC $(latest_gcc_version). +endef +$(call Print,$(line)) +GCC$(subst .,,$(latest_gcc_version)):=1 +else +$(call Print,Detected GCC $(version) (GCC$(v))) +GCC$(v):=1 +endif + +endif +endif diff --git a/src/Makefile.d/features.mk b/src/Makefile.d/features.mk index 1787f94cb..653100cb5 100644 --- a/src/Makefile.d/features.mk +++ b/src/Makefile.d/features.mk @@ -1,68 +1,68 @@ -# -# Makefile for feature flags. -# - -passthru_opts+=\ - NONET NO_IPV6 NOHW NOMD5 NOPOSTPROCESSING\ - MOBJCONSISTANCY PACKETDROP ZDEBUG\ - HAVE_MINIUPNPC\ - -# build with debugging information -ifdef DEBUGMODE -PACKETDROP=1 -opts+=-DPARANOIA -DRANGECHECK -endif - -ifndef NOHW -opts+=-DHWRENDER -sources+=$(call List,hardware/Sourcefile) -endif - -ifndef NOMD5 -sources+=md5.c -endif - -ifndef NOZLIB -ifndef NOPNG -ifdef PNG_PKGCONFIG -$(eval $(call Use_pkg_config,PNG_PKGCONFIG)) -else -PNG_CONFIG?=$(call Prefix,libpng-config) -$(eval $(call Configure,PNG,$(PNG_CONFIG) \ - $(if $(PNG_STATIC),--static),,--ldflags)) -endif -ifdef LINUX -opts+=-D_LARGEFILE64_SOURCE -endif -opts+=-DHAVE_PNG -sources+=apng.c -endif -endif - -ifndef NONET -ifndef NOCURL -CURLCONFIG?=curl-config -$(eval $(call Configure,CURL,$(CURLCONFIG))) -opts+=-DHAVE_CURL -endif -endif - -ifdef HAVE_MINIUPNPC -libs+=-lminiupnpc -endif - -# (Valgrind is a memory debugger.) -ifdef VALGRIND -VALGRIND_PKGCONFIG?=valgrind -$(eval $(call Use_pkg_config,VALGRIND)) -ZDEBUG=1 -opts+=-DHAVE_VALGRIND -endif - -default_packages:=\ - GME/libgme/LIBGME\ - OPENMPT/libopenmpt/LIBOPENMPT\ - ZLIB/zlib\ - -$(foreach p,$(default_packages),\ - $(eval $(call Check_pkg_config,$(p)))) +# +# Makefile for feature flags. +# + +passthru_opts+=\ + NONET NO_IPV6 NOHW NOMD5 NOPOSTPROCESSING\ + MOBJCONSISTANCY PACKETDROP ZDEBUG\ + HAVE_MINIUPNPC\ + +# build with debugging information +ifdef DEBUGMODE +PACKETDROP=1 +opts+=-DPARANOIA -DRANGECHECK +endif + +ifndef NOHW +opts+=-DHWRENDER +sources+=$(call List,hardware/Sourcefile) +endif + +ifndef NOMD5 +sources+=md5.c +endif + +ifndef NOZLIB +ifndef NOPNG +ifdef PNG_PKGCONFIG +$(eval $(call Use_pkg_config,PNG_PKGCONFIG)) +else +PNG_CONFIG?=$(call Prefix,libpng-config) +$(eval $(call Configure,PNG,$(PNG_CONFIG) \ + $(if $(PNG_STATIC),--static),,--ldflags)) +endif +ifdef LINUX +opts+=-D_LARGEFILE64_SOURCE +endif +opts+=-DHAVE_PNG +sources+=apng.c +endif +endif + +ifndef NONET +ifndef NOCURL +CURLCONFIG?=curl-config +$(eval $(call Configure,CURL,$(CURLCONFIG))) +opts+=-DHAVE_CURL +endif +endif + +ifdef HAVE_MINIUPNPC +libs+=-lminiupnpc +endif + +# (Valgrind is a memory debugger.) +ifdef VALGRIND +VALGRIND_PKGCONFIG?=valgrind +$(eval $(call Use_pkg_config,VALGRIND)) +ZDEBUG=1 +opts+=-DHAVE_VALGRIND +endif + +default_packages:=\ + GME/libgme/LIBGME\ + OPENMPT/libopenmpt/LIBOPENMPT\ + ZLIB/zlib\ + +$(foreach p,$(default_packages),\ + $(eval $(call Check_pkg_config,$(p)))) From d3d3ee54519660a74de6161cb0c90140b9ec1642 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 14 Oct 2023 01:37:05 +0000 Subject: [PATCH 154/195] Update .gitlab-ci.yml file Try to keep a stats log of ccache --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7ea13db6a..b0f82607c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,6 +23,7 @@ stages: # List of stages for jobs, and their order of execution - export CCACHE_BASEDIR="$PWD" - export CCACHE_DIR="$PWD/ccache" - export CCACHE_COMPILERCHECK=content + - export CCACHE_STATSLOG=CCACHE_DIR="$PWD/ccache_statslog" .aptcache_Scripts: &aptcache - export APT_CACHE_DIR=`pwd`/apt-cache @@ -35,7 +36,7 @@ default: .job_template: &job_build # This job runs in the build stage, which runs first. stage: build variables: - CCACHE_MAXSIZE: "50M" + CCACHE_MAXSIZE: 50M GIT_STRATEGY: clone GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_PATH cache: @@ -65,6 +66,7 @@ default: - apt-get --quiet --quiet --option dir::cache::archives="$APT_CACHE_DIR" autoclean - *ccache - ccache --show-stats + - ccache --show-log-stats || true build-testing: <<: *job_build From 2fe5755f531f13c9689aac1ba727aa842bdfba1f Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 14 Oct 2023 01:44:23 +0000 Subject: [PATCH 155/195] Update .gitlab-ci.yml file Fix CCACHE_STATSLOG? --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b0f82607c..ccf190781 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,7 +23,8 @@ stages: # List of stages for jobs, and their order of execution - export CCACHE_BASEDIR="$PWD" - export CCACHE_DIR="$PWD/ccache" - export CCACHE_COMPILERCHECK=content - - export CCACHE_STATSLOG=CCACHE_DIR="$PWD/ccache_statslog" + - export CCACHE_STATS=true + - export CCACHE_STATSLOG="$PWD/ccache_statslog" .aptcache_Scripts: &aptcache - export APT_CACHE_DIR=`pwd`/apt-cache From 98fd34e76c843f248de13a898b1912cdce20a95b Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 14 Oct 2023 02:11:52 +0000 Subject: [PATCH 156/195] Update .gitlab-ci.yml file save ccache_statslog between runs? --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ccf190781..82c851601 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,6 +47,7 @@ default: - cache-$CI_PROJECT_PATH_SLUG-default paths: - ccache + - ccache_statslog - key: apt-$CI_JOB_IMAGE paths: - apt-cache From 8533955da808295bfa0825ec8d932e0225f2f944 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 13 Oct 2023 22:50:19 -0400 Subject: [PATCH 157/195] Update src/p_map.c it seems line_t have pointers, clear all of it --- src/p_map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_map.c b/src/p_map.c index 2911e4d40..251837876 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -3732,7 +3732,7 @@ void P_SlideMove(mobj_t *mo) vertex_t v1, v2; // fake vertexes static line_t junk; // fake linedef - memset(&junk, 1, sizeof(junk)); + memset(&junk, 0x00, sizeof(junk)); if (tmhitthing && mo->z + mo->height > tmhitthing->z && mo->z < tmhitthing->z + tmhitthing->height) { From b469064e40290850c8e660e30f8f33697cfc6d85 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 14 Oct 2023 03:11:56 +0000 Subject: [PATCH 158/195] Update .gitlab-ci.yml file remove double space --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 82c851601..4eb4b48f4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -139,7 +139,7 @@ build-aarch64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-aarch64" script: - *aptcache - - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-aarch64-linux-gnu || apt-get --no-install-recommend --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc + - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-aarch64-linux-gnu || apt-get --no-install-recommend --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 - export CC=aarch64-linux-gnu-gcc - export OBJCOPY=aarch64-linux-gnu-objcopy From d659ce563ccbd239abbf38a1598538f3b184c4cc Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 14 Oct 2023 11:40:25 +0000 Subject: [PATCH 159/195] Update .gitlab-ci.yml file Set common apt settings to /etc/apt/apt.conf.d/99build --- .gitlab-ci.yml | 55 +++++++++++++++++++------------------------------- 1 file changed, 21 insertions(+), 34 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4eb4b48f4..754da90a1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,21 +1,3 @@ -# This file is a template, and might need editing before it works on your project. -# This is a sample GitLab CI/CD configuration file that should run without any modifications. -# It demonstrates a basic 3 stage CI/CD pipeline. Instead of real tests or scripts, -# it uses echo commands to simulate the pipeline execution. -# -# A pipeline is composed of independent jobs that run scripts, grouped into stages. -# Stages run in sequential order, but jobs within stages run in parallel. -# -# For more information, see: https://docs.gitlab.com/ee/ci/yaml/index.html#stages -# -# You can copy and paste this template into a new `.gitlab-ci.yml` file. -# You should not add this template to an existing `.gitlab-ci.yml` file by using the `include:` keyword. -# -# To contribute improvements to CI/CD templates, please follow the Development guide at: -# https://docs.gitlab.com/ee/development/cicd/templates.html -# This specific template is located at: -# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Getting-Started.gitlab-ci.yml - stages: # List of stages for jobs, and their order of execution - build @@ -23,12 +5,10 @@ stages: # List of stages for jobs, and their order of execution - export CCACHE_BASEDIR="$PWD" - export CCACHE_DIR="$PWD/ccache" - export CCACHE_COMPILERCHECK=content - - export CCACHE_STATS=true - export CCACHE_STATSLOG="$PWD/ccache_statslog" .aptcache_Scripts: &aptcache - export APT_CACHE_DIR=`pwd`/apt-cache - - mkdir --parents --verbose $APT_CACHE_DIR/partial/ - export DEBIAN_FRONTEND=noninteractive default: @@ -56,16 +36,23 @@ default: - dpkg --add-architecture i386 - dpkg --add-architecture amd64 - dpkg --add-architecture arm64 - - apt-get --quiet --quiet update - *aptcache - - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install apt-utils - - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install make git ccache + - touch /etc/apt/apt.conf.d/99build + - echo Adding options to apt.conf':' + - echo APT::Install-Recommends "false"\; | tee --append /etc/apt/apt.conf.d/99build + - echo quiet "2"\; | tee --append /etc/apt/apt.conf.d/99build + - echo APT::Get::Assume-Yes "true"\; | tee --append /etc/apt/apt.conf.d/99build + - echo Dir::Cache::Archives "$APT_CACHE_DIR"\; | tee --append /etc/apt/apt.conf.d/99build + - apt-get update + - mkdir --parents --verbose $APT_CACHE_DIR/partial/ + - apt-get install apt-utils + - apt-get install make git ccache - *ccache - ccache --zero-stats || true - ccache --show-stats || true after_script: - *aptcache - - apt-get --quiet --quiet --option dir::cache::archives="$APT_CACHE_DIR" autoclean + - apt-get autoclean - *ccache - ccache --show-stats - ccache --show-log-stats || true @@ -80,8 +67,8 @@ build-testing: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing" script: - *aptcache - - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc - - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev + - apt-get install gcc + - apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev - *ccache - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 @@ -93,7 +80,7 @@ build-i686-w64-mingw32: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" script: - *aptcache - - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-mingw-w64-i686-win32 + - apt-get install gcc-mingw-w64-i686-win32 - *ccache - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 @@ -105,8 +92,8 @@ build-x86_64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" script: - *aptcache - - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-x86-64-linux-gnu || apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc - - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 + - apt-get install gcc-x86-64-linux-gnu || apt-get gcc + - apt-get libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 - export CC=x86_64-linux-gnu-gcc - export OBJCOPY=x86_64-linux-gnu-objcopy - export OBJDUMP=x86_64-linux-gnu-objdump @@ -122,8 +109,8 @@ build-i686-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686" script: - *aptcache - - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-i686-linux-gnu || apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc - - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 + - apt-get gcc-i686-linux-gnu || apt-get install gcc + - apt-get install libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 - export CC=i686-linux-gnu-gcc - export OBJCOPY=i686-linux-gnu-objcopy - export OBJDUMP=i686-linux-gnu-objdump @@ -139,8 +126,8 @@ build-aarch64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-aarch64" script: - *aptcache - - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-aarch64-linux-gnu || apt-get --no-install-recommend --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc - - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 + - apt-get install gcc-aarch64-linux-gnu || apt-get install gcc + - apt-get install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 - export CC=aarch64-linux-gnu-gcc - export OBJCOPY=aarch64-linux-gnu-objcopy - export OBJDUMP=aarch64-linux-gnu-objdump @@ -156,6 +143,6 @@ build-x86_64-w64-mingw32: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64" script: - *aptcache - - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-mingw-w64-x86-64-win32 + - apt-get install gcc-mingw-w64-x86-64-win32 - *ccache - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 From 52e4ed33af2bbdc8328c41d2885b7bd382fdb88b Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 14 Oct 2023 11:54:16 +0000 Subject: [PATCH 160/195] Update .gitlab-ci.yml file Fix install command for GCC in build jobs --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 754da90a1..e10ad1bd5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -92,8 +92,8 @@ build-x86_64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" script: - *aptcache - - apt-get install gcc-x86-64-linux-gnu || apt-get gcc - - apt-get libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 + - apt-get install gcc-x86-64-linux-gnu || apt-get install gcc + - apt-get install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 - export CC=x86_64-linux-gnu-gcc - export OBJCOPY=x86_64-linux-gnu-objcopy - export OBJDUMP=x86_64-linux-gnu-objdump @@ -109,7 +109,7 @@ build-i686-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686" script: - *aptcache - - apt-get gcc-i686-linux-gnu || apt-get install gcc + - apt-get install gcc-i686-linux-gnu || apt-get install gcc - apt-get install libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 - export CC=i686-linux-gnu-gcc - export OBJCOPY=i686-linux-gnu-objcopy From 806c8f259cb8cbec347ef5f1c4e59d138131e559 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 14 Oct 2023 08:23:03 -0400 Subject: [PATCH 161/195] Update src/Makefile.d/detect.mk Support Mingw64 toolchain versions --- src/Makefile.d/detect.mk | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/src/Makefile.d/detect.mk b/src/Makefile.d/detect.mk index 0cd618c69..9e2736946 100644 --- a/src/Makefile.d/detect.mk +++ b/src/Makefile.d/detect.mk @@ -56,15 +56,15 @@ endif # This must have high to low order. gcc_versions:=\ - 132 131\ - 123 122 121\ - 114 113 112 111\ - 105 104 103 102 101\ - 95 94 93 92 91\ - 85 84 83 82 81\ - 75 74 73 72 71\ - 64 63 62 61\ - 55 54 53 52 51\ + 132 131 130\ + 123 122 121 120\ + 114 113 112 111 110\ + 105 104 103 102 101 100\ + 95 94 93 92 91 90\ + 85 84 83 82 81 80\ + 75 74 73 72 71 70\ + 64 63 62 61 60\ + 55 54 53 52 51 50\ 49 48 47 46 45 44 43 42 41 40 latest_gcc_version:=13.2 @@ -77,13 +77,18 @@ ifeq (,$(call Wildvar,GCC% destructive)) # can't use $(CC) --version here since that uses argv[0] to display the name # also gcc outputs the information to stderr, so I had to do 2>&1 # this program really doesn't like identifying itself -version:=$(shell $(CC) -v 2>&1) +shellversion:=$(shell $(CC) -v 2>&1) +# Try to remove "-win32" +version:=$(subst -win32,.0,$(shellversion)) # check if this is in fact GCC ifneq (,$(findstring gcc version,$(version))) # in stark contrast to the name, gcc will give me a nicely formatted version number for free -version:=$(shell $(CC) -dumpfullversion) +shellversion:=$(shell $(CC) -dumpfullversion) + +# Try to remove "-win32" +version:=$(subst -win32,.0,$(shellversion)) # Turn version into words of major, minor v:=$(subst ., ,$(version)) From ff3993257a46bc1f913a28015015b9d62dc94904 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 14 Oct 2023 13:01:32 +0000 Subject: [PATCH 162/195] Update .gitlab-ci.yml file place sections around "apt-get install" and "make" commands --- .gitlab-ci.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e10ad1bd5..c35824c8c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,8 +45,12 @@ default: - echo Dir::Cache::Archives "$APT_CACHE_DIR"\; | tee --append /etc/apt/apt.conf.d/99build - apt-get update - mkdir --parents --verbose $APT_CACHE_DIR/partial/ + - echo -e "\e[0Ksection_start:`date +%s`:apt_pre[collapsed=true]\r\e[0Kinstalling pre packages" - apt-get install apt-utils + - echo -e "\e[0Ksection_end:`date +%s`:apt_pre\r\e[0K" + - echo -e "\e[0Ksection_start:`date +%s`:apt_common[collapsed=true]\r\e[0Kinstalling common packages " - apt-get install make git ccache + - echo -e "\e[0Ksection_end:`date +%s`:apt_common\r\e[0K" - *ccache - ccache --zero-stats || true - ccache --show-stats || true @@ -67,10 +71,16 @@ build-testing: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing" script: - *aptcache + - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" - apt-get install gcc + - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" - apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev + - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - *ccache + - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 + - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-i686-w64-mingw32: <<: *job_build @@ -80,9 +90,13 @@ build-i686-w64-mingw32: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" script: - *aptcache + - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages - apt-get install gcc-mingw-w64-i686-win32 + - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - *ccache + - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 + - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-x86_64-linux-gnu: <<: *job_build @@ -92,14 +106,20 @@ build-x86_64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" script: - *aptcache + - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages - apt-get install gcc-x86-64-linux-gnu || apt-get install gcc + - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" - apt-get install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 + - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - export CC=x86_64-linux-gnu-gcc - export OBJCOPY=x86_64-linux-gnu-objcopy - export OBJDUMP=x86_64-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig - *ccache + - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 + - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-i686-linux-gnu: <<: *job_build @@ -109,14 +129,20 @@ build-i686-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686" script: - *aptcache + - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages - apt-get install gcc-i686-linux-gnu || apt-get install gcc + - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" - apt-get install libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 + - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - export CC=i686-linux-gnu-gcc - export OBJCOPY=i686-linux-gnu-objcopy - export OBJDUMP=i686-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig - *ccache + - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 + - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-aarch64-linux-gnu: <<: *job_build @@ -126,14 +152,20 @@ build-aarch64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-aarch64" script: - *aptcache + - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages - apt-get install gcc-aarch64-linux-gnu || apt-get install gcc + - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" - apt-get install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 + - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - export CC=aarch64-linux-gnu-gcc - export OBJCOPY=aarch64-linux-gnu-objcopy - export OBJDUMP=aarch64-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig - *ccache + - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 + - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-x86_64-w64-mingw32: <<: *job_build @@ -143,6 +175,10 @@ build-x86_64-w64-mingw32: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64" script: - *aptcache + - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages - apt-get install gcc-mingw-w64-x86-64-win32 + - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - *ccache + - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 + - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" From 1a0fad75f9014bd1b169ad0429c68f0eeca97d77 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 14 Oct 2023 13:09:59 +0000 Subject: [PATCH 163/195] Update .gitlab-ci.yml file fixup EOL on section commands --- .gitlab-ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c35824c8c..e65a6f41e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -90,7 +90,7 @@ build-i686-w64-mingw32: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" script: - *aptcache - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages + - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" - apt-get install gcc-mingw-w64-i686-win32 - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - *ccache @@ -106,7 +106,7 @@ build-x86_64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" script: - *aptcache - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages + - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" - apt-get install gcc-x86-64-linux-gnu || apt-get install gcc - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" @@ -129,7 +129,7 @@ build-i686-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686" script: - *aptcache - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages + - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" - apt-get install gcc-i686-linux-gnu || apt-get install gcc - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" @@ -152,7 +152,7 @@ build-aarch64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-aarch64" script: - *aptcache - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages + - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" - apt-get install gcc-aarch64-linux-gnu || apt-get install gcc - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" @@ -175,7 +175,7 @@ build-x86_64-w64-mingw32: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64" script: - *aptcache - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages + - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" - apt-get install gcc-mingw-w64-x86-64-win32 - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - *ccache From c17c5327a8ba7247aef0f93446ac766d91d2ceff Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 14 Oct 2023 13:11:49 +0000 Subject: [PATCH 164/195] Update .gitlab-ci.yml file remove extra space --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e65a6f41e..203f44fdb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -48,7 +48,7 @@ default: - echo -e "\e[0Ksection_start:`date +%s`:apt_pre[collapsed=true]\r\e[0Kinstalling pre packages" - apt-get install apt-utils - echo -e "\e[0Ksection_end:`date +%s`:apt_pre\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:apt_common[collapsed=true]\r\e[0Kinstalling common packages " + - echo -e "\e[0Ksection_start:`date +%s`:apt_common[collapsed=true]\r\e[0Kinstalling common packages" - apt-get install make git ccache - echo -e "\e[0Ksection_end:`date +%s`:apt_common\r\e[0K" - *ccache From 1886b9f9458e503eb05436b549501186822daa2e Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 14 Oct 2023 14:18:23 +0000 Subject: [PATCH 165/195] Update .gitlab-ci.yml file Add more sections to the build log --- .gitlab-ci.yml | 178 ++++++++++++++++++++++++++----------------------- 1 file changed, 95 insertions(+), 83 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 203f44fdb..333ab25ba 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,15 +1,9 @@ stages: # List of stages for jobs, and their order of execution - build -.ccache_Scripts: &ccache - - export CCACHE_BASEDIR="$PWD" - - export CCACHE_DIR="$PWD/ccache" - - export CCACHE_COMPILERCHECK=content - - export CCACHE_STATSLOG="$PWD/ccache_statslog" - .aptcache_Scripts: &aptcache - - export APT_CACHE_DIR=`pwd`/apt-cache - - export DEBIAN_FRONTEND=noninteractive + export APT_CACHE_DIR=`pwd`/apt-cache; + export DEBIAN_FRONTEND=noninteractive; default: image: debian:stable-slim @@ -17,7 +11,6 @@ default: .job_template: &job_build # This job runs in the build stage, which runs first. stage: build variables: - CCACHE_MAXSIZE: 50M GIT_STRATEGY: clone GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_PATH cache: @@ -33,31 +26,56 @@ default: - apt-cache unprotect: true before_script: - - dpkg --add-architecture i386 - - dpkg --add-architecture amd64 - - dpkg --add-architecture arm64 - - *aptcache - - touch /etc/apt/apt.conf.d/99build - - echo Adding options to apt.conf':' - - echo APT::Install-Recommends "false"\; | tee --append /etc/apt/apt.conf.d/99build - - echo quiet "2"\; | tee --append /etc/apt/apt.conf.d/99build - - echo APT::Get::Assume-Yes "true"\; | tee --append /etc/apt/apt.conf.d/99build - - echo Dir::Cache::Archives "$APT_CACHE_DIR"\; | tee --append /etc/apt/apt.conf.d/99build - - apt-get update - - mkdir --parents --verbose $APT_CACHE_DIR/partial/ - - echo -e "\e[0Ksection_start:`date +%s`:apt_pre[collapsed=true]\r\e[0Kinstalling pre packages" - - apt-get install apt-utils - - echo -e "\e[0Ksection_end:`date +%s`:apt_pre\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:apt_common[collapsed=true]\r\e[0Kinstalling common packages" - - apt-get install make git ccache - - echo -e "\e[0Ksection_end:`date +%s`:apt_common\r\e[0K" - - *ccache + - - echo -e "\e[0Ksection_start:`date +%s`:dpkg_aa[collapsed=true]\r\e[0KAdding architectures to dpkg" + - dpkg --add-architecture i386 + - dpkg --add-architecture amd64 + - dpkg --add-architecture arm64 + - echo -e "\e[0Ksection_end:`date +%s`:dpkg_aa\r\e[0K" + + - - echo -e "\e[0Ksection_start:`date +%s`:ac_pre[collapsed=true]\r\e[0KSetting up APT cache" + - *aptcache + - echo -e "\e[0Ksection_end:`date +%s`:ac_pre\r\e[0K" + + - - echo -e "\e[0Ksection_start:`date +%s`:apt_conf[collapsed=true]\r\e[0KSetting up APT conf" + - touch /etc/apt/apt.conf.d/99build + - echo Adding options to apt.conf':' + - echo APT::Install-Recommends "false"\; | tee --append /etc/apt/apt.conf.d/99build + - echo quiet "1"\; | tee --append /etc/apt/apt.conf.d/99build + - echo APT::Get::Assume-Yes "true"\; | tee --append /etc/apt/apt.conf.d/99build + - echo Dir::Cache::Archives "$APT_CACHE_DIR"\; | tee --append /etc/apt/apt.conf.d/99build + - echo -e "\e[0Ksection_end:`date +%s`:apt_conf\r\e[0K" + + - - echo -e "\e[0Ksection_start:`date +%s`:apt_update[collapsed=true]\r\e[0KUpdating APT listing" + - apt-get update + - echo -e "\e[0Ksection_end:`date +%s`:apt_update\r\e[0K" + + - - echo -e "\e[0Ksection_start:`date +%s`:apt_cache[collapsed=true]\r\e[0KMaking APT cache directory" + - mkdir --parents --verbose $APT_CACHE_DIR/partial/ + - echo -e "\e[0Ksection_end:`date +%s`:apt_cache\r\e[0K" + + - - echo -e "\e[0Ksection_start:`date +%s`:apt_pre[collapsed=true]\r\e[0KInstalling pre packages" + - apt-get install apt-utils + - echo -e "\e[0Ksection_end:`date +%s`:apt_pre\r\e[0K" + + - - echo -e "\e[0Ksection_start:`date +%s`:apt_common[collapsed=true]\r\e[0KInstalling common packages" + - apt-get install make git ccache + - echo -e "\e[0Ksection_end:`date +%s`:apt_common\r\e[0K" + + - - echo -e "\e[0Ksection_start:`date +%s`:ccache_config[collapsed=true]\r\e[0KSetting up ccache config" + - echo Adding ccache configution option + - touch ~/.ccache/ccache.conf + - echo base_dir = "$PWD" | tee ~/.ccache/ccache.conf + - echo cache_dir = "$PWD/ccache" | tee ~/.ccache/ccache.conf + - echo compiler_check = content | tee ~/.ccache/ccache.conf + - echo stats_log = "$PWD/ccache_statslog" | tee ~/.ccache/ccache.conf + - echo max_size = 50M | tee ~/.ccache/ccache.conf + - echo -e "\e[0Ksection_end:`date +%s`:ccache_config\r\e[0K" + - ccache --zero-stats || true - ccache --show-stats || true after_script: - *aptcache - apt-get autoclean - - *ccache - ccache --show-stats - ccache --show-log-stats || true @@ -71,16 +89,15 @@ build-testing: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing" script: - *aptcache - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" - - apt-get install gcc - - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" - - apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev - - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - *ccache - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 - - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" + - apt-get install gcc + - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" + - apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev + - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 + - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-i686-w64-mingw32: <<: *job_build @@ -90,13 +107,12 @@ build-i686-w64-mingw32: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" script: - *aptcache - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" - - apt-get install gcc-mingw-w64-i686-win32 - - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - *ccache - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 - - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" + - apt-get install gcc-mingw-w64-i686-win32 + - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 + - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-x86_64-linux-gnu: <<: *job_build @@ -106,20 +122,19 @@ build-x86_64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" script: - *aptcache - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" - - apt-get install gcc-x86-64-linux-gnu || apt-get install gcc - - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" - - apt-get install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 - - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" + - apt-get install gcc-x86-64-linux-gnu || apt-get install gcc + - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" + - apt-get install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 + - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - export CC=x86_64-linux-gnu-gcc - export OBJCOPY=x86_64-linux-gnu-objcopy - export OBJDUMP=x86_64-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig - - *ccache - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 - - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 + - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-i686-linux-gnu: <<: *job_build @@ -129,20 +144,19 @@ build-i686-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686" script: - *aptcache - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" - - apt-get install gcc-i686-linux-gnu || apt-get install gcc - - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" - - apt-get install libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 - - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" + - apt-get install gcc-i686-linux-gnu || apt-get install gcc + - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" + - apt-get install libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 + - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - export CC=i686-linux-gnu-gcc - export OBJCOPY=i686-linux-gnu-objcopy - export OBJDUMP=i686-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig - - *ccache - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 - - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 + - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-aarch64-linux-gnu: <<: *job_build @@ -152,20 +166,19 @@ build-aarch64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-aarch64" script: - *aptcache - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" - - apt-get install gcc-aarch64-linux-gnu || apt-get install gcc - - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" - - apt-get install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 - - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" + - apt-get install gcc-aarch64-linux-gnu || apt-get install gcc + - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" + - apt-get install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 + - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - export CC=aarch64-linux-gnu-gcc - export OBJCOPY=aarch64-linux-gnu-objcopy - export OBJDUMP=aarch64-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig - - *ccache - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 - - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 + - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-x86_64-w64-mingw32: <<: *job_build @@ -175,10 +188,9 @@ build-x86_64-w64-mingw32: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64" script: - *aptcache - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" - - apt-get install gcc-mingw-w64-x86-64-win32 - - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - *ccache - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 - - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" + - apt-get install gcc-mingw-w64-x86-64-win32 + - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 + - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" From 2e4d5b6fa9d31b761546ef56c575cff435521eb3 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 14 Oct 2023 14:29:57 +0000 Subject: [PATCH 166/195] Update .gitlab-ci.yml file mkdir ~/.ccache before make the config file --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 333ab25ba..5447fe7f8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -63,6 +63,7 @@ default: - - echo -e "\e[0Ksection_start:`date +%s`:ccache_config[collapsed=true]\r\e[0KSetting up ccache config" - echo Adding ccache configution option + - mkdir --parents --verbose ~/.ccache - touch ~/.ccache/ccache.conf - echo base_dir = "$PWD" | tee ~/.ccache/ccache.conf - echo cache_dir = "$PWD/ccache" | tee ~/.ccache/ccache.conf From e6044ec9f10888d9b47fb486c46aa060567b3746 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 14 Oct 2023 15:05:50 +0000 Subject: [PATCH 167/195] Update .gitlab-ci.yml file append, not overwrite ccache.conf --- .gitlab-ci.yml | 43 +++++++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5447fe7f8..d8a6f4247 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -63,20 +63,22 @@ default: - - echo -e "\e[0Ksection_start:`date +%s`:ccache_config[collapsed=true]\r\e[0KSetting up ccache config" - echo Adding ccache configution option - - mkdir --parents --verbose ~/.ccache - touch ~/.ccache/ccache.conf - - echo base_dir = "$PWD" | tee ~/.ccache/ccache.conf - - echo cache_dir = "$PWD/ccache" | tee ~/.ccache/ccache.conf - - echo compiler_check = content | tee ~/.ccache/ccache.conf - - echo stats_log = "$PWD/ccache_statslog" | tee ~/.ccache/ccache.conf - - echo max_size = 50M | tee ~/.ccache/ccache.conf + - echo base_dir = $PWD | tee --append ~/.ccache/ccache.conf + - echo cache_dir = $PWD/ccache | tee --append ~/.ccache/ccache.conf + - echo compiler_check = content | tee --append ~/.ccache/ccache.conf + - echo stats_log = $PWD/ccache_statslog | tee --append ~/.ccache/ccache.conf + - echo max_size = 50M | tee --append ~/.ccache/ccache.conf - echo -e "\e[0Ksection_end:`date +%s`:ccache_config\r\e[0K" - ccache --zero-stats || true - ccache --show-stats || true after_script: - - *aptcache - - apt-get autoclean + - - echo -e "\e[0Ksection_start:`date +%s`:apt_clean[collapsed=true]\r\e[0KCleaning of unneeded APT packages" + - *aptcache + - apt-get autoclean + - echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K" + - ccache --show-stats - ccache --show-log-stats || true @@ -89,13 +91,15 @@ build-testing: - "bin/lsdl2srb2*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing" script: - - *aptcache - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" + - *aptcache - apt-get install gcc - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" - apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" @@ -107,10 +111,11 @@ build-i686-w64-mingw32: - "bin/srb2win.exe*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" script: - - *aptcache - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" + - *aptcache - apt-get install gcc-mingw-w64-i686-win32 - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" @@ -122,17 +127,20 @@ build-x86_64-linux-gnu: - "bin/lsdl2srb2*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" script: - - *aptcache - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" + - *aptcache - apt-get install gcc-x86-64-linux-gnu || apt-get install gcc - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" - apt-get install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + - export CC=x86_64-linux-gnu-gcc - export OBJCOPY=x86_64-linux-gnu-objcopy - export OBJDUMP=x86_64-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig + - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" @@ -144,17 +152,20 @@ build-i686-linux-gnu: - "bin/lsdl2srb2*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686" script: - - *aptcache - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" + - *aptcache - apt-get install gcc-i686-linux-gnu || apt-get install gcc - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" - apt-get install libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + - export CC=i686-linux-gnu-gcc - export OBJCOPY=i686-linux-gnu-objcopy - export OBJDUMP=i686-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig + - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" @@ -166,17 +177,20 @@ build-aarch64-linux-gnu: - "bin/lsdl2srb2*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-aarch64" script: - - *aptcache - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" + - *aptcache - apt-get install gcc-aarch64-linux-gnu || apt-get install gcc - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" - apt-get install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + - export CC=aarch64-linux-gnu-gcc - export OBJCOPY=aarch64-linux-gnu-objcopy - export OBJDUMP=aarch64-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig + - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" @@ -188,10 +202,11 @@ build-x86_64-w64-mingw32: - "bin/srb2win64.exe*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64" script: - - *aptcache - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" + - *aptcache - apt-get install gcc-mingw-w64-x86-64-win32 - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" From dee306c58b71a25aa25b2dc171d024637a37afad Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 14 Oct 2023 15:25:04 +0000 Subject: [PATCH 168/195] Update .gitlab-ci.yml file I need to make the .ccache folder --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d8a6f4247..a196ce281 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -63,6 +63,7 @@ default: - - echo -e "\e[0Ksection_start:`date +%s`:ccache_config[collapsed=true]\r\e[0KSetting up ccache config" - echo Adding ccache configution option + - mkdir --parents --verbose ~/.ccache/ - touch ~/.ccache/ccache.conf - echo base_dir = $PWD | tee --append ~/.ccache/ccache.conf - echo cache_dir = $PWD/ccache | tee --append ~/.ccache/ccache.conf From c74711fefa1f4233ee444dfa51bc9e04801c89f9 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 14 Oct 2023 19:51:11 +0000 Subject: [PATCH 169/195] Update .gitlab-ci.yml file section off ccache output --- .gitlab-ci.yml | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a196ce281..ea0d6668f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -72,16 +72,20 @@ default: - echo max_size = 50M | tee --append ~/.ccache/ccache.conf - echo -e "\e[0Ksection_end:`date +%s`:ccache_config\r\e[0K" - - ccache --zero-stats || true - - ccache --show-stats || true + - - echo -e "\e[0Ksection_start:`date +%s`:apt_reset[collapsed=true]\r\e[0KResetting ccache statistics" + - ccache --zero-stats || true + - ccache --show-stats || true + - echo -e "\e[0Ksection_end:`date +%s`:ccache_reset\r\e[0K" after_script: - - echo -e "\e[0Ksection_start:`date +%s`:apt_clean[collapsed=true]\r\e[0KCleaning of unneeded APT packages" - *aptcache - apt-get autoclean - echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K" - - ccache --show-stats - - ccache --show-log-stats || true + - - echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=false]\r\e[0Kccache statistics:" + - ccache --show-stats --verbose + - ccache --show-log-stats --verbose || true + - echo -e "\e[0Ksection_end:`date +%s`:ccache_stats\r\e[0K" build-testing: <<: *job_build @@ -92,12 +96,12 @@ build-testing: - "bin/lsdl2srb2*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing" script: - - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - *aptcache - apt-get install gcc - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" - apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" @@ -112,7 +116,7 @@ build-i686-w64-mingw32: - "bin/srb2win.exe*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" script: - - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - *aptcache - apt-get install gcc-mingw-w64-i686-win32 - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" @@ -128,12 +132,12 @@ build-x86_64-linux-gnu: - "bin/lsdl2srb2*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" script: - - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - *aptcache - apt-get install gcc-x86-64-linux-gnu || apt-get install gcc - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" - apt-get install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" @@ -153,12 +157,12 @@ build-i686-linux-gnu: - "bin/lsdl2srb2*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686" script: - - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - *aptcache - apt-get install gcc-i686-linux-gnu || apt-get install gcc - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" - apt-get install libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" @@ -178,12 +182,12 @@ build-aarch64-linux-gnu: - "bin/lsdl2srb2*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-aarch64" script: - - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - *aptcache - apt-get install gcc-aarch64-linux-gnu || apt-get install gcc - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" - apt-get install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" @@ -203,7 +207,7 @@ build-x86_64-w64-mingw32: - "bin/srb2win64.exe*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64" script: - - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - *aptcache - apt-get install gcc-mingw-w64-x86-64-win32 - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" From 50d8cb4c00de891b8d13a06e36b6104a241a7f81 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 14 Oct 2023 21:08:13 +0000 Subject: [PATCH 170/195] Update .gitlab-ci.yml file hide ccache statistics --- .gitlab-ci.yml | 45 +++++++++++++++------------------------------ 1 file changed, 15 insertions(+), 30 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ea0d6668f..206d1d888 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,10 +1,6 @@ stages: # List of stages for jobs, and their order of execution - build -.aptcache_Scripts: &aptcache - export APT_CACHE_DIR=`pwd`/apt-cache; - export DEBIAN_FRONTEND=noninteractive; - default: image: debian:stable-slim @@ -13,6 +9,7 @@ default: variables: GIT_STRATEGY: clone GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_PATH + DEBIAN_FRONTEND: noninteractive cache: - key: ccache-$CI_PROJECT_PATH_SLUG-$CI_JOB_NAME_SLUG fallback_keys: @@ -32,27 +29,21 @@ default: - dpkg --add-architecture arm64 - echo -e "\e[0Ksection_end:`date +%s`:dpkg_aa\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:ac_pre[collapsed=true]\r\e[0KSetting up APT cache" - - *aptcache - - echo -e "\e[0Ksection_end:`date +%s`:ac_pre\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_conf[collapsed=true]\r\e[0KSetting up APT conf" + - export APT_CACHE_DIR=`pwd`/apt-cache - touch /etc/apt/apt.conf.d/99build - echo Adding options to apt.conf':' - echo APT::Install-Recommends "false"\; | tee --append /etc/apt/apt.conf.d/99build - echo quiet "1"\; | tee --append /etc/apt/apt.conf.d/99build - echo APT::Get::Assume-Yes "true"\; | tee --append /etc/apt/apt.conf.d/99build - echo Dir::Cache::Archives "$APT_CACHE_DIR"\; | tee --append /etc/apt/apt.conf.d/99build + - mkdir --parents --verbose $APT_CACHE_DIR/partial/ - echo -e "\e[0Ksection_end:`date +%s`:apt_conf\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:apt_update[collapsed=true]\r\e[0KUpdating APT listing" - apt-get update - echo -e "\e[0Ksection_end:`date +%s`:apt_update\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_cache[collapsed=true]\r\e[0KMaking APT cache directory" - - mkdir --parents --verbose $APT_CACHE_DIR/partial/ - - echo -e "\e[0Ksection_end:`date +%s`:apt_cache\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_pre[collapsed=true]\r\e[0KInstalling pre packages" - apt-get install apt-utils - echo -e "\e[0Ksection_end:`date +%s`:apt_pre\r\e[0K" @@ -72,19 +63,19 @@ default: - echo max_size = 50M | tee --append ~/.ccache/ccache.conf - echo -e "\e[0Ksection_end:`date +%s`:ccache_config\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_reset[collapsed=true]\r\e[0KResetting ccache statistics" - - ccache --zero-stats || true - - ccache --show-stats || true + - - echo -e "\e[0Ksection_start:`date +%s`:ccache_reset[collapsed=true]\r\e[0KResetting ccache statistics" + - ccache --zero-stats + - ccache --show-stats - echo -e "\e[0Ksection_end:`date +%s`:ccache_reset\r\e[0K" + after_script: - - echo -e "\e[0Ksection_start:`date +%s`:apt_clean[collapsed=true]\r\e[0KCleaning of unneeded APT packages" - - *aptcache - apt-get autoclean - echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=false]\r\e[0Kccache statistics:" + - - echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:" - ccache --show-stats --verbose - - ccache --show-log-stats --verbose || true + - ccache --show-log-stats --verbose - echo -e "\e[0Ksection_end:`date +%s`:ccache_stats\r\e[0K" build-testing: @@ -97,7 +88,6 @@ build-testing: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing" script: - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - *aptcache - apt-get install gcc - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" @@ -105,7 +95,7 @@ build-testing: - apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" + - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" @@ -117,11 +107,10 @@ build-i686-w64-mingw32: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" script: - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - *aptcache - apt-get install gcc-mingw-w64-i686-win32 - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" + - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" @@ -133,7 +122,6 @@ build-x86_64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" script: - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - *aptcache - apt-get install gcc-x86-64-linux-gnu || apt-get install gcc - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" @@ -146,7 +134,7 @@ build-x86_64-linux-gnu: - export OBJDUMP=x86_64-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig - - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" + - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" @@ -158,7 +146,6 @@ build-i686-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686" script: - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - *aptcache - apt-get install gcc-i686-linux-gnu || apt-get install gcc - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" @@ -171,7 +158,7 @@ build-i686-linux-gnu: - export OBJDUMP=i686-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig - - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" + - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" @@ -183,7 +170,6 @@ build-aarch64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-aarch64" script: - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - *aptcache - apt-get install gcc-aarch64-linux-gnu || apt-get install gcc - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" @@ -196,7 +182,7 @@ build-aarch64-linux-gnu: - export OBJDUMP=aarch64-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig - - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" + - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" @@ -208,10 +194,9 @@ build-x86_64-w64-mingw32: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64" script: - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - *aptcache - apt-get install gcc-mingw-w64-x86-64-win32 - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" + - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" From 49041773124b8e1c7fa1be5fe6ca9e91df551ffc Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 04:34:39 +0000 Subject: [PATCH 171/195] Update .gitlab-ci.yml file Move the exports to variables section --- .gitlab-ci.yml | 50 +++++++++++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 21 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 206d1d888..eb0c60a54 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,6 +10,8 @@ default: GIT_STRATEGY: clone GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_PATH DEBIAN_FRONTEND: noninteractive + CCACHE: 1 + ERRORMODE: 1 cache: - key: ccache-$CI_PROJECT_PATH_SLUG-$CI_JOB_NAME_SLUG fallback_keys: @@ -86,6 +88,8 @@ build-testing: paths: - "bin/lsdl2srb2*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing" + variables: + CC: gcc script: - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc @@ -96,7 +100,7 @@ build-testing: - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 + - make --directory=src --keep-going NONX86=1 || make --directory=src --keep-going NONX86=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-i686-w64-mingw32: @@ -105,13 +109,15 @@ build-i686-w64-mingw32: paths: - "bin/srb2win.exe*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" + variables: + PREFIX: i686-w64-mingw32 script: - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc-mingw-w64-i686-win32 - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 + - make --directory=src --keep-going MINGW=1 || make --directory=src --keep-going MINGW=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-x86_64-linux-gnu: @@ -120,6 +126,11 @@ build-x86_64-linux-gnu: paths: - "bin/lsdl2srb2*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" + variables: + CC: x86_64-linux-gnu-gcc + OBJCOPY: x86_64-linux-gnu-objcopy + OBJDUMP: x86_64-linux-gnu-objdump + PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig script: - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc-x86-64-linux-gnu || apt-get install gcc @@ -129,13 +140,8 @@ build-x86_64-linux-gnu: - apt-get install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - export CC=x86_64-linux-gnu-gcc - - export OBJCOPY=x86_64-linux-gnu-objcopy - - export OBJDUMP=x86_64-linux-gnu-objdump - - export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig - - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 + - make --directory=src --keep-going LINUX64=1 || make --directory=src --keep-going LINUX64=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-i686-linux-gnu: @@ -144,6 +150,11 @@ build-i686-linux-gnu: paths: - "bin/lsdl2srb2*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686" + variables: + CC: i686-linux-gnu-gcc + OBJCOPY: i686-linux-gnu-objcopy + OBJDUMP: i686-linux-gnu-objdump + PKG_CONFIG_PATH: /usr/lib/i386-linux-gnu/pkgconfig script: - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc-i686-linux-gnu || apt-get install gcc @@ -153,13 +164,8 @@ build-i686-linux-gnu: - apt-get install libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - export CC=i686-linux-gnu-gcc - - export OBJCOPY=i686-linux-gnu-objcopy - - export OBJDUMP=i686-linux-gnu-objdump - - export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig - - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 + - make --directory=src --keep-going LINUX=1 || make --directory=src --keep-going LINUX=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-aarch64-linux-gnu: @@ -168,6 +174,11 @@ build-aarch64-linux-gnu: paths: - "bin/lsdl2srb2*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-aarch64" + variables: + CC: aarch64-linux-gnu-gcc + OBJCOPY: aarch64-linux-gnu-objcopy + OBJDUMP: aarch64-linux-gnu-objdump + PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig script: - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc-aarch64-linux-gnu || apt-get install gcc @@ -177,13 +188,8 @@ build-aarch64-linux-gnu: - apt-get install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - export CC=aarch64-linux-gnu-gcc - - export OBJCOPY=aarch64-linux-gnu-objcopy - - export OBJDUMP=aarch64-linux-gnu-objdump - - export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig - - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 + - make --directory=src --keep-going LINUX64=1 NONX86=1 || make --directory=src --keep-going LINUX64=1 NONX86=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-x86_64-w64-mingw32: @@ -192,11 +198,13 @@ build-x86_64-w64-mingw32: paths: - "bin/srb2win64.exe*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64" + variables: + PREFIX: x86_64-w64-mingw32 script: - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc-mingw-w64-x86-64-win32 - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 + - make --directory=src --keep-going MINGW64=1 || make --directory=src --keep-going MINGW64=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" From de7f0cba1b82e6c9ad575fa7b350f5a6ca210f2a Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 04:55:29 +0000 Subject: [PATCH 172/195] Update .gitlab-ci.yml file Can not set CCACHE=1 in shell env --- .gitlab-ci.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eb0c60a54..306c6942a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,7 +10,6 @@ default: GIT_STRATEGY: clone GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_PATH DEBIAN_FRONTEND: noninteractive - CCACHE: 1 ERRORMODE: 1 cache: - key: ccache-$CI_PROJECT_PATH_SLUG-$CI_JOB_NAME_SLUG @@ -100,7 +99,7 @@ build-testing: - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going NONX86=1 || make --directory=src --keep-going NONX86=1 + - make --directory=src --keep-going CCACHE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 NONX86=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-i686-w64-mingw32: @@ -117,7 +116,7 @@ build-i686-w64-mingw32: - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going MINGW=1 || make --directory=src --keep-going MINGW=1 + - make --directory=src --keep-going CCACHE=1 MINGW=1 || make --directory=src --keep-going CCACHE=1 MINGW=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-x86_64-linux-gnu: @@ -141,7 +140,7 @@ build-x86_64-linux-gnu: - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going LINUX64=1 || make --directory=src --keep-going LINUX64=1 + - make --directory=src --keep-going CCACHE=1 LINUX64=1 || make --directory=src --keep-going CCACHE=1 LINUX64=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-i686-linux-gnu: @@ -165,7 +164,7 @@ build-i686-linux-gnu: - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going LINUX=1 || make --directory=src --keep-going LINUX=1 + - make --directory=src --keep-going CCACHE=1 LINUX=1 || make --directory=src --keep-going CCACHE=1 LINUX=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-aarch64-linux-gnu: @@ -189,7 +188,7 @@ build-aarch64-linux-gnu: - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going LINUX64=1 NONX86=1 || make --directory=src --keep-going LINUX64=1 NONX86=1 + - make --directory=src --keep-going CCACHE=1 LINUX64=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 LINUX64=1 NONX86=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-x86_64-w64-mingw32: @@ -206,5 +205,5 @@ build-x86_64-w64-mingw32: - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going MINGW64=1 || make --directory=src --keep-going MINGW64=1 + - make --directory=src --keep-going CCACHE=1 MINGW64=1 || make --directory=src --keep-going CCACHE=1 MINGW64=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" From 8ace36efbf6477617bfa0a572df3a0d789e52d09 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 14:44:17 +0000 Subject: [PATCH 173/195] Update .gitlab-ci.yml file Try to list packages that can be upgraded --- .gitlab-ci.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 306c6942a..f7fdc1826 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,7 +9,10 @@ default: variables: GIT_STRATEGY: clone GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_PATH - DEBIAN_FRONTEND: noninteractive + DEBIAN_FRONTEND: "noninteractive" + DEBIAN_PRIORITY: "low" + DEBCONF_NOWARNINGS: "yes" + DEBCONF_NONINTERACTIVE_SEEN: "true" ERRORMODE: 1 cache: - key: ccache-$CI_PROJECT_PATH_SLUG-$CI_JOB_NAME_SLUG @@ -49,6 +52,10 @@ default: - apt-get install apt-utils - echo -e "\e[0Ksection_end:`date +%s`:apt_pre\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_upgrade[collapsed=true]\r\e[0KUpdating existing packages (dry-run)" + - apt-get upgrade --simulate + - echo -e "\e[0Ksection_end:`date +%s`:apt_upgraden\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_common[collapsed=true]\r\e[0KInstalling common packages" - apt-get install make git ccache - echo -e "\e[0Ksection_end:`date +%s`:apt_common\r\e[0K" From 595ce3e22534b097d22077fc0a4f1e23d6267177 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 16:08:15 +0000 Subject: [PATCH 174/195] Update .gitlab-ci.yml file Update Debian image --- .gitlab-ci.yml | 54 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 41 insertions(+), 13 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f7fdc1826..2582d0cd3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,16 +4,16 @@ stages: # List of stages for jobs, and their order of execution default: image: debian:stable-slim +.debconf: &debconf + export DEBIAN_FRONTEND="noninteractive"; + export DEBIAN_PRIORITY="low"; + export DEBCONF_NONINTERACTIVE_SEEN="true"; + .job_template: &job_build # This job runs in the build stage, which runs first. stage: build variables: GIT_STRATEGY: clone GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_PATH - DEBIAN_FRONTEND: "noninteractive" - DEBIAN_PRIORITY: "low" - DEBCONF_NOWARNINGS: "yes" - DEBCONF_NONINTERACTIVE_SEEN: "true" - ERRORMODE: 1 cache: - key: ccache-$CI_PROJECT_PATH_SLUG-$CI_JOB_NAME_SLUG fallback_keys: @@ -27,6 +27,10 @@ default: - apt-cache unprotect: true before_script: + - - echo -e "\e[0Ksection_start:`date +%s`:debconf_pre[collapsed=true]\r\e[0KSetup debconf's environment" + - *debconf + - echo -e "\e[0Ksection_end:`date +%s`:debconf_pre\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:dpkg_aa[collapsed=true]\r\e[0KAdding architectures to dpkg" - dpkg --add-architecture i386 - dpkg --add-architecture amd64 @@ -52,8 +56,8 @@ default: - apt-get install apt-utils - echo -e "\e[0Ksection_end:`date +%s`:apt_pre\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_upgrade[collapsed=true]\r\e[0KUpdating existing packages (dry-run)" - - apt-get upgrade --simulate + - - echo -e "\e[0Ksection_start:`date +%s`:apt_upgrade[collapsed=true]\r\e[0KUpdating existing packages" + - apt-get upgrade - echo -e "\e[0Ksection_end:`date +%s`:apt_upgraden\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:apt_common[collapsed=true]\r\e[0KInstalling common packages" @@ -97,6 +101,10 @@ build-testing: variables: CC: gcc script: + - - echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment" + - *debconf + - echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" @@ -106,7 +114,7 @@ build-testing: - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 NONX86=1 + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-i686-w64-mingw32: @@ -118,12 +126,16 @@ build-i686-w64-mingw32: variables: PREFIX: i686-w64-mingw32 script: + - - echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment" + - *debconf + - echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc-mingw-w64-i686-win32 - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 MINGW=1 || make --directory=src --keep-going CCACHE=1 MINGW=1 + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-x86_64-linux-gnu: @@ -138,6 +150,10 @@ build-x86_64-linux-gnu: OBJDUMP: x86_64-linux-gnu-objdump PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig script: + - - echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment" + - *debconf + - echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc-x86-64-linux-gnu || apt-get install gcc - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" @@ -147,7 +163,7 @@ build-x86_64-linux-gnu: - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 LINUX64=1 || make --directory=src --keep-going CCACHE=1 LINUX64=1 + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-i686-linux-gnu: @@ -162,6 +178,10 @@ build-i686-linux-gnu: OBJDUMP: i686-linux-gnu-objdump PKG_CONFIG_PATH: /usr/lib/i386-linux-gnu/pkgconfig script: + - - echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment" + - *debconf + - echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc-i686-linux-gnu || apt-get install gcc - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" @@ -171,7 +191,7 @@ build-i686-linux-gnu: - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 LINUX=1 || make --directory=src --keep-going CCACHE=1 LINUX=1 + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-aarch64-linux-gnu: @@ -186,6 +206,10 @@ build-aarch64-linux-gnu: OBJDUMP: aarch64-linux-gnu-objdump PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig script: + - - echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment" + - *debconf + - echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc-aarch64-linux-gnu || apt-get install gcc - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" @@ -195,7 +219,7 @@ build-aarch64-linux-gnu: - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 LINUX64=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 LINUX64=1 NONX86=1 + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-x86_64-w64-mingw32: @@ -207,10 +231,14 @@ build-x86_64-w64-mingw32: variables: PREFIX: x86_64-w64-mingw32 script: + - - echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment" + - *debconf + - echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc-mingw-w64-x86-64-win32 - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 MINGW64=1 || make --directory=src --keep-going CCACHE=1 MINGW64=1 + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" From b8861b19127dabd54b0aed9032bf32975c85a50d Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 17:11:44 +0000 Subject: [PATCH 175/195] Update .gitlab-ci.yml file Let see if I need to need to run export again in the main build script --- .gitlab-ci.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2582d0cd3..abd769f03 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -101,10 +101,6 @@ build-testing: variables: CC: gcc script: - - - echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment" - - *debconf - - echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" From 3adc15d5214b86fb87c959b85ce551db8c37d9ab Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 17:30:07 +0000 Subject: [PATCH 176/195] Update .gitlab-ci.yml file Only need to setup debconf in before_script --- .gitlab-ci.yml | 50 ++++++++++++++++---------------------------------- 1 file changed, 16 insertions(+), 34 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index abd769f03..27d95d6fe 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,19 +1,17 @@ -stages: # List of stages for jobs, and their order of execution - - build - default: image: debian:stable-slim -.debconf: &debconf - export DEBIAN_FRONTEND="noninteractive"; - export DEBIAN_PRIORITY="low"; - export DEBCONF_NONINTERACTIVE_SEEN="true"; - +stages: # List of stages for jobs, and their order of execution + - build + +variables: + GIT_STRATEGY: clone + GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_PATH + .job_template: &job_build # This job runs in the build stage, which runs first. + stage: build - variables: - GIT_STRATEGY: clone - GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_PATH + cache: - key: ccache-$CI_PROJECT_PATH_SLUG-$CI_JOB_NAME_SLUG fallback_keys: @@ -22,14 +20,18 @@ default: paths: - ccache - ccache_statslog + - key: apt-$CI_JOB_IMAGE paths: - apt-cache unprotect: true + before_script: - - - echo -e "\e[0Ksection_start:`date +%s`:debconf_pre[collapsed=true]\r\e[0KSetup debconf's environment" - - *debconf - - echo -e "\e[0Ksection_end:`date +%s`:debconf_pre\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment" + - export DEBIAN_FRONTEND="noninteractive" + - export DEBIAN_PRIORITY="low" + - export DEBCONF_NONINTERACTIVE_SEEN="true" + - echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:dpkg_aa[collapsed=true]\r\e[0KAdding architectures to dpkg" - dpkg --add-architecture i386 @@ -122,10 +124,6 @@ build-i686-w64-mingw32: variables: PREFIX: i686-w64-mingw32 script: - - - echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment" - - *debconf - - echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc-mingw-w64-i686-win32 - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" @@ -146,10 +144,6 @@ build-x86_64-linux-gnu: OBJDUMP: x86_64-linux-gnu-objdump PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig script: - - - echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment" - - *debconf - - echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc-x86-64-linux-gnu || apt-get install gcc - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" @@ -174,10 +168,6 @@ build-i686-linux-gnu: OBJDUMP: i686-linux-gnu-objdump PKG_CONFIG_PATH: /usr/lib/i386-linux-gnu/pkgconfig script: - - - echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment" - - *debconf - - echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc-i686-linux-gnu || apt-get install gcc - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" @@ -202,10 +192,6 @@ build-aarch64-linux-gnu: OBJDUMP: aarch64-linux-gnu-objdump PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig script: - - - echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment" - - *debconf - - echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc-aarch64-linux-gnu || apt-get install gcc - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" @@ -227,10 +213,6 @@ build-x86_64-w64-mingw32: variables: PREFIX: x86_64-w64-mingw32 script: - - - echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment" - - *debconf - - echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc-mingw-w64-x86-64-win32 - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" From aa21dcad33857980e6203fe67da2954c26beff5a Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 17:50:45 +0000 Subject: [PATCH 177/195] Update .gitlab-ci.yml file Try to hide echos --- .gitlab-ci.yml | 197 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 131 insertions(+), 66 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 27d95d6fe..c1d983e53 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -27,70 +27,103 @@ variables: unprotect: true before_script: - - - echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment" + - - | + echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment" - export DEBIAN_FRONTEND="noninteractive" - export DEBIAN_PRIORITY="low" - export DEBCONF_NONINTERACTIVE_SEEN="true" - - echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:dpkg_aa[collapsed=true]\r\e[0KAdding architectures to dpkg" + - - | + echo -e "\e[0Ksection_start:`date +%s`:dpkg_aa[collapsed=true]\r\e[0KAdding architectures to dpkg" - dpkg --add-architecture i386 - dpkg --add-architecture amd64 - dpkg --add-architecture arm64 - - echo -e "\e[0Ksection_end:`date +%s`:dpkg_aa\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:dpkg_aa\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_conf[collapsed=true]\r\e[0KSetting up APT conf" + - - | + echo -e "\e[0Ksection_start:`date +%s`:apt_conf[collapsed=true]\r\e[0KSetting up APT conf" - export APT_CACHE_DIR=`pwd`/apt-cache - - touch /etc/apt/apt.conf.d/99build - - echo Adding options to apt.conf':' - - echo APT::Install-Recommends "false"\; | tee --append /etc/apt/apt.conf.d/99build - - echo quiet "1"\; | tee --append /etc/apt/apt.conf.d/99build - - echo APT::Get::Assume-Yes "true"\; | tee --append /etc/apt/apt.conf.d/99build - - echo Dir::Cache::Archives "$APT_CACHE_DIR"\; | tee --append /etc/apt/apt.conf.d/99build - mkdir --parents --verbose $APT_CACHE_DIR/partial/ - - echo -e "\e[0Ksection_end:`date +%s`:apt_conf\r\e[0K" + - touch /etc/apt/apt.conf.d/99build + - | + echo Adding options to apt.conf':' + - | + echo APT::Install-Recommends "false"\; | tee --append /etc/apt/apt.conf.d/99build + - | + echo quiet "1"\; | tee --append /etc/apt/apt.conf.d/99build + - | + echo APT::Get::Assume-Yes "true"\; | tee --append /etc/apt/apt.conf.d/99build + - | + echo Dir::Cache::Archives "$APT_CACHE_DIR"\; | tee --append /etc/apt/apt.conf.d/99build + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_conf\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_update[collapsed=true]\r\e[0KUpdating APT listing" + - - | + echo -e "\e[0Ksection_start:`date +%s`:apt_update[collapsed=true]\r\e[0KUpdating APT listing" - apt-get update - - echo -e "\e[0Ksection_end:`date +%s`:apt_update\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_update\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_pre[collapsed=true]\r\e[0KInstalling pre packages" + - - | + echo -e "\e[0Ksection_start:`date +%s`:apt_pre[collapsed=true]\r\e[0KInstalling pre packages" - apt-get install apt-utils - - echo -e "\e[0Ksection_end:`date +%s`:apt_pre\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_pre\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_upgrade[collapsed=true]\r\e[0KUpdating existing packages" + - - | + echo -e "\e[0Ksection_start:`date +%s`:apt_upgrade[collapsed=true]\r\e[0KUpdating existing packages" - apt-get upgrade - - echo -e "\e[0Ksection_end:`date +%s`:apt_upgraden\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_upgraden\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_common[collapsed=true]\r\e[0KInstalling common packages" + - - | + echo -e "\e[0Ksection_start:`date +%s`:apt_common[collapsed=true]\r\e[0KInstalling common packages" - apt-get install make git ccache - - echo -e "\e[0Ksection_end:`date +%s`:apt_common\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_common\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:ccache_config[collapsed=true]\r\e[0KSetting up ccache config" - - echo Adding ccache configution option + - - | + echo -e "\e[0Ksection_start:`date +%s`:ccache_config[collapsed=true]\r\e[0KSetting up ccache config" - mkdir --parents --verbose ~/.ccache/ - touch ~/.ccache/ccache.conf - - echo base_dir = $PWD | tee --append ~/.ccache/ccache.conf - - echo cache_dir = $PWD/ccache | tee --append ~/.ccache/ccache.conf - - echo compiler_check = content | tee --append ~/.ccache/ccache.conf - - echo stats_log = $PWD/ccache_statslog | tee --append ~/.ccache/ccache.conf - - echo max_size = 50M | tee --append ~/.ccache/ccache.conf - - echo -e "\e[0Ksection_end:`date +%s`:ccache_config\r\e[0K" + - | + echo Adding ccache configution option + - | + echo base_dir = $PWD | tee --append ~/.ccache/ccache.conf + - | + echo cache_dir = $PWD/ccache | tee --append ~/.ccache/ccache.conf + - | + echo compiler_check = content | tee --append ~/.ccache/ccache.conf + - | + echo stats_log = $PWD/ccache_statslog | tee --append ~/.ccache/ccache.conf + - | + echo max_size = 50M | tee --append ~/.ccache/ccache.conf + - | + echo -e "\e[0Ksection_end:`date +%s`:ccache_config\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:ccache_reset[collapsed=true]\r\e[0KResetting ccache statistics" + - - | + echo -e "\e[0Ksection_start:`date +%s`:ccache_reset[collapsed=true]\r\e[0KResetting ccache statistics" - ccache --zero-stats - ccache --show-stats - - echo -e "\e[0Ksection_end:`date +%s`:ccache_reset\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:ccache_reset\r\e[0K" after_script: - - - echo -e "\e[0Ksection_start:`date +%s`:apt_clean[collapsed=true]\r\e[0KCleaning of unneeded APT packages" + - - | + echo -e "\e[0Ksection_start:`date +%s`:apt_clean[collapsed=true]\r\e[0KCleaning of unneeded APT packages" - apt-get autoclean - - echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:" + - - | + echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:" - ccache --show-stats --verbose - ccache --show-log-stats --verbose - - echo -e "\e[0Ksection_end:`date +%s`:ccache_stats\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:ccache_stats\r\e[0K" build-testing: <<: *job_build @@ -103,17 +136,23 @@ build-testing: variables: CC: gcc script: - - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" + - - | + echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc - - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" + - - | + echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" - apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev - - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" + - - | + echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 - - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-i686-w64-mingw32: <<: *job_build @@ -124,13 +163,17 @@ build-i686-w64-mingw32: variables: PREFIX: i686-w64-mingw32 script: - - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" + - - | + echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc-mingw-w64-i686-win32 - - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" + - - | + echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 - - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-x86_64-linux-gnu: <<: *job_build @@ -144,17 +187,23 @@ build-x86_64-linux-gnu: OBJDUMP: x86_64-linux-gnu-objdump PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig script: - - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" + - - | + echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc-x86-64-linux-gnu || apt-get install gcc - - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" + - - | + echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" - apt-get install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 - - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" + - - | + echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 - - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-i686-linux-gnu: <<: *job_build @@ -168,17 +217,23 @@ build-i686-linux-gnu: OBJDUMP: i686-linux-gnu-objdump PKG_CONFIG_PATH: /usr/lib/i386-linux-gnu/pkgconfig script: - - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" + - - | + echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc-i686-linux-gnu || apt-get install gcc - - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" + - - | + echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" - apt-get install libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 - - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" + - - | + echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 - - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-aarch64-linux-gnu: <<: *job_build @@ -192,17 +247,23 @@ build-aarch64-linux-gnu: OBJDUMP: aarch64-linux-gnu-objdump PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig script: - - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" + - - | + echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc-aarch64-linux-gnu || apt-get install gcc - - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" + - - | + echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" - apt-get install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 - - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" + - - | + echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 - - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-x86_64-w64-mingw32: <<: *job_build @@ -213,10 +274,14 @@ build-x86_64-w64-mingw32: variables: PREFIX: x86_64-w64-mingw32 script: - - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" + - - | + echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc-mingw-w64-x86-64-win32 - - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" + - - | + echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 - - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" From 35f57882e47c1206076567ac9e078d46b91a355a Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 14:16:13 -0400 Subject: [PATCH 178/195] signalhandlers are function of NORETURN --- src/sdl/i_system.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index be46cd804..98e036130 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -2265,7 +2265,7 @@ void I_Sleep(UINT32 ms) } #ifdef NEWSIGNALHANDLER -static void newsignalhandler_Warn(const char *pr) +ATTRNORETURN static FUNCNORETURN void newsignalhandler_Warn(const char *pr) { char text[128]; From aaebcc6ce1b442589a352e0568a40407cd86c4f3 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 14:24:20 -0400 Subject: [PATCH 179/195] Update src/hardware/hw_batching.c fix misleading indentation --- src/hardware/hw_batching.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hardware/hw_batching.c b/src/hardware/hw_batching.c index d1b84a5ee..dc0b5ee5b 100644 --- a/src/hardware/hw_batching.c +++ b/src/hardware/hw_batching.c @@ -42,10 +42,10 @@ int unsortedVertexArrayAllocSize = 65536; // Call HWR_RenderBatches to render all the collected geometry. void HWR_StartBatching(void) { - if (currently_batching) - I_Error("Repeat call to HWR_StartBatching without HWR_RenderBatches"); + if (currently_batching) + I_Error("Repeat call to HWR_StartBatching without HWR_RenderBatches"); - // init arrays if that has not been done yet + // init arrays if that has not been done yet if (!finalVertexArray) { finalVertexArray = malloc(finalVertexArrayAllocSize * sizeof(FOutVector)); @@ -55,7 +55,7 @@ void HWR_StartBatching(void) unsortedVertexArray = malloc(unsortedVertexArrayAllocSize * sizeof(FOutVector)); } - currently_batching = true; + currently_batching = true; } // This replaces the direct calls to pfnSetTexture in cases where batching is available. From bc852fa099ffcaa345b1230cc094e8989a098721 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 14:34:53 -0400 Subject: [PATCH 180/195] remove unused variables that was only set --- src/hardware/hw_main.c | 3 --- src/hardware/hw_model.c | 3 --- 2 files changed, 6 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index f2022bcea..8260271bd 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -4141,14 +4141,11 @@ static void HWR_DrawSprite(gl_vissprite_t *spr) float xscale, yscale; float xoffset, yoffset; float leftoffset, topoffset; - float scale = spr->scale; float zoffset = (P_MobjFlip(spr->mobj) * 0.05f); pslope_t *splatslope = NULL; INT32 i; renderflags_t renderflags = spr->renderflags; - if (renderflags & RF_SHADOWEFFECTS) - scale *= spr->shadowscale; if (spr->rotateflags & SRF_3D || renderflags & RF_NOSPLATBILLBOARD) angle = spr->mobj->angle; diff --git a/src/hardware/hw_model.c b/src/hardware/hw_model.c index b69bce0e2..9319939c0 100644 --- a/src/hardware/hw_model.c +++ b/src/hardware/hw_model.c @@ -663,7 +663,6 @@ void GeneratePolygonNormals(model_t *model, int ztag) { int k; mdlframe_t *frame = &mesh->frames[j]; - const float *vertices = frame->vertices; vector_t *polyNormals; frame->polyNormals = (vector_t*)Z_Malloc(sizeof(vector_t) * mesh->numTriangles, ztag, 0); @@ -672,8 +671,6 @@ void GeneratePolygonNormals(model_t *model, int ztag) for (k = 0; k < mesh->numTriangles; k++) { -// Vector::Normal(vertices, polyNormals); - vertices += 3 * 3; polyNormals++; } } From 6c19fcc607534c2fd9bc79453cc08cd31b7c4782 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 18:56:06 +0000 Subject: [PATCH 181/195] Update .gitlab-ci.yml file Try compiling with clang --- .gitlab-ci.yml | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c1d983e53..ed75730fd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -128,13 +128,17 @@ variables: build-testing: <<: *job_build image: debian:testing-slim + allow_failure: true + artifacts: paths: - "bin/lsdl2srb2*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing" + variables: CC: gcc + script: - - | echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" @@ -156,12 +160,15 @@ build-testing: build-i686-w64-mingw32: <<: *job_build + artifacts: paths: - "bin/srb2win.exe*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" + variables: PREFIX: i686-w64-mingw32 + script: - - | echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" @@ -177,15 +184,18 @@ build-i686-w64-mingw32: build-x86_64-linux-gnu: <<: *job_build + artifacts: paths: - "bin/lsdl2srb2*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" + variables: CC: x86_64-linux-gnu-gcc OBJCOPY: x86_64-linux-gnu-objcopy OBJDUMP: x86_64-linux-gnu-objdump PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig + script: - - | echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" @@ -207,15 +217,18 @@ build-x86_64-linux-gnu: build-i686-linux-gnu: <<: *job_build + artifacts: paths: - "bin/lsdl2srb2*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686" + variables: CC: i686-linux-gnu-gcc OBJCOPY: i686-linux-gnu-objcopy OBJDUMP: i686-linux-gnu-objdump PKG_CONFIG_PATH: /usr/lib/i386-linux-gnu/pkgconfig + script: - - | echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" @@ -237,15 +250,18 @@ build-i686-linux-gnu: build-aarch64-linux-gnu: <<: *job_build + artifacts: paths: - "bin/lsdl2srb2*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-aarch64" + variables: CC: aarch64-linux-gnu-gcc OBJCOPY: aarch64-linux-gnu-objcopy OBJDUMP: aarch64-linux-gnu-objdump PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig + script: - - | echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" @@ -267,12 +283,15 @@ build-aarch64-linux-gnu: build-x86_64-w64-mingw32: <<: *job_build + artifacts: paths: - "bin/srb2win64.exe*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64" + variables: PREFIX: x86_64-w64-mingw32 + script: - - | echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" @@ -285,3 +304,37 @@ build-x86_64-w64-mingw32: - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 - | echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + +build-clang: + <<: *job_build + + allow_failure: true + + artifacts: + paths: + - "bin/lsdl2srb2*" + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing" + + variables: + CC: clang + CFLAGS: -Wno-cast-align + + script: + - - | + echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" + - apt-get install clang + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + + - - | + echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" + - apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + + - - | + echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 + - | + echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + From b6aaf582d12c745c542a71c3c75df741fded1bf2 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 15:29:20 -0400 Subject: [PATCH 182/195] Update src/hardware/mw_md2.c fscanf need 26 chars in the name buffer --- src/hardware/hw_md2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hardware/hw_md2.c b/src/hardware/hw_md2.c index 6123eb9a9..914683db7 100644 --- a/src/hardware/hw_md2.c +++ b/src/hardware/hw_md2.c @@ -486,7 +486,7 @@ void HWR_InitModels(void) size_t i; INT32 s; FILE *f; - char name[24], filename[32]; + char name[26], filename[32]; float scale, offset; size_t prefixlen; From 1372b60db9912288121a980709e38c186189b9f0 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 16:00:25 -0400 Subject: [PATCH 183/195] Update src/hardware/mw_md2.c there are 2 more name buffers that need to be bigger --- src/hardware/hw_md2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hardware/hw_md2.c b/src/hardware/hw_md2.c index 914683db7..0f8342135 100644 --- a/src/hardware/hw_md2.c +++ b/src/hardware/hw_md2.c @@ -585,7 +585,7 @@ modelfound: void HWR_AddPlayerModel(int skin) // For skins that were added after startup { FILE *f; - char name[24], filename[32]; + char name[26], filename[32]; float scale, offset; size_t prefixlen; @@ -644,7 +644,7 @@ void HWR_AddSpriteModel(size_t spritenum) // For sprites that were added after s // name[24] is used to check for names in the models.dat file that match with sprites or player skins // sprite names are always 4 characters long, and names is for player skins can be up to 19 characters long // PLAYERMODELPREFIX is 6 characters long - char name[24], filename[32]; + char name[26], filename[32]; float scale, offset; if (nomd2s) From 976a2850af54c0abcff0fab991e5a3b66bea8636 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 16:02:27 -0400 Subject: [PATCH 184/195] Update .gitlab-ci.yml file change name of artifact for clang build --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ed75730fd..7db8198d3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -313,7 +313,7 @@ build-clang: artifacts: paths: - "bin/lsdl2srb2*" - name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing" + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-clang" variables: CC: clang From b27de309a87051160903035a565f65c9cfd13a60 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 20:32:11 +0000 Subject: [PATCH 185/195] Update .gitlab-ci.yml file Testing compiling with Debian's testing clang package --- .gitlab-ci.yml | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7db8198d3..890b4b94a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -134,7 +134,7 @@ build-testing: artifacts: paths: - "bin/lsdl2srb2*" - name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing" + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing-gcc" variables: CC: gcc @@ -338,3 +338,39 @@ build-clang: - | echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + +build-clang-testing: + <<: *job_build + + image: debian:testing-slim + + allow_failure: true + + artifacts: + paths: + - "bin/lsdl2srb2*" + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing-clang" + + variables: + CC: clang + CFLAGS: -Wno-cast-align + + script: + - - | + echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" + - apt-get install clang + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + + - - | + echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" + - apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + + - - | + echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 + - | + echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + From 4bec14342760a5f6b547d0e80a4581a5e8e992a1 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 23:42:27 +0000 Subject: [PATCH 186/195] Update .gitlab-ci.yml file Do not care for non-prototypes for clang-testing job --- .gitlab-ci.yml | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 890b4b94a..527dc1804 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -342,9 +342,9 @@ build-clang: build-clang-testing: <<: *job_build - image: debian:testing-slim + extends: build-clang - allow_failure: true + image: debian:testing-slim artifacts: paths: @@ -353,24 +353,4 @@ build-clang-testing: variables: CC: clang - CFLAGS: -Wno-cast-align - - script: - - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apt-get install clang - - | - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" - - apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev - - | - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - - - | - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 - - | - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" - + CFLAGS: -Wno-cast-align -Wno-deprecated-non-prototype From 6a37b3c0c66ee30ecdcc67b8bad793d97c12c70d Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 20:30:06 -0400 Subject: [PATCH 187/195] Update src/hardware/mw_model.c Restore old code in GeneratePolygonNormals(), add TODO --- src/hardware/hw_model.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/hardware/hw_model.c b/src/hardware/hw_model.c index 9319939c0..4b6bce6f7 100644 --- a/src/hardware/hw_model.c +++ b/src/hardware/hw_model.c @@ -663,6 +663,7 @@ void GeneratePolygonNormals(model_t *model, int ztag) { int k; mdlframe_t *frame = &mesh->frames[j]; + const float *vertices = frame->vertices; vector_t *polyNormals; frame->polyNormals = (vector_t*)Z_Malloc(sizeof(vector_t) * mesh->numTriangles, ztag, 0); @@ -671,6 +672,11 @@ void GeneratePolygonNormals(model_t *model, int ztag) for (k = 0; k < mesh->numTriangles; k++) { + /// TODO: normalize vectors + (void)vertices; + (void)polyNormals; +// Vector::Normal(vertices, polyNormals); + vertices += 3 * 3; polyNormals++; } } From de4a8a193bc56eb6b1e3cf936cdec89407cdb0c9 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 20:31:57 -0400 Subject: [PATCH 188/195] Update src/d_clisrv.c Remove unused i var in Ban_Load_File() --- src/d_clisrv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 83482b527..1ec9cf1e9 100755 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -2743,7 +2743,6 @@ static void Command_ClearBans(void) static void Ban_Load_File(boolean warning) { FILE *f; - size_t i; const char *address, *mask; char buffer[MAX_WADPATH]; @@ -2761,7 +2760,7 @@ static void Ban_Load_File(boolean warning) Ban_Clear(); - for (i=0; fgets(buffer, (int)sizeof(buffer), f); i++) + for (; fgets(buffer, (int)sizeof(buffer), f);) { address = strtok(buffer, " \t\r\n"); mask = strtok(NULL, " \t\r\n"); From 2865873e7040222632a6d3aa1573c4ea44d704d5 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 20:35:04 -0400 Subject: [PATCH 189/195] Update src/lua_baselib.c No need of counting bots. --- src/lua_baselib.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/lua_baselib.c b/src/lua_baselib.c index 4af5066ae..1d183cdec 100644 --- a/src/lua_baselib.c +++ b/src/lua_baselib.c @@ -3544,7 +3544,7 @@ static int lib_gAddGametype(lua_State *L) // Partly lifted from Got_AddPlayer static int lib_gAddPlayer(lua_State *L) { - INT16 i, newplayernum, botcount = 1; + INT16 i, newplayernum; player_t *newplayer; SINT8 skinnum = 0, bot; @@ -3552,10 +3552,8 @@ static int lib_gAddPlayer(lua_State *L) { if (!playeringame[i]) break; - - if (players[i].bot) - botcount++; // How many of us are there already? } + if (i >= MAXPLAYERS) { lua_pushnil(L); From 330b10cbb593bf859726334b7435b7a8d114cfdf Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Tue, 17 Oct 2023 01:41:43 +0000 Subject: [PATCH 190/195] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 263 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 170 insertions(+), 93 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 527dc1804..a849aea28 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,104 +28,134 @@ variables: before_script: - - | - echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment" + # debconf + echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment" - export DEBIAN_FRONTEND="noninteractive" - export DEBIAN_PRIORITY="low" - export DEBCONF_NONINTERACTIVE_SEEN="true" - | - echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K" - + # debconf + echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:dpkg_aa[collapsed=true]\r\e[0KAdding architectures to dpkg" + # dpkg_aa + echo -e "\e[0Ksection_start:`date +%s`:dpkg_aa[collapsed=true]\r\e[0KAdding architectures to dpkg" - dpkg --add-architecture i386 - dpkg --add-architecture amd64 - dpkg --add-architecture arm64 - | - echo -e "\e[0Ksection_end:`date +%s`:dpkg_aa\r\e[0K" - + # dpkg_aa + echo -e "\e[0Ksection_end:`date +%s`:dpkg_aa\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_conf[collapsed=true]\r\e[0KSetting up APT conf" + # apt_conf + echo -e "\e[0Ksection_start:`date +%s`:apt_conf[collapsed=true]\r\e[0KSetting up APT conf" - export APT_CACHE_DIR=`pwd`/apt-cache - mkdir --parents --verbose $APT_CACHE_DIR/partial/ - touch /etc/apt/apt.conf.d/99build - | - echo Adding options to apt.conf':' + # apt.conf + echo Adding options to apt.conf':' - | - echo APT::Install-Recommends "false"\; | tee --append /etc/apt/apt.conf.d/99build + # APT::Install-Recommends + echo APT::Install-Recommends "false"\; | tee --append /etc/apt/apt.conf.d/99build - | - echo quiet "1"\; | tee --append /etc/apt/apt.conf.d/99build + # quit + echo quiet "1"\; | tee --append /etc/apt/apt.conf.d/99build - | - echo APT::Get::Assume-Yes "true"\; | tee --append /etc/apt/apt.conf.d/99build + # APT::Get::Assume-Yes + echo APT::Get::Assume-Yes "true"\; | tee --append /etc/apt/apt.conf.d/99build - | - echo Dir::Cache::Archives "$APT_CACHE_DIR"\; | tee --append /etc/apt/apt.conf.d/99build + # Dir::Cache::Archives + echo Dir::Cache::Archives "$APT_CACHE_DIR"\; | tee --append /etc/apt/apt.conf.d/99build - | - echo -e "\e[0Ksection_end:`date +%s`:apt_conf\r\e[0K" - + # apt_conf + echo -e "\e[0Ksection_end:`date +%s`:apt_conf\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_update[collapsed=true]\r\e[0KUpdating APT listing" + # apt_update + echo -e "\e[0Ksection_start:`date +%s`:apt_update[collapsed=true]\r\e[0KUpdating APT listing" - apt-get update - | - echo -e "\e[0Ksection_end:`date +%s`:apt_update\r\e[0K" + # apt_update + echo -e "\e[0Ksection_end:`date +%s`:apt_update\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_pre[collapsed=true]\r\e[0KInstalling pre packages" + # apt_pre + echo -e "\e[0Ksection_start:`date +%s`:apt_pre[collapsed=true]\r\e[0KInstalling pre packages" - apt-get install apt-utils - | - echo -e "\e[0Ksection_end:`date +%s`:apt_pre\r\e[0K" + # apt_pre + echo -e "\e[0Ksection_end:`date +%s`:apt_pre\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_upgrade[collapsed=true]\r\e[0KUpdating existing packages" + # apt_upgrade + echo -e "\e[0Ksection_start:`date +%s`:apt_upgrade[collapsed=true]\r\e[0KUpdating existing packages" - apt-get upgrade - | - echo -e "\e[0Ksection_end:`date +%s`:apt_upgraden\r\e[0K" + # apt_update + echo -e "\e[0Ksection_end:`date +%s`:apt_upgrade\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_common[collapsed=true]\r\e[0KInstalling common packages" + # apt_common + echo -e "\e[0Ksection_start:`date +%s`:apt_common[collapsed=true]\r\e[0KInstalling common packages" - apt-get install make git ccache - | - echo -e "\e[0Ksection_end:`date +%s`:apt_common\r\e[0K" + # apt_common + echo -e "\e[0Ksection_end:`date +%s`:apt_common\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:ccache_config[collapsed=true]\r\e[0KSetting up ccache config" + # ccache_config + echo -e "\e[0Ksection_start:`date +%s`:ccache_config[collapsed=true]\r\e[0KSetting up ccache config" - mkdir --parents --verbose ~/.ccache/ - touch ~/.ccache/ccache.conf - | - echo Adding ccache configution option + # cache.conf + echo Adding ccache configution option - | - echo base_dir = $PWD | tee --append ~/.ccache/ccache.conf + # base_dir + echo base_dir = $PWD | tee --append ~/.ccache/ccache.conf - | - echo cache_dir = $PWD/ccache | tee --append ~/.ccache/ccache.conf + # cache_dir + echo cache_dir = $PWD/ccache | tee --append ~/.ccache/ccache.conf - | - echo compiler_check = content | tee --append ~/.ccache/ccache.conf + # compiler_check + echo compiler_check = content | tee --append ~/.ccache/ccache.conf - | - echo stats_log = $PWD/ccache_statslog | tee --append ~/.ccache/ccache.conf + # stats_log + echo stats_log = $PWD/ccache_statslog | tee --append ~/.ccache/ccache.conf - | - echo max_size = 50M | tee --append ~/.ccache/ccache.conf + # max_size + echo max_size = 50M | tee --append ~/.ccache/ccache.conf - | - echo -e "\e[0Ksection_end:`date +%s`:ccache_config\r\e[0K" + # ccache_config + echo -e "\e[0Ksection_end:`date +%s`:ccache_config\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:ccache_reset[collapsed=true]\r\e[0KResetting ccache statistics" + # cache_reset + echo -e "\e[0Ksection_start:`date +%s`:ccache_reset[collapsed=true]\r\e[0KResetting ccache statistics" - ccache --zero-stats - ccache --show-stats - | - echo -e "\e[0Ksection_end:`date +%s`:ccache_reset\r\e[0K" + # ccache_reset + echo -e "\e[0Ksection_end:`date +%s`:ccache_reset\r\e[0K" after_script: - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_clean[collapsed=true]\r\e[0KCleaning of unneeded APT packages" + # apt_clean + echo -e "\e[0Ksection_start:`date +%s`:apt_clean[collapsed=true]\r\e[0KCleaning of unneeded APT packages" - apt-get autoclean - | - echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K" + # apt_clean + echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:" + # ccache_stats + echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:" - ccache --show-stats --verbose - ccache --show-log-stats --verbose - | - echo -e "\e[0Ksection_end:`date +%s`:ccache_stats\r\e[0K" + # ccahe_stats + echo -e "\e[0Ksection_end:`date +%s`:ccache_stats\r\e[0K" -build-testing: +Debian testing GCC: <<: *job_build image: debian:testing-slim @@ -133,7 +163,8 @@ build-testing: artifacts: paths: - - "bin/lsdl2srb2*" + - "bin/" + - "src/comptime.h" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing-gcc" variables: @@ -141,29 +172,36 @@ build-testing: script: - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" + # apt_toolchain + echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc - | - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + # apt_toolchain + echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" + # apt_development + echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" - apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev - | - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + # apt_development + echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" + # make + echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 - | - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + # make + echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" -build-i686-w64-mingw32: +Windows x86: <<: *job_build artifacts: paths: - - "bin/srb2win.exe*" + - "bin/" + - "src/comptime.h" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" variables: @@ -171,23 +209,28 @@ build-i686-w64-mingw32: script: - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" + # apt_toolchain + echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc-mingw-w64-i686-win32 - | - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + # apt_toolchain + echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" + # make + echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 - | - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + # make + echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" -build-x86_64-linux-gnu: +Debian stable:amd64: <<: *job_build artifacts: paths: - - "bin/lsdl2srb2*" + - "bin/" + - "src/comptime.h" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" variables: @@ -198,29 +241,36 @@ build-x86_64-linux-gnu: script: - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" + # apt_toolchain + echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc-x86-64-linux-gnu || apt-get install gcc - | - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + # apt_toolchain + echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" + # apt_development + echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" - apt-get install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 - | - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + # apt_development + echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" + # make + echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 - | - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + # make + echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" -build-i686-linux-gnu: +Debian stable:i386: <<: *job_build artifacts: paths: - - "bin/lsdl2srb2*" + - "bin/" + - "src/comptime.h" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686" variables: @@ -231,29 +281,36 @@ build-i686-linux-gnu: script: - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" + # apt_toolchain + echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc-i686-linux-gnu || apt-get install gcc - | - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + # apt_toolchain + echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" + # apt_development + echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" - apt-get install libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 - | - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + # apt_development + echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" + # make + echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 - | - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + # make + echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" -build-aarch64-linux-gnu: +Debian stable:arm64: <<: *job_build artifacts: paths: - - "bin/lsdl2srb2*" + - "bin/" + - "src/comptime.h" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-aarch64" variables: @@ -264,29 +321,37 @@ build-aarch64-linux-gnu: script: - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" + # apt_toolchain + echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc-aarch64-linux-gnu || apt-get install gcc - | - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + # apt_toolchain + echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" + # apt_development + echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" - apt-get install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 - | - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + # apt_development + echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" + # make + echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 - | - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + # make + echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" -build-x86_64-w64-mingw32: +Windows x64: <<: *job_build artifacts: paths: - - "bin/srb2win64.exe*" + - "bin/" + - "src/comptime.h" + expose_as: "Win64" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64" variables: @@ -294,25 +359,31 @@ build-x86_64-w64-mingw32: script: - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" + # apt_toolchain + echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc-mingw-w64-x86-64-win32 - | - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + # apt_toolchain + echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" + # make + echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 - | - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + # make + echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" -build-clang: +Debian stable Clang: <<: *job_build allow_failure: true artifacts: paths: - - "bin/lsdl2srb2*" + - "bin/" + - "src/comptime.h" + expose_as: "Debian with clang" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-clang" variables: @@ -321,34 +392,40 @@ build-clang: script: - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" + # apt_toolchain + echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install clang - | - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + # apt_toolchain + echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" + # apt_development + echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" - apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev - | - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + # apt_development + echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" + # make + echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 - | - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + # make + echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" -build-clang-testing: - <<: *job_build - - extends: build-clang +Debian testing Clang: + extends: Debian stable Clang image: debian:testing-slim artifacts: paths: - - "bin/lsdl2srb2*" + - "bin/" + - "src/comptime.h" + expose_as: "Debian testing with clang" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing-clang" variables: From 265c1ac0c8dd57a689962d72b7c103710f7bb1a7 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Tue, 17 Oct 2023 13:11:17 +0000 Subject: [PATCH 191/195] Update .gitlib-ci.yml --- .gitlab-ci.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a849aea28..f13dac2f8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -34,7 +34,7 @@ variables: - export DEBIAN_PRIORITY="low" - export DEBCONF_NONINTERACTIVE_SEEN="true" - | - # debconf + # debconf echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K" - - | # dpkg_aa @@ -67,7 +67,7 @@ variables: # Dir::Cache::Archives echo Dir::Cache::Archives "$APT_CACHE_DIR"\; | tee --append /etc/apt/apt.conf.d/99build - | - # apt_conf + # apt_conf echo -e "\e[0Ksection_end:`date +%s`:apt_conf\r\e[0K" - - | # apt_update @@ -110,7 +110,7 @@ variables: # cache.conf echo Adding ccache configution option - | - # base_dir + # base_dir echo base_dir = $PWD | tee --append ~/.ccache/ccache.conf - | # cache_dir @@ -165,6 +165,7 @@ Debian testing GCC: paths: - "bin/" - "src/comptime.h" + expose_as: "Debian GCC testing" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing-gcc" variables: @@ -231,6 +232,7 @@ Debian stable:amd64: paths: - "bin/" - "src/comptime.h" + expose_as: "Debian amd64" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" variables: @@ -271,6 +273,7 @@ Debian stable:i386: paths: - "bin/" - "src/comptime.h" + expose_as: "Debian i386" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686" variables: @@ -311,6 +314,7 @@ Debian stable:arm64: paths: - "bin/" - "src/comptime.h" + expose_as: "Debian arm64" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-aarch64" variables: @@ -383,7 +387,7 @@ Debian stable Clang: paths: - "bin/" - "src/comptime.h" - expose_as: "Debian with clang" + expose_as: "Debian Clang" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-clang" variables: @@ -412,10 +416,9 @@ Debian stable Clang: echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 - | - # make + # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" - Debian testing Clang: extends: Debian stable Clang @@ -425,7 +428,7 @@ Debian testing Clang: paths: - "bin/" - "src/comptime.h" - expose_as: "Debian testing with clang" + expose_as: "Debina Clang testing" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing-clang" variables: From eb3826782303f8a9edd22727dfacd353e8e706b0 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 20 Oct 2023 13:03:52 +0000 Subject: [PATCH 192/195] GitLab CI: More work --- .gitlab-ci.yml | 60 ++++++++++++++++++++++++-------------------------- 1 file changed, 29 insertions(+), 31 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f13dac2f8..b292bfc06 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,16 +1,9 @@ -default: - image: debian:stable-slim - -stages: # List of stages for jobs, and their order of execution - - build - variables: GIT_STRATEGY: clone GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_PATH -.job_template: &job_build # This job runs in the build stage, which runs first. - - stage: build +default: + image: debian:stable-slim cache: - key: ccache-$CI_PROJECT_PATH_SLUG-$CI_JOB_NAME_SLUG @@ -96,7 +89,7 @@ variables: - - | # apt_common echo -e "\e[0Ksection_start:`date +%s`:apt_common[collapsed=true]\r\e[0KInstalling common packages" - - apt-get install make git ccache + - apt-get install make git ccache nasm - | # apt_common echo -e "\e[0Ksection_end:`date +%s`:apt_common\r\e[0K" @@ -137,6 +130,12 @@ variables: # ccache_reset echo -e "\e[0Ksection_end:`date +%s`:ccache_reset\r\e[0K" + artifacts: + paths: + - "bin/" + - "src/comptime.h" + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-$CI_JOB_NAME_SLUG" + after_script: - - | # apt_clean @@ -155,21 +154,21 @@ variables: # ccahe_stats echo -e "\e[0Ksection_end:`date +%s`:ccache_stats\r\e[0K" +stages: + - build + Debian testing GCC: - <<: *job_build + stage: build image: debian:testing-slim allow_failure: true artifacts: - paths: - - "bin/" - - "src/comptime.h" - expose_as: "Debian GCC testing" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing-gcc" variables: CC: gcc + LDFLAGS: -Wl,-fuse-ld=gold script: - - | @@ -197,12 +196,13 @@ Debian testing GCC: echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" Windows x86: - <<: *job_build + stage: build artifacts: paths: - "bin/" - "src/comptime.h" + expose_as: "Win32" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" variables: @@ -220,13 +220,13 @@ Windows x86: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 SDL=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 SDL=1 - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" Debian stable:amd64: - <<: *job_build + stage: build artifacts: paths: @@ -237,6 +237,7 @@ Debian stable:amd64: variables: CC: x86_64-linux-gnu-gcc + LDFLAGS: -Wl,-fuse-ld=gold OBJCOPY: x86_64-linux-gnu-objcopy OBJDUMP: x86_64-linux-gnu-objdump PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig @@ -267,7 +268,7 @@ Debian stable:amd64: echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" Debian stable:i386: - <<: *job_build + stage: build artifacts: paths: @@ -308,7 +309,7 @@ Debian stable:i386: echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" Debian stable:arm64: - <<: *job_build + stage: build artifacts: paths: @@ -319,6 +320,7 @@ Debian stable:arm64: variables: CC: aarch64-linux-gnu-gcc + LDFLAGS: -Wl,-fuse-ld=gold OBJCOPY: aarch64-linux-gnu-objcopy OBJDUMP: aarch64-linux-gnu-objdump PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig @@ -349,7 +351,7 @@ Debian stable:arm64: echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" Windows x64: - <<: *job_build + stage: build artifacts: paths: @@ -373,26 +375,24 @@ Windows x64: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 SDL=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 SDL=1 - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" Debian stable Clang: - <<: *job_build + stage: build allow_failure: true artifacts: - paths: - - "bin/" - - "src/comptime.h" - expose_as: "Debian Clang" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-clang" variables: CC: clang + WFLAGS: -Wno-cast-align CFLAGS: -Wno-cast-align + LDFLAGS: -Wl,-fuse-ld=gold script: - - | @@ -425,12 +425,10 @@ Debian testing Clang: image: debian:testing-slim artifacts: - paths: - - "bin/" - - "src/comptime.h" - expose_as: "Debina Clang testing" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing-clang" variables: CC: clang + WFLAGS: -Wno-cast-align -Wno-deprecated-non-prototype CFLAGS: -Wno-cast-align -Wno-deprecated-non-prototype + LDFLAGS: -Wl,-fuse-ld=gold From b544c4202ad6dd5a1ecb3a86f707bace4919b9ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustaf=20Alh=C3=A4ll?= Date: Thu, 19 Oct 2023 18:05:16 +0200 Subject: [PATCH 193/195] Fix FreeBSD build errors (again) --- src/sdl/i_system.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index 98e036130..2a26f3f50 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -3038,11 +3038,11 @@ size_t I_GetFreeMem(size_t *total) #ifdef FREEBSD u_int v_free_count, v_page_size, v_page_count; size_t size = sizeof(v_free_count); - sysctlbyname("vm.stat.vm.v_free_count", &v_free_count, &size, NULL, 0); - size_t size = sizeof(v_page_size); - sysctlbyname("vm.stat.vm.v_page_size", &v_page_size, &size, NULL, 0); - size_t size = sizeof(v_page_count); - sysctlbyname("vm.stat.vm.v_page_count", &v_page_count, &size, NULL, 0); + sysctlbyname("vm.stats.vm.v_free_count", &v_free_count, &size, NULL, 0); + size = sizeof(v_page_size); + sysctlbyname("vm.stats.vm.v_page_size", &v_page_size, &size, NULL, 0); + size = sizeof(v_page_count); + sysctlbyname("vm.stats.vm.v_page_count", &v_page_count, &size, NULL, 0); if (total) *total = v_page_count * v_page_size; From 610fd76edb2a79bab3a9dbb243b05f6e1f4a9561 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 22 Oct 2023 11:09:58 -0400 Subject: [PATCH 194/195] dummy: fixup warnings --- src/dummy/i_system.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/dummy/i_system.c b/src/dummy/i_system.c index 125d2e8ae..70e1ef4ec 100644 --- a/src/dummy/i_system.c +++ b/src/dummy/i_system.c @@ -14,13 +14,18 @@ size_t I_GetFreeMem(size_t *total) return 0; } -void I_Sleep(UINT32 ms){} +void I_Sleep(UINT32 ms) +{ + (void)ms; +} -precise_t I_GetPreciseTime(void) { +precise_t I_GetPreciseTime(void) +{ return 0; } -UINT64 I_GetPrecisePrecision(void) { +UINT64 I_GetPrecisePrecision(void) +{ return 1000000; } @@ -182,10 +187,12 @@ const char *I_ClipboardPaste(void) size_t I_GetRandomBytes(char *destination, size_t amount) { + (void)destination; + (void)amount; return 0; } -void I_RegisterSysCommands(void) {} +void I_RegisterSysCommands(void){} void I_GetCursorPosition(INT32 *x, INT32 *y) { From 6fac101cbeee6fe278c910047e32fb936720b699 Mon Sep 17 00:00:00 2001 From: Logan Arias Date: Sun, 22 Oct 2023 11:49:23 -0400 Subject: [PATCH 195/195] Disable libcurl when building without network support --- src/Makefile.d/features.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Makefile.d/features.mk b/src/Makefile.d/features.mk index 653100cb5..a66779c07 100644 --- a/src/Makefile.d/features.mk +++ b/src/Makefile.d/features.mk @@ -18,6 +18,10 @@ opts+=-DHWRENDER sources+=$(call List,hardware/Sourcefile) endif +ifdef NONET +NOCURL=1 +endif + ifndef NOMD5 sources+=md5.c endif