35 lines
		
	
	
		
			647 B
		
	
	
	
		
			C
		
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			647 B
		
	
	
	
		
			C
		
	
	
| #ifndef GAME_H
 | |
| #define GAME_H
 | |
| #include "wall.h"
 | |
| #include "display.h"
 | |
| #include "map.h"
 | |
| #include "tile.h"
 | |
| 
 | |
| /* The Eight Holy Directions */
 | |
| #define NORTH 8
 | |
| #define SOUTH 2
 | |
| #define EAST 6
 | |
| #define WEST 4
 | |
| #define NORTHEAST 7
 | |
| #define NORTHWEST 9
 | |
| #define SOUTHEAST 1
 | |
| #define SOUTHWEST 3
 | |
| 
 | |
| int tickrate;
 | |
| 
 | |
| struct Map *current_map;
 | |
| 
 | |
| int gameInit();
 | |
| void gameLoop();
 | |
| void gameClose();
 | |
| 
 | |
| int gameCollision(int target_x, int target_y);
 | |
| void gameMoveTile(struct Tile *tile, int target_x, int target_y);
 | |
| /* marks a tile to be updated visually */
 | |
| void gameUpdateTile(int x, int y);
 | |
| 
 | |
| int isCellVisible(int target_x, int target_y);
 | |
| 
 | |
| int roll(int min, int max);
 | |
| #endif
 |