From f16962f7f950bf27b6fdaae5a882b5b71c84c9b9 Mon Sep 17 00:00:00 2001 From: Jeremy Penner Date: Mon, 11 Mar 2019 21:57:22 -0400 Subject: [PATCH] DSL for level-based player touch event handling --- defs.jim | Bin 1628 -> 1699 bytes defs.jor | 13 +++++++++++++ entity.jim | Bin 909 -> 909 bytes footer.jim | Bin 1073 -> 1075 bytes footer.jor | 8 ++++---- game.jim | Bin 1754 -> 1868 bytes game.jor | 25 ++++++++++++++++--------- game.prj | Bin 5316 -> 5316 bytes input.jim | Bin 372 -> 372 bytes map.jim | Bin 749 -> 749 bytes pete.jim | Bin 241 -> 225 bytes pete.jor | 16 +++++++--------- petehous.jim | Bin 107 -> 392 bytes petehous.jor | 18 +++++++++++++----- repl.jim | Bin 0 -> 331 bytes timer.jim | Bin 438 -> 438 bytes 16 files changed, 53 insertions(+), 27 deletions(-) create mode 100755 repl.jim diff --git a/defs.jim b/defs.jim index 58c6fd0adbc874fbff74dfec341cef7865efa6b9..11043815e5416608687a17e5d228f3280ac830b2 100755 GIT binary patch literal 1699 zcmZ8hO=uit82)zVo!#y3%?~yg3<5YB14A^dK28s+Wx(TrAMV0k!%2$GWh#Pl zLY2gkF$5Yy#fT`VE%(zF1xWI)+@h=a{Xo3{ zXKvF-M4XwcyR4UoJylNBFEFG1%=r1jxgxHZ< z^iOp9SqkZU?Nw28J#YdVLfL<$Pzinm%!>aXluJqi;n^0_uJ*EUA}(7)8qi-84SOlx zsq!6eKcSlY;8uvRsfawLD`MHP=c)*B5*j@ZXWOdG;Io@G0nttauDc$K6Oga(#o@l* z(NpMu8tTo$?&~ZYy4BB$E*21H3+NkohV(6R&N+=)7QxrsvLF*e{Hlkvqn{H^+w!9P zaiVVLW~XN^o|}lv|67+u-Dx1uu*zzV<%(zzqs{@hmLmKZ@Z%kPB9{@B8M`t&?>Y@u zXjR*rSV`%VO3E1ixYqNzOIiro+j2n?#ItV8hj9u>issvvpTw-?&Y9Qr*<4Z}s_k(- zt6HD5fKUOoq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&1#cN7**T%e06Wl@9Qy%sL-} z8}P501m@z-UG!u&tyWOFm7r?AGJDdM>%SG3S^|Eig;pXo${X3vSjotv{J^MSDFg^j z3z?w3#drbS$5X(!o0V7kWoJg46M4lZ-m-q@PJ8$X>d=TMtcIHAwPx_sFgH}zMC&@| z>^BoKTuGtZ67&#V6}^0+>RyhneVU)QcA?lBuI5B|`Wz=0C!tT;YxEHLc+cdbPua2> z@`?%gij7g0YbPsCNp95%=+=P#-ymt!X`Q$2T~($Z@Mm@#E#=+n|Ji@o^YJ?GgBS1} po2eP>c3Am+J3(cq;JBCNLaxW76mp4r+r{m%c1bBi?F-+w{{f%Un}+}Z diff --git a/defs.jor b/defs.jor index 16fedce..0c3491c 100755 --- a/defs.jor +++ b/defs.jor @@ -15,6 +15,7 @@ rot drop drop ; + : test-xy { x y -- b } + search-xy 1 2 2= yield 3 4 2= yield drop drop 999 yield ; + test-xy will return 1 if x y is 1 2 or 3 4, otherwise it returns 999. + Note that it must always end with a yield, as search has no way to tell + the difference between an early termination and a final non-zero result. +) +: search + ' yield , ' dup , ' not , [ ' while , ] ' drop , [ ' repeat , ] + ' rdrop , ; immediate + : min ( x y -- x|y ) 2dup > if swap then drop ; : max ( x y -- x|y ) 2dup < if swap then drop ; diff --git a/entity.jim b/entity.jim index 92d2958dfb2aed42849e9b5bd86b2ae841182b6b..47cf9bdcab1afebae961a7cf77601e385c300773 100755 GIT binary patch literal 909 zcmYLHPiWIn82^%dS-N&XVIz5OA|v9Zy6rF+46C`!GDXqD{Bu&MP0Hf7cC>L*>rO-6 zLGYqSK`*MCn3rAe!uVU?|TF3KfP!Bm$VJ* zoz(^TYgf*XUw|il02`JekC(5GpQEz^U#&DORH`$c8wN8z^c-#=!m8$A=P&R#xk%ED z{1TUy#6|uE9s5$xFviyp61sDh8WDgM zyG0W$(^ue*o$1sg+97@rGvu+UEz>Iy*`b6VqG4-cfy%xiO^>rqoL3q0=P7QCwX~0T zlR3C$H1RfTpaNrTQyVm;ut3V(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l(wnKu;I!Q@-rp~vQWgG;Z>dZe={ zJH=P8HoVr@?eF$Gv}TqXUAAA*)V3nH;;U$t?Jm7H2~$?l!fNxH=>xFN#6-%T^9Voc Ru%(Uj%1)=RcuW93`~h&W4qpHO literal 1073 zcmah|Pe>GT6#m?K`^Q~3(^QC=-%NT)BsVOO4uZ7lvWlCQe^|EcFzimP`DbN!P3_b{ zFCkqz6m$s>oeQcE*aD%h=F>)*-g7OFfiZu{oZ@udvAV*|K+id zMk}qU4^$tnXEJ#!8(PGR24GDMAeA-eLuD2o`xvQcl-2i1)Wv2f1-R`}dkl^Bgh z7*ydGOVQy-WRQ^yUX9R`2uq-#QByD+>E&-ii{{0}a5OSF8fNUqX^k@u55?t454st} zqQl_?BQIi%dMn6>D^jbJt43P$$dl!Ie%z8`rCVo2pmbS-`}xjtK48x{Y=gr#ioco8I;`%nr-a)nx!?>xTtVek42fz-%gtI=iVeDO zO?WUfB`sFW42UhIKz<~|o?=r*_%Jb(l==c67!V~EtFYq&73d^l$|k)MGNeca(L}d} zP4|R?*6~)(K902mhe?hGf!0Nr(oB8cE@hcxe>yQmI*hxX({aTXL3ws+aqjVSnWc`wD22M)Xgj?6XK?oYAI`?n7=WGhgYnO>b90`&@8U zZ_|6!N%759AfS^iMyZAQhk7S<>D`Rp2a9xvlZ?=`r${%QbaCB{{ltGB$SDLwvp6SYh}{3-$hUapPxJtC>C8XZr9d5!E7?#@)ut*Vfb>MlI=oKO z_@Um+dgcDjn-g-ab;kL|w~aQ14Fx$<{&i3FIwPfDHf*|TEJ?0~$#q|WlE#-B-nvnZ zWZKM{ym;B+jbNL*&0U~X<8IJq`z1wM7v3FLNm=2acF7>jT6qh54XcI=z;h<1&FrE> TxKV{S2G1)!mz;DM4_x>II06xX diff --git a/footer.jor b/footer.jor index 06666b0..ebdc885 100755 --- a/footer.jor +++ b/footer.jor @@ -33,16 +33,16 @@ var textx var texty 2 const textspeed -: nltext 7 textx ! 10 texty +! ; +: nltext 6 textx ! 10 texty +! ; : inctextx textx @ 1 + dup 38 <= if textx ! - else drop nltext then ; + else drop nltext inctextx then ; key \ const '\' : statusc dup dup '\' = swap '\n' = or if drop nltext else dup '\r' = if drop - else textx @ texty @ 6u!H2DzH0+Wm$F!5X*Mv&JW7?V2hZxp;~DWOQ8`&V|Z|32Uxq^X?JIV zl{Ben8`2olhsM;G#-uUP2NSjFgT738QRAjYAgd1;lvHa>)evlIjHB_~nb`&Y1n1%2 zd%k<_Ip==ooI8ixX9Zh5S``tN_STRSgFVNz6N4ki$j!(TYDDmm=b!8wMr1B333Vi$ z%9(mbn=rE4%f?ua@F5FEgm>$0c)MXVd_Y*?EchkTAK37{vS)8aD#8nb4gWNd9p8xX zrcf*Hfc}TV;{r#X89Ykfh|CHDVl~k-X39+IIno;16L?Xqae;!CFdec8k@!iGKnXq( zJE4p31tYe?^}+& zgig9FZir0YPlp}(NV5$<>&jk}+0=9@GkK(P(uS_B-SI@`v@xx--Q%>a$t`k@2FgSwbBw7@=!NUZ$=^*bL){)j2it78LW6{P&>XG{ zs7*Xw#_Ml1jx5DdzX*R&wlZRIupmT!_XlBxTk~50qyye-v0<@n$)y4Pk=_V4ox zbctF(JjsTjw3`@tQ!^&CF(aQzvf}UJnZ{Ebv(M%WoW!4O=zxBl_n~xwLuRCElGYPt z!U(K49pXxGRbrt|QBkLr&1f!nTOE?qMIxJuETxaxIx9$gIb(e*8tnRX5tg@X>ILWp^ z*|z?|=N^=wCU6T*}DHWV%T9fZbS7R*30okm*BeAj1 z8B?^LQ&74g*AX*Yz^JisD(POJ*Xfrsqoi4Bk!*NSapcz44o6!?SuHc8t;#l|+pCf8 zSC~;lS)w)^S9o$Zujloome!~Bw9~I=m7oiH7$2HfRxy{Xm>G+#Mj|R(tv7xUF2QFC zs|g>u-Gnj6R=Eua{mw(b_0Sau-Sp6P5B=9ct5w&+Jr8y52b2-<=`ed%E@DJedOB@r zGe$O@#Qd{o;Vy4OlUjofm((5d5O*K2Vf9DkoIOoFX!%V1^T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Ib&eY3mVKYP@_D!hU*TE{7S%SEEu|NC8j9L)=f&i- z;wZcnSqfS34f4-b@_CK6Ab(P#l_tEye)c9MdXbqhjpNH9N7>QD9hG#&69Oco)O<^! z8=cM{P&@XXtOH_U6)gS%F>C%&R52SeF+mj J!LN@6{{f)+r4#@F diff --git a/game.jor b/game.jor index 857b9a2..b3c38e3 100755 --- a/game.jor +++ b/game.jor @@ -70,19 +70,26 @@ defer player defer player-touch ( x y -- b ) +: touch-begin begin 2dup search >rot drop drop 1 - ; +: touched? if 2 else 1 then ; +: touched-more? if 2 else 0 then ; +: touch-next ' touched-more? , ' yield , ; immediate +: touch-last ' touched? , ' yield , ; immediate +: ;touch [ ' touch-last , ' [ , ] ; immediate + : check-player-touch ( x y -- b ) - 2dup entity-at dup if EVTOUCH entity>do drop drop 1 else drop - 2dup player-touch if drop drop 1 else - 2dup out-of-bounds if drop drop 1 else - player.canmove? if 0 else 1 then then then then ; + touch-begin entity-at dup if EVTOUCH entity>do 1 then + touch-next player-touch + touch-next out-of-bounds + touch-next player.canmove? not ;touch : try-move-player player entity-dst check-player-touch not if move-player then ; -: check-entity-touch ( x y -- b ) - 2dup entity-at if drop drop 1 else - 2dup out-of-bounds if 1 else - WALKABLE mapflag? if 0 else 1 then then then ; +: check-entity-touch + touch-begin entity-at + touch-next out-of-bounds + touch-next WALKABLE mapflag? ;touch : try-move-entity ( e -- ) dup entity-dst check-entity-touch not if move-entity then ; @@ -100,7 +107,7 @@ player :tick ( S T U F F ) : hello-world - player.state DRIVING f@ not player.state DRIVING f! ; + player.state DRIVING fnot! ; : mode-move entities each EVTICK entity>do more diff --git a/game.prj b/game.prj index ff5b3aedf2f23cf47e04247ea310029b7a965cb8..18d73f5b57ce93edbd5cbd0cbc3038cfb4e4be0e 100755 GIT binary patch delta 26 icmX@2c|>!=3&F`kB4V5W31&009G{Wpw>eihoDl$(cnT)~ delta 27 dcmX@2c|>!=3qh9uK(P6ZU@aqrl`9<12msw`4?O?? diff --git a/input.j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XQ|XVt{2I8dj=qWOTd*OK?E7$XC+7d45fq4sbrLQ@`xdb4$xaRPURXlAge?`86O zg|?J8RATAhUjb*2MfgUhq3s6Vz0na$Oc^|k5fz)4P{KZD>=NPeau{+30V`;eqhPbQ zf}65L%Jz64v$ly>&_s!R6~4(N1WtDpexGO;w3H#Sr}gN|RNpmEi|~w{1i$Gth8KyA vv)VSbqRyrrZPH+yL$+nl_lGuy;gtVC9|;KXFjt}5d!UY>UJaq9=qUdJ3cta~ diff --git a/pete.jim b/pete.jim index 1bf0905367793a5afa59c178db614b8b41db5f53..e0772b5fa0d216a3e09ab3fcf83bedcccd6117cb 100755 GIT binary patch literal 225 zcmcbqRiV64>pH_itu`%YhUCN|hOHu7wKS!e7#bKZFz^U4udQ zk713xpE}4i9)|ra>Y$Y9NUl|@Pm#OhSp zuCkKno#t9`d)2ezVl01HcmzJN*l6(x*sI3zF{ugyRhntN(~RTW&%(g)2dG<4#fR$? z%Qm12bDkv<#%drnH9%EuT6^U`vD9dJmZ%pil;r0tq$L&sX@&B{oNN$Xl3$*u$B--! zvh_5}IxTaa{VY5T`&rl-8hEarot drop drop - |; ' player-touch redefine + :| touch-begin S leaving? player.driving? not and dup if + pete say" It's too far to walk to town." then + touch-next 12 7 2= dup if + player.driving? not if + petehous.jor queue-level + then then + touch-last |; ' player-touch redefine s" pete.map" load-map ; ' onload redefine diff --git a/petehous.jim b/petehous.jim index 60bfdc78fe3b9f0170347bd9773efa2efcd7a5ca..2b12a940f908ee1be6e00efde9732eb712c03a70 100755 GIT binary patch literal 392 zcmYk2u}T9m7{^ci5Uqz45fmK!Q0$ev(iadPpdcm-^sDXVDvc-Y>&Wd@TnVsTT_#&NgNx)=5T?plawsh_I1 zj+u7o402)$$I=OOg1LSnGvQF1aW{B7S@?I?{JQq5q!;DLR6&eCA}`2V;wzwf%;qxa zvj#ruAS?BKWN|Q33e5nuFY>gsf~@cIMs2F3Q7WX)d=BL+=l+`WuXfIp8(~I@W9A=e pO-`7bg7A*0@JFL7w(UP?4ki4wt{O8q?hMJ1hio@z!{GgN4*#T+ct8LE literal 107 zcmaE+sjqxmGm+t$CXYa%=6)6dhW#v@43EX^RnLllV$sp!5rBwsF*NX8Wl_`G&%y&# z!2wmVLi4iveilZC(=1v*83u+wEc;nzsrhhyVsX|gNG(at$S*C{%S|j`$W!{m0swU2 BAMOAE diff --git a/petehous.jor b/petehous.jor index 8069463..c9d4880 100755 --- a/petehous.jor +++ b/petehous.jor @@ -3,11 +3,19 @@ :noname reset-level 16 9 tile>world player entity.pos! - :| 16 10 2= if - 12 8 tile>world player entity.pos! - pete.jor queue-level - 1 else 0 then - |; ' player-touch redefine + :| +touch-begin 16 10 2= dup if + 12 8 tile>world player entity.pos! + pete.jor queue-level +then touch-next 9 4 2= dup if + pete say" The closet is a disaster.\I don't want to deal with that\right now." +then touch-next 11 4 2= dup if + pete say" I'm already dressed." +then touch-next 16 3 2= dup if + pete say" The sink's full of nasty dishes.\I'm not touching them." +then touch-next 18 3 2= dup if + pete say" Should get some more beer soon." +then touch-last |; ' player-touch redefine s" petehous.map" load-map ; ' onload redefine diff --git a/repl.jim b/repl.jim new file mode 100755 index 0000000000000000000000000000000000000000..8d373a89da3ae77e7a5342e47055ec0f083cc27d GIT binary patch literal 331 zcmb2=dMUJD*pabYs6mK}p|~Wms6@9YwIGLqM_@n85}~Dne^~aj%x1}Fxy}5E<${o& zm6d{*g1OJqxEBA!hKDI>SIE&Sh3(mU=d5 z!DudW)Kk$gVp9!o!o!O&{CmyAe_p{d`zU^e#!4W`u;do2P73$s4vnI25U5DCSs~Q$ zZW%rO-i37F;mevKLoqu1a?nUVr*SMn;b7t>1zmjd^jC75{Px%nTgqTs*CJH7hQ^KD zqW)m4jz(q=X|J;F7BB6RtaE`12zAbsc#U&ew)^=Q&$7Wi)1&bqb9CKPYPfF7yX095 O=x`!?VEjMHj2eGu)@j@T literal 438 zcmX|-KTiTd5XA@Xfq%HdU^wG$p{EHICN^keXt5wR#KOv4U~`gi2RRAaTk-+yY_+ha zF@_ItoyGVK&W%g9)IIVmhB)PBalt*nI4UEnWO8jQvF5K0?e!h OTye#VH2%kAMvXs5C2a}-