aboutsummaryrefslogtreecommitdiff
path: root/src/engine/types.h
blob: ba41ca79fdca87f5da1276d5adc0791de5e06cb0 (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
48
49
50
51
52
53
#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;
	uint16_t cooldown;
	
}hh_s_rendering;

typedef struct {
	uint8_t* start, len;
}hh_s_animations;


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;