Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Rubberduckycooly
GitHub Repository: Rubberduckycooly/RSDKv5-Decompilation
Path: blob/master/RSDKv5/RSDK/Scene/Legacy/v3/PlayerLegacyv3.hpp
1188 views
1
2
namespace Legacy
3
{
4
5
namespace v3
6
{
7
#define LEGACY_v3_PLAYER_COUNT (2)
8
9
enum PlayerControlModes {
10
CONTROLMODE_NONE = -1,
11
CONTROLMODE_NORMAL = 0,
12
CONTROLMODE_SIDEKICK = 1,
13
};
14
15
struct Player {
16
int32 entityNo;
17
int32 XPos;
18
int32 YPos;
19
int32 XVelocity;
20
int32 YVelocity;
21
int32 speed;
22
int32 screenXPos;
23
int32 screenYPos;
24
int32 angle;
25
int32 timer;
26
int32 lookPos;
27
int32 values[8];
28
uint8 collisionMode;
29
uint8 skidding;
30
uint8 pushing;
31
uint8 collisionPlane;
32
int8 controlMode;
33
uint8 controlLock;
34
int32 topSpeed;
35
int32 acceleration;
36
int32 deceleration;
37
int32 airAcceleration;
38
int32 airDeceleration;
39
int32 gravityStrength;
40
int32 jumpStrength;
41
int32 jumpCap;
42
int32 rollingAcceleration;
43
int32 rollingDeceleration;
44
uint8 visible;
45
uint8 tileCollisions;
46
uint8 objectInteractions;
47
uint8 left;
48
uint8 right;
49
uint8 up;
50
uint8 down;
51
uint8 jumpPress;
52
uint8 jumpHold;
53
uint8 followPlayer1;
54
uint8 trackScroll;
55
uint8 gravity;
56
uint8 water;
57
uint8 flailing[3];
58
AnimationFile *animationFile;
59
Entity *boundEntity;
60
};
61
62
extern Player playerList[LEGACY_v3_PLAYER_COUNT];
63
extern int32 playerListPos;
64
extern int32 activePlayer;
65
extern int32 activePlayerCount;
66
67
extern uint16 upBuffer;
68
extern uint16 downBuffer;
69
extern uint16 leftBuffer;
70
extern uint16 rightBuffer;
71
extern uint16 jumpPressBuffer;
72
extern uint16 jumpHoldBuffer;
73
74
extern uint8 nextLeaderPosID;
75
extern uint8 lastLeaderPosID;
76
77
extern int16 leaderPositionBufferX[16];
78
extern int16 leaderPositionBufferY[16];
79
80
void ProcessPlayerControl(Player *player);
81
} // namespace v3
82
83
} // namespace Legacy
84