diff options
| author | aura <nw@moneybot.cc> | 2026-02-27 10:08:14 +0100 |
|---|---|---|
| committer | aura <nw@moneybot.cc> | 2026-02-27 10:08:14 +0100 |
| commit | 7c0e1e9b3beb0ab5f00c27eb97b84570c532b9ac (patch) | |
| tree | e9e9a8b14fc2698fe6895a5903ff98f1960d3b46 /src/editor/editor.h | |
| parent | 66561ea2fb7f76c408c08e21132e58914329faba (diff) | |
| parent | 17780f161914e30aaeb1321872730f7fb2cd26c3 (diff) | |
Merge branch 'tool-updates'
Diffstat (limited to 'src/editor/editor.h')
| -rw-r--r-- | src/editor/editor.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/editor/editor.h b/src/editor/editor.h index 9063f50..cd42a4e 100644 --- a/src/editor/editor.h +++ b/src/editor/editor.h @@ -4,6 +4,11 @@ #include "../game/world/map.h" const F32 EDITOR_DEFAULT_SPRITE_SIZE = 32.f; +const F32 EDITOR_DEFAULT_POLY_SIDES = 6.f; +const F32 EDITOR_DEFAULT_WALL_HEIGHT = 80.f; +const F32 EDITOR_DEFAULT_PLACEMENT_HEIGHT = 0.f; +const I32 EDITOR_POLY_SIDES_MIN = 3; +const I32 EDITOR_POLY_SIDES_MAX = 32; enum EditorTools_t { EDITOR_TOOL_NONE, @@ -14,6 +19,11 @@ enum EditorTools_t { EDITOR_TOOL_ENT }; +enum EditorWallShape_t { + EDITOR_WALLSHAPE_LINE = 0, + EDITOR_WALLSHAPE_POLYGON = 1 +}; + enum EditorSelectType_t { EDITOR_SELECT_NONE, EDITOR_SELECT_WALL, @@ -30,7 +40,10 @@ struct GAME_EDITOR_TOOL { U8 type; /* shapes */ - U8 walls; + I32 wallshape; + F32 polysides; + F32 wallheight; + F32 placementheight; GL_TEX2D* tex; /* entity */ @@ -107,6 +120,10 @@ struct GUI_EDITOR_2DVIEW : GUI_VIEW { void* curdrag; U8 dragtype; U8 dragmoved; + + U8 poly_drag; + VEC2 poly_start; + VEC2 poly_end; }; struct GUI_EDITOR_PROPVIEW : GUI_VIEW { @@ -118,6 +135,7 @@ struct GUI_EDITOR_PROPVIEW : GUI_VIEW { struct GUI_EDITOR_TOOLVIEW : GUI_VIEW { GUI_VIEW* itemview; + U8 wallshape_dropdown_open; }; struct GUI_EDITOR_TEXTUREPICKER : GUI_WINDOW { |
