diff options
| author | ilotterytea <iltsu@alright.party> | 2025-01-31 00:33:53 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-01-31 00:33:53 +0500 |
| commit | a15f24294d5113fec767fb9007d906f534dc0485 (patch) | |
| tree | 20c869d1444a91256a10d4dfe0376f2f72ab4021 /src/floor.h | |
| parent | 2ca545f754acc9c8a00b5ce8c0b3ca1175c74a3a (diff) | |
upd: moved some editor logic to tileset and floor files
Diffstat (limited to 'src/floor.h')
| -rw-r--r-- | src/floor.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/floor.h b/src/floor.h new file mode 100644 index 0000000..4f112fa --- /dev/null +++ b/src/floor.h @@ -0,0 +1,37 @@ +#ifndef __FLOOR_H_ +#define __FLOOR_H_ + +#include "editor.h" +#include "raylib.h" +#include "tileset.h" + +typedef struct { + int id; + Vector2 position; + TilesetTile *tilesetTile; +} Tile; + +typedef struct { + int index; + int tileCount; + Tile *tiles[]; +} TileLayer; + +typedef struct { + int width, height; + int layerCount; + TileLayer *layers[]; +} TileFloor; + +Tile *SE_CreateTile(TileLayer *layer, TilesetTile *tilesetTile); +void SE_RemoveTile(TileLayer *layer, Tile *tile); +Tile *SE_FindTileAtPosition(TileLayer *layer, Vector2 position); + +TileLayer *SE_CreateTileLayer(TileFloor *floor); + +TileFloor *SE_CreateTileFloor(int width, int height); +void SE_UpdateTileFloor(EditorState *state, TileFloor *floor, Camera2D *camera); +void SE_DrawTileFloor(TileFloor *floor, EditorState *state, Camera2D *camera); +void SE_UnloadTileFloor(TileFloor *floor); + +#endif
\ No newline at end of file |
