Some more hopefully working progress
This commit is contained in:
18
tiles/tile.h
18
tiles/tile.h
@@ -12,14 +12,20 @@
|
||||
#define MAP_WIDTH 600
|
||||
#define MAP_HEIGHT 340
|
||||
|
||||
#define DISPLAY_MAP_WIDTH 30
|
||||
#define DISPLAY_MAP_HEIGHT 16
|
||||
#define DISPLAY_MAP_WIDTH 44
|
||||
#define DISPLAY_MAP_HEIGHT 22
|
||||
|
||||
#define TILE_SIZE 32
|
||||
|
||||
#define DISPLAY_WIDTH DISPLAY_MAP_WIDTH * TILE_SIZE
|
||||
#define DISPLAY_HEIGHT DISPLAY_MAP_HEIGHT * TILE_SIZE
|
||||
|
||||
extern SDL_Texture *tilesTexture;
|
||||
extern SDL_Texture *itemsTexture;
|
||||
|
||||
extern int scrollFrame;
|
||||
extern unsigned long beltFrames;
|
||||
|
||||
typedef struct {
|
||||
uint16_t type;
|
||||
char name[20];
|
||||
@@ -32,13 +38,15 @@ typedef struct {
|
||||
extern TileType TileRegistry[TILEREGISTRY_SIZE];
|
||||
|
||||
#define TYPE_AIR 0
|
||||
#define TYPE_BELT 1
|
||||
#define TYPE_BELT 2
|
||||
|
||||
void renderAllTiles(SDL_Renderer * renderer, SDL_Rect playerRect);
|
||||
|
||||
typedef struct {
|
||||
OrientDirection direction;
|
||||
uint16_t type;
|
||||
int frameOffset;
|
||||
ItemOnBelt items[2][2];
|
||||
ItemOnBelt items[2];
|
||||
int x;
|
||||
int y;
|
||||
} Tile;
|
||||
@@ -52,4 +60,6 @@ extern uint16_t tileTypeIndex;
|
||||
|
||||
uint16_t getBreakTime(int type);
|
||||
|
||||
void initTiles();
|
||||
|
||||
#endif //FACTORYGAME_TILE_H
|
||||
|
Reference in New Issue
Block a user