normalitzat Audio
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
#include <string> // for basic_string
|
||||
|
||||
#include "core/audio/jail_audio.hpp" // for JA_StopMusic, JA_DeleteMusic, JA_LoadMusic
|
||||
#include "core/audio/audio.hpp" // for Audio::get, Audio::update
|
||||
#include "core/input/global_inputs.hpp" // for GlobalInputs::handle
|
||||
#include "core/input/input.h" // for Input, REPEAT_FALSE, inputs_e
|
||||
#include "core/locale/lang.h" // for Lang
|
||||
@@ -149,7 +149,7 @@ Intro::Intro(SDL_Renderer *renderer, section_t *section) {
|
||||
t->center(GAMECANVAS_CENTER_X);
|
||||
}
|
||||
|
||||
JA_PlayMusic(music, 0);
|
||||
Audio::get()->playMusic(music, 0);
|
||||
}
|
||||
|
||||
// Destructor
|
||||
@@ -177,7 +177,7 @@ void Intro::checkInput() {
|
||||
if (GlobalInputs::handle()) { return; }
|
||||
|
||||
if (Input::get()->checkInput(input_pause, REPEAT_FALSE) || Input::get()->checkInput(input_accept, REPEAT_FALSE) || Input::get()->checkInput(input_fire_left, REPEAT_FALSE) || Input::get()->checkInput(input_fire_center, REPEAT_FALSE) || Input::get()->checkInput(input_fire_right, REPEAT_FALSE)) {
|
||||
JA_StopMusic();
|
||||
Audio::get()->stopMusic();
|
||||
section->name = SECTION_PROG_TITLE;
|
||||
section->subsection = SUBSECTION_TITLE_1;
|
||||
}
|
||||
@@ -307,7 +307,7 @@ void Intro::updateScenes() {
|
||||
if (bitmaps[5]->hasFinished() && texts[8]->hasFinished()) {
|
||||
bitmaps[5]->setEnabled(false);
|
||||
texts[8]->setEnabled(false);
|
||||
JA_StopMusic();
|
||||
Audio::get()->stopMusic();
|
||||
section->name = SECTION_PROG_TITLE;
|
||||
section->subsection = SUBSECTION_TITLE_1;
|
||||
}
|
||||
@@ -321,7 +321,7 @@ void Intro::updateScenes() {
|
||||
|
||||
// Actualiza las variables del objeto
|
||||
void Intro::update() {
|
||||
JA_Update();
|
||||
Audio::update();
|
||||
checkInput();
|
||||
|
||||
if (SDL_GetTicks() - ticks > ticksSpeed) {
|
||||
@@ -365,7 +365,7 @@ void Intro::render() {
|
||||
|
||||
// Bucle principal
|
||||
void Intro::run() {
|
||||
JA_PlayMusic(music, 0);
|
||||
Audio::get()->playMusic(music, 0);
|
||||
|
||||
while (section->name == SECTION_PROG_INTRO) {
|
||||
iterate();
|
||||
|
||||
Reference in New Issue
Block a user