summaryrefslogtreecommitdiff
path: root/include/draw.h
diff options
context:
space:
mode:
authorOxore <oxore@protonmail.com>2018-07-03 15:11:54 +0300
committerOxore <oxore@protonmail.com>2018-07-03 15:11:54 +0300
commited8127a72e1a2d2703372d5b5dfa8d96703ec3bb (patch)
tree80f340c64861913f2dc648c2c7280c144b988881 /include/draw.h
parent21a0a44853451f3d791bafc80c01deab0ff4c79e (diff)
Refactor field, refactor next shape drawing
Refactor field functions names. Transfer next shape drawing to painter. Introduce idlist struct with foreach function. Refactor config. Introduce color map array instead of "switch case" statement bloating while coloring rectangles. Decouple field and shape structs from SFML sfVector2 structs by introducing own vector2i and vector2ui structs. Also remove sfRectangleShape members form field an shape structs.
Diffstat (limited to 'include/draw.h')
-rw-r--r--include/draw.h17
1 files changed, 6 insertions, 11 deletions
diff --git a/include/draw.h b/include/draw.h
index 3408142..17bf176 100644
--- a/include/draw.h
+++ b/include/draw.h
@@ -4,20 +4,15 @@ struct window {
sfEvent event;
};
-//struct field_conf {
-// sfVector2i pos;
-// int cOutThick;
-// sfVector2f cSize;
-// sfVector2i size;
-//} field_conf;
-
void painter_init_window();
+void painter_destroy_window();
unsigned long painter_register_field();
void painter_update_field(unsigned long id, struct field *fld);
-
-unsigned long painter_register_shape();
-void painter_update_shape(unsigned long id, struct shape *shape);
+void painter_destroy_field(unsigned long id);
+void painter_destroy_fields();
void painter_draw();
-void painter_destroy_window();
+
+void painter_destroy_drawables();
+void painter_destroy_all();