From 12b322ab6b35e3d9cf3807f39b0ff26df05b18ac Mon Sep 17 00:00:00 2001 From: Raimon Zamora Date: Mon, 9 Mar 2026 13:46:51 +0100 Subject: [PATCH] - [NEW] Claus i portes funcionant --- data/animations.lua | 35 +++++++++++++++ data/blava.gif | Bin 0 -> 234 bytes data/editor.lua | 8 +++- data/groga.gif | Bin 0 -> 234 bytes data/items.lua | 45 +++++++++++++++++++- data/misc.gif | Bin 724 -> 1088 bytes data/roja.gif | Bin 0 -> 234 bytes data/rooms_background.gif | Bin 1196 -> 1196 bytes data/rooms_foreground.gif | Bin 2023 -> 2020 bytes data/rooms_items.gif | Bin 1042 -> 1046 bytes data/score.lua | 9 +++- data/sprites.gif | Bin 2252 -> 2642 bytes data/sprites.lua | 87 ++++++++++++++++++++++++++++---------- data/templates.lua | 55 +++++++++++++++++++----- data/verda.gif | Bin 0 -> 234 bytes 15 files changed, 203 insertions(+), 36 deletions(-) create mode 100644 data/blava.gif create mode 100644 data/groga.gif create mode 100644 data/roja.gif create mode 100644 data/verda.gif diff --git a/data/animations.lua b/data/animations.lua index 7ff85c7..a3aa65a 100644 --- a/data/animations.lua +++ b/data/animations.lua @@ -130,4 +130,39 @@ animations = { { frame={x=24,y=0,w=8,h=16}, wait=2 } } }, + ["clau"] = { + cycle = {1}, + loop = false, + frames = { + { frame={x=0,y=0,w=16,h=8}, wait=100 }, + } + }, + ["porta"] = { + cycle = {1}, + loop = false, + frames = { + { frame={x=16,y=0,w=8,h=16}, wait=100 }, + } + }, + ["porta_obrint"] = { + cycle = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}, + loop = false, + frames = { + { frame={x=16,y=1,w=8,h=15}, wait=1 }, + { frame={x=16,y=2,w=8,h=14}, wait=1 }, + { frame={x=16,y=3,w=8,h=13}, wait=1 }, + { frame={x=16,y=4,w=8,h=12}, wait=1 }, + { frame={x=16,y=5,w=8,h=11}, wait=1 }, + { frame={x=16,y=6,w=8,h=10}, wait=1 }, + { frame={x=16,y=7,w=8,h=9}, wait=1 }, + { frame={x=16,y=8,w=8,h=8}, wait=1 }, + { frame={x=16,y=9,w=8,h=7}, wait=1 }, + { frame={x=16,y=10,w=8,h=6}, wait=1 }, + { frame={x=16,y=11,w=8,h=5}, wait=1 }, + { frame={x=16,y=12,w=8,h=4}, wait=1 }, + { frame={x=16,y=13,w=8,h=3}, wait=1 }, + { frame={x=16,y=14,w=8,h=2}, wait=1 }, + { frame={x=16,y=15,w=8,h=1}, wait=1 }, + } + }, } \ No newline at end of file diff --git a/data/blava.gif b/data/blava.gif new file mode 100644 index 0000000000000000000000000000000000000000..b0af606cab3401d610db1919b651b8cedc1e0da4 GIT binary patch literal 234 zcmZ?wbh9u|lwc5GIKlu036{eC+A3Pgp0ySZM#1sL$>IMQ7@DFDyHc$e)dn8SiLTz{ z_xr5W%(l`Q?d3-&hMb*O@M321hrQ*F4GT)v?%ub1)A0@Se&3&c?9k!=KcD>j57Z3> zia%L6xqxgP5FcbG18cg1LSG7JP3Ww;`4W59TP|};y^@=-GE9Nl>~=3JM@WMEj88|h zgnI23XT5Uvo$vYLby~;8mZ>qlVsF2?IO=WOk#g9@@A>=m(6!H(zSr$BU)ru)t5WFO Y)Eu1H*yd1Q)9qlI)z#LbqsU+l05lt4Qvd(} literal 0 HcmV?d00001 diff --git a/data/editor.lua b/data/editor.lua index f95ba55..6d3e04d 100644 --- a/data/editor.lua +++ b/data/editor.lua @@ -299,9 +299,13 @@ editor = { local mx, my = mouse.pos() local x,y = 0,0 for i,k in pairs(items) do - local w = math.max(k.visual.w, #k.name*4) + local w = math.max(k.visual.w, #k.label*4) + if x+w > 160 then + y=y+32 + x=0 + end local ox = (w-k.visual.w)/2 - draw.text(k.name, x, y, 15) + draw.text(k.label, x, y, 15) draw.surf(k.visual.x, k.visual.y, k.visual.w, k.visual.h, x+ox, y+7) if mx>x and mxy and myIMQ7@DFDyHc$e)dn8SiLTz{ z_xr5W%(l`Q?d3-&hMb*O@M321hrQ*F4GT)v?%ub1)A0@Se&3&c?9k!=KcD>j57Z3> zia%L6xqxgP5FcbG18cg1LSG7Jjo+-g`4W59TP~X@d^LB%%18xfv)jF_92N=gGd>;3 z66&>Eob}4tcfRL~*J7O)Tl!*p#om5(an#$mBjvD*-}CqBp=+NneXrYNzO-GpR;AFl YsW~{YvCW~rrrW_ZtE;U=N0GrA03};r2LJ#7 literal 0 HcmV?d00001 diff --git a/data/items.lua b/data/items.lua index 781fb5f..929a959 100644 --- a/data/items.lua +++ b/data/items.lua @@ -1,14 +1,57 @@ items = { [1] = { name="mummy", + label="momia", visual = {x=0,y=24,w=16,h=16} }, [2] = { name="coin", + label="moneda", visual = {x=0,y=40,w=8,h=8} }, [3] = { name="torxa", + label="torxa", visual = {x=0,y=48,w=8,h=16} - } + }, + [4] = { + name="clau verda", + label="clau", + visual = {x=16,y=48,w=16,h=8} + }, + [5] = { + name="clau groga", + label="clau", + visual = {x=16,y=56,w=16,h=8} + }, + [6] = { + name="clau roja", + label="clau", + visual = {x=32,y=48,w=16,h=8} + }, + [7] = { + name="clau blava", + label="clau", + visual = {x=32,y=56,w=16,h=8} + }, + [8] = { + name="porta verda", + label="porta", + visual = {x=48,y=48,w=8,h=16} + }, + [9] = { + name="porta groga", + label="porta", + visual = {x=56,y=48,w=8,h=16} + }, + [10] = { + name="porta roja", + label="porta", + visual = {x=64,y=48,w=8,h=16} + }, + [11] = { + name="porta blava", + label="porta", + visual = {x=72,y=48,w=8,h=16} + }, } \ No newline at end of file diff --git a/data/misc.gif b/data/misc.gif index c5ed9cf6778ce4f00598ca14941a8d9767f660d2..4132de7c8e91bba96fe421435926faab31f74881 100644 GIT binary patch delta 742 zcmVDO| zg2s%4j|d9n)cJv=feHqGN%pl12725;2%tw&^FdIqcP{s0vdq=4SJHOzy>A2 z7K?(QMA@+()2dy|maW&XCIVob3zlr$ka){BqU(|4&8m1umaKo!^{p+rVM|P85#Vg& z5(Ofsa0yi=O+jdI>Wqw_r`Di^4c~f(aoz}|NKxnnSs-rHrXrq3lZrV))yWFG6zPf+>%sQY2}qzW~qPWmRxq}<(FWFDdw1DmTBgh zXr`&=nryb|=9_TFDW{iX;R4K@WIzA`HxN){gr0o*iKiQS?ir|{hZIUqpNtKfouLZ_ zN<;vVMv4KW4M04CYPx9>3{1cQ0}OCrY80rd%BrgYJn+B)j%Mco z1G}m^00(~qym|?*sR9cusix)H!x5~eI>EEg#&zeiyRr%`y|e)YtE>;qT6^sTq}nR( zKixWeEpgla((JR=mN38oi)FX&1nmX@uCSYGumB_+D6oJA*rJ=AzWn+Nu(s*`qJh2= zDA2D22O}&*01GeB@WTM(`=(M1?0c~S5@;uH#}-~Y3^J$*kHBgGB|nVv$Sk*fa>~DC zgM$LLDiDAGuV!<=%{lL^ahp2}U~4qC;?Oe=M?;e|&on!sGzris-N)26Lml*wdVuSzyJ50)6sQ>@~ delta 375 zcmV--0f_#<2-F3zX90isu%g9_7&B_z$g!ixk03*e97)n+u{6HP+Q*n@ib~r5=)sj-II&K1P%-s zaL^hhiC3^JFo5R?paW>O%ejw+1&}x>SfF9>W+Sg-&#uk5 zwXFaeUQ19QTLSOiLVyb=uE4lv-@n7c9$s9=5Yr5%GnX(GdL`@u7Eo{Aood+d;+kyA-=dWjP1jpoPli^UGe``S#AbtFiG9OWWBtRoz9|AUbAA$*1 zXyJtzW~kwY9Cqm8haiS1;)o=cXyS<|rl{hIEVk(4i!jD0IMQ7@DFDyHc$e)dn8SiLTz{ z_xr5W%(l`Q?d3-&hMb*O@M321hrQ*F4GT)v?%ub1)A0@Se&3&c?9k!=KcD>j57Z3> zia%L6xqxgP5FcbG18cg1LSG7JjmNCI`4W59TP|Y_x{`Zfg^vQW+3j9d4uu5w8J~`1 z3H917&U)qSJKyug>#&ZCEgdnvVsF2?IO=WOk#g9@@A>=m(6!H(zSr$BU)ru)t5WFO Y)Eu1H*yd1Q)9qlI)z#LbqsU+l02q;8_5c6? literal 0 HcmV?d00001 diff --git a/data/rooms_background.gif b/data/rooms_background.gif index c5f1acbac5bb0675f81efa999f367cf74463e471..4e5ff03f8ccea7df8eeafcd936346454a59d01b4 100644 GIT binary patch delta 14 VcmZ3(xrTEC7c*nnW^U$%i~u0A1L6Px delta 14 VcmZ3(xrTEC7c*n%W^U$%i~u041K|Jw diff --git a/data/rooms_foreground.gif b/data/rooms_foreground.gif index e148363bbfadbe996dfce903c64a740aabc16151..eb40c214eaa3859c211b499e22df80e7a0a4fcd4 100644 GIT binary patch delta 836 zcmV-K1H1g^59AN93IhXH006TM1F8Xk7ZE`rj!K~k;gt-T$Q+QiRYhr-nb`%C+ZTaebSXq6u`>gyDZT~gM6{nqD%fP}Km? zeC`CUstq?(GlZbFoU{4=Srx+Bp1si6XMrvFRzL3D5C{+i9N>owh0t$*t8_E#(Nd7! zboWzFQawQgAATJ<1cw7axJWFsTsl-UVVE`7un#_h4EKfzx7^Ft4JkvLI~9QpBTl6E zOd#Zak%uspetJdAE0j7zt3Oq|MGwyhgMm%Yr&oazi|jqfiB1-EW7&KBCsr=kY|%_K zw_myY@V_sA{OeEQGP;{56Sg30~VDi1XQ2`9I3!GC)$yT(YoW@+690zhKO_{073UO zWw9E55m{ZdNEi{xMFo*bCm@u84DrYkBsP(fDfv+c2L=-m&Y*~gM9CtLX2gVL&{N~` zk+kT8DNI%6hjENEr7WqyFi+|4miWshE_bQRUh?usFC^F-FDN@d#YrMJVO#|#xXflU O^O??!CNxJ75CA*l-G^%c delta 839 zcmV-N1GxO;59bfC3IhZC{QR>G1F8Xk<>9E5nGjwn(M?%K8Nq{HGAQSbbIugNjbbuX zC!Ks6cqf7=>}lYSg7W#>l{E#5CPSDZ_#;M7K6;U)x=BePm=a-@V+2of)agZ^>W1k= zR8iU_ou*op>O`y3rskQU>i>yjRk2d^W33b6N}H0K-NfRn0EB=-s}V&CNbN6 zXRfzxq%ZAH{VIxueD+IC%IiBg5to{ARg2h)4?WrSLjpOy5Y*(l zO!ZaM&h6I>A)xK%Y_eAWRj{>XFBJA!UI)I_k9s!*0tEgB_~Ak!=&P!K+#xN+=uK{K zrMA>tPY}U}YtsdR;Q$OSQpzcl4%JK;(&f6=3_U3Wy&+}}0Nlu~iaJBKLluDxBTkg} zOd#NWk%uslZhF2W;JUluMf+8}MGVgegMmuVr&oa+d+a^P7CYv4W7$_#zV=DWY|%_m zw=cK*@V_sA{Ob6L1fYi2xTC{KAI$t>)Ikme$+vL!32aeFrp$)(nT&d(j{eV zPrnW%#J44jQdRjjp&VyPODZHRi1^E;{&uO$Uh?vnzLeVw0|v(kLQht0l9xgjS3wCn RvzgF*rZl5T%?Abq06UbTj*b8T diff --git a/data/rooms_items.gif b/data/rooms_items.gif index 8fae6d9c1fe84a20ac063e71c68d6db7c1d7992c..f0bee22a8efaa9fbe4364c611634a0686e6c2b57 100644 GIT binary patch delta 121 zcmV-<0EYjP2$l%23Ih*T001li0001>0AK(B2>X*61E5{whX^1Behk1d0m_&&Yu?QH zuVaIsF&nlxxwGlhsDqXkxH`4#*OFmhY%M!sXvDW`>jp_X=j7bGg9|4cC}Hp6$dexi buDoFJgwH!4AIQA9_3PNPYv0cOY(M}z6&yB0 delta 117 zcmV-*0E+*X2$Be}3Ih-O{QN8c0001>0AK(B2=|j21E5)Bkbxfqa4fm9<;$2e3#MF< zvt+{-BWoT_x^z&{0#Tb@%^ITW))HUCZoJs@?AwrkMz)Q+w{Nn663YHfy!c_>#tQ~d XxLot_fyk3fpH98H_3PNr1_S^*Y?C*4 diff --git a/data/score.lua b/data/score.lua index c8be7d8..04ba6fa 100644 --- a/data/score.lua +++ b/data/score.lua @@ -2,14 +2,21 @@ score = { points = 0, color = 28, zoom = 1, + surf = nil, init = function() score.points = 0 + score.surf = surf.load("sprites.gif") end, draw = function() draw.rectf(0,0,160,8,1) - draw.text(string.format("%03d", score.points),0,0,score.color) + draw.text(string.format("%03d", score.points),1,1,score.color) + surf.source(score.surf) + if sprites.hero.keys["verda"] then draw.surf(16,48,16,8, 32,-1) end + if sprites.hero.keys["groga"] then draw.surf(16,56,16,8, 32,-1) end + if sprites.hero.keys["roja"] then draw.surf(32,48,16,8, 32,-1) end + if sprites.hero.keys["blava"] then draw.surf(32,56,16,8, 32,-1) end end, inc = function(value) diff --git a/data/sprites.gif b/data/sprites.gif index 6b1f73342274299b362fce87606b20bf58eec2ba..e007cc745e31dbd79daa2f9520d6eb89e2dfc2c3 100644 GIT binary patch delta 1205 zcmV;m1WNnN5z-W}t_6SE@dFJ=WFkMnNRlw}0|-AQxk3}eW`Y1QHnPq5~j_fC9AAl^>|20V-gCS$-gsB0Jm`I(dZ)DDncgV}K+Xa0yb9 z@-2-_r4kw0%2yVEk+h^`Eiw5j-9=7ZBZ%Y`8ejr${vZGdFhPGfd+^9|n)96KL?Cm2I0gfJSB+&MAq|>j$|f0DQU?HP?J?OB;C&Jf&d3dk_+Ap zKtz$XhjD__1O>=w3`BWMQ=I6KSVps!26a{bCMY}|G}NK-e3K%36#!rY zlLW4eWC2)0Ok#hEz?j%cCP*W|%#mgknzO8>0S>yV{%O#iE_kUnwWq%v{_0oh%&Jz+ zSGje6zMBVDobgm)U6az zfT3QH#WCK_0+zHuF-IBHQ!10FkTmKuW0}-x-V(5bI?jI!`cVSTE+GIFFhOX^xz*C9 z6SJ8O1~pi66g+~KB?T>LKka$eYNU0b&@57S)+ZmF7|}J6#`~sj9rY zYOqX8U#@>r_mk~SRTm}!t2Brrzo){3B|s(MPvF!QyFYl*(w+6 z(C4@i=GI{N%ZfvWddy5{~aR($B_pMk$bO0!*76)sA(squp$7OZ(e8ur;}bz3XF_yW8jng1XI3>|SHL z+pVSmy)7N@9o)MB=5F_^^UdpR2b|yiw!weD^-XSQ1DxBv*7w0Vop2eH^U45 z@Qqix;uhC9#)Vz#k(b-!6bCsAY%OtyI~?OLNBN{x-U3Uv9OBT1dCvEpa+;^W*gy}u zrhUGGOCw;?M+bV+&o#Ytq&J=DDlod!jotK2FI|!dhq?%)j`UMwJ?N2~wbr+8>9Bt@ zJ?vkny4gQIb^w%p?N&c})z6;xoihb;O_xjrF-gmgqyzP63Cjt2G z^rRC$@qW*`)*+8}#y9=(PKWE<+wS(p!xZy{kGtlp&Us2pa`cQhy;Ma%dbR`J^VKkX z-y?7ImulYilZXB7nI8MpN3!?0zk4m_N0R!*+rId}-~HiVPic}AfAO*Ry7HIL`RZH$ T`q_ z%;Y9>MMKi<%q|FUKqyD)s{Bn*c$gf9C|Sv>{%P=&El8y*HA%}=&2W1Q+<`7<*~?-M zvzW-7fdUMb%u&MVIL+MTGsP9nBi;s=)nudlvgt@_`f+h$04IMpE7gTbz$y)*7^kK1 zURIwiGz=b#l8YzN&WFiEO zNI(!G4sSB_1xuL0c(ZnF)VIK0G6FbN<_WfBxx55**}wslZ-%~MhxNr1lk^{;>p ztY8OASijCy2Z1d>UlmJO#uC7>gvVJXXU{kAF(7v{?uazxqON(0Cs(`e)ZLDZndszzH_OHHO0dR@y zTE_BLxW?^maz$WU*|Ju*|GE_{XQMmY>5jm*+&wOEV=G?pau=}P{qAK85Z&xr*0shx zEd|<(-t>P0fV}K&FLSpWU+w0XzJ|50dFNYR;1bxh{5>#o1x()gD!8!@E^vb%+*kYF zH?|HYFmC@#+ysl)!hp?ie<7@4+)}v042G?WS3KDi`xOCwg|UidOjsJn*v23Rtc)`W zTN@9S#-XfldIJmO$Od`EJQlKdiR@z?^Z3X;PV#?(hx}J4{}{$izOt23Oyw6pxyClm za+Oml>3, (spr.pos.y)>>3 - map.surf(rooms.surf_items) - map.tile(tx,ty,0) + local x2,y2,w2,h2 = util.aabb(sprites.hero) + if util.check_aabb_collision(x1,y1,w1,h1, x2,y2,w2,h2) then + local tx, ty = (spr.pos.x)>>3, (spr.pos.y)>>3 + map.surf(rooms.surf_items) + map.tile(tx,ty,0) - spr.state = templates.DYING - sprites.set_animation(spr, "coin_picked") - spr.pos.y=spr.pos.y-16 - spr.pos.x=spr.pos.x-4 - spr.timer = 0 - score.inc(10) - return - end - --end - --end + spr.state = templates.DYING + sprites.set_animation(spr, "coin_picked") + spr.pos.y=spr.pos.y-16 + spr.pos.x=spr.pos.x-4 + spr.timer = 0 + score.inc(10) + return + end elseif spr.state == templates.DYING then spr.pos.y = spr.pos.y - 0.5 spr.timer = spr.timer + 1 @@ -299,7 +303,7 @@ sprites = { local x1,y1,w1,h1 = util.aabb(spr) local x2,y2,w2,h2 = util.aabb(sprites.hero) if util.check_aabb_collision(x1,y1,w1,h1, x2,y2,w2,h2) then - sprites.hit_hero(4) + sprites.hero_hit(4) spr.state = templates.DYING spr.timer = 0 return @@ -307,7 +311,46 @@ sprites = { elseif spr.state == templates.DYING then spr.timer = spr.timer + 1 if spr.timer == 32 then - spr.state = templates.DYING + spr.state = templates.ALIVE + end + end + end, + + update_clau = function(spr) + if spr.state == templates.ALIVE then + local x1,y1,w1,h1 = util.aabb(spr) + local x2,y2,w2,h2 = util.aabb(sprites.hero) + if util.check_aabb_collision(x1,y1,w1,h1, x2,y2,w2,h2) then + if sprites.hero_give_key(spr.color) then + local tx, ty = (spr.pos.x)>>3, (spr.pos.y)>>3 + map.surf(rooms.surf_items) + map.tile(tx,ty,0) + sprites.remove(spr) + end + end + end + end, + + update_porta = function(spr) + if spr.state == templates.ALIVE then + local x1,y1,w1,h1 = util.aabb(spr) + local x2,y2,w2,h2 = util.aabb(sprites.hero) + if util.check_aabb_collision(x1,y1,w1,h1, x2,y2,w2,h2) then + if sprites.hero.keys[spr.color] then + sprites.hero.keys[spr.color] = nil + sprites.set_animation(spr, "porta_obrint") + spr.state = templates.DYING + end + end + elseif spr.state == templates.DYING then + if spr.current_frame == 15 then + local tx, ty = (spr.pos.x)>>3, (spr.pos.y)>>3 + map.surf(rooms.surf_items) + map.tile(tx,ty,0) + map.surf(rooms.surf_foreground) + map.tile(tx,ty,0) + map.tile(tx,ty+1,0) + sprites.remove(spr) end end end, @@ -446,7 +489,7 @@ sprites = { game.change_room(0,1) else if sprites.hero.pos.y >= 742 then - sprites.hit_hero(0) + sprites.hero_hit(0) return end sprites.hero.pos.y = sprites.hero.pos.y + 2 diff --git a/data/templates.lua b/data/templates.lua index f4117ca..20a8a35 100644 --- a/data/templates.lua +++ b/data/templates.lua @@ -6,9 +6,11 @@ templates = { create = function(type, options) local sprite - if type == "mummy" then + local key, value = type:match("^(%S+)%s*(.*)$") + + if key == "mummy" then sprite = { - type = type, + type = key, pos = options.pos,--{ x=100, y=4*12*8+71 }, size = { w=16,h=16 }, bbo = { left=3, top=2, right=3, bottom=0 }, @@ -22,9 +24,9 @@ templates = { room = options.room, ia = sprites.update_mummy } - elseif type == "bullet" then + elseif key == "bullet" then sprite = { - type = type, + type = key, pos = options.pos,--{ x=100, y=4*12*8+71 }, size = { w=4,h=3 }, bbo = { left=0, top=0, right=0, bottom=0 }, @@ -35,9 +37,9 @@ templates = { animation = "bullet", ia = sprites.update_bullet } - elseif type == "coin" then + elseif key == "coin" then sprite = { - type = type, + type = key, pos = options.pos,--{ x=100, y=4*12*8+71 }, size = { w=8,h=8 }, bbo = { left=0, top=0, right=0, bottom=0 }, @@ -52,9 +54,9 @@ templates = { light_oy = 4, ia = sprites.update_coin } - elseif type == "brick" then + elseif key == "brick" then sprite = { - type = type, + type = key, pos = options.pos,--{ x=100, y=4*12*8+71 }, size = { w=8,h=8 }, bbo = { left=0, top=0, right=0, bottom=0 }, @@ -67,9 +69,9 @@ templates = { timeout = 10, ia = sprites.update_brick } - elseif type == "torxa" then + elseif key == "torxa" then sprite = { - type = type, + type = key, pos = options.pos,--{ x=100, y=4*12*8+71 }, size = { w=8,h=16 }, bbo = { left=0, top=0, right=0, bottom=0 }, @@ -85,6 +87,39 @@ templates = { no_shadow = true, ia = sprites.update_torxa } + elseif key == "clau" then + sprite = { + type = key, + color = value, + pos = options.pos,--{ x=100, y=4*12*8+71 }, + size = { w=16,h=8 }, + bbo = { left=0, top=0, right=0, bottom=0 }, + current_frame = 1, + current_wait = 1, + flipped = options.flipped, + surf = surf.load(value..".gif"), + animation = "clau", + state = templates.ALIVE, + light = 15, + light_ox = 7, + light_oy = 4, + ia = sprites.update_clau + } + elseif key == "porta" then + sprite = { + type = key, + color = value, + pos = options.pos,--{ x=100, y=4*12*8+71 }, + size = { w=8,h=16 }, + bbo = { left=0, top=0, right=0, bottom=0 }, + current_frame = 1, + current_wait = 1, + flipped = options.flipped, + surf = surf.load(value..".gif"), + animation = "porta", + state = templates.ALIVE, + ia = sprites.update_porta + } else error("Template not recognized") end diff --git a/data/verda.gif b/data/verda.gif new file mode 100644 index 0000000000000000000000000000000000000000..4a28926a6f5addfcb9a22bcdb538d16667a5c67c GIT binary patch literal 234 zcmZ?wbh9u|lwc5GIKlu036{eC+A3Pgp0ySZM#1sL$>IMQ7@DFDyHc$e)dn8SiLTz{ z_xr5W%(l`Q?d3-&hMb*O@M321hrQ*F4GT)v?%ub1)A0@Se&3&c?9k!=KcD>j57Z3> zia%L6xqxgP5FcbG18cg1LSG7Jjqj|w`4W59TP|}izLHz8GF*Y#>~=3Jhe?9_j88|h zgnI23XT5Uvo$vYLby>&7mfo0NvA17c9Q8KtNIC4{_xyc&=-TH?-|P06FKySYRVnms YY7S0pY;&lu>2@&9>S}AzQDm?N05n%$Qvd(} literal 0 HcmV?d00001