diff --git a/source/director.cpp b/source/director.cpp index db0c7ce..39d7d16 100644 --- a/source/director.cpp +++ b/source/director.cpp @@ -9,7 +9,7 @@ Director::Director(int argc, char *argv[]) section.name = SECTION_PROG_LOGO; section.subsection = SUBSECTION_LOGO_TO_INTRO; - section.name = SECTION_PROG_ENDING2; + section.name = SECTION_PROG_LOGO; // Crea e inicializa las opciones del programa iniOptions(); diff --git a/source/game_over.cpp b/source/game_over.cpp index 3605393..36d2ee8 100644 --- a/source/game_over.cpp +++ b/source/game_over.cpp @@ -151,12 +151,10 @@ void GameOver::checkEventHandler() break; case SDL_SCANCODE_F5: - // switchPalette(); + switchPalette(); break; default: - // section.name = SECTION_PROG_TITLE; - // section.subsection = 0; break; } } @@ -230,4 +228,10 @@ void GameOver::updateCounters() section.name = SECTION_PROG_LOGO; section.subsection = SUBSECTION_LOGO_TO_TITLE; } +} + +// Cambia la paleta +void GameOver::switchPalette() +{ + options->palette = (options->palette == p_zxspectrum) ? p_zxarne : p_zxspectrum; } \ No newline at end of file diff --git a/source/game_over.h b/source/game_over.h index 83f65fa..42db3b8 100644 --- a/source/game_over.h +++ b/source/game_over.h @@ -60,6 +60,9 @@ private: // Actualiza los contadores void updateCounters(); + // Cambia la paleta + void switchPalette(); + public: // Constructor GameOver(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *asset, options_t *options);