- [NEW] audio::getCurrentMusic() - [NEW] audio::stopAllChannels() - [FIX] El JAudio i JInput han de inicialitzarse abans de entrar al Init del joc - Afegides músiques i alguns sons - Comence a fer que sone cada musica i so en el seu lloc - [TOFIX] LAG EN EL AUDIO!
46 lines
1.0 KiB
C++
46 lines
1.0 KiB
C++
#include "m_catslife.h"
|
|
#include "jgame.h"
|
|
#include "jinput.h"
|
|
#include "jdraw.h"
|
|
#include "jaudio.h"
|
|
#include "actor.h"
|
|
#include "room.h"
|
|
#include "config.h"
|
|
#include <SDL2/SDL.h>
|
|
|
|
namespace modules
|
|
{
|
|
namespace catslife
|
|
{
|
|
actor::actor_t *gat = nullptr;
|
|
|
|
void init()
|
|
{
|
|
audio::playMusic("mus_gameover.ogg");
|
|
if (gat == nullptr) gat = actor::createFromTemplate("GAT-NEGRE");
|
|
}
|
|
|
|
bool loop()
|
|
{
|
|
if (input::keyPressed(SDL_SCANCODE_SPACE)) {
|
|
return false;
|
|
}
|
|
|
|
draw::cls(2);
|
|
draw::color(1);
|
|
draw::swapcol(1, WHITE);
|
|
actor::update(gat, false);
|
|
actor::drawAt(gat, 150, 130);
|
|
|
|
draw::print2("THE POOL", 16, 3, TEAL, FONT_ZOOM_VERTICAL);
|
|
|
|
draw::print2("CAT'S LIFE", 15, 9, YELLOW, FONT_ZOOM_VERTICAL);
|
|
|
|
draw::print2("(C) JAILDOCTOR 2024", 11, 28, TEAL, FONT_ZOOM_NONE);
|
|
|
|
draw::render();
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
|