ddnet/src/game/client/components/controls.h
Chairn a69dc599a9 Huge variable naming format
Fix pointer and pointer array variable naming

Huge renaming to match our rules

Used regex: (?!(return|delete)\b)\b\w+ (m_|ms_|g_|gs_|s_)[^a]\w+\[
            (?!(return|delete)\b)\b\w+ (?!(m_|ms_|g_|gs_|s_))[^a]\w+\[

Further format static variables

Format almost all pointer names accordingly

Used regex: (?!(return)\b)\b\w+
\*(?!(m_p|p|s_p|m_ap|s_ap|g_p|g_ap|ap|gs_ap|ms_ap|gs_p|ms_p))\w+\b[^:\(p]

clang-format

Fix CI fail

Fix misnamed non pointer as pointer and non array as array

Used regex: (?!(return|delete)\b)\b\w+ (m_|ms_|g_|gs_|s_)p\w+\b
            (?!return\b)\b\w+ (ms_|m_|g_|gs_|s_)a\w+\b[^\[]

clang-format

Revert to SCREAMING_SNAKE_CASE and reinstate dead code
2022-07-08 18:01:29 +02:00

49 lines
1.3 KiB
C++

/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
/* If you are missing that file, acquire a complete release at teeworlds.com. */
#ifndef GAME_CLIENT_COMPONENTS_CONTROLS_H
#define GAME_CLIENT_COMPONENTS_CONTROLS_H
#include <base/vmath.h>
#include <engine/client.h>
#include <game/client/component.h>
#include <game/generated/protocol.h>
class CControls : public CComponent
{
float GetMaxMouseDistance() const;
public:
vec2 m_aMousePos[NUM_DUMMIES];
vec2 m_aTargetPos[NUM_DUMMIES];
float m_OldMouseX;
float m_OldMouseY;
int m_aAmmoCount[NUM_WEAPONS];
CNetObj_PlayerInput m_aInputData[NUM_DUMMIES];
CNetObj_PlayerInput m_aLastData[NUM_DUMMIES];
int m_aInputDirectionLeft[NUM_DUMMIES];
int m_aInputDirectionRight[NUM_DUMMIES];
int m_aShowHookColl[NUM_DUMMIES];
int m_LastDummy;
int m_OtherFire;
CControls();
virtual int Sizeof() const override { return sizeof(*this); }
virtual void OnReset() override;
virtual void OnRelease() override;
virtual void OnRender() override;
virtual void OnMessage(int MsgType, void *pRawMsg) override;
virtual bool OnCursorMove(float x, float y, IInput::ECursorType CursorType) override;
virtual void OnConsoleInit() override;
virtual void OnPlayerDeath();
int SnapInput(int *pData);
void ClampMousePos();
void ResetInput(int Dummy);
};
#endif