- [CHG] Ara en Linux la configuració se guarda en " ~/.config/thepool/config.txt"

- [FIX] Solventada explosió en pantalla de gameover per un dangling pointer. Aplicades medides similars en catslife i ingame.
This commit is contained in:
2024-10-11 09:20:24 +02:00
parent 3f127b5444
commit 31f63516ca
5 changed files with 35 additions and 12 deletions

View File

@@ -19,7 +19,6 @@ namespace modules
{
if (audio::getCurrentMusic() != "mus_gameover.ogg") audio::playMusic("mus_gameover.ogg", 0);
if (heroi) actor::remove(heroi);
if (actor::hero::isPrologo()) {
heroi = actor::create("HERO", {16, 32, 0}, {6, 6, 8}, "gat.gif", {0, 0, 24, 28}, {-4, 32});
} else {
@@ -43,7 +42,12 @@ namespace modules
bool loop()
{
if (controller::pressed(KEY_JUMP) || controller::pressed(KEY_PICK)) { return false; }
if (controller::pressed(KEY_JUMP) || controller::pressed(KEY_PICK))
{
if (heroi) actor::remove(heroi);
heroi = nullptr;
return false;
}
draw::cls(2);
draw::color(1);