fix redrawing map tile
This commit is contained in:
parent
0d7effa024
commit
56c2eb1b94
|
@ -148,8 +148,29 @@
|
|||
[:tya] [:and 0xe0]
|
||||
[:sta vm.TOP :x])
|
||||
|
||||
(vm:word :drawtile-at ; xy --
|
||||
:drop) ; todo
|
||||
(vm:def :itile-at ; yx -- itile
|
||||
[:lda (- maph 1)]
|
||||
[:sec]
|
||||
[:sbc vm.TOPH :x]
|
||||
[:asl :a] ; x2
|
||||
[:asl :a] ; x4
|
||||
[:sta vm.TOPH :x]
|
||||
[:asl :a] ; x8
|
||||
[:asl :a] ; x16
|
||||
[:clc] [:adc vm.TOPH :x] ; x20
|
||||
[:adc vm.TOP :x]
|
||||
[:sta vm.TOP :x]
|
||||
[:lda #(hi ($1:lookup-addr :map))]
|
||||
[:sta vm.TOPH :x]
|
||||
[:lda [vm.TOP :x]]
|
||||
[:sta vm.TOP :x]
|
||||
[:lda 0]
|
||||
[:sta vm.TOPH :x])
|
||||
|
||||
(vm:word :drawtile-at ; yx --
|
||||
:dup :yx>screen :swap
|
||||
:itile-at :lookup-tile
|
||||
:drawtile)
|
||||
|
||||
(vm:def :last-key ; -- key
|
||||
(vm:reserve)
|
||||
|
|
Loading…
Reference in a new issue