From 49fcf3e4865bb08be4a6f18a81f8347e1ea3af7f Mon Sep 17 00:00:00 2001 From: Alug Date: Mon, 29 Jul 2024 22:45:39 +0200 Subject: [PATCH] rename to G_SetPlayerGamepadIndicatorColor --- src/d_netcmd.c | 10 +++++----- src/g_game.c | 4 ++-- src/g_input.c | 6 +++--- src/g_input.h | 2 +- src/lua_baselib.c | 2 +- src/m_menu.c | 6 +++--- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 03c3dc93e..3103b4fc8 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -6065,7 +6065,7 @@ static void Command_SkinSearch(void) */ static void Color_OnChange(void) { - G_SetPlayerGamepadIndicatorToPlayerColor(0, 0); // i want this to always change so its here + G_SetPlayerGamepadIndicatorColor(0, 0); // i want this to always change so its here if (!Playing()) return; // do whatever you want @@ -6087,7 +6087,7 @@ static void Color_OnChange(void) players[consoleplayer].skincolor); } - G_SetPlayerGamepadIndicatorToPlayerColor(0, 0); // update again + G_SetPlayerGamepadIndicatorColor(0, 0); // update again } /** Sends a color change for the secondary splitscreen player, unless that @@ -6111,7 +6111,7 @@ static void Color2_OnChange(void) players[displayplayers[1]].skincolor); } - G_SetPlayerGamepadIndicatorToPlayerColor(1, 0); + G_SetPlayerGamepadIndicatorColor(1, 0); } static void Color3_OnChange(void) @@ -6130,7 +6130,7 @@ static void Color3_OnChange(void) players[displayplayers[2]].skincolor); } - G_SetPlayerGamepadIndicatorToPlayerColor(2, 0); + G_SetPlayerGamepadIndicatorColor(2, 0); } static void Color4_OnChange(void) @@ -6149,7 +6149,7 @@ static void Color4_OnChange(void) players[displayplayers[3]].skincolor); } - G_SetPlayerGamepadIndicatorToPlayerColor(3, 0); + G_SetPlayerGamepadIndicatorColor(3, 0); } /** Displays the result of the chat being muted or unmuted. diff --git a/src/g_game.c b/src/g_game.c index 8c7431ff8..2101d9fb2 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -2151,7 +2151,7 @@ void G_ResetView(UINT8 viewnum, INT32 playernum, boolean onlyactive) if (viewnum == 1 && demo.playback) consoleplayer = displayplayers[0]; - G_SetPlayerGamepadIndicatorToPlayerColor(viewnum-1, 0); + G_SetPlayerGamepadIndicatorColor(viewnum-1, 0); } // @@ -8542,7 +8542,7 @@ void G_SetGamestate(gamestate_t newstate) gamestate = newstate; for (i = 0; i <= splitscreen; i++) - G_SetPlayerGamepadIndicatorToPlayerColor(i, 0); // dumb hack but works + G_SetPlayerGamepadIndicatorColor(i, 0); // dumb hack but works #ifdef HAVE_DISCORDRPC DRPC_UpdatePresence(); diff --git a/src/g_input.c b/src/g_input.c index 4e5b8b1ba..3177da488 100644 --- a/src/g_input.c +++ b/src/g_input.c @@ -16,7 +16,6 @@ #include "g_input.h" #include "g_game.h" #include "keys.h" -#include "k_kart.h" #include "hu_stuff.h" // need HUFONT start & end #include "d_net.h" #include "console.h" @@ -864,6 +863,8 @@ static const char *gamecontrolname[num_gamecontrols] = #define NUMKEYNAMES (sizeof (keynames)/sizeof (keyname_t)) +#include "k_kart.h" + static INT32 G_GetDeviceForPlayer(INT32 player) { switch (player) @@ -911,8 +912,7 @@ static UINT16 G_GetSkinColor(INT32 player) } } -// ehhhhhh ill maybe add splitscreen support eventually lol -void G_SetPlayerGamepadIndicatorToPlayerColor(INT32 player, UINT16 color) +void G_SetPlayerGamepadIndicatorColor(INT32 player, UINT16 color) { INT32 device; UINT16 skincolor; diff --git a/src/g_input.h b/src/g_input.h index f3230b0f3..dac5bd3f8 100644 --- a/src/g_input.h +++ b/src/g_input.h @@ -132,7 +132,7 @@ extern INT32 gamecontrol4[num_gamecontrols][2]; // peace to my little coder fingers! // check a gamecontrol being active or not -void G_SetPlayerGamepadIndicatorToPlayerColor(INT32 player, UINT16 color); +void G_SetPlayerGamepadIndicatorColor(INT32 player, UINT16 color); void G_PlayerDeviceRumble(INT32 player, UINT16 low_strength, UINT16 high_strength); // remaps the input event to a game control. diff --git a/src/lua_baselib.c b/src/lua_baselib.c index be561e7ba..da0fd5724 100644 --- a/src/lua_baselib.c +++ b/src/lua_baselib.c @@ -3266,4 +3266,4 @@ int LUA_BaseLib(lua_State *L) lua_pushvalue(L, LUA_GLOBALSINDEX); luaL_register(L, NULL, lib); return 0; -} \ No newline at end of file +} diff --git a/src/m_menu.c b/src/m_menu.c index 08098fc88..033cae5db 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -11255,7 +11255,7 @@ static void M_HandleSetupMultiPlayer(INT32 choice) { S_StartSound(NULL,sfx_menu1); // Tails setupm_fakecolor--; - G_SetPlayerGamepadIndicatorToPlayerColor(setupm_playernum, setupm_fakecolor); + G_SetPlayerGamepadIndicatorColor(setupm_playernum, setupm_fakecolor); } break; @@ -11311,7 +11311,7 @@ static void M_HandleSetupMultiPlayer(INT32 choice) { S_StartSound(NULL,sfx_menu1); // Tails setupm_fakecolor++; - G_SetPlayerGamepadIndicatorToPlayerColor(setupm_playernum, setupm_fakecolor); + G_SetPlayerGamepadIndicatorColor(setupm_playernum, setupm_fakecolor); } break; @@ -11351,7 +11351,7 @@ static void M_HandleSetupMultiPlayer(INT32 choice) { S_StartSound(NULL,sfx_menu1); // Tails setupm_fakecolor = col; - G_SetPlayerGamepadIndicatorToPlayerColor(setupm_playernum, setupm_fakecolor); + G_SetPlayerGamepadIndicatorColor(setupm_playernum, setupm_fakecolor); } } break;