-
Notifications
You must be signed in to change notification settings - Fork 1
/
tiles.h
52 lines (42 loc) · 1.25 KB
/
tiles.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
//
// tiles.h
// XBolo Map Editor
//
// Created by Robert Chrzanowski on 10/11/09.
// Copyright 2009 Robert Chrzanowski. All rights reserved.
//
#ifndef __TILES__
#define __TILES__
#include <stdint.h>
#define WIDTH (256)
enum {
kWallTile = 0,
kRiverTile = 1,
kSwampTile = 2,
kCraterTile = 3,
kRoadTile = 4,
kForestTile = 5,
kRubbleTile = 6,
kGrassTile = 7,
kDamagedWallTile = 8,
kBoatTile = 9,
kMinedSwampTile = 10,
kMinedCraterTile = 11,
kMinedRoadTile = 12,
kMinedForestTile = 13,
kMinedRubbleTile = 14,
kMinedGrassTile = 15,
kSeaTile = 16,
kMinedSeaTile = 17,
kTokenTile = 18 // used in flood fill algorithm
} ;
typedef uint8_t GSTile;
int isForestLikeTile(GSTile tiles[][WIDTH], int x, int y);
int isCraterLikeTile(GSTile tiles[][WIDTH], int x, int y);
int isRoadLikeTile(GSTile tiles[][WIDTH], int x, int y);
int isWaterLikeToLandTile(GSTile tiles[][WIDTH], int x, int y);
int isWaterLikeToWaterTile(GSTile tiles[][WIDTH], int x, int y);
int isWallLikeTile(GSTile tiles[][WIDTH], int x, int y);
int isSeaLikeTile(GSTile tiles[][WIDTH], int x, int y);
int isMinedTile(GSTile tiles[][WIDTH], int x, int y);
#endif // __TILES__