summaryrefslogtreecommitdiff
path: root/src/editor/editor.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/editor/editor.h')
-rw-r--r--src/editor/editor.h35
1 files changed, 26 insertions, 9 deletions
diff --git a/src/editor/editor.h b/src/editor/editor.h
index a4b1f1a..9063f50 100644
--- a/src/editor/editor.h
+++ b/src/editor/editor.h
@@ -26,6 +26,18 @@ enum EditorSelectType_t {
EDITOR_SELECT_SURFPROPS
};
+struct GAME_EDITOR_TOOL {
+ U8 type;
+
+ /* shapes */
+ U8 walls;
+ GL_TEX2D* tex;
+
+ /* entity */
+ U32 entclass;
+ void* entprops;
+};
+
struct GAME_EDITOR {
GAME_DATA* game;
@@ -38,17 +50,16 @@ struct GAME_EDITOR {
struct GUI_EDITOR_2DVIEW* v2d;
struct GUI_EDITOR_3DVIEW* v3d;
- struct GUI_LABEL* toollabel;
-
struct GUI_LABEL* gridlabel;
struct GUI_EDITOR_PROPVIEW* props;
+ struct GUI_EDITOR_TOOLVIEW* tool;
I32 map_select{};
} gui;
U8 wireframe{};
- U8 tool{};
+ GAME_EDITOR_TOOL tool;
F32 grid{};
U8 propgrid{};
F32 spritesize{};
@@ -105,6 +116,10 @@ struct GUI_EDITOR_PROPVIEW : GUI_VIEW {
GUI_VIEW* itemview;
};
+struct GUI_EDITOR_TOOLVIEW : GUI_VIEW {
+ GUI_VIEW* itemview;
+};
+
struct GUI_EDITOR_TEXTUREPICKER : GUI_WINDOW {
struct GL_TEX2D** target;
struct GL_TEX2D* curselect;
@@ -127,13 +142,15 @@ struct GUI_EDITOR_TEXTUREPICKER : GUI_WINDOW {
GUI_CALLBACK cb;
};
-extern GUI_EDITORWINDOW* gui_editorwindow( I32 w, I32 h );
-extern GUI_EDITOR_2DVIEW* gui_editor_2dview( I32 x, I32 y, I32 w, I32 h );
-extern GUI_EDITOR_3DVIEW* gui_editor_3dview( I32 x, I32 y, I32 w, I32 h );
-extern GUI_EDITOR_PROPVIEW* gui_editor_propview( I32 x, I32 y, I32 w, I32 h );
+extern GUI_EDITORWINDOW* gui_editorwindow( I32 w, I32 h );
+extern GUI_EDITOR_2DVIEW* gui_editor_2dview( I32 x, I32 y, I32 w, I32 h );
+extern GUI_EDITOR_3DVIEW* gui_editor_3dview( I32 x, I32 y, I32 w, I32 h );
+extern GUI_EDITOR_PROPVIEW* gui_editor_propview( I32 x, I32 y, I32 w, I32 h );
+extern void gui_editor_propview_select( GUI_EDITOR_PROPVIEW* e, void* what, U8 seltype );
+extern void gui_editor_propview_update( GUI_EDITOR_PROPVIEW* e );
+extern GUI_EDITOR_TOOLVIEW* gui_editor_toolview( I32 x, I32 y, I32 w, I32 h );
+extern void gui_editor_toolview_update( GUI_EDITOR_TOOLVIEW* view );
extern GUI_EDITOR_TEXTUREPICKER* gui_editor_texturepicker( I32 x, I32 y, I32 w, I32 h, GL_TEX2D** target );
-extern void gui_editor_propview_select( GUI_EDITOR_PROPVIEW* e, void* what, U8 seltype );
-extern void gui_editor_propview_update( GUI_EDITOR_PROPVIEW* e );
extern GAME_EDITOR* editor;