- [FIX] [#3] Quan entres a la habitació de la depuradora ... - [FIX] [#4] ficar anbernics recopilades en el game over i altres pantalles de resum - [FIX] [#5] que al acabar el joc la seuquencia acabe amb els stats, com el game over
50 lines
1.2 KiB
C++
50 lines
1.2 KiB
C++
#include "m_catslife.h"
|
|
#include "jgame.h"
|
|
#include "controller.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()
|
|
{
|
|
if (audio::getCurrentMusic() != "mus_gameover.ogg") audio::playMusic("mus_gameover.ogg", 0);
|
|
gat = actor::createFromTemplate("GAT-BATMAN");
|
|
}
|
|
|
|
bool loop()
|
|
{
|
|
if (controller::pressed(KEY_JUMP) || controller::pressed(KEY_PICK))
|
|
{
|
|
if (gat) actor::remove(gat);
|
|
gat = nullptr;
|
|
audio::playMusic("mus_ingame.ogg");
|
|
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;
|
|
}
|
|
}
|
|
}
|
|
|