From 6445ef3b70ec558b1782254fd7441a96788ecfbb Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 11 Nov 2022 20:21:49 -0500 Subject: [PATCH 1/7] Update .gitignore Ignore CMake's build folders --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 7023aaa80..cd828dc11 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,5 @@ Win32_LIB_ASM_Release /assets/debian /make /bin +/build +/build.* From 7e0fa2d34c3449e21b907e78bbcc59f13ceca943 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 11 Nov 2022 20:38:52 -0500 Subject: [PATCH 2/7] Cleanup whitespace changes from SRB2_release_2.2.9 --- extras/conf/SRB2-22.cfg | 2 +- src/b_bot.c | 10 +++++----- src/d_player.h | 4 ++-- src/hardware/hw_main.c | 4 ++-- src/p_mobj.c | 2 +- src/p_saveg.c | 6 +++--- src/r_skins.c | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/extras/conf/SRB2-22.cfg b/extras/conf/SRB2-22.cfg index 558014073..bf1d45f9d 100644 --- a/extras/conf/SRB2-22.cfg +++ b/extras/conf/SRB2-22.cfg @@ -6884,7 +6884,7 @@ thingtypes { color = 10; // Green title = "Tutorial"; - + 799 { title = "Tutorial Plant"; diff --git a/src/b_bot.c b/src/b_bot.c index 775a13e29..a12aedcf5 100644 --- a/src/b_bot.c +++ b/src/b_bot.c @@ -30,7 +30,7 @@ void B_UpdateBotleader(player_t *player) { if (players[i].bot || players[i].playerstate != PST_LIVE || players[i].spectator || !players[i].mo) continue; - + if (!player->botleader) { player->botleader = &players[i]; // set default @@ -85,7 +85,7 @@ static void B_BuildTailsTiccmd(mobj_t *sonic, mobj_t *tails, ticcmd_t *cmd) boolean stalled = (bmom < scale >> 1) && dist > followthres; // Helps to see if the AI is having trouble catching up boolean samepos = (sonic->x == tails->x && sonic->y == tails->y); boolean blocked = bot->blocked; - + if (!samepos) ang = R_PointToAngle2(tails->x, tails->y, sonic->x, sonic->y); @@ -448,10 +448,10 @@ void B_KeysToTiccmd(mobj_t *mo, ticcmd_t *cmd, boolean forward, boolean backward cmd->forwardmove += MAXPLMOVE<>16; if (backward) cmd->forwardmove -= MAXPLMOVE<>16; - if (left) + if (left) cmd->angleturn += 1280; if (right) - cmd->angleturn -= 1280; + cmd->angleturn -= 1280; if (strafeleft) cmd->sidemove -= MAXPLMOVE<>16; if (straferight) @@ -486,7 +486,7 @@ boolean B_CheckRespawn(player_t *player) //We don't have a main player to spawn to! if (!player->botleader) return false; - + sonic = player->botleader->mo; // We can't follow Sonic if he's not around! if (!sonic || sonic->health <= 0) diff --git a/src/d_player.h b/src/d_player.h index 755926480..c5c637d37 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -344,7 +344,7 @@ typedef struct botmem_s { boolean lastForward; boolean lastBlocked; - boolean blocked; + boolean blocked; UINT8 catchup_tics; UINT8 thinkstate; } botmem_t; @@ -565,7 +565,7 @@ typedef struct player_s UINT16 lastbuttons; botmem_t botmem; boolean blocked; - + tic_t jointime; // Timer when player joins game to change skin/color tic_t quittime; // Time elapsed since user disconnected, zero if connected #ifdef HWRENDER diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 92076e644..2bd7c5071 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -16,7 +16,7 @@ #ifdef HWRENDER #include "hw_glob.h" -#include "hw_light.h" +#include "hw_light.h #include "hw_drv.h" #include "hw_batching.h" @@ -3222,7 +3222,7 @@ static void HWR_Subsector(size_t num) *rover->topheight, *gl_frontsector->lightlist[light].lightlevel, rover->alpha-1 > 255 ? 255 : rover->alpha-1, rover->master->frontsector, - HWR_RippleBlend(gl_frontsector, rover, false) | (rover->blend ? HWR_GetBlendModeFlag(rover->blend) : PF_Translucent), + HWR_RippleBlend(gl_frontsector, rover, false) | (rover->blend ? HWR_GetBlendModeFlag(rover->blend) : PF_Translucent), false, *gl_frontsector->lightlist[light].extra_colormap); } else diff --git a/src/p_mobj.c b/src/p_mobj.c index 17be0300a..fb3edfa43 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -10477,7 +10477,7 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type) if (type == MT_NULL) { -#if 0 +#if 0 #ifdef PARANOIA I_Error("Tried to spawn MT_NULL\n"); #endif diff --git a/src/p_saveg.c b/src/p_saveg.c index 99ec58bb9..ab7cf2347 100644 --- a/src/p_saveg.c +++ b/src/p_saveg.c @@ -202,7 +202,7 @@ static void P_NetArchivePlayers(void) WRITEUINT8(save_p, players[i].botmem.catchup_tics); WRITEUINT8(save_p, players[i].botmem.thinkstate); WRITEUINT8(save_p, players[i].removing); - + WRITEUINT8(save_p, players[i].blocked); WRITEUINT16(save_p, players[i].lastbuttons); @@ -424,7 +424,7 @@ static void P_NetUnArchivePlayers(void) // Bots // ////////// players[i].bot = READUINT8(save_p); - + players[i].botmem.lastForward = READUINT8(save_p); players[i].botmem.lastBlocked = READUINT8(save_p); players[i].botmem.catchup_tics = READUINT8(save_p); @@ -433,7 +433,7 @@ static void P_NetUnArchivePlayers(void) players[i].blocked = READUINT8(save_p); players[i].lastbuttons = READUINT16(save_p); - + //////////////////////////// // Conveyor Belt Movement // //////////////////////////// diff --git a/src/r_skins.c b/src/r_skins.c index cd53128d2..92fd6cfae 100644 --- a/src/r_skins.c +++ b/src/r_skins.c @@ -236,7 +236,7 @@ boolean R_SkinUsable(INT32 playernum, INT32 skinnum) // Force 2. return true; } - + if (metalrecording && skinnum == 5) { // Force 3. From 0c006dccdf22910a156bfcf7e0bb0becc536f49f Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 11 Nov 2022 20:46:28 -0500 Subject: [PATCH 3/7] Cleanup whitespace changes from SRB2_release_2.2.6 --- tools/masterserver/structure.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/masterserver/structure.sql b/tools/masterserver/structure.sql index 013c22383..d431419aa 100644 --- a/tools/masterserver/structure.sql +++ b/tools/masterserver/structure.sql @@ -90,7 +90,7 @@ CREATE TABLE `ms_versions` ( `mod_vstring` varchar(45) NOT NULL DEFAULT 'v1.0', `mod_codebase` int(10) unsigned NOT NULL DEFAULT 205, `mod_name` varchar(255) NOT NULL DEFAULT 'Default MOD Name', - `mod_url` text NOT NULL + `mod_url` text NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- @@ -118,4 +118,4 @@ COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; \ No newline at end of file +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; From 46186d763244b8ff0edae7899168173a4b543614 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 11 Nov 2022 20:47:41 -0500 Subject: [PATCH 4/7] Cleanup whitespace changes from SRB2_release_2.2.2 --- src/blua/liolib.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/blua/liolib.c b/src/blua/liolib.c index 5eec97fb4..e029650c0 100644 --- a/src/blua/liolib.c +++ b/src/blua/liolib.c @@ -641,4 +641,3 @@ LUALIB_API int luaopen_io (lua_State *L) { lua_pop(L, 1); /* pop environment for default files */ return 1; } - From ebf70a6f0c98bd89b410fb74e7ec1a4d1209dfe9 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 11 Nov 2022 20:56:27 -0500 Subject: [PATCH 5/7] cleanup whitespace in CircleCI build config --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a2f6ef9d1..711be39d7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -52,7 +52,7 @@ jobs: name: Install SDK command: apt-get -o Dir::Cache="/root/.cache/apt" -qq -y --no-install-recommends install git build-essential nasm 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 + name: make md5sum command: find /root/.cache/apt/archives -type f -print0 | sort -z | xargs -r0 md5sum > /root/.cache/apt_archives.md5 - save_cache: key: v1-SRB2-APT-{{ checksum "/root/.cache/apt_archives.md5" }} From 4e1976839ba6350021f464f01258f26a52067047 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 11 Nov 2022 21:07:24 -0500 Subject: [PATCH 6/7] Cleanup whitespace changes from SRB2_release_2.1.25 --- src/p_enemy.c | 2 +- src/p_user.c | 11 ++++++----- src/sdl/i_video.c | 3 ++- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/p_enemy.c b/src/p_enemy.c index 26682ee32..987e83c5e 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -11827,7 +11827,7 @@ void A_FlickyCenter(mobj_t *actor) if (actor->target && P_AproxDistance(actor->target->x - originx, actor->target->y - originy) < actor->extravalue1) { actor->extravalue2 = 1; - P_TeleportMove(actor, actor->target->x, actor->target->y, actor->target->z); + P_TeleportMove(actor, actor->target->x, actor->target->y, actor->target->z); } else if(actor->extravalue2) { diff --git a/src/p_user.c b/src/p_user.c index 1f14d96c1..0765d3e26 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -1,3 +1,4 @@ + // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. @@ -1518,8 +1519,8 @@ void P_PlayJingle(player_t *player, jingletype_t jingletype) char newmusic[7]; strncpy(newmusic, musname, 7); #ifdef HAVE_LUA_MUSICPLUS - if(LUAh_MusicJingle(jingletype, newmusic, &musflags, &looping)) - return; + if(LUAh_MusicJingle(jingletype, newmusic, &musflags, &looping)) + return; #endif newmusic[6] = 0; @@ -1609,7 +1610,7 @@ boolean P_EvaluateMusicStatus(UINT16 status, const char *musname) if (result) break; - } + } return result; } @@ -1666,8 +1667,8 @@ void P_RestoreMusic(player_t *player) else if (!S_RecallMusic(JT_NONE, false)) // go down the stack { CONS_Debug(DBG_BASIC, "Cannot find any music in resume stack!\n"); - S_ChangeMusicEx(mapmusname, mapmusflags, true, mapmusposition, 0, 0); - } + S_ChangeMusicEx(mapmusname, mapmusflags, true, mapmusposition, 0, 0); + } } // diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index a27a5ebd2..ae661761c 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -1,3 +1,4 @@ + // Emacs style mode select -*- C++ -*- // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- @@ -1068,7 +1069,7 @@ void I_GetEvent(void) // update the menu if (currentMenu == &OP_JoystickSetDef) M_SetupJoystickMenu(0); - break; + break; case SDL_QUIT: LUA_HookBool(true, HOOK(GameQuit)); I_Quit(); From e1fd0dfca3918c4a1c4a1117620cc593733429a5 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 11 Nov 2022 21:11:44 -0500 Subject: [PATCH 7/7] Cleanup whitespace changes from SRB2_release_2.1.23 --- src/p_setup.c | 2 +- src/s_sound.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/p_setup.c b/src/p_setup.c index a1c96bed3..8ec5672d2 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -1250,7 +1250,7 @@ static void P_LoadSidedefs(UINT8 *data) sd->midtexture = get_number(process); } - sd->text = Z_Malloc(7, PU_LEVEL, NULL); + sd->text = Z_Malloc(7, PU_LEVEL, NULL); if (isfrontside && !(msd->toptexture[0] == '-' && msd->toptexture[1] == '\0')) { M_Memcpy(process,msd->toptexture,8); diff --git a/src/s_sound.c b/src/s_sound.c index 7e61e8a55..fc5f51da7 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -2259,9 +2259,9 @@ void S_ChangeMusicEx(const char *mmusic, UINT16 mflags, boolean looping, UINT32 return; newmusic[6] = 0; - // No Music (empty string) + // No Music (empty string) if (newmusic[0] == 0) - { + { if (prefadems) I_FadeSong(0, prefadems, &S_StopMusic); else @@ -2279,7 +2279,7 @@ void S_ChangeMusicEx(const char *mmusic, UINT16 mflags, boolean looping, UINT32 } else if (strnicmp(music_name, newmusic, 6) || (mflags & MUSIC_FORCERESET) || (midipref != currentmidi && S_PrefAvailable(midipref, newmusic))) - { + { CONS_Debug(DBG_DETAILED, "Now playing song %s\n", newmusic); S_StopMusic(); @@ -2302,7 +2302,7 @@ void S_ChangeMusicEx(const char *mmusic, UINT16 mflags, boolean looping, UINT32 { I_SetSongPosition(position); I_FadeSong(100, fadeinms, NULL); - } +} else // reset volume to 100 with same music { I_StopFadingSong();