diff --git a/CMakeLists.txt b/CMakeLists.txt index 07f2bc7..f05030d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,7 @@ cmake_minimum_required (VERSION 3.2) set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake") set (CMAKE_CXX_STANDARD 11) +include (GNUInstallDirs) include (${CMAKE_ROOT}/Modules/ExternalProject.cmake) include_directories (${CMAKE_INSTALL_PREFIX}/include) @@ -12,12 +13,16 @@ list(APPEND CMAKE_FIND_ROOT_PATH "${CMAKE_INSTALL_PREFIX}") # This is required w project (planetblupi) set (PB_VERSION_MAJOR 1) -set (PB_VERSION_MINOR 9) -set (PB_VERSION_PATCH 1) +set (PB_VERSION_MINOR 11) +set (PB_VERSION_PATCH 0) set (PB_VERSION_EXTRA "") set (PB_PRODUCT_NAME "Planet Blupi") set (PB_PACKAGE_NAME "planetblupi") -set (PB_DESCRIPTION "Planet Blupi - A delerious spell-binding game") +set (PB_EXEC "planetblupi") +set (PB_ICON_REF "blupi") +set (PB_DESCRIPTION "Planet Blupi - A delirious spell-binding game") + +option (PB_HTTP_VERSION_CHECK "Run a version check over HTTP (with CURL)" OFF) set(CMAKE_CXX_FLAGS "-Wno-error=c++11-narrowing ${CMAKE_CXX_FLAGS}") # TODO: FIXME in fog.cxx @@ -37,6 +42,14 @@ if (APPIMAGE_APPRUN_PROGRAM AND APPIMAGE_ASSISTANT_PROGRAM) set (USE_APPIMAGE ON) endif () +if (NOT USE_APPIMAGE) + configure_file ( + "${PROJECT_SOURCE_DIR}/resources/linux/application.desktop.in" + "${CMAKE_CURRENT_BINARY_DIR}/${PB_PACKAGE_NAME}.desktop" + @ONLY + ) +endif () + if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11 -L${CMAKE_INSTALL_PREFIX}/lib") endif () @@ -45,10 +58,6 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND "${STATIC_BUILD}") set (CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++") endif () -if (NOT "${STATIC_BUILD}") - set (CMAKE_EXE_LINKER_FLAGS "-lpthread") -endif () - if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3") endif () @@ -124,7 +133,10 @@ find_package (PkgConfig REQUIRED) pkg_search_module (SDL2 REQUIRED sdl2) pkg_search_module (SDL2_MIXER REQUIRED SDL2_mixer) pkg_search_module (SDL2_IMAGE REQUIRED SDL2_image) -pkg_search_module (CURL REQUIRED libcurl) +if (${PB_HTTP_VERSION_CHECK}) + pkg_search_module (CURL REQUIRED libcurl) + add_definitions (-DUSE_CURL) +endif () if ("${STATIC_BUILD}") pkg_search_module (PNG REQUIRED libpng) @@ -140,7 +152,9 @@ if ("${STATIC_BUILD}") pkg_search_module (PULSE REQUIRED libpulse) endif () - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DCURL_STATICLIB") + if (${PB_HTTP_VERSION_CHECK}) + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DCURL_STATICLIB") + endif () endif () ########################### @@ -160,7 +174,6 @@ if ("${STATIC_BUILD}") ${SDL2_STATIC_LIBRARIES} ${SDL2_MIXER_STATIC_LIBRARIES} ${SDL2_IMAGE_STATIC_LIBRARIES} - ${CURL_STATIC_LIBRARIES} ${SDLKitchensink_STATIC_LIBRARIES} ${PNG_STATIC_LIBRARIES} ${AVCODEC_STATIC_LIBRARIES} @@ -170,6 +183,12 @@ if ("${STATIC_BUILD}") ${SWRESAMPLE_STATIC_LIBRARIES} ) + if (${PB_HTTP_VERSION_CHECK}) + list (APPEND planetblupi_DEPS + ${CURL_STATIC_LIBRARIES} + ) + endif () + if (UNIX AND NOT APPLE AND NOT ANDROID) list (APPEND planetblupi_DEPS ${ALSA_STATIC_LIBRARIES} @@ -184,7 +203,14 @@ else () ${SDL2_IMAGE_LIBRARIES} ${CURL_LIBRARIES} ${SDLKitchensink_LIBRARIES} + pthread ) + + if (${PB_HTTP_VERSION_CHECK}) + list (APPEND planetblupi_DEPS + ${CURL_LIBRARIES} + ) + endif () endif () target_link_libraries (planetblupi PUBLIC ${planetblupi_DEPS}) @@ -231,8 +257,10 @@ endforeach (file) ############## install (TARGETS planetblupi - RUNTIME DESTINATION bin - ARCHIVE DESTINATION lib + # TODO: merge conflict + #RUNTIME DESTINATION bin + #ARCHIVE DESTINATION lib + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) install ( @@ -256,6 +284,13 @@ if (UNIX AND NOT APPLE) install (DIRECTORY resources/icon/hicolor DESTINATION share/icons) endif () +if (NOT USE_APPIMAGE) + install ( + FILES ${CMAKE_CURRENT_BINARY_DIR}/${PB_PACKAGE_NAME}.desktop + DESTINATION share/applications + ) +endif () + # Copy libwinpthread-1.dll which seems not be linkable statically if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows" AND MINGW) execute_process (COMMAND cygpath.exe --windows /mingw64 OUTPUT_VARIABLE MINGW64_PATH) @@ -283,7 +318,7 @@ if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release" AND "${STATIC_BUILD}") if (USE_APPIMAGE) include (LinuxAppImageBuild) set (CMAKE_PACKAGED_OUTPUT_PREFIX ${CMAKE_INSTALL_PREFIX}) - APPIMAGE_PACKAGE (planetblupi ${PB_PACKAGE_NAME} ${PB_PRODUCT_NAME} "${CMAKE_CURRENT_SOURCE_DIR}/resources/linux" "${CMAKE_BINARY_DIR}/share" "" "" "blupi") + APPIMAGE_PACKAGE (planetblupi ${PB_PACKAGE_NAME} ${PB_PRODUCT_NAME} "${CMAKE_CURRENT_SOURCE_DIR}/resources/linux" "${CMAKE_BINARY_DIR}/share" "" "" ${PB_ICON_REF}) elseif (MINGW) set (INSTALLER_FILE_NAME "${PB_PACKAGE_NAME}-${PB_VERSION_MAJOR}.${PB_VERSION_MINOR}.${PB_VERSION_PATCH}${PB_VERSION_EXTRA}") set (CPACK_PACKAGE_FILE_NAME "${INSTALLER_FILE_NAME}") diff --git a/README-user.md b/README-user.md index 75b98b0..1c4d195 100644 --- a/README-user.md +++ b/README-user.md @@ -8,10 +8,10 @@ to construct your own missions. | Category | Description | | -------- | ----------- | -| OS | At least GNU/Linux 2.6.32, macOS 10.7 or Microsoft Windows Vista | -| VIDEO | An 3D accelerated video card is highly recommended | -| SOUND | Any sound card supported by ALSA, sndio, macOS or DirectSound | -| INPUT | Keyboard and mouse | +| OS | At least GNU/Linux 2.6.32, macOS 10.9 or Microsoft Windows Vista | +| VIDEO | An 3D accelerated video card is highly recommended | +| SOUND | Any sound card supported by ALSA, PulseAudio, macOS or DirectSound | +| INPUT | Keyboard and mouse | ## Screen problems @@ -19,10 +19,10 @@ What ever your screen resolution is, the game "Planet Blupi" always runs in 640x480 on full screen. If your screen does not support this mode, you may run the game by default in windowed mode. Proceed as follows: -- 1. Quit the game _Planet Blupi_. -- 2. Open the file `/data/config.json` with a text editor. -- 3. Replace `fullscreen: true` by `fullscreen: false`. -- 4. Save and restart the game. +1. Quit the game _Planet Blupi_. +2. Open the file `/data/config.json` with a text editor. +3. Replace `fullscreen: true` by `fullscreen: false`. +4. Save and restart the game. In this mode the screen is no more scrolled if the mouse touches the window border. Use the Keyboard arrows instead. @@ -32,9 +32,9 @@ border. Use the Keyboard arrows instead. Left button: This button is always used in three steps: -- 1. Select a Blupi. -- 2. Click where you want him to act. -- 3. Click the button corresponding to the required operation. +1. Select a Blupi. +2. Click where you want him to act. +3. Click the button corresponding to the required operation. If the chosen Blupi is already selected (blue or red circle around him), step 1) is not necessary. diff --git a/resources/data/config.json b/resources/data/config.json index cbf07af..ed4fe9c 100644 --- a/resources/data/config.json +++ b/resources/data/config.json @@ -1,4 +1,5 @@ { "fullscreen": true, + "zoom": 1, "speedrate": 1 } diff --git a/resources/data/it/stories.blp b/resources/data/it/stories.blp new file mode 100644 index 0000000..887ae52 --- /dev/null +++ b/resources/data/it/stories.blp @@ -0,0 +1,1116 @@ +$1 +1|Obbiettivo : +1| +1|Ogni Blupi deve entrare in una casa. +1|Per fare ciò, utilizza il pulsante +1|principale del mouse (solitamente +1|quello di sinistra). + +2|1) Clicca su un Blupi. +2| Un anello blu compare ai suoi piedi +2| per indicare che è stato selezionato. +2| +2|2) Clicca su una casa. +2| +2|3) Clicca sul pulsante "Va". +2| +2|4) Ripeti le operazioni per il secondo +2| Blupi. + + + + + + + + + + Dopo aver letto queste istruzioni, + clicca sul dado qui sotto. + +$2 +Ecco un altro esercizio un pochino più +difficile : + +1|E' sufficiente trasportare due cumuli +1|di legno sulle lastre tratteggiate +1|situate a destra ... +1| +1|Prima di fare ciò, Blupi deve mangiare +1|dei pomodori per disporre della forza +2|necessaria. Ti accorgerai che quando +2|mangia l'anello rosso ai suoi piedi +2|diventa blu. Questo anello indica il +2|suo livello d'energia : +2| +2| rosso = stanco +2| blu = in piena forma + + + +Trucco : +Per far scorrere la parte visibile puoi +portare il mouse sul bordo dello schermo, +oppure utilizzare i tasti freccia della +tastiera. + +$3 +1|Trova le uova ... +1| +1|Deponendole in un'incubatrice, +1|potrai far nascere +1|quattro Blupi nuovi di zecca ! + + + + + +Trucco : +Potrai ottenere migliori risultati +tenendo il mouse con la mano destra, +e azionando i tasti freccia +della tastiera con la mano sinistra ! + +$4 +1|Obbiettivo : +1| +1|I quattro Blupi devono raggiungere +1|le case che si trovano su altre isole +1|a nord-est. + +2|Ogni Blupi deve mangiare per avere +2|la forza di saltare ! + +$5 +1|Obbiettivo : +1| +1|Deporre due lotti di pomodori sulle +1|lastre tratteggiate. Per fare ciò è +1|necessario : +1| +1|1) Abbattere il boschetto. + +2|2) Costruire un capanno. +2| +2|3) Coltivare pomodori. +2| +2|4) Deporre due lotti di pomodori sulle +2| lastre tratteggiate (senza mangiarli). + +$6 +1|Obbiettivo : +1| +1|Ogni Blupi deve raggiungere una +1|casa su una piccola isola. +1| +1|Sfortunatamente il cibo +1|disponibile è sufficiente per un +1|solo Blupi ! +2|Sarà dunque necessario trovare il +2|mezzo per produrre cibo per tutti. +2| +2|Fortunatamente l'isola possiede +2|molti alberi ... + +#h1 +Blupi viveva tranquillamente sul +suo pianeta, sino all'arrivo di uno +strano meteorite che cade in +una regione deserta. + +Solo molto tempo dopo Blupi +si accorge che le sue coltivazioni +sono devastate da grossi ragni. + +Inoltre, mentre Blupi godeva +sempre di una salute di ferro, gli +capita di starnutire e di prendere +una strana malattia. + +#h2 +Cosa sta accadendo ? + +Ebbene, lo strano meteorite +è in realtà un razzo che trasporta +un robot molto particolare. + +Infatti, questo costruisce delle +fabbriche che producono nemici +di diversa natura. + +Blupi deve a questo punto +sfruttare tutte le risorse del +suo pianeta per riuscire a +scacciare gli intrusi ... + +#1 +La caduta del razzo ha incendiato +la foresta, in lontananza. +Il villaggio di Blupi è in pericolo ! + + +1|Obbiettivo : +1| +1|Impedire che le case del villaggio +1|brucino. Per fare ciò vi è un solo +1|mezzo: abbattere gli alberi a +1|sinistra ... + + + + + + +2|Trucco : +2| +2|Se un Blupi è nascosto tra gli +2|alberi, premi la barra spaziatrice +2|per rendere temporaneamente gli +2|alberi trasparenti. + +@1 +1|Soluzione : +1| +1|Ordinare al Blupi di sinistra di +1|abbattere degli alberi poco più +1|a ovest. + +2|I due altri Blupi trasporteranno +2|man mano le assi verso sud. +2|In questo modo saranno al riparo +2|dal fuoco ! + +#2 +1|Situazione : +1| +1|Blupi si è perso in una radura +1|distante dal suo villaggio. Deve +1|organizzarsi sul posto prima di +1|ritrovare il suo villaggio. +1| +1|1) Costruire un capanno da +1| giardino e coltivare pomodori. + +2|2) Costruire un'incubatrice per +2| ottenere rinforzi. +2| +2|3) Nutrire i quattro Blupi e partire +2| alla ricerca del villaggio ... +2| + + +2|Attenzione : +2| +2|Qualche cosa di strano sta per +2|accadere ! + +@2 +1|Indizi : +1| +1|E' prima di tutto necessario +1|costruire due palizzate a nord, +1|per bloccare il ragno. +2|Dopo sarà possibile costruire un +2|capanno da giardino e coltivare +2|pomodori in pace. +2| +2|Per raggiungere le quattro case, +2|bisogna cercare in direzione est. + +#3 +1|Obbiettivo : +1| +1|Impedire che i quattro Blupi +1|smarriti nella foresta muoiano +1|carbonizzati. +1| +1|Per fare ciò, è necessario +1|terminare la costruzione del +1|muro di protezione. + + + +2|Attenzione : +2| +2|Quando il terreno è costituito +2|da muschio, brucia +2|meravigliosamente bene ... + +@3 +1|Soluzione : +1| +1|1) Spaccare una roccia. +1| Le rocce più piccole si spaccano +1| più rapidamente ! + +2|2) Costruire un muro tra i due +2| muri esistenti. +2| +2|3) Attendere che il fuoco si +2| spenga ... + +#4 +1|Obbiettivo : +1| +1|Consentire ai quattro Blupi di +1|raggiungere le lastre tratteggiate. + +@4 +1|Soluzione : +1| +1|1) Abbattere un albero. +1| +1|2) Trasportare le assi sulla riva +1| dell'acqua. +1| +1|3) Costruire un ponte in direzione +1| dei due Blupi stanchi. + +2|4) Ripetere il tutto tre volte ... +2| +2|I Blupi stanchi possono ora +2|attraversare il ponte e raggiungere +2|le lastre tratteggiate. + +#5 +1|La trappola : +1|Attenzione, il terreno dove sono +1|prigionieri i Blupi è molto +1|infiammabile e l'incendio avanza ... +1| +1|Obbiettivo : +1|Resistere sino a che l'incendio non +1|è stato domato. + +2|Attenzione : +2|La costruzione di un muro è un +2|lavoro massacrante. E' inevitabile +2|che Blupi muoia una volta +2|concluso un muro ! + +Trucco : +Se il gioco si svolge troppo +lentamente per i tuoi gusti, premi +il tasto F6 per accelerarlo. +Premendo il tasto F5 potrai +ristabilire la velocità normale. + +@5 +1|Indizi : +1| +1|E' necessario costruire quattro +1|muri sulle lastre grigie. Per +1|fare ciò, bisognerà abbattere i +1|due boschetti disponibili per +1|costruire un capanno e +1|un'incubatrice. + +2|Quando i muri saranno terminati, +2|bisognerà pazientare sino +2|all'arrivo del fuoco e alla +2|sua estinzione ... + +#6 +1|Obbiettivo : +1| +1|Proteggi il più rapidamente +1|possibile il campo trincerato +1|tra 4 torri, perché il pericolo +1|avanza ... + +2|Potrai in seguito raggiungere le +2|lastre tratteggiate a sud-est. + + + + + + +Trucco : +E' possibile selezionare diversi +Blupi contemporaneamente +mantenendo premuto il tasto +Maiuscolo e cliccando al tempo +stesso su ogni Blupi. + +@6 +1|Soluzione : +1| +1|Bisogna chiedere in fretta ai +1|quattro Blupi di spaccare ognuno +1|una roccia. Le rocce piccole sono +1|più veloci da spaccare ! +1| +1|Trasportare i quattro cumuli di +1|pietre così ottenuti sulle lastre +1|grigie e costruire poi delle +1|torri di protezione. + +2|Attendere l'arrivo e la distruzione +2|dei virus. +2| +2|A questo punto i rimanenti quattro +2|Blupi possono tranquillamente +2|dirigersi verso le lastre +2|tratteggiate a sud-est. + +#7 +1|Obbiettivo : +1| +1|I quattro Blupi devono raggiungere +1|le lastre tratteggiate. +1|Sarà necessario prendersi cura del +1|povero Blupi più lontano ... + +2|Attenzione : +2| +2|Il terreno non consente di costruire +2|un capanno da giardino ! + +@7 +1|Soluzione : +1| +1|Chiedere ad un Blupi di prendere +1|dei pomodori per salvarli dai +1|ragni golosoni. +1| +1|Con un altro Blupi saltare sull'isola +1|ad est e costruire poi un ponte in +1|direzione delle lastre tratteggiate. + +2|Trasportare i pomodori verso il +2|Blupi affaticato, affinché si +2|possa nutrire prima di spostarsi. + +#8 +1|Obbiettivo : +1| +1|Cerca di evitare che uno o due +1|Blupi vengano contaminati, poi +1|trova l'antidoto per i Blupi +1|ammalati ... +1| +1|Alla fine, ogni Blupi dovrà entrare +1|in una casa. + + + +2|Indizio : +2| +2|Costruisci un laboratorio ... + +@8 +1|Indizi : +1| +1|E' necessario costruire un +1|laboratorio usando delle pietre. +1|Questo consentirà in seguito di +1|trasformare i fiori gialli in una +1|pozione per i Blupi ammalati. + +2|Sarà necessario costruire un +2|ponte per portare le bottiglie +2|di pozione ai Blupi ammalati. +2| +2|Le case si trovano a sud-est ... + +#9 +1|Obbiettivo : +1| +1|Trova il modo per passare oltre +1|la pista di pattinaggio ... +1| + + + +2|Nota : +2| +2|Blupi può camminare sul ghiaccio. +2|L'unico inconveniente è che Blupi +2|scivola con facilità, e così +2|facendo perde molte forze ! + +@9 +1|Indizi : +1| +1|E' necessario costruire due torri +1|per proteggersi dai ragni. +1| +1|In seguito bisogna costruire un +1|capanno da giardino e +1|un'incubatrice per far +1|schiudere le uova. + +2|Blupi perde moltissime forze +2|quando attraversa la pista da +2|pattinaggio. E' dunque necessario +2|portare dei pomodori poco prima +2|della pista di pattinaggio +2|affinché Blupi possa mangiare +2|prima di attraversarla ! + +#10 +1|Obbiettivo : +1| +1|Raggiungere l'isola a nord-est, +1|poi saltare la palizzata. + +2|Non rimane altro da fare che +2|posizionare 4 Blupi sulle lastre +2|tratteggiate ... + +@10 +1|Indizi : +1| +1|E' necessario costruire un ponte in +1|direzione dei quattro prigionieri. +1|Ciò consente di tagliare una +1|roccia da riportare verso il +1|capanno da giardino per costruire +1|un laboratorio. +1| +1|I fiori blu si trovano +1|a sud-est. Grazie al laboratorio +1|questi possono essere trasformati +1|in dinamite. + +2|Utilizza la dinamite per distruggere +2|la palizzata che tiene prigionieri i +2|quattro Blupi. Prima però +2|bisognerà far indietreggiare i +2|prigionieri il più possibile per +2|proteggerli dall'esplosione ... + +#11 +1|Obbiettivo : +1| +1|Raggiungere le case a nord-est. +1|Ma attenzione, sono ben +1|custodite ... + +@11 +1|Indizi : +1| +1|Costruisci un ponte verso l'isola +1|situata a nord-ovest, poi produci +1|un minimo di quattro candelotti +1|di dinamite. +1| +1|Posiziona in seguito la dinamite a +1|nord, abbastanza vicino ai bulldozer +1|affinchè questi si avvicinino, ma +1|senza esagerare.. + +2|Fintanto che la dinamite non è +2|pronta evita di avanzare verso +2|nord per non attirare i +2|bulldozer ... + +#12 +1|Obbiettivo : +1| +1|Tre Blupi devono raggiungere +1|il Blupi isolato su un'isola lontana +1|in direzione nord-ovest. + +@12 +1|Indizi : +1| +1|Costruisci un capanno da giardino +1|e coltiva pomodori. +1| +1|Produci della dinamite con i +1|fiori blu che troverai +1|a nord-est. + +2|Trasporta in seguito questa +2|dinamite verso l'isola che si +2|trova abbastanza lontano a +2|ovest. +2|Attenzione: il sentiero che passa a +2|sud nasconde due virus non molto +2|pericolosi ... + +#13 +1|Obbiettivo : +1| +1|Sbarazzarsi dei sei ragni. +1| +1|Per i primi quattro, la cosa +1|è abbastanza semplice, ma per gli +1|ultimi due, dovrai ricorrere a dei +1|trucchi ... + +2|Trucco : +2| +2|Trova il modo di produrre del +2|veleno nel laboratorio. + +@13 +1|Indizi : +1| +1|I primi quattro ragni vengono +1|catturati con delle trappole +1|costruite cogliendo dei fiori +1|e trasformandoli poi in trappole +1|collose in laboratorio. +1|Le trappole devono essere messe +1|vicino ai ragni. + +2|Gli ultimi due vengono avvelenati +2|trasformando i pomodori +2|in veleno con l'aiuto del +2|laboratorio ... +2|Per fare ciò sarà necessario +2|costruire un ponte per consentire +2|di trasportare i pomodori sino +2|al laboratorio. + +#14 +1|Obbiettivo : +1| +1|Blupi deve semplicemente tornare +1|nella sua casa ... + +@14 +1|Indizi : +1| +1|Sonda il terreno costituito da +1|piccoli sassi alla ricerca di ferro. +1|Posiziona in seguito delle assi +1|nel posto indicato con la bandierina +1|e costruisci una miniera di ferro. +1| +1|Taglia una roccia per costruire +1|una fabbrica che ti consentirà di +1|sfruttare il ferro ... + +2|Prendi una bomba poi salta nella +2|jeep e dirigiti verso est. La jeep +2|ti protegge dai bulldozer. +2| +2|Quando giungi vicino alla palizzata +2|devi scendere rapidamente dalla +2| jeep, posizionare e far esplodere +2|la bomba, risalire sulla jeep +2|e allontanarti ... + +#15 +1|Obbiettivo : +1| +1|Un solo Blupi deve raggiungere +1|la casa situata a nord-est. + +2|Per fare ciò sarà necessario +2|distruggere le numerose +2|postazioni nemiche. + +@15 +1|Indizi : +1| +1|Costruisci un capanno da giardino +1|e due torri di protezione sulle +1|lastre grigie. +1| +1|Costruisci un ponte per raggiungere +1|l'isola ad est. Cogli vari tipi di +1|fiori che riporterai al campo base. + +2|Costruisci un laboratorio poi +2|produci della dinamite e delle +2|trappole collose. Proteggi l'interno +2|del campo con le trappole e +2|l'esterno con la dinamite. +2| +2|Quando ritieni di aver prodotto +2|trappole e dinamite a sufficienza +2|spedisci un piccolo commando +2|verso nord-est per distruggere +2|il campo nemico ... + +#16 +1|Situazione : +1| +1|Blupi si è smarrito in una regione +1|arida e priva di alberi. + + +2|Obbiettivo : +2| +2|I due Blupi devono rientrare +2|al villaggio nelle loro case ... + +@16 +1|Indizi : +1| +1|Trova la miniera di ferro a +1|nord-est poi taglia una roccia +1|per costruire una fabbrica. +1| +1|Costruisci una bomba a scoppio +1|ritardato e due Jeep. Parti alla +1|ricerca del campo nemico a +1|sud-ovest. + +2|In seguito fai saltare la barriera +2|che circonda il campo nemico +2|cercando di far saltare al tempo +2|stesso il bulldozer. +2| +2|Scendi verso sud alla ricerca +2|dell'unico albero e costruisci un +2|teletrasporto ... + +#17 +1|Obbiettivo : +1| +1|I cinque Blupi devono raggiungere +1|ognuno una casa. + +2|Attenzione, una casa si trova +2|dietro il campo nemico ! + + +Trucco : +E' possibile selezionare +diversi Blupi contemporaneamente +mantenendo premuto il tasto +Maiuscolo e cliccando al tempo +stesso sui Blupi. + +@17 +1|Indizi : +1| +1|Un Blupi può immediatamente +1|raggiungere la casa sull'isola +1|a ovest. Gli altri quattro +1|devono fuggire rapidamente dai +1|bulldozer partendo verso +1|nord-ovest. + +2|Abbastanza lontano in direzione +2|nord-ovest raggiungerai il +2|villaggio circondato da palizzate. +2| +2|A nord del villaggio si trova +2|una zona ricca di ferro ... +2| +2|Costruisci un'imbarcazione e parti +2|verso nord-est con una bomba a +2|scoppio ritardato ... + +#18 +1|Situazione : +1| +1|Mentre Blupi coglieva +1|tranquillamente dei fiori, +1|si è poco a poco allontanato +1|da casa sua. Ora si è smarrito +1|in una regione infestata dai +1|nemici. + + + + + +2|Obbiettivo : +2| +2|Blupi deve fuggire e trovare un +2|modo per tornare a casa sua. + +@18 +1|Indizi : +1| +1|Trova la distesa d'acqua che si +1|trova a ovest e costruisci +1|un'imbarcazione. E' necessario +1|prestare molta attenzione ai +1|numerosi virus ... +1| +1|Con l'imbarcazione è sufficiente +1|fare qualche metro per +1|oltrepassare il muro di divisione. +1|Sbarca allora sulla riva +1|superiore. + +2|La casa non è più molto lontana ... +2|ma è necessario evitare qualche +2|bulldozer ! + +#19 +1|Situazione : +1| +1|Quattro bulldozer terrorizzano +1|il villaggio di Blupi. + + +2|Obbiettivo : +2| +2|Eliminare i bulldozer ... + +@19 +1|Indizi : +1| +1|Chiedi a un Blupi di estrarre +1|del ferro e di costruire poi una +1|armatura. Questa ti proteggerà +1|dal fuoco. +1| +1|Parti verso est e costruisci una +1|barca. Prendi il largo e cerca +1|un'altra isola con un albero. +2|Abatti l'albero poi riporta la legna +2|che hai ottenuto su un'isola più +2|grande. Costruisci un teletrasporto +2|che ti porterà all'interno +2|dell'armeria. +2| +2|Posiziona qualche candelotto di +2|dinamite attorno al muro e fallo +2|saltare. Con la dinamite rimasta +2|puoi andare a eliminare i +2|bulldozer ! + +#20 +1|Obbiettivo : +1| +1|Distruggere tutte le postazioni +1|nemiche. + +@20 +1|Indizi : +1| +1|Produrre più dinamite possibile, +1|più trappole possibili, ecc ... +1|prima di far saltare la barriera +1|che circonda il campo nemico ... + +#21 +1|Situazione : +1| +1|Blupi è stato catturato dal +1|robot cattivo. +1|Ora è tenuto prigioniero +1|nel campo nemico. + + + +2|Obbiettivo : +2| +2|Blupi deve fuggire ... +2|e tornare a casa sua. + +@21 +1|Indizi : +1| +1|Prendi la dinamite a nord-est. +1|Posizionala in seguito contro una +1|barriera blu di fronte a un +1|passaggio tra le rocce. Il bulldozer +1|arriverà e farà esplodere la +1|dinamite e la barriera. + +2|Fuggi allora verso est, sino al fiume. +2|Costruisci una barca con delle assi. +2|Il secondo cumulo di assi servirà +2|a costruire una seconda barca +2|più avanti. Prima di ciò, sarà +2|necessario sbarazzarsi del +2|folgoratore con la trappola +2|collosa e costruire una bomba a +2|scoppio ritardato per far saltare +2|la barriera blu a est. + +#22 +1|Obbiettivo : +1| +1|1) Costruire delle barche. +1| +1|2) Esplorare tutte le isole. + +2|3) Distruggere tutte le +2| postazioni nemiche. + +@22 +1|Indizi : +1| +1|L'isola a nord-est contiene del +1|minerale di ferro. + +2|L'isola a est dispone di tutto +2|quanto serve per produrre della +2|dinamite e delle trappole collose. + +#23 +1|Situazione : +1| +1|Blupi è un gran curiosone: dopo +1|avere osservato il robot, per lungo +1|tempo, si è accorto di essersi +1|smarrito ... + + +2|Obbiettivo : +2| +2|Far arrivare dei rinforzi poi +2|distruggere tutti i nemici ! + +@23 +1|Indizi : +1| +1|Il Blupi isolato deve allontanarsi +1|dal robot e andare verso ovest. +1|Sarà necessario spaccare una +1|roccia per raggiungere il +1|deposito di legna, poi costruire +1|un teletrasporto. + +2|Con il secondo gruppo di Blupi, +2|sarà necessario costruire una +2|barca, trovare la bomba a +2|nord-est e far saltare la +2|barriera a sud. Ciò consentirà +2|di riportare la legna sull'isola +2|di partenza e di costruire un +2|teletrasporto per raggiungere +2|e aiutare il Blupi smarrito ... + +#24 +1|Situazione : +1| +1|La regione è infestata dai nemici. +1| + + +2|Obbiettivo : +2| +2|Eliminare tutti i nemici ... + +@24 +1|Indizi : +1| +1|Fuggi verso sud-est per evitare +1|l'incendio, poi costruisci una barca +1|con il solo albero di cui disponi. +1| +1|All'interno del campo trincerato +1|troverai del ferro. + +2|A nord del campo, vicino a un +2|piccolo lago, troverai delle uova ... + + +#25 +1|Da qualche tempo Blupi sospetta +1|dell'esistenza di uno strano +1|materiale portato sul suo +1|pianeta dal robot : +1| +1| il Platinium ... +1| +1|Questo materiale, che si trova +2|vicino al razzo del robot, +2|consentirebbe l'accesso alla +2|tecnologia nemica. +2| + +2|Obbiettivo : +2| +2|Riporta un cubo di Platinium +2|sulle lastre tratteggiate. + +@25 +1|Indizi : +1| +1|Elimina i due bulldozer con le +1|trappole collose. Costruisci una +1|barca a nord del primo campo +1|nemico poi prendi il largo con +1|una bomba a scoppio ritardato +1|in direzione est. + +2|Cerca una strada tra le rocce e +2|scendi verso sud. Il campo nemico +2|con il razzo si trova a est. Sarà +2|necessario far saltare una barriera +2|per prendere il Platinium. +2| +2|Riporta in seguito il Platinium nel +2|campo di partenza. + +#26 +1|Il cubo di Platinium consente +1|l'accesso alla tecnologia nemica +1|se utilizzato correttamente. + +2|Obbiettivo : +2| +2|Aiuta Blupi a ritrovare la sua +2|casa ... + +@26 +1|Indizi : +1| +1|Costruisci un robot-aiutante con +1|il cubo di Platinium in fabbrica. +1|Costruisci inoltre una bomba a +1|scoppio ritardato. +1| +1|Prendi la bomba con il robot che +1|potrà attraversare il campo +1|nemico a ovest senza problemi. +2|Fai saltare la barriera a nord, +2|poi prendi dei pomodori che +2|consentiranno di nutrire il Blupi +2|rimasto nel campo base. +2| +2|Deponi i pomodori appena prima +2|del primo salto. + +#27 +1|Situazione : +1| +1|Con gran faccia tosta, il robot +1|ha posto la sua base proprio +1|vicino al villaggio di Blupi. + + + +2|Obbiettivo : +2| +2|Raggiungere il campo nemico +2|poi distruggere tutto ... + +@27 +1|Indizi : +1| +1|Costruisci il più rapidamente +1|che puoi un teletrasporto, al fine +1|di raggiungere l'isola con le uova ... +1|Costruisci due torri di protezione +1|dove si trovano i cumuli di pietre. +1|Costruisci in seguito delle palizzate +1|a sinistra e a destra delle torri. + +2|Ora puoi tirare un sospiro di +2|sollievo ! +2| +2|Hai due possibilità per raggiungere +2|il campo nemico a nord : +2| +2|1) delle barche +2|2) un ponte +2| +2|A te la scelta ... + +#28 +1|Situazione : +1| +1|Blupi è un gran distratto. +1|Infatti ha costruito un muro +1|intorno alla sua casa, per +1|sbaglio ... + + +2|Obbiettivo : +2| +2|Blupi deve semplicemente +2|rientrare a casa ... + +@28 +1|Indizi : +1| +1|In un'isoletta a nord si trovano +1|molte uova. +1| +1|Sarà necessario attraversare il +1|campo nemico in fretta evitando +1|i bulldozer, da nord a sud, al +1|fine di cogliere i fiori blu. +2|Un altro Blupi in barca potrà +2|venire a prenderli per produrre +2|della dinamite ... +2| +2|Le uniche rocce che possono +2|essere usate sono a sud del +2|campo nemico, fuori dal muro +2|di cinta. + +#29 +1|Situazione : +1| +1|Lo spazio libero è sempre più +1|occupato dal robot e dai suoi +1|scagnozzi. + + + + +2|Obbiettivo : +2| +2|Blupi deve costruire il suo villaggio +2|prevedendo delle difese efficaci. +2|Sarà necessario in seguito passare +2|all'attacco ed eliminare tutti i +2|nemici ... + +@29 +1|Indizi : +1| +1|Costruire delle torri a nord-est, +1|a nord-ovest e a sud-est. +1|Le rocce si trovano a nord-ovest. +1| +1|Non abbattere gli alberi +1|intorno alle palizzate. Questi +1|migliorano le difese contro +1|le bombe saltatrici ! + +2|I fiori verdi a est consentono di +2|produrre delle trappole collose +2|per migliorare la difesa del +2|villaggio ! +2| +2|Estrarre del ferro a sud-ovest +2|e costruire delle bombe e delle +2|armature ... + +#30 +1|Situazione : +1| +1|Questa guerra non può più durare. +1|Un accordo è stato concluso con +1|l'ultimo robot sopravvissuto. Blupi +1|lo aiuta a raggiungere il suo +1|razzo. E questo s'impegna a +1|lasciare definitivamente il +1|pianeta Blupi ... + + + + +2|Obbiettivo : +2| +2|Preparare il cammino affinché il +2|robot possa raggiungere il suo +2|razzo. Offeso per aver perso, il +2|robot non si muoverà fintanto +2|che il sentiero non verrà +2|terminato ! + +@30 +1|Indizi : +1| +1|Spaccare della roccia a sud-est. +1|Abbattere un albero e costruire +1|una barca. Partire con la barca +1|alla ricerca di un'isola a nord-est. +1|Cercare del ferro poi costruire +1|una miniera e una fabbrica. +2|Costruire una bomba che +2|consentirà di far saltare le +2|barriere che circondano il robot. +2| +2|Non rimarrà altro che costruire +2|un ponte affinché il robot possa +2|raggiungere il suo razzo ... diff --git a/resources/data/pl/stories.blp b/resources/data/pl/stories.blp new file mode 100644 index 0000000..e69574f --- /dev/null +++ b/resources/data/pl/stories.blp @@ -0,0 +1,1100 @@ +$1 +1|Cel: +1| +1|Każdy Blupi musi trafić do domu. By +1|to osiągnąć, zawsze używaj lewego +1|przycisku myszy. + +2|1) Kliknij na Blupiego +2| Niebieski pierścień który się pojawi +2| oznacza że jest on zaznaczony. +2| +2|2) Kliknij na jego dom +2| +2|3) Kliknij na przycisk "Idź" +2| +2|4) Powtórz czynności dla +2| kolejnego Blupiego. + + + + + + + + + + Po przeczytaniu tych instrukcji + kliknij na kostkę poniżej. + +$2 +Tutaj mamy drugie ćwiczenie, +nieco bardziej zaawansowane: + +1|Przenieś oba stosy desek na +1|nawierzchnię docelową po +1|prawej stronie. +1| +1|Blupi musi jeść pomidory by +1|mieć dość sił by wykonać +1|to zadanie. Zwróć uwagę na fakt +2|że gdy je, czerwona obwódka wokół +2|jego stóp zmienia się w niebieską. +2|To określa jego poziom siły. +2| +2| czerwony = zmęczony +2| niebieski = w pełni sił + + + +Podpowiedź: +By przewinąć ekran, możesz +zbliżyć kursor myszy do krawędzi +ekrany, lub wykorzystać strzałki +na klawiaturze. + +$3 +1|Znajdź jaja ... +1| +1|Po umieszczeniu ich w +1|wylęgarce, pojawi się +1|czterech nowych Blupich. + + + + + + +Podpowiedź: +Najefektywniej jest grać +używając myszy w jednej ręce +podczas gdy druga ręka +spoczywa na strzałkach klawiatury. + +$4 +1|Cel: +1| +1|Czterech Blupich musi trafić do +1|domów na północnych wyspach. + +2|Każdy Blupi musi jeść by mieć +2|dość siły by skoczyć. + +$5 +1|Cel: +1| +1|Umieść 2 stosy pomidorów +1|na nawierzchni docelowej. + +2|By to osiągnąć musisz ściąć drzewo +2|wybudować szopkę ogrodową, zasadzić +2|pomidory i przenieść 2 stosy pomidorów +2|na nawierzchnię docelową. +2|(nie możesz ich zjeść). + +$6 +1|Cel: +1| +1|Każdy Blupi musi trafić do domu +1|na małej wyspie. +1|Niestety, jedzenia starczy +1|dla tylko jednego Blupiego. +2|Musisz wymyślić sposób na +2|wyprodukowanie wystarczającej ilości +2|jedzenia dla wszystkich. +2| +2|Na szczęście, wyspa jest +2|obfita w drewno. + +#h1 +Blupi żył sobie spokojnie na swojej +wyspuegdy nagle wielki meteoryt +spadł na suchy region. + +Po chwili Blupi odkrył że jego +plony są niszczone przez pająki. + + +Pomimo bycia w pełni sprawnym +fizycznie Blupi zaczął kaszleć +i złapał infekcję. + +#h2 +Co się dzieje ? + +Cóż, ten dziwny meteoryt to tak +naprawdę statek kosmiczny +transportujący pewnego robota. + +Ten robot buduje fabryki, które +produkują wrogów. + +Blupi musi wykorzystać wszelkie +naturalne zasoby by pozbyć się +intruzów. + +#1 +Uderzenie statku kosmicznego +wywołało pożar lasu. Wioska +Blupich jest zagrożona. + +1|Cel: +1| +1|Zapobiegnij spaleniu wioski. +1|Jest tylko jedna metoda by to +1|zrobić: Zetnij trochę drzew po +1|lewej stronie. + + + + + + +2|Podpowiedź: +2| +2|Jeśli Blupi jest ukryty za drzewami, +2|naciśnij klawisz Spacji. Spowoduje +2|to tymczasowe wyświetlanie drzew +2|jako przezroczyste. + +@1 +1|Solucja: +1| +1|Każ Blupiemu po lewej ściąć +1|trochę drzew. Pozostali Blupi +1|powinni wynosić deski z dala +1|od ognia. + +#2 +1|Sytuacja: +1| +1|Blupi jest daleko od swojej wioski +1|i się zgubił. Teraz musi się +1|zorganizowaćzanim znajdzie +1|swoją wioskę. +1| +1|1) Zbuduj szopkę ogrodową i zasadź +1| pomidory. + +2|2) Zbuduj wylęgarkę by uzyskać +2| wsparcie +2| +2|3) Nakarm czterech Blupich +2| i ruszaj znaleźć wioskę. +2| + + +2|Uważaj: +2| +2|Wydarzy się coś niespodziewanego. + + +@2 +1|Solucja: +1| +1|Na początek musisz zbudować +1|dwie palisady na północy +1|by powstrzymać pająka przed przyjściem. +1|Dopiero wtedy wybuduj +2|szopkę ogrodową i sadź +2|pomidory w spokoju. +2| +2|By trafić do wioski +2|musisz iść na wschód. + + +#3 +1|Cel: +1| +1|Uchroń 4 zagubionych Blupich +1|przed spaleniem +1| +1|Ukończ mur. + + + + +2|Uwaga: +2| +2|Ziemia wyścielona jest mchem +2|który jest bardzo łatwopalny. + +@3 +1|Solucja: +1| +1|1) Wykuj skałę. +1| Mniejsze kamienie są szybsze +1| do wykucia + +2|2) Zbuduj mur pomiędzy dwoma +2| istniejącymi murami +2| +2|3) Poczekaj aż ogień wygaśnie. + +#4 +1|Cel: +1| +1|Czterech Blupich musi wejść +1|na nawierzchnię docelową. + +@4 +1|Solucja: +1| +1|1) Zetnij drzewo +1| +1|2) Przenieś deski na +1| brzeg. +1| +1|3) Zbuduj most w kierunku +1| dwóch zmęczonych Blupich. + +2|4) Powtórz operację +2| trzykrotnie. +2| +2|Zmęczeni Blupi mogą teraz +2|przejść przez most i dotrzeć +2|do nawierzchni docelowej. + +#5 +1|Pułapka: +1|Uwaga, ziemia gdzie więzione +1|są Blupi jest łatwopalna +1|a ogień jest coraz bliżej. +1| +1|Cel: +1|Wytrzymaj aż do +1|wygaszenia pożaru. + +2|Uwaga: +2|Budowa muru to bardzo +2|męcząca praca dla Blupiego, +2|on zginie po skończeniu pracy! + + + +Podpowiedź: +Jeśli gra jest dla ciebie za wolna +wciśnij klawisz F6 by przyspieszyć +rozgrywkę. Klawisz F5 przywraca +zwykłą prędkość gry. + +@5 +1|Solucja: +1| +1|Musisz zbudować 4 kawałki muru +1|na szarej nawierzchni. Musisz +1|ściąc 2 drzewa by zbudować +1|szopkę ogrodową oraz +1|wylęgarkę. + +2|Gdy mury będą gotowe +2|musisz poczekać aż ogień +2|wygaśnie. + +#6 +1|Cel: +1| +1|Zbliża się niebezpieczeństwo: +1|zabezpiecz obóz tak szybko jak +1|to możliwe za pomocą 4 wież. + +2|Następnie będziesz mógł +2|iść na nawierzchnię docelową +2|na południowym wschodzie. + + + + + + + + + +Podpowiedź: + +Możesz zaznaczyć wielu Blupich +naraz jeśli przytrzymasz klawisz +Shift podczas klikania na +każdego Blupiego. + + +@6 +1|Solucja: +1| +1|Musisz kazać czterem Blupim +1|szybko skuć skałę. +1|Mniejsze skały są łatwiejsze +1|do skucia. +1| +1|Przenieś 4 sterty skał +1|na szary teren i zacznij +1|budować wieże ochronne. + +2|Poczekaj aż wirusy zostaną +2|zneutralizowane przez wieże. +2| +2|Pozostali Blupi mogą +2|spokojnie udać się w +2|kierunku nawierzchni docelowych +2|na południowym wschodzie. + +#7 +1|Cel: +1| +1|Czterech Blupich musi dotrzeć +1|do nawierzchni docelowej. +1|Musisz uważać na +1|najdalszego Blupiego. + + + + + +2|Uważaj: +2| +2|Ziemia nie jest odpowiednia +2|do sadzenia pomidorów. + +@7 +1|Solucja: +1| +1|Każ Blupim podnieść pomidory +1|przez co pająki nie mogą +1|ich zjeść. +1| +1|Jeden z Blupich musi +1|przeskoczyć na wschodnią +1|wyspę i wybudować most +1|prowadzący do nawierzchni docelowej. + +2|Przynieś pomidory do +2|zmęczonego Blupiego, żeby +2|on mógł je zjeść. + +#8 +1|Cel: +1| +1|Uchroń jednego lub dwóch Blupich +1|przed zarażeniem i znajdź +1|lekarstwo dla zarażonych. +1| +1|Następnie zaprowadź Blupich +1|do domu. + + + + + + + +2|Podpowiedź: +2| +2|Zbuduj laboratorium. + +@8 +1|Solucja: +1| +1|Laboratorium buduje się z +1|kamieni. W nim możesz przemienić +1|bukiet żółtych kwiatów +1|na lekarstwo dla chorych +1|Blupich. + +2|Musisz zbudować most by przynieść +2|lekarstwo zarażonym Blupim. +2| +2|Domy są na południowym wschodzie. + +#9 +1|Cel: +1| +1|Znajdź sposób na przekroczenie +1|lodowego pola. +1| + + + + + + +2|Notka: +2| +2|Blupi może chodzić po lodzie. +2|Jednak z uwagi na poślizg +2|straci przy tym mnóstwo sił. + +@9 +1|Solucja: +1| +1|Dwie wieże muszą zostać zbudowane +1|by chronić Blupich przed pająkami +1| +1|Musisz zbudować szopkę ogrodową +1|oraz wylęgarkę by pozwolić +1|jajkom wykluć się. + +2|Blupi traci dużo sił podczas +2|przekraczania lodu. +2|Musisz więc kazać mu podnieść +2|pomidory zanim wejdzie na lód. + +#10 +1|Cel: +1| +1|Dotrzyj na wyspę na północnym +1|zachodzie i wysadź palisadę +1|w powietrze. + +2|Następnie umieść czterech +2|Blupich na nawierzchni docelowej + +@10 +1|Solucja: +1| +1|Zbuduj most prowadzący do +1|uwięzionych Blupich. To umożliwi +1|skucie skał które posłużą do +1|budowy laboratorium. +1| +1|Niebieskie kwiaty są na +1|południowym wschodzie. +1|W laboratorium można wykorzystać +1|je do produkcji dynamitu. + +2|Użyj dynamitu by zniszczyć +2|palisadę blokującą drogę +2|więźniom. +2| +2|Najpierw jednak musisz +2|kazać im odsunąć się od palisady +2|by nie stała im się krzywda. + +#11 +1|Cel: +1| +1|Idź do domów na północnym +1|wschodzie. Bądź ostrożny, +1|one są silnie chronione. + +@11 +1|Solucja: +1| +1|Zbuduj most w kierunku +1|wyspy na północnym zachodzie +1|i stwórz przynajmniej +1|4 paczki dynamitu. + +2|Połóż dynamit na północy +2|w miarę blisko buldożerów +2| +2|Dopóki nie zbierzesz dość +2|dynamitu nie idź za daleko, +2|inaczej zwabisz buldożery. + +#12 +1|Cel: +1| +1|Trzech Blupich musi dotrzeć do +1|samotnego Blupiego na wyspie +1|na północnym zachodzie. + +@12 +1|Solucja: +1| +1|Wybuduj szopkę ogrodową +1|i zasadź pomidory. +1| +1|Stwórz dynamit z niebieskich +1|kwiatów rosnących na północnym +1|wschodzie. + +2|Zanieś dynamit na wyspę +2|położoną na zachodzie. +2| +2|Uważaj, po drodze kryją się +2|2 wirusy. + +#13 +1|Cel: +1| +1|Pozbądź się 6 pająków. +1| +1|Pierwsza czwórka będzie łatwa +1|Pozostała dwójka może sprawić +1|więcej kłopotów. + + + + + + +2|Podpowiedź: +2| +2|Odkryj jak stworzyć truciznę +2|w laboratorium. + +@13 +1|Solucja: +1| +1|Pierwsze cztery pająki można +1|złapać w pułapki z zielonych +1|kwiatów przetworzonych w +1|laboratorium. +1| +1|Pułapki muszą być położone +1|niedaleko pająków. + +2|Ostatnia dwójka musi być +2|zatruta pomidorami które +2|zostały zatrute w +2|laboratorium. +2| +2|Zbuduj most by zanieść +2|pomidory do laboratorium. + +#14 +1|Cel: +1| +1|Blupi musi trafić do domu. +1| + +@14 +1|Solucja: +1| +1|Szukaj żelaza pod małymi +1|kamyczkami. Połóż deski pod +1|flagą i zbuduj kopalnię. +1| +1|Skuj skałę i zbuduj warsztat +1|w którym zrobisz użytek +1|z żelaza. + +2|Weź bombę, wsiądź do Jeepa +2|i jedź na wschód. Jeep +2|ochroni cię przed +2|buldożerami. +2| +2|Gdy dotrzesz do palisady, +2|musisz szybko wysiąść z auta, +2|upuścić bombę, uruchomić ją, +2|wrócić do samochodu i wiać +2|gdzie pieprz rośnie. + +#15 +1|Cel: +1| +1|Jeden z Blupich musi dotrzeć +1|do domu na północnym wschodzie. + +2|By to osiągnąć, musisz +2|zniszczyć wiele wrogich +2|instalacji. + +@15 +1|Solucja: +1| +1|Zbuduj szopkę ogrodową i wieże +1|ochronne na szarym terenie. +1| +1|Zbuduj most by połączyć wyspę +1|na wschodzie. Zbierz kwiaty +1|i przynieś je z powrotem do bazy. + +2|Zbuduj laboratorium, stwórz +2|dynamit i klejące pułapki. +2|Chroń obozu od środka za pomocą +2|klejących pułapek i od zewnątrz +2|za pomocą dynamitu. +2| +2|Gdy będziesz mieć wystarczająco +2|dużo dynamitu i pułapek wyślij +2|mały oddział na północny wschód +2|by zniszczyć przeciwny obóz. + +#16 +1|Sytuacja: +1| +1|Blupi zgubił się na jałowej +1|części planety, na której nie ma +1|drzew. + + + +2|Cel: +2| +2|Obaj Blupi muszą wrócić do +2|swojej wioski. + +@16 +1|Solucja: +1| +1|Znajdź kopalnię na północnym +1|wschodzie, skuj skałę by zbudować +1|warsztat, zbuduj bombę zegarową +1|i 2 Jeepy i znajdź przeciwny obóz +1|na południowym zachodzie. + +2|Wysadź barierę chroniącą wrogi obóz. +2|Postaraj się wysadzić przy tym +2|również buldożery. +2| +2|Idź na południe i poszukać jedynego +2|drzewa i zbuduj z niego teleporter. + +#17 +1|Cel: +1| +1|Pięciu Blupich musi znaleźć dom + +2|Uwaga, jeden z domów znajduje się +2|za wrogim obozem. + + + + + + + + + + + + +Wskazówka: + +Możesz zaznaczyć wielu Blupich +jednocześnie przez trzymanie +wciśniętego klawisza Shift podczas +klikania na każdym Blupim. + +@17 +1|Solucja: +1| +1|Blupi może iść do domu na zachodniej +1|części wyspy. Pozostała czwórka musi +1|iść dość szybko by nie paść ofiarą +1|buldożerów. Blupi muszą iść na +1|północny wschód. + +2|Nieco dalej znajdziesz wioskę +2|otoczoną palisadami. +2| +2|W północnej części wioski +2|są duże pokłady żelaza. +2| +2|Stwórz łódź i podążaj na +2|północny wschód z bombą zegarową. + +#18 +1|Sytuacja: +1| +1|Gdy Blupi zbierał kwiaty, +1|niepostrzeżenie oddalił się +1|od swojego domu. Teraz jest +1|zagubiony w regionie +1|pełnym wrogów. + + + + + +2|Cel: +2| +2|Blupi musi uciec i znaleźć +2|drogę powrotną do domu. + +@18 +1|Solucja: +1| +1|Znajdź zbiornik wodny na zachodzie +1|Stwórz łódź. Uważaj na wirusy +1|kręcące się w okolicy. + + +2|W łodzi możesz ominąć mur +2|i wyokrętować na brzegu rzeki. +2| +2| +2|Dom jest już niedaleko. +2|Musisz jednak uważać na buldożery. + + +#19 +1|Sytuacja: +1| +1|Cztery buldożery zagrażają +1|wiosce Blupiego. + + + + + +2|Cel: +2| +2|Zniszcz buldożery + +@19 +1|Solucja: +1| +1|Każ Blupiemu wydobywać żelazo +1|i zbudować zbroję. Ochroni go +1|ona przed ogniem. +1| +1|Idź na wschód i zbuduj łódź. +1|Wejdź na pokład i poszukaj innej +1|wyspy z drzewami. Zetnij drzewo +1|i przetransportuj deski na większą +2|wyspę. Stwórz teleporter. Przeniesie +2|cię on do zbrojowni. +2| +2| +2|Umieść trochę dynamitu niedaleko +2|muru otaczającego teren i wysadź go. +2|Za pomocą reszty dynamitu możesz +2|zniszczyć buldożery. + +#20 +1|Cel: +1| +1|Zniszcz wszystkie wrogie instalacje. +1| + +@20 +1|Solucja: +1| +1|Stwórz tyle dynamitu, pułapek itd. +1|ile to tylko możliwe zanim zniszczysz +1|bariery chroniące obóz. + +#21 +1|Sytuacja: +1| +1|Blupi został porwany przez +1|roboty. Teraz jest więźniem +1|w obozie robotów. + + + + + +2|Cel: +2| +2|Blupi musi uciec i znaleźć +2|drogę do domu. + +@21 +1|Solucja: +1| +1|Weź dynamit z północnego +1|wschodu. Połóż go obok nie- +1|bieskiej bariery od strony dziury +1|niedaleko skał. Przejeżdżający +1|buldożer spowoduje eksplozję. +1|To powinno zniszczyć barierę. + +2|Idź na wschód dopóki nie trafisz +2|na rzekę. Stwórz łódź z desek. +2|Będziesz potrzebować też drugiej +2|sterty desek by zbudować później +2|drugą łódź. Zanim to zrobisz, musisz +2|złapać paralizatora w klejącą pułapkę +2|i stworzyć bombę zegarową w celu +2|zniszczenia niebieskiej bariery +2|na wschodzie. + +#22 +1|Cele: +1| +1|1) Stwórz łódki. +1| +1|2) Eksploruj wszystkie wyspy. +1| +1|3) Zniszcz wszystkie wrogie +1|instalacje + +@22 +1|Solucja: +1| +1|Wyspa na północnym wschodzie +1|ma mnóstwo żelaza. + +2|Wyspa na wschodzie ma wszystko +2|co potrzebne by stworzyć dynamit +2|i klejące pułapki. + +#23 +1|Sytuacja: +1| +1|Blupi jest bardzo ciekawski: +1|śledził robota przez dłuższy +1|czas zanim uświadomił sobie +1|że się zgubił. + + + + + +2|Cel: +2| +2|Zorganizuj wsparcie i zniszcz +2|wroga! + + +@23 +1|Solucja: +1| +1|Samotny Blupi musi oddalić się +1|od robota i iść na zachód. Blupi +1|musi skuć skałę by mieć dostęp +1|do drzew a następnie stworzyć +1|teleporter. + + +2|Druga grupa Blupich musisz +2|zbudować łódź, znaleźć +2|bombę na północnym wschodzie, +2|a następnie wysadzić barierę +2|na południu. To da ci dostęp +2|do drewna które musisz przeniść +2|na poprzednią wyspę by zbudować +2|teleporter pozwalający ci na +2|uratowanie zagubionego Blupiego. + +#24 +1|Sytuacja: +1| +1|Region jest pełen wrogów. +1| + + + +2|Cel: +2| +2|Zniszcz wszystkich wrogów. + +@24 +1|Solucja: +1| +1|Idź na południowy wschód +1|by uciec przed pożarem i stwórz +1|łódź z jedynego ocalałego drzewa. +1| +1|W obozie znajdziesz trochę żelaza. + +2|Na północy obozu znajdziesz trochę +2|jaj. + +#25 +1|Blupi podejrzewa że roboty +1|przyniosły coś dziwnego na +1|jego planetę: +1| +1| Platynę.... +1| +1|Platyna, leżąca obok wrogiej +2|rakiety da mu dostęp do +2|technologii przeciwnika. +2| + + +2|Cel: +2|Dostarcz kostkę platyny +2|na nawierzchnię docelową. + +@25 +1|Solucja: +1| +1|Zneutralizuj 2 buldożery za pomocą +1|klejących pułapek. Stwórz łódź na +1|północ od pierwszego wrogiego obozu, +1|zaokrętuj razem z bombą zegarową +1|i udaj się na wschód. +1| +1|Znajdź ścieżkę między skałami +1|prowadzącą na południe. +2|Wrogi obóz z rakietą jest daleko +2|jest daleko na wschodzie. Musisz +2|wysadzić barierę by móc dotrzeć +2|do platyny. +2| +2| +2|Przynieś platynę do własnego +2|obozu. + +#26 +1|Kostka platyny daje ci dostęp +1|do wrogiej technologii, więc +1|wykorzystaj ją dobrze. + + + + + +2|Cel: +2| +2|Pomóc Blupiemu znaleźć swój dom. + +@26 +1|Solucja: +1| +1|Stwórz robota pomocnika za +1|pomocą kostki platyny w fabryce +1|i stwórz bombę zegarową. +1| +1|Weź robota i bombę. Robot może +1|przekroczyć wrogi obóz na zachodzie +1|bez przeszkód. Wysadź barierę na +2|północy i weź pomidory by nakarmić +2|Blupiego w swoim obozie. +2| +2|Połóż pomidory na ziemi zanim +2|wykonasz skok. + +#27 +1|Sytuacja: +1| +1|Robot miał czelność założyć +1|swoją osadę niedaleko wioski +1|Blupich. + + + + +2|Cel: +2| +2|Znajdź wrogi obóz +2|i zniszcz wszystko. + +@27 +1|Solucja: +1| +1|Stwórz teleporter tak szybko +1|jak to możliwe, dzięki czemu +1|uzyskasz dostęp do wyspy +1|z jajami. Zbuduj dwie wieże +1|ochronne w miejscu sterty +1|kamieni. Zbuduj palisady po +1|lewej i prawej stronie każdej +1|wieży. + +2|Teraz możesz złapać oddech! +2| +2|Masz dwie możliwości dotarcia +2|do wrogiego obozu na północy, +2|popłynąć tam łódką lub +2|zbudować most. +2| +2|Wybór należy do ciebie! + +#28 +1|Sytuacja: +1| +1|Podczas budowy swojego +1|domu Blupi strzelił gafę: +1|zbudował wokół niego mur. + + + + + +2|Cel: +2| +2|Blupi musi dotrzeć do swojego +2|domu. + +@28 +1|Solucja: +1| +1|Mała wyspa na północy +1|ma wiele jaj. +1| +1|Musisz przekroczyć wrogi obóz +1|tak szybko jak to możliwe +1|by uniknąć spotkania z buldo- +1|żerami zmierzających z północy +1|oraz południa, żebyś mógł zebrać +2|niebieskie kwiaty. +2|Inny Blupi może je zabrać by +2|stworzyć dynamit. +2| +2|Jedyne skały które mogą być +2|wykorzystane są na południe +2|wrogiego obozu, na zewnątrz +2|muru obronnego. + +#29 +1|Sytuacja: +1| +1|Robot i jego akoloci zajmują +1|coraz więcej wolnej przestrzeni. + + + + + +2|Cel: +2| +2|Blupi musi zbudować wioskę +2|i opracować dobrą taktykę +2|obronną. +2| +2|Następnie zaatakuje i wyeliminuje +2|wszystkich wrogów. + +@29 +1|Solucja: +1| +1|Blupi musi zbudować wieże +1|ochronne na północno-zachodniej +1|stronie, północno wschodniej +1|oraz południowo wschodniej. +1|Wszystkie skały są na północno-. +1|zachodniej stronie. +1| +1|Nie ścinaj drzew przy palisadach. +1|Mogą okazać się przydatne +1|w starciu ze skaczącymi bombami! + +2|Zielone kwiaty na wschodzie pozwolą +2|ci stworzyć klejące pułapki by obronić +2|wioskę. +2| +2|Wydobądź żelazo na południowym +2|zachodzie i stwórz bomby i pancerze. + +#30 +1|Sytuacja: +1| +1|Czas zakończyć tą wojnę. +1|Blupi i ostatni z robotów osiągnęli +1|porozumienie: +1|Blupi pomoże robotom wrócić do +1|rakiety, w zamian roboty ostatec- +1|cznie opuszczą planetę Blupiego. + + + + +2|Cel: +2| +2|Przygotuj ścieżkę do rakiety +2|by umożliwić robotowi opuszczenie +2|planety. Porażka tak dotknęła +2|robota, że ten odmawia ruszenia się +2|z miejsca zanim ścieżka zostanie +2|ukończona. + +@30 +1|Solucja: +1| +1|Wykuj skałę na południowym +1|wschodzie. Zetnij drzewo i stwórz +1|łódź. Będąc w łodzi, poszukaj wyspy +1|na północnym wschodzie. Znajdź +1|żelazo, stwórz kopalnię i fabrykę. +1|Stwórz bombę za pomocą której +2|wysadzić bariery wokół robota. +2| +2|Teraz musisz tylko zbudować most +2|który zaprowadzi robota wprost +2|do jego rakiety. diff --git a/resources/image/little.png b/resources/image/little.png index 55a40e9..1b2d9ef 100644 Binary files a/resources/image/little.png and b/resources/image/little.png differ diff --git a/resources/image/text.png b/resources/image/text.png index ae88062..40f14bd 100644 Binary files a/resources/image/text.png and b/resources/image/text.png differ diff --git a/resources/linux/application.desktop.in b/resources/linux/application.desktop.in index 038b99c..cda0397 100644 --- a/resources/linux/application.desktop.in +++ b/resources/linux/application.desktop.in @@ -3,8 +3,8 @@ Version=1.0 Type=Application Name=@PB_PRODUCT_NAME@ GenericName=Video Game -Comment=@CPACK_PACKAGE_DESCRIPTION_SUMMARY@ -Exec=@APPIMAGE_EXEC@ -StartupWMClass=@APPIMAGE_EXEC_WM@ +Comment=@PB_DESCRIPTION@ +Exec=@PB_EXEC@ +StartupWMClass=@PB_EXEC@ Icon=@APPIMAGE_ICON_REF@ -Categories=Game; +Categories=Game;StrategyGame; diff --git a/resources/po/de.po b/resources/po/de.po index 3f872d5..c2267a5 100644 --- a/resources/po/de.po +++ b/resources/po/de.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-09-09 09:13+0200\n" -"PO-Revision-Date: 2017-09-09 09:13+0200\n" +"POT-Creation-Date: 2017-09-15 18:34+0200\n" +"PO-Revision-Date: 2017-10-04 23:30+0200\n" "Last-Translator: \n" "Language-Team: \n" "Language: de\n" @@ -548,6 +548,9 @@ msgstr "Auswahl der Musik" msgid "Music number 1" msgstr "Musik Nummer 1" +msgid "Music number 10" +msgstr "Musik Nummer 10" + msgid "Music number 2" msgstr "Musik Nummer 2" @@ -908,7 +911,7 @@ msgid "free slot" msgstr "frei" msgid "http://www.blupi.org info@blupi.org" -msgstr "" +msgstr "http://www.blupi.org info@blupi.org" #, c-format msgid "mission %d, time %d" diff --git a/resources/po/en_US.po b/resources/po/en_US.po index 8dc0d99..6c21e84 100644 --- a/resources/po/en_US.po +++ b/resources/po/en_US.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-09-09 09:13+0200\n" +"POT-Creation-Date: 2017-09-15 18:34+0200\n" "PO-Revision-Date: 2017-02-27 21:28+0100\n" "Last-Translator: \n" "Language-Team: \n" @@ -491,6 +491,9 @@ msgstr "" msgid "Music number 1" msgstr "" +msgid "Music number 10" +msgstr "" + msgid "Music number 2" msgstr "" diff --git a/resources/po/fr.po b/resources/po/fr.po index 6bbe451..90b0d59 100644 --- a/resources/po/fr.po +++ b/resources/po/fr.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-09-09 09:13+0200\n" -"PO-Revision-Date: 2017-09-09 09:13+0200\n" +"POT-Creation-Date: 2017-09-15 18:34+0200\n" +"PO-Revision-Date: 2017-10-04 23:29+0200\n" "Last-Translator: Mathieu Schroeter \n" "Language-Team: French \n" "Language: fr\n" @@ -543,6 +543,9 @@ msgstr "Choix de la musique" msgid "Music number 1" msgstr "Musique numéro 1" +msgid "Music number 10" +msgstr "Musique numéro 10" + msgid "Music number 2" msgstr "Musique numéro 2" @@ -900,7 +903,7 @@ msgid "free slot" msgstr "libre" msgid "http://www.blupi.org info@blupi.org" -msgstr "" +msgstr "http://www.blupi.org info@blupi.org" #, c-format msgid "mission %d, time %d" diff --git a/resources/po/it.po b/resources/po/it.po new file mode 100644 index 0000000..5886215 --- /dev/null +++ b/resources/po/it.po @@ -0,0 +1,917 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-09-29 10:21+0200\n" +"PO-Revision-Date: 2017-10-04 17:30+0200\n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.11\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid " - FFmpeg (LGPLv2.1)" +msgstr " - FFmpeg (LGPLv2.1)" + +msgid " - GNU/gettext and GNU/libiconv (GPLv3)" +msgstr " - GNU/gettext e GNU/libiconv (GPLv3)" + +msgid " - SDL2, SDL2_image and SDL2_mixer (zlib license)" +msgstr " - SDL2, SDL2_image e SDL2_mixer (zlib licensa)" + +msgid " - SDL_kitchensink (MIT)" +msgstr " - SDL_kitchensink (MIT)" + +msgid " - argagg (MIT)" +msgstr " - argagg (MIT)" + +msgid " - libasound (LGPLv2.1)" +msgstr " - libasound (LGPLv2.1)" + +msgid " - libcurl (MIT/X derivate)" +msgstr " - libcurl (MIT/X derivata)" + +msgid " - libpng (own license)" +msgstr " - libpng (licensa personale)" + +msgid " - libpulse (LGPLv2.1)" +msgstr " - libpulse (LGPLv2.1)" + +msgid " - zlib (own license)" +msgstr " - zlib (licensa personale)" + +msgid "(isolated tower)" +msgstr "(torre isolata)" + +msgid "" +"1: Cut down a tree \n" +"2: Build a bridge" +msgstr "" +"1: Abbatti un albero \n" +"2: Costruisci un ponte" + +msgid "" +"1: Cut down a tree \n" +"2: Make a boat" +msgstr "" +"1: Abbatti un albero \n" +"2: Costruisci una barca" + +msgid "" +"1: Cut down a tree \n" +"2: Make a palisade" +msgstr "" +"1: Abbatti un albero \n" +"2: Costruisci una palizzata" + +msgid "" +"1: Extract iron\n" +"2: Make a Jeep" +msgstr "" +"1: Estrai del ferro\n" +"2: Costruisci una Jeep" + +msgid "" +"1: Extract iron\n" +"2: Make a bomb" +msgstr "" +"1: Estrai del ferro\n" +"2: Costruisci una bomba" + +msgid "" +"1: Extract iron\n" +"2: Make an armour" +msgstr "" +"1: Estrai del ferro\n" +"2: Costruisci un'armatura" + +msgid "" +"1: Grow tomatoes\n" +"2: Eat" +msgstr "" +"1: Coltiva...\n" +"2: Mangia" + +msgid "" +"1: Make a bunch\n" +"2: Transform" +msgstr "" +"1: Fai un mazzo\n" +"2: Trasforma" + +msgid "" +"1: Take\n" +"2: Build a bridge" +msgstr "" +"1: Prendi\n" +"2: Costruisci un ponte" + +msgid "" +"1: Take\n" +"2: Build palisade" +msgstr "" +"1: Prendi\n" +"2: Costruisci una palizzata" + +msgid "" +"1: Take\n" +"2: Make a boat" +msgstr "" +"1: Prendi\n" +"2: Costruisci una barca" + +msgid "" +"1: Take\n" +"2: Transform" +msgstr "" +"1: Prendi\n" +"2: Trasforma" + +msgid "" +"1|Drop planks on striped \n" +"1|paving stones." +msgstr "" +"1|Posa delle assi \n" +"1|sulle lastre tratteggiate." + +msgid "" +"1|Drop platinium on striped \n" +"1|paving stones." +msgstr "" +"1|Posa del platinium sulle \n" +"1|lastre tratteggiate." + +msgid "" +"1|Drop tomatoes on striped \n" +"1|paving stones." +msgstr "" +"1|Posa dei pomodori sulle \n" +"1|lastre tratteggiate." + +msgid "" +"1|Each Blupi in\n" +"1|his house." +msgstr "" +"1|Ogni Blupi nella\n" +"1|sua casa." + +msgid "" +"1|Go on striped\n" +"1|paving stones." +msgstr "" +"1|Andare sulle lastre\n" +"1|tratteggiate." + +msgid "1|Goal :" +msgstr "1|Obbiettivo :" + +msgid "" +"1|Kill all\n" +"1|enemies !" +msgstr "" +"1|Eliminare\n" +"1|tutti i nemici !" + +msgid "" +"1|Resist until\n" +"1|fire extinction ..." +msgstr "" +"1|Resistere sino allo\n" +"1|spegnimento del fuoco ..." + +#, c-format +msgid "" +"1|The Blupi population must\n" +"1|be of at least %d Blupi." +msgstr "" +"1|La popolazione deve\n" +"1|essere di almeno %d Blupi." + +msgid "" +"1|The robot must reach\n" +"1|the striped paving stones." +msgstr "" +"1|Il robot deve raggiungere\n" +"1|le lastre tratteggiate." + +msgid "All licenses are available under share/doc/planetblupi/copyright" +msgstr "Tutte le license sono disponibili in share/doc/planetblupi/copyright" + +msgid "Already two teleporters" +msgstr "Esistono già due teletrasporti" + +msgid "Another mistake..." +msgstr "Ahimè, hai sbagliato un'altra volta..." + +msgid "Armour" +msgstr "Armatura" + +msgid "Available buttons" +msgstr "Pulsanti disponibili" + +msgid "Bang, failed again !" +msgstr "Bang, hai sbagliato ancora !" + +msgid "Bank" +msgstr "Riva" + +msgid "Blow up" +msgstr "Espoldi" + +msgid "Blupi" +msgstr "Blupi" + +msgid "Blupi in house" +msgstr "Blupi nella sua casa" + +msgid "Blupi on striped paving stones" +msgstr "Blupi su lastre tratteggiate" + +msgid "Blupi's energy" +msgstr "Energia di Blupi" + +msgid "Blupi's house" +msgstr "Casa di Blupi" + +msgid "Boat" +msgstr "Barca" + +msgid "Bouncing bomb" +msgstr "Bomba salterina" + +msgid "Bridge" +msgstr "Ponte" + +msgid "Bridge finished" +msgstr "Ponte finito" + +msgid "Buildings" +msgstr "Edifici" + +msgid "Bulldozer" +msgstr "Bulldozer" + +msgid "Bunch of flowers" +msgstr "Mazzo di fiori" + +msgid "Burnt ground" +msgstr "Terreno bruciato" + +msgid "Cancel last operation" +msgstr "Annullare l'ultima operazione" + +msgid "Carve a rock" +msgstr "Spacca una roccia" + +msgid "Carve rocks" +msgstr "Spacca delle roccie" + +msgid "" +"Change the\n" +"window size" +msgstr "" +"Cambiare la\n" +"dimensione\n" +"della finestra" + +msgid "Construct this game" +msgstr "Costruire questa partita" + +msgid "Construction" +msgstr "Costruzione" + +msgid "Construction number" +msgstr "Costruzione numero" + +msgid "Continue this game" +msgstr "Continua la partita" + +msgid "Cut down a tree" +msgstr "Abbatti un albero" + +msgid "Cut down trees" +msgstr "Abbatti degli alberi" + +msgid "Decorative plants" +msgstr "Piante ornamentali" + +msgid "Delete figure" +msgstr "Elimina personaggio" + +msgid "Delete fire" +msgstr "Elimina il fuoco" + +msgid "Delete item" +msgstr "Elimina oggetto" + +msgid "Demo" +msgstr "Demo" + +msgid "Desert" +msgstr "Deserto" + +msgid "Difficult" +msgstr "Difficile" + +msgid "Drink" +msgstr "Bevi" + +msgid "Drop" +msgstr "Posa" + +msgid "Dynamite" +msgstr "Dinamite" + +msgid "E" +msgstr "E" + +msgid "Easy" +msgstr "Facile" + +msgid "Eat" +msgstr "Mangia" + +msgid "Eggs" +msgstr "Uova" + +msgid "Electrocutor" +msgstr "Folgoratore" + +msgid "Ending conditions" +msgstr "" +"Condizioni per\n" +"concludere\n" +"la missione" + +msgid "Enemy barrier" +msgstr "Barriera nemica" + +msgid "Enemy buildings" +msgstr "Edifici nemici" + +msgid "Enemy construction" +msgstr "Costruzione nemica" + +msgid "Enemy ground" +msgstr "Terreno nemico" + +msgid "Enemy rocket" +msgstr "Razzo nemico" + +msgid "Excellent..." +msgstr "Eccellente..." + +msgid "Extract iron" +msgstr "Estrai del ferro" + +msgid "Faster" +msgstr "Veloce" + +msgid "Finish" +msgstr "Terminare" + +msgid "Fire" +msgstr "Fuoco" + +msgid "Fire out" +msgstr "Fuoco fermato" + +msgid "Flag" +msgstr "Bandiera" + +msgid "Flowers" +msgstr "Fiori" + +msgid "Forest" +msgstr "Foresta" + +msgid "Forest under snow" +msgstr "Foresta innevata" + +msgid "Fullscreen" +msgstr "Schermata intera" + +msgid "Game paused" +msgstr "Partita interrotta" + +msgid "Garden shed" +msgstr "Capanno" + +msgid "" +"Global game\n" +"speed" +msgstr "" +"Velocità\n" +"del gioco" + +msgid "Global settings" +msgstr "Configurazione globale" + +msgid "Go" +msgstr "Va" + +msgid "Grow tomatoes" +msgstr "Coltiva pomodori" + +msgid "Help" +msgstr "Aiuto" + +msgid "Help number" +msgstr "Aiuto numero" + +msgid "Helper robot" +msgstr "Robot aiutante" + +msgid "Ice" +msgstr "Ghiaccio" + +msgid "Impossible" +msgstr "Impossibile" + +#, c-format +msgid "Impossible to win if less than %d Blupi" +msgstr "Impossibile vincere se meno di %d Blupi" + +msgid "Inadequate ground" +msgstr "Terreno non adatto" + +msgid "Increase volume" +msgstr "Alza il volume" + +msgid "Increase window size" +msgstr "Aumentare la dimensione della finestra" + +msgid "Incubator" +msgstr "Incubatrice" + +msgid "Incubator or teleporter" +msgstr "Incubatrice o teletrasporto" + +msgid "Inflammable ground" +msgstr "Terreno infiammabile" + +msgid "Insert CD-Rom Planet Blupi and wait a few seconds..." +msgstr "Inserire il CD-Rom Planet Blupi e attendere qualche secondo ..." + +msgid "" +"Interface language\n" +"and sounds" +msgstr "" +"Lingua\n" +"dell'interfaccia\n" +"e dei suoni" + +msgid "Interrupt" +msgstr "Interrompere" + +msgid "Iron" +msgstr "Ferro" + +msgid "Items" +msgstr "Oggetti" + +msgid "Jeep" +msgstr "Jeep" + +msgid "Laboratory" +msgstr "Laboratorio" + +msgid "Last construction resolved !" +msgstr "Ultima costruzione risolta !" + +msgid "Leave Jeep" +msgstr "Lascia la Jeep" + +#, c-format +msgid "Lost if less than %d Blupi" +msgstr "Perso se meno di %d Blupi" + +msgid "Make a Jeep" +msgstr "Costruisci una Jeep" + +msgid "Make a helper robot" +msgstr "Costruisci un robot aiutante" + +msgid "Make a time bomb" +msgstr "Costruisci una bomba" + +msgid "Make armour" +msgstr "Costruisci un'armatura" + +msgid "Make bunch of flowers" +msgstr "Fai un mazzo di fiori" + +msgid "Make bunches of flowers" +msgstr "Fai dei mazzi di fiori" + +msgid "Master robot" +msgstr "Robot-capo" + +msgid "Medical potion" +msgstr "Pozione" + +msgid "Mine" +msgstr "Miniera" + +msgid "Miscellaneous ground" +msgstr "Terreno misto" + +msgid "Mission number" +msgstr "Missione numero" + +msgid "Mission over..." +msgstr "Missione compiuta..." + +msgid "Missions" +msgstr "Missioni" + +msgid "" +"Music\n" +"volume" +msgstr "" +"Volume\n" +"della musica" + +msgid "Music choice" +msgstr "Scelta della musica" + +msgid "Music number 1" +msgstr "Musica numero 1" + +msgid "Music number 10" +msgstr "Musica numero 10" + +msgid "Music number 2" +msgstr "Musica numero 2" + +msgid "Music number 3" +msgstr "Musica numero 3" + +msgid "Music number 4" +msgstr "Musica numero 4" + +msgid "Music number 5" +msgstr "Musica numero 5" + +msgid "Music number 6" +msgstr "Musica numero 6" + +msgid "Music number 7" +msgstr "Musica numero 7" + +msgid "Music number 8" +msgstr "Musica numero 8" + +msgid "Music number 9" +msgstr "Musica numero 9" + +msgid "N" +msgstr "N" + +#, c-format +msgid "New version available for download on www.blupi.org (v%s)" +msgstr "Nuova versione disponibile su www.blupi.org (v%s)" + +msgid "Next game" +msgstr "Partita successiva" + +msgid "Next language" +msgstr "Prossima lingua" + +msgid "Next page" +msgstr "Pagina successiva" + +msgid "No" +msgstr "No" + +msgid "No more enemies" +msgstr "Nemici eliminati" + +msgid "No music" +msgstr "Nessuna musica" + +msgid "No video" +msgstr "Nessun video" + +msgid "No, not that way !" +msgstr "Ma no, non così !" + +msgid "No, wrong way ..." +msgstr "Eh no, non è così ..." + +msgid "None" +msgstr "Nessuno" + +msgid "Normal ground" +msgstr "Terreno normale" + +msgid "Not enough energy" +msgstr "Energia limitata" + +msgid "Now go on mission." +msgstr "Ora passa alle missioni." + +msgid "Occupied ground" +msgstr "Terreno occupato" + +msgid "Open another game" +msgstr "Apri un'altra partita" + +msgid "Opposite bank no good" +msgstr "Riva opposta non ok" + +msgid "Palisade" +msgstr "Palizzata" + +msgid "Paving stones" +msgstr "Lastre" + +msgid "Planet Blupi" +msgstr "Planet Blupi" + +msgid "Planet Blupi -- stop" +msgstr "Planet Blupi -- stop" + +msgid "Planks" +msgstr "Assi" + +msgid "Planks on striped paving stones" +msgstr "Assi su lastre tratteggiate" + +msgid "Platinium" +msgstr "Platinium" + +msgid "Platinium on striped paving stones" +msgstr "Platinium su lastre trattegiate" + +msgid "Play this game" +msgstr "Giocare questa partita" + +msgid "Poison" +msgstr "Veleno" + +msgid "Prairie" +msgstr "Prateria" + +msgid "Previous game" +msgstr "Partita precedente" + +msgid "Previous language" +msgstr "Lingua precedente" + +msgid "Previous page" +msgstr "Pagina precedente" + +msgid "Prospect for iron" +msgstr "Cerca del ferro" + +msgid "Protection tower" +msgstr "Torre di protezione" + +msgid "Quit" +msgstr "Lascia" + +msgid "Quit Planet Blupi" +msgstr "Lasciare Planet Blupi" + +msgid "Quit construction" +msgstr "Terminare la costruzione" + +msgid "Quit this game" +msgstr "Lasciare la partita" + +msgid "REC" +msgstr "REC" + +msgid "Reduce volume" +msgstr "Abbassa il volume" + +msgid "Reduce window size" +msgstr "Ridurre la dimesione della finestra" + +msgid "Repeat" +msgstr "Ripeti" + +msgid "Restart this game" +msgstr "Ricomincia la partita" + +msgid "Robot on striped paving stones" +msgstr "Robot su lastre tratteggiate" + +msgid "Rocks" +msgstr "Rocce" + +msgid "S" +msgstr "S" + +msgid "Save" +msgstr "Salvare" + +msgid "Save this game" +msgstr "Salvare questa partita" + +msgid "Scenery choice" +msgstr "Scelta degli scenari" + +msgid "" +"Scroll speed\n" +"with mouse" +msgstr "" +"Velocità\n" +"del mouse" + +msgid "" +"Select the\n" +"window mode" +msgstr "" +"Selezionare il\n" +"modo finestra" + +msgid "Settings" +msgstr "Configurazione" + +msgid "Show videos" +msgstr "Mostra i video" + +msgid "Sick Blupi" +msgstr "Blupi ammalato" + +msgid "Skill level" +msgstr "Livello di difficoltà" + +msgid "Slower" +msgstr "Lento" + +msgid "" +"Sound effect\n" +"volume" +msgstr "" +"Volume\n" +"degli effetti" + +msgid "Special pavings" +msgstr "Lastre speciali" + +msgid "Spider" +msgstr "Ragno" + +msgid "Starting fire" +msgstr "Inizio d'incendio" + +msgid "Sterile ground" +msgstr "Terreno sterile" + +msgid "Sticky trap" +msgstr "Trappola collosa" + +msgid "Stones" +msgstr "Pietre" + +msgid "Stop" +msgstr "Stop" + +msgid "Striped paving stones" +msgstr "Lastre tratteggiate" + +msgid "Take" +msgstr "Prendi" + +msgid "Teleporter" +msgstr "Teletrasporto" + +msgid "" +"This game is an original creation of Epsitec SA, CH-1400 Yverdon-les-Bains" +msgstr "" +"Questo gioco è una realizzazione originale di Epsitec SA, CH-1400 Yverdon-" +"les-Bains" + +msgid "This game uses statically linked free and open-source libraries:" +msgstr "Questo gioco utilizza delle librerie open-source:" + +msgid "Time bomb" +msgstr "Bomba a tempo" + +msgid "Tired Blupi" +msgstr "Blupi stanco" + +msgid "Tomatoes" +msgstr "Pomodori" + +msgid "Tomatoes on striped paving stones" +msgstr "Pomodori su lastre tratteggiate" + +msgid "Too close to water" +msgstr "Troppo vicino all'acqua" + +msgid "Training" +msgstr "Allenamento" + +msgid "Training number" +msgstr "Allenamento numero" + +msgid "Transform" +msgstr "Trasforma" + +msgid "Transport" +msgstr "Mezzi di trasporto" + +msgid "Trapped enemy" +msgstr "Nemico intrappolato" + +msgid "Tree" +msgstr "Alberi" + +msgid "Tree trunks" +msgstr "Tronchi" + +msgid "Version" +msgstr "Versione" + +msgid "Very good, success on all missions !" +msgstr "Splendido, hai concluso il gioco !" + +msgid "Very good." +msgstr "Molto bene." + +msgid "" +"Video\n" +"sequences" +msgstr "" +"Sequenze\n" +"video" + +msgid "Virus" +msgstr "Virus" + +msgid "W" +msgstr "O" + +msgid "Wall" +msgstr "Muro" + +msgid "Wall or palisade" +msgstr "Muro o Palizzata" + +msgid "Water" +msgstr "Acqua" + +msgid "We hope you have had as much fun playing the game as we had making it !" +msgstr "" +"Speriamo che ti sia divertito con questo gioco almeno quanto noi ci siamo " +"zzarlo !" + +msgid "Weapons" +msgstr "Armi" + +msgid "Well done !" +msgstr "Bravo, ce l'hai fatta !" + +msgid "Windowed" +msgstr "Finestra" + +msgid "Work done" +msgstr "Lavoro in corso" + +msgid "Workshop" +msgstr "Fabbrica" + +msgid "Yes" +msgstr "Si" + +msgid "Yes, great ..." +msgstr "Si, fantastico ..." + +msgid "You have failed, try again..." +msgstr "Hai sbagliato, riprova..." + +msgid "You have played Planet Blupi." +msgstr "Hai giocato con Planet Blupi." + +#, c-format +msgid "construction %d, time %d" +msgstr "Costruzione %d, tempo %d" + +msgid "en" +msgstr "it" + +msgid "free slot" +msgstr "libero" + +msgid "http://www.blupi.org info@blupi.org" +msgstr "http://www.blupi.org info@blupi.org" + +#, c-format +msgid "mission %d, time %d" +msgstr "missione %d, tempo %d" + +#, c-format +msgid "training %d, time %d" +msgstr "allenamento %d, tempo %d" diff --git a/resources/po/pl.po b/resources/po/pl.po new file mode 100644 index 0000000..d5d084e --- /dev/null +++ b/resources/po/pl.po @@ -0,0 +1,914 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-10-04 07:04+0200\n" +"PO-Revision-Date: 2017-09-12 20:10+0200\n" +"Last-Translator: tomangelo \n" +"Language-Team: TerranovaTeam \n" +"Language: pl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2);\n" + +msgid " - FFmpeg (LGPLv2.1)" +msgstr " - FFmpeg (LGPLv2.1)" + +msgid " - GNU/gettext and GNU/libiconv (GPLv3)" +msgstr " - GNU/gettext and GNU/libiconv (GPLv3)" + +msgid " - SDL2, SDL2_image and SDL2_mixer (zlib license)" +msgstr " - SDL2, SDL2_image and SDL2_mixer (licencja zlib)" + +msgid " - SDL_kitchensink (MIT)" +msgstr " - SDL_kitchensink (MIT)" + +msgid " - argagg (MIT)" +msgstr " - argagg (MIT)" + +msgid " - libasound (LGPLv2.1)" +msgstr " - libasound (LGPLv2.1)" + +msgid " - libcurl (MIT/X derivate)" +msgstr " - libcurl (MIT/X derivate)" + +msgid " - libpng (own license)" +msgstr " - libpng (własna licencja)" + +msgid " - libpulse (LGPLv2.1)" +msgstr " - libpulse (LGPLv2.1)" + +msgid " - zlib (own license)" +msgstr " - zlib (własna licencja)" + +msgid "(isolated tower)" +msgstr "(samotna wieża)" + +msgid "" +"1: Cut down a tree \n" +"2: Build a bridge" +msgstr "" +"1: Zetnij drzewo\n" +"2: Zbuduj most" + +msgid "" +"1: Cut down a tree \n" +"2: Make a boat" +msgstr "" +"1: Zetnij drzewo\n" +"2: Zbuduj łódź" + +msgid "" +"1: Cut down a tree \n" +"2: Make a palisade" +msgstr "" +"1: Zetnij drzewo\n" +"2: Zbuduj palisadę" + +msgid "" +"1: Extract iron\n" +"2: Make a Jeep" +msgstr "" +"1: Wykop żelazo\n" +"2: Stwórz Jeepa" + +msgid "" +"1: Extract iron\n" +"2: Make a bomb" +msgstr "" +"1: Wykop żelazo\n" +"2: Stwórz bombę" + +msgid "" +"1: Extract iron\n" +"2: Make an armour" +msgstr "" +"1: Wykop żelazo\n" +"2: Stwórz zbroję" + +msgid "" +"1: Grow tomatoes\n" +"2: Eat" +msgstr "" +"1: Zasadź pomidory\n" +"2: Zjedz" + +msgid "" +"1: Make a bunch\n" +"2: Transform" +msgstr "" +"1: Zbierz wiele\n" +"2: Przetwórz" + +msgid "" +"1: Take\n" +"2: Build a bridge" +msgstr "" +"1: Weź\n" +"2: Zbuduj most" + +msgid "" +"1: Take\n" +"2: Build palisade" +msgstr "" +"1: Weź\n" +"2: Zbuduj palisadę" + +msgid "" +"1: Take\n" +"2: Make a boat" +msgstr "" +"1: Weź\n" +"2: Zbuduj łódź" + +msgid "" +"1: Take\n" +"2: Transform" +msgstr "" +"1: Weź\n" +"2: Przetwórz" + +msgid "" +"1|Drop planks on striped \n" +"1|paving stones." +msgstr "" +"1|Połóż deski na\n" +"1|nawierzchni docelowej." + +msgid "" +"1|Drop platinium on striped \n" +"1|paving stones." +msgstr "" +"1|Połóż platynę na\n" +"1|nawierzchni docelowej." + +msgid "" +"1|Drop tomatoes on striped \n" +"1|paving stones." +msgstr "" +"1|Połóż pomidory na\n" +"1|nawierzchni docelowej." + +msgid "" +"1|Each Blupi in\n" +"1|his house." +msgstr "" +"1|Każdy Blupi we\n" +"1|własnym domu." + +msgid "" +"1|Go on striped\n" +"1|paving stones." +msgstr "" +"1|Idź na\n" +"1|nawierzchnię docelową." + +msgid "1|Goal :" +msgstr "1|Zadanie :" + +msgid "" +"1|Kill all\n" +"1|enemies !" +msgstr "" +"1|Wyeliminuj wszystkich\n" +"1|przeciwników!" + +msgid "" +"1|Resist until\n" +"1|fire extinction ..." +msgstr "" +"1|Wytrzymaj dopóki\n" +"1|pożar nie wygaśnie ..." + +#, c-format +msgid "" +"1|The Blupi population must\n" +"1|be of at least %d Blupi." +msgstr "" +"1|Populacja Blupich musi\n" +"1|wynosić minimum %d Blupich." + +msgid "" +"1|The robot must reach\n" +"1|the striped paving stones." +msgstr "" +"1|Robot musi dotrzeć do\n" +"1|nawierzchni docelowej." + +msgid "All licenses are available under share/doc/planetblupi/copyright" +msgstr "Wszystkie licencje dostępne są w share/doc/planetblupi/copyright" + +msgid "Already two teleporters" +msgstr "Już istnieją 2 teleportery" + +msgid "Another mistake..." +msgstr "Znowu pomyłka..." + +msgid "Armour" +msgstr "Zbroja" + +msgid "Available buttons" +msgstr "Dostępne przyciski" + +msgid "Bang, failed again !" +msgstr "Motyla noga, znowu porażka!" + +msgid "Bank" +msgstr "Brzeg" + +msgid "Blow up" +msgstr "Wysadź w powietrze" + +msgid "Blupi" +msgstr "Blupi" + +msgid "Blupi in house" +msgstr "Blupi w domu" + +msgid "Blupi on striped paving stones" +msgstr "Blupi na nawierzchni docelowej" + +msgid "Blupi's energy" +msgstr "Siła Blupiego" + +msgid "Blupi's house" +msgstr "Domek Blupiego" + +msgid "Boat" +msgstr "Łódź" + +msgid "Bouncing bomb" +msgstr "Skacząca bomba" + +msgid "Bridge" +msgstr "Most" + +msgid "Bridge finished" +msgstr "Most skończony" + +msgid "Buildings" +msgstr "Budynki" + +msgid "Bulldozer" +msgstr "Buldożer" + +msgid "Bunch of flowers" +msgstr "Bukiet kwiatów" + +msgid "Burnt ground" +msgstr "Wypalona ziemia" + +msgid "Cancel last operation" +msgstr "Cofnij ostatnią operację" + +msgid "Carve a rock" +msgstr "Wyłup skałę" + +msgid "Carve rocks" +msgstr "Wyłup skały" + +msgid "" +"Change the\n" +"window size" +msgstr "" +"Zmień rozmiar\n" +"okna" + +msgid "Construct this game" +msgstr "Edytuj poziom" + +msgid "Construction" +msgstr "Konstrukcja" + +msgid "Construction number" +msgstr "Konstrukcja numer" + +msgid "Continue this game" +msgstr "Kontynuuj" + +msgid "Cut down a tree" +msgstr "Zetnij drzewo" + +msgid "Cut down trees" +msgstr "Zetnij drzewa" + +msgid "Decorative plants" +msgstr "Rośliny ozdobne" + +msgid "Delete figure" +msgstr "Usuń postać" + +msgid "Delete fire" +msgstr "Usuń ogień" + +msgid "Delete item" +msgstr "Usuń przedmiot" + +msgid "Demo" +msgstr "Demonstracja" + +msgid "Desert" +msgstr "Pustynia" + +msgid "Difficult" +msgstr "Trudny" + +msgid "Drink" +msgstr "Wypij" + +msgid "Drop" +msgstr "Upuść" + +msgid "Dynamite" +msgstr "Dynamit" + +msgid "E" +msgstr "Ws" + +msgid "Easy" +msgstr "Prosty" + +msgid "Eat" +msgstr "Jedz" + +msgid "Eggs" +msgstr "Jaja" + +msgid "Electrocutor" +msgstr "Paralizator" + +msgid "Ending conditions" +msgstr "Warunki zwycięstwa" + +msgid "Enemy barrier" +msgstr "Wroga bariera" + +msgid "Enemy buildings" +msgstr "Wrogie budynki" + +msgid "Enemy construction" +msgstr "Wroga konstrukcja" + +msgid "Enemy ground" +msgstr "Wroga ziemia" + +msgid "Enemy rocket" +msgstr "Wroga rakieta" + +msgid "Excellent..." +msgstr "Doskonale..." + +msgid "Extract iron" +msgstr "Wykop żelazo" + +msgid "Faster" +msgstr "Szybciej" + +msgid "Finish" +msgstr "Zakończ" + +msgid "Fire" +msgstr "Ogień" + +msgid "Fire out" +msgstr "Ugaszony pożar" + +msgid "Flag" +msgstr "Flaga" + +msgid "Flowers" +msgstr "Kwiaty" + +msgid "Forest" +msgstr "Las" + +msgid "Forest under snow" +msgstr "Las pokryty śniegiem" + +msgid "Fullscreen" +msgstr "Pełny ekran" + +msgid "Game paused" +msgstr "Gra zapauzowana" + +msgid "Garden shed" +msgstr "Szopka ogrodowa" + +msgid "" +"Global game\n" +"speed" +msgstr "" +"Prędkość\n" +"gry" + +msgid "Global settings" +msgstr "Ustawienia" + +msgid "Go" +msgstr "Idź" + +msgid "Grow tomatoes" +msgstr "Sadź pomidory" + +msgid "Help" +msgstr "Pomoc" + +msgid "Help number" +msgstr "Pomoc numer" + +msgid "Helper robot" +msgstr "Robot-pomocnik" + +msgid "Ice" +msgstr "Lód" + +msgid "Impossible" +msgstr "Niemożliwe" + +#, c-format +msgid "Impossible to win if less than %d Blupi" +msgstr "Niemożliwe do wygrania jeśli mniej niż %d Blupich" + +msgid "Inadequate ground" +msgstr "Nieodpowiedni teren" + +msgid "Increase volume" +msgstr "Zwiększ głośność" + +msgid "Increase window size" +msgstr "Zwiększ rozmiar okna" + +msgid "Incubator" +msgstr "Wylęgarka" + +msgid "Incubator or teleporter" +msgstr "Inkubator lub teleporter" + +msgid "Inflammable ground" +msgstr "Łatwopalna ziemia" + +msgid "Insert CD-Rom Planet Blupi and wait a few seconds..." +msgstr "" +"Włóż płytę CD-ROM z grą Planet Blupi do napędu optycznego i poczekaj kilka " +"sekund" + +msgid "" +"Interface language\n" +"and sounds" +msgstr "" +"Język interfejsu\n" +"oraz dźwięków" + +msgid "Interrupt" +msgstr "Przerwij" + +msgid "Iron" +msgstr "Żelazo" + +msgid "Items" +msgstr "Przedmioty" + +msgid "Jeep" +msgstr "Jeep" + +msgid "Laboratory" +msgstr "Laboratorium" + +msgid "Last construction resolved !" +msgstr "Ostatnia łamigłówka rozwiązana!" + +msgid "Leave Jeep" +msgstr "Opuść Jeepa" + +#, c-format +msgid "Lost if less than %d Blupi" +msgstr "Przegrana jeśli mniej niż %d Blupich" + +msgid "Make a Jeep" +msgstr "Stwórz Jeepa" + +msgid "Make a helper robot" +msgstr "Stwórz robota-pomocnika" + +msgid "Make a time bomb" +msgstr "Stwórz bombę zegarową" + +msgid "Make armour" +msgstr "Stwórz zbroję" + +msgid "Make bunch of flowers" +msgstr "Ułóż bukiet kwiatów" + +msgid "Make bunches of flowers" +msgstr "Ułóż bukiety kwiatów" + +msgid "Master robot" +msgstr "Mistrz robotów" + +msgid "Medical potion" +msgstr "Lekarstwo" + +msgid "Mine" +msgstr "Kopalnia" + +msgid "Miscellaneous ground" +msgstr "Mieszana ziemia" + +msgid "Mission number" +msgstr "Misja numer" + +msgid "Mission over..." +msgstr "Koniec zadania..." + +msgid "Missions" +msgstr "Misje" + +msgid "" +"Music\n" +"volume" +msgstr "" +"Głośność\n" +"muzyki" + +msgid "Music choice" +msgstr "Wybór muzyki" + +msgid "Music number 1" +msgstr "Muzyka numer 1" + +#, fuzzy +msgid "Music number 10" +msgstr "Muzyka numer 1" + +msgid "Music number 2" +msgstr "Muzyka numer 2" + +msgid "Music number 3" +msgstr "Muzyka numer 3" + +msgid "Music number 4" +msgstr "Muzyka numer 4" + +msgid "Music number 5" +msgstr "Muzyka numer 5" + +msgid "Music number 6" +msgstr "Muzyka numer 6" + +msgid "Music number 7" +msgstr "Muzyka numer 7" + +msgid "Music number 8" +msgstr "Muzyka numer 8" + +msgid "Music number 9" +msgstr "Muzyka numer 9" + +msgid "N" +msgstr "Pn" + +#, c-format +msgid "New version available for download on www.blupi.org (v%s)" +msgstr "Nowa wersja dostępna do pobrania na www.blupi.org (v%s)" + +msgid "Next game" +msgstr "Następne zadanie" + +msgid "Next language" +msgstr "Następny język" + +msgid "Next page" +msgstr "Następna strona" + +msgid "No" +msgstr "Nie" + +msgid "No more enemies" +msgstr "Brak przeciwników" + +msgid "No music" +msgstr "Brak muzyki" + +msgid "No video" +msgstr "Brak wstawek filmowych" + +msgid "No, not that way !" +msgstr "Nie, nie w ten sposób!" + +msgid "No, wrong way ..." +msgstr "Nie, nie tak..." + +msgid "None" +msgstr "Brak" + +msgid "Normal ground" +msgstr "Zwykła ziemia" + +msgid "Not enough energy" +msgstr "Za mało siły" + +msgid "Now go on mission." +msgstr "Teraz spróbuj swoich sił w misjach" + +msgid "Occupied ground" +msgstr "Teren zajęty" + +msgid "Open another game" +msgstr "Otwórz poprzednią grę" + +msgid "Opposite bank no good" +msgstr "Brzeg nie jest odpowiedni" + +msgid "Palisade" +msgstr "Palisada" + +msgid "Paving stones" +msgstr "Kostka brukowa" + +msgid "Planet Blupi" +msgstr "Planet Blupi" + +msgid "Planet Blupi -- stop" +msgstr "Planet Blupi -- zatrzymano" + +msgid "Planks" +msgstr "Deski" + +msgid "Planks on striped paving stones" +msgstr "Deski na nawierzchni docelowej" + +msgid "Platinium" +msgstr "Platyna" + +msgid "Platinium on striped paving stones" +msgstr "Platyna na nawierzchni docelowej" + +msgid "Play this game" +msgstr "Zagraj" + +msgid "Poison" +msgstr "Trucizna" + +msgid "Prairie" +msgstr "Preria" + +msgid "Previous game" +msgstr "Poprzednie zadanie" + +msgid "Previous language" +msgstr "Poprzedni język" + +msgid "Previous page" +msgstr "Poprzednia strona" + +msgid "Prospect for iron" +msgstr "Szukaj żelaza" + +msgid "Protection tower" +msgstr "Wieża obronna" + +msgid "Quit" +msgstr "Wyjdź" + +msgid "Quit Planet Blupi" +msgstr "Wyjdź z Planet Blupi" + +msgid "Quit construction" +msgstr "Zakończ tworzenie" + +msgid "Quit this game" +msgstr "Opuść tą grę" + +msgid "REC" +msgstr "Nagrywanie" + +msgid "Reduce volume" +msgstr "Zmniejsz głośność" + +msgid "Reduce window size" +msgstr "Zmniejsz rozmiar okna" + +msgid "Repeat" +msgstr "Powtórz" + +msgid "Restart this game" +msgstr "Uruchom grę ponownie" + +msgid "Robot on striped paving stones" +msgstr "Roboty na nawierzchni docelowej" + +msgid "Rocks" +msgstr "Skały" + +msgid "S" +msgstr "Pd" + +msgid "Save" +msgstr "Zapisz" + +msgid "Save this game" +msgstr "Zapisz tą grę" + +msgid "Scenery choice" +msgstr "Wybór scenerii" + +msgid "" +"Scroll speed\n" +"with mouse" +msgstr "" +"Prędkość przewijania\n" +"myszą" + +msgid "" +"Select the\n" +"window mode" +msgstr "" +"Wybierz\n" +"tryb okienkowy" + +msgid "Settings" +msgstr "Opcje" + +msgid "Show videos" +msgstr "Pokaż wstawki filmowe" + +msgid "Sick Blupi" +msgstr "Zarażony Blupi" + +msgid "Skill level" +msgstr "Poziom trudności" + +msgid "Slower" +msgstr "Wolniej" + +msgid "" +"Sound effect\n" +"volume" +msgstr "" +"Głośność\n" +"efektów" + +msgid "Special pavings" +msgstr "Specjalne nawierzchnie" + +msgid "Spider" +msgstr "Pająk" + +msgid "Starting fire" +msgstr "Początek pożaru" + +msgid "Sterile ground" +msgstr "Jałowa ziemia" + +msgid "Sticky trap" +msgstr "Klejąca pułapka" + +msgid "Stones" +msgstr "Kamienie" + +msgid "Stop" +msgstr "Przerwij" + +msgid "Striped paving stones" +msgstr "Nawierzchnia docelowa" + +msgid "Take" +msgstr "Weź" + +msgid "Teleporter" +msgstr "Teleporter" + +msgid "" +"This game is an original creation of Epsitec SA, CH-1400 Yverdon-les-Bains" +msgstr "Ta gra to oryginalne dzieło Epsitec SA, CH-1400 Yverdon-les-Bains" + +msgid "This game uses statically linked free and open-source libraries:" +msgstr "" +"Ta gra używa statystycznie linkowanych wolnych i otwartoźródłowych " +"bibliotek: " + +msgid "Time bomb" +msgstr "Bomba zegarowa" + +msgid "Tired Blupi" +msgstr "Zmęczony Blupi" + +msgid "Tomatoes" +msgstr "Pomidory" + +msgid "Tomatoes on striped paving stones" +msgstr "Pomidory na nawierzchni docelowej" + +msgid "Too close to water" +msgstr "Za blisko wody" + +msgid "Training" +msgstr "Trening" + +msgid "Training number" +msgstr "Trening numer" + +msgid "Transform" +msgstr "Przetwórz" + +msgid "Transport" +msgstr "Środki transportu" + +msgid "Trapped enemy" +msgstr "Przyklejony przeciwnik" + +msgid "Tree" +msgstr "Drzewo" + +msgid "Tree trunks" +msgstr "Pnie drzew" + +msgid "Version" +msgstr "Wersja" + +msgid "Very good, success on all missions !" +msgstr "Bardzo dobrze, suksesów we wszystkich misjach" + +msgid "Very good." +msgstr "Bardzo dobrze." + +msgid "" +"Video\n" +"sequences" +msgstr "" +"Wstawki\n" +"filmowe" + +msgid "Virus" +msgstr "Wirus" + +msgid "W" +msgstr "Za" + +msgid "Wall" +msgstr "Mur" + +msgid "Wall or palisade" +msgstr "Mur lub palisada" + +msgid "Water" +msgstr "Woda" + +msgid "We hope you have had as much fun playing the game as we had making it !" +msgstr "" +"Mamy nadzieję że miałeś tak dużo frajdy z gry jak my gdy ją tworzyliśmy!" + +msgid "Weapons" +msgstr "Bronie" + +msgid "Well done !" +msgstr "Dobra robota!" + +msgid "Windowed" +msgstr "Tryb okienkowy" + +msgid "Work done" +msgstr "Zadanie skończone" + +msgid "Workshop" +msgstr "Warsztat" + +msgid "Yes" +msgstr "Tak" + +msgid "Yes, great ..." +msgstr "Tak, wspaniale ..." + +msgid "You have failed, try again..." +msgstr "Przegrałeś, spróbuj ponownie..." + +msgid "You have played Planet Blupi." +msgstr "Grałeś w Planet Blupi" + +#, c-format +msgid "construction %d, time %d" +msgstr "Budowanie %d, czas %d" + +msgid "en" +msgstr "pl" + +msgid "free slot" +msgstr "Wolny slot" + +msgid "http://www.blupi.org info@blupi.org" +msgstr "http://www.blupi.org info@blupi.org" + +#, c-format +msgid "mission %d, time %d" +msgstr "Misja %d, czas %d" + +#, c-format +msgid "training %d, time %d" +msgstr "Trenowanie %d, czas %d" diff --git a/resources/po/planetblupi.pot b/resources/po/planetblupi.pot index 31b95ea..5b3b444 100644 --- a/resources/po/planetblupi.pot +++ b/resources/po/planetblupi.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-09-09 09:13+0200\n" +"POT-Creation-Date: 2017-10-04 07:04+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -518,6 +518,9 @@ msgstr "" msgid "Music number 9" msgstr "" +msgid "Music number 10" +msgstr "" + msgid "Prairie" msgstr "" diff --git a/resources/sound/it/sound002.wav b/resources/sound/it/sound002.wav new file mode 100644 index 0000000..c19b707 Binary files /dev/null and b/resources/sound/it/sound002.wav differ diff --git a/resources/sound/it/sound003.wav b/resources/sound/it/sound003.wav new file mode 100644 index 0000000..d307723 Binary files /dev/null and b/resources/sound/it/sound003.wav differ diff --git a/resources/sound/it/sound004.wav b/resources/sound/it/sound004.wav new file mode 100644 index 0000000..c0672c7 Binary files /dev/null and b/resources/sound/it/sound004.wav differ diff --git a/resources/sound/it/sound005.wav b/resources/sound/it/sound005.wav new file mode 100644 index 0000000..25ac116 Binary files /dev/null and b/resources/sound/it/sound005.wav differ diff --git a/resources/sound/it/sound006.wav b/resources/sound/it/sound006.wav new file mode 100644 index 0000000..a34045d Binary files /dev/null and b/resources/sound/it/sound006.wav differ diff --git a/resources/sound/it/sound007.wav b/resources/sound/it/sound007.wav new file mode 100644 index 0000000..6ac6dd5 Binary files /dev/null and b/resources/sound/it/sound007.wav differ diff --git a/resources/sound/it/sound008.wav b/resources/sound/it/sound008.wav new file mode 100644 index 0000000..ffc5efd Binary files /dev/null and b/resources/sound/it/sound008.wav differ diff --git a/resources/sound/it/sound009.wav b/resources/sound/it/sound009.wav new file mode 100644 index 0000000..5d6478c Binary files /dev/null and b/resources/sound/it/sound009.wav differ diff --git a/resources/sound/it/sound010.wav b/resources/sound/it/sound010.wav new file mode 100644 index 0000000..b6860bb Binary files /dev/null and b/resources/sound/it/sound010.wav differ diff --git a/resources/sound/it/sound014.wav b/resources/sound/it/sound014.wav new file mode 100644 index 0000000..a8556b1 Binary files /dev/null and b/resources/sound/it/sound014.wav differ diff --git a/resources/sound/it/sound017.wav b/resources/sound/it/sound017.wav new file mode 100644 index 0000000..4cffd22 Binary files /dev/null and b/resources/sound/it/sound017.wav differ diff --git a/resources/sound/it/sound018.wav b/resources/sound/it/sound018.wav new file mode 100644 index 0000000..93c117e Binary files /dev/null and b/resources/sound/it/sound018.wav differ diff --git a/resources/sound/it/sound019.wav b/resources/sound/it/sound019.wav new file mode 100644 index 0000000..e403b8c Binary files /dev/null and b/resources/sound/it/sound019.wav differ diff --git a/resources/sound/it/sound027.wav b/resources/sound/it/sound027.wav new file mode 100644 index 0000000..b006541 Binary files /dev/null and b/resources/sound/it/sound027.wav differ diff --git a/resources/sound/it/sound033.wav b/resources/sound/it/sound033.wav new file mode 100644 index 0000000..845c263 Binary files /dev/null and b/resources/sound/it/sound033.wav differ diff --git a/resources/sound/it/sound037.wav b/resources/sound/it/sound037.wav new file mode 100644 index 0000000..089204e Binary files /dev/null and b/resources/sound/it/sound037.wav differ diff --git a/resources/sound/it/sound056.wav b/resources/sound/it/sound056.wav new file mode 100644 index 0000000..9ae8904 Binary files /dev/null and b/resources/sound/it/sound056.wav differ diff --git a/resources/sound/it/sound057.wav b/resources/sound/it/sound057.wav new file mode 100644 index 0000000..5e6b602 Binary files /dev/null and b/resources/sound/it/sound057.wav differ diff --git a/resources/sound/it/sound058.wav b/resources/sound/it/sound058.wav new file mode 100644 index 0000000..30d1a0a Binary files /dev/null and b/resources/sound/it/sound058.wav differ diff --git a/resources/sound/it/sound059.wav b/resources/sound/it/sound059.wav new file mode 100644 index 0000000..9df9b59 Binary files /dev/null and b/resources/sound/it/sound059.wav differ diff --git a/resources/sound/it/sound060.wav b/resources/sound/it/sound060.wav new file mode 100644 index 0000000..f09c5c5 Binary files /dev/null and b/resources/sound/it/sound060.wav differ diff --git a/resources/sound/it/sound061.wav b/resources/sound/it/sound061.wav new file mode 100644 index 0000000..8f57fa4 Binary files /dev/null and b/resources/sound/it/sound061.wav differ diff --git a/resources/sound/it/sound062.wav b/resources/sound/it/sound062.wav new file mode 100644 index 0000000..6810088 Binary files /dev/null and b/resources/sound/it/sound062.wav differ diff --git a/resources/sound/it/sound063.wav b/resources/sound/it/sound063.wav new file mode 100644 index 0000000..2d4efdf Binary files /dev/null and b/resources/sound/it/sound063.wav differ diff --git a/resources/sound/it/sound064.wav b/resources/sound/it/sound064.wav new file mode 100644 index 0000000..fcee0f2 Binary files /dev/null and b/resources/sound/it/sound064.wav differ diff --git a/resources/sound/it/sound065.wav b/resources/sound/it/sound065.wav new file mode 100644 index 0000000..f1cdbba Binary files /dev/null and b/resources/sound/it/sound065.wav differ diff --git a/resources/sound/it/sound066.wav b/resources/sound/it/sound066.wav new file mode 100644 index 0000000..825ad46 Binary files /dev/null and b/resources/sound/it/sound066.wav differ diff --git a/resources/sound/it/sound067.wav b/resources/sound/it/sound067.wav new file mode 100644 index 0000000..9f4989b Binary files /dev/null and b/resources/sound/it/sound067.wav differ diff --git a/resources/sound/it/sound068.wav b/resources/sound/it/sound068.wav new file mode 100644 index 0000000..f479d55 Binary files /dev/null and b/resources/sound/it/sound068.wav differ diff --git a/resources/sound/it/sound069.wav b/resources/sound/it/sound069.wav new file mode 100644 index 0000000..e58fe6b Binary files /dev/null and b/resources/sound/it/sound069.wav differ diff --git a/resources/sound/it/sound070.wav b/resources/sound/it/sound070.wav new file mode 100644 index 0000000..c0c7ce7 Binary files /dev/null and b/resources/sound/it/sound070.wav differ diff --git a/resources/sound/it/sound071.wav b/resources/sound/it/sound071.wav new file mode 100644 index 0000000..fa780d0 Binary files /dev/null and b/resources/sound/it/sound071.wav differ diff --git a/resources/sound/it/sound072.wav b/resources/sound/it/sound072.wav new file mode 100644 index 0000000..bfc4aea Binary files /dev/null and b/resources/sound/it/sound072.wav differ diff --git a/resources/sound/it/sound073.wav b/resources/sound/it/sound073.wav new file mode 100644 index 0000000..839bf05 Binary files /dev/null and b/resources/sound/it/sound073.wav differ diff --git a/src/action.cxx b/src/action.cxx index be6b7ae..764b778 100644 --- a/src/action.cxx +++ b/src/action.cxx @@ -1764,7 +1764,7 @@ static const DescAction action_table[] = {0}, }, { - ACTION_D_PICKAXE, + ACTION_D_SAW, CHBLUPI, { {1, 290}, // e @@ -1839,7 +1839,7 @@ static const DescAction action_table[] = {0}, }, { - ACTION_D_SAW, + ACTION_D_PICKAXE, CHBLUPI, { {8, 290, 290, 304, 304, 290, 290, 292, 292}, // e diff --git a/src/blupi.cxx b/src/blupi.cxx index 30b3e6f..8f9303a 100644 --- a/src/blupi.cxx +++ b/src/blupi.cxx @@ -30,7 +30,9 @@ #include #include +#ifdef USE_CURL #include +#endif /* USE_CURL */ #include "json/json.hpp" @@ -59,6 +61,7 @@ CDecor * g_pDecor = nullptr; std::thread * g_updateThread = nullptr; bool g_bFullScreen = false; // false si mode de test +Uint8 g_windowScale = 1; Sint32 g_speedRate = 1; Sint32 g_timerInterval = 50; // inverval = 50ms int g_rendererType = 0; @@ -71,6 +74,7 @@ enum Settings { SETTING_SPEEDRATE = 1 << 1, SETTING_TIMERINTERVAL = 1 << 2, SETTING_RENDERER = 1 << 3, + SETTING_ZOOM = 1 << 4, }; static int g_settingsOverload = 0; @@ -79,11 +83,13 @@ bool g_bTermInit = false; // initialisation en cours Uint32 g_lastPhase = 999; static bool g_pause; +#ifdef USE_CURL struct url_data { CURLcode status; char * buffer; size_t size; }; +#endif template static void @@ -92,7 +98,7 @@ split (const std::string & s, char delim, Out result) std::stringstream ss; ss.str (s); std::string item; - while (std::getline (ss, item, delim).good ()) + while (std::getline (ss, item, delim)) *(result++) = item; } @@ -114,7 +120,10 @@ ReadConfig () { const auto config = GetBaseDir () + "data/config.json"; - std::ifstream file (config, std::ifstream::in); + std::ifstream file (config, std::ifstream::in); + if (!file) + return false; + nlohmann::json j; file >> j; @@ -149,6 +158,13 @@ ReadConfig () g_bFullScreen = 1; } + if (!(g_settingsOverload & SETTING_ZOOM) && j.find ("zoom") != j.end ()) + { + g_windowScale = j["zoom"].get (); + if (g_windowScale != 1 && g_windowScale != 2) + g_windowScale = 1; + } + if ( !(g_settingsOverload & SETTING_RENDERER) && j.find ("renderer") != j.end ()) { @@ -164,13 +180,14 @@ ReadConfig () /** * \brief Main frame update. */ -static void +static bool UpdateFrame (void) { Rect clip, rcRect; Uint32 phase; Point posMouse; Sint32 i, term, speed; + bool display = true; posMouse = g_pEvent->GetLastMousePos (); @@ -195,27 +212,22 @@ UpdateFrame (void) clip.bottom = POSDRAWY + DIMDRAWY; if (g_pEvent->IsShift ()) // screen shifting - { g_pEvent->DecorAutoShift (); - g_pDecor->Build (clip, posMouse); // build the environment - } - else - { - if (!g_pEvent->GetPause ()) - { - speed = g_pEvent->GetSpeed () * g_speedRate; - for (i = 0; i < speed; i++) - { - g_pDecor->BlupiStep (i == 0); // move all blupi - g_pDecor->MoveStep (i == 0); // move the environment - g_pEvent->DemoStep (); // forward the recording or demo playing - } - } - g_pEvent->DecorAutoShift (); - g_pDecor->Build (clip, posMouse); // build the environment - g_pDecor->NextPhase (1); // rebuild the map sometimes + if (!g_pEvent->GetPause ()) + { + speed = g_pEvent->GetSpeed () * g_speedRate; + for (i = 0; i < speed; i++) + { + g_pDecor->BlupiStep (i == 0); // move all blupi + g_pDecor->MoveStep (i == 0); // move the environment + g_pEvent->DemoStep (); // forward the recording or demo playing + } } + + g_pEvent->DecorAutoShift (); + g_pDecor->Build (clip, posMouse); // build the environment + g_pDecor->NextPhase (1); // rebuild the map sometimes } if (phase == EV_PHASE_BUILD) @@ -243,7 +255,7 @@ UpdateFrame (void) phase == EV_PHASE_H2MOVIE || phase == EV_PHASE_PLAYMOVIE || phase == EV_PHASE_WINMOVIE) { - g_pEvent->MovieToStart (); // start a movie if necessary + display = g_pEvent->MovieToStart (); // start a movie if necessary } if (phase == EV_PHASE_INSERT) @@ -257,6 +269,8 @@ UpdateFrame (void) if (term == 2) g_pEvent->ChangePhase (EV_PHASE_WINMOVIE); // win } + + return display; } /** @@ -371,10 +385,12 @@ HandleEvent (const SDL_Event & event) case EV_UPDATE: if (!g_pEvent->IsMovie ()) // pas de film en cours ? { - if (!g_pause) - UpdateFrame (); + bool display = true; - if (!g_pEvent->IsMovie ()) + if (!g_pause) + display = UpdateFrame (); + + if (!g_pEvent->IsMovie () && display) g_pPixmap->Display (); } break; @@ -446,6 +462,7 @@ InitFail (const char * msg) FinishObjects (); } +#ifdef USE_CURL static size_t updateCallback (void * ptr, size_t size, size_t nmemb, void * data) { @@ -463,10 +480,12 @@ updateCallback (void * ptr, size_t size, size_t nmemb, void * data) return realsize; } +#endif /* USE_CURL */ static void CheckForUpdates () { +#ifdef USE_CURL url_data chunk; chunk.buffer = nullptr; /* we expect realloc(NULL, size) to work */ @@ -503,6 +522,7 @@ CheckForUpdates () free (chunk.buffer); curl_easy_cleanup (curl); +#endif /* USE_CURL */ } static int @@ -523,6 +543,10 @@ parseArgs (int argc, char * argv[], bool & exit) {"-f", "--fullscreen"}, "load in fullscreen [on;off] (default: on)", 1}, + {"zoom", + {"-z", "--zoom"}, + "change the window scale (only if fullscreen is off) [1;2] (default: 1)", + 1}, {"renderer", {"-r", "--renderer"}, "set a renderer [auto;software;accelerated] (default: auto)", @@ -584,6 +608,12 @@ parseArgs (int argc, char * argv[], bool & exit) g_settingsOverload |= SETTING_FULLSCREEN; } + if (args["zoom"]) + { + g_windowScale = args["zoom"]; + g_settingsOverload |= SETTING_ZOOM; + } + if (args["renderer"]) { if (args["renderer"].as () == "auto") @@ -622,6 +652,12 @@ DoInit (int argc, char * argv[], bool & exit) bOK = ReadConfig (); // lit le fichier config.json + if (!bOK) // Something wrong with config.json file? + { + InitFail ("Game not correctly installed"); + return EXIT_FAILURE; + } + auto res = SDL_Init (SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER); if (res < 0) return EXIT_FAILURE; @@ -652,12 +688,6 @@ DoInit (int argc, char * argv[], bool & exit) return EXIT_FAILURE; } - if (!bOK) // Something wrong with config.json file? - { - InitFail ("Game not correctly installed"); - return EXIT_FAILURE; - } - SDL_RenderSetLogicalSize (g_renderer, LXIMAGE, LYIMAGE); const auto renders = SDL_GetNumRenderDrivers (); @@ -825,7 +855,7 @@ DoInit (int argc, char * argv[], bool & exit) } totalDim.x = DIMTEXTX * 16; - totalDim.y = DIMTEXTY * 8 * 3; + totalDim.y = DIMTEXTY * 9 * 3; iconDim.x = DIMTEXTX; iconDim.y = DIMTEXTY; if (!g_pPixmap->Cache (CHTEXT, "image/text.png", totalDim, iconDim)) @@ -835,7 +865,7 @@ DoInit (int argc, char * argv[], bool & exit) } totalDim.x = DIMLITTLEX * 16; - totalDim.y = DIMLITTLEY * 8; + totalDim.y = DIMLITTLEY * 9; iconDim.x = DIMLITTLEX; iconDim.y = DIMLITTLEY; if (!g_pPixmap->Cache (CHLITTLE, "image/little.png", totalDim, iconDim)) @@ -855,7 +885,7 @@ DoInit (int argc, char * argv[], bool & exit) } // Load all cursors - g_pPixmap->LoadCursors (); + g_pPixmap->LoadCursors (g_windowScale); g_pPixmap->ChangeSprite (SPRITE_WAIT); // met le sablier maison // Create the sound manager. @@ -902,6 +932,8 @@ DoInit (int argc, char * argv[], bool & exit) g_pEvent->Create (g_pPixmap, g_pDecor, g_pSound, g_pMovie); g_updateThread = new std::thread (CheckForUpdates); g_pEvent->SetFullScreen (g_bFullScreen); + if (!g_bFullScreen) + g_pEvent->SetWindowSize (g_windowScale); g_pEvent->ChangePhase (EV_PHASE_INTRO1); g_bTermInit = true; diff --git a/src/button.cxx b/src/button.cxx index 1ae2e48..7247a63 100644 --- a/src/button.cxx +++ b/src/button.cxx @@ -155,7 +155,7 @@ CButton::Draw () rect.right = m_pos.x + m_dim.x; rect.top = m_pos.y; rect.bottom = m_pos.y + m_dim.y; - m_pPixmap->DrawPart (-1, CHBACK, m_pos, rect, 1); // dessine le fond + m_pPixmap->DrawPart (-1, CHBACK, m_pos, rect); // dessine le fond return; } diff --git a/src/button.h b/src/button.h index 21fbc1d..a666f35 100644 --- a/src/button.h +++ b/src/button.h @@ -71,7 +71,7 @@ protected: bool m_bEnable; // true si bouton actif bool m_bHide; // true si bouton caché Uint32 m_message; // message envoyé si bouton actionné - Point m_pos; // coin sup/gauche + Point m_pos; // up/left corner Point m_dim; // dimensions Sint32 m_state; // 0=relâché, 1=pressé, +2=survollé Sint32 m_mouseState; // 0=relâché, 1=pressé, +2=survollé diff --git a/src/decblupi.cxx b/src/decblupi.cxx index d28a7be..f6f21e3 100644 --- a/src/decblupi.cxx +++ b/src/decblupi.cxx @@ -728,13 +728,18 @@ CDecor::BlupiInitAction (Sint32 rank, Sint32 action, Sint32 direct) if (m_blupi[rank].action == ACTION_STOP) m_blupi[rank].action = ACTION_D_STOP; - if (m_blupi[rank].action == ACTION_PICKAXE) + if ( + m_blupi[rank].action == ACTION_PICKAXE || + m_blupi[rank].action == ACTION_BUILDSEC) m_blupi[rank].action = ACTION_D_PICKAXE; if (m_blupi[rank].action == ACTION_BUILD) m_blupi[rank].action = ACTION_D_BUILD; - if (m_blupi[rank].action == ACTION_SAW) + if ( + m_blupi[rank].action == ACTION_SAW || + m_blupi[rank].action == ACTION_BUILDSOURD || + m_blupi[rank].action == ACTION_PIOCHESOURD) m_blupi[rank].action = ACTION_D_SAW; if (m_blupi[rank].action == ACTION_TCHAO) @@ -2008,7 +2013,7 @@ CDecor::GoalNextOp (Sint32 rank, Sint16 * pTable) m_blupi[rank].cel = cel; BlupiPushFog (rank); if (m_blupi[rank].bHili) - SetCoin (cel, true); + SetCorner (cel, true); return true; } @@ -2487,6 +2492,29 @@ CDecor::BlupiNextAction (Sint32 rank) return false; } } + + /* Prevent Blupi to take a trap when an enemy is already captured. */ + if (m_blupi[rank].perso == 0 && m_blupi[rank].action == ACTION_CARRY) + { + Sint32 ch, icon; + + auto exists = this->GetObject (m_blupi[rank].goalHili, ch, icon); + if (exists && ch == CHOBJECT) + { + switch (icon) + { + case 96: // spider in trap + case 97: // track in trap + case 98: // robot in trap + BlupiInitAction (rank, ACTION_STOP); + GoalStop (rank, true); + return false; + + default: + break; + } + } + } } if (m_blupi[rank].clicDelay > 0) @@ -3991,7 +4019,7 @@ CDecor::BlupiGoal (Sint32 rank, Buttons button, Point cel, Point cMem) if (direct == DIRECT_S) action = EV_ACTION_BOATS; - if (direct == DIRECT_O) + if (direct == DIRECT_W) action = EV_ACTION_BOATO; if (direct == DIRECT_N) action = EV_ACTION_BOATN; diff --git a/src/decgoal.cxx b/src/decgoal.cxx index 32c2f1c..1f39427 100644 --- a/src/decgoal.cxx +++ b/src/decgoal.cxx @@ -640,7 +640,7 @@ static Sint16 table_goal_build1[] = GOAL_ACTION, ACTION_BUILDSEC, DIRECT_S, GOAL_GOBLUPI, +1, +1, true, GOAL_GOBLUPI, 0, +1, true, - GOAL_ACTION, ACTION_BUILDSOURD, DIRECT_O, + GOAL_ACTION, ACTION_BUILDSOURD, DIRECT_W, GOAL_GOBLUPI, 0, -2, true, GOAL_GOBLUPI, -2, 0, true, GOAL_ACTION, ACTION_SAW, DIRECT_S, @@ -648,11 +648,11 @@ static Sint16 table_goal_build1[] = GOAL_GOBLUPI, 0, +1, true, // maison GOAL_BUILDOBJECT, -2, 0, CHOBJECT, 61, -1, -1, DIMOBJY / 10, 20, 10 * 100, - GOAL_ACTION, ACTION_BUILDSOURD, DIRECT_O, + GOAL_ACTION, ACTION_BUILDSOURD, DIRECT_W, GOAL_GOBLUPI, 0, +1, true, - GOAL_ACTION, ACTION_BUILDSOURD, DIRECT_O, + GOAL_ACTION, ACTION_BUILDSOURD, DIRECT_W, GOAL_GOBLUPI, 0, -1, true, - GOAL_ACTION, ACTION_BUILDSOURD, DIRECT_O, + GOAL_ACTION, ACTION_BUILDSOURD, DIRECT_W, GOAL_GOBLUPI, 0, -1, true, GOAL_GOBLUPI, -1, 0, true, GOAL_ACTION, ACTION_BUILDSEC, DIRECT_S, @@ -723,11 +723,11 @@ static Sint16 table_goal_build3[] = GOAL_ACTION, ACTION_BUILDSEC, DIRECT_S, GOAL_GOBLUPI, +1, 0, true, GOAL_GOBLUPI, 0, +1, true, - GOAL_ACTION, ACTION_BUILDSOURD, DIRECT_O, + GOAL_ACTION, ACTION_BUILDSOURD, DIRECT_W, GOAL_GOBLUPI, 0, -1, true, - GOAL_ACTION, ACTION_BUILDSOURD, DIRECT_O, + GOAL_ACTION, ACTION_BUILDSOURD, DIRECT_W, GOAL_GOBLUPI, 0, +1, true, - GOAL_ACTION, ACTION_BUILDSOURD, DIRECT_O, + GOAL_ACTION, ACTION_BUILDSOURD, DIRECT_W, GOAL_GOBLUPI, 0, -1, true, GOAL_ACTION, ACTION_STOP, DIRECT_E, GOAL_FINISHMOVE, @@ -752,7 +752,7 @@ static Sint16 table_goal_build4[] = GOAL_ACTION, ACTION_SAW, DIRECT_S, GOAL_GOBLUPI, +1, 0, true, GOAL_GOBLUPI, 0, +1, true, - GOAL_ACTION, ACTION_BUILDSOURD, DIRECT_O, + GOAL_ACTION, ACTION_BUILDSOURD, DIRECT_W, GOAL_GOBLUPI, 0, -2, true, GOAL_GOBLUPI, -1, 0, true, GOAL_ACTION, ACTION_SAW, DIRECT_S, @@ -760,11 +760,11 @@ static Sint16 table_goal_build4[] = GOAL_GOBLUPI, 0, +1, true, // mine GOAL_BUILDOBJECT, -2, 0, CHOBJECT, 122, -1, -1, DIMOBJY / 10, 20, 10 * 100, - GOAL_ACTION, ACTION_BUILDSOURD, DIRECT_O, + GOAL_ACTION, ACTION_BUILDSOURD, DIRECT_W, GOAL_GOBLUPI, 0, +1, true, - GOAL_ACTION, ACTION_BUILDSOURD, DIRECT_O, + GOAL_ACTION, ACTION_BUILDSOURD, DIRECT_W, GOAL_GOBLUPI, 0, -1, true, - GOAL_ACTION, ACTION_BUILDSOURD, DIRECT_O, + GOAL_ACTION, ACTION_BUILDSOURD, DIRECT_W, GOAL_GOBLUPI, 0, -1, true, GOAL_GOBLUPI, -1, 0, true, GOAL_ACTION, ACTION_BUILDSEC, DIRECT_S, @@ -801,11 +801,11 @@ static Sint16 table_goal_build5[] = GOAL_ACTION, ACTION_BUILDSEC, DIRECT_S, GOAL_GOBLUPI, +1, 0, true, GOAL_GOBLUPI, 0, +1, true, - GOAL_ACTION, ACTION_BUILDSOURD, DIRECT_O, + GOAL_ACTION, ACTION_BUILDSOURD, DIRECT_W, GOAL_GOBLUPI, 0, -1, true, - GOAL_ACTION, ACTION_BUILDSOURD, DIRECT_O, + GOAL_ACTION, ACTION_BUILDSOURD, DIRECT_W, GOAL_GOBLUPI, 0, +1, true, - GOAL_ACTION, ACTION_BUILDSOURD, DIRECT_O, + GOAL_ACTION, ACTION_BUILDSOURD, DIRECT_W, GOAL_GOBLUPI, 0, -1, true, GOAL_ACTION, ACTION_STOP, DIRECT_E, GOAL_FINISHMOVE, @@ -876,16 +876,16 @@ static Sint16 table_goal_mur[] = GOAL_ACTION, ACTION_BUILDBREF, DIRECT_S, GOAL_ACTION, ACTION_PIOCHEPIERRE, DIRECT_E, GOAL_ACTION, ACTION_PIOCHEPIERRE, DIRECT_E, - GOAL_ACTION, ACTION_BUILDBREF, DIRECT_O, + GOAL_ACTION, ACTION_BUILDBREF, DIRECT_W, GOAL_ACTION, ACTION_PIOCHEPIERRE, DIRECT_E, - GOAL_ACTION, ACTION_BUILDBREF, DIRECT_O, + GOAL_ACTION, ACTION_BUILDBREF, DIRECT_W, GOAL_ACTION, ACTION_PIOCHEPIERRE, DIRECT_E, GOAL_ACTION, ACTION_BUILDBREF, DIRECT_S, - GOAL_ACTION, ACTION_BUILDBREF, DIRECT_O, + GOAL_ACTION, ACTION_BUILDBREF, DIRECT_W, GOAL_ACTION, ACTION_PIOCHEPIERRE, DIRECT_E, GOAL_ACTION, ACTION_PIOCHEPIERRE, DIRECT_E, GOAL_ACTION, ACTION_PIOCHEPIERRE, DIRECT_E, - GOAL_ACTION, ACTION_BUILDBREF, DIRECT_O, + GOAL_ACTION, ACTION_BUILDBREF, DIRECT_W, GOAL_ACTION, ACTION_PIOCHEPIERRE, DIRECT_E, GOAL_ACTION, ACTION_TCHAO, DIRECT_E, GOAL_FINISHMOVE, @@ -911,16 +911,16 @@ static Sint16 table_goal_tour[] = GOAL_ACTION, ACTION_PIOCHEPIERRE, DIRECT_E, GOAL_PUTOBJECT, -1, 0, -1, -1, // enlève les pierres GOAL_GOBLUPI, 0, +1, true, - GOAL_ACTION, ACTION_BUILDBREF, DIRECT_O, + GOAL_ACTION, ACTION_BUILDBREF, DIRECT_W, GOAL_ACTION, ACTION_PIOCHEPIERRE, DIRECT_E, - GOAL_ACTION, ACTION_BUILDBREF, DIRECT_O, - GOAL_ACTION, ACTION_BUILDBREF, DIRECT_O, - GOAL_ACTION, ACTION_BUILDBREF, DIRECT_O, - GOAL_ACTION, ACTION_BUILDBREF, DIRECT_O, + GOAL_ACTION, ACTION_BUILDBREF, DIRECT_W, + GOAL_ACTION, ACTION_BUILDBREF, DIRECT_W, + GOAL_ACTION, ACTION_BUILDBREF, DIRECT_W, + GOAL_ACTION, ACTION_BUILDBREF, DIRECT_W, GOAL_ACTION, ACTION_PIOCHEPIERRE, DIRECT_E, - GOAL_ACTION, ACTION_BUILDBREF, DIRECT_O, - GOAL_ACTION, ACTION_BUILDBREF, DIRECT_O, - GOAL_ACTION, ACTION_BUILDBREF, DIRECT_O, + GOAL_ACTION, ACTION_BUILDBREF, DIRECT_W, + GOAL_ACTION, ACTION_BUILDBREF, DIRECT_W, + GOAL_ACTION, ACTION_BUILDBREF, DIRECT_W, GOAL_ACTION, ACTION_STOP, DIRECT_S, GOAL_FINISHMOVE, GOAL_ARRANGEOBJECT, -1, -1, @@ -1317,7 +1317,7 @@ static Sint16 table_goal_labo[] = GOAL_ADDMOVES, -1, -1, 10, // secoue GOAL_CACHE, true, false, GOAL_ACTION, ACTION_STOP, DIRECT_E, - GOAL_ACTION, ACTION_STOP, DIRECT_O, + GOAL_ACTION, ACTION_STOP, DIRECT_W, GOAL_SOUND, SOUND_LABO, GOAL_ACTION, ACTION_LABO, DIRECT_E, GOAL_SOUND, SOUND_DOOR, @@ -1785,7 +1785,7 @@ static Sint16 table_goal_pontol[] = GOAL_INTERRUPT, 0, // prioritaire GOAL_BUILDOBJECT, -10, -10, CHOBJECT, 72, -1, -1, DIMOBJY, 1, -1 * 100, GOAL_ADDMOVES, -10, -10, 7, // pont vers l'ouest - GOAL_ACTION, ACTION_BRIDGE, DIRECT_O, + GOAL_ACTION, ACTION_BRIDGE, DIRECT_W, GOAL_GROUP, 4, GOAL_FINISHMOVE, GOAL_PUTOBJECT, -10, -10, -1, -1, @@ -1798,7 +1798,7 @@ static Sint16 table_goal_pontol[] = GOAL_PUTFLOOR, -10, -10, CHFLOOR, -2, // vIcon GOAL_SOUND, SOUND_PLOUF, //? GOAL_GOBLUPI, 0,-1, true, - GOAL_ACTION, ACTION_STOP, DIRECT_O, + GOAL_ACTION, ACTION_STOP, DIRECT_W, GOAL_TERM, 0 }; @@ -1982,7 +1982,7 @@ static Sint16 table_goal_bateauo[] = GOAL_GROUP, 2, GOAL_BUILDOBJECT, -1, 0, CHOBJECT, 117, -1, -1, DIMOBJY, 1, -1 * 100, GOAL_ADDMOVES, -1, 0, 7, // bateau vers l'ouest - GOAL_ACTION, ACTION_BRIDGE, DIRECT_O, + GOAL_ACTION, ACTION_BRIDGE, DIRECT_W, GOAL_GROUP, 4, GOAL_FINISHMOVE, GOAL_PUTOBJECT, -1, 0, -1, -1, @@ -2227,7 +2227,7 @@ static Sint16 table_goal_r_build1[] = GOAL_GOBLUPI, 0, -1, true, GOAL_ACTION, ACTION_R_APLAT, DIRECT_E, GOAL_GOBLUPI, +1, 0, true, - GOAL_ACTION, ACTION_R_BUILD, DIRECT_O, + GOAL_ACTION, ACTION_R_BUILD, DIRECT_W, GOAL_GOBLUPI, 0, +1, true, GOAL_ACTION, ACTION_R_BUILD, DIRECT_E, GOAL_GOBLUPI, -1, 0, true, @@ -2235,7 +2235,7 @@ static Sint16 table_goal_r_build1[] = GOAL_GOBLUPI, +1, 0, true, GOAL_ACTION, ACTION_R_BUILD, DIRECT_E, GOAL_GOBLUPI, 0, -1, true, - GOAL_ACTION, ACTION_R_APLAT, DIRECT_O, + GOAL_ACTION, ACTION_R_APLAT, DIRECT_W, GOAL_ACTION, ACTION_R_STOP, DIRECT_S, GOAL_FINISHMOVE, GOAL_TERM, @@ -2265,7 +2265,7 @@ static Sint16 table_goal_r_build2[] = GOAL_GOBLUPI, 0, -1, true, GOAL_ACTION, ACTION_R_APLAT, DIRECT_E, GOAL_GOBLUPI, +1, 0, true, - GOAL_ACTION, ACTION_R_APLAT, DIRECT_O, + GOAL_ACTION, ACTION_R_APLAT, DIRECT_W, GOAL_GOBLUPI, 0, +1, true, GOAL_ACTION, ACTION_R_BUILD, DIRECT_S, GOAL_GOBLUPI, 0, -1, true, @@ -2273,7 +2273,7 @@ static Sint16 table_goal_r_build2[] = GOAL_GOBLUPI, 0, +1, true, GOAL_ACTION, ACTION_R_APLAT, DIRECT_S, GOAL_GOBLUPI, 0, -1, true, - GOAL_ACTION, ACTION_R_APLAT, DIRECT_O, + GOAL_ACTION, ACTION_R_APLAT, DIRECT_W, GOAL_ACTION, ACTION_R_STOP, DIRECT_S, GOAL_FINISHMOVE, GOAL_TERM, @@ -2301,7 +2301,7 @@ static Sint16 table_goal_r_build3[] = GOAL_BUILDOBJECT, -1, -1, CHOBJECT, 102, -1, -1, DIMOBJY / 4, 20, 4 * 100, GOAL_ACTION, ACTION_R_BUILD, DIRECT_E, GOAL_GOBLUPI, 0, -1, true, - GOAL_ACTION, ACTION_R_APLAT, DIRECT_O, + GOAL_ACTION, ACTION_R_APLAT, DIRECT_W, GOAL_GOBLUPI, +1, 0, true, GOAL_ACTION, ACTION_R_BUILD, DIRECT_N, GOAL_GOBLUPI, 0, +1, true, @@ -2341,7 +2341,7 @@ static Sint16 table_goal_r_build4[] = GOAL_GOBLUPI, 0, -1, true, GOAL_ACTION, ACTION_R_BUILD, DIRECT_S, GOAL_GOBLUPI, +1, 0, true, - GOAL_ACTION, ACTION_R_APLAT, DIRECT_O, + GOAL_ACTION, ACTION_R_APLAT, DIRECT_W, GOAL_GOBLUPI, 0, +1, true, GOAL_ACTION, ACTION_R_BUILD, DIRECT_S, GOAL_GOBLUPI, 0, -1, true, @@ -2379,7 +2379,7 @@ static Sint16 table_goal_r_build5[] = GOAL_GOBLUPI, 0, -1, true, GOAL_ACTION, ACTION_R_BUILD, DIRECT_S, GOAL_GOBLUPI, +1, 0, true, - GOAL_ACTION, ACTION_R_APLAT, DIRECT_O, + GOAL_ACTION, ACTION_R_APLAT, DIRECT_W, GOAL_GOBLUPI, 0, +1, true, GOAL_ACTION, ACTION_R_BUILD, DIRECT_S, GOAL_GOBLUPI, 0, -1, true, @@ -2417,7 +2417,7 @@ static Sint16 table_goal_r_build6[] = GOAL_GOBLUPI, 0, -1, true, GOAL_ACTION, ACTION_R_BUILD, DIRECT_S, GOAL_GOBLUPI, +1, 0, true, - GOAL_ACTION, ACTION_R_APLAT, DIRECT_O, + GOAL_ACTION, ACTION_R_APLAT, DIRECT_W, GOAL_GOBLUPI, 0, +1, true, GOAL_ACTION, ACTION_R_BUILD, DIRECT_S, GOAL_GOBLUPI, 0, -1, true, @@ -2440,17 +2440,17 @@ static Sint16 table_goal_r_make1[] = GOAL_GROUP, 2, GOAL_USINEFREE, -1, -1, GOAL_INTERRUPT, 0, // prioritaire - GOAL_ACTION, ACTION_R_LOAD, DIRECT_O, - GOAL_ACTION, ACTION_R_LOAD, DIRECT_O, - GOAL_ACTION, ACTION_R_BUILD, DIRECT_O, - GOAL_ACTION, ACTION_R_LOAD, DIRECT_O, - GOAL_ACTION, ACTION_R_LOAD, DIRECT_O, - GOAL_ACTION, ACTION_R_BUILD, DIRECT_O, - GOAL_ACTION, ACTION_R_LOAD, DIRECT_O, - GOAL_ACTION, ACTION_R_BUILD, DIRECT_O, - GOAL_ACTION, ACTION_R_LOAD, DIRECT_O, - GOAL_ACTION, ACTION_R_LOAD, DIRECT_O, - GOAL_ACTION, ACTION_R_BUILD, DIRECT_O, + GOAL_ACTION, ACTION_R_LOAD, DIRECT_W, + GOAL_ACTION, ACTION_R_LOAD, DIRECT_W, + GOAL_ACTION, ACTION_R_BUILD, DIRECT_W, + GOAL_ACTION, ACTION_R_LOAD, DIRECT_W, + GOAL_ACTION, ACTION_R_LOAD, DIRECT_W, + GOAL_ACTION, ACTION_R_BUILD, DIRECT_W, + GOAL_ACTION, ACTION_R_LOAD, DIRECT_W, + GOAL_ACTION, ACTION_R_BUILD, DIRECT_W, + GOAL_ACTION, ACTION_R_LOAD, DIRECT_W, + GOAL_ACTION, ACTION_R_LOAD, DIRECT_W, + GOAL_ACTION, ACTION_R_BUILD, DIRECT_W, GOAL_TERM, 0 }; @@ -2465,11 +2465,11 @@ static Sint16 table_goal_r_make2[] = GOAL_INTERRUPT, 0, // prioritaire GOAL_SOUND, SOUND_DOOR, GOAL_PUTOBJECT, -2, -1, CHOBJECT, 101, // ouvre la porte - GOAL_ACTION, ACTION_R_STOP, DIRECT_O, - GOAL_ACTION, ACTION_R_STOP, DIRECT_O, - GOAL_ACTION, ACTION_R_STOP, DIRECT_O, - GOAL_ACTION, ACTION_R_STOP, DIRECT_O, - GOAL_ACTION, ACTION_R_STOP, DIRECT_O, + GOAL_ACTION, ACTION_R_STOP, DIRECT_W, + GOAL_ACTION, ACTION_R_STOP, DIRECT_W, + GOAL_ACTION, ACTION_R_STOP, DIRECT_W, + GOAL_ACTION, ACTION_R_STOP, DIRECT_W, + GOAL_ACTION, ACTION_R_STOP, DIRECT_W, GOAL_GOBLUPI, -1, 0, true, GOAL_SOUND, SOUND_DOOR, GOAL_GROUP, 2, @@ -2530,11 +2530,11 @@ static Sint16 table_goal_r_make3[] = GOAL_INTERRUPT, 0, // prioritaire GOAL_SOUND, SOUND_DOOR, GOAL_PUTOBJECT, -2, -1, CHOBJECT, 103, // ouvre la porte - GOAL_ACTION, ACTION_R_STOP, DIRECT_O, - GOAL_ACTION, ACTION_R_STOP, DIRECT_O, - GOAL_ACTION, ACTION_R_STOP, DIRECT_O, - GOAL_ACTION, ACTION_R_STOP, DIRECT_O, - GOAL_ACTION, ACTION_R_STOP, DIRECT_O, + GOAL_ACTION, ACTION_R_STOP, DIRECT_W, + GOAL_ACTION, ACTION_R_STOP, DIRECT_W, + GOAL_ACTION, ACTION_R_STOP, DIRECT_W, + GOAL_ACTION, ACTION_R_STOP, DIRECT_W, + GOAL_ACTION, ACTION_R_STOP, DIRECT_W, GOAL_GOBLUPI, -1, 0, true, GOAL_SOUND, SOUND_DOOR, GOAL_GROUP, 2, @@ -2594,11 +2594,11 @@ static Sint16 table_goal_r_make4[] = GOAL_INTERRUPT, 0, // prioritaire GOAL_SOUND, SOUND_DOOR, GOAL_PUTOBJECT, -2, -1, CHOBJECT, 105, // ouvre la porte - GOAL_ACTION, ACTION_R_STOP, DIRECT_O, - GOAL_ACTION, ACTION_R_STOP, DIRECT_O, - GOAL_ACTION, ACTION_R_STOP, DIRECT_O, - GOAL_ACTION, ACTION_R_STOP, DIRECT_O, - GOAL_ACTION, ACTION_R_STOP, DIRECT_O, + GOAL_ACTION, ACTION_R_STOP, DIRECT_W, + GOAL_ACTION, ACTION_R_STOP, DIRECT_W, + GOAL_ACTION, ACTION_R_STOP, DIRECT_W, + GOAL_ACTION, ACTION_R_STOP, DIRECT_W, + GOAL_ACTION, ACTION_R_STOP, DIRECT_W, GOAL_GOBLUPI, -1, 0, true, GOAL_SOUND, SOUND_DOOR, GOAL_GROUP, 2, @@ -2658,11 +2658,11 @@ static Sint16 table_goal_r_make5[] = GOAL_INTERRUPT, 0, // prioritaire GOAL_SOUND, SOUND_DOOR, GOAL_PUTOBJECT, -2, -1, CHOBJECT, 116, // ouvre la porte - GOAL_ACTION, ACTION_R_STOP, DIRECT_O, - GOAL_ACTION, ACTION_R_STOP, DIRECT_O, - GOAL_ACTION, ACTION_R_STOP, DIRECT_O, - GOAL_ACTION, ACTION_R_STOP, DIRECT_O, - GOAL_ACTION, ACTION_R_STOP, DIRECT_O, + GOAL_ACTION, ACTION_R_STOP, DIRECT_W, + GOAL_ACTION, ACTION_R_STOP, DIRECT_W, + GOAL_ACTION, ACTION_R_STOP, DIRECT_W, + GOAL_ACTION, ACTION_R_STOP, DIRECT_W, + GOAL_ACTION, ACTION_R_STOP, DIRECT_W, GOAL_GOBLUPI, -1, 0, true, GOAL_SOUND, SOUND_DOOR, GOAL_GROUP, 2, @@ -2722,11 +2722,11 @@ static Sint16 table_goal_r_make6[] = GOAL_INTERRUPT, 0, // prioritaire GOAL_SOUND, SOUND_DOOR, GOAL_PUTOBJECT, -2, -1, CHOBJECT, 18, // ouvre la porte - GOAL_ACTION, ACTION_R_STOP, DIRECT_O, - GOAL_ACTION, ACTION_R_STOP, DIRECT_O, - GOAL_ACTION, ACTION_R_STOP, DIRECT_O, - GOAL_ACTION, ACTION_R_STOP, DIRECT_O, - GOAL_ACTION, ACTION_R_STOP, DIRECT_O, + GOAL_ACTION, ACTION_R_STOP, DIRECT_W, + GOAL_ACTION, ACTION_R_STOP, DIRECT_W, + GOAL_ACTION, ACTION_R_STOP, DIRECT_W, + GOAL_ACTION, ACTION_R_STOP, DIRECT_W, + GOAL_ACTION, ACTION_R_STOP, DIRECT_W, GOAL_GOBLUPI, -1, 0, true, GOAL_SOUND, SOUND_DOOR, GOAL_GROUP, 2, @@ -2940,7 +2940,7 @@ static Sint16 table_goal_drapeau3[] = GOAL_INTERRUPT, 0, // prioritaire GOAL_WORK, 0, -1, GOAL_BUILDOBJECT, 0, -1, CHOBJECT, 124, -1, -1, DIMOBJY / 10, 8, 10 * 100, - GOAL_ACTION, ACTION_PIOCHESOURD, DIRECT_O, + GOAL_ACTION, ACTION_PIOCHESOURD, DIRECT_W, GOAL_GOBLUPI, +1, -1, true, GOAL_ACTION, ACTION_PIOCHESOURD, DIRECT_E, GOAL_ADDDRAPEAU, -1, 0, @@ -2968,7 +2968,7 @@ static Sint16 table_goal_extrait[] = GOAL_ADDMOVES, -1, -1, 11, // secoue GOAL_CACHE, true, false, GOAL_ACTION, ACTION_STOP, DIRECT_E, - GOAL_ACTION, ACTION_STOP, DIRECT_O, + GOAL_ACTION, ACTION_STOP, DIRECT_W, GOAL_SOUND, SOUND_MINE, GOAL_ACTION, ACTION_LABO, DIRECT_E, GOAL_GROUP, 2, @@ -3015,7 +3015,7 @@ static Sint16 table_goal_fabjeep[] = GOAL_ADDMOVES, -1, -1, 12, // secoue GOAL_CACHE, true, false, GOAL_ACTION, ACTION_STOP, DIRECT_E, - GOAL_ACTION, ACTION_STOP, DIRECT_O, + GOAL_ACTION, ACTION_STOP, DIRECT_W, GOAL_SOUND, SOUND_USINE, GOAL_ACTION, ACTION_LABO, DIRECT_E, GOAL_GROUP, 2, @@ -3058,7 +3058,7 @@ static Sint16 table_goal_fabarmure[] = GOAL_ADDMOVES, -1, -1, 12, // secoue GOAL_CACHE, true, false, GOAL_ACTION, ACTION_STOP, DIRECT_E, - GOAL_ACTION, ACTION_STOP, DIRECT_O, + GOAL_ACTION, ACTION_STOP, DIRECT_W, GOAL_SOUND, SOUND_USINE, GOAL_ACTION, ACTION_LABO, DIRECT_E, GOAL_GROUP, 2, @@ -3101,7 +3101,7 @@ static Sint16 table_goal_fabmine[] = GOAL_ADDMOVES, -1, -1, 12, // secoue GOAL_CACHE, true, false, GOAL_ACTION, ACTION_STOP, DIRECT_E, - GOAL_ACTION, ACTION_STOP, DIRECT_O, + GOAL_ACTION, ACTION_STOP, DIRECT_W, GOAL_SOUND, SOUND_USINE, GOAL_ACTION, ACTION_LABO, DIRECT_E, GOAL_GROUP, 2, @@ -3150,7 +3150,7 @@ static Sint16 table_goal_fabdisc[] = GOAL_BUILDOBJECT, 0, -1, CHOBJECT, 119, -1, -1, DIMOBJY, 1, -1 * 100, GOAL_ADDMOVES, 0, -1, 12, // secoue GOAL_ACTION, ACTION_STOP, DIRECT_E, - GOAL_ACTION, ACTION_STOP, DIRECT_O, + GOAL_ACTION, ACTION_STOP, DIRECT_W, GOAL_SOUND, SOUND_USINE, GOAL_ACTION, ACTION_LABO, DIRECT_E, GOAL_GROUP, 2, diff --git a/src/decio.cxx b/src/decio.cxx index 7990a28..1ad8929 100644 --- a/src/decio.cxx +++ b/src/decio.cxx @@ -136,7 +136,7 @@ CDecor::Write (Sint32 rank, bool bUser, Sint32 world, Sint32 time, Sint32 total) pBuffer->majRev = 1; pBuffer->minRev = 5; - pBuffer->celCoin = m_celCoin; + pBuffer->celCoin = m_celCorner; pBuffer->world = world; pBuffer->time = time; pBuffer->totalTime = total; @@ -255,7 +255,7 @@ CDecor::Read ( goto error; } - SetCoin (pBuffer->celCoin); + SetCorner (pBuffer->celCoin); if (bUser) { world = pBuffer->world; @@ -511,7 +511,7 @@ CDecor::Flush () m_celHome.x = 90; m_celHome.y = 98; - SetCoin (m_celHome); + SetCorner (m_celHome); InitAfterBuild (); LoadImages (); } diff --git a/src/decmap.cxx b/src/decmap.cxx index 28147a3..66d4d5b 100644 --- a/src/decmap.cxx +++ b/src/decmap.cxx @@ -114,8 +114,8 @@ CDecor::ConvCelToMap (Point cel) { Point pos; - pos.x = (cel.x - m_celCoin.x) - (cel.y - m_celCoin.y); - pos.y = ((cel.x - m_celCoin.x) + (cel.y - m_celCoin.y)) / 2; + pos.x = (cel.x - m_celCorner.x) - (cel.y - m_celCorner.y); + pos.y = ((cel.x - m_celCorner.x) + (cel.y - m_celCorner.y)) / 2; pos.x += (DIMMAPX - MAPCADREX) / 2; pos.y += (DIMMAPY - MAPCADREY) / 2; @@ -136,8 +136,8 @@ CDecor::ConvMapToCel (Point pos) cel.x = pos.y + pos.x / 2; cel.y = pos.y - pos.x / 2; - cel.x += m_celCoin.x; - cel.y += m_celCoin.y; + cel.x += m_celCorner.x; + cel.y += m_celCorner.y; return cel; } @@ -158,7 +158,7 @@ CDecor::MapMove (Point pos) cel = ConvMapToCel (pos); cel.x = cel.x - 10; cel.y = cel.y; - SetCoin (cel); + SetCorner (cel); NextPhase (0); // faudra refaire la carte tout de suite return true; } @@ -533,6 +533,16 @@ CDecor::GenerateMap () if (m_blupi[rank].bExist) { pos = ConvCelToMap (m_blupi[rank].cel); + + if (this->GetSkill () >= 1 && !m_bBuild) + { + auto fogCel = m_blupi[rank].cel; + fogCel.x = (fogCel.x / 4) * 4; + fogCel.y = (fogCel.y / 4) * 4; + if (m_decor[fogCel.x / 2][fogCel.y / 2].fog == FOGHIDE) // hidden? + continue; + } + if ( pos.x >= 0 && pos.x < DIMMAPX - 1 && pos.y >= 0 && pos.y < DIMMAPY - 1) { @@ -550,7 +560,7 @@ CDecor::GenerateMap () } // Dessine le cadre. - cel = m_celCoin; + cel = m_celCorner; pos = ConvCelToMap (cel); for (i = pos.x; i < pos.x + MAPCADREX; i++) diff --git a/src/decor.cxx b/src/decor.cxx index 431ca5b..e110a2f 100644 --- a/src/decor.cxx +++ b/src/decor.cxx @@ -90,14 +90,14 @@ GetVector (Sint32 direct) case DIRECT_S: vector.y = +1; break; - case DIRECT_SO: + case DIRECT_SW: vector.x = -1; vector.y = +1; break; - case DIRECT_O: + case DIRECT_W: vector.x = -1; break; - case DIRECT_NO: + case DIRECT_NW: vector.x = -1; vector.y = -1; break; @@ -119,8 +119,8 @@ CDecor::CDecor () m_pSound = nullptr; m_pUndoDecor = nullptr; - m_celCoin.x = 90; - m_celCoin.y = 98; + m_celCorner.x = 90; + m_celCorner.y = 98; m_celHili.x = -1; m_celOutline1.x = -1; @@ -465,8 +465,8 @@ CDecor::ConvCelToPos (Point cel) { Point pos; - pos.x = ((cel.x - m_celCoin.x) - (cel.y - m_celCoin.y)) * (DIMCELX / 2); - pos.y = ((cel.x - m_celCoin.x) + (cel.y - m_celCoin.y)) * (DIMCELY / 2); + pos.x = ((cel.x - m_celCorner.x) - (cel.y - m_celCorner.y)) * (DIMCELX / 2); + pos.y = ((cel.x - m_celCorner.x) + (cel.y - m_celCorner.y)) * (DIMCELY / 2); pos.x += POSDRAWX + m_shiftOffset.x; pos.y += POSDRAWY + m_shiftOffset.y; @@ -500,8 +500,8 @@ CDecor::ConvPosToCel (Point pos, bool bMap) cel.y -= (DIMCELX * DIMCELY); cel.y /= (DIMCELX * DIMCELY); - cel.x += m_celCoin.x; - cel.y += m_celCoin.y; + cel.x += m_celCorner.x; + cel.y += m_celCorner.y; return cel; } @@ -516,19 +516,19 @@ CDecor::ConvPosToCel2 (Point pos) pos.x -= POSDRAWX + DIMCELX / 2; pos.y -= POSDRAWY; - if (m_celCoin.x % 2 != 0 && m_celCoin.y % 2 == 0) + if (m_celCorner.x % 2 != 0 && m_celCorner.y % 2 == 0) { pos.x += DIMCELX / 2; pos.y += DIMCELY / 2; } - if (m_celCoin.x % 2 == 0 && m_celCoin.y % 2 != 0) + if (m_celCorner.x % 2 == 0 && m_celCorner.y % 2 != 0) { pos.x -= DIMCELX / 2; pos.y += DIMCELY / 2; } - if (m_celCoin.x % 2 != 0 && m_celCoin.y % 2 != 0) + if (m_celCorner.x % 2 != 0 && m_celCorner.y % 2 != 0) pos.y += DIMCELY; cel.x = @@ -539,8 +539,8 @@ CDecor::ConvPosToCel2 (Point pos) cel.y -= (DIMCELX * 2 * DIMCELY * 2); cel.y /= (DIMCELX * 2 * DIMCELY * 2); - cel.x = (cel.x * 2 + m_celCoin.x) / 2 * 2; - cel.y = (cel.y * 2 + m_celCoin.y) / 2 * 2; + cel.x = (cel.x * 2 + m_celCorner.x) / 2 * 2; + cel.y = (cel.y * 2 + m_celCorner.y) / 2 * 2; return cel; } @@ -684,7 +684,7 @@ CDecor::BuildMoveFloor (Sint32 x, Sint32 y, Point pos, Sint32 rank) m_move[rank].maskChannel, icon, m_move[rank].channel, m_move[rank].icon, 0); - m_pPixmap->DrawIcon (-1, m_move[rank].channel, 0, pos, true); + m_pPixmap->DrawIcon (-1, m_move[rank].channel, 0, pos); } else { @@ -2985,8 +2985,8 @@ CDecor::GetResHili (Point posMouse) { Sint32 icon; - // Les valeurs `corner == true` correspondent aux objets placés - // au coin inf/droit de la cellule. + // The `corner == true` values are corresponding to the objects + // positionned at the bottom/right corner of the cell. struct object_t { bool corner; const char * text; @@ -3261,33 +3261,33 @@ CDecor::HideTooltips (bool bHide) // Modifie l'origine supérieure/gauche du décor. void -CDecor::SetCoin (Point coin, bool bCenter) +CDecor::SetCorner (Point corner, bool bCenter) { if (bCenter) { - coin.x -= 10; - coin.y -= 2; + corner.x -= 10; + corner.y -= 2; } - if (coin.x < -8) - coin.x = -8; - if (coin.x > MAXCELX - 12) - coin.x = MAXCELX - 12; - if (coin.y < -2) - coin.y = -2; - if (coin.y > MAXCELY - 4) - coin.y = MAXCELY - 4; + if (corner.x < -8) + corner.x = -8; + if (corner.x > MAXCELX - 12) + corner.x = MAXCELX - 12; + if (corner.y < -2) + corner.y = -2; + if (corner.y > MAXCELY - 4) + corner.y = MAXCELY - 4; - m_celCoin = coin; + m_celCorner = corner; m_bGroundRedraw = true; // faudra redessiner les sols m_celHili.x = -1; m_textLastPos.x = -1; // tooltips plus lavable ! } Point -CDecor::GetCoin () +CDecor::GetCorner () { - return m_celCoin; + return m_celCorner; } Point @@ -3312,7 +3312,7 @@ CDecor::MemoPos (Sint32 rank, bool bRecord) if (bRecord) { m_pSound->PlayImage (SOUND_CLOSE, pos); - m_memoPos[rank] = m_celCoin; + m_memoPos[rank] = m_celCorner; } else { @@ -3321,7 +3321,7 @@ CDecor::MemoPos (Sint32 rank, bool bRecord) else { m_pSound->PlayImage (SOUND_GOAL, pos); - SetCoin (m_memoPos[rank], false); + SetCorner (m_memoPos[rank], false); } } } diff --git a/src/decor.h b/src/decor.h index e0fc5b5..01e4ec4 100644 --- a/src/decor.h +++ b/src/decor.h @@ -406,8 +406,8 @@ public: bool GetObject (Point cel, Sint32 & channel, Sint32 & icon); bool SetFire (Point cel, bool bFire); - void SetCoin (Point coin, bool bCenter = false); - Point GetCoin (); + void SetCorner (Point corner, bool bCenter = false); + Point GetCorner (); Point GetHome (); void MemoPos (Sint32 rank, bool bRecord); @@ -467,7 +467,7 @@ protected: Sint16 m_rankBlupi[MAXCELX][MAXCELY]; Blupi m_blupi[MAXBLUPI]; Move m_move[MAXMOVE]; - Point m_celCoin; // cellule sup/gauche + Point m_celCorner; // cellule sup/gauche Point m_celHome; // pour touche Home Point m_celHili; Point m_celOutline1; diff --git a/src/decstat.cxx b/src/decstat.cxx index 5ed69da..639e362 100644 --- a/src/decstat.cxx +++ b/src/decstat.cxx @@ -472,9 +472,22 @@ CDecor::StatisticUpdate () } if (m_blupi[rank].perso == 8) // disciple ? table_statistic[STATDISCIPLE].nb++; + + // Hide enemies from the stat when hidden by the fog + bool hide = false; + if (this->GetSkill () >= 1 && this->m_bFog) + { + auto fogCel = m_blupi[rank].cel; + fogCel.x = (fogCel.x / 4) * 4; + fogCel.y = (fogCel.y / 4) * 4; + if (m_decor[fogCel.x / 2][fogCel.y / 2].fog == FOGHIDE) // hidden? + hide = true; + } + if (m_blupi[rank].perso == 4) // robot ? { - table_statistic[STATROBOT].nb++; + if (!hide) + table_statistic[STATROBOT].nb++; m_nbStatRobots++; x = (m_blupi[rank].cel.x / 2) * 2; y = (m_blupi[rank].cel.y / 2) * 2; @@ -485,27 +498,32 @@ CDecor::StatisticUpdate () } if (m_blupi[rank].perso == 3) // tracks ? { - table_statistic[STATTRACKS].nb++; + if (!hide) + table_statistic[STATTRACKS].nb++; if (!m_term.bHachRobot) // pas robot sur hachures ? m_nbStatRobots++; } if (m_blupi[rank].perso == 1) // araignée ? { - table_statistic[STATARAIGNEE].nb++; + if (!hide) + table_statistic[STATARAIGNEE].nb++; if (!m_term.bHachRobot) // pas robot sur hachures ? m_nbStatRobots++; } if (m_blupi[rank].perso == 2) // virus ? - table_statistic[STATVIRUS].nb++; + if (!hide) + table_statistic[STATVIRUS].nb++; if (m_blupi[rank].perso == 5) // bombe ? { - table_statistic[STATBOMBE].nb++; + if (!hide) + table_statistic[STATBOMBE].nb++; if (!m_term.bHachRobot) // pas robot sur hachures ? m_nbStatRobots++; } if (m_blupi[rank].perso == 7) // électro ? { - table_statistic[STATELECTRO].nb++; + if (!hide) + table_statistic[STATELECTRO].nb++; if (!m_term.bHachRobot) // pas robot sur hachures ? m_nbStatRobots++; } @@ -675,7 +693,7 @@ CDecor::StatisticDraw () rect.top = pos.y; rect.bottom = pos.y + DIMSTATY; - m_pPixmap->DrawPart (-1, CHBACK, pos, rect, 1); // dessine le fond + m_pPixmap->DrawPart (-1, CHBACK, pos, rect); // dessine le fond if (rank == 0 && m_bStatUp) { @@ -750,7 +768,7 @@ CDecor::StatisticDraw () rect.right = pos.x + POSDRAWX; rect.top = pos.y; rect.bottom = pos.y + 16; - m_pPixmap->DrawPart (-1, CHBACK, pos, rect, 1); // dessine le fond + m_pPixmap->DrawPart (-1, CHBACK, pos, rect); // dessine le fond if (strlen (textRes)) { @@ -956,7 +974,7 @@ CDecor::StatisticDown (Point pos) return false; select: - SetCoin (cel, true); + SetCorner (cel, true); NextPhase (0); // faudra refaire la carte tout de suite return true; } @@ -1009,6 +1027,14 @@ CDecor::StatisticDetect (Point pos) if (rank >= STATNB) return -1; + auto pStatistic = StatisticGet (rank); + if ( + this->GetSkill () >= 1 && pStatistic->perso >= 0 && + (pStatistic->perso != 0 && pStatistic->perso != 8)) + { + return -1; + } + return rank; } diff --git a/src/def.h b/src/def.h index f8d2440..0b8602a 100644 --- a/src/def.h +++ b/src/def.h @@ -23,50 +23,50 @@ #include // clang-format off -#define _INTRO true // true si images d'introduction +#define _INTRO true // true for init screen - -#define LXIMAGE 640 // dimensions de la fenêtre de jeu +#define SCRFACTOR 4 / 3 +#define LXIMAGE (480 * SCRFACTOR + (480 * SCRFACTOR) % 2) // window size #define LYIMAGE 480 -#define POSDRAWX 144 // surface de dessin +#define POSDRAWX 144 // draw surface #define POSDRAWY 15 -#define DIMDRAWX 480 +#define DIMDRAWX (LXIMAGE - (640 - 480)) #define DIMDRAWY 450 -#define POSMAPX 8 // surface pour la carte +#define POSMAPX 8 // map surface #define POSMAPY 15 #define DIMMAPX 128 #define DIMMAPY 128 -#define MAXCELX 200 // nb max de cellules d'un monde +#define MAXCELX 200 // max cells for a world #define MAXCELY 200 -#define DIMCELX 60 // dimensions d'une cellule (décor) +#define DIMCELX 60 // cell size (decor) #define DIMCELY 30 -#define DIMOBJX 120 // dimensions d'un objet +#define DIMOBJX 120 // object size #define DIMOBJY 120 -#define DIMBLUPIX 60 // dimensions de blupi +#define DIMBLUPIX 60 // Blupi size #define DIMBLUPIY 60 -#define SHIFTBLUPIY 5 // petit décalage vers le haut +#define SHIFTBLUPIY 5 // shift on top -#define DIMBUTTONX 40 // dimensions d'un button +#define DIMBUTTONX 40 // button size #define DIMBUTTONY 40 -#define DIMJAUGEX 124 // dimensions de la jauge +#define DIMJAUGEX 124 // progress size #define DIMJAUGEY 22 -#define POSSTATX 12 // statistiques +#define POSSTATX 12 // statistics #define POSSTATY 220 #define DIMSTATX 60 #define DIMSTATY 30 -#define DIMTEXTX 16 // dimensions max d'un caractère +#define DIMTEXTX 16 // max char size #define DIMTEXTY 16 -#define DIMLITTLEX 16 // dimensions max d'un petit caractère +#define DIMLITTLEX 16 // max small char size #define DIMLITTLEY 12 #define CHBACK 0 @@ -94,9 +94,9 @@ enum Directions { DIRECT_E = (0 * 16), // east DIRECT_SE = (1 * 16), // south-east DIRECT_S = (2 * 16), // south - DIRECT_SO = (3 * 16), // south-west - DIRECT_O = (4 * 16), // west - DIRECT_NO = (5 * 16), // north-west + DIRECT_SW = (3 * 16), // south-west + DIRECT_W = (4 * 16), // west + DIRECT_NW = (5 * 16), // north-west DIRECT_N = (6 * 16), // north DIRECT_NE = (7 * 16), // north-east }; diff --git a/src/event.cxx b/src/event.cxx index ddf3926..a832d2e 100644 --- a/src/event.cxx +++ b/src/event.cxx @@ -1259,63 +1259,69 @@ static Phase table[] = { EV_BUTTON1, 0, {1, 40}, - 170 + 42 * 0, 30 + 42 * 0, + 170 + 42 * 1, 30 + 42 * 0, { translate ("No music") }, }, { EV_BUTTON2, 0, {1, 44}, - 170 + 42 * 0, 30 + 42 * 1, + 170 + 42 * 0, 30 + 42 * 0, { translate ("Music number 1") }, }, { EV_BUTTON3, 0, {1, 44}, - 170 + 42 * 0, 30 + 42 * 2, + 170 + 42 * 0, 30 + 42 * 1, { translate ("Music number 2") }, }, { EV_BUTTON4, 0, {1, 44}, - 170 + 42 * 0, 30 + 42 * 3, + 170 + 42 * 0, 30 + 42 * 2, { translate ("Music number 3") }, }, { EV_BUTTON5, 0, {1, 44}, - 170 + 42 * 0, 30 + 42 * 4, + 170 + 42 * 0, 30 + 42 * 3, { translate ("Music number 4") }, }, { EV_BUTTON6, 0, {1, 44}, - 170 + 42 * 0, 30 + 42 * 5, + 170 + 42 * 0, 30 + 42 * 4, { translate ("Music number 5") }, }, { EV_BUTTON7, 0, {1, 44}, - 170 + 42 * 0, 30 + 42 * 6, + 170 + 42 * 0, 30 + 42 * 5, { translate ("Music number 6") }, }, { EV_BUTTON8, 0, {1, 44}, - 170 + 42 * 0, 30 + 42 * 7, + 170 + 42 * 0, 30 + 42 * 6, { translate ("Music number 7") }, }, { EV_BUTTON9, 0, {1, 44}, - 170 + 42 * 0, 30 + 42 * 8, + 170 + 42 * 0, 30 + 42 * 7, { translate ("Music number 8") }, }, { EV_BUTTON10, 0, {1, 44}, - 170 + 42 * 0, 30 + 42 * 9, + 170 + 42 * 0, 30 + 42 * 8, { translate ("Music number 9") }, }, + { + EV_BUTTON11, + 0, {1, 44}, + 170 + 42 * 0, 30 + 42 * 9, + { translate ("Music number 10") }, + }, { EV_PHASE_BUILD, 0, {1, 50}, @@ -1546,7 +1552,6 @@ CEvent::CEvent () m_bSpeed = false; m_bHelp = false; m_bAllMissions = false; - m_bChangeCheat = false; m_scrollSpeed = 1; m_bPause = false; m_bShift = false; @@ -1588,6 +1593,8 @@ CEvent::CEvent () m_Languages.push_back (Language::en_US); m_Languages.push_back (Language::fr); m_Languages.push_back (Language::de); + m_Languages.push_back (Language::it); + m_Languages.push_back (Language::pl); this->m_LangStart = GetLocale (); @@ -1597,6 +1604,10 @@ CEvent::CEvent () m_Lang = m_Languages.begin () + 2; else if (this->m_LangStart == "de") m_Lang = m_Languages.begin () + 3; + else if (this->m_LangStart == "it") + m_Lang = m_Languages.begin () + 4; + else if (this->m_LangStart == "pl") + m_Lang = m_Languages.begin () + 5; else m_Lang = m_Languages.begin (); @@ -1648,6 +1659,7 @@ CEvent::SetFullScreen (bool bFullScreen) SDL_SetWindowPosition ( g_window, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED); + m_pPixmap->LoadCursors (m_WindowScale); m_pPixmap->ReloadTargetTextures (); /* Force this update before otherwise the coordinates retrieved with @@ -1661,6 +1673,33 @@ CEvent::SetFullScreen (bool bFullScreen) CEvent::PushUserEvent (EV_WARPMOUSE, coord); } +/** + * \brief Change the size of the window. + * + * We use an integer scale to be sure that the pixels are always well formed. + * + * \param[in] newScale - The new scale. + */ +void +CEvent::SetWindowSize (Uint8 newScale) +{ + if (newScale == m_WindowScale) + return; + + auto scale = m_WindowScale; + m_WindowScale = newScale; + switch (newScale) + { + case 1: + case 2: + SetWindowSize (scale, m_WindowScale); + break; + + default: + return; + } +} + /** * \brief Change the size of the window. * @@ -1679,6 +1718,7 @@ CEvent::SetWindowSize (Uint8 prevScale, Uint8 newScale) SDL_SetWindowPosition ( g_window, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED); + m_pPixmap->LoadCursors (newScale); m_pPixmap->ReloadTargetTextures (); /* Force this update before otherwise the coordinates retrieved with @@ -1930,12 +1970,10 @@ CEvent::DrawButtons () bool bEnable; if ( - (m_phase == EV_PHASE_PLAY && m_bChangeCheat) || + (m_phase == EV_PHASE_PLAY) || (m_phase != EV_PHASE_PLAY && m_phase != EV_PHASE_INSERT && m_phase != EV_PHASE_INTRO1 && m_phase != EV_PHASE_BYE)) { - m_bChangeCheat = false; - text[0] = 0; if (m_bAllMissions) AddCheatCode (text, cheat_code[3]); @@ -1947,14 +1985,17 @@ CEvent::DrawButtons () AddCheatCode (text, cheat_code[6]); if (m_pDecor->GetSuper ()) AddCheatCode (text, cheat_code[7]); - pos.x = 2; - pos.y = 2; - rect.left = pos.x; - rect.right = pos.x + 300; - rect.top = pos.y; - rect.bottom = pos.y + DIMLITTLEY; - m_pPixmap->DrawPart (-1, CHBACK, pos, rect, 1); // dessine le fond - DrawText (m_pPixmap, pos, text, FONTLITTLE); + + if (text[0]) + { + pos.x = 2; + pos.y = 2; + rect.left = pos.x; + rect.right = pos.x + 300; + rect.top = pos.y; + rect.bottom = pos.y + DIMLITTLEY; + DrawText (m_pPixmap, pos, text, FONTLITTLE); + } } if (m_phase == EV_PHASE_INIT) @@ -2110,7 +2151,7 @@ CEvent::DrawButtons () rect.right = pos.x + 20; rect.top = pos.y; rect.bottom = pos.y + 15; - m_pPixmap->DrawPart (-1, CHBACK, pos, rect, 1); // dessine le fond + m_pPixmap->DrawPart (-1, CHBACK, pos, rect); // dessine le fond if (m_speed > 1) { snprintf (res, sizeof (res), "x%d", m_speed); @@ -2128,7 +2169,7 @@ CEvent::DrawButtons () rect.right = POSDRAWX + DIMDRAWX; rect.top = 0; rect.bottom = lg; - m_pPixmap->DrawPart (-1, CHBACK, pos, rect, 1); + m_pPixmap->DrawPart (-1, CHBACK, pos, rect); pos.x = POSDRAWX; pos.y = lg; @@ -2136,7 +2177,7 @@ CEvent::DrawButtons () rect.right = POSDRAWX + DIMDRAWX; rect.top = 0; rect.bottom = POSDRAWY; - m_pPixmap->DrawPart (-1, CHBACK, pos, rect, 1); + m_pPixmap->DrawPart (-1, CHBACK, pos, rect); pos.x = POSDRAWX + 20; pos.y = POSDRAWY + 4; @@ -2423,7 +2464,7 @@ CEvent::DrawButtons () DrawText (m_pPixmap, pos, list[GetWorld () % 5]); } - // Affiche le texte lorsque c'est fini. + // Show the ending text when the game is finished. if (m_phase == EV_PHASE_LASTWIN) { char * text; @@ -2440,7 +2481,7 @@ CEvent::DrawButtons () DrawText (m_pPixmap, pos, text); } - // Dessine les réglages. + // Draw the game settings. if (m_phase == EV_PHASE_SETUP || m_phase == EV_PHASE_SETUPp) { DrawTextCenter (gettext ("Global game\nspeed"), 54 + 40, 80); @@ -2502,6 +2543,10 @@ CEvent::DrawButtons () lang = "Français"; else if (locale == "de") lang = "Deutsch"; + else if (locale == "it") + lang = "Italiano"; + else if (locale == "pl") + lang = "Polski"; lg = GetTextWidth (lang.c_str ()); pos.x = (54 + 40) - lg / 2; @@ -2580,7 +2625,7 @@ CEvent::DrawButtons () DrawText (m_pPixmap, pos, text); } - // Affiche le texte lorsqu'il faut insérer le CD-Rom. + // Show the text when the CD-Rom must be inserted (deprecated). if (m_phase == EV_PHASE_INSERT) DrawTextCenter ( gettext ("Insert CD-Rom Planet Blupi and wait a few seconds..."), @@ -2589,15 +2634,19 @@ CEvent::DrawButtons () if (m_phase == EV_PHASE_BUILD) SetEnable (EV_PHASE_UNDO, m_pDecor->IsUndo ()); - // Dessine les tool tips (info bulle). + // Draw the tooltips. if (m_textToolTips[0] != 0) DrawText (m_pPixmap, m_posToolTips, m_textToolTips); return true; } -// Retourne le lutin à utiliser à une position donnée. - +/** + * \brief Return the mouse sprite to use for a position. + * + * \param[in] pos - The position. + * \return the sprite. + */ MouseSprites CEvent::MousePosToSprite (Point pos) { @@ -2668,8 +2717,11 @@ CEvent::MousePosToSprite (Point pos) return sprite; } -// Gère le lutin de la souris. - +/** + * \brief Main mouse sprite handling. + * + * \param[in] pos - The position. + */ void CEvent::MouseSprite (Point pos) { @@ -2677,8 +2729,11 @@ CEvent::MouseSprite (Point pos) m_pPixmap->ChangeSprite (m_mouseSprite); } -// Met ou enlève le sablier de la souris. - +/** + * \brief Set or remove the waiting mouse sprite. + * + * \param[in] bWait - If waiting. + */ void CEvent::WaitMouse (bool bWait) { @@ -2692,8 +2747,11 @@ CEvent::WaitMouse (bool bWait) m_pPixmap->ChangeSprite (m_mouseSprite); } -// Cache ou montre la souris. - +/** + * \brief Hide or show the mouse. + * + * \param[in] bHide - If hide. + */ void CEvent::HideMouse (bool bHide) { @@ -2714,8 +2772,13 @@ CEvent::HideMouse (bool bHide) m_pPixmap->ChangeSprite (m_mouseSprite); } -// Traite les événements pour tous les boutons. - +/** + * \brief Handle events for buttons. + * + * \param[in] event - The SDL event. + * \param[in] pos - The position. + * \return true if the event is handled. + */ bool CEvent::EventButtons (const SDL_Event & event, Point pos) { @@ -2805,7 +2868,7 @@ CEvent::EventButtons (const SDL_Event & event, Point pos) (event.button.button == SDL_BUTTON_LEFT || event.button.button == SDL_BUTTON_RIGHT)) { - // Montre ou cache les infos tout en haut. + // Show or hide the informations at the top. m_pDecor->SetInfoMode (!m_pDecor->GetInfoMode ()); } } @@ -2828,7 +2891,7 @@ CEvent::EventButtons (const SDL_Event & event, Point pos) (event.button.button == SDL_BUTTON_LEFT || event.button.button == SDL_BUTTON_RIGHT)) { - // Inverse le mode aide dans les infos. + // Reverse the help mode in the informations. m_bInfoHelp = !m_bInfoHelp; if (m_bInfoHelp) @@ -2846,7 +2909,7 @@ CEvent::EventButtons (const SDL_Event & event, Point pos) (event.button.button == SDL_BUTTON_LEFT || event.button.button == SDL_BUTTON_RIGHT)) { - m_pDecor->HideTooltips (true); // plus de tooltips pour décor + m_pDecor->HideTooltips (true); // Remove tooltips for the decor. } if ( event.type == SDL_MOUSEBUTTONUP && @@ -2875,8 +2938,12 @@ CEvent::EventButtons (const SDL_Event & event, Point pos) return false; } -// Indique si la souris est sur un bouton. - +/** + * \brief Notify if the mouse is on a button. + * + * \param[in] pos - The mouse position. + * \return true if the mouse is on a button. + */ bool CEvent::MouseOnButton (Point pos) { @@ -2896,8 +2963,12 @@ CEvent::MouseOnButton (Point pos) return false; } -// Retourne l'index dans table pour une phase donnée. - +/** + * \brief Return the table index for a specific phase. + * + * \param[in] phase - The phase. + * \return the index in `table`. + */ Sint32 CEvent::SearchPhase (Uint32 phase) { @@ -2913,8 +2984,11 @@ CEvent::SearchPhase (Uint32 phase) return -1; } -// Donne le numéro du monde. - +/** + * \brief Return the world number. + * + * \return the number. + */ Sint32 CEvent::GetWorld () { @@ -2926,8 +3000,13 @@ CEvent::GetWorld () return m_mission; } -// Donne le numéro physique du monde. - +/** + * \brief Return the physical world number. + * + * This number should be the same as the filename. + * + * \return the number. + */ Sint32 CEvent::GetPhysicalWorld () { @@ -2950,8 +3029,11 @@ CEvent::GetImageWorld () return 1; } -// Indique si l'aide est disponible. - +/** + * Notify if the help is available. + * + * \return true if available. + */ bool CEvent::IsHelpHide () { @@ -2961,14 +3043,18 @@ CEvent::IsHelpHide () bHide = false; if (m_bSchool || m_bPrivate) { - bHide = true; // pas d'aide pour les exercices + bHide = true; // No help for the exercises. } return bHide; } -// Change de phase. - +/** + * \brief Change the phase. + * + * \param[in] phase - The new phase. + * \return true if the phase has changed. + */ bool CEvent::ChangePhase (Uint32 phase) { @@ -3037,11 +3123,11 @@ CEvent::ChangePhase (Uint32 phase) m_pSound->StopAllSounds (false, &except); } - m_phase = phase; // change de phase + m_phase = phase; // change phase m_index = index; filename = table[m_index].backName; - if (filename.find ("%.3d") != std::string::npos) // "%.3d" dans le nom ? + if (filename.find ("%.3d") != std::string::npos) filename = string_format (table[m_index].backName, GetImageWorld ()); totalDim.x = LXIMAGE; totalDim.y = LYIMAGE; @@ -3049,10 +3135,10 @@ CEvent::ChangePhase (Uint32 phase) iconDim.y = 0; if (!m_pPixmap->Cache (CHBACK, filename, totalDim, iconDim)) { - WaitMouse (false); // enlève le sablier + WaitMouse (false); m_tryInsertCount = 40; m_tryPhase = m_phase; - return ChangePhase (EV_PHASE_INSERT); // insérez le CD-Rom ... + return ChangePhase (EV_PHASE_INSERT); // insert the CD-Rom ... } if ( @@ -3077,13 +3163,13 @@ CEvent::ChangePhase (Uint32 phase) { if ( !m_pDecor->Read ( - GetPhysicalWorld (), false, world, time, total) && // lit le monde + GetPhysicalWorld (), false, world, time, total) && // read the world !m_bAccessBuild && !m_bPrivate) { m_tryInsertCount = 40; m_tryPhase = m_phase; - return ChangePhase (EV_PHASE_INSERT); // insérez le CD-Rom ... + return ChangePhase (EV_PHASE_INSERT); // insert the CD-Rom ... } m_pDecor->SetTime (0); m_pDecor->SetTotalTime (0); @@ -3119,7 +3205,7 @@ CEvent::ChangePhase (Uint32 phase) if (m_phase == EV_PHASE_TESTCD) { - if (m_pDecor->Read (0, false, world, time, total)) // lit un monde + if (m_pDecor->Read (0, false, world, time, total)) // read the world { return ChangePhase (EV_PHASE_INIT); // ok } @@ -3127,44 +3213,43 @@ CEvent::ChangePhase (Uint32 phase) { m_tryInsertCount = 40; m_tryPhase = m_phase; - return ChangePhase (EV_PHASE_INSERT); // insérez le CD-Rom ... + return ChangePhase (EV_PHASE_INSERT); // insert the CD-Rom ... } } - m_jauges[0].SetHide (true); // cache les jauges + m_jauges[0].SetHide (true); m_jauges[1].SetHide (true); - CreateButtons (); // crée les boutons selon la phase + CreateButtons (); // create the buttons accordingly to the phase m_bMenu = false; m_pDecor->HideTooltips (false); m_menu.Delete (); - m_pDecor->BlupiSetArrow (0, false); // enlève toutes les flèches - m_pDecor->ResetHili (); // enlève les mises en évidence + m_pDecor->BlupiSetArrow (0, false); // remove all arrows + m_pDecor->ResetHili (); // remove all highlights if (m_phase == EV_PHASE_PLAY) { m_pDecor->LoadImages (); m_pDecor->SetBuild (false); m_pDecor->EnableFog (true); - m_pDecor->NextPhase (0); // refait la carte tout de suite + m_pDecor->NextPhase (0); // rebuild the map immediatly m_pDecor->StatisticInit (); m_pDecor->TerminatedInit (); - m_bChangeCheat = true; // affiche les cheat-codes } if (m_phase == EV_PHASE_BUILD) { m_bBuildModify = true; SetState (EV_DECOR1, 1); - SetMenu (EV_DECOR1, 0); // herbe - SetMenu (EV_DECOR2, 2); // arbre - SetMenu (EV_DECOR3, 1); // maison - SetMenu (EV_DECOR4, 2); // blupi fort - SetMenu (EV_DECOR5, 1); // feu + SetMenu (EV_DECOR1, 0); // grass + SetMenu (EV_DECOR2, 2); // tree + SetMenu (EV_DECOR3, 1); // house + SetMenu (EV_DECOR4, 2); // strong blupi + SetMenu (EV_DECOR5, 1); // fire m_pDecor->LoadImages (); m_pDecor->SetBuild (true); m_pDecor->EnableFog (false); m_pDecor->BlupiDeselect (); - m_pDecor->NextPhase (0); // refait la carte tout de suite + m_pDecor->NextPhase (0); // rebuild the map immediatly } if (m_phase == EV_PHASE_INFO) @@ -3250,7 +3335,7 @@ CEvent::ChangePhase (Uint32 phase) { music = m_pDecor->GetMusic (); - for (i = 0; i < 10; i++) + for (i = 0; i < 11; i++) SetState (EV_BUTTON1 + i, music == i ? 1 : 0); } @@ -3266,7 +3351,7 @@ CEvent::ChangePhase (Uint32 phase) { if (m_pSound->IsPlayingMusic ()) { - m_pSound->AdaptVolumeMusic (); // adapte le volume + m_pSound->AdaptVolumeMusic (); } else { @@ -3316,20 +3401,24 @@ CEvent::ChangePhase (Uint32 phase) m_phaseAfterMovie = EV_PHASE_LASTWIN; } - WaitMouse (false); // enlève le sablier + WaitMouse (false); return true; } -// Retourne la phase en cours. - +/** + * \brief Return the current phase. + * + * \return the phase number. + */ Uint32 CEvent::GetPhase () { return m_phase; } -// Essaye de lire le CD-Rom. - +/** + * \brief Try to read the CD-Rom. + */ void CEvent::TryInsert () { @@ -3339,47 +3428,57 @@ CEvent::TryInsert () m_tryInsertCount--; } -// Fait démarrer un film si nécessaire. - -void +/** + * \brief Start a movie if necessary. + * + * \return true if the movie has started. + */ +bool CEvent::MovieToStart () { - if (m_movieToStart[0] != 0) // y a-t-il un film à démarrer ? - { - HideMouse (true); // cache la souris + bool movie = false; + if (m_movieToStart[0] != 0) // is movie available? + { if (StartMovie (m_movieToStart)) { - m_phase = m_phaseAfterMovie; // prochaine phase normale + movie = true; + m_phase = m_phaseAfterMovie; // the next normal phase } else ChangePhase (m_phaseAfterMovie); m_movieToStart[0] = 0; } + + return movie; } -// Décale le décor. - +/** + * \brief Shift the decor. + * + * \param[in] dx - Delta x. + * \param[in] dy - Delta y. + */ void CEvent::DecorShift (Sint32 dx, Sint32 dy) { - Point coin; + Point corner; if (m_phase != EV_PHASE_PLAY && m_phase != EV_PHASE_BUILD) return; - coin = m_pDecor->GetCoin (); + corner = m_pDecor->GetCorner (); - coin.x += dx; - coin.y += dy; + corner.x += dx; + corner.y += dy; - m_pDecor->SetCoin (coin); - //? m_pDecor->NextPhase(0); // faudra refaire la carte tout de suite + m_pDecor->SetCorner (corner); } -// Décale le décor lorsque la souris touche un bord. - +/** + * \brief Shift the decor when the mouse is on the sides. + */ void CEvent::DecorAutoShift () { @@ -3395,7 +3494,7 @@ CEvent::DecorAutoShift () if (m_phase == EV_PHASE_PLAY || m_phase == EV_PHASE_BUILD) { - if (m_shiftPhase == 0) // début du shift ? + if (m_shiftPhase == 0) // start shift ? { switch (m_mouseSprite) { @@ -3476,7 +3575,7 @@ CEvent::DecorAutoShift () offset.y = m_shiftOffset.y * (max - m_shiftPhase) * (DIMCELY / 2 / max); m_pDecor->SetShiftOffset (offset); - if (m_shiftPhase == 0) // dernière phase ? + if (m_shiftPhase == 0) // last phase ? { offset.x = 0; offset.y = 0; @@ -3487,8 +3586,11 @@ CEvent::DecorAutoShift () } } -// Indique su un shift est en cours. - +/** + * \brief Notify if a shift is doing. + * + * \return true of the shift is doing. + */ bool CEvent::IsShift () { @@ -3547,7 +3649,7 @@ CEvent::PlayDown (Point pos, const SDL_Event & event) if (bMap) { - m_pDecor->SetCoin (cel, true); + m_pDecor->SetCorner (cel, true); m_pDecor->NextPhase (0); // faudra refaire la carte tout de suite return true; } @@ -3649,6 +3751,10 @@ CEvent::GetStartLanguage () return Language::fr; if (this->m_LangStart == "de") return Language::de; + if (this->m_LangStart == "it") + return Language::it; + if (this->m_LangStart == "pl") + return Language::pl; return Language::en; } @@ -3683,6 +3789,12 @@ CEvent::SetLanguage (Language lang) case Language::de: slang = "de"; break; + case Language::it: + slang = "it"; + break; + case Language::pl: + slang = "pl"; + break; } snprintf (env, sizeof (env), "LANGUAGE=%s", slang); @@ -4196,8 +4308,6 @@ CEvent::BuildMove (Point pos, Uint16 mod, const SDL_Event & event) bool CEvent::StartMovie (const std::string & pFilename) { - Rect rect; - if (!m_pMovie->GetEnable ()) return false; if (!m_bMovie) @@ -4206,15 +4316,12 @@ CEvent::StartMovie (const std::string & pFilename) if (!m_pMovie->IsExist (pFilename)) return false; - rect.left = 1; // mystère: plante avec 0,0,LXIMAGE,LYIMAGE !!! - rect.top = 1; - rect.right = LXIMAGE - 2; - rect.bottom = LYIMAGE - 2; - + HideMouse (true); m_pSound->StopMusic (); - if (!m_pMovie->Play (rect, pFilename)) + if (!m_pMovie->Play (pFilename)) return false; + m_bRunMovie = true; return true; } @@ -4512,6 +4619,8 @@ CEvent::ReadInfo () if (file == nullptr) goto error; + SDL_memset (&info, 0, sizeof (info)); + nb = fread (&info, sizeof (DescInfo), 1, file); if (nb < 1) goto error; @@ -4531,7 +4640,11 @@ CEvent::ReadInfo () m_pSound->SetMidiVolume (info.midiVolume); if ((info.majRev == 1 && info.minRev >= 1) || info.majRev >= 2) + { + if (info.language >= static_cast (Language::end)) + info.language = 0; this->SetLanguage (static_cast (info.language)); + } fclose (file); return true; @@ -5066,42 +5179,36 @@ CEvent::TreatEventBase (const SDL_Event & event) { m_bAllMissions = !m_bAllMissions; bEnable = m_bAllMissions; - m_bChangeCheat = true; break; } case 4: // quick ? { - m_bSpeed = !m_bSpeed; - bEnable = m_bSpeed; - m_bChangeCheat = true; + m_bSpeed = !m_bSpeed; + bEnable = m_bSpeed; break; } case 5: // helpme ? { - m_bHelp = !m_bHelp; - bEnable = m_bHelp; - m_bChangeCheat = true; + m_bHelp = !m_bHelp; + bEnable = m_bHelp; break; } case 6: // invincible ? { m_pDecor->SetInvincible (!m_pDecor->GetInvincible ()); - bEnable = m_pDecor->GetInvincible (); - m_bChangeCheat = true; + bEnable = m_pDecor->GetInvincible (); break; } case 7: // superblupi ? { m_pDecor->SetSuper (!m_pDecor->GetSuper ()); - bEnable = m_pDecor->GetSuper (); - m_bChangeCheat = true; + bEnable = m_pDecor->GetSuper (); break; } case 8: // construire ? { m_bAccessBuild = !m_bAccessBuild; bEnable = m_bAccessBuild; - m_bChangeCheat = true; break; } } @@ -5165,6 +5272,9 @@ CEvent::TreatEventBase (const SDL_Event & event) return true; case EV_PHASE_STOP: + ChangePhase (EV_PHASE_PLAY); + return true; + case EV_PHASE_LOST: case EV_PHASE_BUILD: ChangePhase (EV_PHASE_INFO); @@ -5258,7 +5368,7 @@ CEvent::TreatEventBase (const SDL_Event & event) } case SDLK_HOME: pos = m_pDecor->GetHome (); - m_pDecor->SetCoin (pos); + m_pDecor->SetCorner (pos); return true; case SDLK_SPACE: if (m_bRunMovie) @@ -5270,6 +5380,9 @@ CEvent::TreatEventBase (const SDL_Event & event) m_pDecor->FlipOutline (); return true; case SDLK_PAUSE: + if (this->m_pDecor->GetSkill () >= 1) + return true; + m_bPause = !m_bPause; if (m_phase == EV_PHASE_PLAY) { diff --git a/src/event.h b/src/event.h index 67469cb..1bce476 100644 --- a/src/event.h +++ b/src/event.h @@ -81,6 +81,9 @@ enum class Language { en_US = 1, fr = 2, de = 3, + it = 4, + pl = 5, + end, }; class CEvent @@ -98,7 +101,7 @@ public: Sint32 GetImageWorld (); bool IsHelpHide (); bool ChangePhase (Uint32 phase); - void MovieToStart (); + bool MovieToStart (); Uint32 GetPhase (); void TryInsert (); @@ -140,6 +143,7 @@ public: void IntroStep (); Uint8 GetWindowScale (); + void SetWindowSize (Uint8 newScale); void SetUpdateVersion (const std::string & version); static void PushUserEvent (Sint32 code, void * data = nullptr); @@ -236,7 +240,6 @@ protected: bool m_bSpeed; bool m_bHelp; bool m_bAllMissions; - bool m_bChangeCheat; Sint32 m_scrollSpeed; bool m_bPause; bool m_bShift; diff --git a/src/fix.cxx b/src/fix.cxx index 69b8613..3230941 100644 --- a/src/fix.cxx +++ b/src/fix.cxx @@ -628,76 +628,77 @@ CDecor::ArrangeObject (Point cel) } } - // Arrange les rayons entre les tours. if ( - m_decor[cel.x / 2][cel.y / 2].objectIcon == 27 || // tour ? - m_decor[cel.x / 2][cel.y / 2].objectIcon == -1) // rien ? + g_restoreBugs && + (m_decor[cel.x / 2][cel.y / 2].objectIcon != 27 && // not a tower? + m_decor[cel.x / 2][cel.y / 2].objectIcon != -1)) + return; + + // Arrange les rayons entre les tours. + for (i = 0; i < 4; i++) { - for (i = 0; i < 4; i++) + vector = GetVector (i * 2 * 16); + test = cel; + + bTour = false; + j = 0; + while (true) { - vector = GetVector (i * 2 * 16); - test = cel; + test.x += vector.x * 2; + test.y += vector.y * 2; + if (m_decor[test.x / 2][test.y / 2].objectIcon == 27) // tour ? + { + bTour = true; + break; + } + + if ( + m_decor[test.x / 2][test.y / 2].objectIcon != -1 && + m_decor[test.x / 2][test.y / 2].objectIcon != 10001 - i % 2) + break; + + j++; + if (j >= 2 + 1) + break; + } + + if (m_decor[cel.x / 2][cel.y / 2].objectIcon != 27) // pas tour ? bTour = false; - j = 0; - while (true) - { - test.x += vector.x * 2; - test.y += vector.y * 2; - if (m_decor[test.x / 2][test.y / 2].objectIcon == 27) // tour ? + test = cel; + for (k = 0; k < j; k++) + { + test.x += vector.x * 2; + test.y += vector.y * 2; + + if (bTour) + { + channel = CHOBJECT; + icon = 10001 - i % 2; // rayon e-o (10001) ou n-s (10000) + } + else + { + channel = -1; + icon = -1; + } + m_decor[test.x / 2][test.y / 2].objectChannel = channel; + m_decor[test.x / 2][test.y / 2].objectIcon = icon; + + if (!m_bBuild && bTour) + { + if (MoveCreate ( + test, -1, false, CHOBJECT, -1, -1, -1, 9999, 1, 0, true)) { - bTour = true; - break; + MoveAddIcons (test, 5 - i % 2, true); // éclairs } - if ( - m_decor[test.x / 2][test.y / 2].objectIcon != -1 && - m_decor[test.x / 2][test.y / 2].objectIcon != 10001 - i % 2) - break; - - j++; - if (j >= 2 + 1) - break; + pos = ConvCelToPos (test); + m_pSound->PlayImage (SOUND_RAYON1, pos); } - if (m_decor[cel.x / 2][cel.y / 2].objectIcon != 27) // pas tour ? - bTour = false; - - test = cel; - for (k = 0; k < j; k++) - { - test.x += vector.x * 2; - test.y += vector.y * 2; - - if (bTour) - { - channel = CHOBJECT; - icon = 10001 - i % 2; // rayon e-o (10001) ou n-s (10000) - } - else - { - channel = -1; - icon = -1; - } - m_decor[test.x / 2][test.y / 2].objectChannel = channel; - m_decor[test.x / 2][test.y / 2].objectIcon = icon; - - if (!m_bBuild && bTour) - { - if (MoveCreate ( - test, -1, false, CHOBJECT, -1, -1, -1, 9999, 1, 0, true)) - { - MoveAddIcons (test, 5 - i % 2, true); // éclairs - } - - pos = ConvCelToPos (test); - m_pSound->PlayImage (SOUND_RAYON1, pos); - } - - if (!m_bBuild && !bTour) - MoveFinish (test); - } + if (!m_bBuild && !bTour) + MoveFinish (test); } } } diff --git a/src/fog.cxx b/src/fog.cxx index f4d3ba2..8e6dd2f 100644 --- a/src/fog.cxx +++ b/src/fog.cxx @@ -87,7 +87,7 @@ GetFogIcon (char * pBits) // Table donnant la "vision" d'un blupi dans le // brouillard. // clang-format off -static char table_fog[17 * 17] = +static Sint8 table_fog[17 * 17] = { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, diff --git a/src/menu.h b/src/menu.h index d3f728c..ccd7c0f 100644 --- a/src/menu.h +++ b/src/menu.h @@ -60,7 +60,7 @@ protected: CDecor * m_pDecor; CSound * m_pSound; CEvent * m_pEvent; - Point m_pos; // coin sup/gauche + Point m_pos; // up/left corner Point m_dim; // dimensions Sint32 m_nbButtons; Point m_nbCel; diff --git a/src/movie.cxx b/src/movie.cxx index d4c7feb..a7172bf 100644 --- a/src/movie.cxx +++ b/src/movie.cxx @@ -90,7 +90,7 @@ CMovie::fileCloseMovie () // Sets on success. bool -CMovie::fileOpenMovie (Rect rect, const std::string & pFilename) +CMovie::fileOpenMovie (const std::string & pFilename) { const auto path = GetBaseDir () + pFilename; @@ -108,21 +108,22 @@ CMovie::fileOpenMovie (Rect rect, const std::string & pFilename) if (m_player == nullptr) return false; - pinfo = new Kit_PlayerInfo; - Kit_GetPlayerInfo (m_player, pinfo); + Kit_PlayerInfo info; + Kit_GetPlayerInfo (m_player, &info); SDL_AudioSpec wanted_spec, audio_spec; SDL_memset (&wanted_spec, 0, sizeof (wanted_spec)); - wanted_spec.freq = pinfo->audio.samplerate; - wanted_spec.format = pinfo->audio.format; - wanted_spec.channels = pinfo->audio.channels; + wanted_spec.freq = info.audio.samplerate; + wanted_spec.format = info.audio.format; + wanted_spec.channels = info.audio.channels; m_audioDev = SDL_OpenAudioDevice (nullptr, 0, &wanted_spec, &audio_spec, 0); SDL_PauseAudioDevice (m_audioDev, 0); m_videoTex = SDL_CreateTexture ( - g_renderer, pinfo->video.format, SDL_TEXTUREACCESS_STATIC, - pinfo->video.width, pinfo->video.height); + g_renderer, info.video.format, SDL_TEXTUREACCESS_TARGET, info.video.width, + info.video.height); + if (m_videoTex == nullptr) return false; @@ -145,7 +146,10 @@ CMovie::playMovie () // play/pause the AVI movie if (m_fPlaying) + { + this->starting = true; Kit_PlayerPlay (m_player); + } else Kit_PlayerPause (m_player); } @@ -159,7 +163,6 @@ CMovie::CMovie () m_movie = nullptr; m_player = nullptr; m_videoTex = nullptr; - pinfo = nullptr; memset (m_audiobuf, 0, sizeof (m_audiobuf)); @@ -207,11 +210,12 @@ CMovie::IsExist (const std::string & pFilename) // Montre un film avi. bool -CMovie::Play (Rect rect, const std::string & pFilename) +CMovie::Play (const std::string & pFilename) { if (!m_bEnable) return false; - if (!fileOpenMovie (rect, pFilename)) + + if (!fileOpenMovie (pFilename)) return false; playMovie (); @@ -289,6 +293,15 @@ CMovie::Render () SDL_SetRenderDrawColor (g_renderer, 0, 0, 0, 255); SDL_RenderClear (g_renderer); + if (this->starting) + { + SDL_SetRenderTarget (g_renderer, m_videoTex); + SDL_SetRenderDrawColor (g_renderer, 0, 0, 0, 255); + SDL_RenderClear (g_renderer); + SDL_SetRenderTarget (g_renderer, nullptr); + this->starting = false; + } + // Refresh videotexture and render it Kit_GetVideoData (m_player, m_videoTex); SDL_RenderCopy (g_renderer, m_videoTex, nullptr, nullptr); diff --git a/src/movie.h b/src/movie.h index d10b410..bd9098f 100644 --- a/src/movie.h +++ b/src/movie.h @@ -38,7 +38,7 @@ public: bool Create (); bool GetEnable (); bool IsExist (const std::string & pFilename); - bool Play (Rect rect, const std::string & pFilename); + bool Play (const std::string & pFilename); void Stop (); void Pause (); void Resume (); @@ -46,13 +46,12 @@ public: protected: void playMovie (); - bool fileOpenMovie (Rect rect, const std::string & pFilename); + bool fileOpenMovie (const std::string & pFilename); void fileCloseMovie (); void termAVI (); bool initAVI (); protected: - Kit_PlayerInfo * pinfo; Kit_Source * m_movie; Kit_Player * m_player; SDL_Texture * m_videoTex; @@ -61,6 +60,7 @@ protected: char m_audiobuf[AUDIOBUFFER_SIZE]; bool m_bEnable; + bool starting; bool m_fPlaying; // Play flag: true == playing, false == paused bool m_fMovieOpen; // Open flag: true == movie open, false = none }; diff --git a/src/obstacle.cxx b/src/obstacle.cxx index 5ac5f3c..15ad199 100644 --- a/src/obstacle.cxx +++ b/src/obstacle.cxx @@ -2228,17 +2228,17 @@ CDecor::DirectSearch (Point cel, Point goal) { if (dir.y > 0) { - direct = DIRECT_SO; + direct = DIRECT_SW; if (tan < 41) - direct = DIRECT_O; + direct = DIRECT_W; if (tan > 241) direct = DIRECT_S; } else { - direct = DIRECT_NO; + direct = DIRECT_NW; if (tan < 41) - direct = DIRECT_O; + direct = DIRECT_W; if (tan > 241) direct = DIRECT_N; } @@ -3724,7 +3724,7 @@ CDecor::IsBuildBateau (Point cel, Sint32 & direct) fChannel == CHFLOOR && fIcon == 4 && // rivage ? oChannel == -1 && oIcon == -1) { - direct = DIRECT_O; + direct = DIRECT_W; return true; } diff --git a/src/pixmap.cxx b/src/pixmap.cxx index 23c6c1c..52b8a5e 100644 --- a/src/pixmap.cxx +++ b/src/pixmap.cxx @@ -373,8 +373,7 @@ CPixmap::IsIconPixel (size_t channel, Sint32 rank, Point pos) // Les modes sont 0=transparent, 1=opaque. bool -CPixmap::DrawIcon ( - Sint32 chDst, size_t channel, Sint32 rank, Point pos, bool bMask) +CPixmap::DrawIcon (Sint32 chDst, size_t channel, Sint32 rank, Point pos) { Sint32 nbx, nby; Rect rect; @@ -411,8 +410,7 @@ CPixmap::DrawIcon ( // 33,48 35,49 bool -CPixmap::DrawIconDemi ( - Sint32 chDst, size_t channel, Sint32 rank, Point pos, bool bMask) +CPixmap::DrawIconDemi (Sint32 chDst, size_t channel, Sint32 rank, Point pos) { Sint32 nbx, nby; Rect rect; @@ -445,7 +443,7 @@ CPixmap::DrawIconDemi ( bool CPixmap::DrawIconPart ( Sint32 chDst, size_t channel, Sint32 rank, Point pos, Sint32 startY, - Sint32 endY, bool bMask) + Sint32 endY) { Sint32 nbx, nby; Rect rect; @@ -477,8 +475,7 @@ CPixmap::DrawIconPart ( // Dessine une partie d'image n'importe o�. bool -CPixmap::DrawPart ( - Sint32 chDst, size_t channel, Point dest, Rect rect, bool bMask) +CPixmap::DrawPart (Sint32 chDst, size_t channel, Point dest, Rect rect) { if (m_SDLTextureInfo.find (channel) == m_SDLTextureInfo.end ()) return false; @@ -770,7 +767,7 @@ CPixmap::GetCursorRect (MouseSprites sprite) } void -CPixmap::LoadCursors () +CPixmap::LoadCursors (Uint8 scale) { Uint32 rmask, gmask, bmask, amask; @@ -791,16 +788,20 @@ on the endianness (byte order) of the machine */ for (int i = SPRITE_BEGIN; i <= SPRITE_END; ++i) { MouseSprites sprite = static_cast (i); + + if (m_lpSDLCursors[sprite - 1]) + SDL_FreeCursor (m_lpSDLCursors[sprite - 1]); + SDL_Point hotspot = this->GetCursorHotSpot (sprite); SDL_Rect rect = this->GetCursorRect (sprite); - SDL_Surface * surface = - SDL_CreateRGBSurface (0, rect.w, rect.h, 32, rmask, gmask, bmask, amask); - SDL_BlitSurface (m_lpSDLBlupi, &rect, surface, nullptr); + SDL_Surface * surface = SDL_CreateRGBSurface ( + 0, rect.w * scale, rect.h * scale, 32, rmask, gmask, bmask, amask); + SDL_BlitScaled (m_lpSDLBlupi, &rect, surface, nullptr); // FIXME: change cursor first value to 0 m_lpSDLCursors[sprite - 1] = - SDL_CreateColorCursor (surface, hotspot.x, hotspot.y); + SDL_CreateColorCursor (surface, hotspot.x * scale, hotspot.y * scale); SDL_FreeSurface (surface); } } diff --git a/src/pixmap.h b/src/pixmap.h index 0777281..4f0950b 100644 --- a/src/pixmap.h +++ b/src/pixmap.h @@ -66,15 +66,12 @@ public: bool IsIconPixel (size_t channel, Sint32 rank, Point pos); - bool DrawIcon ( - Sint32 chDst, size_t channel, Sint32 rank, Point pos, bool bMask = false); - bool DrawIconDemi ( - Sint32 chDst, size_t channel, Sint32 rank, Point pos, bool bMask = false); + bool DrawIcon (Sint32 chDst, size_t channel, Sint32 rank, Point pos); + bool DrawIconDemi (Sint32 chDst, size_t channel, Sint32 rank, Point pos); bool DrawIconPart ( Sint32 chDst, size_t channel, Sint32 rank, Point pos, Sint32 startY, - Sint32 endY, bool bMask = false); - bool DrawPart ( - Sint32 chDst, size_t channel, Point dest, Rect rect, bool bMask = false); + Sint32 endY); + bool DrawPart (Sint32 chDst, size_t channel, Point dest, Rect rect); bool DrawImage (Sint32 chDst, size_t channel, Rect rect); bool BuildIconMask ( @@ -85,7 +82,7 @@ public: void SetMouseSprite (MouseSprites sprite); void MouseShow (bool bShow); - void LoadCursors (); + void LoadCursors (Uint8 scale); void ChangeSprite (MouseSprites sprite); protected: diff --git a/src/progress.cxx b/src/progress.cxx index b464b7d..6b131aa 100644 --- a/src/progress.cxx +++ b/src/progress.cxx @@ -72,7 +72,7 @@ CJauge::Draw () rect.right = m_pos.x + m_dim.x; rect.top = m_pos.y; rect.bottom = m_pos.y + m_dim.y; - m_pPixmap->DrawPart (-1, CHBACK, m_pos, rect, 1); // dessine le fond + m_pPixmap->DrawPart (-1, CHBACK, m_pos, rect); // dessine le fond return; } diff --git a/src/progress.h b/src/progress.h index 478fc2e..3ac2184 100644 --- a/src/progress.h +++ b/src/progress.h @@ -46,7 +46,7 @@ protected: CDecor * m_pDecor; CSound * m_pSound; bool m_bHide; // true si bouton caché - Point m_pos; // coin sup/gauche + Point m_pos; // up/left corner Point m_dim; // dimensions Sint32 m_type; Sint32 m_level; diff --git a/src/text.cxx b/src/text.cxx index b98a7cc..7a96d2d 100644 --- a/src/text.cxx +++ b/src/text.cxx @@ -22,35 +22,62 @@ #include #include "def.h" +#include "misc.h" #include "pixmap.h" #include "text.h" /** * \brief Return the character offset for the sprite. * - * \param[in] c - The character (incremented if 0xC3 UTF-8). + * \param[in] c - The character (incremented if 0xC3 or 0xC4 or 0xC5 UTF-8). * \returns the offset. */ static Sint32 GetOffset (const char *& c) { + /* clang-format off */ static const unsigned char table_accents[] = { - /* ü à â é è ë ê ï */ - /* 0xFC, 0xE0, 0xE2, 0xE9, 0xE8, 0xEB, 0xEA, 0xEF, // CP1252 */ - 0xBC, 0xA0, 0xA2, 0xA9, 0xA8, 0xAB, 0xAA, 0xAF, // UTF-8 - /* î ô ù û ä ö ç */ - /* 0xEE, 0xF4, 0xF9, 0xFB, 0xE4, 0xF6, 0xE7, // CP1252 */ - 0xAE, 0xB4, 0xB9, 0xBB, 0xA4, 0xB6, 0xA7, // UTF-8 + /* ü à â é è ë ê ï */ + 0xBC, 0xA0, 0xA2, 0xA9, 0xA8, 0xAB, 0xAA, 0xAF, /* UTF-8 */ + /* î ô ù û ä ö ç */ + 0xAE, 0xB4, 0xB9, 0xBB, 0xA4, 0xB6, 0xA7, /* UTF-8 */ }; + static const unsigned char table_extended[] = { + /* Italian */ + /* ò ì */ + 0xB2, 0xAC, /* UTF-8 */ + /* Polish */ + /* ń ó ę ć ź ż */ + 0x84, 0xB3, 0x99, 0x87, 0xBA, 0xBC, /* UTF-8 */ + /* ą ł ś */ + 0x85, 0x82, 0x9B, /* UTF-8 */ + }; + /* clang-format on */ + if (static_cast (*c) == 0xC3) c++; + if (static_cast (*c) == 0xC4) + c++; + if (static_cast (*c) == 0xC5) + c++; - for (unsigned int i = 0; i < countof (table_accents); ++i) + if (GetLocale () != "pl") { - if ((unsigned char) *c == table_accents[i]) - return 15 + i; + // Do not use the 'standard' accents table with Polish locale + // This is required because we check only last byte of UTF-8 and some + // characters overlap + // TODO: In the future, this ugly hack should be replaced with proper UTF-8 + // parsing + for (unsigned int i = 0; i < countof (table_accents); ++i) + if ((unsigned char) *c == table_accents[i]) + return 15 + i; } + + for (unsigned int i = 0; i < countof (table_extended); ++i) + if ((unsigned char) *c == table_extended[i]) + return 127 + i; + if (*c < 0) return 1; // square @@ -77,7 +104,8 @@ GetCharWidth (const char *& c, Sint32 font) 12, 8, 9, 9, 9, 8, 8, 8, 9, 4, 8, 9, 8, 10, 9, 9, 8, 9, 8, 9, 10, 8, 9, 11, 9, 8, 10, 7, 10, 7, 13, 13, 9, 9, 8, 8, 8, 8, 6, 8, 8, 4, 6, 8, 4, 12, 8, 8, - 8, 8, 7, 6, 7, 8, 8, 10, 8, 8, 7, 6, 6, 6, 10, 0, + 8, 8, 7, 6, 7, 8, 8, 10, 8, 8, 7, 6, 6, 6, 10, 8, + 5, 8, 8, 8, 8, 8, 7, 9, 6, 7 }; static const unsigned char table_width_little[] = @@ -89,7 +117,8 @@ GetCharWidth (const char *& c, Sint32 font) 9, 8, 6, 7, 7, 5, 5, 8, 7, 2, 4, 7, 5, 10, 7, 8, 6, 8, 7, 6, 6, 6, 8, 12, 7, 6, 6, 3, 5, 3, 6, 8, 4, 6, 6, 6, 6, 6, 4, 6, 6, 2, 3, 5, 2, 10, 6, 6, - 6, 6, 3, 5, 3, 6, 6, 8, 6, 6, 5, 4, 6, 4, 7, 0, + 6, 6, 3, 5, 3, 6, 6, 8, 6, 6, 5, 4, 6, 4, 7, 6, + 3, 6, 6, 6, 5, 5, 5, 7, 4, 5 }; // clang-format on @@ -118,7 +147,7 @@ DrawText (CPixmap * pPixmap, Point pos, const char * pText, Sint32 font) if (font != FONTLITTLE) { - rank += 128 * font; + rank += (128 + 16) * font; pPixmap->DrawIcon (-1, CHTEXT, rank, pos); } else @@ -142,7 +171,7 @@ DrawTextPente ( while (*pText != 0) { rank = GetOffset (pText); - rank += 128 * font; + rank += (128 + 16) * font; pPixmap->DrawIcon (-1, CHTEXT, rank, pos); lg = GetCharWidth (pText, font);