From 8c639f2330a1959fa74e3d0a2f622643166dc295 Mon Sep 17 00:00:00 2001 From: Raimon Zamora Date: Thu, 26 Sep 2024 13:51:10 +0200 Subject: [PATCH] =?UTF-8?q?-=20[FIX]=20Les=20portes=20frontals=20no=20teni?= =?UTF-8?q?en=20l'altura=20adequada=20-=20[FIX]=20El=20piso=20de=20les=20p?= =?UTF-8?q?ortes=20frontals=20no=20es=20calculaba=20correctament=20-=20[CH?= =?UTF-8?q?G]=20Ara=20RAND=20tamb=C3=A9=20canvia=20de=20direcci=C3=B3=20de?= =?UTF-8?q?spr=C3=A9s=20de=20un=20temps=20random=20-=20[FIX]=20Al=20crear?= =?UTF-8?q?=20un=20nou=20actor=20el=20editor=20no=20se=20ficava=20en=20mod?= =?UTF-8?q?e=20SECTION=5FACTOR=20-=20[NEW]=20Al=20pulsar=20on=20no=20hi=20?= =?UTF-8?q?ha=20actors=20ara=20se=20fica=20en=20mode=20SECTION=5FROOM=20-?= =?UTF-8?q?=20[FIX]=20Quan=20estem=20en=20mode=20SECTION=5FROOM=20no=20s'h?= =?UTF-8?q?a=20de=20vore=20un=20actor=20seleccionat=20-=20M=C3=A9s=20habit?= =?UTF-8?q?acions.=20Zona=203=20acabada,=20comen=C3=A7ant=20zona=204?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/altres.gif | Bin 4150 -> 4256 bytes data/rooms/00.txt | 4 +- data/rooms/17.txt | 1 + data/rooms/18.txt | 71 ++++++++- data/rooms/19.txt | 14 ++ data/rooms/27.txt | 220 ++++++++++++++++++++++++++ data/rooms/28.txt | 281 ++++++++++++++++++++++++++++++++++ data/rooms/29.txt | 13 ++ data/rooms/30.txt | 257 +++++++++++++++++++++++++++++++ data/rooms/31.txt | 11 ++ data/rooms/32.txt | 11 ++ data/rooms/33.txt | 13 ++ data/rooms/34.txt | 9 ++ data/rooms/35.txt | 11 ++ data/templates.txt | 2 +- source/actor.cpp | 12 +- source/m_editor_templates.cpp | 3 +- source/m_game.cpp | 16 +- source/m_game.h | 5 + source/room.cpp | 22 ++- 20 files changed, 960 insertions(+), 16 deletions(-) create mode 100644 data/rooms/27.txt create mode 100644 data/rooms/28.txt create mode 100644 data/rooms/29.txt create mode 100644 data/rooms/30.txt create mode 100644 data/rooms/31.txt create mode 100644 data/rooms/32.txt create mode 100644 data/rooms/33.txt create mode 100644 data/rooms/34.txt create mode 100644 data/rooms/35.txt diff --git a/data/altres.gif b/data/altres.gif index 77442b8880fed96fd751f3ab8730c07ac89919dd..a137edde095a3f9ffc48277d66d1777cb1b5f76b 100644 GIT binary patch delta 1516 zcmV_KK=!O8#seU5ldDycT{Fs9aMls=xmoW zKHQKu`h$Oj(rQVzKNW^P_s4`ySUlZ>Gf|i)x|MDo$RvT3c&rBqXJ9kfb9hyD2T0gt zmSAFw)L4LYe8f=#*JMG+vwPW=Vk-k$AafnULxp~|gG#4_B2s@gprJfI!B~G5fY(P) zwh@T)2PrQ`WkCmaPWXRX7&}F=7k{QlY-nZHmxJRZNIrNIg=jd5qlp|Ng#SFTA)ZKe zhqOU8RCbz#LsH^MTh$H4Ctt)dIyU2gut641xIDG@9@(ZwGG=L!_+ioW~{UwTEjUa}o$eAJljvCvYPb5l6Iro7g$hrcx2SZ) zr(%+2EK=8tL8uaah%&@rE8N&urD#psB76JjE9}LK#78&h2ya=V4{Q>U+c=PchE{`U zkKrgexui1p=#U!8WhZc4!T2rEQH<_bO9sM&COKIfnUH@C$z?E=OmJ6|=opNPfRh&Z z4z8F9$Eb%aX^<+IkoG89lE{!^Ws~$+jrFn-{#Y``cx(wsg_GrxOZjR41}Bo1$VRPZ zi|0s(B}pnfNe89FIh_cFVFwE@S&NfLF>ff5zF3GyIcDrI6JgntZ!>V?nYt1 zseo9>G&5G5%E<$7vz%u6nj=YO&N-cz;|_`9Qq+H$og3IxzRg!10N$;TFz&Ok%OM~sfcH#Z2z0_ItN%0>Bw)7 z@t?p$iL>Vo2f9f)sgs$t77EIVAvK6nCZQKZjI8n_6SPAr$8~UNS34P?! zODBK%juWb%u!y1vI)T>0+6RV0?%j$n( zF*vF?5g{2CHY8S}03=;4D5D6b7*|#_S5bj1BSAm-kfkb~J4aE}28*PauGK1tROVdG zihR80kL&bw%dv(a^+ERPkpt_TcT}T8)O6HjY5{vL_8$&@M+=*Rv=nj1wM5mY zVBOlT>36WgLPcdrt)~@M5Sl`KqAY(M3x*1qR>Ia?1eX>gs@UseN0QPASFU|b#^#-wEuYce4AH5g*tLu#reGT{VjEy^n}&a8%e7vM zkuevtczd>sCVv1zTz!kQa=KD4>qHpFOJ8faQm8_j@(_!AwSRK1*9f0t^Rszdl?2O@ zRtunY>$GU1P4d($Kohz#h+;M-ntyjS!IH9`vr&c1wH~{Nz?HAh*|_YLG5s_!?^2>` zi;JeEmb;6A&$=*mvqLn3T#ICtHtJfiyz7O&YdoitV2cx3_L4CXloQ_?vDZt85=*;I zGeExeIeT_iPWM^|xxCZKRo{qRI}4rt`MwuszU~T1OgEt&-D@tk5MlbOskJgVy~$zn SJDS5K?OK>phjWi1B3^b zfY~;GB&LJs;~dD6gh~iGI729j(1T@kFRTY#DCm2HSA{1QOe%8+Mc8DPU}B5ZSb%hV zV(4xKr-EO0NFuj<-2gIAWq$EB3r6^cm-SK(rzzm3HuPj0!sCBjkn&>|FxPJQvMIY37b?Al|Xe%)XN5;Z|saA?g zM|>(KS;iuD#n*p|jRtH0QfR-VEwZPLzQSI2NPKithw#RYf>leXv_FXCSIdYv)krO# zv4}nqMMcMq3iyjww}amTS!*zml0!{cNG<8OiHFFI!W4I2Xieq;cM_S7(zFGlBRTW9 ziR`#m8}fy3FBOpMEC8U%hiG@xnloxk|Wto%sCwEMll}0IqZy9L4_?2CAIRYn?M%agR$q+5ckAPM) zdbyVeMumS&Gh>2Tg>$K9hgq1|RtJkomnu>{G4+@mDQ%{~O23FnCE%Epi9LEqGxHEi z$1r9t)tSn(GnrO;__AJf5Hd$Y5T z5lg!n34Ahp-Y}eDRS~NhRSP7&Oo5Y>n zNfppXF1-XDcQbqO08+(so|)izi(z*LXK{bxbMnbF+Xr!n=Yab5p8o;5pUFUgYy)7V z@|xwMpx;5D^J$=+mK;lfkPF(74eFo~2AXoFhc#f2)bKj+X`C3^iFtTvag+u2m=L(R zDk6V6qIg-Npy@@!$)YC^B{Acov0zi5xrVD|qp*2A$%CVVQ*G3FbP6GU9WKeG3>gtx2&R?!rDRH#On9bh+MOG=rd=v_ z)TuLDx}^Qri3T)vX6mLEnWrcLRr@7CdU}5-`D3Ti!h=Q>VRQP16vU@RqZnz5ScmFj zF?g6+m7Lt?iBAYp03=;4NSVKRHAPk%i?c&4(_&s2i({&myvCycm)en*SgMf9 zhDN;VpEw0oy_$n@W?6UHKAsbDHdx8wsEAG-i zYlJ4Gn-hS_sZ^(}Vd}T6Q>j7nr;=oL700?NIjl^VS;Hu)jQV32h^DnNq>s8|dFy2I PIlSr>tjH?@Apih7t~rj1 diff --git a/data/rooms/00.txt b/data/rooms/00.txt index 3c26210..48d0599 100644 --- a/data/rooms/00.txt +++ b/data/rooms/00.txt @@ -47,7 +47,7 @@ actor{ bmp: altres.gif bmp-rect: 0 75 20 33 bmp-offset: 0 39 - pos: 0 30 6 + pos: -1 30 6 size: 1 1 9 movement: CW } @@ -57,7 +57,7 @@ actor{ bmp: altres.gif bmp-rect: 0 75 20 33 bmp-offset: 0 39 - pos: 0 23 6 + pos: -1 23 6 size: 1 1 9 movement: CW } diff --git a/data/rooms/17.txt b/data/rooms/17.txt index a281fcc..a7fdd4c 100644 --- a/data/rooms/17.txt +++ b/data/rooms/17.txt @@ -7,6 +7,7 @@ floor-texture: 0 wall-texture: 0 door-texture: 0 under-door-texture: 0 +exit-xn: 27 exit-yn: 9 actor{ diff --git a/data/rooms/18.txt b/data/rooms/18.txt index 010a2a4..a1ed83e 100644 --- a/data/rooms/18.txt +++ b/data/rooms/18.txt @@ -16,6 +16,18 @@ actor{ bmp: caixes.gif bmp-rect: 0 0 32 32 bmp-offset: 0 32 + pos: 40 48 0 + size: 8 8 8 + orient: YP + flags: PUSHABLE ORIENTABLE + movement: CW +} + +actor{ + name: BOX-A-00 + bmp: caixes.gif + bmp-rect: 0 0 32 32 + bmp-offset: 0 32 pos: 8 24 0 size: 8 8 8 flags: PUSHABLE @@ -23,7 +35,52 @@ actor{ } actor{ - name: BOX-C + name: BOX-A-01 + bmp: caixes.gif + bmp-rect: 0 0 32 32 + bmp-offset: 0 32 + pos: 48 8 0 + size: 8 8 8 + movement: CW +} + +actor{ + name: BOX-A-02 + bmp: caixes.gif + bmp-rect: 0 0 32 32 + bmp-offset: 0 32 + pos: 10 8 0 + size: 8 8 8 + orient: YP + flags: PUSHABLE ORIENTABLE + movement: CW +} + +actor{ + name: BOX-B-00 + bmp: caixes.gif + bmp-rect: 32 0 32 32 + bmp-offset: 0 32 + pos: 40 10 0 + size: 8 8 8 + flags: PUSHABLE + movement: CW +} + +actor{ + name: BOX-B-01 + bmp: caixes.gif + bmp-rect: 32 0 32 32 + bmp-offset: 0 32 + pos: 42 48 8 + size: 8 8 8 + orient: YP + flags: PUSHABLE ORIENTABLE + movement: CW +} + +actor{ + name: BOX-C-00 bmp: caixes.gif bmp-rect: 64 0 32 32 bmp-offset: 0 32 @@ -33,6 +90,18 @@ actor{ movement: CW } +actor{ + name: BOX-C-01 + bmp: caixes.gif + bmp-rect: 64 0 32 32 + bmp-offset: 0 32 + pos: 44 8 8 + size: 8 8 8 + orient: YP + flags: PUSHABLE ORIENTABLE + movement: CW +} + actor{ name: LIFT bmp: altres.gif diff --git a/data/rooms/19.txt b/data/rooms/19.txt index 1baf9dc..811c75c 100644 --- a/data/rooms/19.txt +++ b/data/rooms/19.txt @@ -196,6 +196,20 @@ actor{ movement: CW } +actor{ + name: OBRER + bmp: obrer.gif + bmp-rect: 0 0 24 32 + bmp-offset: -4 37 + pos: 56 16 0 + size: 8 8 8 + orient: XN + anim-wait: 1 + flags: REACTIVE MOVING ANIMATED ORIENTABLE DEADLY + react-mask: XP XN YP YN ZP ZN + movement: X +} + actor{ name: REIXA-Y bmp: altres.gif diff --git a/data/rooms/27.txt b/data/rooms/27.txt new file mode 100644 index 0000000..8c4653f --- /dev/null +++ b/data/rooms/27.txt @@ -0,0 +1,220 @@ +width: 2 +height: 3 +door-height-xp: 0 +door-height-xn: 0 +color: YELLOW +floor-texture: 10 +wall-texture: 9 +door-texture: 3 +under-door-texture: 9 +exit-xp: 17 +exit-xn: 28 + +actor{ + name: BOX-B + bmp: caixes.gif + bmp-rect: 32 0 32 32 + bmp-offset: 0 32 + pos: 48 8 0 + size: 8 8 8 + flags: PUSHABLE + movement: CW +} + +actor{ + name: CADIRA + bmp: caixes.gif + bmp-rect: 64 96 20 32 + bmp-offset: -7 38 + pos: 16 32 0 + size: 6 5 8 + orient: YP + movement: CW +} + +actor{ + name: CUADRO-00 + bmp: altres.gif + bmp-rect: 66 75 18 32 + bmp-offset: 0 39 + pos: 7 8 6 + size: 1 1 9 + orient: YP + movement: CW +} + +actor{ + name: CUADRO-01 + bmp: altres.gif + bmp-rect: 102 75 18 32 + bmp-offset: 0 39 + pos: 7 48 6 + size: 1 1 9 + orient: YP + movement: CW +} + +actor{ + name: KALLAX-00 + bmp: altres.gif + bmp-rect: 0 48 24 27 + bmp-offset: -8 31 + pos: 16 0 0 + size: 8 4 8 + orient: YP + flags: ORIENTABLE + movement: CW +} + +actor{ + name: KALLAX-01 + bmp: altres.gif + bmp-rect: 48 48 24 27 + bmp-offset: -8 31 + pos: 16 0 8 + size: 8 4 8 + orient: YP + flags: ORIENTABLE + movement: CW +} + +actor{ + name: KALLAX-02 + bmp: altres.gif + bmp-rect: 24 48 24 27 + bmp-offset: -8 31 + pos: 8 0 0 + size: 8 4 8 + orient: YP + flags: ORIENTABLE + movement: CW +} + +actor{ + name: KALLAX-02 + bmp: altres.gif + bmp-rect: 48 48 24 27 + bmp-offset: -8 31 + pos: 40 0 0 + size: 8 4 8 + orient: YP + flags: ORIENTABLE + movement: CW +} + +actor{ + name: KALLAX-03 + bmp: altres.gif + bmp-rect: 24 48 24 27 + bmp-offset: -8 31 + pos: 48 0 0 + size: 8 4 8 + orient: YP + flags: ORIENTABLE + movement: CW +} + +actor{ + name: KALLAX-04 + bmp: altres.gif + bmp-rect: 96 48 24 27 + bmp-offset: -8 31 + pos: 40 0 8 + size: 8 4 8 + orient: YP + flags: ORIENTABLE + movement: CW +} + +actor{ + name: KALLAX-05 + bmp: altres.gif + bmp-rect: 72 48 24 27 + bmp-offset: -8 31 + pos: 48 0 8 + size: 8 4 8 + orient: YP + flags: ORIENTABLE + movement: CW +} + +actor{ + name: KALLAX-06 + bmp: altres.gif + bmp-rect: 96 48 24 27 + bmp-offset: -8 31 + pos: 8 0 8 + size: 8 4 8 + orient: YP + flags: ORIENTABLE + movement: CW +} + +actor{ + name: MESITA + bmp: caixes.gif + bmp-rect: 0 64 32 32 + bmp-offset: 0 32 + pos: 24 0 0 + size: 8 8 4 + movement: CW +} + +actor{ + name: NES + bmp: caixes.gif + bmp-rect: 96 0 32 32 + bmp-offset: -2 33 + pos: 32 0 0 + size: 8 7 6 + flags: PUSHABLE + movement: CW +} + +actor{ + name: ROOMBA + bmp: caixes.gif + bmp-rect: 160 0 32 32 + bmp-offset: 0 34 + pos: 8 56 0 + size: 8 8 2 + orient: XN + flags: REACTIVE MOVING DEADLY + react-mask: XP XN YP YN ZP ZN + movement: CW +} + +actor{ + name: TAULA-A + bmp: caixes.gif + bmp-rect: 128 32 32 32 + bmp-offset: 0 32 + pos: 24 24 0 + size: 8 8 8 + orient: YP + flags: ORIENTABLE + movement: CW +} + +actor{ + name: TAULA-B + bmp: caixes.gif + bmp-rect: 160 32 32 32 + bmp-offset: 0 32 + pos: 24 32 0 + size: 8 8 8 + orient: YP + flags: ORIENTABLE + movement: CW +} + +actor{ + name: TV + bmp: caixes.gif + bmp-rect: 32 64 32 32 + bmp-offset: -4 34 + pos: 24 0 4 + size: 8 6 8 + flags: PUSHABLE + movement: CW +} diff --git a/data/rooms/28.txt b/data/rooms/28.txt new file mode 100644 index 0000000..54ebb40 --- /dev/null +++ b/data/rooms/28.txt @@ -0,0 +1,281 @@ +width: 3 +height: 3 +door-height-xp: 0 +door-height-yp: 0 +door-height-yn: 0 +color: GREEN +floor-texture: 10 +wall-texture: 3 +door-texture: 1 +under-door-texture: 3 +exit-xp: 27 +exit-yp: 35 +exit-yn: 29 + +actor{ + name: BLOCMATA-00 + bmp: altres.gif + bmp-rect: 0 133 32 27 + bmp-offset: 0 27 + pos: 48 48 0 + size: 8 8 6 + flags: REACTIVE DEADLY + react-mask: XP XN YP YN ZP ZN + movement: CW +} + +actor{ + name: BLOCMATA-01 + bmp: altres.gif + bmp-rect: 0 133 32 27 + bmp-offset: 0 27 + pos: 48 40 0 + size: 8 8 6 + flags: REACTIVE DEADLY + react-mask: XP XN YP YN ZP ZN + movement: CW +} + +actor{ + name: BLOCMATA-02 + bmp: altres.gif + bmp-rect: 0 133 32 27 + bmp-offset: 0 27 + pos: 40 48 0 + size: 8 8 6 + flags: REACTIVE DEADLY + react-mask: XP XN YP YN ZP ZN + movement: CW +} + +actor{ + name: BLOCMATA-03 + bmp: altres.gif + bmp-rect: 0 133 32 27 + bmp-offset: 0 27 + pos: 48 16 0 + size: 8 8 6 + flags: REACTIVE DEADLY + react-mask: XP XN YP YN ZP ZN + movement: CW +} + +actor{ + name: BLOCMATA-04 + bmp: altres.gif + bmp-rect: 0 133 32 27 + bmp-offset: 0 27 + pos: 48 8 0 + size: 8 8 6 + flags: REACTIVE DEADLY + react-mask: XP XN YP YN ZP ZN + movement: CW +} + +actor{ + name: BLOCMATA-05 + bmp: altres.gif + bmp-rect: 0 133 32 27 + bmp-offset: 0 27 + pos: 40 8 0 + size: 8 8 6 + flags: REACTIVE DEADLY + react-mask: XP XN YP YN ZP ZN + movement: CW +} + +actor{ + name: BLOCMATA-06 + bmp: altres.gif + bmp-rect: 0 133 32 27 + bmp-offset: 0 27 + pos: 16 8 0 + size: 8 8 6 + flags: REACTIVE DEADLY + react-mask: XP XN YP YN ZP ZN + movement: CW +} + +actor{ + name: BLOCMATA-07 + bmp: altres.gif + bmp-rect: 0 133 32 27 + bmp-offset: 0 27 + pos: 8 8 0 + size: 8 8 6 + flags: REACTIVE DEADLY + react-mask: XP XN YP YN ZP ZN + movement: CW +} + +actor{ + name: BLOCMATA-08 + bmp: altres.gif + bmp-rect: 0 133 32 27 + bmp-offset: 0 27 + pos: 8 16 0 + size: 8 8 6 + flags: REACTIVE DEADLY + react-mask: XP XN YP YN ZP ZN + movement: CW +} + +actor{ + name: BLOCMATA-09 + bmp: altres.gif + bmp-rect: 0 133 32 27 + bmp-offset: 0 27 + pos: 8 40 0 + size: 8 8 6 + flags: REACTIVE DEADLY + react-mask: XP XN YP YN ZP ZN + movement: CW +} + +actor{ + name: BLOCMATA-10 + bmp: altres.gif + bmp-rect: 0 133 32 27 + bmp-offset: 0 27 + pos: 8 48 0 + size: 8 8 6 + flags: REACTIVE DEADLY + react-mask: XP XN YP YN ZP ZN + movement: CW +} + +actor{ + name: BLOCMATA-11 + bmp: altres.gif + bmp-rect: 0 133 32 27 + bmp-offset: 0 27 + pos: 16 48 0 + size: 8 8 6 + flags: REACTIVE DEADLY + react-mask: XP XN YP YN ZP ZN + movement: CW +} + +actor{ + name: BLOCMATA-12 + bmp: altres.gif + bmp-rect: 0 133 32 27 + bmp-offset: 0 27 + pos: 24 24 0 + size: 8 8 6 + flags: REACTIVE DEADLY + react-mask: XP XN YP YN ZP ZN + movement: CW +} + +actor{ + name: BLOCMATA-13 + bmp: altres.gif + bmp-rect: 0 133 32 27 + bmp-offset: 0 27 + pos: 32 24 0 + size: 8 8 6 + flags: REACTIVE DEADLY + react-mask: XP XN YP YN ZP ZN + movement: CW +} + +actor{ + name: BLOCMATA-14 + bmp: altres.gif + bmp-rect: 0 133 32 27 + bmp-offset: 0 27 + pos: 32 32 0 + size: 8 8 6 + flags: REACTIVE DEADLY + react-mask: XP XN YP YN ZP ZN + movement: CW +} + +actor{ + name: BLOCMATA-15 + bmp: altres.gif + bmp-rect: 0 133 32 27 + bmp-offset: 0 27 + pos: 24 32 0 + size: 8 8 6 + flags: REACTIVE DEADLY + react-mask: XP XN YP YN ZP ZN + movement: CW +} + +actor{ + name: BUBBLE-00 + bmp: altres.gif + bmp-rect: 20 75 28 26 + bmp-offset: -2 28 + pos: 8 8 6 + size: 8 8 8 + orient: ZP + flags: PUSHABLE MOVING INERTIA + movement: Z +} + +actor{ + name: BUBBLE-01 + bmp: altres.gif + bmp-rect: 20 75 28 26 + bmp-offset: -2 28 + pos: 8 48 31 + size: 8 8 8 + orient: ZP + flags: PUSHABLE MOVING INERTIA + movement: Z +} + +actor{ + name: BUBBLE-02 + bmp: altres.gif + bmp-rect: 20 75 28 26 + bmp-offset: -2 28 + pos: 48 48 23 + size: 8 8 8 + orient: ZP + flags: PUSHABLE MOVING INERTIA + movement: Z +} + +actor{ + name: BUBBLE-03 + bmp: altres.gif + bmp-rect: 20 75 28 26 + bmp-offset: -2 28 + pos: 48 8 15 + size: 8 8 8 + orient: ZP + flags: PUSHABLE MOVING INERTIA + movement: Z +} + +actor{ + name: GAT-BATMAN + bmp: gat.gif + bmp-rect: 0 0 24 28 + bmp-offset: -4 32 + pos: 0 24 0 + size: 8 8 8 + orient: YP + anim-wait: 1 + flags: REACTIVE MOVING ANIMATED ORIENTABLE DEADLY + react-mask: XP XN YP YN ZP ZN + movement: RAND +} + +actor{ + name: GAT-ROBIN + bmp: gat2.gif + bmp-rect: 0 0 24 28 + bmp-offset: -4 32 + pos: 32 16 0 + size: 8 8 8 + orient: XP + anim-wait: 1 + flags: REACTIVE MOVING ANIMATED ORIENTABLE DEADLY + react-mask: XP XN YP YN ZP ZN + movement: RAND +} diff --git a/data/rooms/29.txt b/data/rooms/29.txt new file mode 100644 index 0000000..5b47f18 --- /dev/null +++ b/data/rooms/29.txt @@ -0,0 +1,13 @@ +width: 0 +height: 3 +door-height-xn: 0 +door-height-yp: 0 +door-height-yn: 0 +color: WHITE +floor-texture: 4 +wall-texture: 2 +door-texture: 0 +under-door-texture: 0 +exit-xn: 31 +exit-yp: 28 +exit-yn: 30 diff --git a/data/rooms/30.txt b/data/rooms/30.txt new file mode 100644 index 0000000..80a5ea9 --- /dev/null +++ b/data/rooms/30.txt @@ -0,0 +1,257 @@ +width: 3 +height: 3 +door-height-yp: 1 +color: CYAN +floor-texture: 11 +wall-texture: 0 +door-texture: 0 +under-door-texture: 0 +exit-yp: 29 + +actor{ + name: PLATF-02 + bmp: caixes.gif + bmp-rect: 96 160 32 32 + bmp-offset: 0 32 + pos: 0 8 16 + size: 8 8 8 + orient: ZP + movement: Z +} + +actor{ + name: PLATF-04 + bmp: caixes.gif + bmp-rect: 96 160 32 32 + bmp-offset: 0 32 + pos: 0 8 0 + size: 8 8 8 + orient: ZP + movement: Z +} + +actor{ + name: PLATH + bmp: caixes.gif + bmp-rect: 160 128 32 32 + bmp-offset: 0 32 + pos: 0 56 16 + size: 8 8 4 + orient: ZP + movement: Z +} + +actor{ + name: PLATH-00 + bmp: caixes.gif + bmp-rect: 160 128 32 32 + bmp-offset: 0 32 + pos: 0 16 0 + size: 8 8 4 + orient: ZP + movement: Z +} + +actor{ + name: PLATH-00 + bmp: caixes.gif + bmp-rect: 160 128 32 32 + bmp-offset: 0 32 + pos: 32 56 0 + size: 8 8 4 + orient: ZP + movement: Z +} + +actor{ + name: PLATH-01 + bmp: caixes.gif + bmp-rect: 160 128 32 32 + bmp-offset: 0 32 + pos: 24 56 0 + size: 8 8 4 + orient: ZP + movement: Z +} + +actor{ + name: PLATH-02 + bmp: caixes.gif + bmp-rect: 160 128 32 32 + bmp-offset: 0 32 + pos: 0 24 0 + size: 8 8 4 + orient: ZP + movement: Z +} + +actor{ + name: PLATH-03 + bmp: caixes.gif + bmp-rect: 160 128 32 32 + bmp-offset: 0 32 + pos: 0 32 0 + size: 8 8 4 + orient: ZP + movement: Z +} + +actor{ + name: PLATH-04 + bmp: caixes.gif + bmp-rect: 160 128 32 32 + bmp-offset: 0 32 + pos: 0 40 0 + size: 8 8 4 + orient: ZP + movement: Z +} + +actor{ + name: PLATH-05 + bmp: caixes.gif + bmp-rect: 160 128 32 32 + bmp-offset: 0 32 + pos: 0 48 0 + size: 8 8 4 + orient: ZP + movement: Z +} + +actor{ + name: PLATH-06 + bmp: caixes.gif + bmp-rect: 160 128 32 32 + bmp-offset: 0 32 + pos: 0 56 0 + size: 8 8 4 + orient: ZP + movement: Z +} + +actor{ + name: ROOMBA + bmp: caixes.gif + bmp-rect: 160 0 32 32 + bmp-offset: 0 34 + pos: 0 56 4 + size: 8 8 2 + orient: YN + flags: REACTIVE MOVING DEADLY + react-mask: XP XN YP YN ZP ZN + movement: Y +} + +actor{ + name: S-BAG + bmp: objectes.gif + bmp-rect: 145 41 20 25 + bmp-offset: -5 27 + pos: 0 56 20 + size: 4 4 4 + anim-cycle: SEQ + anim-wait: 2 + flags: SPECIAL + movement: CW +} + +actor{ + name: TRANSPA-00 + bmp: altres.gif + bmp-rect: 0 160 32 32 + bmp-offset: 0 32 + pos: 48 48 0 + size: 8 8 6 + movement: CW +} + +actor{ + name: TRANSPA-01 + bmp: altres.gif + bmp-rect: 0 160 32 32 + bmp-offset: 0 32 + pos: 48 26 6 + size: 8 8 6 + movement: CW +} + +actor{ + name: TRANSPA-02 + bmp: altres.gif + bmp-rect: 0 160 32 32 + bmp-offset: 0 32 + pos: 48 26 0 + size: 8 8 6 + movement: CW +} + +actor{ + name: TRANSPA-03 + bmp: altres.gif + bmp-rect: 0 160 32 32 + bmp-offset: 0 32 + pos: 48 4 0 + size: 8 8 6 + movement: CW +} + +actor{ + name: TRANSPA-04 + bmp: altres.gif + bmp-rect: 0 160 32 32 + bmp-offset: 0 32 + pos: 48 4 6 + size: 8 8 6 + movement: CW +} + +actor{ + name: TRANSPA-05 + bmp: altres.gif + bmp-rect: 0 160 32 32 + bmp-offset: 0 32 + pos: 48 4 12 + size: 8 8 6 + movement: CW +} + +actor{ + name: TRANSPA-06 + bmp: altres.gif + bmp-rect: 0 160 32 32 + bmp-offset: 0 32 + pos: 24 4 0 + size: 8 8 6 + movement: CW +} + +actor{ + name: TRANSPA-06 + bmp: altres.gif + bmp-rect: 0 160 32 32 + bmp-offset: 0 32 + pos: 24 4 16 + size: 8 8 6 + movement: CW +} + +actor{ + name: TRANSPA-07 + bmp: altres.gif + bmp-rect: 0 160 32 32 + bmp-offset: 0 32 + pos: 24 4 8 + size: 8 8 6 + movement: CW +} + +actor{ + name: TV + bmp: caixes.gif + bmp-rect: 32 64 32 32 + bmp-offset: -4 34 + pos: 0 13 24 + size: 8 6 8 + flags: PUSHABLE GRAVITY + movement: CW +} diff --git a/data/rooms/31.txt b/data/rooms/31.txt new file mode 100644 index 0000000..a102328 --- /dev/null +++ b/data/rooms/31.txt @@ -0,0 +1,11 @@ +width: 2 +height: 2 +door-height-xp: 0 +door-height-yp: 0 +color: PURPLE +floor-texture: 0 +wall-texture: 0 +door-texture: 0 +under-door-texture: 0 +exit-xp: 29 +exit-yp: 32 diff --git a/data/rooms/32.txt b/data/rooms/32.txt new file mode 100644 index 0000000..a1c1f83 --- /dev/null +++ b/data/rooms/32.txt @@ -0,0 +1,11 @@ +width: 2 +height: 2 +door-height-yp: 0 +door-height-yn: 0 +color: CYAN +floor-texture: 0 +wall-texture: 0 +door-texture: 0 +under-door-texture: 0 +exit-yp: 33 +exit-yn: 31 diff --git a/data/rooms/33.txt b/data/rooms/33.txt new file mode 100644 index 0000000..db8ddec --- /dev/null +++ b/data/rooms/33.txt @@ -0,0 +1,13 @@ +width: 2 +height: 2 +door-height-xp: 0 +door-height-yp: 0 +door-height-yn: 0 +color: WHITE +floor-texture: 0 +wall-texture: 0 +door-texture: 0 +under-door-texture: 0 +exit-xp: 35 +exit-yp: 34 +exit-yn: 32 diff --git a/data/rooms/34.txt b/data/rooms/34.txt new file mode 100644 index 0000000..21242c8 --- /dev/null +++ b/data/rooms/34.txt @@ -0,0 +1,9 @@ +width: 2 +height: 2 +door-height-yn: 0 +color: CYAN +floor-texture: 0 +wall-texture: 0 +door-texture: 0 +under-door-texture: 0 +exit-yn: 33 diff --git a/data/rooms/35.txt b/data/rooms/35.txt new file mode 100644 index 0000000..6bc9d6a --- /dev/null +++ b/data/rooms/35.txt @@ -0,0 +1,11 @@ +width: 2 +height: 2 +door-height-xn: 0 +door-height-yn: 0 +color: YELLOW +floor-texture: 0 +wall-texture: 0 +door-texture: 0 +under-door-texture: 0 +exit-xn: 33 +exit-yn: 28 diff --git a/data/templates.txt b/data/templates.txt index 0cbc335..dfc56ef 100644 --- a/data/templates.txt +++ b/data/templates.txt @@ -467,7 +467,7 @@ category{ bmp: obrer.gif bmp-rect: 0 0 24 32 bmp-offset: -4 37 - pos: 48 0 4 + pos: 56 16 0 size: 8 8 8 orient: YP anim-wait: 1 diff --git a/source/actor.cpp b/source/actor.cpp index eb5a4d6..d648edc 100644 --- a/source/actor.cpp +++ b/source/actor.cpp @@ -8,6 +8,7 @@ #include "debug.h" #include "config.h" #include +#include "m_game.h" namespace actor { @@ -756,6 +757,7 @@ namespace actor } break; case MOV_RAND: + act->react_push = (rand()%32)+8; // [RZC 26/09/2024] Hack usant react_push en el moviment RAND per a contar la distancia abans de canviar de direcció switch (rand()%4) { case 0: act->mov_push=PUSH_YP; break; @@ -817,6 +819,14 @@ namespace actor return; } + // [RZC 26/09/2024] Hack usant react_push en el moviment RAND per a contar la distancia abans de canviar de direcció + if (act->movement==MOV_RAND) + { + act->react_push--; + if (act->react_push==0) changeMoving(act); + } + + // [RZC 26/09/2024] Hack usant react_push en les bambolles de café per al dz del moviment de anar pegant botets if (act->movement==MOV_RANDJ) { @@ -1170,7 +1180,7 @@ namespace actor draw::pushSource(); draw::setSource(act->surface); - if (editor::isEditing() && (act==selected)) draw::swapcol(1, room::getColor(1)); // Si està seleccionat, que canvie de color + if (editor::isEditing() && (act==selected) && modules::game::getSection()==modules::game::SECTION_ACTOR) draw::swapcol(1, room::getColor(1)); // Si està seleccionat, que canvie de color 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 diff --git a/source/m_editor_templates.cpp b/source/m_editor_templates.cpp index ba947f7..655d523 100644 --- a/source/m_editor_templates.cpp +++ b/source/m_editor_templates.cpp @@ -7,6 +7,7 @@ #include #include "room.h" #include "jutil.h" +#include "m_game.h" #define EDITING_NORMAL 0 #define EDITING_CATEGORY_NAME 1 @@ -146,7 +147,7 @@ namespace modules actor::select(new_act); actor::setFloatingEditing(true); room::editor::modify(); - + modules::game::setSection(modules::game::SECTION_ACTOR); return false; } } else { diff --git a/source/m_game.cpp b/source/m_game.cpp index 00dc30e..25811d6 100644 --- a/source/m_game.cpp +++ b/source/m_game.cpp @@ -12,8 +12,6 @@ namespace modules { namespace game { - enum sections { SECTION_GENERAL, SECTION_ROOM, SECTION_ACTOR }; - std::vector gifs; int treeview_scroll = 0; @@ -275,6 +273,16 @@ namespace modules } } + void setSection(int value) + { + section = value; + } + + const int getSection() + { + return section; + } + int loop() { int return_value = GAME_NONE; @@ -362,6 +370,10 @@ namespace modules actor::select(actor::findByTag(val)); section = SECTION_ACTOR; } + else if (input::mouseX()>=0 && input::mouseX()<320 && input::mouseY()>=0 && input::mouseY()<240) + { + section = SECTION_ROOM; + } } // Si estem jugant, o estem en el editor pero NO en mode edició, pinta els marcadors diff --git a/source/m_game.h b/source/m_game.h index 321a30a..f0c1239 100644 --- a/source/m_game.h +++ b/source/m_game.h @@ -16,9 +16,14 @@ namespace modules #define GAME_EDITOR_BITMAP_POS 6 #define GAME_EDITOR_BITMAP_SIZE 7 + enum sections { SECTION_GENERAL, SECTION_ROOM, SECTION_ACTOR }; + void init(); int loop(); + void setSection(int value); + const int getSection(); + std::vector getGifs(); } } diff --git a/source/room.cpp b/source/room.cpp index 43ae6e1..51a15c0 100644 --- a/source/room.cpp +++ b/source/room.cpp @@ -88,30 +88,36 @@ namespace room if (doors & DOOR_YP) { - uint8_t actual_floor = door_height[2]>0?0:floor_type*32; - actor::actor_t *act = actor::create("DOOR_YP1", {24,(tmax.y+1)*8,0}, {8,8,(door_height[2])*4}, "floor.gif", {actual_floor,1,32,15}, {0,15+door_height[2]*8}); + const int floor_row_tiles = int(floor_surf->w/32); + const uint8_t actual_floor = door_height[2]>0?0:floor_type; + int floor_x = (actual_floor%floor_row_tiles)*32; + int floor_y = int(actual_floor/floor_row_tiles)*16; + actor::actor_t *act = actor::create("DOOR_YP1", {24,(tmax.y+1)*8,0}, {8,8,(door_height[2])*4}, "floor.gif", {floor_x,floor_y+1,32,15}, {0,15+door_height[2]*8}); act->flags = FLAG_NOEDITOR; actor::setDirty(act, true); - act = actor::create("DOOR_YP2", {32,(tmax.y+1)*8,0}, {8,8,(door_height[2])*4}, "floor.gif", {actual_floor,1,32,15}, {0,15+door_height[2]*8}); + act = actor::create("DOOR_YP2", {32,(tmax.y+1)*8,0}, {8,8,(door_height[2])*4}, "floor.gif", {floor_x,floor_y+1,32,15}, {0,15+door_height[2]*8}); act->flags = FLAG_NOEDITOR; actor::setDirty(act, true); - act = actor::create("DOOR_YP", {20,(tmax.y+1)*8,1+door_height[2]*4}, {5,4,1}, "doors.gif", {(doors_type%6)*40,(doors_type/6)*59,16,48}, {-16,49}); + act = actor::create("DOOR_YP", {20,(tmax.y+1)*8,1+door_height[2]*4}, {5,4,24}, "doors.gif", {(doors_type%6)*40,(doors_type/6)*59,16,48}, {-16,49}); act->flags = FLAG_NOEDITOR; actor::setDirty(act, true); } if (doors & DOOR_XP) { - uint8_t actual_floor = door_height[0]>0?0:floor_type*32; - actor::actor_t *act = actor::create("DOOR_XP1", {(tmax.x+1)*8,24,0}, {8,8,(door_height[0])*4}, "floor.gif", {actual_floor,1,32,15}, {0,15+door_height[0]*8}); + const int floor_row_tiles = int(floor_surf->w/32); + const uint8_t actual_floor = door_height[0]>0?0:floor_type; + int floor_x = (actual_floor%floor_row_tiles)*32; + int floor_y = int(actual_floor/floor_row_tiles)*16; + actor::actor_t *act = actor::create("DOOR_XP1", {(tmax.x+1)*8,24,0}, {8,8,(door_height[0])*4}, "floor.gif", {floor_x,floor_y+1,32,15}, {0,15+door_height[0]*8}); act->flags = FLAG_NOEDITOR; actor::setDirty(act, true); - act = actor::create("DOOR_XP2", {(tmax.x+1)*8,32,0}, {8,8,(door_height[0])*4}, "floor.gif", {actual_floor,1,32,15}, {0,15+door_height[0]*8}); + act = actor::create("DOOR_XP2", {(tmax.x+1)*8,32,0}, {8,8,(door_height[0])*4}, "floor.gif", {floor_x,floor_y+1,32,15}, {0,15+door_height[0]*8}); act->flags = FLAG_NOEDITOR; actor::setDirty(act, true); - act = actor::create("DOOR_XP", {(tmax.x+1)*8,20,1+door_height[0]*4}, {8,8,1}, "doors.gif", {(doors_type%6)*40,(doors_type/6)*59,16,48}, {0,49}); + act = actor::create("DOOR_XP", {(tmax.x+1)*8,20,1+door_height[0]*4}, {8,8,24}, "doors.gif", {(doors_type%6)*40,(doors_type/6)*59,16,48}, {0,49}); act->flags = FLAG_NOEDITOR | FLAG_ORIENTABLE; act->orient = PUSH_YP; actor::setDirty(act, true);