Skip to content

Commit

Permalink
Change some conflicts with newest merge
Browse files Browse the repository at this point in the history
  • Loading branch information
kempfdaniel committed Dec 29, 2023
1 parent 997d83e commit c614075
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 38 deletions.
4 changes: 2 additions & 2 deletions src/engine/client/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ void CClient::EnterGame(int Conn)
if(State() == IClient::STATE_DEMOPLAYBACK)
return;

m_CodeRunAfterJoin[Conn] = false;
m_aCodeRunAfterJoin[Conn] = false;
m_CodeRunAfterJoinConsole[Conn] = false;

// now we will wait for two snapshots
Expand Down Expand Up @@ -1953,7 +1953,7 @@ void CClient::ProcessServerPacket(CNetChunk *pPacket, int Conn, bool Dummy)
if(g_Config.m_ClRunOnJoin[0] || g_Config.m_ClDummyDefaultEyes || g_Config.m_ClPlayerDefaultEyes)
SendMsg(Conn, &PackerTimeout, MSGFLAG_VITAL);
}
m_CodeRunAfterJoin[Conn] = true;
m_aCodeRunAfterJoin[Conn] = true;
}

// ack snapshot
Expand Down
1 change: 0 additions & 1 deletion src/engine/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ class IConfigManager : public IInterface
virtual class CConfig *Values() = 0;

virtual void RegisterCallback(SAVECALLBACKFUNC pfnFunc, void *pUserData) = 0;
virtual void RegisterTCallback(SAVECALLBACKFUNC pfnFunc, void *pUserData) = 0;

virtual void WriteLine(const char *pLine) = 0;

Expand Down
12 changes: 0 additions & 12 deletions src/engine/shared/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,6 @@ CConfigManager::CConfigManager()
m_pStorage = nullptr;
m_ConfigFile = 0;
m_NumCallbacks = 0;
m_NumTCallbacks = 0;
m_Failed = false;
}

Expand Down Expand Up @@ -568,8 +567,6 @@ bool CConfigManager::TSave()
#undef MACRO_CONFIG_COL
#undef MACRO_CONFIG_STR

for(int i = 0; i < m_NumTCallbacks; i++)
m_aTCallbacks[i].m_pfnFunc(this, m_aTCallbacks[i].m_pUserData);


if(io_sync(m_ConfigFile) != 0)
Expand Down Expand Up @@ -602,15 +599,6 @@ void CConfigManager::RegisterCallback(SAVECALLBACKFUNC pfnFunc, void *pUserData)
m_vCallbacks.emplace_back(pfnFunc, pUserData);
}

void CConfigManager::RegisterTCallback(SAVECALLBACKFUNC pfnFunc, void *pUserData)
{
dbg_assert(m_NumTCallbacks < MAX_CALLBACKS, "too many tater config callbacks");
m_aTCallbacks[m_NumTCallbacks].m_pfnFunc = pfnFunc;
m_aTCallbacks[m_NumTCallbacks].m_pUserData = pUserData;
m_NumTCallbacks++;
}


void CConfigManager::WriteLine(const char *pLine)
{
if(!m_ConfigFile ||
Expand Down
8 changes: 0 additions & 8 deletions src/engine/shared/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,6 @@ class CConfigManager : public IConfigManager
};
std::vector<SCallback> m_vCallbacks;

class IStorage *m_pStorage;
IOHANDLE m_ConfigFile;
bool m_Failed;
CCallback m_aCallbacks[MAX_CALLBACKS];

int m_NumCallbacks;
std::vector<std::string> m_vUnknownCommands;
Expand All @@ -96,9 +92,6 @@ class CConfigManager : public IConfigManager
static void Con_Toggle(IConsole::IResult *pResult, void *pUserData);
static void Con_ToggleStroke(IConsole::IResult *pResult, void *pUserData);

CCallback m_aTCallbacks[MAX_CALLBACKS];
int m_NumTCallbacks;

public:
CConfigManager();

Expand All @@ -112,7 +105,6 @@ class CConfigManager : public IConfigManager
CConfig *Values() override { return &g_Config; }

void RegisterCallback(SAVECALLBACKFUNC pfnFunc, void *pUserData) override;
void RegisterTCallback(SAVECALLBACKFUNC pfnFunc, void *pUserData) override;

void WriteLine(const char *pLine) override;

Expand Down
2 changes: 1 addition & 1 deletion src/game/client/components/bindwheel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void CBindWheel::OnConsoleInit()
{
IConfigManager *pConfigManager = Kernel()->RequestInterface<IConfigManager>();
if(pConfigManager)
pConfigManager->RegisterTCallback(ConfigSaveCallback, this);
pConfigManager->RegisterCallback(ConfigSaveCallback, this);

Console()->Register("+bindwheel", "", CFGFLAG_CLIENT, ConBindwheel, this, "Open bindwheel selector");
Console()->Register("bindwheel", "i[bindwheel] s[description:128] s[command:10]", CFGFLAG_CLIENT, ConBind, this, "Edit the command");
Expand Down
16 changes: 9 additions & 7 deletions src/game/client/components/menus_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ void CMenus::RenderSettingsTee(CUIRect MainView)
if(*pUseCustomColor)
{
RandomColorsButton.VSplitLeft(120.0f, &RandomColorsButton, 0);
if(DoButton_Menu(&s_RandomizeColors, "Randomize Colors", 0, &RandomColorsButton, 0, IGraphics::CORNER_ALL, 5.0f, 0.0f, vec4(0, 0, 0, 0.5f), vec4(0, 0, 0, 0.25f)))
if(DoButton_Menu(&s_RandomizeColors, "Randomize Colors", 0, &RandomColorsButton, nullptr, IGraphics::CORNER_ALL, 5.0f))
{
if(m_Dummy)
{
Expand Down Expand Up @@ -3424,13 +3424,15 @@ void CMenus::RenderSettingsTClient(CUIRect MainView)
ExtMenu.VSplitRight(130.0f, 0, &ExtMenu);
ExtMenu.HSplitBottom(25.0f, &ExtMenu, &Button);
static CButtonContainer s_DiscordButton;
if(DoButton_Menu(&s_DiscordButton, Localize("Discord"), 0, &Button, 0, IGraphics::CORNER_ALL, 5.0f, 0.0f, vec4(0.0f, 0.0f, 0.0f, 0.5f), vec4(0.0f, 0.0f, 0.0f, 0.25f)))

if(DoButton_Menu(&s_DiscordButton, Localize("Discord"), 0, &Button, 0, IGraphics::CORNER_ALL))
{
if(!open_link("https://discord.gg/fBvhH93Bt6"))
{
dbg_msg("menus", "couldn't open link");
}
}
}

}
}
// ***** PAGE 2 ***** //
Expand Down Expand Up @@ -4015,7 +4017,7 @@ void CMenus::RenderSettingsProfiles(CUIRect MainView)
LabelRight.HSplitTop(30.0f, &Button, &LabelRight);
static CButtonContainer s_LoadButton;

if(DoButton_Menu(&s_LoadButton, Localize("Load"), 0, &Button, 0, IGraphics::CORNER_ALL, 5.0f, 0.0f, vec4(0.0f, 0.0f, 0.0f, 0.5f), vec4(0.0f, 0.0f, 0.0f, 0.25f)))
if(DoButton_Menu(&s_LoadButton, Localize("Load"), 0, &Button, 0, IGraphics::CORNER_ALL))
{
if(SelectedProfile != -1 && SelectedProfile < (int)GameClient()->m_SkinProfiles.m_Profiles.size())
{
Expand Down Expand Up @@ -4063,7 +4065,7 @@ void CMenus::RenderSettingsProfiles(CUIRect MainView)

LabelRight.HSplitTop(30.0f, &Button, &LabelRight);
static CButtonContainer s_SaveButton;
if(DoButton_Menu(&s_SaveButton, Localize("Save"), 0, &Button, 0, IGraphics::CORNER_ALL, 5.0f, 0.0f, vec4(0.0f, 0.0f, 0.0f, 0.5f), vec4(0.0f, 0.0f, 0.0f, 0.25f)))
if(DoButton_Menu(&s_SaveButton, Localize("Save"), 0, &Button, 0, IGraphics::CORNER_ALL))
{
GameClient()->m_SkinProfiles.AddProfile(
doColors ? *pColorBody : -1,
Expand All @@ -4085,7 +4087,7 @@ void CMenus::RenderSettingsProfiles(CUIRect MainView)
{
LabelRight.HSplitTop(28.0f, &Button, &LabelRight);
static CButtonContainer s_DeleteButton;
if(DoButton_Menu(&s_DeleteButton, Localize("Delete"), 0, &Button, 0, IGraphics::CORNER_ALL, 5.0f, 0.0f, vec4(0.0f, 0.0f, 0.0f, 0.5f), vec4(0.0f, 0.0f, 0.0f, 0.25f)))
if(DoButton_Menu(&s_DeleteButton, Localize("Delete"), 0, &Button, 0, IGraphics::CORNER_ALL))
{
if(SelectedProfile != -1 && SelectedProfile < (int)GameClient()->m_SkinProfiles.m_Profiles.size())
{
Expand All @@ -4097,7 +4099,7 @@ void CMenus::RenderSettingsProfiles(CUIRect MainView)

LabelRight.HSplitTop(28.0f, &Button, &LabelRight);
static CButtonContainer s_OverrideButton;
if(DoButton_Menu(&s_OverrideButton, Localize("Override"), 0, &Button, 0, IGraphics::CORNER_ALL, 5.0f, 0.0f, vec4(0.0f, 0.0f, 0.0f, 0.5f), vec4(0.0f, 0.0f, 0.0f, 0.25f)))
if(DoButton_Menu(&s_OverrideButton, Localize("Override"), 0, &Button, 0, IGraphics::CORNER_ALL))
{
if(SelectedProfile != -1 && SelectedProfile < (int)GameClient()->m_SkinProfiles.m_Profiles.size())
{
Expand Down
16 changes: 9 additions & 7 deletions src/game/client/render_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -906,6 +906,7 @@ void CRenderTools::RenderGameTileOutlines(CTile *pTiles, int w, int h, float Sca
Graphics()->QuadsEnd();
Graphics()->MapScreen(ScreenX0, ScreenY0, ScreenX1, ScreenY1);
}

void CRenderTools::RenderTeleOutlines(CTile *pTiles, CTeleTile *pTele, int w, int h, float Scale, float Alpha)
{
float ScreenX0, ScreenY0, ScreenX1, ScreenY1;
Expand Down Expand Up @@ -1035,6 +1036,7 @@ void CRenderTools::RenderTeleOutlines(CTile *pTiles, CTeleTile *pTele, int w, in
Graphics()->QuadsEnd();
Graphics()->MapScreen(ScreenX0, ScreenY0, ScreenX1, ScreenY1);
}

void CRenderTools::RenderTeleOverlay(CTeleTile *pTele, int w, int h, float Scale, float Alpha)
{
if(!g_Config.m_ClTextEntities)
Expand Down Expand Up @@ -1090,7 +1092,7 @@ void CRenderTools::RenderTeleOverlay(CTeleTile *pTele, int w, int h, float Scale
Graphics()->MapScreen(ScreenX0, ScreenY0, ScreenX1, ScreenY1);
}

void CRenderTools::RenderSpeedupOverlay(CSpeedupTile *pSpeedup, int w, int h, float Scale, float Alpha) const
void CRenderTools::RenderSpeedupOverlay(CSpeedupTile *pSpeedup, int w, int h, float Scale, float Alpha)
{
float ScreenX0, ScreenY0, ScreenX1, ScreenY1;
Graphics()->GetScreen(&ScreenX0, &ScreenY0, &ScreenX1, &ScreenY1);
Expand Down Expand Up @@ -1157,7 +1159,7 @@ void CRenderTools::RenderSpeedupOverlay(CSpeedupTile *pSpeedup, int w, int h, fl
Graphics()->MapScreen(ScreenX0, ScreenY0, ScreenX1, ScreenY1);
}

void CRenderTools::RenderSwitchOverlay(CSwitchTile *pSwitch, int w, int h, float Scale, float Alpha) const
void CRenderTools::RenderSwitchOverlay(CSwitchTile *pSwitch, int w, int h, float Scale, float Alpha)
{
if(!g_Config.m_ClTextEntities)
return;
Expand Down Expand Up @@ -1215,7 +1217,7 @@ void CRenderTools::RenderSwitchOverlay(CSwitchTile *pSwitch, int w, int h, float
Graphics()->MapScreen(ScreenX0, ScreenY0, ScreenX1, ScreenY1);
}

void CRenderTools::RenderTuneOverlay(CTuneTile *pTune, int w, int h, float Scale, float Alpha) const
void CRenderTools::RenderTuneOverlay(CTuneTile *pTune, int w, int h, float Scale, float Alpha)
{
if(!g_Config.m_ClTextEntities)
return;
Expand Down Expand Up @@ -1265,7 +1267,7 @@ void CRenderTools::RenderTuneOverlay(CTuneTile *pTune, int w, int h, float Scale
Graphics()->MapScreen(ScreenX0, ScreenY0, ScreenX1, ScreenY1);
}

void CRenderTools::RenderTelemap(CTeleTile *pTele, int w, int h, float Scale, ColorRGBA Color, int RenderFlags) const
void CRenderTools::RenderTelemap(CTeleTile *pTele, int w, int h, float Scale, ColorRGBA Color, int RenderFlags)
{
float ScreenX0, ScreenY0, ScreenX1, ScreenY1;
Graphics()->GetScreen(&ScreenX0, &ScreenY0, &ScreenX1, &ScreenY1);
Expand Down Expand Up @@ -1382,7 +1384,7 @@ void CRenderTools::RenderTelemap(CTeleTile *pTele, int w, int h, float Scale, Co
Graphics()->MapScreen(ScreenX0, ScreenY0, ScreenX1, ScreenY1);
}

void CRenderTools::RenderSpeedupmap(CSpeedupTile *pSpeedupTile, int w, int h, float Scale, ColorRGBA Color, int RenderFlags) const
void CRenderTools::RenderSpeedupmap(CSpeedupTile *pSpeedupTile, int w, int h, float Scale, ColorRGBA Color, int RenderFlags)
{
//Graphics()->TextureSet(img_get(tmap->image));
float ScreenX0, ScreenY0, ScreenX1, ScreenY1;
Expand Down Expand Up @@ -1501,7 +1503,7 @@ void CRenderTools::RenderSpeedupmap(CSpeedupTile *pSpeedupTile, int w, int h, fl
Graphics()->MapScreen(ScreenX0, ScreenY0, ScreenX1, ScreenY1);
}

void CRenderTools::RenderSwitchmap(CSwitchTile *pSwitchTile, int w, int h, float Scale, ColorRGBA Color, int RenderFlags) const
void CRenderTools::RenderSwitchmap(CSwitchTile *pSwitchTile, int w, int h, float Scale, ColorRGBA Color, int RenderFlags)
{
//Graphics()->TextureSet(img_get(tmap->image));
float ScreenX0, ScreenY0, ScreenX1, ScreenY1;
Expand Down Expand Up @@ -1663,7 +1665,7 @@ void CRenderTools::RenderSwitchmap(CSwitchTile *pSwitchTile, int w, int h, float
Graphics()->MapScreen(ScreenX0, ScreenY0, ScreenX1, ScreenY1);
}

void CRenderTools::RenderTunemap(CTuneTile *pTune, int w, int h, float Scale, ColorRGBA Color, int RenderFlags) const
void CRenderTools::RenderTunemap(CTuneTile *pTune, int w, int h, float Scale, ColorRGBA Color, int RenderFlags)
{
float ScreenX0, ScreenY0, ScreenX1, ScreenY1;
Graphics()->GetScreen(&ScreenX0, &ScreenY0, &ScreenX1, &ScreenY1);
Expand Down

0 comments on commit c614075

Please sign in to comment.