Intentando hacer que suene jail_audio

This commit is contained in:
2022-10-21 17:52:50 +02:00
parent f63ff07397
commit 5098ed1638
3 changed files with 70 additions and 279 deletions

View File

@@ -35,7 +35,6 @@ Los objetos globo tienen varios contadores para alternar de un estado a otro.
En los vectores que contienen objetos, se considera activos los objetos que tienen
un tipo asociado diferente a NO_KIND
*/
#define TEST_
#include "background.h"
#include "balloon.h"
@@ -78,7 +77,7 @@ bool init()
JA_Init(44100, AUDIO_S16, 2);
// Inicializa SDL
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK | SDL_INIT_AUDIO) < 0)
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK) < 0)
{
printf("SDL could not initialize! SDL Error: %s\n", SDL_GetError());
success = false;
@@ -91,13 +90,6 @@ bool init()
printf("Warning: Nearest texture filtering not enabled!");
}
// Inicializa SDL_mixer
//if (Mix_OpenAudio(44100, MIX_DEFAULT_FORMAT, 2, 2048) < 0)
//{
// printf("SDL_mixer could not initialize! SDL_mixer Error: %s\n", Mix_GetError());
// success = false;
//}
// Crea la ventana
gWindow = SDL_CreateWindow("Super Popping (Like Loc) in Jailers World", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, VIEW_WIDTH, VIEW_HEIGHT, SDL_WINDOW_SHOWN);
if (gWindow == NULL)
@@ -121,14 +113,6 @@ bool init()
// Establece el tamaño del buffer de renderizado
SDL_RenderSetLogicalSize(gRenderer, SCREEN_WIDTH, SCREEN_HEIGHT);
// Inicializa el cargador de PNG
/*int imgFlags = IMG_INIT_PNG;
if (!(IMG_Init(imgFlags) & imgFlags))
{
printf("SDL_image could not initialize! SDL_image Error: %s\n", IMG_GetError());
success = false;
}*/
}
}
}
@@ -146,7 +130,6 @@ void close()
gRenderer = NULL;
// Sal del subsistema SDL
//IMG_Quit();
SDL_Quit();
}
@@ -164,13 +147,6 @@ int main(int argc, char *args[])
// Crea el objeto gameDirector
GameDirector gameDirector(gRenderer);
// Inicializa el objeto gameDirector
gameDirector.init();
#ifdef TEST
gameDirector.resetBalloons();
#endif
// Mientras no se quiera salir del juego
while (!(gameDirector.getGameStatus() == GAME_STATE_QUIT))
{