Compare commits
3 Commits
2025-01-05
...
7130f2298a
| Author | SHA1 | Date | |
|---|---|---|---|
| 7130f2298a | |||
| 380cc17861 | |||
| a5388873e3 |
@@ -11,7 +11,7 @@ Coffee Crisis Arcade Edition és una versió ampliada i millorada del aclamat Co
|
|||||||
Defensa el teu cafè contra les bambolles gegants en aquest trepidant joc d'arcade! 🍵
|
Defensa el teu cafè contra les bambolles gegants en aquest trepidant joc d'arcade! 🍵
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img src="https://php.sustancia.synology.me/images/ccae_title.png" alt="Títol" />
|
<img src="https://php.sustancia.synology.me/images/ccae_title.png" alt="Títol" width="60%" />
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
## Controls
|
## Controls
|
||||||
@@ -25,7 +25,8 @@ El joc està optimitzat per a ser jugat amb un mando de jocs, encara que un dels
|
|||||||
> Nota: El joc suporta nomes un jugador amb teclat.
|
> Nota: El joc suporta nomes un jugador amb teclat.
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img src="https://php.sustancia.synology.me/images/ccae1.png" alt="Joc" />
|
<img src="https://php.sustancia.synology.me/images/ccae1.png" alt="Joc" width="45%" />
|
||||||
|
<img src="https://php.sustancia.synology.me/images/ccae3.png" alt="Joc" width="45%" />
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
## Altres tecles
|
## Altres tecles
|
||||||
@@ -43,7 +44,7 @@ El joc està optimitzat per a ser jugat amb un mando de jocs, encara que un dels
|
|||||||
| **F10** | Reset del joc |
|
| **F10** | Reset del joc |
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img src="https://php.sustancia.synology.me/images/ccae2.png" alt="Joc" />
|
<img src="https://php.sustancia.synology.me/images/ccae2.png" alt="Joc" width="50%" />
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
## Com instal·lar i jugar
|
## Com instal·lar i jugar
|
||||||
|
|||||||
@@ -126,6 +126,10 @@ void Director::close()
|
|||||||
SDL_DestroyWindow(window_);
|
SDL_DestroyWindow(window_);
|
||||||
|
|
||||||
SDL_Quit();
|
SDL_Quit();
|
||||||
|
|
||||||
|
#ifdef ARCADE
|
||||||
|
shutdownSystem(section::options == section::Options::QUIT_WITH_CONTROLLER);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Carga los parametros
|
// Carga los parametros
|
||||||
@@ -762,11 +766,6 @@ int Director::run()
|
|||||||
// Habilita de nuevo los std::cout
|
// Habilita de nuevo los std::cout
|
||||||
std::cout.rdbuf(orig_buf);
|
std::cout.rdbuf(orig_buf);
|
||||||
#endif
|
#endif
|
||||||
#ifdef ARCADE
|
|
||||||
// Comprueba si ha de apagar el sistema
|
|
||||||
if (section::options == section::Options::QUIT_WITH_CONTROLLER)
|
|
||||||
shutdownSystem();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return (section::options == section::Options::QUIT_WITH_CONTROLLER) ? 1 : 0;
|
return (section::options == section::Options::QUIT_WITH_CONTROLLER) ? 1 : 0;
|
||||||
}
|
}
|
||||||
@@ -794,20 +793,23 @@ std::string Director::getLangFile(lang::Code code)
|
|||||||
|
|
||||||
#ifdef ARCADE
|
#ifdef ARCADE
|
||||||
// Apaga el sistema
|
// Apaga el sistema
|
||||||
void Director::shutdownSystem()
|
void Director::shutdownSystem(bool shouldShutdown)
|
||||||
{
|
{
|
||||||
|
if (shouldShutdown)
|
||||||
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
// Apaga el sistema en Windows
|
// Apaga el sistema en Windows
|
||||||
system("shutdown /s /t 0");
|
system("shutdown /s /t 5");
|
||||||
#elif __APPLE__
|
#elif __APPLE__
|
||||||
// Apaga el sistema en macOS
|
// Apaga el sistema en macOS
|
||||||
system("sudo shutdown -h now");
|
system("sudo shutdown -h +0.1");
|
||||||
#elif __linux__
|
#elif __linux__
|
||||||
// Apaga el sistema en Linux
|
// Apaga el sistema en Linux
|
||||||
system("shutdown -h now");
|
system("shutdown -h +0.1");
|
||||||
#else
|
#else
|
||||||
// Sistema operativo no compatible
|
// Sistema operativo no compatible
|
||||||
#error "Sistema operativo no soportado"
|
#error "Sistema operativo no soportado"
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif // ARCADE
|
#endif // ARCADE
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ private:
|
|||||||
std::string getLangFile(lang::Code code);
|
std::string getLangFile(lang::Code code);
|
||||||
#ifdef ARCADE
|
#ifdef ARCADE
|
||||||
// Apaga el sistema
|
// Apaga el sistema
|
||||||
void shutdownSystem();
|
void shutdownSystem(bool shouldShutdown);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Inicializa todo
|
// Inicializa todo
|
||||||
|
|||||||
Reference in New Issue
Block a user