DDraceNetwork Docs
controls.h
Go to the documentation of this file.
1/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
2/* If you are missing that file, acquire a complete release at teeworlds.com. */
3#ifndef GAME_CLIENT_COMPONENTS_CONTROLS_H
4#define GAME_CLIENT_COMPONENTS_CONTROLS_H
5
6#include <base/vmath.h>
7
8#include <engine/client.h>
9
12
13class CControls : public CComponent
14{
15 float GetMinMouseDistance() const;
16 float GetMaxMouseDistance() const;
17
18public:
22
24
31
32 CControls();
33 virtual int Sizeof() const override { return sizeof(*this); }
34
35 virtual void OnReset() override;
36 virtual void OnRender() override;
37 virtual void OnMessage(int MsgType, void *pRawMsg) override;
38 virtual bool OnCursorMove(float x, float y, IInput::ECursorType CursorType) override;
39 virtual void OnConsoleInit() override;
40 virtual void OnPlayerDeath();
41
42 int SnapInput(int *pData);
43 void ClampMousePos();
44 void ResetInput(int Dummy);
45};
46#endif
Definition: component.h:20
Definition: controls.h:14
CControls()
Definition: controls.cpp:19
virtual void OnMessage(int MsgType, void *pRawMsg) override
Definition: controls.cpp:169
int m_aAmmoCount[NUM_WEAPONS]
Definition: controls.h:23
virtual bool OnCursorMove(float x, float y, IInput::ECursorType CursorType) override
Definition: controls.cpp:366
vec2 m_aMousePos[NUM_DUMMIES]
Definition: controls.h:19
float GetMinMouseDistance() const
Definition: controls.cpp:436
int SnapInput(int *pData)
Definition: controls.cpp:181
CNetObj_PlayerInput m_aInputData[NUM_DUMMIES]
Definition: controls.h:26
vec2 m_aTargetPos[NUM_DUMMIES]
Definition: controls.h:21
void ResetInput(int Dummy)
Definition: controls.cpp:38
CNetObj_PlayerInput m_aLastData[NUM_DUMMIES]
Definition: controls.h:27
float GetMaxMouseDistance() const
Definition: controls.cpp:441
int m_aInputDirectionRight[NUM_DUMMIES]
Definition: controls.h:29
vec2 m_aMousePosOnAction[NUM_DUMMIES]
Definition: controls.h:20
void ClampMousePos()
Definition: controls.cpp:409
int64_t m_LastSendTime
Definition: controls.h:25
virtual void OnRender() override
Definition: controls.cpp:329
virtual int Sizeof() const override
Definition: controls.h:33
int m_aShowHookColl[NUM_DUMMIES]
Definition: controls.h:30
virtual void OnReset() override
Definition: controls.cpp:27
int m_aInputDirectionLeft[NUM_DUMMIES]
Definition: controls.h:28
virtual void OnConsoleInit() override
Definition: controls.cpp:110
virtual void OnPlayerDeath()
Definition: controls.cpp:52
ECursorType
Definition: input.h:39
@ NUM_DUMMIES
Definition: enums.h:8
@ NUM_WEAPONS
Definition: protocol.h:1257
Definition: protocol.h:360