mirror of
https://github.com/mi57730/a2d.git
synced 2025-02-10 10:30:40 +00:00
MGTK: minor S2W/W2S cleanup
This commit is contained in:
parent
6b176d4ac1
commit
655e86f37b
3
MGTK.md
3
MGTK.md
@ -808,7 +808,7 @@ Parameters:
|
||||
.byte window_id
|
||||
.word dragx mouse coords
|
||||
.word dragy
|
||||
.byte moved high bit set if moved, clear if not
|
||||
.byte moved (out) high bit set if moved, clear if not
|
||||
```
|
||||
|
||||
|
||||
@ -883,7 +883,6 @@ Parameters:
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### UpdateThumb ($4B)
|
||||
|
||||
|
||||
|
@ -5640,7 +5640,7 @@ set_x: stax current_penloc_x
|
||||
kind: .byte 0
|
||||
mouse_pos:
|
||||
mouse_x: .word 0
|
||||
mouse_y: .word 0
|
||||
mouse_y: .word 0
|
||||
END_PARAM_BLOCK
|
||||
|
||||
MGTK_CALL MGTK::GetEvent, event
|
||||
@ -7870,7 +7870,7 @@ loop: add16 $83,x, $B7,x, $83,x
|
||||
dex
|
||||
dex
|
||||
bpl loop
|
||||
bmi L790F
|
||||
bmi copy_map_results
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
@ -7878,20 +7878,27 @@ loop: add16 $83,x, $B7,x, $83,x
|
||||
|
||||
;;; 5 bytes of params, copied to $82
|
||||
|
||||
ScreenToWindowImpl:
|
||||
.proc ScreenToWindowImpl
|
||||
jsr window_by_id_or_exit
|
||||
ldx #$02
|
||||
L78FE: sub16 $83,x, $B7,x, $83,x
|
||||
loop: sub16 $83,x, $B7,x, $83,x
|
||||
dex
|
||||
dex
|
||||
bpl L78FE
|
||||
L790F: ldy #$05
|
||||
L7911: lda $7E,y
|
||||
bpl loop
|
||||
;; fall through
|
||||
.endproc
|
||||
|
||||
.proc copy_map_results
|
||||
ldy #5
|
||||
loop: lda $7E,y
|
||||
sta (params_addr),y
|
||||
iny
|
||||
cpy #$09
|
||||
bne L7911
|
||||
cpy #9 ; results are 2 words (x, y) at params_addr+5
|
||||
bne loop
|
||||
rts
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
;; Used to draw scrollbar arrows
|
||||
L791C: stax $82
|
||||
|
@ -17,6 +17,8 @@ TIMELO := $BF92 ; Time lo
|
||||
TIMEHI := $BF93 ; Time hi
|
||||
LEVEL := $BF94 ; File level
|
||||
MACHID := $BF98 ; Machine ID
|
||||
IVERSION := $BFFD ; Interpreter Version
|
||||
KVERSION := $BFFF ; ProDOS Kernel Version
|
||||
|
||||
;;; Patch Locations
|
||||
SELECTOR := $D100
|
||||
|
Loading…
x
Reference in New Issue
Block a user