-
Notifications
You must be signed in to change notification settings - Fork 0
/
player.h
60 lines (49 loc) · 1.12 KB
/
player.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#pragma once
#include "main.h"
#define STATE_AWAIT_ENTRY -1
#define STATE_SELECT_GENDER 0
#define STATE_SELECT_SKIN 1
#define STATE_SELECT_HAIR 2
#define STATE_SELECT_TEAM 3
#define STATE_READY 4
#define STATE_STANDING 5
#define STATE_WALKING 6
#define STATE_RUNNING 7
#define STATE_KNACKERED 8
#define INPUT_NONE 0
#define INPUT_LEFT 1
#define INPUT_UP 2
#define INPUT_RIGHT 4
#define INPUT_DOWN 8
#define INPUT_BUTTON 16
class Player
{
public:
Player();
ALLEGRO_JOYSTICK* Joystick;
float Energy;
Vector* Position;
int State;
int Frame;
bool FacingLeft;
bool IsBulldog;
bool WasTagged;
bool IsAI;
bool DesintationIsRightSide;
int UserInputPrevious;
int UserInput;
int Gender;
float HairHue;
float HairLum;
float SkinHue;
float SkinLum;
float TeamHue;
float TeamLum;
int GetFrameNumber();
void ProcessInput( ALLEGRO_EVENT *e );
void Render( int DrawX, int DrawY, int DrawW, int DrawH );
void Render( int DrawW, int DrawH );
void Update();
void Update( bool UseEnergy );
bool DidInputChange( int InputFlag, bool Pressed );
};