summaryrefslogtreecommitdiff
path: root/src/editor.h
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-01-25 16:30:07 +0500
committerilotterytea <iltsu@alright.party>2025-01-25 16:30:07 +0500
commit9f5b2b1ebd4bb46163b7f00912db0578aca57d25 (patch)
tree4147ff7cd7ba74058862bd78cb07154ef314966f /src/editor.h
parent8a27da4c34c2a233a5f793893ed778e395a5220d (diff)
feat: build tab + tile loading
Diffstat (limited to 'src/editor.h')
-rw-r--r--src/editor.h30
1 files changed, 29 insertions, 1 deletions
diff --git a/src/editor.h b/src/editor.h
index e1981cf..02966f1 100644
--- a/src/editor.h
+++ b/src/editor.h
@@ -1,11 +1,37 @@
#ifndef __EDITOR_H__
#define __EDITOR_H__
#include <raylib.h>
+#include <stdbool.h>
#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;
+ int currentLevel, currentLayer, activeMainTab;
+ EditorCreateBlockState *createBlockState;
+ Rectangle panelView;
+ Vector2 panelScroll;
+ EditorCache cache;
+ EditorTile *selectedTile;
} EditorState;
typedef struct {
@@ -14,4 +40,6 @@ typedef struct {
} Editor;
void SE_DrawEditor(Editor *editor, Camera2D *camera);
+void SE_DrawEditorToolkit(Editor *editor);
+void SE_RebuildEditorCache(Editor *editor);
#endif