Skip to content

Commit

Permalink
partially fix clang format issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sjrc6 committed Nov 20, 2024
1 parent 0e5ca98 commit c943894
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 42 deletions.
3 changes: 2 additions & 1 deletion src/engine/client/smooth_time.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ int64_t CSmoothTime::Get(int64_t Now) const

void CSmoothTime::UpdateInt(int64_t Target)
{
if (g_Config.m_ClSmoothPredictionMargin) {
if(g_Config.m_ClSmoothPredictionMargin)
{
int64_t Now = time_get();
m_Current = Get(Now) - GetMargin(Now);
m_Snap = Now;
Expand Down
5 changes: 2 additions & 3 deletions src/game/client/components/bindwheel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ void CBindWheel::OnRender()

char aBuf[MAX_BINDWHEEL_DESC];
str_format(aBuf, sizeof(aBuf), "%s", m_BindWheelList[i].description);
//str_format(aBuf, sizeof(aBuf), "%d -> %d", inv, orgAngle);
// str_format(aBuf, sizeof(aBuf), "%d -> %d", inv, orgAngle);
float x = Screen.w / 2 + NudgeX - TextRender()->TextWidth(Size, aBuf, -1, -1.0f) * 0.5;
float y = Screen.h / 2 + NudgeY;
float LineWidth = -1.0f;
Expand Down Expand Up @@ -191,7 +191,7 @@ void CBindWheel::OnRender()

void CBindWheel::Binwheel(int Bind)
{
//bindwheel 0 "123456789" "say hey"
// bindwheel 0 "123456789" "say hey"
Console()->ExecuteLine(m_BindWheelList[Bind].command);
}

Expand Down Expand Up @@ -220,4 +220,3 @@ void CBindWheel::ConfigSaveCallback(IConfigManager *pConfigManager, void *pUserD
pConfigManager->WriteLine(aBuf);
}
}

10 changes: 5 additions & 5 deletions src/game/client/components/nameplates.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ void CNamePlates::OnRender()
// this may need to be changed or calculated differently in the future
ScreenX0 -= 400;
ScreenX1 += 400;
//ScreenY0 -= 0;
// ScreenY0 -= 0;
ScreenY1 += 800;

for(int i = 0; i < MAX_CLIENTS; i++)
Expand All @@ -342,10 +342,10 @@ void CNamePlates::OnRender()
// don't render offscreen
if(in_range(RenderPos.x, ScreenX0, ScreenX1) && in_range(RenderPos.y, ScreenY0, ScreenY1))
{
if(!g_Config.m_ClRenderNameplateSpec)
{
RenderNameplate(RenderPos, pInfo, 0.4f, true);
}
if(!g_Config.m_ClRenderNameplateSpec)
{
RenderNameplate(RenderPos, pInfo, 0.4f, true);
}
}
}
if(m_pClient->m_Snap.m_aCharacters[i].m_Active)
Expand Down
19 changes: 8 additions & 11 deletions src/game/client/components/rainbow.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,17 @@

class CRainbow : public CComponent
{



public:
virtual int Sizeof() const override { return sizeof(*this); }
virtual void OnRender() override;
void TransformColor(unsigned char mode, int tick, CTeeRenderInfo *pinfo);
enum COLORMODE
{
COLORMODE_RAINBOW = 1,
COLORMODE_PULSE,
COLORMODE_DARKNESS,
};

void TransformColor(unsigned char mode, int tick, CTeeRenderInfo *pinfo);
enum COLORMODE
{
COLORMODE_RAINBOW = 1,
COLORMODE_PULSE,
COLORMODE_DARKNESS,
};
};

#endif
6 changes: 3 additions & 3 deletions src/game/client/components/skinprofiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ void CSkinProfiles::AddProfile(int BodyColor, int FeetColor, int CountryFlag, in
{
CProfile profile = CProfile(BodyColor, FeetColor, CountryFlag, Emote, pSkinName, pName, pClan);

//str_copy(profile.SkinName, pSkinName, sizeof(profile.SkinName));
//str_copy(profile.Clan, pClan, sizeof(profile.Clan));
//str_copy(profile.Name, pName, sizeof(profile.Name));
// str_copy(profile.SkinName, pSkinName, sizeof(profile.SkinName));
// str_copy(profile.Clan, pClan, sizeof(profile.Clan));
// str_copy(profile.Name, pName, sizeof(profile.Name));

m_Profiles.push_back(profile);
}
Expand Down
18 changes: 9 additions & 9 deletions src/game/client/components/skinprofiles.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#include <engine/console.h>
#include <engine/keys.h>
#include <engine/shared/protocol.h>
#include <vector>
#include <game/client/component.h>
#include <vector>

#define PROFILES_FILE "tclient_profiles.cfg"

Expand Down Expand Up @@ -33,16 +33,16 @@ class CProfile

class CSkinProfiles : public CComponent
{
static void ConAddProfile(IConsole::IResult* pResult, void* pUserData);
static void ConAddProfile(IConsole::IResult *pResult, void *pUserData);
class IStorage *m_pStorage;
IOHANDLE m_ProfilesFile;

public:
std::vector<CProfile> m_Profiles;
void AddProfile(int BodyColor, int FeetColor, int CountryFlag, int Emote, const char *pSkinName, const char *pName, const char *pClan);
bool SaveProfiles();
void WriteLine(const char *pLine);
virtual int Sizeof() const override { return sizeof(*this); }
virtual void OnInit() override;
public:
std::vector<CProfile> m_Profiles;
void AddProfile(int BodyColor, int FeetColor, int CountryFlag, int Emote, const char *pSkinName, const char *pName, const char *pClan);
bool SaveProfiles();
void WriteLine(const char *pLine);
virtual int Sizeof() const override { return sizeof(*this); }
virtual void OnInit() override;
};
#endif
2 changes: 1 addition & 1 deletion src/game/client/components/tater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ void CTater::RandomSkin(void *pUserData)

// get all skins as a maps
const std::unordered_map<std::string_view, std::unique_ptr<CSkin>> &skins = pThis->m_pClient->m_Skins.GetSkinsUnsafe();

// map to array
int counter = 0;
std::vector<std::pair<std::string_view, CSkin *>> skinArray;
Expand Down
14 changes: 6 additions & 8 deletions src/game/client/components/tater.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,18 @@

class CTater : public CComponent
{

static void ConRandomTee(IConsole::IResult *pResult, void *pUserData);
static void ConchainRandomColor(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
static void RandomBodyColor();
static void RandomFeetColor();
static void RandomSkin(void *pUserData);
static void RandomFlag(void *pUserData);
static void ConchainRandomColor(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
static void RandomBodyColor();
static void RandomFeetColor();
static void RandomSkin(void *pUserData);
static void RandomFlag(void *pUserData);

public:
CTater();
virtual int Sizeof() const override { return sizeof(*this); }

virtual void OnConsoleInit() override;


};

#endif
2 changes: 1 addition & 1 deletion src/game/client/components/verify.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <engine/engine.h>
#include <engine/graphics.h>
#include <engine/shared/config.h>
#include <engine/engine.h>

#include <game/client/animstate.h>
#include <game/client/render.h>
Expand Down

0 comments on commit c943894

Please sign in to comment.