#ifndef GAMETYPES_H
#define GAMETYPES_H

#include <types.h>

// Boolean values.
#define TRUE 1
#define FALSE 0

// Level and game states.
#define LEVEL_READY 0
#define LEVEL_COMPLETE 1
#define LEVEL_EXIT 2
#define LEVEL_DEATH 3
#define LEVEL_GAME_COMPLETE 11
#define LEVEL_GAME_OVER 12

// Screen x dimension.
// Note: 80 = 160/2
#define SCREEN_X 80

// Screen y dimension.
#define SCREEN_Y 200

// Screen y dimension only including tiles (no hud).
#define SCREEN_Y_NO_HUD 192

// The number of cells in the map grid.
#define MAP_CELL_COUNT 2160

// Number of tiles that make up the screen vertically.
#define SCREEN_TILES_Y 12

// Number of tiles that make the screen horizontally.
#define SCREEN_TILES_X 20

// Number of tiles that make up the level vertically.
#define MAP_TILES_Y 36

// Number of tiles that make up the level horizontally.
#define MAP_TILES_X 60

// Positions (x,y) of cells in the grid.
extern const u8 xPositions[20];
extern const u8 yPositions[12];

// Size of tiles.
#define TILE_HEIGHT 16
#define TILE_WIDTH_BYTES 4

// The number of levels in the game.
#define LEVEL_COUNT 9

// The possible bits that the cell graphic could be in.
#define CELL_GFX_RANGE 0x1F

// Cell type flags.
#define CELL_EMPTY 0
#define CELL_ITEM_FLAG 0x20
#define CELL_INTERACTABLE_FLAG 0x40
#define CELL_WATER_FLAG 0x80

// Movement modes for player movement.
#define MOVEMENT_MODE_LAND 0
#define MOVEMENT_MODE_WATER 1

// Right direction.
#define DIRECTION_RIGHT 0

// Left direction.
#define DIRECTION_LEFT 1

// The length of time (interrupts) after a projectile has been destroyed before the next one can be created.
#define PROJECTILE_DESTROY_DELAY 120

// The number of characters in a pass code.
#define PASS_CODE_LENGTH 5

#ifndef WINCPCTELERA
#define NULL 0
#endif

#endif