-
Notifications
You must be signed in to change notification settings - Fork 0
/
dungeon_info.h
49 lines (44 loc) · 1020 Bytes
/
dungeon_info.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
#ifndef DUNGEON_INFO_H
#define DUNGEON_INFO_H
#include <stdbool.h>
#include <unistd.h>
#include "dungeon_settings.h"
//This is the name we will use for our shared memory.
const char* dungeon_shm_name = "/DungeonMem";
//These are the names for the levers when getting the treasure at the end.
const char* dungeon_lever_one = "/LeverOne";
const char* dungeon_lever_two = "/LeverTwo";
struct Barbarian{
int attack;
};
struct Rogue{
float pick;
};
struct Wizard{
char spell[SPELL_BUFFER_SIZE];
};
struct Barrier{
char spell[SPELL_BUFFER_SIZE + 1];
};
struct Enemy{
int health;
};
struct Trap{
char direction;
bool locked;
};
struct Dungeon{
bool running;
pid_t dungeonPID;
struct Barbarian barbarian;
struct Rogue rogue;
struct Wizard wizard;
struct Barrier barrier;
struct Enemy enemy;
struct Trap trap;
char treasure[4];
char spoils[4];
};
//Call this method to begin running the dungeon. Valid pid's must be passed for it to work.
void RunDungeon(pid_t wizard, pid_t rogue, pid_t barbarian);
#endif