crocparty/game/game_npc.h

34 lines
667 B
C
Raw Normal View History

2024-02-29 03:05:52 +00:00
#ifndef GAME_NPC_H
#define GAME_NPC_H
2024-02-29 05:07:17 +00:00
#include <stdbool.h>
2024-02-29 03:42:03 +00:00
#include "sys/sys.h"
#define GAME_NPC_MAX_N_DIALOGUES 16
typedef struct {
sys_i32 x;
sys_i32 y;
uint8_t sprite_id;
uint8_t palette_id;
uint8_t inflict_id;
bool face_left;
2024-02-29 21:20:18 +00:00
bool flip;
2024-02-29 03:42:03 +00:00
2024-02-29 05:07:17 +00:00
uint8_t n_dialogues;
2024-02-29 03:42:03 +00:00
const char* no_cake_dialogue;
const char* dialogues[GAME_NPC_MAX_N_DIALOGUES];
bool present;
2024-02-29 05:07:17 +00:00
uint8_t n_dialogues_seen;
2024-02-29 20:08:50 +00:00
bool received_cake;
2024-02-29 03:42:03 +00:00
} game_npc;
// pointer goes to data section and will be valid forever
game_npc* game_npc_create(sys_i32 x, sys_i32 y);
2024-02-29 05:07:17 +00:00
void game_npcs_update(bool* allow_input);
2024-02-29 03:42:03 +00:00
void game_npcs_draw();
2024-02-29 03:05:52 +00:00
#endif // GAME_NPC_H