summaryrefslogtreecommitdiff
path: root/include/playerObject.h
blob: 49f601194992e20eab686b532570819b8551023a (plain)
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
#include "types.h"
#include "point.h"
#include "velocity.h"
#include "toolbox.h"
#include "fixed.h"
#include "sinlut.h"
#include "camera.h"

#ifndef PLAYEROBJECT_H
#define PLAYEROBJECT_H

#define GRAVITY 0.75

typedef struct playerObject {
	CAMERA camera;
	VELOCITY vel;
	POINT pt;
	u32 rotation; // Rotation amount
	OBJ_ATTR *obj; // Attributes of the object for GBA
	OBJ_AFFINE *affine; // Affine transformations
	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

void initializePlayerObject();
playerObject createPlayerObject();
void applyGravity();
void scalePlayer();
void updatePlayer();

#endif // PLAYEROBJECT_H