aboutsummaryrefslogtreecommitdiff
path: root/src/engine/types.h
blob: 5fc80fa064b7f1f60323d1421fe6925a6740ac0e (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
45
46
47
#pragma once

#include "engine/maths.h"

typedef uint8_t hh_ppu_fg_idx;
// typedef uint16_t hh_bg_idx;
typedef enum {
	slime, jumping_slime, terror_owl,
}hh_e_all_objects_game_type;

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;
	
}hh_s_rendering;

typedef struct {
	vec2 pos, vel, size;
	bool is_grounded;
	bool is_hit;
	hh_e_all_objects_game_type object_type;
	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;