Skip to content

Commit

Permalink
Properly format method definitions to have no space between class nam…
Browse files Browse the repository at this point in the history
…e and scope operator

#84
  • Loading branch information
SamVanheer committed Nov 29, 2021
1 parent 4dda07c commit 12d4107
Show file tree
Hide file tree
Showing 97 changed files with 1,479 additions and 1,479 deletions.
2 changes: 1 addition & 1 deletion cl_dll/StudioModelRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1601,7 +1601,7 @@ char* sOldWeaponPModels[] =
"models/p_shotgun2.mdl"};


int CStudioModelRenderer ::ReturnDiguisedClass(int iPlayerIndex)
int CStudioModelRenderer::ReturnDiguisedClass(int iPlayerIndex)
{
m_pRenderModel = IEngineStudio.SetupPlayerModel(iPlayerIndex);

Expand Down
16 changes: 8 additions & 8 deletions cl_dll/ammo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ WeaponsResource gWR;

int g_weaponselect = 0;

void WeaponsResource ::LoadAllWeaponSprites()
void WeaponsResource::LoadAllWeaponSprites()
{
for (int i = 0; i < MAX_WEAPONS; i++)
{
Expand All @@ -48,15 +48,15 @@ void WeaponsResource ::LoadAllWeaponSprites()
}
}

int WeaponsResource ::CountAmmo(int iId)
int WeaponsResource::CountAmmo(int iId)
{
if (iId < 0)
return 0;

return riAmmo[iId];
}

bool WeaponsResource ::HasAmmo(WEAPON* p)
bool WeaponsResource::HasAmmo(WEAPON* p)
{
if (!p)
return false;
Expand All @@ -69,7 +69,7 @@ bool WeaponsResource ::HasAmmo(WEAPON* p)
}


void WeaponsResource ::LoadWeaponSprites(WEAPON* pWeapon)
void WeaponsResource::LoadWeaponSprites(WEAPON* pWeapon)
{
int i, iRes;

Expand Down Expand Up @@ -194,7 +194,7 @@ void WeaponsResource ::LoadWeaponSprites(WEAPON* pWeapon)
}

// Returns the first weapon for a given slot.
WEAPON* WeaponsResource ::GetFirstPos(int iSlot)
WEAPON* WeaponsResource::GetFirstPos(int iSlot)
{
WEAPON* pret = NULL;

Expand All @@ -211,7 +211,7 @@ WEAPON* WeaponsResource ::GetFirstPos(int iSlot)
}


WEAPON* WeaponsResource ::GetNextActivePos(int iSlot, int iSlotPos)
WEAPON* WeaponsResource::GetNextActivePos(int iSlot, int iSlotPos)
{
if (iSlotPos >= MAX_WEAPON_POSITIONS || iSlot >= MAX_WEAPON_SLOTS)
return NULL;
Expand Down Expand Up @@ -388,7 +388,7 @@ void CHudAmmo::Think()
// Helper function to return a Ammo pointer from id
//

HSPRITE* WeaponsResource ::GetAmmoPicFromWeapon(int iAmmoId, Rect& rect)
HSPRITE* WeaponsResource::GetAmmoPicFromWeapon(int iAmmoId, Rect& rect)
{
for (int i = 0; i < MAX_WEAPONS; i++)
{
Expand All @@ -410,7 +410,7 @@ HSPRITE* WeaponsResource ::GetAmmoPicFromWeapon(int iAmmoId, Rect& rect)

// Menu Selection Code

void WeaponsResource ::SelectSlot(int iSlot, bool fAdvance, int iDirection)
void WeaponsResource::SelectSlot(int iSlot, bool fAdvance, int iDirection)
{
if (gHUD.m_Menu.m_fMenuDisplayed && (!fAdvance) && (iDirection == 1))
{ // menu is overriding slot use commands
Expand Down
12 changes: 6 additions & 6 deletions cl_dll/ammo_secondary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
DECLARE_MESSAGE(m_AmmoSecondary, SecAmmoVal);
DECLARE_MESSAGE(m_AmmoSecondary, SecAmmoIcon);

bool CHudAmmoSecondary ::Init()
bool CHudAmmoSecondary::Init()
{
HOOK_MESSAGE(SecAmmoVal);
HOOK_MESSAGE(SecAmmoIcon);
Expand All @@ -43,17 +43,17 @@ bool CHudAmmoSecondary ::Init()
return true;
}

void CHudAmmoSecondary ::Reset()
void CHudAmmoSecondary::Reset()
{
m_fFade = 0;
}

bool CHudAmmoSecondary ::VidInit()
bool CHudAmmoSecondary::VidInit()
{
return true;
}

bool CHudAmmoSecondary ::Draw(float flTime)
bool CHudAmmoSecondary::Draw(float flTime)
{
if ((gHUD.m_iHideHUDDisplay & (HIDEHUD_WEAPONS | HIDEHUD_ALL)) != 0)
return true;
Expand Down Expand Up @@ -113,7 +113,7 @@ bool CHudAmmoSecondary ::Draw(float flTime)
// Message handler for Secondary Ammo Value
// accepts one value:
// string: sprite name
bool CHudAmmoSecondary ::MsgFunc_SecAmmoIcon(const char* pszName, int iSize, void* pbuf)
bool CHudAmmoSecondary::MsgFunc_SecAmmoIcon(const char* pszName, int iSize, void* pbuf)
{
BEGIN_READ(pbuf, iSize);
m_HUD_ammoicon = gHUD.GetSpriteIndex(READ_STRING());
Expand All @@ -126,7 +126,7 @@ bool CHudAmmoSecondary ::MsgFunc_SecAmmoIcon(const char* pszName, int iSize, voi
// takes two values:
// byte: ammo index
// byte: ammo value
bool CHudAmmoSecondary ::MsgFunc_SecAmmoVal(const char* pszName, int iSize, void* pbuf)
bool CHudAmmoSecondary::MsgFunc_SecAmmoVal(const char* pszName, int iSize, void* pbuf)
{
BEGIN_READ(pbuf, iSize);

Expand Down
8 changes: 4 additions & 4 deletions cl_dll/ammohistory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ struct ITEM_INFO
Rect rect;
};

void HistoryResource ::AddToHistory(int iType, int iId, int iCount)
void HistoryResource::AddToHistory(int iType, int iId, int iCount)
{
if (iType == HISTSLOT_AMMO && 0 == iCount)
return; // no amount, so don't add
Expand All @@ -63,7 +63,7 @@ void HistoryResource ::AddToHistory(int iType, int iId, int iCount)
freeslot->DisplayTime = gHUD.m_flTime + HISTORY_DRAW_TIME;
}

void HistoryResource ::AddToHistory(int iType, const char* szName, int iCount)
void HistoryResource::AddToHistory(int iType, const char* szName, int iCount)
{
if (iType != HISTSLOT_ITEM)
return;
Expand Down Expand Up @@ -91,7 +91,7 @@ void HistoryResource ::AddToHistory(int iType, const char* szName, int iCount)
}


void HistoryResource ::CheckClearHistory()
void HistoryResource::CheckClearHistory()
{
for (int i = 0; i < MAX_HISTORY; i++)
{
Expand All @@ -105,7 +105,7 @@ void HistoryResource ::CheckClearHistory()
//
// Draw Ammo pickup history
//
bool HistoryResource ::DrawAmmoHistory(float flTime)
bool HistoryResource::DrawAmmoHistory(float flTime)
{
for (int i = 0; i < MAX_HISTORY; i++)
{
Expand Down
10 changes: 5 additions & 5 deletions cl_dll/death.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ float* GetClientColor(int clientIndex)
return NULL;
}

bool CHudDeathNotice ::Init()
bool CHudDeathNotice::Init()
{
gHUD.AddHudElem(this);

Expand All @@ -86,20 +86,20 @@ bool CHudDeathNotice ::Init()
}


void CHudDeathNotice ::InitHUDData()
void CHudDeathNotice::InitHUDData()
{
memset(rgDeathNoticeList, 0, sizeof(rgDeathNoticeList));
}


bool CHudDeathNotice ::VidInit()
bool CHudDeathNotice::VidInit()
{
m_HUD_d_skull = gHUD.GetSpriteIndex("d_skull");

return true;
}

bool CHudDeathNotice ::Draw(float flTime)
bool CHudDeathNotice::Draw(float flTime)
{
int x, y, r, g, b;

Expand Down Expand Up @@ -167,7 +167,7 @@ bool CHudDeathNotice ::Draw(float flTime)
}

// This message handler may be better off elsewhere
bool CHudDeathNotice ::MsgFunc_DeathMsg(const char* pszName, int iSize, void* pbuf)
bool CHudDeathNotice::MsgFunc_DeathMsg(const char* pszName, int iSize, void* pbuf)
{
m_iFlags |= HUD_ACTIVE;

Expand Down
Loading

0 comments on commit 12d4107

Please sign in to comment.