]> git.lizzy.rs Git - nothing.git/blobdiff - src/game/level/level_editor/proto_rect.h
(#788) Introduced bugs
[nothing.git] / src / game / level / level_editor / proto_rect.h
index c3094f1e54b90465eac7da6c39a7f0ec4aafa586..ea9df68a1fea54c48162a9417e75bdd813d9a32d 100644 (file)
@@ -1,29 +1,22 @@
 #ifndef PROTO_RECT_H_
 #define PROTO_RECT_H_
 
+typedef struct RectLayer RectLayer;
+
 typedef struct {
+    // TODO: ProtoRect cannot be deactivated after unpressed
     bool active;
     Sint32 x, y;
     Vec begin, end;
-    Color color;
 } ProtoRect;
 
-typedef struct Layer Layer;
-
 int proto_rect_render(const ProtoRect *proto_rect,
-                      Camera *camera);
-int proto_rect_update(ProtoRect *proto_rect,
-                      float delta_time);
+                      Camera *camera,
+                      Color color);
 int proto_rect_event(ProtoRect *proto_rect,
                      const SDL_Event *event,
                      const Camera *camera,
-                     Layer *layer);
-int proto_rect_mouse_button(ProtoRect *proto_rect,
-                            const SDL_MouseButtonEvent *event,
-                            Layer *layer,
-                            const Camera *camera);
-int proto_rect_mouse_motion(ProtoRect *proto_rect,
-                            const SDL_MouseMotionEvent *event,
-                            const Camera *camera);
+                     Color color,
+                     RectLayer *layer);
 
 #endif  // PROTO_RECT_H_