-
Notifications
You must be signed in to change notification settings - Fork 0
/
game.h
45 lines (36 loc) · 962 Bytes
/
game.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
#ifndef __SPANKGAME_H__
#define __SPANKGAME_H__
#include <math.h>
#include <stdlib.h>
#include <unistd.h> // access() - check for savefile
#include "definitions.h"
#include "state.h"
#include "mapParser.h"
#include "hero.h"
#include "dialogue.h"
#include "battle.h"
#define MAX_NUM_WARPS 16
#define SAVE_FILE_NAME "save.txt"
#define DIR_UP 0
#define DIR_DOWN 1
#define DIR_LEFT 2
#define DIR_RIGHT 3
void initGame();
void loadWarpTable();
void initChad();
void updateGame(int key);
void renderGame();
void saveGame();
void cleanupGame();
void setDirection(int newDirection);
void setMap(int newNapNumber, int xEntry, int yEntry, int entryDirection);
void warp(int warpID);
void rollTheDice();
// checks if tile in direction player is trying to move is solid
bool isNotSolid(int attemptDir);
int isWarp();
// checks if a number begins with a specific digit
bool startsWith(int digit, int numToCheck);
bool isRandEncounterTile();
#include "game.c"
#endif