#ifndef __EDITOR_H__ #define __EDITOR_H__ #include #include #include "xd.h" #define TEXTURE_WIDTH 16.0f #define TEXTURE_HEIGHT 16.0f typedef struct { bool isFloor, isWall; char *upFilePath, *sideFilePath, *cornerFilePath; Texture2D upTexture, sideTexture, cornerTexture; } EditorCreateBlockState; typedef struct { XdTileData data; Texture2D texture; } EditorTile; typedef struct { int tileCacheSize; EditorTile *tiles[200]; Texture2D *textureCache[]; } EditorCache; typedef struct { int currentLevel, currentLayer, activeMainTab; EditorCreateBlockState *createBlockState; Rectangle panelView; Vector2 panelScroll; EditorCache cache; EditorTile *selectedTile; } EditorState; typedef struct { XdData *data; EditorState state; } Editor; void SE_DrawEditor(Editor *editor, Camera2D *camera); void SE_DrawEditorToolkit(Editor *editor); void SE_RebuildEditorCache(Editor *editor); #endif