-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.h
59 lines (43 loc) · 1.06 KB
/
types.h
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
54
55
56
57
58
59
//
// Created by pablo on 19.12.17.
//
#ifndef GAME_NCURSES_TYPES_H
#define GAME_NCURSES_TYPES_H
#include <ncurses.h>
#define entity_PLAYER '@'
#define entity_ENEMY '&'
#define item_NONE 0
enum Action {
ACTION_UP, ACTION_DOWN, ACTION_LEFT, ACTION_RIGHT, ACTION_ENTER, ACTION_SPACE, ACTION_SHOW_STATS, ACTION_MENU, ACTION_EXIT, ACTION_NONE, ACTION_SPELLBOOK,
};
// game mode ( state machine )
enum Mode {
MODE_MENU, MODE_MAP, MODE_STATS, MODE_EXIT, MODE_RESET, MODE_CREDITS, MODE_SPELLBOOK, MODE_USE_SPELL,
};
struct objects {
const char PLAYER;
const char ENEMY;
};
extern struct objects Objects; // namespaces!! :D https://stackoverflow.com/a/28535585/1983633
struct viewport {
int size_x;
int size_y;
int offset_x;
int offset_y;
};
extern struct viewport Viewport;
//struct PointList {
// int x;
// int y;
// struct PointList *next;
//};
//
//typedef struct PointList PointList;
//
//typedef struct {
// PointList *snake;
// PointList *foods;
// int xmax;
// int ymax;
//} Board;
#endif //GAME_NCURSES_TYPES_H