Creada la classe Resource

Afegida la musica i els sons a Resource
This commit is contained in:
2024-10-19 10:07:14 +02:00
parent b879673bc2
commit f23dcae5b6
19 changed files with 243 additions and 258 deletions

View File

@@ -9,6 +9,7 @@
#include "jail_audio.h" // for JA_StopMusic, JA_PlayMusic
#include "lang.h" // for getText
#include "param.h" // for param
#include "resource.h" // for Resource
#include "screen.h" // for Screen
#include "section.h" // for Name, name, Options, options
#include "smart_sprite.h" // for SpriteSmart
@@ -19,8 +20,7 @@
struct JA_Music_t; // lines 19-19
// Constructor
Intro::Intro(JA_Music_t *music)
: music_(music)
Intro::Intro()
{
// Copia los punteros
auto renderer = Screen::get()->getRenderer();
@@ -425,7 +425,7 @@ void Intro::render()
// Bucle principal
void Intro::run()
{
JA_PlayMusic(music_, 0);
JA_PlayMusic(Resource::get()->getMusic("intro.ogg"), 0);
while (section::name == section::Name::INTRO)
{