geometry-dash-gba/include/playerObject.h

32 lines
702 B
C
Raw Normal View History

2020-08-08 20:16:34 -04:00
#include "types.h"
#include "point.h"
#include "velocity.h"
#include "toolbox.h"
#include "fixed.h"
2020-08-10 16:04:44 -04:00
#include "sinlut.h"
2020-08-08 20:16:34 -04:00
#ifndef PLAYEROBJECT_H
#define PLAYEROBJECT_H
#define GRAVITY 0.75
typedef struct playerObject {
VELOCITY vel;
POINT pt;
u32 rotation; // Rotation amount
OBJ_ATTR *obj; // Attributes of the object for GBA
2020-08-10 16:04:44 -04:00
OBJ_AFFINE *affine; // Affine transformations
2020-08-08 20:16:34 -04:00
int pallete_bank; // Index of pallete
int tile_id; // Index of player tile
int isJumping;
} ALIGN(4) playerObject; // Word-align to ensure corruption doesn't occur
2020-08-10 16:04:44 -04:00
void initializePlayerObject();
playerObject createPlayerObject();
void applyGravity();
void scalePlayer();
void updatePlayer();
2020-08-08 20:16:34 -04:00
#endif // PLAYEROBJECT_H