6 #ifndef MML_GAME_STATE_H 7 #define MML_GAME_STATE_H 35 #define DEFAULT_PLATFORM {0.0, 0.0, 0.0} 48 #define DEFAULT_STAGE {0, {0.f, 0.f}, DEFAULT_PLATFORM, DEFAULT_PLATFORM} 51 #define PAD(name, addr, prev, prev_type) char pad_ ## name[addr - prev - sizeof(prev_type)] 56 {
char pad_actionState[0x10];
70 PAD(coordinates, 0xb0, 0x94,
float);
74 Point prevCoordinates;
76 Point deltaCoordinates;
78 PAD(
inAir, 0xe0, 0xd0,
float);
80 bool inAir; PAD(xSpeedSelfGround, 0xec, 0xe0,
bool);
83 float xSpeedSelfGround;
84 PAD(attributes1, 0x110, 0xec,
float);
86 float walkInitialVelocity;
87 float walkAcceleration;
88 float walkMaximumVelocity;
93 float dashInitialVelocity;
94 float dashAccelerationA;
95 float dashAcceleationB;
96 float dashTerminalVelocity;
97 float runAnimationScaling;
98 float runAcceleration;
99 float groundedMaxHorizontalVelocity;
101 float jumpHorizontalInitialVelocity;
102 float jumpVerticalInitialVelocity;
103 float groundToAirJumpMomentum;
104 float jumpHorizontalMaxVelocity;
105 float hopVerticalInitialVelocity;
106 float airJumpVerticalMultiplier;
107 float airJumpHorizontalMultiplier;
110 float terminalVelocity;
113 float maxHorizontalAirMobility;
114 float horizontalAirFriction;
115 float fastfallVelocity;
116 PAD(attributes2, 0x18c, 0x184,
float);
118 float jab2inputWindow;
119 float jab3inputWindow;
120 float framesToChangeDirection;
124 float shieldBreakInitialVelocity;
125 float rapidJabWindow;
126 PAD(attributes3, 0x1f4, 0x1a8,
float);
128 float normalLandingLag;
129 float nairLandingLag;
130 float fairLandingLag;
131 float bairLandingLag;
132 float uairLandingLag;
133 float dairLandingLag;
134 PAD(attributes4, 0x214, 0x208,
float);
136 float wallJumpHorizontalVelocity;
137 float wallJumpVerticalVelocity;
138 PAD(analogStick, 0x620, 0x218,
float);
147 float cStickY; PAD(analogTrigger, 0x650, 0x63c,
float);
150 float analogTriggerData;
151 PAD(digitalButton, 0x65c, 0x650,
float);
153 u32 digitalButtonData;
154 u32 prevDigitalButtonData;
155 PAD(analogCardinalFrames, 0x670, 0x660,
u32);
157 u8 analogCardinalXFrames;
158 u8 analogCardinalYFrames;
159 PAD(lastPosition, 0x830, 0x672,
u8);
168 u8 stageTransformationID;
169 PAD(actionFrame, 0x894, 0x843,
u8);
174 float percent; PAD(damage, 0x1838, 0x1830,
float);
186 PAD(hitlag, 0x195c, 0x1850,
float);
188 float hitlag; PAD(jumpsUsed, 0x1968, 0x195c,
float);
195 float ledgeInvincibility;
196 float haloInvincinility;
205 PAD(aiLevel, 0x1a9b, 0x1a97,
u8);
214 PAD(wallride, 0x210c, 0x2090,
u16);
217 PAD(wallAndSmash, 0x2110, 0x210c,
u8);
220 u32 smashAttackState;
221 u32 smashChargeFrame;
222 float smashChargeFrameMax;
223 float smashChargeStrength;
224 PAD(walljump, 0x2224, 0x2120,
float);
227 PAD(hitstun, 0x2340, 0x2224,
u8);
240 PAD(costumeID, 0x44, 0x0c,
u16);
247 PAD(falls, 0x68, 0x48,
u8);
257 PAD(selfDeaths, 0x8d, 0x84,
u32);
274 #define DEFAULT_GAMESTATE {{0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, DEFAULT_STAGE} 280 #error game_state.h not compatible with PAL 285 #define CHAR_SELECT(x) (*((u8*) (0x803F0DE6 + 0x24 * (x)))) 288 #define STAGE_ID (*((u16*) 0x804D6CAD)) 291 #define CURRENT_FRAME (*((u32*) 0x80479D60)) 294 #define PLAYER_BLOCK(x) ((u32) _gameState.playerBlock[(x)]) 295 #define PLAYER_STATE(x) _gameState.playerBlock[(x)]->playerState 296 #define SLOT_TYPE(x) _gameState.playerBlock[(x)]->slotType 297 #define STOCKS(x) _gameState.playerBlock[(x)]->stocks
uint8_t u8
Definition: gctypes.h:14
float analogStickX
Definition: game_state.h:140
PlayerData * playerData(u32 id)
Definition: game_state.c:37
float jumpSquat
Definition: game_state.h:100
Definition: game_state.h:19
Data types for the gamecube.
Struct containing the coordinates of a point.
Definition: math.h:43
GameState _gameState
Definition: game_state.c:33
float right
Definition: game_state.h:30
bool inAir
Definition: game_state.h:80
In game variables.
Definition: game_state.h:265
float prevAnalogStickX
Definition: game_state.h:142
float prevAnalogStickY
Definition: game_state.h:143
Platform side
Definition: game_state.h:42
u32 slotType
Definition: game_state.h:238
Definition: game_state.h:18
u32 actionState
Definition: game_state.h:58
u32 knockbackAngle
Definition: game_state.h:182
float shieldSize
Definition: game_state.h:197
Definition: game_state.h:16
void endGame()
Definition: game_state.c:18
variables contained in "player block"
Definition: game_state.h:234
Definition: game_state.h:17
float percent
Definition: game_state.h:174
Definition: game_state.h:21
void updateGameState()
Definition: game_state.c:50
float percentForDamageCalc
Definition: game_state.h:177
u8 stocks
Definition: game_state.h:260
u32 actionCounter
Definition: game_state.h:210
StageName
Definition: game_state.h:14
float damageDirection
Definition: game_state.h:181
float analogStickY
Definition: game_state.h:141
float breakoutCountdown
Definition: game_state.h:201
StageName name
Definition: game_state.h:40
u32 playerCharacter
Definition: game_state.h:237
Platform top
Definition: game_state.h:43
float height
Definition: game_state.h:28
u8 jumpsUsed
Definition: game_state.h:191
Point ledge
Definition: game_state.h:41
float hitlag
Definition: game_state.h:188
bool inGame()
Definition: game_state.c:24
float cStickX
Definition: game_state.h:146
uint16_t u16
Definition: gctypes.h:15
float lightshieldAmount
Definition: game_state.h:198
float numberOfJumps
Definition: game_state.h:108
float left
Definition: game_state.h:29
u8 platformID
Definition: game_state.h:164
float facingDirection
Definition: game_state.h:61
uint32_t u32
Definition: gctypes.h:16
float actionFrame
Definition: game_state.h:171
bool inAir(FunctionArg port)
Checks if player (specified by port) is in the air.
Definition: state_check.c:73
variables contained in "player data"
Definition: game_state.h:55
Stage Information.
Definition: game_state.h:38
u8 aiLevel
Definition: game_state.h:207
u8 teamID
Definition: game_state.h:245
float lastPosition
Definition: game_state.h:161
u32 bodyState
Definition: game_state.h:194
u8 costumeID
Definition: game_state.h:242
float cStickY
Definition: game_state.h:147
u32 playerState
Definition: game_state.h:236
float hitstun
Definition: game_state.h:229
List of action states, ,.
Definition: game_state.h:20
Stage stage
Definition: game_state.h:269
u32 damageApplied
Definition: game_state.h:178