]> git.lizzy.rs Git - nothing.git/commitdiff
(#815) Introduce Goals Layer
authorrexim <reximkut@gmail.com>
Sat, 4 May 2019 18:04:33 +0000 (01:04 +0700)
committerrexim <reximkut@gmail.com>
Sat, 4 May 2019 18:04:33 +0000 (01:04 +0700)
src/game/level/level_editor.c
src/game/level/level_editor/layer_picker.c
src/game/level/level_editor/layer_picker.h

index dd22f4b7475a2b8ce383726b4502273c97809940..008c277a58ab28f311d1dac13ecfb2f9d3ff0eed 100644 (file)
@@ -5,6 +5,7 @@
 #include "game/level/level_editor/proto_rect.h"
 #include "game/level/level_editor/color_picker.h"
 #include "game/level/level_editor/layer.h"
+#include "game/level/level_editor/point_layer.h"
 #include "game/level/level_editor/layer_picker.h"
 #include "system/stacktrace.h"
 #include "system/nth_alloc.h"
@@ -24,6 +25,7 @@ struct LevelEditor
     Layer *boxes_layer;
     Layer *platforms_layer;
     Layer *back_platforms_layer;
+    PointLayer *goals_layer;
     Layer *current_layer;
     // TODO(#823): LevelEditor does not allow to switch the current layer
     bool drag;
index 8aa0ca8a87177b19cf432c78a6131bcac4a8be59..47d7eb953f92f48dfb25880c4fc4b5706aaaa785 100644 (file)
@@ -17,12 +17,14 @@ static const Color LAYER_CELL_BACKGROUND_COLORS[LAYER_PICKER_N] = {
     {1.0f, 0.0f, 0.0f, 1.0f},  // LAYER_PICKER_BOXES = 0,
     {0.0f, 1.0f, 0.0f, 1.0f},  // LAYER_PICKER_PLATFORMS,
     {0.0f, 0.0f, 1.0f, 1.0f},  // LAYER_PICKER_BACK_PLATFORMS,
+    {1.0f, 1.0f, 1.0f, 1.0f},  // LAYER_PICKER_GOALS
 };
 
 static const char *LAYER_CELL_TITLES[LAYER_PICKER_N] = {
     "B",                    // LAYER_PICKER_BOXES = 0,
     "P",                    // LAYER_PICKER_PLATFORMS,
-    "BP"                    // LAYER_PICKER_BACK_PLATFORMS,
+    "BP",                   // LAYER_PICKER_BACK_PLATFORMS,
+    "G",                    // LAYER_PICKER_GOALS
 };
 
 int layer_picker_render(const LayerPicker *layer_picker,
index 7b26cd61c2784e2eee669e99a818eb2504730f45..46b8af5ba2dc3d77cad390b902eb94ff8ff7d80d 100644 (file)
@@ -8,6 +8,7 @@ typedef enum {
     LAYER_PICKER_BOXES = 0,
     LAYER_PICKER_PLATFORMS,
     LAYER_PICKER_BACK_PLATFORMS,
+    LAYER_PICKER_GOALS,
 
     LAYER_PICKER_N
 } LayerPicker;