From 62d7c6d54e9eed883d183545c2e97379abfb68b2 Mon Sep 17 00:00:00 2001 From: Abdelrahman Date: Wed, 1 Feb 2023 00:00:43 +0000 Subject: [PATCH] Moved FontDirection enum to Renderer.h --- include/GameEngine.h | 11 ++--------- include/Renderer.h | 8 ++++++++ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/include/GameEngine.h b/include/GameEngine.h index c5726b6..4460934 100644 --- a/include/GameEngine.h +++ b/include/GameEngine.h @@ -14,13 +14,6 @@ extern "C" { #endif // !__cplusplus -typedef enum { - FONT_DIRECTION_LTR = TTF_DIRECTION_LTR, - FONT_DIRECTION_RTL = TTF_DIRECTION_RTL, - FONT_DIRECTION_TTB = TTF_DIRECTION_TTB, - FONT_DIRECTION_BTT = TTF_DIRECTION_BTT, -} FontDirection; - // GENERAL ENGINE API /** @@ -39,11 +32,11 @@ void close_engine(); i64 get_time(); // END GENERAL ENGINE API -// ASSET MANAGEMENT API +// OBJECT MANAGEMENT API ObjectID add_object(void *object, EventHandlerPtr eh, UpdateFuncPtr uf, RenderFuncPtr rf); void remove_object(ObjectID *id); -// END ASSET MANAGEMENT API +// END OBJECT MANAGEMENT API // ASSET MANAGEMENT API AssetID load_asset(const char *path, AssetType type); diff --git a/include/Renderer.h b/include/Renderer.h index 398c47c..73875eb 100644 --- a/include/Renderer.h +++ b/include/Renderer.h @@ -5,6 +5,7 @@ #include "SDL_pixels.h" #include "SDL_render.h" #include "SDL_surface.h" +#include "SDL_ttf.h" #include "SDL_video.h" #include "aliases.h" #include @@ -21,6 +22,13 @@ typedef struct { i32 height; } TextSize; +typedef enum { + FONT_DIRECTION_LTR = TTF_DIRECTION_LTR, + FONT_DIRECTION_RTL = TTF_DIRECTION_RTL, + FONT_DIRECTION_TTB = TTF_DIRECTION_TTB, + FONT_DIRECTION_BTT = TTF_DIRECTION_BTT, +} FontDirection; + typedef struct { f32 x; f32 y;