#ifndef _ENGINE_RENDER_H_ #define _ENGINE_RENDER_H_ #include <engine/utility.h> #include <alias/math.h> #include <alias/color.h> struct LoadedResource; struct Image { const char * path; uint32_t resource_id; struct LoadedResource * resource; }; DECLARE_COMPONENT(Camera, { alias_pga2d_Point viewport_min; alias_pga2d_Point viewport_max; alias_R zoom; }) #define Camera_DEFAULT (struct Camera) { .viewport_max = { alias_R_ONE, alias_R_ONE }, .zoom = alias_R_ONE } DECLARE_COMPONENT(DrawRectangle, { float width; float height; alias_Color color; }) DECLARE_COMPONENT(DrawCircle, { alias_R radius; alias_Color color; }) DECLARE_COMPONENT(DrawText, { const char * text; alias_R size; alias_Color color; }) DECLARE_COMPONENT(Sprite, { struct Image * image; alias_R s0, t0, s1, t1; alias_Color color; }) void Engine_render_init(void); // TODO replace with declariation of an integer at /var/render/width uint32_t Engine_render_get_width(void); void Engine_render_set_width(uint32_t width); // TODO replace with declariation of an integer at /var/render/height uint32_t Engine_render_get_height(void); void Engine_render_set_height(uint32_t height); #endif