Browse Source

Update raylib_game.c

main
raysan5 4 years ago
parent
commit
1a6ea36c46
  1. 9
      src/raylib_game.c

9
src/raylib_game.c

@ -56,13 +56,13 @@ static void UpdateDrawFrame(void); // Update and draw one frame
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
int main(void) int main(void)
{ {
// Initialization (Note windowTitle is unused on Android) // Initialization
//--------------------------------------------------------- //---------------------------------------------------------
InitWindow(screenWidth, screenHeight, "raylib game template"); InitWindow(screenWidth, screenHeight, "raylib game template");
// Global data loading (assets that must be available in all screens, i.e. fonts) InitAudioDevice(); // Initialize audio device
InitAudioDevice();
// Load global data (assets that must be available in all screens, i.e. font)
font = LoadFont("resources/mecha.png"); font = LoadFont("resources/mecha.png");
music = LoadMusicStream("resources/ambient.ogg"); music = LoadMusicStream("resources/ambient.ogg");
fxCoin = LoadSound("resources/coin.wav"); fxCoin = LoadSound("resources/coin.wav");
@ -70,7 +70,7 @@ int main(void)
SetMusicVolume(music, 1.0f); SetMusicVolume(music, 1.0f);
PlayMusicStream(music); PlayMusicStream(music);
// Setup and Init first screen // Setup and init first screen
currentScreen = LOGO; currentScreen = LOGO;
InitLogoScreen(); InitLogoScreen();
@ -89,7 +89,6 @@ int main(void)
// De-Initialization // De-Initialization
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
// Unload current screen data before closing // Unload current screen data before closing
switch (currentScreen) switch (currentScreen)
{ {

Loading…
Cancel
Save