From fa97ea79e8fdb22705ffaa596c707870e74704ab Mon Sep 17 00:00:00 2001 From: Raimon Zamora Date: Mon, 7 Oct 2024 13:35:01 +0200 Subject: [PATCH] =?UTF-8?q?-=20[NEW]=20Anbernics=20en=20el=20lloc=20i=20ja?= =?UTF-8?q?=20se=20poden=20recollir=20-=20[CHG]=20Canviats=20uns=20pixels?= =?UTF-8?q?=20en=20les=20portes=20-=20[NEW]=20Sequencia=20de=20final=20de?= =?UTF-8?q?=20joc=20acabada=20-=20[NEW]=20Al=20pillar=20un=20booster=20fa?= =?UTF-8?q?=20sorollet=20-=20Treballant=20en=20el=20pr=C3=B3logo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/doors.gif | Bin 2785 -> 2795 bytes data/end1.gif | Bin 0 -> 1373 bytes data/end2.gif | Bin 0 -> 1333 bytes data/gifs.txt | 2 + data/rooms/12.txt | 4 +- data/rooms/25.txt | 4 +- data/rooms/26.txt | 4 +- data/rooms/28.txt | 11 +++ data/rooms/33.txt | 4 +- data/rooms/34.txt | 4 +- data/rooms/39.txt | 6 +- data/rooms/43.txt | 30 ++++----- data/rooms/48.txt | 10 +-- data/rooms/51.txt | 11 +++ data/rooms/60.txt | 4 +- data/rooms/61.txt | 4 +- data/templates.txt | 69 +++++++++++++++++++ source/actor.cpp | 52 +++++++++++--- source/actor.h | 4 ++ source/config.cpp | 13 ++++ source/config.h | 2 + source/m_end_sequence.cpp | 138 ++++++++++++++++++++++++++++++++++++++ source/m_end_sequence.h | 10 +++ source/m_game.cpp | 1 + source/m_game.h | 1 + source/m_ingame.cpp | 32 +++++++-- source/m_menu.cpp | 21 +++++- source/m_menu.h | 11 +-- source/main.cpp | 14 +++- source/room.cpp | 6 ++ 30 files changed, 411 insertions(+), 61 deletions(-) create mode 100644 data/end1.gif create mode 100644 data/end2.gif create mode 100644 source/m_end_sequence.cpp create mode 100644 source/m_end_sequence.h diff --git a/data/doors.gif b/data/doors.gif index d98b14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-|}2E{OKtTj5O?orlv{ zZ0^^TX~2m|r@7uC}|$p?LzVmOPs>TQIj2bLghTa%G&8rOq}NXJGj1Y}a@tZg3oVyos0Y ziDbgQyaJ)c9TQR|(?gjW48$kcKl(y zqocD9q>jw^t-Q8D`XpcFz(5~zutcJo`r|BfpE#%8Q=>WfbeGDx?(B|!^a;_LoFK6M zq33DXACyhL@%Sd0A2tPNYCQUp0l9ZTb|FwhD-+bWK1Z9}MJjhU>mS}?2S5MqFMn-o zUI_Rfj+k|5}Qctt8Mn#qd)!eSS_NGC4(OpEzaVeuST f8!(QKjAJ}w7}Y2@13k)(1rcK%!5B9U6aWA_tT&zI literal 0 HcmV?d00001 diff --git a/data/end2.gif b/data/end2.gif new file mode 100644 index 0000000000000000000000000000000000000000..4a3f7417d02a9dd8adce1ca84a7c6b8b47120720 GIT binary patch literal 1333 zcmV-51gj3u08^w3Sqw5kqNGHi`rxomHsn*>3iFp_mE9yy< zEFK9j8@vvSq&%0Z;qC8u$_);2=2-kIIO+~JP(+|O>!gevv`3&6Wl2<~ks2}olhnCu zxC&TBiMMW5M1iE*!F6U{;d^<{pevWuPC`Lcvs1l{ZL~pK$nMuOo-qk(;%L*TOoTKc zDctyF=!tDVs7ZtR>c-WG7#~g>_ovpJe^k-n(p9OYJg}c6UAqz%E1RkGO6EC<)1=z9 z^M>x6=98mXfC)*qeT0)HIFEOgc3t{xphsKQ2)9Z(rEl0?oLy>e%++lyfr{rs{A%}Z z;-0xMs?#bkamr${vB3j$IaiX{q@yj4t6TC!q4mlE-*@|nO|)^p!gBK3Gi=Zool+E} z)vxlcq<6&y)ax{nM0?u^oR?wyAh zCB~uiQ-AD@lvPBd5$Bb77JOFQY|Y`5%}D&QB3M6!lrxV=^EC!qe8z|-lSRCF$B=8S zfykSD7m_%fe&|h7AcNuL(_%h*9U~lz5*k$^GL*r=*Ec(=NZ@D|(HG%>fRQ)Kb6K$m z-iq*1=cFE}^eE+dSA|#}TuF9V-%Yq6Y08XKwHW4pvB{O*iYQ%KMJ5xTF^*Z6Y$+v? zt5G(mZ}Snw)@8XdXBUo74w+MV{TPO(bl&B)D3%+}7NRF3<~0awm`a$PPj_mHr93Hi zT4@)m#S__!?)7M)pQtj2*ma-^Ictd?^7^TmvEGVnMr8#j<7A=#;CRrX-Hn!=>@DN zn%c)8GkTVf`$fr5LYGpTvdRnI+;W@KS#=YVZ<_j|%@gaxpSKr}yPVHoZYK25wr+>& z$Vl4><-JW`O)9aL`io)JPh$$-`QPjRO9rfAX4 z-`=$N@B3KU*YUGOs_V>(Xb)Q7|Kf!%zG$dV*>j!l=2x#U`3qEi1E2oP1G}RTs(jCb z;N`;g96?~xnigX+&@q&1yyCAME@udK2?{+V|;eZTyKxjcK rT{sL-^@8}XAsw+->ENIRQAi_)H3u^@JD>-vl{ilZEv7R9C;$LEZxfw1 literal 0 HcmV?d00001 diff --git a/data/gifs.txt b/data/gifs.txt index 8c77567..a3fff03 100644 --- a/data/gifs.txt +++ b/data/gifs.txt @@ -4,6 +4,8 @@ altres.gif batman.gif caixes.gif doors.gif +end1.gif +end2.gif floor.gif font.gif font2.gif diff --git a/data/rooms/12.txt b/data/rooms/12.txt index be4b14e..baeba49 100644 --- a/data/rooms/12.txt +++ b/data/rooms/12.txt @@ -28,13 +28,13 @@ actor{ } actor{ - name: ANBERNIC + name: ANBERNIC0 bmp: altres.gif bmp-rect: 157 80 24 14 bmp-offset: -4 16 pos: 56 16 0 size: 6 4 2 - flags: PUSHABLE GRAVITY + flags: SPECIAL movement: CW } diff --git a/data/rooms/25.txt b/data/rooms/25.txt index 44076af..ea8a434 100644 --- a/data/rooms/25.txt +++ b/data/rooms/25.txt @@ -11,13 +11,13 @@ exit-zp: 21 editor-done: 1 actor{ - name: ANBERNIC + name: ANBERNIC1 bmp: altres.gif bmp-rect: 157 80 24 14 bmp-offset: -4 16 pos: 24 40 8 size: 6 4 2 - flags: PUSHABLE GRAVITY + flags: SPECIAL movement: CW } diff --git a/data/rooms/26.txt b/data/rooms/26.txt index f3f42ed..b35fcc5 100644 --- a/data/rooms/26.txt +++ b/data/rooms/26.txt @@ -26,13 +26,13 @@ actor{ } actor{ - name: ANBERNIC + name: ANBERNIC2 bmp: altres.gif bmp-rect: 157 80 24 14 bmp-offset: -6 10 pos: 40 8 6 size: 6 4 2 - flags: PUSHABLE GRAVITY + flags: SPECIAL movement: CW } diff --git a/data/rooms/28.txt b/data/rooms/28.txt index f3fa9e1..e7bf85b 100644 --- a/data/rooms/28.txt +++ b/data/rooms/28.txt @@ -13,6 +13,17 @@ exit-yp: 35 exit-yn: 29 editor-done: 1 +actor{ + name: ANBERNIC3 + bmp: altres.gif + bmp-rect: 157 80 24 14 + bmp-offset: -4 16 + pos: 0 8 0 + size: 6 4 2 + flags: SPECIAL + movement: CW +} + actor{ name: BLOCMATA-00 bmp: altres.gif diff --git a/data/rooms/33.txt b/data/rooms/33.txt index 559749c..a4a2295 100644 --- a/data/rooms/33.txt +++ b/data/rooms/33.txt @@ -14,13 +14,13 @@ exit-yn: 32 editor-done: 1 actor{ - name: ANBERNIC + name: ANBERNIC4 bmp: altres.gif bmp-rect: 157 80 24 14 bmp-offset: -4 16 pos: 24 32 0 size: 6 4 2 - flags: PUSHABLE GRAVITY + flags: SPECIAL movement: CW } diff --git a/data/rooms/34.txt b/data/rooms/34.txt index cb73f57..40d8e02 100644 --- a/data/rooms/34.txt +++ b/data/rooms/34.txt @@ -12,13 +12,13 @@ exit-yn: 33 editor-done: 1 actor{ - name: ANBERNIC + name: ANBERNIC5 bmp: altres.gif bmp-rect: 157 80 24 14 bmp-offset: -4 16 pos: 40 16 0 size: 6 4 2 - flags: PUSHABLE GRAVITY + flags: SPECIAL movement: CW } diff --git a/data/rooms/39.txt b/data/rooms/39.txt index 1d2b0fc..c8c3d81 100644 --- a/data/rooms/39.txt +++ b/data/rooms/39.txt @@ -12,13 +12,13 @@ exit-yp: 37 editor-done: 1 actor{ - name: ANBERNIC + name: ANBERNIC6 bmp: altres.gif bmp-rect: 157 80 24 14 bmp-offset: -4 16 pos: 0 8 0 size: 6 4 2 - flags: PUSHABLE GRAVITY + flags: SPECIAL movement: CW } @@ -47,7 +47,7 @@ actor{ bmp: doors.gif bmp-rect: 160 7 16 40 bmp-offset: -8 47 - pos: 8 16 0 + pos: 10 18 0 size: 6 6 14 movement: CW } diff --git a/data/rooms/43.txt b/data/rooms/43.txt index 18e037b..4e342f5 100644 --- a/data/rooms/43.txt +++ b/data/rooms/43.txt @@ -10,21 +10,6 @@ exit-yn: 42 exit-zn: 47 editor-done: 1 -actor{ - name: ABAD - bmp: lordabad.gif - bmp-rect: 0 0 20 33 - bmp-offset: -6 38 - pos: 2 28 20 - size: 8 8 8 - orient: XP - anim-cycle: MIN - anim-wait: 1 - flags: ANIMATED ORIENTABLE - react-mask: XP XN YP YN ZP ZN - movement: CCW -} - actor{ name: LIFT-00 bmp: caixes.gif @@ -47,6 +32,21 @@ actor{ movement: Z } +actor{ + name: LORD-ABAD + bmp: lordabad.gif + bmp-rect: 0 0 20 33 + bmp-offset: -6 38 + pos: 2 28 20 + size: 8 8 8 + orient: XP + anim-cycle: MIN + anim-wait: 1 + flags: ANIMATED ORIENTABLE + react-mask: XP XN YP YN ZP ZN + movement: CCW +} + actor{ name: PLATH-00 bmp: caixes.gif diff --git a/data/rooms/48.txt b/data/rooms/48.txt index 8ccb45c..8c2bf02 100644 --- a/data/rooms/48.txt +++ b/data/rooms/48.txt @@ -14,7 +14,7 @@ actor{ name: BOX-A bmp: sam.gif bmp-rect: 0 0 19 33 - bmp-offset: -7 37 + bmp-offset: -10 38 pos: 27 0 19 size: 8 8 8 anim-cycle: DUO @@ -37,8 +37,8 @@ actor{ actor{ name: PLATH-00 bmp: caixes.gif - bmp-rect: 128 128 32 32 - bmp-offset: 0 32 + bmp-rect: 32 32 32 32 + bmp-offset: 0 24 pos: 24 0 15 size: 8 8 4 orient: ZP @@ -59,8 +59,8 @@ actor{ actor{ name: PLATH-01 bmp: caixes.gif - bmp-rect: 128 128 32 32 - bmp-offset: 0 32 + bmp-rect: 32 32 32 32 + bmp-offset: 0 24 pos: 32 0 15 size: 8 8 4 orient: ZP diff --git a/data/rooms/51.txt b/data/rooms/51.txt index 43d63fe..d1c6622 100644 --- a/data/rooms/51.txt +++ b/data/rooms/51.txt @@ -10,6 +10,17 @@ exit-yp: 52 exit-zp: 47 editor-done: 1 +actor{ + name: ANBERNIC7 + bmp: altres.gif + bmp-rect: 157 80 24 14 + bmp-offset: -4 16 + pos: 8 40 0 + size: 6 4 2 + flags: SPECIAL + movement: CW +} + actor{ name: CADIRA bmp: caixes.gif diff --git a/data/rooms/60.txt b/data/rooms/60.txt index 7b6b014..583ca47 100644 --- a/data/rooms/60.txt +++ b/data/rooms/60.txt @@ -10,13 +10,13 @@ exit-yn: 59 editor-done: 1 actor{ - name: ANBERNIC + name: ANBERNIC8 bmp: altres.gif bmp-rect: 157 80 24 14 bmp-offset: -4 16 pos: 48 40 0 size: 6 4 2 - flags: PUSHABLE GRAVITY + flags: SPECIAL movement: CW } diff --git a/data/rooms/61.txt b/data/rooms/61.txt index 613af18..8381bbc 100644 --- a/data/rooms/61.txt +++ b/data/rooms/61.txt @@ -10,13 +10,13 @@ exit-xp: 59 editor-done: 1 actor{ - name: ANBERNIC + name: ANBERNIC9 bmp: altres.gif bmp-rect: 157 80 24 14 bmp-offset: -4 16 pos: 0 40 0 size: 6 4 2 - flags: PUSHABLE GRAVITY + flags: SPECIAL movement: CW } diff --git a/data/templates.txt b/data/templates.txt index b982a95..7a2f62f 100644 --- a/data/templates.txt +++ b/data/templates.txt @@ -204,6 +204,75 @@ category{ movement: CW } + actor{ + name: SAM + bmp: sam.gif + bmp-rect: 0 0 19 33 + bmp-offset: -8 38 + pos: 24 40 0 + size: 8 8 8 + orient: XP + anim-cycle: DUO + anim-wait: 20 + flags: ANIMATED + react-mask: XP XN YP YN ZP ZN + movement: CCW + } + + actor{ + name: YONKI + bmp: caixes.gif + bmp-rect: 168 65 19 31 + bmp-offset: -6 36 + pos: 24 40 0 + size: 8 8 8 + orient: XP + anim-wait: 20 + react-mask: XP XN YP YN ZP ZN + movement: CCW + } + + actor{ + name: LORD-ABAD + bmp: lordabad.gif + bmp-rect: 0 0 20 33 + bmp-offset: -6 38 + pos: 56 48 0 + size: 8 8 8 + orient: XP + anim-cycle: MIN + anim-wait: 1 + flags: ANIMATED ORIENTABLE + react-mask: XP XN YP YN ZP ZN + movement: CCW + } + + actor{ + name: JAILDES + bmp: test.gif + bmp-rect: 0 32 20 32 + bmp-offset: -6 38 + pos: 48 40 0 + size: 8 8 8 + orient: XP + anim-wait: 1 + flags: ANIMATED + react-mask: XP XN YP YN ZP ZN + movement: CCW + } + + actor{ + name: ROOMBA2 + bmp: caixes.gif + bmp-rect: 164 0 24 32 + bmp-offset: 0 34 + pos: 24 40 0 + size: 8 8 2 + orient: XN + react-mask: XP XN YP YN ZP ZN + movement: CCW + } + } category{ diff --git a/source/actor.cpp b/source/actor.cpp index 489f946..c12980e 100644 --- a/source/actor.cpp +++ b/source/actor.cpp @@ -650,6 +650,7 @@ namespace actor if (act->name[0] == 'B') { // Es un booster hero::collectBooster(&act->name[5], (act->name[2] - 48) * 10 + (act->name[3] - 48)); + audio::playSound("snd_boost.wav", SOUND_BASIC); } else if (act->name[0] == 'S') { // Es un skill @@ -669,6 +670,11 @@ namespace actor return result; } } + else if (act->name[0] == 'A') + { + hero::pickAnbernic(act->name); + audio::playSound("snd_pick.wav", SOUND_BASIC); + } else { SDL_assert(false); @@ -727,7 +733,7 @@ namespace actor act->push |= PUSH_XP; } } - else if (controller::down(KEY_UP)) //input::keyDown(SDL_SCANCODE_UP) || input::keyDown(config::getKey(KEY_UP))) + else if (controller::down(KEY_UP)) // input::keyDown(SDL_SCANCODE_UP) || input::keyDown(config::getKey(KEY_UP))) { hero::useBoostRun(); act->orient = PUSH_YN; @@ -747,7 +753,7 @@ namespace actor act->push |= PUSH_YN; } } - else if (controller::down(KEY_DOWN)) //input::keyDown(SDL_SCANCODE_DOWN) || input::keyDown(config::getKey(KEY_DOWN))) + else if (controller::down(KEY_DOWN)) // input::keyDown(SDL_SCANCODE_DOWN) || input::keyDown(config::getKey(KEY_DOWN))) { hero::useBoostRun(); act->orient = PUSH_YP; @@ -767,7 +773,7 @@ namespace actor act->push |= PUSH_YP; } } - //if ((input::keyPressed(SDL_SCANCODE_RETURN) || input::keyPressed(config::getKey(KEY_PICK))) && (hero::getSkills() & SKILL_PANTS)) + // if ((input::keyPressed(SDL_SCANCODE_RETURN) || input::keyPressed(config::getKey(KEY_PICK))) && (hero::getSkills() & SKILL_PANTS)) if ((controller::pressed(KEY_PICK)) && (hero::getSkills() & SKILL_PANTS)) { if (picked) @@ -815,7 +821,7 @@ namespace actor } } actor::actor_t *future_below = any_below_me(act); - //if ((input::keyDown(SDL_SCANCODE_SPACE) || input::keyDown(config::getKey(KEY_JUMP))) && + // if ((input::keyDown(SDL_SCANCODE_SPACE) || input::keyDown(config::getKey(KEY_JUMP))) && if ((controller::down(KEY_JUMP)) && (hero::getSkills() & SKILL_SHOES) && (act->pos.y + act->size.y) <= max.y && act->pos.y >= min.y && (act->pos.x + act->size.x) <= max.x && act->pos.x >= min.x && act->react_mask == 0 && ((act->pos.z == 0 && room::getFloor() != 11) || (act->below || future_below))) { @@ -869,7 +875,8 @@ namespace actor if (moving) { act->flags |= FLAG_ANIMATED; - if ((config::getSoundMode()==SOUND_ALL) && act->react_mask==0 && ( (act->below) || (act->pos.z==0) )) audio::resumeChannel(walk_channel); + if ((config::getSoundMode() == SOUND_ALL) && act->react_mask == 0 && ((act->below) || (act->pos.z == 0))) + audio::resumeChannel(walk_channel); } else { @@ -885,7 +892,7 @@ namespace actor act->push |= act->mov_push; } - void changeMoving(actor_t *act, const bool silent=false) + void changeMoving(actor_t *act, const bool silent = false) { if (!silent && !push_sound_already_playing) { @@ -1035,7 +1042,11 @@ namespace actor act2->anim_frame = 2; act->anim_wait = act2->anim_wait = 1; actor_t *other = first; - while (other) { other->flags &= ~FLAG_MOVING; other = other->next; } + while (other) + { + other->flags &= ~FLAG_MOVING; + other = other->next; + } actor::setDirty(act2); room::cycleColor(4); return; @@ -1488,7 +1499,7 @@ namespace actor draw::stencil::set(act->tag); draw::draw(x, y, act->bmp_rect.w, act->bmp_rect.h, act->bmp_rect.x + ao, act->bmp_rect.y + oo, flip); draw::swapcol(1, room::getColor(0)); // Tornem al color per defecte - if (act->flags & FLAG_SPECIAL) + if ((act->flags & FLAG_SPECIAL) && (act->name[0] != 'A')) { draw::setSource(brilli); const int dx = (act->bmp_rect.w - 22) >> 1; @@ -1898,6 +1909,7 @@ namespace actor int skills = SKILL_NONE; int parts = PART_NONE; bool boosters_collected[100]; + bool anbernics[10] = {false, false, false, false, false, false, false, false, false, false}; vec3_t first_pos = {0, 0, 0}; int first_orient = 0; bool dead = false; @@ -1917,10 +1929,13 @@ namespace actor lives = 8; skills = SKILL_NONE; parts = PART_NONE; + for (int i = 0; i < 10; ++i) + anbernics[i] = false; for (int i = 0; i < 100; ++i) boosters_collected[i] = false; brilli = draw::getSurface("objectes.gif"); - if ( (config::getSoundMode()==SOUND_ALL) ) { + if ((config::getSoundMode() == SOUND_ALL)) + { walk_channel = audio::playSound("snd_walk.wav", SOUND_ALL, -1); audio::pauseChannel(walk_channel); } @@ -2181,6 +2196,25 @@ namespace actor return parts; } + void pickAnbernic(char *name) + { + anbernics[name[8] - 48] = true; + } + + bool wasAnbernicCollected(char *name) + { + return anbernics[name[8] - 48]; + } + + int getNumAmbernicsCollected() + { + int count = 0; + for (auto anbernic : anbernics) + if (anbernic) + count++; + return count; + } + void move(int *x, int *y, int *z) { actor_t *hero = actor::find("HERO"); diff --git a/source/actor.h b/source/actor.h index 6fece4f..fea7087 100644 --- a/source/actor.h +++ b/source/actor.h @@ -233,6 +233,10 @@ namespace actor bool wasPartCollected(char *part); int getParts(); + void pickAnbernic(char *name); + bool wasAnbernicCollected(char *name); + int getNumAmbernicsCollected(); + void move(int *x, int *y, int *z); void setFirstPos(); } diff --git a/source/config.cpp b/source/config.cpp index 1e1325d..85f9b01 100644 --- a/source/config.cpp +++ b/source/config.cpp @@ -8,6 +8,7 @@ namespace config int soundMode = SOUND_ALL; uint8_t keys[7] = {SDL_SCANCODE_UP, SDL_SCANCODE_DOWN, SDL_SCANCODE_LEFT, SDL_SCANCODE_RIGHT, SDL_SCANCODE_SPACE, SDL_SCANCODE_RETURN, SDL_SCANCODE_ESCAPE}; int8_t pad_btns[7] = {SDL_CONTROLLER_BUTTON_DPAD_UP, SDL_CONTROLLER_BUTTON_DPAD_DOWN, SDL_CONTROLLER_BUTTON_DPAD_LEFT, SDL_CONTROLLER_BUTTON_DPAD_RIGHT, SDL_CONTROLLER_BUTTON_A, SDL_CONTROLLER_BUTTON_B, SDL_CONTROLLER_BUTTON_START}; + bool prologo_desbloquejat = false; void setMusic(const bool value) { @@ -69,4 +70,16 @@ namespace config { return pad_btns[which]; } + + void setProgoloDesbloquejat() + { + prologo_desbloquejat = true; + file::setConfigValue("prologo", "unlocked"); + } + + const bool isProgoloDesbloquejat() + { + return prologo_desbloquejat; + } + } diff --git a/source/config.h b/source/config.h index d204977..32b4f4d 100644 --- a/source/config.h +++ b/source/config.h @@ -28,4 +28,6 @@ namespace config void definePadBtn(const int which, const int btn); const int getPadBtn(const int which); + void setProgoloDesbloquejat(); + const bool isProgoloDesbloquejat(); } \ No newline at end of file diff --git a/source/m_end_sequence.cpp b/source/m_end_sequence.cpp new file mode 100644 index 0000000..c6c4b71 --- /dev/null +++ b/source/m_end_sequence.cpp @@ -0,0 +1,138 @@ +#include "m_intro.h" +#include "jgame.h" +#include "jdraw.h" +#include "jinput.h" +#include "jaudio.h" +#include "controller.h" +#include "config.h" +#include +#include "actor.h" + +namespace modules +{ + namespace end_sequence + { + int stage = 0; + uint32_t time = 0; + actor::actor_t *act = nullptr; + const char *actor_names[] = {"JAILDESIGNER", "BATMAN", "ROBIN", "EL ALTRE BATMAN", "EL ABAD", "LA ROOMBA", "EL OBRER", "BAMBOLLA DE CAFE", "EL YONKI", "LA PILOTA", "SAM", "LORD ABAD"}; + const char *actor_ids[] = {"JAILDES", "GAT-BATMAN", "GAT-ROBIN", "BATMAN", "ABAD", "ROOMBA2", "OBRER", "COFFEE", "YONKI", "PILOTA", "SAM", "LORD-ABAD"}; + + void init() + { + time = SDL_GetTicks(); + draw::restorecol(2); + draw::cls(2); + + draw::swapcol(1, 7); + draw::setSource(draw::getSurface("end1.gif")); + draw::draw(96, 28, 128, 96, 0, 0); + draw::print2("PER FI! JA PUC", 13, 17, WHITE, FONT_ZOOM_NONE); + draw::print2("TASTAR LA PISCINA!", 11, 19, WHITE, FONT_ZOOM_NONE); + draw::render(); + + if (audio::getCurrentMusic() != "mus_menu.ogg") audio::playMusic("mus_menu.ogg"); + actor::templates::load(); + } + + const bool shouldGoToNext() + { + return (SDL_GetTicks()-time > (stage==15||stage==16?10000:5000)) || + (controller::pressed(KEY_JUMP)) || (controller::pressed(KEY_PICK)) || + (input::keyPressed(SDL_SCANCODE_SPACE)) || (input::keyPressed(SDL_SCANCODE_RETURN)); + } + + void drawActorAt(const char* name, const int x, const int y) + { + draw::swapcol(1,YELLOW); + actor::actor_t *act = actor::createFromTemplate(name); + //act->flags &= ~FLAG_SPECIAL; + actor::drawAt(act, x, y); actor::remove(act); + } + + bool loop() + { + if (controller::pressed(KEY_MENU)) return false; + + if (shouldGoToNext()) + { + time = SDL_GetTicks(); + stage++; + if ( (stage==2) && (config::isProgoloDesbloquejat()) ) stage++; + if (stage == 17) return false; + + switch (stage) + { + case 1: + draw::cls(2); + draw::swapcol(1, 8); + draw::setSource(draw::getSurface("end2.gif")); + draw::draw(96, 28, 128, 96, 0, 0); + draw::print2("PUTA, QUE GUST...", 12, 17, WHITE, FONT_ZOOM_NONE); + //draw::render(); + break; + case 2: + draw::cls(2); + draw::swapcol(1, 8); + draw::setSource(draw::getSurface("end2.gif")); + draw::draw(96, 28, 128, 96, 0, 0); + draw::print2("LLASTIMA QUE ENCARA", 11, 17, WHITE, FONT_ZOOM_NONE); + draw::print2("NO HE TROBAT TOTES", 11, 19, WHITE, FONT_ZOOM_NONE); + draw::print2("LES ANBERNICS...", 13, 21, WHITE, FONT_ZOOM_NONE); + //draw::render(); + break; + case 3: case 4: case 5: case 6: case 7: case 8: + case 9: case 10: case 11: case 12: case 13: case 14: + ::game::setUpdateTicks(64); + if (act) actor::remove(act); + act = actor::createFromTemplate(actor_ids[stage-3]); + act->flags &= ~FLAG_MOVING; + break; + case 15: + if (act) actor::remove(act); + act = actor::createFromTemplate("GAT-BATMAN"); + act->flags &= ~FLAG_MOVING; + break; + case 16: + if (act) actor::remove(act); + break; + } + } + + switch (stage) + { + case 3: case 4: case 5: case 6: case 7: case 8: + case 9: case 10: case 11: case 12: case 13: case 14: + { + draw::cls(2); + draw::print2("THE POOL", 16, 3, TEAL, FONT_ZOOM_VERTICAL); + draw::swapcol(1,YELLOW); + actor::update(act, false); + actor::drawAt(act, 148, 100); + const int x = 160-strlen(actor_names[stage-3])*2; + draw::print(actor_names[stage-3], x, 145, WHITE, PAPER); + draw::print2("(C) JAILDOCTOR 2024", 11, 28, TEAL, FONT_ZOOM_NONE); + break; + } + case 15: + { + draw::cls(2); + draw::swapcol(1,GREEN); + actor::update(act, false); + actor::drawAt(act, 148, 100); + const int x = 160-strlen("DEDICAT A BATMAN")*2; + draw::print("DEDICAT A BATMAN", x, 145, WHITE, PAPER); + break; + } + case 16: + draw::cls(2); + draw::print2("GRACIES PER JUGAR!", 11, 15, PURPLE, FONT_ZOOM_NONE); + break; + + } + + draw::render(); + return true; + } + } +} \ No newline at end of file diff --git a/source/m_end_sequence.h b/source/m_end_sequence.h new file mode 100644 index 0000000..693894e --- /dev/null +++ b/source/m_end_sequence.h @@ -0,0 +1,10 @@ +#pragma once + +namespace modules +{ + namespace end_sequence + { + void init(); + bool loop(); + } +} diff --git a/source/m_game.cpp b/source/m_game.cpp index ccef90f..49cef14 100644 --- a/source/m_game.cpp +++ b/source/m_game.cpp @@ -323,6 +323,7 @@ namespace modules { actor::update(actor::getFirst()); actor::hero::useBoostGod(); + if ( (actor::hero::getParts()==0x3f) && (room::getCurrent()==45) ) return GAME_END; } } diff --git a/source/m_game.h b/source/m_game.h index f0c1239..9b8f913 100644 --- a/source/m_game.h +++ b/source/m_game.h @@ -15,6 +15,7 @@ namespace modules #define GAME_EDITOR_BITMAP_FILE 5 #define GAME_EDITOR_BITMAP_POS 6 #define GAME_EDITOR_BITMAP_SIZE 7 + #define GAME_END 8 enum sections { SECTION_GENERAL, SECTION_ROOM, SECTION_ACTOR }; diff --git a/source/m_ingame.cpp b/source/m_ingame.cpp index 6fded57..a1fc0d4 100644 --- a/source/m_ingame.cpp +++ b/source/m_ingame.cpp @@ -13,16 +13,18 @@ namespace modules { namespace ingame { - draw::surface *surf; + //draw::surface *surf; int selected_option = INGAME_CONTINUAR; actor::actor_t *parts[6] = {nullptr,nullptr,nullptr,nullptr,nullptr,nullptr}; + actor::actor_t *anbernic = nullptr; + int num_anbernics = 0; void init() { - + num_anbernics = actor::hero::getNumAmbernicsCollected(); selected_option = INGAME_CONTINUAR; - surf = draw::getSurface("objectes.gif"); + //surf = draw::getSurface("objectes.gif"); if (parts[0]==nullptr) { parts[0] = actor::createFromTemplate("P-ELBOW"); @@ -65,6 +67,13 @@ namespace modules parts[5]->inner_x=96+16; parts[5]->inner_y=69+8; } + if (anbernic==nullptr) + { + anbernic = actor::createFromTemplate("ANBERNIC"); + anbernic->flags=0; + anbernic->inner_x=252; + anbernic->inner_y=76; + } } int loop() @@ -85,20 +94,33 @@ namespace modules if (controller::pressed(KEY_JUMP) || controller::pressed(KEY_PICK) || input::keyPressed(SDL_SCANCODE_RETURN)) { audio::playSound("snd_push.wav", SOUND_BASIC); + if (selected_option==INGAME_EIXIR) + { + for (int i=0; i<6; ++i) { actor::remove(parts[i]); parts[i]=nullptr;} + actor::remove(anbernic); anbernic=nullptr; + } return selected_option; } draw::cls(2); draw::color(1); - draw::setSource(surf); + //draw::setSource(surf); static int part[6] = { PART_ELBOW, PART_PIPE, PART_SALT, PART_FILTER, PART_PUMP, PART_TIMER}; for (int i=0;i<6;++i) { draw::swapcol(1, room::getColor((actor::hero::getParts() & part[i])?1:3)); actor::drawAt(parts[i], parts[i]->inner_x, parts[i]->inner_y); } - + if (num_anbernics>0) + { + draw::restorecol(1); + actor::drawAt(anbernic, anbernic->inner_x, anbernic->inner_y); + char count[] = " 0/10"; + count[1] = (num_anbernics%10)+48; + if (num_anbernics==10) count[0]='1'; + draw::print2(count, 30, 12, WHITE, FONT_ZOOM_NONE); + } draw::print2("PAUSA", 17, 3, TEAL, FONT_ZOOM_VERTICAL); diff --git a/source/m_menu.cpp b/source/m_menu.cpp index bffadd4..190544f 100644 --- a/source/m_menu.cpp +++ b/source/m_menu.cpp @@ -6,6 +6,7 @@ #include "config.h" #include #include "jaudio.h" +#include "actor.h" namespace modules { namespace menu @@ -15,6 +16,8 @@ namespace modules int retras=4; int selected_option = OPTION_JUGAR; + bool prologo_desbloquejat = false; + int min_option = 1; void init() { @@ -24,6 +27,7 @@ namespace modules draw::loadPalette("test.gif"); surf = draw::getSurface("test.gif"); draw::restorecol(2); + if (config::isProgoloDesbloquejat()) min_option=0; } int loop() @@ -34,13 +38,13 @@ namespace modules if (controller::pressed(KEY_DOWN) || input::keyPressed(SDL_SCANCODE_DOWN)) { audio::playSound("snd_push.wav", SOUND_BASIC); - selected_option++; if (selected_option==5) selected_option=0; + selected_option++; if (selected_option==6) selected_option=min_option; } if (controller::pressed(KEY_UP) || input::keyPressed(SDL_SCANCODE_UP)) { audio::playSound("snd_push.wav", SOUND_BASIC); - selected_option--; if (selected_option<0) selected_option=4; + selected_option--; if (selected_optionflags &= ~FLAG_ANIMATED; act->bmp_rect.x += act->bmp_rect.w; } + } else if (act->name[0]=='A') { // Es una anbernic + if (!::editor::isDevMode() && actor::hero::wasAnbernicCollected(act->name)) + { + actor::remove(act); + act = nullptr; + } } } if (act) actor::setDirty(act, true);