From fe444fc0ec6c88029d1bdc1b7d2762830d228a11 Mon Sep 17 00:00:00 2001 From: Raimon Zamora Date: Wed, 31 Jan 2024 12:47:51 +0100 Subject: [PATCH] - Remodelat un poc el codi --- main.cpp | 25 +-- modulemenu.cpp | 325 ++++++++++++++++++++--------------- modulemenu.h | 17 -- modules.h | 9 + moduleselect.cpp | 332 ++++++++++++++++++++---------------- moduleselect.h | 14 -- modulesequence.cpp | 379 +++++++++++++++++++---------------------- modulesequence.h | 18 -- modulestaticscreen.cpp | 166 ++++++++---------- modulestaticscreen.h | 18 -- 10 files changed, 629 insertions(+), 674 deletions(-) delete mode 100644 modulemenu.h create mode 100644 modules.h delete mode 100644 moduleselect.h delete mode 100644 modulesequence.h delete mode 100644 modulestaticscreen.h diff --git a/main.cpp b/main.cpp index c6ed7b1..caa8019 100644 --- a/main.cpp +++ b/main.cpp @@ -3,10 +3,7 @@ #include "jsound.h" #include "jfile.h" #include "info.h" -#include "modulestaticscreen.h" -#include "modulemenu.h" -#include "moduleselect.h" -#include "modulesequence.h" +#include "modules.h" #include "time.h" #include @@ -55,28 +52,16 @@ int main( int argc, char* args[] ) { switch (info::estat_joc) { case ESTAT_ICEKAS: case ESTAT_LOGO: - ModuleStaticScreen * moduleStaticScreen; - moduleStaticScreen = new ModuleStaticScreen(); - info::estat_joc = moduleStaticScreen->Go(); - delete moduleStaticScreen; + module::staticScreen::go(); break; case ESTAT_MENU: - ModuleMenu * moduleMenu; - moduleMenu = new ModuleMenu(); - info::estat_joc = moduleMenu->Go(); - delete moduleMenu; + module::menu::go(); break; case ESTAT_SELECT: - ModuleSelect * moduleSelect; - moduleSelect = new ModuleSelect(); - info::estat_joc = moduleSelect->Go(); - delete moduleSelect; + module::select::go(); break; case ESTAT_SEQUENCIA: - ModuleSequence * moduleSequence; - moduleSequence = new ModuleSequence(); - info::estat_joc = moduleSequence->Go(); - delete moduleSequence; + module::sequence::go(); break; } } diff --git a/modulemenu.cpp b/modulemenu.cpp index 189c349..71ebaf7 100644 --- a/modulemenu.cpp +++ b/modulemenu.cpp @@ -1,4 +1,4 @@ -#include "modulemenu.h" +#include "modules.h" #include "jgame.h" #include "jdraw8.h" @@ -14,162 +14,209 @@ #define OPCIO_CLASSICMODE 2 #define OPCIO_OPTIONS 3 -ModuleMenu::ModuleMenu() { -} +namespace module +{ + namespace menu + { + void go() + { + // [RZC 31/01/2024] [TODO] Menú del mode nocturn -ModuleMenu::~ModuleMenu(void) { -} + // Inicialitzem música i gràfics per al menú + JS_LoadMusic("mtitle.mid"); + JS_PlayMusic(-1); -int ModuleMenu::Go() { + JD8_Surface fondo = JD8_LoadSurface("menu.gif"); + JD8_Palette pal = JD8_LoadPalette("menu.gif"); + JD8_Surface opcions = JD8_LoadSurface("menu_s.gif"); + JD8_Surface gfx = JD8_LoadSurface("sprites.gif"); - JS_LoadMusic("mtitle.mid"); - JS_PlayMusic(-1); + JD8_ClearScreen(0); + JD8_Flip(); - JD8_Surface fondo = JD8_LoadSurface("menu.gif"); - JD8_Palette pal = JD8_LoadPalette("menu.gif"); - JD8_Surface opcions = JD8_LoadSurface("menu_s.gif"); - JD8_Surface gfx = JD8_LoadSurface("sprites.gif"); - JD8_ClearScreen(0); - JD8_Flip(); + // Fade in + JD8_Blit(fondo); + JG_SetUpdateTicks(1); + while (!JD8_FadeToPalAsync(pal) && !JG_Quitting()) { + while (!JG_ShouldUpdate()) { JI_Update(); } + } - // FADE IN - JD8_Blit(fondo); - JG_SetUpdateTicks(1); - while (!JD8_FadeToPalAsync(pal) && !JG_Quitting()) { - while (!JG_ShouldUpdate()) { JI_Update(); } - } - int x = 320; - while (!JG_Quitting() && x > 0) { - while (!JG_ShouldUpdate()) { JI_Update(); } - JD8_Blit(fondo); - JD8_BlitCKCut(x, 50, opcions, 0, 50, 320, 38, 0); - JD8_Flip(); - x--; - } - JD8_BlitCKToSurface(0, 50, opcions, 0, 50, 320, 38, fondo, 0); + // Movem la primera opció del menú al lloc + int x = 320; + while (!JG_Quitting() && x > 0) { + while (!JG_ShouldUpdate()) { JI_Update(); } + JD8_Blit(fondo); + JD8_BlitCKCut(x, 50, opcions, 0, 50, 320, 38, 0); + JD8_Flip(); + x--; + } + JD8_BlitCKToSurface(0, 50, opcions, 0, 50, 320, 38, fondo, 0); - x = 320; - while (!JG_Quitting() && x > 25) { - while (!JG_ShouldUpdate()) { JI_Update(); } - JD8_Blit(fondo); - JD8_BlitCKCut(x, 88, opcions, 25, 88, 135, 37, 0); - JD8_Flip(); - x--; - } - JD8_BlitCKToSurface(25, 88, opcions, 25, 88, 135, 37, fondo, 0); - x = 320; - while (!JG_Quitting() && x > 0) { - while (!JG_ShouldUpdate()) { JI_Update(); } - JD8_Blit(fondo); - JD8_BlitCKCut(x, 125, opcions, 0, 125, 320, 38, 0); - JD8_Flip(); - x--; - } - JD8_BlitCKToSurface(0, 125, opcions, 0, 125, 320, 38, fondo, 0); + // Movem la segona opció del menú al lloc + x = 320; + while (!JG_Quitting() && x > 25) { + while (!JG_ShouldUpdate()) { JI_Update(); } + JD8_Blit(fondo); + JD8_BlitCKCut(x, 88, opcions, 25, 88, 135, 37, 0); + JD8_Flip(); + x--; + } + JD8_BlitCKToSurface(25, 88, opcions, 25, 88, 135, 37, fondo, 0); - x = 320; - while (!JG_Quitting() && x > 0) { - while (!JG_ShouldUpdate()) { JI_Update(); } - JD8_Blit(fondo); - JD8_BlitCKCut(x, 163, opcions, 0, 163, 320, 37, 0); - JD8_Flip(); - x--; - } - JD8_BlitCKToSurface(0, 163, opcions, 0, 163, 320, 37, fondo, 0); - int y = 50; - while (!JG_Quitting() && y > 0) { - while (!JG_ShouldUpdate()) { JI_Update(); } - JD8_Blit(fondo); - JD8_BlitCKCut(0, -y, opcions, 0, 0, 320, 50, 0); - JD8_Flip(); - y--; - } - JD8_BlitCKToSurface(0, 0, opcions, 0, 0, 320, 50, fondo, 0); + // Movem la tercera opció del menú al lloc + x = 320; + while (!JG_Quitting() && x > 0) { + while (!JG_ShouldUpdate()) { JI_Update(); } + JD8_Blit(fondo); + JD8_BlitCKCut(x, 125, opcions, 0, 125, 320, 38, 0); + JD8_Flip(); + x--; + } + JD8_BlitCKToSurface(0, 125, opcions, 0, 125, 320, 38, fondo, 0); - int opcio_seleccionada = OPCIO_TIMEATTACK; - int opcio_triada = SENSE_OPCIO; - bool fletxa_amunt_pulsada = false; - bool fletxa_avall_pulsada = false; - float x_fletxa = 0; - float x_velocitat = 1; - JG_SetUpdateTicks(20); + // Movem la quarta opció del menú al lloc + x = 320; + while (!JG_Quitting() && x > 0) { + while (!JG_ShouldUpdate()) { JI_Update(); } + JD8_Blit(fondo); + JD8_BlitCKCut(x, 163, opcions, 0, 163, 320, 37, 0); + JD8_Flip(); + x--; + } + JD8_BlitCKToSurface(0, 163, opcions, 0, 163, 320, 37, fondo, 0); - while (!JG_Quitting() && opcio_triada == SENSE_OPCIO) { - while (!JG_ShouldUpdate()) { - JI_Update(); - if (JI_KeyPressed(SDL_SCANCODE_UP)) { - if (!fletxa_amunt_pulsada) { - fletxa_amunt_pulsada = true; - opcio_seleccionada--; if (opcio_seleccionada < 0) opcio_seleccionada = 3; + + // Movem el titol del menú al lloc + int y = 50; + while (!JG_Quitting() && y > 0) { + while (!JG_ShouldUpdate()) { JI_Update(); } + JD8_Blit(fondo); + JD8_BlitCKCut(0, -y, opcions, 0, 0, 320, 50, 0); + JD8_Flip(); + y--; + } + JD8_BlitCKToSurface(0, 0, opcions, 0, 0, 320, 50, fondo, 0); + + + // Variables necessaries per al menú + int opcio_seleccionada = OPCIO_TIMEATTACK; + int opcio_triada = SENSE_OPCIO; + bool fletxa_amunt_pulsada = false; + bool fletxa_avall_pulsada = false; + float x_fletxa = 0; + float x_velocitat = 1; + + JG_SetUpdateTicks(20); + + + // Gestió del menú en sí (triar opció) + // [RZC 31/01/2024] [TODO] Al temps que se fiquen els marcadors + while (!JG_Quitting() && opcio_triada == SENSE_OPCIO) + { + while (!JG_ShouldUpdate()) + { + JI_Update(); + + if (JI_KeyPressed(SDL_SCANCODE_UP)) + { + if (!fletxa_amunt_pulsada) + { + fletxa_amunt_pulsada = true; + opcio_seleccionada--; if (opcio_seleccionada < 0) opcio_seleccionada = 3; + } + } + else + { + fletxa_amunt_pulsada = false; + } + + if (JI_KeyPressed(SDL_SCANCODE_DOWN)) + { + if (!fletxa_avall_pulsada) + { + fletxa_avall_pulsada = true; + opcio_seleccionada++; if (opcio_seleccionada > 3) opcio_seleccionada = 0; + } + } + else + { + fletxa_avall_pulsada = false; + } + + if (JI_KeyPressed(SDL_SCANCODE_SPACE)) + { + opcio_triada = opcio_seleccionada; + } + + if (JI_KeyPressed(SDL_SCANCODE_ESCAPE)) + { + JG_QuitSignal(); + } } - } else { - fletxa_amunt_pulsada = false; - } - if (JI_KeyPressed(SDL_SCANCODE_DOWN)) { - if (!fletxa_avall_pulsada) { - fletxa_avall_pulsada = true; - opcio_seleccionada++; if (opcio_seleccionada > 3) opcio_seleccionada = 0; + + x_fletxa += x_velocitat; + x_velocitat -= 0.1; + + if (x_fletxa < 0) + { + x_fletxa = 0; + x_velocitat = 1; } - } else { - fletxa_avall_pulsada = false; + + JD8_Blit(fondo); + JD8_BlitCK(10+x_fletxa, 60+opcio_seleccionada*37, gfx, 18, 5, 9, 10, 255); + JD8_Flip(); } - if (JI_KeyPressed(SDL_SCANCODE_SPACE)) { - opcio_triada = opcio_seleccionada; + JD8_BlitCKToSurface(10 + x_fletxa, 60 + opcio_seleccionada * 37, gfx, 18, 5, 9, 10, fondo, 255); + + + // Blinds out + JG_SetUpdateTicks(8); + x = 0; + while (x < 32 && !JG_Quitting()) + { + while (!JG_ShouldUpdate()) { JI_Update(); } + + for (y = 0; y < 200; y++) + { + for (int i = 0; i < 10; i++) + { + JD8_PutPixel(fondo, i * 32 + x, y, 0); + } + } + x++; + JD8_Blit(fondo); + JD8_Flip(); + } + + + // Alliberar memòria + JD8_FreeSurface(fondo); + JD8_FreeSurface(opcions); + JD8_FreeSurface(gfx); + free(pal); + + + // Canviar el estat al que toque + if (JG_Quitting()) + { + info::estat_joc = ESTAT_EIXIR; + } + else + { + switch (opcio_triada) + { + case OPCIO_TIMEATTACK: info::estat_joc = ESTAT_LOGO; break; + case OPCIO_WORLDTOUR: info::estat_joc = ESTAT_SELECT; break; + case OPCIO_CLASSICMODE: info::estat_joc = ESTAT_MENU; break; + case OPCIO_OPTIONS: info::estat_joc = ESTAT_MENU; break; + } } } - - x_fletxa += x_velocitat; - x_velocitat -= 0.1; - - if (x_fletxa < 0) { - x_fletxa = 0; - x_velocitat = 1; - } - JD8_Blit(fondo); - JD8_BlitCK(10+x_fletxa, 60+opcio_seleccionada*37, gfx, 18, 5, 9, 10, 255); - JD8_Flip(); } - JD8_BlitCKToSurface(10 + x_fletxa, 60 + opcio_seleccionada * 37, gfx, 18, 5, 9, 10, fondo, 255); - - // BLINDS OUT - JG_SetUpdateTicks(8); - x = 0; - while (x < 32 && !JG_Quitting()) { - while (!JG_ShouldUpdate()) { JI_Update(); } - - for (y = 0; y < 200; y++) { - for (int i = 0; i < 10; i++) { - JD8_PutPixel(fondo, i * 32 + x, y, 0); - } - } - x++; - JD8_Blit(fondo); - JD8_Flip(); - } - - // FREE EVERYTHING - JD8_FreeSurface(fondo); - JD8_FreeSurface(opcions); - JD8_FreeSurface(gfx); - free(pal); - - - - - if (JG_Quitting()) { - return ESTAT_EIXIR; - } else { - switch (opcio_triada) { - case OPCIO_TIMEATTACK: return ESTAT_LOGO; break; - case OPCIO_WORLDTOUR: return ESTAT_SELECT; break; - case OPCIO_CLASSICMODE: return ESTAT_MENU; break; - case OPCIO_OPTIONS: return ESTAT_MENU; break; - } - } - return ESTAT_EIXIR; } diff --git a/modulemenu.h b/modulemenu.h deleted file mode 100644 index c9c0963..0000000 --- a/modulemenu.h +++ /dev/null @@ -1,17 +0,0 @@ -#pragma once - -class ModuleMenu { - -public: - - ModuleMenu(); - ~ModuleMenu(void); - - int Go(); - -private: - - //void showMenu(); - - int contador; -}; diff --git a/modules.h b/modules.h new file mode 100644 index 0000000..f7da3ed --- /dev/null +++ b/modules.h @@ -0,0 +1,9 @@ +#pragma once + +namespace module +{ + namespace staticScreen { void go(); } + namespace menu { void go(); } + namespace select { void go(); } + namespace sequence { void go(); } +} \ No newline at end of file diff --git a/moduleselect.cpp b/moduleselect.cpp index b85cd14..60ef337 100644 --- a/moduleselect.cpp +++ b/moduleselect.cpp @@ -1,4 +1,4 @@ -#include "moduleselect.h" +#include "modules.h" #include "jgame.h" #include "jdraw8.h" @@ -8,166 +8,200 @@ #include #include "info.h" -ModuleSelect::ModuleSelect() { - -} +namespace module +{ + namespace select + { + void go() + { + // Inicialitzem gràfics + JD8_Surface fondo = JD8_LoadSurface("select.gif"); + JD8_Palette pal = JD8_LoadPalette("select.gif"); + JD8_Surface gfx = JD8_LoadSurface("sprites.gif"); -ModuleSelect::~ModuleSelect(void) { -} + int num_personatges = 3; -void pintaMarc(int posicio) { - for (int i = posicio; i <= posicio + 75; i++) { - JD8_PutPixel(i, 11, 15); - JD8_PutPixel(i, 12, 15); - JD8_PutPixel(i, 90, 15); - JD8_PutPixel(i, 91, 15); - } - for (int i = 11; i <= 91; i++) { - JD8_PutPixel(posicio, i, 15); - JD8_PutPixel(posicio + 1, i, 15); - JD8_PutPixel(posicio + 74, i, 15); - JD8_PutPixel(posicio + 75, i, 15); - } -} - -int ModuleSelect::Go() { - - JD8_Surface fondo = JD8_LoadSurface("select.gif"); - JD8_Palette pal = JD8_LoadPalette("select.gif"); - JD8_Surface gfx = JD8_LoadSurface("sprites.gif"); - - int num_personatges = 3; - - if (!info::rosita_enabled) { - num_personatges--; - for (int i = 137; i <= 212; i++) for (int j = 11; j <= 91; j++) JD8_PutPixel(fondo, i, j, 0); - JD8_PutPixel(fondo, 145, 19, 14); - JD8_PutPixel(fondo, 197, 44, 14); - JD8_PutPixel(fondo, 149, 78, 14); - JD8_PutPixel(fondo, 194, 77, 14); - JD8_PutPixel(fondo, 172, 54, 14); - JD8_PutPixel(fondo, 198, 65, 14); - JD8_PutPixel(fondo, 177, 38, 9); - JD8_PutPixel(fondo, 169, 82, 9); - JD8_PutPixel(fondo, 183, 12, 9); - JD8_PutPixel(fondo, 139, 37, 9); - JD8_PutPixel(fondo, 211, 81, 9); - } - if (!info::job_enabled) { - num_personatges--; - for (int i = 219; i <= 294; i++) for (int j = 11; j <= 91; j++) JD8_PutPixel(fondo, i, j, 0); - JD8_PutPixel(fondo, 228, 65, 14); - JD8_PutPixel(fondo, 290, 26, 14); - JD8_PutPixel(fondo, 264, 63, 14); - JD8_PutPixel(fondo, 284, 85, 14); - JD8_PutPixel(fondo, 262, 13, 14); - JD8_PutPixel(fondo, 239, 46, 14); - JD8_PutPixel(fondo, 266, 74, 9); - JD8_PutPixel(fondo, 264, 21, 9); - JD8_PutPixel(fondo, 248, 84, 9); - JD8_PutPixel(fondo, 279, 87, 9); - JD8_PutPixel(fondo, 254, 39, 9); - } - - JD8_ClearScreen(0); - JD8_Flip(); - - // FADE IN - JD8_Blit(fondo); - JG_SetUpdateTicks(1); - while (!JD8_FadeToPalAsync(pal) && !JG_Quitting()) { - while (!JG_ShouldUpdate()) { JI_Update(); } - } - - int opcio_seleccionada = info::dificultat; - int opcio_triada = SENSE_OPCIO; - int personatge_seleccionat = info::personatge; - bool fletxa_amunt_pulsada = false; - bool fletxa_avall_pulsada = false; - bool fletxa_esquerra_pulsada = false; - bool fletxa_dreta_pulsada = false; - - JG_SetUpdateTicks(20); - - int i = 0; - int G = 0; - int B = 0; - - while (!JG_Quitting() && opcio_triada == SENSE_OPCIO) { - while (!JG_ShouldUpdate()) { - JI_Update(); - - if (JI_KeyPressed(SDL_SCANCODE_UP)) { - if (!fletxa_amunt_pulsada) { - fletxa_amunt_pulsada = true; - opcio_seleccionada--; if (opcio_seleccionada < 0) opcio_seleccionada = 2; - } - } else { - fletxa_amunt_pulsada = false; + // Llevem els persoantges que encara no estàn desbloquejats + if (!info::rosita_enabled) + { + num_personatges--; + for (int i = 137; i <= 212; i++) for (int j = 11; j <= 91; j++) JD8_PutPixel(fondo, i, j, 0); + JD8_PutPixel(fondo, 145, 19, 14); + JD8_PutPixel(fondo, 197, 44, 14); + JD8_PutPixel(fondo, 149, 78, 14); + JD8_PutPixel(fondo, 194, 77, 14); + JD8_PutPixel(fondo, 172, 54, 14); + JD8_PutPixel(fondo, 198, 65, 14); + JD8_PutPixel(fondo, 177, 38, 9); + JD8_PutPixel(fondo, 169, 82, 9); + JD8_PutPixel(fondo, 183, 12, 9); + JD8_PutPixel(fondo, 139, 37, 9); + JD8_PutPixel(fondo, 211, 81, 9); + } + if (!info::job_enabled) + { + num_personatges--; + for (int i = 219; i <= 294; i++) for (int j = 11; j <= 91; j++) JD8_PutPixel(fondo, i, j, 0); + JD8_PutPixel(fondo, 228, 65, 14); + JD8_PutPixel(fondo, 290, 26, 14); + JD8_PutPixel(fondo, 264, 63, 14); + JD8_PutPixel(fondo, 284, 85, 14); + JD8_PutPixel(fondo, 262, 13, 14); + JD8_PutPixel(fondo, 239, 46, 14); + JD8_PutPixel(fondo, 266, 74, 9); + JD8_PutPixel(fondo, 264, 21, 9); + JD8_PutPixel(fondo, 248, 84, 9); + JD8_PutPixel(fondo, 279, 87, 9); + JD8_PutPixel(fondo, 254, 39, 9); } - if (JI_KeyPressed(SDL_SCANCODE_DOWN)) { - if (!fletxa_avall_pulsada) { - fletxa_avall_pulsada = true; - opcio_seleccionada++; if (opcio_seleccionada > 2) opcio_seleccionada = 0; - } - } else { - fletxa_avall_pulsada = false; + JD8_ClearScreen(0); + JD8_Flip(); + + + // Fade in + JD8_Blit(fondo); + JG_SetUpdateTicks(1); + while (!JD8_FadeToPalAsync(pal) && !JG_Quitting()) + { + while (!JG_ShouldUpdate()) { JI_Update(); } } - if (JI_KeyPressed(SDL_SCANCODE_LEFT)) { - if (!fletxa_esquerra_pulsada) { - fletxa_esquerra_pulsada = true; - personatge_seleccionat--; if (personatge_seleccionat < 0) personatge_seleccionat = num_personatges-1; + // Variables necessaries per a triar personatge i dificultat + int opcio_seleccionada = info::dificultat; + int opcio_triada = SENSE_OPCIO; + int personatge_seleccionat = info::personatge; + bool fletxa_amunt_pulsada = false; + bool fletxa_avall_pulsada = false; + bool fletxa_esquerra_pulsada = false; + bool fletxa_dreta_pulsada = false; + + JG_SetUpdateTicks(20); + + int i = 0; + int G = 0; + int B = 0; + + + // Ací se controla la tria de opcions en sí + while (!JG_Quitting() && opcio_triada == SENSE_OPCIO) + { + while (!JG_ShouldUpdate()) + { + JI_Update(); + + if (JI_KeyPressed(SDL_SCANCODE_UP)) + { + if (!fletxa_amunt_pulsada) + { + fletxa_amunt_pulsada = true; + opcio_seleccionada--; if (opcio_seleccionada < 0) opcio_seleccionada = 2; + } + } + else + { + fletxa_amunt_pulsada = false; + } + + if (JI_KeyPressed(SDL_SCANCODE_DOWN)) + { + if (!fletxa_avall_pulsada) + { + fletxa_avall_pulsada = true; + opcio_seleccionada++; if (opcio_seleccionada > 2) opcio_seleccionada = 0; + } + } + else + { + fletxa_avall_pulsada = false; + } + + if (JI_KeyPressed(SDL_SCANCODE_LEFT)) + { + if (!fletxa_esquerra_pulsada) + { + fletxa_esquerra_pulsada = true; + personatge_seleccionat--; if (personatge_seleccionat < 0) personatge_seleccionat = num_personatges-1; + } + } + else + { + fletxa_esquerra_pulsada = false; + } + + if (JI_KeyPressed(SDL_SCANCODE_RIGHT)) + { + if (!fletxa_dreta_pulsada) + { + fletxa_dreta_pulsada = true; + personatge_seleccionat++; if (personatge_seleccionat > num_personatges-1) personatge_seleccionat = 0; + } + } + else + { + fletxa_dreta_pulsada = false; + } + + if (JI_KeyPressed(SDL_SCANCODE_SPACE)) + { + opcio_triada = opcio_seleccionada; + } } - } else { - fletxa_esquerra_pulsada = false; + + // Fer cicle dels colorets de la vora del personatge + i = (i + 1) % 127; + G = B = abs(63-i); + JD8_SetPaletteColor(15, 252, G, B); + + + // Pintar-ho tot + JD8_Blit(fondo); + + const int posicio = 55 + personatge_seleccionat * 82; + for (int i = posicio; i <= posicio + 75; i++) { + JD8_PutPixel(i, 11, 15); + JD8_PutPixel(i, 12, 15); + JD8_PutPixel(i, 90, 15); + JD8_PutPixel(i, 91, 15); + } + for (int i = 11; i <= 91; i++) { + JD8_PutPixel(posicio, i, 15); + JD8_PutPixel(posicio + 1, i, 15); + JD8_PutPixel(posicio + 74, i, 15); + JD8_PutPixel(posicio + 75, i, 15); + } + + JD8_BlitCK(100, 120 + opcio_seleccionada * 25, gfx, 9, 5, 9, 10, 255); + JD8_Flip(); + } + JD8_BlitCKToSurface(100, 120 + opcio_seleccionada * 25, gfx, 9, 5, 9, 10, fondo, 255); + + + // Fade out + JG_SetUpdateTicks(2); + while (!JD8_FadeOutAsync() && !JG_Quitting()) + { + while (!JG_ShouldUpdate()) { JI_Update(); } } - if (JI_KeyPressed(SDL_SCANCODE_RIGHT)) { - if (!fletxa_dreta_pulsada) { - fletxa_dreta_pulsada = true; - personatge_seleccionat++; if (personatge_seleccionat > num_personatges-1) personatge_seleccionat = 0; - } - } else { - fletxa_dreta_pulsada = false; - } + // Alliberem memòria + JD8_FreeSurface(fondo); + JD8_FreeSurface(gfx); + free(pal); - if (JI_KeyPressed(SDL_SCANCODE_SPACE)) { - opcio_triada = opcio_seleccionada; + + // Canviar el estat al que toque + if (JG_Quitting()) + { + info::estat_joc = ESTAT_EIXIR; + } + else + { + info::dificultat = opcio_triada; + info::personatge = personatge_seleccionat; + info::estat_joc = ESTAT_SEQUENCIA; } } - i = (i + 1) % 127; - G = B = abs(63-i); - JD8_SetPaletteColor(15, 252, G, B); - - JD8_Blit(fondo); - pintaMarc(55 + personatge_seleccionat * 82); - JD8_BlitCK(100, 120 + opcio_seleccionada * 25, gfx, 9, 5, 9, 10, 255); - JD8_Flip(); - } - JD8_BlitCKToSurface(100, 120 + opcio_seleccionada * 25, gfx, 9, 5, 9, 10, fondo, 255); - - // FADE OUT - JG_SetUpdateTicks(2); - while (!JD8_FadeOutAsync() && !JG_Quitting()) { - while (!JG_ShouldUpdate()) { JI_Update(); } - } - - // FREE EVERYTHING - JD8_FreeSurface(fondo); - JD8_FreeSurface(gfx); - free(pal); - - - - - if (JG_Quitting()) { - return ESTAT_EIXIR; - } else { - info::dificultat = opcio_triada; - info::personatge = personatge_seleccionat; - return ESTAT_SEQUENCIA; } } diff --git a/moduleselect.h b/moduleselect.h deleted file mode 100644 index 3ae1827..0000000 --- a/moduleselect.h +++ /dev/null @@ -1,14 +0,0 @@ -#pragma once - -class ModuleSelect { - -public: - - ModuleSelect(); - ~ModuleSelect(void); - - int Go(); - -private: - -}; diff --git a/modulesequence.cpp b/modulesequence.cpp index 48cd3bb..27afb4c 100644 --- a/modulesequence.cpp +++ b/modulesequence.cpp @@ -1,4 +1,4 @@ -#include "modulesequence.h" +#include "modules.h" #include "jgame.h" #include "jdraw8.h" @@ -8,222 +8,193 @@ #include #include "info.h" -JD8_Surface gfx = nullptr; -JD8_Surface fondo = nullptr; -JD8_Palette pal = nullptr; +namespace module +{ + namespace sequence + { + JD8_Surface gfx = nullptr; + JD8_Surface fondo = nullptr; + JD8_Surface fondo_temp = nullptr; + JD8_Palette pal = nullptr; -ModuleSequence::ModuleSequence() { - gfx = nullptr; - fondo = nullptr; - pal = nullptr; -} - -ModuleSequence::~ModuleSequence(void) { -} - -int ModuleSequence::Go() { - - JS_LoadMusic("mhist.mid"); - JS_PlayMusic(-1); - - gfx = JD8_LoadSurface("sprites.gif"); - - JD8_ClearScreen(0); - JD8_Flip(); - - fondo = JD8_LoadSurface("hist01.gif"); - pal = JD8_LoadPalette("hist01.gif"); - this->FadeIn(); - this->ShowText(40, 90, 2, 10, "QUE BON DIA FA NO CREUS PEPE"); - this->ShowText(50, 80, 10, 10, "EEEE..SS..SSIII.SI"); - this->ShowText(140, 140, 2, 10, "[SEMPRE QUE M^ACOSTE", "A PEPE ES POSA RARO\\"); - JD8_Blit(fondo); - JD8_Flip(); - this->Wait(200); - this->FadeOut(); - JD8_FreeSurface(fondo); - free(pal); - - if (!JG_Quitting()) { - fondo = JD8_LoadSurface("hist02.gif"); - pal = JD8_LoadPalette("hist02.gif"); - this->FadeIn(); - this->ShowText(100, 140, 10, 10, "AAAAY a"); - this->ShowText(100, 55, 3, 10, "JA T^HE PILLAT PEPE"); - this->ShowText(145, 125, 2, 1, "AUXILIa"); - JD8_Blit(fondo); - JD8_Flip(); - this->Wait(200); - this->FadeOut(); - JD8_FreeSurface(fondo); - free(pal); - } - - if (!JG_Quitting()) { - fondo = JD8_LoadSurface("hist03.gif"); - pal = JD8_LoadPalette("hist03.gif"); - this->FadeIn(); - this->ShowText(50, 80, 5, 10, "ARA ROSITA ES MEUA"); - this->ShowText(50, 80, 5, 10, "SI VOLS ACONSEGUIR_LA", "HAURAS DE SEGUIR_ME", "PER TOT EL MONb"); - this->ShowText(60, 80, 5, 1, "JA JA JA JA JA aa"); - JD8_Blit(fondo); - JD8_Flip(); - this->Wait(200); - this->FadeOut(); - JD8_FreeSurface(fondo); - free(pal); - } - - if (!JG_Quitting()) { - fondo = JD8_LoadSurface("hist04.gif"); - pal = JD8_LoadPalette("hist04.gif"); - this->FadeIn(); - this->ShowText(120, 60, 2, 5, "AJUDA^M PEPEa"); - this->ShowText(50, 50, 7, 50, "MALEIT SIGUES", "ET TROBAREbbb"); - this->FadeOut(); - JD8_FreeSurface(fondo); - free(pal); - } - - // FREE EVERYTHING - JD8_FreeSurface(gfx); - - if (JG_Quitting()) { - return ESTAT_EIXIR; - } else { - return ESTAT_JOC; - } -} - -void ModuleSequence::FadeIn() { - JD8_Blit(fondo); - JG_SetUpdateTicks(1); - while (!JD8_FadeToPalAsync(pal) && !JG_Quitting()) { - while (!JG_ShouldUpdate()) { JI_Update(); } - } -} - -void ModuleSequence::FadeOut() { - JG_SetUpdateTicks(2); - while (!JD8_FadeOutAsync() && !JG_Quitting()) { - while (!JG_ShouldUpdate()) { JI_Update(); } - } -} - -void ModuleSequence::ShowText(int x, int y, int color, int speed, const char * text1, const char * text2, const char * text3) { - bool eixir = false; - - JG_SetUpdateTicks(10); - JD8_SetPaletteColor(254, color); - - // mod 35 - // A (65) = 23 -> char - 42 - // Special chars: ( ) � ' - : ! . - // [ \ ] ^ _ ` a b - - int tamany_text1 = strlen(text1); - int temps_total = tamany_text1 * speed; - int temps_inicial = JG_GetCycleCounter(); - - while ((JG_GetCycleCounter() - temps_inicial < temps_total) && !eixir && !JG_Quitting()) { - JD8_Blit(fondo); - int num_chars_actual = (JG_GetCycleCounter() - temps_inicial) / speed; - - for (int i = 0; i <= num_chars_actual; i++) { - int char_actual = text1[i] - 42; if (char_actual < 0) char_actual = 57; - if (text1[i] == '.') char_actual = 56; - JD8_BlitCK(x + (i+1) * 8, y, gfx, (char_actual % 35) * 9, 6+floorf(char_actual / 35) * 9, 9, 9, 255); - } - while (!JG_ShouldUpdate()) { JI_Update(); if (JI_AnyKey()) { eixir = true; } } - JD8_Flip(); - } - if (eixir) { - for (int i = 0; i <= tamany_text1; i++) { - int char_actual = text1[i] - 42; if (char_actual < 0) char_actual = 57; - if (text1[i] == '.') char_actual = 56; - JD8_BlitCK(x + (i + 1) * 8, y, gfx, (char_actual % 35) * 9, 6 + floorf(char_actual / 35) * 9, 9, 9, 255); - } - } - - if (text2 != NULL) { - int tamany_text2 = strlen(text2); - temps_total = tamany_text2 * speed; - temps_inicial = JG_GetCycleCounter(); - - while ((JG_GetCycleCounter() - temps_inicial < temps_total) && !eixir && !JG_Quitting()) { + void fadeIn() + { JD8_Blit(fondo); - int num_chars_actual = (JG_GetCycleCounter() - temps_inicial) / speed; - - for (int i = 0; i <= tamany_text1; i++) { - int char_actual = text1[i] - 42; if (char_actual < 0) char_actual = 57; - if (text1[i] == '.') char_actual = 56; - JD8_BlitCK(x + (i + 1) * 8, y, gfx, (char_actual % 35) * 9, 6 + floorf(char_actual / 35) * 9, 9, 9, 255); - } - - for (int i = 0; i <= num_chars_actual; i++) { - int char_actual = text2[i] - 42; if (char_actual < 0) char_actual = 57; - if (text2[i] == '.') char_actual = 56; - JD8_BlitCK(x + (i + 1) * 8, y+10, gfx, (char_actual % 35) * 9, 6 + floorf(char_actual / 35) * 9, 9, 9, 255); - } - while (!JG_ShouldUpdate()) { JI_Update(); if (JI_AnyKey()) { eixir = true; } } - JD8_Flip(); - } - - if (eixir) { - for (int i = 0; i <= tamany_text2; i++) { - int char_actual = text2[i] - 42; if (char_actual < 0) char_actual = 57; - if (text2[i] == '.') char_actual = 56; - JD8_BlitCK(x + (i + 1) * 8, y + 10, gfx, (char_actual % 35) * 9, 6 + floorf(char_actual / 35) * 9, 9, 9, 255); + JG_SetUpdateTicks(1); + while (!JD8_FadeToPalAsync(pal) && !JG_Quitting()) + { + while (!JG_ShouldUpdate()) { JI_Update(); } } } - if (text3 != NULL) { - int tamany_text3 = strlen(text3); - temps_total = tamany_text3 * speed; - temps_inicial = JG_GetCycleCounter(); + void fadeOut() + { + JG_SetUpdateTicks(2); + while (!JD8_FadeOutAsync() && !JG_Quitting()) + { + while (!JG_ShouldUpdate()) { JI_Update(); } + } + } - while ((JG_GetCycleCounter() - temps_inicial < temps_total) && !eixir && !JG_Quitting()) { - JD8_Blit(fondo); + void drawChar(int x, int y, char char_actual) + { + char_actual -= 42; if (char_actual < 0) char_actual = 57; + if (char_actual == 4) char_actual = 56; + JD8_BlitCKToSurface(x, y, gfx, (char_actual % 35) * 9, 6 + floorf(char_actual / 35) * 9, 9, 9, fondo_temp, 255); + } + + void wait(int time) + { + bool eixir = false; + int temps_inicial = JG_GetCycleCounter(); + while ((JG_GetCycleCounter() - temps_inicial < time) && !eixir) + { + while (!JG_ShouldUpdate()) { JI_Update(); if (JI_AnyKey() || JG_Quitting()) { eixir = true; } } + } + } + + void showText(int x, int y, int color, int speed, const char * text1, const char * text2 = NULL, const char * text3 = NULL) + { + bool eixir = false; + + fondo_temp = JD8_NewSurface(); + JD8_BlitToSurface(0, 0, fondo, 0, 0, 320, 200, fondo_temp); + JD8_Blit(fondo_temp); + + JG_SetUpdateTicks(10); + JD8_SetPaletteColor(254, color); + + // mod 35 + // A (65) = 23 -> char - 42 + // Special chars: ( ) � ' - : ! . + // [ \ ] ^ _ ` a b + + int tamany_text = strlen(text1); + int temps_total = tamany_text * speed; + int temps_inicial = JG_GetCycleCounter(); + + while ((JG_GetCycleCounter() - temps_inicial < temps_total) && !eixir && !JG_Quitting()) + { int num_chars_actual = (JG_GetCycleCounter() - temps_inicial) / speed; - - for (int i = 0; i <= tamany_text1; i++) { - int char_actual = text1[i] - 42; if (char_actual < 0) char_actual = 57; - if (text1[i] == '.') char_actual = 56; - JD8_BlitCK(x + (i + 1) * 8, y, gfx, (char_actual % 35) * 9, 6 + floorf(char_actual / 35) * 9, 9, 9, 255); - } - - for (int i = 0; i <= tamany_text2; i++) { - int char_actual = text2[i] - 42; if (char_actual < 0) char_actual = 57; - if (text2[i] == '.') char_actual = 56; - JD8_BlitCK(x + (i + 1) * 8, y+10, gfx, (char_actual % 35) * 9, 6 + floorf(char_actual / 35) * 9, 9, 9, 255); - } - - for (int i = 0; i <= num_chars_actual; i++) { - int char_actual = text3[i] - 42; if (char_actual < 0) char_actual = 57; - if (text3[i] == '.') char_actual = 56; - JD8_BlitCK(x + (i + 1) * 8, y + 20, gfx, (char_actual % 35) * 9, 6 + floorf(char_actual / 35) * 9, 9, 9, 255); - } + drawChar(x + (num_chars_actual + 1) * 8, y, text1[num_chars_actual]); + while (!JG_ShouldUpdate()) { JI_Update(); if (JI_AnyKey()) { eixir = true; } } + JD8_Blit(fondo_temp); JD8_Flip(); } + if (eixir) for (int i = 0; i <= tamany_text; i++) drawChar(x + (i + 1) * 8, y, text1[i]); - for (int i = 0; i <= tamany_text3; i++) { - int char_actual = text3[i] - 42; if (char_actual < 0) char_actual = 57; - if (text3[i] == '.') char_actual = 56; - JD8_BlitCK(x + (i + 1) * 8, y + 20, gfx, (char_actual % 35) * 9, 6 + floorf(char_actual / 35) * 9, 9, 9, 255); + + if (text2 != NULL) + { + tamany_text = strlen(text2); + temps_total = tamany_text * speed; + temps_inicial = JG_GetCycleCounter(); + + while ((JG_GetCycleCounter() - temps_inicial < temps_total) && !eixir && !JG_Quitting()) + { + int num_chars_actual = (JG_GetCycleCounter() - temps_inicial) / speed; + drawChar(x + (num_chars_actual + 1) * 8, y+10, text2[num_chars_actual]); + + while (!JG_ShouldUpdate()) { JI_Update(); if (JI_AnyKey()) { eixir = true; } } + JD8_Blit(fondo_temp); + JD8_Flip(); + } + if (eixir) for (int i = 0; i <= tamany_text; i++) drawChar(x + (i + 1) * 8, y+10, text2[i]); + + if (text3 != NULL) + { + tamany_text = strlen(text3); + temps_total = tamany_text * speed; + temps_inicial = JG_GetCycleCounter(); + + while ((JG_GetCycleCounter() - temps_inicial < temps_total) && !eixir && !JG_Quitting()) + { + int num_chars_actual = (JG_GetCycleCounter() - temps_inicial) / speed; + drawChar(x + (num_chars_actual + 1) * 8, y+20, text3[num_chars_actual]); + + while (!JG_ShouldUpdate()) { JI_Update(); if (JI_AnyKey()) { eixir = true; } } + JD8_Blit(fondo_temp); + JD8_Flip(); + } + if (eixir) for (int i = 0; i <= tamany_text; i++) drawChar(x + (i + 1) * 8, y+10, text3[i]); + } } + + JD8_Blit(fondo_temp); JD8_Flip(); + wait(200); + } + + void go() + { + JS_LoadMusic("mhist.mid"); + JS_PlayMusic(-1); + + gfx = JD8_LoadSurface("sprites.gif"); + + JD8_ClearScreen(0); + JD8_Flip(); + + fondo = JD8_LoadSurface("hist01.gif"); + pal = JD8_LoadPalette("hist01.gif"); + fadeIn(); + showText(40, 90, 2, 10, "QUE BON DIA FA NO CREUS PEPE"); + showText(50, 80, 10, 10, "EEEE..SS..SSIII.SI"); + showText(140, 140, 2, 10, "[SEMPRE QUE M^ACOSTE", "A PEPE ES POSA RARO\\"); + wait(200); + fadeOut(); + JD8_FreeSurface(fondo); + free(pal); + + if (!JG_Quitting()) + { + fondo = JD8_LoadSurface("hist02.gif"); + pal = JD8_LoadPalette("hist02.gif"); + fadeIn(); + showText(100, 140, 10, 10, "AAAAY a"); + showText(100, 55, 3, 10, "JA T^HE PILLAT PEPE"); + showText(145, 125, 2, 1, "AUXILIa"); + wait(200); + fadeOut(); + JD8_FreeSurface(fondo); + free(pal); + } + + if (!JG_Quitting()) + { + fondo = JD8_LoadSurface("hist03.gif"); + pal = JD8_LoadPalette("hist03.gif"); + fadeIn(); + showText(50, 80, 5, 10, "ARA ROSITA ES MEUA"); + showText(50, 80, 5, 10, "SI VOLS ACONSEGUIR_LA", "HAURAS DE SEGUIR_ME", "PER TOT EL MONb"); + showText(60, 80, 5, 1, "JA JA JA JA JA aa"); + wait(200); + fadeOut(); + JD8_FreeSurface(fondo); + free(pal); + } + + if (!JG_Quitting()) + { + fondo = JD8_LoadSurface("hist04.gif"); + pal = JD8_LoadPalette("hist04.gif"); + fadeIn(); + showText(120, 60, 2, 5, "AJUDA^M PEPEa"); + showText(50, 50, 7, 50, "MALEIT SIGUES", "ET TROBAREbbb"); + fadeOut(); + JD8_FreeSurface(fondo); + free(pal); + } + + // FREE EVERYTHING + JD8_FreeSurface(gfx); + + if (JG_Quitting()) { + info::estat_joc = ESTAT_EIXIR; + } else { + info::estat_joc = ESTAT_MENU; + } } } - - JD8_Flip(); - Wait(200); -} - -void ModuleSequence::Wait(int time) { - bool eixir = false; - int temps_inicial = JG_GetCycleCounter(); - while ((JG_GetCycleCounter() - temps_inicial < time) && !eixir) { - while (!JG_ShouldUpdate()) { JI_Update(); if (JI_AnyKey() || JG_Quitting()) { eixir = true; } } - } } diff --git a/modulesequence.h b/modulesequence.h deleted file mode 100644 index 89bc167..0000000 --- a/modulesequence.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once - -class ModuleSequence { - -public: - - ModuleSequence(); - ~ModuleSequence(void); - - int Go(); - -private: - - void FadeIn(); - void FadeOut(); - void ShowText(int x, int y, int color, int speed, const char* text1, const char* text2 = nullptr, const char* text3 = nullptr); - void Wait(int time); -}; diff --git a/modulestaticscreen.cpp b/modulestaticscreen.cpp index 3250aea..0ef20c8 100644 --- a/modulestaticscreen.cpp +++ b/modulestaticscreen.cpp @@ -1,4 +1,4 @@ -#include "modulestaticscreen.h" +#include "modules.h" #include "jgame.h" #include "jdraw8.h" @@ -8,106 +8,82 @@ #include #include "info.h" -ModuleStaticScreen::ModuleStaticScreen() { -} +namespace module +{ + namespace staticScreen + { + void go() + { + bool eixir = false; + JD8_Surface gfx = nullptr; + JD8_Palette pal = nullptr; -ModuleStaticScreen::~ModuleStaticScreen(void) { -} + // Carrega grafics i música + switch( info::estat_joc ) { + case ESTAT_ICEKAS: + JS_LoadMusic("mlogo.mid"); + JS_PlayMusic(1); -int ModuleStaticScreen::Go() { + gfx = JD8_LoadSurface( "logo.gif" ); + pal = JD8_LoadPalette( "logo.gif" ); + break; - switch( info::estat_joc ) { - case ESTAT_ICEKAS: - doIcekas(); - break; - case ESTAT_LOGO: - doLogo(); - break; - } + case ESTAT_LOGO: + gfx = JD8_LoadSurface("titol.gif"); + pal = JD8_LoadPalette("titol.gif"); + break; + } - JD8_FadeOut(); + // Fade in + JD8_Blit(gfx); + JG_SetUpdateTicks(8); + while (!JD8_FadeToPalAsync(pal)) + { + while (!JG_ShouldUpdate()) + { + JI_Update(); + if (JI_AnyKey() || JG_Quitting()) + { + eixir = true; + } + } + } - if( JG_Quitting() ) { - return ESTAT_EIXIR; - } else { - switch (info::estat_joc) { - case ESTAT_ICEKAS: return ESTAT_LOGO; break; - case ESTAT_LOGO: return ESTAT_MENU; break; + // DELAY + JG_SetUpdateTicks(100); + int contador = 20; + while (contador > 0 && !eixir) { + contador--; + while (!JG_ShouldUpdate()) + { + JI_Update(); + if (JI_AnyKey() || JG_Quitting()) + { + eixir = true; + } + } + } + + // FADE OUT + JG_SetUpdateTicks(2); + while (!JD8_FadeOutAsync()) { + while (!JG_ShouldUpdate()) { JI_Update(); if (JI_AnyKey() || JG_Quitting()) { eixir = true; } } + } + + JD8_FreeSurface( gfx ); + free(pal); + + //JD8_FadeOut(); + + if( JG_Quitting() ) { + info::estat_joc = ESTAT_EIXIR; + } else { + switch (info::estat_joc) { + case ESTAT_ICEKAS: info::estat_joc = ESTAT_LOGO; break; + case ESTAT_LOGO: info::estat_joc = ESTAT_MENU; break; + } + } } } - return 0; -} - -void ModuleStaticScreen::doIcekas() { - - bool eixir = false; - - JS_LoadMusic("mlogo.mid"); - JS_PlayMusic(1); - - JD8_Surface gfx = JD8_LoadSurface( "logo.gif" ); - JD8_Palette pal = JD8_LoadPalette( "logo.gif" ); - - JD8_ClearScreen( 0 ); - JD8_Flip(); - - // FADE IN - JD8_Blit(gfx); - JG_SetUpdateTicks(8); - while (!JD8_FadeToPalAsync(pal) && !eixir) { - while (!JG_ShouldUpdate()) { JI_Update(); if (JI_AnyKey() || JG_Quitting()) { eixir = true; } } - } - - // DELAY - JG_SetUpdateTicks(100); - int contador = 20; - while (contador > 0 && !eixir) { - contador--; - while (!JG_ShouldUpdate()) { JI_Update(); if (JI_AnyKey() || JG_Quitting()) { eixir = true; } } - } - - // FADE OUT - JG_SetUpdateTicks(2); - while (!JD8_FadeOutAsync() && !eixir) { - while (!JG_ShouldUpdate()) { JI_Update(); if (JI_AnyKey() || JG_Quitting()) { eixir = true; } } - } - - JD8_FreeSurface( gfx ); - free(pal); -} - -void ModuleStaticScreen::doLogo() { - - bool eixir = false; - - JD8_Surface gfx = JD8_LoadSurface("titol.gif"); - JD8_Palette pal = JD8_LoadPalette("titol.gif"); - - JD8_ClearScreen(0); - JD8_Flip(); - - // FADE IN - JD8_Blit(gfx); - JG_SetUpdateTicks(8); - while (!JD8_FadeToPalAsync(pal) && !eixir) { - while (!JG_ShouldUpdate()) { JI_Update(); if (JI_AnyKey() || JG_Quitting()) { eixir = true; } } - } - - // DELAY - JG_SetUpdateTicks(100); - int contador = 20; - while (contador > 0 && !eixir) { - contador--; - while (!JG_ShouldUpdate()) { JI_Update(); if (JI_AnyKey() || JG_Quitting()) { eixir = true; } } - } - - // FADE OUT - JG_SetUpdateTicks(2); - while (!JD8_FadeOutAsync() && !eixir) { - while (!JG_ShouldUpdate()) { JI_Update(); if (JI_AnyKey() || JG_Quitting()) { eixir = true; } } - } - - JD8_FreeSurface(gfx); - free(pal); } diff --git a/modulestaticscreen.h b/modulestaticscreen.h deleted file mode 100644 index 5599351..0000000 --- a/modulestaticscreen.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once - -class ModuleStaticScreen { - -public: - - ModuleStaticScreen(); - ~ModuleStaticScreen(void); - - int Go(); - -private: - - void doIcekas(); - void doLogo(); - - int contador; -};