- [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:
@@ -76,9 +76,17 @@ namespace modules
|
||||
}
|
||||
}
|
||||
|
||||
void cleanup()
|
||||
{
|
||||
for (int i=0; i<6; ++i) { actor::remove(parts[i]); parts[i]=nullptr;}
|
||||
actor::remove(anbernic); anbernic=nullptr;
|
||||
}
|
||||
|
||||
int loop()
|
||||
{
|
||||
if (controller::pressed(KEY_MENU)) {
|
||||
if (controller::pressed(KEY_MENU))
|
||||
{
|
||||
cleanup();
|
||||
return INGAME_CONTINUAR;
|
||||
}
|
||||
if (controller::pressed(KEY_DOWN) || input::keyPressed(SDL_SCANCODE_DOWN))
|
||||
@@ -94,11 +102,7 @@ namespace modules
|
||||
if (controller::pressed(KEY_JUMP) || controller::pressed(KEY_PICK) || input::keyPressed(SDL_SCANCODE_RETURN))
|
||||
{
|
||||
audio::playSound("snd_push.wav", SOUND_BASIC);
|
||||
if (selected_option==INGAME_EIXIR)
|
||||
{
|
||||
for (int i=0; i<6; ++i) { actor::remove(parts[i]); parts[i]=nullptr;}
|
||||
actor::remove(anbernic); anbernic=nullptr;
|
||||
}
|
||||
cleanup();
|
||||
return selected_option;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user