M src/assets.tal => src/assets.tal +38 -26
@@ 19,12 19,8 @@
0408 1112 0c00 0000 0307 0e0c 0000 0000
2010 8848 3000 0000 c0e0 7030 0000 0000 ]
-
-
@halftone-icn [ aa55 aa55 aa55 aa55 ]
-
-
@flow-chr
&right [ 0404 0201 0102 0404 f8f8 fcfe fefc f8f8 ]
&up [ 1824 c300 0000 0000 0018 3cff ffff ffff ]
@@ 137,8 133,15 @@
(
@|floor )
-@floor-chr $100
- &tile1 [
+@floors-lut [
+ $2 =floors-normal
+ =floors-safe $2
+ $2 $2
+ =floors-flipx =floors-flipy ]
+
+@floors-normal
+
+@floors-normal-1 [
3f40 98a0 a080 8080 003f 675f 5f7f 7f7f
ff00 0000 0000 0000 00ff ffff ffff ffff
ff00 0000 0000 0000 00ff ffff ffff ffff
@@ 156,7 159,9 @@
0000 00ff ffff ff00 ffff ff00 0000 0000
0a32 06fe fefe fc00 f4cc f800 0000 0000 ]
-@floor-ok-chr [
+@floors-safe
+
+@floor-safe-normal [
3f40 99a4 a498 80a0 003f 665b 5b67 7f5f
ff00 ff00 0000 0301 00ff 00ff ffff fcfe
ff00 ff00 0000 0000 00ff 00ff ffff ffff
@@ 174,7 179,27 @@
00ff 00ff ffff ff00 ff00 ff00 0000 0000
4a32 06fe fefe fc00 b4cc f800 0000 0000 ]
-@floor-flipy [
+@floor-safe-warp [
+ 3f40 9ba6 a898 90a1 003f 6459 5767 6f5e
+ fff0 0000 073c c080 000f ffff f8c3 3f7f
+ ff00 0000 c038 0701 00ff ffff 3fc7 f8fe
+ f804 320a 0a02 0282 00f8 ccf4 f4fc fc7c
+ a3e2 c2c2 c2c4 c2c2 5c1d 3d3d 3d3b 3d3d
+ 070c 1810 180d 0200 f8f3 e7ef e7f2 fdff
+ f808 0c84 8484 040c 07f7 f37b 7b7b fbf3
+ c242 2222 2222 2222 3cbc dcdc dcdc dcdc
+ c3e0 b090 988c 87a1 3c1f 4f6f 6773 785e
+ 00c0 3c07 0000 00f0 ff3f c3f8 ffff ff0f
+ 0818 70c0 0001 07fc f7e7 8f3f fffe f803
+ 2222 2222 62c2 020a dcdc dcdc 9c3c fcf4
+ a098 c0ff ffff 7f00 5f67 3f00 0000 0000
+ 1f00 00ff ffff ff00 e0ff ff00 0000 0000
+ 8000 00ff ffff ff00 7fff ff00 0000 0000
+ 0a32 06fe fefe fc00 f4cc f800 0000 0000 ]
+
+@floors-flipy
+
+@floor-flipy-1 [
3f40 98a0 a080 8080 003f 675f 5f7f 7f7f
ff00 0000 0003 070b 00ff ffff fffc f8f4
ff00 0000 0000 80c0 00ff ffff ffff 7f3f
@@ 192,25 217,9 @@
0000 00ff ffff ff00 ffff ff00 0000 0000
0a32 06fe fefe fc00 f4cc f800 0000 0000 ]
-@floor-end-chr [
- 3f40 9ba6 a898 90a1 003f 6459 5767 6f5e
- fff0 0000 073c c080 000f ffff f8c3 3f7f
- ff00 0000 c038 0701 00ff ffff 3fc7 f8fe
- f804 320a 0a02 0282 00f8 ccf4 f4fc fc7c
- a3e2 c2c2 c2c4 c2c2 5c1d 3d3d 3d3b 3d3d
- 070c 1810 180d 0200 f8f3 e7ef e7f2 fdff
- f808 0c84 8484 040c 07f7 f37b 7b7b fbf3
- c242 2222 2222 2222 3cbc dcdc dcdc dcdc
- c3e0 b090 988c 87a1 3c1f 4f6f 6773 785e
- 00c0 3c07 0000 00f0 ff3f c3f8 ffff ff0f
- 0818 70c0 0001 07fc f7e7 8f3f fffe f803
- 2222 2222 62c2 020a dcdc dcdc 9c3c fcf4
- a098 c0ff ffff 7f00 5f67 3f00 0000 0000
- 1f00 00ff ffff ff00 e0ff ff00 0000 0000
- 8000 00ff ffff ff00 7fff ff00 0000 0000
- 0a32 06fe fefe fc00 f4cc f800 0000 0000 ]
+@floors-flipx
-@floor-flipx [
+@floor-flipx-1 [
3f40 98a0 a080 8080 003f 675f 5f7f 7f7f
ff00 0000 0000 0000 00ff ffff ffff ffff
ff00 0000 0000 0000 00ff ffff ffff ffff
@@ 228,6 237,9 @@
0000 00ff ffff ff00 ffff ff00 0000 0000
0a32 06fe fefe fc00 f4cc f800 0000 0000 ]
+(
+@|events )
+
@nimp-chr [
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
M src/markl.tal => src/markl.tal +14 -9
@@ 139,10 139,10 @@
AND ?{ <focus> }
[ LIT &reqdraw $1 ] ?{ BRK }
[ LIT2 &count $2 ] INC2k ,&count STR2
- { "redraw: 20 $1 }
+ POP2 ( { "redraw: 20 $1 }
<plam>
<phex>
- #0a18 DEO
+ #0a18 DEO )
<redraw>
[ LIT2 00 _&reqdraw ] STR }
BRK
@@ 253,7 253,7 @@
#2018 DEO
{ "tile: 20 $1 }
<plam>
- .player/tile LDZ2 get-tile <phex>/b
+ .player/tile LDZ2 get-tile #07 AND <phex>/b
#2018 DEO
{ "mod: 20 $1 }
<plam>
@@ 264,14 264,13 @@
@<end-turn> ( -- )
;player-idle-chr ;<draw-player>/state STA2
<move-pc>
- <debug>
+ <debug>
.player/tile LDZ2 get-tile #07 AND
( ) DUP #00 NEQ ?{ POP !<tile-fall> }
DUP #02 NEQ ?{ POP !<set-safety> }
- DUP #04 NEQ ?{ POP !<set-safety> }
- DUP #03 NEQ ?{
+ DUP #06 NEQ ?{
[ LIT2 00 -modify/y ] LDZ EQU .modify/y STZ }
- DUP #05 NEQ ?{
+ DUP #07 NEQ ?{
[ LIT2 00 -modify/x ] LDZ EQU .modify/x STZ }
POP !<next-turn>
@@ 637,8 636,8 @@
&>lwf ( -- )
( | get floor )
( x y ) DUP OVR2 POP <pin-floor>
- #00 LDAkr STHr INC2r #0100 MUL2 ;floor-chr ADD2 <draw-tile>
- INC GTHk ?&>lwf
+ LDAkr STHr <draw-floor>
+ INC2r INC GTHk ?&>lwf
POP
( | draw events )
#00
@@ 655,6 654,12 @@
INC GTHk ?&>lh
POP2 POP2r JMP2r
+@<draw-floor> ( id -- )
+ DUP ?{ POP JMP2r }
+ #00 SWP
+ ( type ) DUP2 #07 AND DUP ADD ;floors-lut ADD2 LDA2
+ ( tile ) SWP2 #03 SFT2 #0100 MUL2 ADD2 !<draw-tile>
+
@<draw-player> ( -- )
.player/posy LDZ2 .camera/y LDZ2 ADD2 #0028 SUB2 .Screen/y DEO2
[ LIT2 &state =player-idle-chr ] .Screen/addr DEO2
M src/world.tal => src/world.tal +10 -10
@@ 2,16 2,16 @@
| 00 : blank
| 01 : floor
| 02 : safe
- | 03 : flip y
- | 04 : warp
- | 05 : flip x
- | 06 : none
- | 07 : none )
+ | 03 : none
+ | 04 : none
+ | 05 : none
+ | 06 : flip x
+ | 07 : flip y )
@entrance-stage [ 0506 =&events =&tiles =&end ]
&tiles ( )
( ) [ 01 00 00 00 00 ]
- ( ) [ 02 01 01 01 04 ]
+ ( ) [ 02 01 01 01 0a ]
( ) [ 01 00 00 00 00 ]
( ) [ 01 00 00 00 00 ]
( ) [ 01 00 00 00 00 ]
@@ 25,9 25,9 @@
( ) [ 00 00 00 01 00 00 ]
( ) [ 00 00 01 02 01 00 ]
( ) [ 00 01 01 00 01 01 ]
- ( ) [ 01 01 00 00 01 05 ]
+ ( ) [ 01 01 00 00 01 06 ]
( ) [ 02 01 00 01 01 00 ]
- ( ) [ 00 00 00 04 00 00 ]
+ ( ) [ 00 00 00 0a 00 00 ]
( ) &events 03
( ) [ 0300 =event-goat =move-down $2 ]
( ) [ 0104 =event-nimp 0100 $2 ]
@@ 35,8 35,8 @@
@mirror-stage [ 0703 =&events =&tiles =&end ]
&tiles ( )
- ( ) [ 00 04 00 01 01 02 01 ]
- ( ) [ 01 03 01 03 01 03 02 ]
+ ( ) [ 00 0a 00 01 01 02 01 ]
+ ( ) [ 01 07 01 07 01 07 02 ]
( ) [ 01 01 01 00 01 00 00 ]
( ) &events 06
( ) [ 0202 =event-block $4 ]