mirror of
https://github.com/raysan5/raylib.git
synced 2026-02-03 04:39:18 -05:00
Updated games to latest raylib version
Updated to new audio system
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
*
|
||||
* SKULLY ESCAPE [KING GAME JAM 2015]
|
||||
*
|
||||
* This game has been created using raylib (www.raylib.com)
|
||||
* This game has been created using raylib 1.6 (www.raylib.com)
|
||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
||||
*
|
||||
* Copyright (c) 2014 Ramon Santamaria (Ray San - raysan@raysanweb.com)
|
||||
@ -32,6 +32,8 @@ int transFromScreen = -1;
|
||||
int transToScreen = -1;
|
||||
|
||||
static int framesCounter = 0;
|
||||
|
||||
Music music;
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
// Local Functions Declaration
|
||||
@ -57,7 +59,8 @@ int main(void)
|
||||
// Global data loading (assets that must be available in all screens, i.e. fonts)
|
||||
InitAudioDevice();
|
||||
|
||||
PlayMusicStream("resources/audio/come_play_with_me.ogg");
|
||||
music = LoadMusicStream("resources/audio/come_play_with_me.ogg");
|
||||
PlayMusicStream(music);
|
||||
|
||||
font = LoadSpriteFont("resources/textures/alagard.png");
|
||||
doors = LoadTexture("resources/textures/doors.png");
|
||||
@ -93,6 +96,8 @@ int main(void)
|
||||
UnloadSound(sndDoor);
|
||||
UnloadSound(sndScream);
|
||||
|
||||
UnloadMusicStream(music);
|
||||
|
||||
CloseAudioDevice();
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
@ -368,7 +373,7 @@ void UpdateDrawFrame(void)
|
||||
UpdateTransition();
|
||||
}
|
||||
|
||||
UpdateMusicStream();
|
||||
UpdateMusicStream(music);
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
|
||||
Reference in New Issue
Block a user