Most texure work
This commit is contained in:
10
tiles/tile.h
10
tiles/tile.h
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "../util/util.h"
|
||||
#include "../items/item.h"
|
||||
#include "tilecallbacks.h"
|
||||
|
||||
#define MAP_WIDTH 500
|
||||
#define MAP_HEIGHT 500
|
||||
@@ -83,6 +84,8 @@ typedef enum BackgroundType {
|
||||
#define MAX_BASE_NAMES 512
|
||||
#define MAX_ANIMATION_FRAMES 32
|
||||
|
||||
typedef void (*UpdateTileCallback)(struct Tile *tile);
|
||||
|
||||
typedef struct TileTypeReg {
|
||||
ItemType type;
|
||||
char name[20];
|
||||
@@ -92,9 +95,10 @@ typedef struct TileTypeReg {
|
||||
bool allowedInItems[ItemSlotCount][ITEMREGISTRY_SIZE];
|
||||
bool outputLane[ItemSlotCount];
|
||||
bool needsTicks;
|
||||
char startFrame;
|
||||
bool walkable;
|
||||
bool allDir;
|
||||
uint16_t maxHealth;
|
||||
UpdateTileCallback updateTileCallback;
|
||||
} TileTypeReg;
|
||||
|
||||
bool isWalkable(MiniRect tileCoords);
|
||||
@@ -141,7 +145,7 @@ typedef struct Tile {
|
||||
int neededUpdateIndex;
|
||||
char fixedFrame;
|
||||
PathFindDat pathFind;
|
||||
uint16_t health;
|
||||
int16_t health;
|
||||
} Tile;
|
||||
|
||||
|
||||
@@ -151,6 +155,8 @@ extern BackgroundTile backgroundMap[MAP_HEIGHT][MAP_WIDTH];
|
||||
|
||||
void setupTiles();
|
||||
|
||||
void preSetupTiles();
|
||||
|
||||
void generateTestMap();
|
||||
|
||||
void loadBackgroundTiles(SDL_Renderer *renderer);
|
||||
|
Reference in New Issue
Block a user