Testing
This commit is contained in:
28
tiles/tile.h
28
tiles/tile.h
@@ -8,8 +8,8 @@
|
||||
#include "../util/util.h"
|
||||
#include "../items/item.h"
|
||||
|
||||
#define MAP_WIDTH 1000
|
||||
#define MAP_HEIGHT 1000
|
||||
#define MAP_WIDTH 500
|
||||
#define MAP_HEIGHT 500
|
||||
|
||||
#define DISPLAY_MAP_WIDTH 60
|
||||
#define DISPLAY_MAP_HEIGHT 31
|
||||
@@ -93,17 +93,19 @@ typedef struct TileTypeReg {
|
||||
bool outputLane[ItemSlotCount];
|
||||
bool needsTicks;
|
||||
char startFrame;
|
||||
bool walkable;
|
||||
uint16_t maxHealth;
|
||||
} TileTypeReg;
|
||||
|
||||
bool isWalkable(MiniRect tileCoords);
|
||||
|
||||
typedef struct BackgroundTileType {
|
||||
ItemType type;
|
||||
char name[20];
|
||||
Animation animation;
|
||||
bool walkable;
|
||||
} BackgroundTileType;
|
||||
|
||||
typedef struct BackgroundTile {
|
||||
BackgroundType type;
|
||||
} BackgroundTile;
|
||||
|
||||
#define TILEREGISTRY_SIZE 64
|
||||
|
||||
@@ -115,6 +117,20 @@ void renderAllTiles(SDL_Renderer *renderer, SDL_Rect playerRect);
|
||||
|
||||
void updateTiles();
|
||||
|
||||
typedef struct PathFindDat {
|
||||
int gCost;
|
||||
int hCost;
|
||||
struct PathFindDat* parent;
|
||||
bool closed;
|
||||
bool open;
|
||||
uint32_t version;
|
||||
} PathFindDat;
|
||||
|
||||
typedef struct BackgroundTile {
|
||||
BackgroundType type;
|
||||
PathFindDat pathFind;
|
||||
} BackgroundTile;
|
||||
|
||||
typedef struct Tile {
|
||||
OrientDirection direction;
|
||||
ItemType type;
|
||||
@@ -124,6 +140,8 @@ typedef struct Tile {
|
||||
MiniRect rect;
|
||||
int neededUpdateIndex;
|
||||
char fixedFrame;
|
||||
PathFindDat pathFind;
|
||||
uint16_t health;
|
||||
} Tile;
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user