From dc655ac2079e0eea55c56b6712bf6a2167b57845 Mon Sep 17 00:00:00 2001 From: Emil Williams Date: Wed, 11 Feb 2026 22:40:44 +0000 Subject: primitive implementation added movement, explosions, the conception of death, and bugs --- source/raylib.c | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) (limited to 'source/raylib.c') diff --git a/source/raylib.c b/source/raylib.c index 935feee..d96aa4a 100644 --- a/source/raylib.c +++ b/source/raylib.c @@ -1,13 +1,3 @@ -/* raylib.c & raygui.c */ - -#include - -Font DefaultFont(char * choice) { - Font font = LoadFont(choice); - if (!IsFontValid(font)) { font = GetFontDefault(); } - return font; -} - /* raygui.c */ #pragma GCC diagnostic push @@ -31,3 +21,33 @@ void GuiLoadStyleDarkSimple(void) { GuiSetStyle(darkStyleProps[i].controlId, darkStyleProps[i].propertyId, darkStyleProps[i].propertyValue); } } + +/* raylib.c */ + +#include + +Font DefaultFont(char * choice) { + Font font = LoadFont(choice); + if (!IsFontValid(font)) { font = GetFontDefault(); } + return font; +} + +void RaylibInitialize(int horizontal, int vertical, char * window_name, Font default_font) { +#ifdef NDEBUG + SetTraceLogLevel(LOG_NONE); +#endif + /* SetConfigFlags(FLAG_WINDOW_RESIZABLE); */ + InitWindow(horizontal, vertical, window_name); + SetWindowState(FLAG_WINDOW_HIDDEN); + /* we should spawn this in the center of the screen and have our window scale to the limit of the screen */ + InitAudioDevice(); + SetWindowPosition(0, 0); + GuiLoadStyleDarkSimple(); + GuiSetFont(default_font); +} + +void RaylibDeinitialize(void) { + SetWindowState(FLAG_WINDOW_HIDDEN); + CloseAudioDevice(); + CloseWindow(); +} -- cgit v1.2.3