diff --git a/data/config/config.bin b/data/config/config.bin index 0f82916..c5aefb3 100644 Binary files a/data/config/config.bin and b/data/config/config.bin differ diff --git a/data/lang/ba_BA.txt b/data/lang/ba_BA.txt index 525363c..2a95bc8 100644 --- a/data/lang/ba_BA.txt +++ b/data/lang/ba_BA.txt @@ -1,160 +1,239 @@ ## 0 - MENU DEL TITULO JUGAR + ## 1 - MENU DEL TITULO OPCIONS + ## 2 - MENU DEL TITULO INSTRUCCIONS + ## 3 - MENU DEL TITULO EIXIR + ## 4 - MENU DE OPCIONES FINESTRA + ## 5 - MENU DE OPCIONES PANTALLA COMPLETA + ## 6 - MENU DE OPCIONES PANTALLA COMPLETA FALSA + ## 7 - MENU DE OPCIONES TAMANY DE FINESTRA + ## 8 - MENU DE OPCIONES IDIOMA + ## 9 - MENU DE OPCIONES [ ACEPTAR ] + ## 10 - MENU DE OPCIONES [ CANCELAR ] + ## 11 - INSTRUCCIONES OBJECTIU + ## 12 - INSTRUCCIONES HAS D'EXPLOTAR + ## 13 - INSTRUCCIONES TANTS GLOBUS COM PUGUES + ## 14 - INSTRUCCIONES LA DIFICULTAT AUGMENTA + ## 15 - INSTRUCCIONES A MESURA QUE VAS PUNTUANT + ## 16 - INSTRUCCIONES OBJECTES + ## 17 - INSTRUCCIONES 1.000 PUNTS + ## 18 - INSTRUCCIONES 2.500 PUNTS + ## 19 - INSTRUCCIONES 5.000 PUNTS + ## 20 - INSTRUCCIONES PARA EL TEMPS + ## 21 - INSTRUCCIONES VIDA EXTRA + ## 22 - INSTRUCCIONES PREM UNA TECLA PER A TORNAR + ## 23 - TITULO PREM QUALSEVOL TECLA + ## 24 - MENU SELECCION DE IDIOMA ESPA{OL (ESPANYOL) + ## 25 - MENU SELECCION DE IDIOMA BALOONCIA + ## 26 - MENU SELECCION DE IDIOMA ENGLISH (ANGLES) + ## 27 - INTRO Un dia qualsevol de l'any 2000 + ## 28 - INTRO Tot esta tranquil a la UPV + ## 29 - INTRO Fins que un desaprensiu... + ## 30 - INTRO HEY! ME ANE A FERME UN CORTAET... + ## 31 - INTRO UAAAAAAAAAAAAA!!! + ## 32 - INTRO Espera un moment... + ## 33 - INTRO Si resulta que no tinc solt! + ## 34 - INTRO MERDA DE MAQUINA! + ## 35 - INTRO Blop... blop... blop... + ## 36 - TEXTOS DEL JUEGO Temps detes: + ## 37 - TEXTOS DEL JUEGO D E M O + ## 38 - TEXTOS DEL JUEGO fases mes! + ## 39 - +- ## 40 - +- ## 41 - +- ## 42 - +- ## 43 - PANTALLA DE GAME OVER FI DEL JOC + ## 44 - PANTALLA DE GAME OVER ELS TEUS PUNTS: + ## 45 - PANTALLA DE GAME OVER CONTINUAR? + ## 46 - MENU DE PAUSA CONTINUAR + ## 47 - MENU DE PAUSA EIXIR DEL JOC + ## 48 - MENU GAME OVER SI + ## 49 - MENU GAME OVER NO + ## 50 - TEXTO DE COMPLETAR EL JUEGO Felicitats!! + ## 51 - MENU DEL TITULO 1 JUGADOR + ## 52 - MENU DEL TITULO 2 JUGADORS + ## 53 MARCADOR jugador 1 + ## 54 MARCADOR jugador 2 + ## 55 MARCADOR mult + ## 56 MARCADOR max. puntuacio + ## 57 MARCADOR fase + ## 58 - MENU DE OPCIONES MODE DE VISUALITZACIO + ## 59 - MENU DE OPCIONES DIFICULTAT + ## 60 - MENU DE OPCIONES FILTRE + ## 61 - MENU DE OPCIONES SINC. VERTICAL + ## 62 - MENU DE OPCIONES CONTROLS DEL JUGADOR 1 + ## 63 - MENU DE OPCIONES CONTROLS DEL JUGADOR 2 + ## 64 - +- ## 65 - +- ## 66 - MENU DE OPCIONES FACIL + ## 67 - MENU DE OPCIONES NORMAL + ## 68 - MENU DE OPCIONES DIFICIL + ## 69 - MENU DE OPCIONES TECLAT + ## 70 - MENU DE OPCIONES MANDO + ## 71 - MENU DE OPCIONES LINEAL + ## 72 - MENU DE OPCIONES NEAREST + ## 73 - MENU DE OPCIONES ACTIVADA + ## 74 - MENU DE OPCIONES DESACTIVADA + ## 75 - JUEGO Endavant! + ## 76 - JUEGO 1.000.000 de punts! + ## 77 - PANTALLA DE GAME OVER PUNTS J1: + ## 78 - PANTALLA DE GAME OVER PUNTS J2: + ## 79 - TEXTOS DEL JUEGO Ultima fase! \ No newline at end of file diff --git a/data/lang/en_UK.txt b/data/lang/en_UK.txt index c1a6f7a..ddb62f5 100644 --- a/data/lang/en_UK.txt +++ b/data/lang/en_UK.txt @@ -1,160 +1,239 @@ ## 0 - MENU DEL TITULO PLAY + ## 1 - MENU DEL TITULO OPTIONS + ## 2 - MENU DEL TITULO HOW TO PLAY + ## 3 - MENU DEL TITULO QUIT + ## 4 - MENU DE OPCIONES WINDOW + ## 5 - MENU DE OPCIONES FULLSCREEN + ## 6 - MENU DE OPCIONES FAKE FULLSCREEN + ## 7 - MENU DE OPCIONES WINDOW SIZE + ## 8 - MENU DE OPCIONES LANGUAGE + ## 9 - MENU DE OPCIONES [ ACCEPT ] + ## 10 - MENU DE OPCIONES [ CANCEL ] + ## 11 - INSTRUCCIONES OBJECTIVE + ## 12 - INSTRUCCIONES YOU HAVE TO POP AS MANY + ## 13 - INSTRUCCIONES BALLOONS AS YOU CAN + ## 14 - INSTRUCCIONES DIFFICULTY WILL BE INCREASED + ## 15 - INSTRUCCIONES AS YOU SCORE POINTS + ## 16 - INSTRUCCIONES ITEMS + ## 17 - INSTRUCCIONES 1.000 POINTS + ## 18 - INSTRUCCIONES 2.500 POINTS + ## 19 - INSTRUCCIONES 5.000 POINTS + ## 20 - INSTRUCCIONES TIME STOPPER + ## 21 - INSTRUCCIONES EXTRA HIT + ## 22 - INSTRUCCIONES PRESS ANY KEY TO RETURN + ## 23 - TITULO PRESS ANY KEY + ## 24 - MENU SELECCION DE IDIOMA ESPA{OL (SPANISH) + ## 25 - MENU SELECCION DE IDIOMA BALOONCIA (VALENCIAN) + ## 26 - MENU SELECCION DE IDIOMA ENGLISH + ## 27 - INTRO Any day of the year 2000 + ## 28 - INTRO Everything is quiet at the UPV + ## 29 - INTRO Until a bastard arrives... + ## 30 - INTRO YO! GONNA TAKE A CAFELITO... + ## 31 - INTRO AAAAAAAARGHHHH!!! + ## 32 - INTRO Wait a moment... + ## 33 - INTRO I don't have any loose! + ## 34 - INTRO FUCKING MACHINE! + ## 35 - INTRO Blop... blop... blop... + ## 36 - TEXTOS DEL JUEGO Time stopped: + ## 37 - TEXTOS DEL JUEGO D E M O + ## 38 - TEXTOS DEL JUEGO stages left! + ## 39 - +- ## 40 - +- ## 41 - +- ## 42 - +- ## 43 - PANTALLA DE GAME OVER GAME OVER + ## 44 - PANTALLA DE GAME OVER YOUR SCORE: + ## 45 - PANTALLA DE GAME OVER CONTINUE? + ## 46 - MENU DE PAUSA CONTINUE + ## 47 - MENU DE PAUSA LEAVE GAME + ## 48 - MENU GAME OVER YES + ## 49 - MENU GAME OVER NO + ## 50 - TEXTO DE COMPLETAR EL JUEGO Congratulations!! + ## 51 - MENU DEL TITULO 1 PLAYER + ## 52 - MENU DEL TITULO 2 PLAYERS + ## 53 - MARCADOR player 1 + ## 54 - MARCADOR player 2 + ## 55 - MARCADOR mult + ## 56 - MARCADOR high score + ## 57 - MARCADOR stage + ## 58 - MENU DE OPCIONES DISPLAY MODE + ## 59 - MENU DE OPCIONES DIFFICULTY + ## 60 - MENU DE OPCIONES FILTER + ## 61 - MENU DE OPCIONES VSYNC + ## 62 - MENU DE OPCIONES PLAYER 1 CONTROLS + ## 63 - MENU DE OPCIONES PLAYER 2 CONTROLS + ## 64 - +- ## 65 - +- ## 66 - MENU DE OPCIONES EASY + ## 67 - MENU DE OPCIONES NORMAL + ## 68 - MENU DE OPCIONES HARD + ## 69 - MENU DE OPCIONES KEYBOARD + ## 70 - MENU DE OPCIONES GAME CONTROLLER + ## 71 - MENU DE OPCIONES LINEAL + ## 72 - MENU DE OPCIONES NEAREST + ## 73 - MENU DE OPCIONES ON + ## 74 - MENU DE OPCIONES OFF + ## 75 - JUEGO Get Ready! + ## 76 - JUEGO 1.000.000 points! + ## 77 - PANTALLA DE GAME OVER PLAYER1 SCORE: + ## 78 - PANTALLA DE GAME OVER PLAYER2 SCORE: + ## 79 - TEXTOS DEL JUEGO Last stage! \ No newline at end of file diff --git a/data/lang/es_ES.txt b/data/lang/es_ES.txt index 79ac2fa..f92c032 100644 --- a/data/lang/es_ES.txt +++ b/data/lang/es_ES.txt @@ -1,160 +1,239 @@ ## 0 - MENU DEL TITULO JUGAR + ## 1 - MENU DEL TITULO OPCIONES + ## 2 - MENU DEL TITULO INSTRUCCIONES + ## 3 - MENU DEL TITULO SALIR + ## 4 - MENU DE OPCIONES VENTANA + ## 5 - MENU DE OPCIONES PANTALLA COMPLETA + ## 6 - MENU DE OPCIONES PANTALLA COMPLETA FALSA + ## 7 - MENU DE OPCIONES TAMA{O DE VENTANA + ## 8 - MENU DE OPCIONES IDIOMA + ## 9 - MENU DE OPCIONES [ ACEPTAR ] + ## 10 - MENU DE OPCIONES [ CANCELAR ] + ## 11 - INSTRUCCIONES OBJETIVO + ## 12 - INSTRUCCIONES TIENES QUE EXPLOTAR + ## 13 - INSTRUCCIONES TANTOS GLOBOS COMO PUEDAS + ## 14 - INSTRUCCIONES LA DIFICULTAD SE INCREMENTA + ## 15 - INSTRUCCIONES A MEDIDA QUE VAS PUNTUANDO + ## 16 - INSTRUCCIONES OBJETOS + ## 17 - INSTRUCCIONES 1.000 PUNTOS + ## 18 - INSTRUCCIONES 2.500 PUNTOS + ## 19 - INSTRUCCIONES 5.000 PUNTOS + ## 20 - INSTRUCCIONES DETIENE EL TIEMPO + ## 21 - INSTRUCCIONES VIDA EXTRA + ## 22 - INSTRUCCIONES PULSA UNA TECLA PARA VOLVER + ## 23 - TITULO PULSA CUALQUIER TECLA + ## 24 - MENU SELECCION DE IDIOMA ESPA{OL + ## 25 - MENU SELECCION DE IDIOMA BALOONCIA (VALENCIANO) + ## 26 - MENU SELECCION DE IDIOMA ENGLISH (INGLES) + ## 27 - INTRO Un dia cualquiera del a{o 2000 + ## 28 - INTRO Todo esta tranquilo en la UPV + ## 29 - INTRO Hasta que un desaprensivo... + ## 30 - INTRO HEY! VOY A SACARME UN TALLADET... + ## 31 - INTRO UAAAAAAAAAAAAA!!! + ## 32 - INTRO Espera un momento... + ## 33 - INTRO Si no llevo suelto encima! + ## 34 - INTRO MIERDA DE MAQUINA! + ## 35 - INTRO Blop... blop... blop... + ## 36 - TEXTOS DEL JUEGO Tiempo: + ## 37 - TEXTOS DEL JUEGO D E M O + ## 38 - TEXTOS DEL JUEGO fases mas! + ## 39 - +- ## 40 - +- ## 41 - +- ## 42 - +- ## 43 - PANTALLA DE GAME OVER FIN DE JUEGO + ## 44 - PANTALLA DE GAME OVER TU PUNTUACION: + ## 45 - PANTALLA DE GAME OVER CONTINUAR? + ## 46 - MENU DE PAUSA CONTINUAR + ## 47 - MENU DE PAUSA SALIR DEL JUEGO + ## 48 - MENU GAME OVER SI + ## 49 - MENU GAME OVER NO + ## 50 - TEXTO DE COMPLETAR EL JUEGO Felicidades!! + ## 51 - MENU DEL TITULO 1 JUGADOR + ## 52 - MENU DEL TITULO 2 JUGADORES + ## 53 - MARCADOR jugador 1 + ## 54 - MARCADOR jugador 2 + ## 55 - MARCADOR mult + ## 56 - MARCADOR max. puntuacion + ## 57 - MARCADOR FASE + ## 58 - MENU DE OPCIONES MODO DE VISUALIZACION + ## 59 - MENU DE OPCIONES DIFICULTAD + ## 60 - MENU DE OPCIONES FILTRO + ## 61 - MENU DE OPCIONES SINC. VERTICAL + ## 62 - MENU DE OPCIONES CONTROLES DEL JUGADOR 1 + ## 63 - MENU DE OPCIONES CONTROLES DEL JUGADOR 2 + ## 64 - +- ## 65 - +- ## 66 - MENU DE OPCIONES FACIL + ## 67 - MENU DE OPCIONES NORMAL + ## 68 - MENU DE OPCIONES DIFICIL + ## 69 - MENU DE OPCIONES TECLADO + ## 70 - MENU DE OPCIONES MANDO + ## 71 - MENU DE OPCIONES LINEAL + ## 72 - MENU DE OPCIONES NEAREST + ## 73 - MENU DE OPCIONES ACTIVADA + ## 74 - MENU DE OPCIONES DESACTIVADA + ## 75 - JUEGO Adelante! + ## 76 - JUEGO 1.000.000 de puntos! + ## 77 - PANTALLA DE GAME OVER PUNTUACION J1: + ## 78 - PANTALLA DE GAME OVER PUNTUACION J2: + ## 79 - TEXTOS DEL JUEGO Ultima fase! \ No newline at end of file diff --git a/data/menu/pause.men b/data/menu/pause.men index 06e9011..6759aae 100644 --- a/data/menu/pause.men +++ b/data/menu/pause.men @@ -21,10 +21,10 @@ selector_text_color=255,255,255 defaultActionWhenCancel=0 [item] -text=SI +text=CONTINUE hPaddingDown=2 [/item] [item] -text=NO +text=LEAVE GAME [/item] \ No newline at end of file diff --git a/source/director.cpp b/source/director.cpp index e4c4e08..3693cb0 100644 --- a/source/director.cpp +++ b/source/director.cpp @@ -12,9 +12,6 @@ Director::Director(std::string path) section.name = PROG_SECTION_GAME; section.subsection = GAME_SECTION_PLAY_1P; - section.name = PROG_SECTION_LOGO; - section.subsection = 0; - // Crea el objeto que controla los ficheros de recursos asset = new Asset(path.substr(0, path.find_last_of("\\/")) + "/../"); diff --git a/source/game.cpp b/source/game.cpp index 276f68d..9f4e87c 100644 --- a/source/game.cpp +++ b/source/game.cpp @@ -500,7 +500,11 @@ void Game::loadMedia() // Menus gameOverMenu = new Menu(renderer, asset, input, asset->get("gameover.men")); + gameOverMenu->setItemCaption(0, lang->getText(48)); + gameOverMenu->setItemCaption(1, lang->getText(49)); pauseMenu = new Menu(renderer, asset, input, asset->get("pause.men")); + pauseMenu->setItemCaption(0, lang->getText(46)); + pauseMenu->setItemCaption(1, lang->getText(47)); // Sonidos balloonSound = JA_LoadSound(asset->get("balloon.wav").c_str()); diff --git a/source/lang.cpp b/source/lang.cpp index 2a97501..e553e52 100644 --- a/source/lang.cpp +++ b/source/lang.cpp @@ -46,20 +46,20 @@ bool Lang::setLang(Uint8 lang) if (rfile.is_open() && rfile.good()) { success = true; - std::string buffer; + std::string line; // lee el resto de datos del fichero int index = 0; - int line_read = 0; - while (std::getline(rfile, buffer)) + while (std::getline(rfile, line)) { - // Almacena solo las lineas impares - if (line_read % 2 == 1) - mTextStrings[index++] = buffer; - - // Limpia el buffer - buffer.clear(); - line_read++; + // Almacena solo las lineas que no empiezan por # o no esten vacias + const bool test1 = line.substr(0,1) != "#"; + const bool test2 = !line.empty(); + if (test1 && test2) + { + mTextStrings[index] = line; + index++; + } }; } diff --git a/source/title.cpp b/source/title.cpp index 1f28179..0f439ff 100644 --- a/source/title.cpp +++ b/source/title.cpp @@ -144,7 +144,7 @@ Title::Title(SDL_Renderer *renderer, Screen *screen, Input *input, Asset *asset, } // Actualiza los textos de los menus - // updateMenuLabels(); + updateMenuLabels(); } // Destructor @@ -252,14 +252,10 @@ void Title::update() JA_PlayMusic(titleMusic); } - // Actualiza el contador de ticks - ticks = SDL_GetTicks(); - dustBitmapR->update(); dustBitmapL->update(); // Actualiza la lógica del titulo - menu.active->update(); fade->update(); if (fade->hasEnded()) @@ -306,7 +302,7 @@ void Title::update() // Comprueba las entradas para el menu if (menuVisible == true) { - menu.active->checkInput(); + menu.active->update(); } // Comprueba si se ha seleccionado algún item del menú @@ -318,14 +314,17 @@ void Title::update() postFade = 0; fade->activateFade(); break; + case 1: // 2 PLAYERS postFade = 1; fade->activateFade(); break; + case 2: // OPTIONS menu.active = menu.options; optionsPrevious = *options; break; + case 3: // QUIT postFade = 2; fade->activateFade(); @@ -350,20 +349,24 @@ void Title::update() options->difficulty = DIFFICULTY_EASY; updateMenuLabels(); break; + case 1: // PLAYER 1 CONTROLS updatePlayerInputs(0); updateMenuLabels(); break; + case 3: // PLAYER 2 CONTROLS updatePlayerInputs(1); updateMenuLabels(); break; + case 5: // Language options->language++; if (options->language == 3) options->language = 0; updateMenuLabels(); break; + case 6: // Display mode switchFullScreenModeVar(); if (options->fullScreenMode != 0) @@ -378,12 +381,14 @@ void Title::update() } updateMenuLabels(); break; + case 8: // Windows size options->windowSize++; if (options->windowSize == 5) options->windowSize = 1; updateMenuLabels(); break; + case 9: // FILTER if (options->filter == FILTER_LINEAL) options->filter = FILTER_NEAREST; @@ -391,6 +396,7 @@ void Title::update() options->filter = FILTER_LINEAL; updateMenuLabels(); break; + case 10: // VSYNC if (options->vSync) options->vSync = false; @@ -398,14 +404,17 @@ void Title::update() options->vSync = true; updateMenuLabels(); break; + case 11: // HOW TO PLAY runInstructions(INSTRUCTIONS_MODE_MANUAL); break; + case 12: // ACCEPT applyOptions(); menu.active->reset(); menu.active = menu.title; break; + case 13: // CANCEL options = &optionsPrevious; updateMenuLabels();