From 9483b0ceac889f1678dc00f20ef08a0f5bfe0b06 Mon Sep 17 00:00:00 2001 From: Ray Date: Tue, 11 Jan 2022 15:58:48 +0100 Subject: [PATCH] Update raylib_game.c --- src/raylib_game.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/raylib_game.c b/src/raylib_game.c index 027aa68..debbe74 100644 --- a/src/raylib_game.c +++ b/src/raylib_game.c @@ -1,6 +1,6 @@ /******************************************************************************************* * -* raylib Game Template +* raylib game template * * * @@ -21,6 +21,7 @@ //---------------------------------------------------------------------------------- // Shared Variables Definition (global) +// NOTE: Those variables are shared between modules through screens.h //---------------------------------------------------------------------------------- GameScreen currentScreen = 0; Font font = { 0 }; @@ -28,7 +29,7 @@ Music music = { 0 }; Sound fxCoin = { 0 }; //---------------------------------------------------------------------------------- -// Global Variables Definition (local to this module) +// Local Variables Definition (local to this module) //---------------------------------------------------------------------------------- static const int screenWidth = 800; static const int screenHeight = 450; @@ -99,7 +100,7 @@ int main(void) default: break; } - // Unload all global loaded data (i.e. fonts) here! + // Unload global data loaded UnloadFont(font); UnloadMusicStream(music); UnloadSound(fxCoin); @@ -115,7 +116,6 @@ int main(void) //---------------------------------------------------------------------------------- // Module specific Functions Definition //---------------------------------------------------------------------------------- - // Change to next screen, no transition static void ChangeToScreen(int screen) { @@ -152,7 +152,7 @@ static void TransitionToScreen(int screen) transAlpha = 0.0f; } -// Update transition effect +// Update transition effect (fade-in, fade-out) static void UpdateTransition(void) { if (!transFadeOut)