aboutsummaryrefslogtreecommitdiff
path: root/src/engine/types.h
blob: 00b381bcb4bbe5a6ab46da4ec51005810b3af566 (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
33
34
35
36
37
38
39
40
41
42
43
44
#pragma once

#include "engine/maths.h"

typedef uint8_t hh_ppu_fg_idx;
// typedef uint16_t hh_bg_idx;

typedef enum {
	fire, ice, poison
}hh_e_damage_t;


typedef struct {
	int8_t hp;
	int8_t dmg;
	hh_e_damage_t dmg_type;
	int8_t speed_x, speed_y;

} hh_s_atributes;


typedef struct {
	hh_s_ppu_loc_fam_entry fam; //screen
	uint16_t frame0;
	uint16_t palette;
	uint16_t ppu_foreground_index;
	
}hh_s_rendering;

typedef struct {
	vec2 pos, vel, size;
	bool is_grounded;
	bool is_hit;
	uint8_t radius;
	int8_t hp;
	int8_t speed;
	hh_s_rendering render;

}hh_entity;

typedef struct {
	hh_entity p;
	hh_s_atributes atr;
}hh_s_player;