Compare commits
7 Commits
v2.1
...
fa53c1b01a
| Author | SHA1 | Date | |
|---|---|---|---|
| fa53c1b01a | |||
| 20b362160e | |||
| 5cabbfc487 | |||
| 9f5e001c70 | |||
| 112c3afc76 | |||
| f4215384fe | |||
| 7796cee51a |
6
.gitignore
vendored
6
.gitignore
vendored
@@ -1,6 +1,6 @@
|
|||||||
.vscode
|
.vscode
|
||||||
*.DS_Store
|
*.DS_Store
|
||||||
bin
|
bin
|
||||||
data/config.txt
|
data/config/config.txt
|
||||||
data/config.bin
|
data/config/config.bin
|
||||||
data/score.bin
|
data/config/score.bin
|
||||||
3
Makefile
3
Makefile
@@ -3,7 +3,8 @@ executable = coffee_crisis
|
|||||||
windows:
|
windows:
|
||||||
@echo off
|
@echo off
|
||||||
if not exist bin\ (mkdir bin)
|
if not exist bin\ (mkdir bin)
|
||||||
g++ -std=c++11 -Wall -O2 source/*.cpp -lmingw32 -lSDL2main -lSDL2 -o bin/$(executable).exe
|
g++ -std=c++11 -Wall -O2 source/*.cpp -lmingw32 -lSDL2main -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -o bin/$(executable).exe
|
||||||
|
strip -s -R .comment -R .gnu.version bin/$(executable).exe --strip-unneeded
|
||||||
macos:
|
macos:
|
||||||
mkdir -p bin
|
mkdir -p bin
|
||||||
g++ source/*.cpp -std=c++11 -Wall -O2 -lSDL2 -o bin/$(executable)_macos
|
g++ source/*.cpp -std=c++11 -Wall -O2 -lSDL2 -o bin/$(executable)_macos
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.4 KiB |
@@ -236,7 +236,7 @@ void Instructions::checkEventHandler()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Bucle para la pantalla de instrucciones
|
// Bucle para la pantalla de instrucciones
|
||||||
void Instructions::run(mode_e mode)
|
section_t Instructions::run(mode_e mode)
|
||||||
{
|
{
|
||||||
this->mode = mode;
|
this->mode = mode;
|
||||||
|
|
||||||
@@ -245,4 +245,6 @@ void Instructions::run(mode_e mode)
|
|||||||
update();
|
update();
|
||||||
render();
|
render();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return section;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ public:
|
|||||||
~Instructions();
|
~Instructions();
|
||||||
|
|
||||||
// Bucle principal
|
// Bucle principal
|
||||||
void run(mode_e mode);
|
section_t run(mode_e mode);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -301,7 +301,10 @@ void Title::update()
|
|||||||
if (demo)
|
if (demo)
|
||||||
{
|
{
|
||||||
runDemoGame();
|
runDemoGame();
|
||||||
runInstructions(m_auto);
|
if (section.name != PROG_SECTION_QUIT)
|
||||||
|
{
|
||||||
|
runInstructions(m_auto);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
section.name = PROG_SECTION_LOGO;
|
section.name = PROG_SECTION_LOGO;
|
||||||
@@ -483,7 +486,10 @@ void Title::update()
|
|||||||
if (demo)
|
if (demo)
|
||||||
{
|
{
|
||||||
runDemoGame();
|
runDemoGame();
|
||||||
runInstructions(m_auto);
|
if (section.name != PROG_SECTION_QUIT)
|
||||||
|
{
|
||||||
|
runInstructions(m_auto);
|
||||||
|
}
|
||||||
init();
|
init();
|
||||||
demo = false;
|
demo = false;
|
||||||
counter = TITLE_COUNTER;
|
counter = TITLE_COUNTER;
|
||||||
@@ -939,19 +945,23 @@ section_t Title::run()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Ejecuta la parte donde se muestran las instrucciones
|
// Ejecuta la parte donde se muestran las instrucciones
|
||||||
void Title::runInstructions(mode_e mode)
|
section_t Title::runInstructions(mode_e mode)
|
||||||
{
|
{
|
||||||
instructions = new Instructions(renderer, screen, asset, lang);
|
instructions = new Instructions(renderer, screen, asset, lang);
|
||||||
instructions->run(mode);
|
section = instructions->run(mode);
|
||||||
delete instructions;
|
delete instructions;
|
||||||
|
|
||||||
|
return section;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ejecuta el juego en modo demo
|
// Ejecuta el juego en modo demo
|
||||||
void Title::runDemoGame()
|
section_t Title::runDemoGame()
|
||||||
{
|
{
|
||||||
demoGame = new Game(1, 0, renderer, screen, asset, lang, input, true, options);
|
demoGame = new Game(1, 0, renderer, screen, asset, lang, input, true, options);
|
||||||
demoGame->run();
|
section = demoGame->run();
|
||||||
delete demoGame;
|
delete demoGame;
|
||||||
|
|
||||||
|
return section;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Modifica las opciones para los controles de los jugadores
|
// Modifica las opciones para los controles de los jugadores
|
||||||
|
|||||||
@@ -117,10 +117,10 @@ private:
|
|||||||
void applyOptions();
|
void applyOptions();
|
||||||
|
|
||||||
// Ejecuta la parte donde se muestran las instrucciones
|
// Ejecuta la parte donde se muestran las instrucciones
|
||||||
void runInstructions(mode_e mode);
|
section_t runInstructions(mode_e mode);
|
||||||
|
|
||||||
// Ejecuta el juego en modo demo
|
// Ejecuta el juego en modo demo
|
||||||
void runDemoGame();
|
section_t runDemoGame();
|
||||||
|
|
||||||
// Modifica las opciones para los controles de los jugadores
|
// Modifica las opciones para los controles de los jugadores
|
||||||
bool updatePlayerInputs(int numPlayer);
|
bool updatePlayerInputs(int numPlayer);
|
||||||
|
|||||||
Reference in New Issue
Block a user