#include "raylib.h"
#include "core/camera_node.h"
#include "core/engine_global.h"
#include "core/engine_loop.h"
#include "core/scene.h"
#include "core/transform_node.h"
#include "utils/debug.h"

Scene *CreateInitialScene() {
    SceneNode *root = CreateTransformNode();
    SceneNode *camera_node = CreateCameraNode();
        Transformable camera = TC_CAST(camera_node->entity, Transformable);
        Transform *camera_global = camera.tc->get_global_transform(camera.data);
        camera_global->translation = (Vector3){0.f, 10.f, -10.f};
        camera_global->rotation = QuaternionFromEuler(45.f * DEG2RAD, 0.f, 0.f);
    SceneNodeAddChild(root, camera_node);
    return CreateScene(root);
}

int main() {
    InitializeEngine();
    RunGame(CreateInitialScene());
    UNREACHABLE("End of main function reached. This is an error, call ShutDown() when exiting instead.");
}
