summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/editor.c5
-rw-r--r--src/main.c9
2 files changed, 13 insertions, 1 deletions
diff --git a/src/editor.c b/src/editor.c
index 0bb31b2..78c3d60 100644
--- a/src/editor.c
+++ b/src/editor.c
@@ -5,8 +5,11 @@
#include <stdio.h>
#include <stdlib.h>
-#include "raygui.h"
#include "raylib.h"
+
+#define RAYGUI_IMPLEMENTATION
+#include "raygui.h"
+
#include "xd.h"
const char *EDITOR_MAIN_TABS[] = {"Build"};
diff --git a/src/main.c b/src/main.c
index c96a9b7..23fa050 100644
--- a/src/main.c
+++ b/src/main.c
@@ -26,6 +26,15 @@ int main() {
XdData* data = NULL;
Editor editor = {data, {0, 0, 0, NULL, {0, 0, 0, 0}, {0, 0}, NULL, {}}};
+ // creating a new xd data
+ data = malloc(sizeof(XdData));
+ editor.data = data;
+ data->name = "xd";
+ data->levels[0] = malloc(sizeof(XdLevel));
+ data->levels[0]->floors[0] = malloc(sizeof(XdFloor));
+ data->levels[0]->floors[0]->width = 30;
+ data->levels[0]->floors[0]->height = 30;
+
Camera2D camera = {0};
camera.target = (Vector2){0.0f, 0.0f};
camera.offset = (Vector2){0.0f, 0.0f};