Improving minimap
This commit is contained in:
parent
39a717262f
commit
55ebe5d26d
|
@ -40,7 +40,7 @@
|
|||
#0070 .player/y STZ2
|
||||
#0000 .player/a STZ2
|
||||
|
||||
;draw-map JSR2
|
||||
;draw-minimap JSR2
|
||||
|
||||
BRK
|
||||
|
||||
|
@ -142,7 +142,31 @@ JMP2r
|
|||
|
||||
@draw-minimap ( -- )
|
||||
|
||||
;draw-map JSR2
|
||||
#01 .Screen/auto DEO
|
||||
#0000 .Screen/y DEO2
|
||||
#1000
|
||||
&ver
|
||||
STHk
|
||||
#0000 .Screen/x DEO2
|
||||
#1000
|
||||
&hor
|
||||
( id ) #00 OVR STHkr #40 SFT ADD
|
||||
( addr* ) #0003 MUL2 ;nametable ADD2
|
||||
LDA2k ;spritesheet ADD2 .Screen/addr DEO2
|
||||
( color ) INC2 INC2 LDA .Screen/sprite DEO
|
||||
INC GTHk ,&hor JCN
|
||||
POP2
|
||||
POPr
|
||||
.Screen/y DEI2k #0008 ADD2 ROT DEO2
|
||||
INC GTHk ,&ver JCN
|
||||
POP2
|
||||
|
||||
( draw player )
|
||||
|
||||
.player/x LDZ2 #0003 SUB2 .Screen/x DEO2
|
||||
.player/y LDZ2 #0003 SUB2 .Screen/y DEO2
|
||||
;player-icn .Screen/addr DEO2
|
||||
#05 .Screen/sprite DEO
|
||||
|
||||
.player/x LDZ2
|
||||
.player/y LDZ2
|
||||
|
@ -208,36 +232,6 @@ JMP2r
|
|||
|
||||
JMP2r
|
||||
|
||||
@draw-map ( -- )
|
||||
|
||||
#01 .Screen/auto DEO
|
||||
#0000 .Screen/y DEO2
|
||||
#1000
|
||||
&ver
|
||||
STHk
|
||||
#0000 .Screen/x DEO2
|
||||
#1000
|
||||
&hor
|
||||
( id ) #00 OVR STHkr #40 SFT ADD
|
||||
( addr* ) #0003 MUL2 ;nametable ADD2
|
||||
LDA2k ;spritesheet ADD2 .Screen/addr DEO2
|
||||
( color ) INC2 INC2 LDA .Screen/sprite DEO
|
||||
INC GTHk ,&hor JCN
|
||||
POP2
|
||||
POPr
|
||||
.Screen/y DEI2k #0008 ADD2 ROT DEO2
|
||||
INC GTHk ,&ver JCN
|
||||
POP2
|
||||
|
||||
( draw player )
|
||||
|
||||
.player/x LDZ2 #0003 SUB2 .Screen/x DEO2
|
||||
.player/y LDZ2 #0003 SUB2 .Screen/y DEO2
|
||||
;player-icn .Screen/addr DEO2
|
||||
#05 .Screen/sprite DEO
|
||||
|
||||
JMP2r
|
||||
|
||||
@get-tile ( x* y* -- tile )
|
||||
|
||||
#43 SFT2 SWP2 #03 SFT2 ADD2 #0003 MUL2
|
||||
|
|
Loading…
Reference in New Issue