Adoranda/include/talkable.h

23 lines
568 B
C
Raw Normal View History

#pragma once
#include "map.h"
2022-04-02 01:57:54 +02:00
#include "game.h"
2022-05-22 23:58:00 +02:00
#include <stdbool.h>
struct Talkable {
/*the position of the tile*/
2022-05-22 23:58:00 +02:00
int x, y, id;
/*the name*/
char *name;
/*the text to display*/
char *text;
2022-05-22 23:58:00 +02:00
/*the text to display after the action*/
char *text_after;
/*if event, repeat it or no*/
int exclusive;
};
/*draw the dialog of a specified talkable tile*/
2022-04-02 01:57:54 +02:00
void draw_dialog(struct Game *game);
/*find the talkable tile using the player's position*/
2022-01-21 21:40:12 +01:00
struct Talkable* get_dialog_xy(struct Map *map, int x, int y);
2022-05-22 23:58:00 +02:00
void addDialogToPlayer(struct Player *player, int id);