point/rect refs

This commit is contained in:
Joshua Bell 2018-02-01 22:04:23 -08:00
parent c90a276571
commit 2bf5dda7e1

View File

@ -2560,8 +2560,12 @@ LA3B3: .byte 0
.byte 0 .byte 0
.byte 0 .byte 0
LA3B7: .byte 0 LA3B7: .byte 0
LA3B8: .byte 0
LA3B9: ldy #$00 .proc frontwindow_params
window_id: .byte 0
.endproc
LA3B9: ldy #0
lda ($06),y lda ($06),y
sta LA3AC sta LA3AC
iny iny
@ -2573,9 +2577,9 @@ LA3B9: ldy #$00
lda #$80 lda #$80
sta LA3B7 sta LA3B7
MGTK_CALL MGTK::SetPattern, white_pattern MGTK_CALL MGTK::SetPattern, white_pattern
MGTK_CALL MGTK::FrontWindow, LA3B8 MGTK_CALL MGTK::FrontWindow, frontwindow_params
lda LA3B8 lda frontwindow_params::window_id
sta getwinport_params sta getwinport_params::window_id
MGTK_CALL MGTK::GetWinPort, getwinport_params MGTK_CALL MGTK::GetWinPort, getwinport_params
jsr LA4CC jsr LA4CC
jsr LA938 jsr LA938
@ -3697,14 +3701,13 @@ alert_inner_frame_rect1:
alert_inner_frame_rect2: alert_inner_frame_rect2:
DEFINE_RECT 5, 3, 415, 52 DEFINE_RECT 5, 3, 415, 52
LB6D3: .word $41 .proc grafport6
LB6D5: .word $57 DEFINE_POINT $41, $57, viewloc
mapbits: .addr MGTK::screen_mapbits
.byte $00,$20,$80,$00,$00,$00,$00 mapwidth: .byte MGTK::screen_mapwidth
.byte $00 reserved: .byte 0
DEFINE_RECT 0, 0, $1A4, $37, maprect
LB6DF: .word $1A4 .endproc
LB6E1: .word $37
;;; ================================================== ;;; ==================================================
@ -3728,11 +3731,10 @@ cancel_pos:
.word $BE,$10 ; ??? .word $BE,$10 ; ???
LB70F: DEFINE_POINT 75,29 DEFINE_POINT 75,29, point8
alert_action: .byte $00 alert_action: .byte $00
LB714: .byte $00 prompt_addr: .addr 0
LB715: .byte $00
try_again_label: try_again_label:
PASCAL_STRING "Try Again A" PASCAL_STRING "Try Again A"
@ -3817,26 +3819,26 @@ LBA0B: sta grafport3_left,x
lda #>$B9 lda #>$B9
sta grafport3_height+1 sta grafport3_height+1
MGTK_RELAY2_CALL MGTK::SetPort, grafport3 MGTK_RELAY2_CALL MGTK::SetPort, grafport3
lda LB6D3 lda grafport6::viewloc::xcoord
ldx LB6D3+1 ldx grafport6::viewloc::xcoord+1
jsr LBF8B jsr LBF8B
sty LBFCA sty LBFCA
sta LBFCD sta LBFCD
lda LB6D3 lda grafport6::viewloc::xcoord
clc clc
adc LB6DF adc grafport6::maprect::x2
pha pha
lda LB6D3+1 lda grafport6::viewloc::xcoord+1
adc LB6DF+1 adc grafport6::maprect::x2+1
tax tax
pla pla
jsr LBF8B jsr LBF8B
sty LBFCC sty LBFCC
sta LBFCE sta LBFCE
lda LB6D5 lda grafport6::viewloc::ycoord
sta LBFC9 sta LBFC9
clc clc
adc LB6E1 adc grafport6::maprect::y2
sta LBFCB sta LBFCB
MGTK_RELAY2_CALL MGTK::HideCursor MGTK_RELAY2_CALL MGTK::HideCursor
jsr LBE08 jsr LBE08
@ -3845,7 +3847,7 @@ LBA0B: sta grafport3_left,x
MGTK_RELAY2_CALL MGTK::PaintRect, alert_rect ; alert background MGTK_RELAY2_CALL MGTK::PaintRect, alert_rect ; alert background
MGTK_RELAY2_CALL MGTK::SetPenMode, penXOR ; ensures corners are inverted MGTK_RELAY2_CALL MGTK::SetPenMode, penXOR ; ensures corners are inverted
MGTK_RELAY2_CALL MGTK::FrameRect, alert_rect ; alert outline MGTK_RELAY2_CALL MGTK::FrameRect, alert_rect ; alert outline
MGTK_RELAY2_CALL MGTK::SetPortBits, LB6D3 MGTK_RELAY2_CALL MGTK::SetPortBits, grafport6::viewloc::xcoord
MGTK_RELAY2_CALL MGTK::FrameRect, alert_inner_frame_rect1 ; inner 2x border MGTK_RELAY2_CALL MGTK::FrameRect, alert_inner_frame_rect1 ; inner 2x border
MGTK_RELAY2_CALL MGTK::FrameRect, alert_inner_frame_rect2 MGTK_RELAY2_CALL MGTK::FrameRect, alert_inner_frame_rect2
MGTK_RELAY2_CALL MGTK::SetPenMode, pencopy MGTK_RELAY2_CALL MGTK::SetPenMode, pencopy
@ -3866,9 +3868,9 @@ LBAEF: tya
asl a asl a
tay tay
lda prompt_table,y lda prompt_table,y
sta LB714 sta prompt_addr
lda prompt_table+1,y lda prompt_table+1,y
sta LB715 sta prompt_addr+1
cpx #$00 cpx #$00
beq LBB0B beq LBB0B
txa txa
@ -3903,9 +3905,9 @@ LBB14: MGTK_RELAY2_CALL MGTK::SetPenMode, penXOR
LBB5C: MGTK_RELAY2_CALL MGTK::FrameRect, try_again_rect LBB5C: MGTK_RELAY2_CALL MGTK::FrameRect, try_again_rect
MGTK_RELAY2_CALL MGTK::MoveTo, try_again_pos MGTK_RELAY2_CALL MGTK::MoveTo, try_again_pos
DRAW_PASCAL_STRING ok_label DRAW_PASCAL_STRING ok_label
LBB75: MGTK_RELAY2_CALL MGTK::MoveTo, LB70F LBB75: MGTK_RELAY2_CALL MGTK::MoveTo, point8
lda LB714 lda prompt_addr
ldx LB715 ldx prompt_addr+1
jsr draw_pascal_string jsr draw_pascal_string
LBB87: MGTK_RELAY2_CALL MGTK::GetEvent, event_params LBB87: MGTK_RELAY2_CALL MGTK::GetEvent, event_params
lda event_params_kind lda event_params_kind
@ -4097,17 +4099,17 @@ LBDDB: lda #$02
LBDE0: .byte 0 LBDE0: .byte 0
LBDE1: lda event_params_xcoord LBDE1: lda event_params_xcoord
sec sec
sbc LB6D3 sbc grafport6::viewloc::xcoord
sta event_params_xcoord sta event_params_xcoord
lda event_params_xcoord+1 lda event_params_xcoord+1
sbc LB6D3+1 sbc grafport6::viewloc::xcoord+1
sta event_params_xcoord+1 sta event_params_xcoord+1
lda event_params_ycoord lda event_params_ycoord
sec sec
sbc LB6D5 sbc grafport6::viewloc::ycoord
sta event_params_ycoord sta event_params_ycoord
lda event_params_ycoord+1 lda event_params_ycoord+1
sbc LB6D5+1 sbc grafport6::viewloc::ycoord+1
sta event_params_ycoord+1 sta event_params_ycoord+1
rts rts
@ -4672,10 +4674,10 @@ ycoord: .word 0
;; When event_params_coords is used for FindControl/FindWindow ;; When event_params_coords is used for FindControl/FindWindow
query_client_params_part: findcontrol_which_ctl:
findwindow_params_which_area: findwindow_params_which_area:
.byte 0 .byte 0
query_client_params_scroll: findcontrol_which_part:
findwindow_params_window_id: findwindow_params_window_id:
.byte 0 .byte 0
@ -5101,10 +5103,10 @@ nextwinfo: .addr 0
;; Coordinates for labels? ;; Coordinates for labels?
.byte $28,$00,$25,$00,$68,$01,$2F,$00,$2D,$00,$2E,$00 .byte $28,$00,$25,$00,$68,$01,$2F,$00,$2D,$00,$2E,$00
LD6AB: DEFINE_RECT 40,61,360,71 DEFINE_RECT 40,61,360,71, rect1
LD6B3: DEFINE_POINT 45,70 DEFINE_POINT 45,70, point6
LD6B7: DEFINE_POINT 0, 18 DEFINE_POINT 0, 18, point4
LD6BB: DEFINE_POINT 40,18 DEFINE_POINT 40,18, point7
.byte $28,$00,$23,$00 .byte $28,$00,$23,$00
dialog_label_pos: dialog_label_pos:
DEFINE_POINT 40,0 DEFINE_POINT 40,0
@ -5590,9 +5592,9 @@ str_items:
items_label_pos: items_label_pos:
DEFINE_POINT 8, 10 DEFINE_POINT 8, 10
LEBBE: DEFINE_POINT 0, 0 DEFINE_POINT 0, 0, point1
LEBC2: DEFINE_POINT 0, 0 DEFINE_POINT 0, 0, point5
str_k_in_disk: str_k_in_disk:
PASCAL_STRING "K in disk" PASCAL_STRING "K in disk"
@ -5604,8 +5606,8 @@ str_6_spaces:
PASCAL_STRING " " PASCAL_STRING " "
LEBE3: .byte $00,$00,$00,$00,$00,$00,$00,$00 LEBE3: .byte $00,$00,$00,$00,$00,$00,$00,$00
LEBEB: DEFINE_POINT 0, 0 DEFINE_POINT 0, 0, point2
LEBEF: DEFINE_POINT 0, 0 DEFINE_POINT 0, 0, point3
.byte $00,$00,$00,$00,$00,$00,$00,$00 .byte $00,$00,$00,$00,$00,$00,$00,$00
.byte $00 .byte $00
@ -6484,7 +6486,7 @@ L43E0: tsx
lda #0 lda #0
sta findwindow_params_window_id sta findwindow_params_window_id
DESKTOP_RELAY_CALL $09, event_params_coords ; maybe "was it an icon" ??? DESKTOP_RELAY_CALL $09, event_params_coords ; maybe "was it an icon" ???
lda query_client_params_part ; ??? lda findcontrol_which_ctl ; ???
beq L4415 beq L4415
jmp L67D7 jmp L67D7
@ -9366,7 +9368,7 @@ L5B31: lda $EBFD,x
dex dex
bpl L5B31 bpl L5B31
MGTK_RELAY_CALL MGTK::FindControl, event_params_coords MGTK_RELAY_CALL MGTK::FindControl, event_params_coords
lda $D20D lda findcontrol_which_ctl
bne L5B4B bne L5B4B
jmp L5CB7 jmp L5CB7
@ -9516,7 +9518,7 @@ L5C96: lda #$FF
rts rts
L5C99: MGTK_RELAY_CALL MGTK::FindControl, event_params_coords L5C99: MGTK_RELAY_CALL MGTK::FindControl, event_params_coords
lda query_client_params_part lda findcontrol_which_ctl
beq L5C96 beq L5C96
cmp #$03 cmp #$03
beq L5C96 beq L5C96
@ -9534,7 +9536,7 @@ L5CB7: bit L5B1B
L5CBF: lda desktop_active_winid L5CBF: lda desktop_active_winid
sta $D20E sta $D20E
DESKTOP_RELAY_CALL $09, event_params_coords DESKTOP_RELAY_CALL $09, event_params_coords
lda query_client_params_part lda findcontrol_which_ctl
bne L5CDA bne L5CDA
jsr L5F13 jsr L5F13
jmp L5DEC jmp L5DEC
@ -12620,41 +12622,41 @@ L78C2: lda LFB04 ; ???
L78EE: .byte 0 L78EE: .byte 0
L78EF: lda grafport2::cliprect_x1 L78EF: lda grafport2::cliprect_x1
sta LEBBE ; Directory header line (items / k in disk) sta point1::xcoord ; Directory header line (items / k in disk)
clc clc
adc #$05 adc #$05
sta items_label_pos sta items_label_pos
lda grafport2::cliprect_x1+1 lda grafport2::cliprect_x1+1
sta $EBBF sta point1::xcoord+1
adc #$00 adc #$00
sta $EBBB sta $EBBB
lda grafport2::cliprect_y1 lda grafport2::cliprect_y1
clc clc
adc #$0C adc #$0C
sta $EBC0 sta point1::ycoord
sta $EBC4 sta $EBC4
lda grafport2::cliprect_y1+1 lda grafport2::cliprect_y1+1
adc #$00 adc #$00
sta $EBC1 sta point1::ycoord+1
sta $EBC5 sta $EBC5
MGTK_RELAY_CALL MGTK::MoveTo, LEBBE MGTK_RELAY_CALL MGTK::MoveTo, point1
lda grafport2::width lda grafport2::width
sta LEBC2 sta point5::xcoord
lda grafport2::width+1 lda grafport2::width+1
sta $EBC3 sta point5::xcoord+1
jsr L48FA jsr L48FA
MGTK_RELAY_CALL MGTK::LineTo, LEBC2 MGTK_RELAY_CALL MGTK::LineTo, point5
lda $EBC0 lda point1::ycoord
clc clc
adc #$02 adc #2
sta $EBC0 sta point1::ycoord
sta $EBC4 sta point5::ycoord
lda $EBC1 lda point1::ycoord+1
adc #$00 adc #0
sta $EBC1 sta point1::ycoord+1
sta $EBC5 sta point5::ycoord+1
MGTK_RELAY_CALL MGTK::MoveTo, LEBBE MGTK_RELAY_CALL MGTK::MoveTo, point1
MGTK_RELAY_CALL MGTK::LineTo, LEBC2 MGTK_RELAY_CALL MGTK::LineTo, point5
lda grafport2::cliprect_y1 lda grafport2::cliprect_y1
clc clc
adc #$0A adc #$0A
@ -12688,7 +12690,7 @@ L79A7: jsr L79F7
tax tax
tya tya
jsr L7AE0 jsr L7AE0
MGTK_RELAY_CALL MGTK::MoveTo, LEBEB MGTK_RELAY_CALL MGTK::MoveTo, point2
jsr L7AD7 jsr L7AD7
addr_call draw_text2, str_k_in_disk addr_call draw_text2, str_k_in_disk
ldx desktop_active_winid ldx desktop_active_winid
@ -12702,7 +12704,7 @@ L79A7: jsr L79F7
tax tax
tya tya
jsr L7AE0 jsr L7AE0
MGTK_RELAY_CALL MGTK::MoveTo, LEBEF MGTK_RELAY_CALL MGTK::MoveTo, point3
jsr L7AD7 jsr L7AD7
addr_call draw_text2, str_k_available addr_call draw_text2, str_k_available
rts rts
@ -12737,61 +12739,61 @@ L7A22: lda L7ADE
L7A3A: lda $EBE7 L7A3A: lda $EBE7
clc clc
adc L7ADE adc L7ADE
sta LEBEF sta point3::xcoord
lda $EBE8 lda $EBE8
adc L7ADF adc L7ADF
sta LEBEF+1 sta point3::xcoord+1
lda L7ADF lda L7ADF
beq L7A59 beq L7A59
lda L7ADE lda L7ADE
cmp #$18 cmp #$18
bcc L7A6A bcc L7A6A
L7A59: lda LEBEF L7A59: lda point3::xcoord
sec sec
sbc #$0C sbc #$0C
sta LEBEF sta point3::xcoord
lda LEBEF+1 lda point3::xcoord+1
sbc #$00 sbc #$00
sta LEBEF+1 sta point3::xcoord+1
L7A6A: lsr L7ADF L7A6A: lsr L7ADF
ror L7ADE ror L7ADE
lda LEBE3 lda LEBE3
clc clc
adc L7ADE adc L7ADE
sta LEBEB sta point2::xcoord
lda $EBE4 lda $EBE4
adc L7ADF adc L7ADF
sta LEBEB+1 sta point2::xcoord+1
jmp L7A9E jmp L7A9E
L7A86: lda LEBE3 L7A86: lda LEBE3
sta LEBEB sta point2::xcoord
lda LEBE3+1 lda LEBE3+1
sta LEBEB+1 sta point2::xcoord+1
lda $EBE7 lda $EBE7
sta LEBEF sta point3::xcoord
lda $EBE8 lda $EBE8
sta LEBEF+1 sta point3::xcoord+1
L7A9E: lda LEBEB L7A9E: lda point2::xcoord
clc clc
adc grafport2::cliprect_x1 adc grafport2::cliprect_x1
sta LEBEB sta point2::xcoord
lda LEBEB+1 lda point2::xcoord+1
adc grafport2::cliprect_x1+1 adc grafport2::cliprect_x1+1
sta LEBEB+1 sta point2::xcoord+1
lda LEBEF lda point3::xcoord
clc clc
adc grafport2::cliprect_x1 adc grafport2::cliprect_x1
sta LEBEF sta point3::xcoord
lda LEBEF+1 lda point3::xcoord+1
adc grafport2::cliprect_x1+1 adc grafport2::cliprect_x1+1
sta LEBEF+1 sta point3::xcoord+1
lda items_label_pos+2 lda items_label_pos+2
sta LEBEB+2 sta point2::ycoord
sta LEBEF+2 sta point3::ycoord
lda items_label_pos+3 lda items_label_pos+3
sta LEBEB+3 sta point2::ycoord+1
sta LEBEF+3 sta point3::ycoord+1
rts rts
L7AD7: addr_jump draw_text2, str_6_spaces L7AD7: addr_jump draw_text2, str_6_spaces
@ -14318,19 +14320,20 @@ L877F: .byte 0
;;; ================================================== ;;; ==================================================
;;; Draw text, pascal string address in A,X ;;; Draw text, pascal string address in A,X
.proc draw_text2 .proc draw_text2
ptr := $6 params := $6
len := $8 textptr := $6
textlen := $8
sta ptr sta textptr
stx ptr+1 stx textptr+1
ldy #0 ldy #0
lda (ptr),y lda (textptr),y
beq exit beq exit
sta len sta textlen
inc ptr inc textptr
bne :+ bne :+
inc ptr+1 inc textptr+1
: MGTK_RELAY_CALL MGTK::DrawText, $6 : MGTK_RELAY_CALL MGTK::DrawText, params
exit: rts exit: rts
.endproc .endproc
@ -14350,7 +14353,7 @@ exit: rts
inc ptr inc ptr
bne :+ bne :+
inc ptr+1 inc ptr+1
: MGTK_RELAY_CALL MGTK::TextWidth, $6 : MGTK_RELAY_CALL MGTK::TextWidth, ptr
lda result lda result
ldx result+1 ldx result+1
rts rts
@ -14401,7 +14404,6 @@ L87F2: dey
.proc push_zp_addrs .proc push_zp_addrs
ptr := $6 ptr := $6
pla ; stash return address pla ; stash return address
sta addr sta addr
pla pla
@ -17955,7 +17957,7 @@ LA5B4: lda winfoF
sta event_params sta event_params
MGTK_RELAY_CALL MGTK::ScreenToWindow, event_params MGTK_RELAY_CALL MGTK::ScreenToWindow, event_params
MGTK_RELAY_CALL MGTK::MoveTo, $D20D MGTK_RELAY_CALL MGTK::MoveTo, $D20D
LA5D2: MGTK_RELAY_CALL MGTK::InRect, LD6AB LA5D2: MGTK_RELAY_CALL MGTK::InRect, rect1
cmp #$80 cmp #$80
bne LA5E5 bne LA5E5
jsr set_cursor_insertion_point_with_flag jsr set_cursor_insertion_point_with_flag
@ -18764,7 +18766,7 @@ LAE49: lda #$80
jsr LB7B9 jsr LB7B9
addr_call draw_centered_string, desktop_aux::str_new_folder_title addr_call draw_centered_string, desktop_aux::str_new_folder_title
jsr set_fill_black jsr set_fill_black
MGTK_RELAY_CALL MGTK::FrameRect, LD6AB MGTK_RELAY_CALL MGTK::FrameRect, rect1
rts rts
LAE70: lda #$80 LAE70: lda #$80
@ -19152,7 +19154,7 @@ LB27D: jsr LBD75
jsr LB7B9 jsr LB7B9
addr_call draw_centered_string, desktop_aux::str_rename_title addr_call draw_centered_string, desktop_aux::str_rename_title
jsr set_fill_black jsr set_fill_black
MGTK_RELAY_CALL MGTK::FrameRect, LD6AB MGTK_RELAY_CALL MGTK::FrameRect, rect1
yax_call draw_dialog_label, $02, desktop_aux::str_rename_old yax_call draw_dialog_label, $02, desktop_aux::str_rename_old
lda #$55 lda #$55
sta dialog_label_pos sta dialog_label_pos
@ -19467,6 +19469,11 @@ create_window_with_alert_bitmap:
;;; ================================================== ;;; ==================================================
.proc draw_dialog_label .proc draw_dialog_label
textwidth_params := $8
textptr := $8
textlen := $A
result := $B
stx $06+1 stx $06+1
sta $06 sta $06
tya tya
@ -19478,21 +19485,22 @@ create_window_with_alert_bitmap:
lda $06 lda $06
clc clc
adc #$01 adc #$01
sta $08
sta textptr
lda $06+1 lda $06+1
adc #$00 adc #$00
sta $08+1 sta textptr+1
jsr LBD7B jsr LBD7B
sta $0A sta textlen
MGTK_RELAY_CALL MGTK::TextWidth, $08 MGTK_RELAY_CALL MGTK::TextWidth, textwidth_params
lsr $0C lsr result+1
ror $0B ror result
lda #$C8 lda #<200
sec sec
sbc $0B sbc result
sta dialog_label_pos sta dialog_label_pos
lda #$00 lda #>200
sbc $0C sbc result+1
sta dialog_label_pos+1 sta dialog_label_pos+1
pla pla
tay tay
@ -19599,15 +19607,19 @@ erase_ok_button:
;;; ================================================== ;;; ==================================================
.proc draw_text1 .proc draw_text1
sta $06 params := $6
stx $06+1 textptr := $6
textlen := $8
sta textptr
stx textptr+1
jsr LBD7B jsr LBD7B
beq done beq done
sta $08 sta textlen
inc $06 inc textptr
bne :+ bne :+
inc $06+1 inc textptr+1
: MGTK_RELAY_CALL MGTK::DrawText, $6 : MGTK_RELAY_CALL MGTK::DrawText, params
done: rts done: rts
.endproc .endproc
@ -19637,21 +19649,22 @@ done: rts
ror a ror a
sec sec
sbc str_width sbc str_width
sta LD6B7 sta point4::xcoord
lda LB76B lda LB76B
sbc str_width+1 sbc str_width+1
sta LD6B7+1 sta point4::xcoord+1
MGTK_RELAY_CALL MGTK::MoveTo, LD6B7 MGTK_RELAY_CALL MGTK::MoveTo, point4
MGTK_RELAY_CALL MGTK::DrawText, str MGTK_RELAY_CALL MGTK::DrawText, str
rts rts
LB76B: .byte 0
.endproc .endproc
;;; ================================================== ;;; ==================================================
LB76B: .byte 0 LB76C: sta $06
sta $06
stx $06+1 stx $06+1
MGTK_RELAY_CALL MGTK::MoveTo, LD6BB MGTK_RELAY_CALL MGTK::MoveTo, point7
lda $06 lda $06
ldx $06+1 ldx $06+1
jsr draw_text1 jsr draw_text1
@ -19827,14 +19840,19 @@ LB8F2: .byte 0
LB8F3: .byte 0 LB8F3: .byte 0
rts rts
LB8F5: jsr LBD3B .proc LB8F5
sta $06 point := $6
stx $06+1 xcoord := $6
ycoord := $8
jsr LBD3B
sta xcoord
stx xcoord+1
lda $D6B5 lda $D6B5
sta $08 sta ycoord
lda $D6B5+1 lda $D6B5+1
sta $08+1 sta ycoord+1
MGTK_RELAY_CALL MGTK::MoveTo, $6 MGTK_RELAY_CALL MGTK::MoveTo, point
MGTK_RELAY_CALL MGTK::SetPortBits, setportbits_params3 MGTK_RELAY_CALL MGTK::SetPortBits, setportbits_params3
bit LD8EB bit LD8EB
bpl LB92D bpl LB92D
@ -19845,27 +19863,33 @@ LB8F5: jsr LBD3B
LB92D: MGTK_RELAY_CALL MGTK::SetTextBG, desktop_aux::LAE6D LB92D: MGTK_RELAY_CALL MGTK::SetTextBG, desktop_aux::LAE6D
lda #$FF lda #$FF
sta LD8EB sta LD8EB
drawtext_params := $6
textptr := $6
textlen := $8
LB93B: lda #<$D8EF LB93B: lda #<$D8EF
sta $06 sta textptr
lda #>$D8EF lda #>$D8EF
sta $06+1 sta textptr+1
lda LD8EE lda LD8EE
sta $08 sta textlen
MGTK_RELAY_CALL MGTK::DrawText, $6 MGTK_RELAY_CALL MGTK::DrawText, drawtext_params
MGTK_RELAY_CALL MGTK::SetTextBG, desktop_aux::LAE6D MGTK_RELAY_CALL MGTK::SetTextBG, desktop_aux::LAE6D
lda winfoF lda winfoF
jsr LB7B9 jsr LB7B9
rts rts
.endproc
LB961: lda path_buf1 LB961: lda path_buf1
beq LB9B7 beq LB9B7
lda winfoF lda winfoF
jsr LB7B9 jsr LB7B9
jsr set_fill_white jsr set_fill_white
MGTK_RELAY_CALL MGTK::PaintRect, LD6AB MGTK_RELAY_CALL MGTK::PaintRect, rect1
MGTK_RELAY_CALL MGTK::SetPenMode, penXOR MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
MGTK_RELAY_CALL MGTK::FrameRect, LD6AB MGTK_RELAY_CALL MGTK::FrameRect, rect1
MGTK_RELAY_CALL MGTK::MoveTo, LD6B3 MGTK_RELAY_CALL MGTK::MoveTo, point6
MGTK_RELAY_CALL MGTK::SetPortBits, setportbits_params3 MGTK_RELAY_CALL MGTK::SetPortBits, setportbits_params3
addr_call draw_text1, path_buf1 addr_call draw_text1, path_buf1
addr_call draw_text1, path_buf2 addr_call draw_text1, path_buf2
@ -19876,7 +19900,7 @@ LB9B7: rts
LB9B8: MGTK_RELAY_CALL MGTK::ScreenToWindow, event_params LB9B8: MGTK_RELAY_CALL MGTK::ScreenToWindow, event_params
MGTK_RELAY_CALL MGTK::MoveTo, $D20D MGTK_RELAY_CALL MGTK::MoveTo, $D20D
MGTK_RELAY_CALL MGTK::InRect, LD6AB MGTK_RELAY_CALL MGTK::InRect, rect1
cmp #$80 cmp #$80
beq LB9D8 beq LB9D8
rts rts
@ -19891,7 +19915,9 @@ LB9D8: jsr LBD3B
bcs LB9EE bcs LB9EE
jmp LBA83 jmp LBA83
LB9EE: jsr LBD3B .proc LB9EE
ptr := $6
jsr LBD3B
sta LBB09 sta LBB09
stx LBB0A stx LBB0A
ldx path_buf2 ldx path_buf2
@ -19900,12 +19926,12 @@ LB9EE: jsr LBD3B
sta path_buf2,x sta path_buf2,x
inc path_buf2 inc path_buf2
lda #<path_buf2 lda #<path_buf2
sta $06 sta ptr
lda #>path_buf2 lda #>path_buf2
sta $06+1 sta ptr+1
lda path_buf2 lda path_buf2
sta $08 sta ptr+2
LBA10: MGTK_RELAY_CALL MGTK::TextWidth, $6 LBA10: MGTK_RELAY_CALL MGTK::TextWidth, ptr
lda $09 lda $09
clc clc
adc LBB09 adc LBB09
@ -19924,6 +19950,7 @@ LBA10: MGTK_RELAY_CALL MGTK::TextWidth, $6
bne LBA10 bne LBA10
dec path_buf2 dec path_buf2
jmp LBB05 jmp LBB05
.endproc
LBA42: lda $08 LBA42: lda $08
cmp path_buf2 cmp path_buf2
@ -19958,31 +19985,38 @@ LBA7C: dey
sty path_buf2 sty path_buf2
jmp LBB05 jmp LBB05
LBA83: lda #<path_buf1
sta $06 .proc LBA83
params := $6
textptr := $6
textlen := $8
result := $9
lda #<path_buf1
sta textptr
lda #>path_buf1 lda #>path_buf1
sta $06+1 sta textptr+1
lda path_buf1 lda path_buf1
sta $08 sta textlen
LBA90: MGTK_RELAY_CALL MGTK::TextWidth, $6 : MGTK_RELAY_CALL MGTK::TextWidth, params
lda $09 lda result
clc clc
adc LD6B3 adc point6::xcoord
sta $09 sta result
lda $0A lda result+1
adc $D6B4 adc point6::xcoord+1
sta $0A sta result+1
.byte $A5 lda result
LBAA9: ora #$CD cmp $D20D
ora LA5D2 lda result+1
asl a
sbc $D20E sbc $D20E
bcc LBABF bcc LBABF
dec $08 dec textlen
lda $08 lda textlen
cmp #$01 cmp #1
bcs LBA90 bcs :-
jmp LBC5E jmp LBC5E
.endproc
LBABF: inc $08 LBABF: inc $08
ldy #$00 ldy #$00
@ -20029,53 +20063,70 @@ LBB0B: sta LBB62
bcc LBB1A bcc LBB1A
rts rts
LBB1A: lda LBB62 .proc LBB1A
point := $6
xcoord := $6
ycoord := $8
lda LBB62
ldx path_buf1 ldx path_buf1
inx inx
sta path_buf1,x sta path_buf1,x
sta str_1_char+1 sta str_1_char+1
jsr LBD3B jsr LBD3B
inc path_buf1 inc path_buf1
sta $06 sta xcoord
stx $06+1 stx xcoord+1
lda $D6B5 lda $D6B5
sta $08 sta ycoord
lda $D6B5+1 lda $D6B5+1
sta $08+1 sta ycoord+1
MGTK_RELAY_CALL MGTK::MoveTo, $6 MGTK_RELAY_CALL MGTK::MoveTo, point
MGTK_RELAY_CALL MGTK::SetPortBits, setportbits_params3 MGTK_RELAY_CALL MGTK::SetPortBits, setportbits_params3
addr_call draw_text1, str_1_char addr_call draw_text1, str_1_char
addr_call draw_text1, path_buf2 addr_call draw_text1, path_buf2
lda winfoF lda winfoF
jsr LB7B9 jsr LB7B9
rts rts
.endproc
LBB62: .byte 0 LBB62: .byte 0
LBB63: lda path_buf1 LBB63: lda path_buf1
bne LBB69 bne LBB69
rts rts
LBB69: dec path_buf1 .proc LBB69
point := $6
xcoord := $6
ycoord := $8
dec path_buf1
jsr LBD3B jsr LBD3B
sta $06 sta xcoord
stx $06+1 stx xcoord+1
lda $D6B5 lda $D6B5
sta $08 sta ycoord
lda $D6B5+1 lda $D6B5+1
sta $08+1 sta ycoord+1
MGTK_RELAY_CALL MGTK::MoveTo, $6 MGTK_RELAY_CALL MGTK::MoveTo, point
MGTK_RELAY_CALL MGTK::SetPortBits, setportbits_params3 MGTK_RELAY_CALL MGTK::SetPortBits, setportbits_params3
addr_call draw_text1, path_buf2 addr_call draw_text1, path_buf2
addr_call draw_text1, str_2_spaces addr_call draw_text1, str_2_spaces
lda winfoF lda winfoF
jsr LB7B9 jsr LB7B9
rts rts
.endproc
LBBA4: lda path_buf1 LBBA4: lda path_buf1
bne LBBAA bne LBBAA
rts rts
LBBAA: ldx path_buf2 .proc LBBAA
point := $6
xcoord := $6
ycoord := $8
ldx path_buf2
cpx #1 cpx #1
beq LBBBC beq LBBBC
LBBB1: lda path_buf2,x LBBB1: lda path_buf2,x
@ -20089,19 +20140,20 @@ LBBBC: ldx path_buf1
dec path_buf1 dec path_buf1
inc path_buf2 inc path_buf2
jsr LBD3B jsr LBD3B
sta $06 sta xcoord
stx $06+1 stx xcoord+1
lda $D6B5 lda $D6B5
sta $08 sta ycoord
lda $D6B5+1 lda $D6B5+1
sta $08+1 sta ycoord+1
MGTK_RELAY_CALL MGTK::MoveTo, $6 MGTK_RELAY_CALL MGTK::MoveTo, point
MGTK_RELAY_CALL MGTK::SetPortBits, setportbits_params3 MGTK_RELAY_CALL MGTK::SetPortBits, setportbits_params3
addr_call draw_text1, path_buf2 addr_call draw_text1, path_buf2
addr_call draw_text1, str_2_spaces addr_call draw_text1, str_2_spaces
lda winfoF lda winfoF
jsr LB7B9 jsr LB7B9
rts rts
.endproc
LBC03: lda path_buf2 LBC03: lda path_buf2
cmp #$02 cmp #$02
@ -20123,7 +20175,7 @@ LBC21: lda $D485,x
cpx path_buf2 cpx path_buf2
bne LBC21 bne LBC21
LBC2D: dec path_buf2 LBC2D: dec path_buf2
MGTK_RELAY_CALL MGTK::MoveTo, LD6B3 MGTK_RELAY_CALL MGTK::MoveTo, point6
MGTK_RELAY_CALL MGTK::SetPortBits, setportbits_params3 MGTK_RELAY_CALL MGTK::SetPortBits, setportbits_params3
addr_call draw_text1, path_buf1 addr_call draw_text1, path_buf1
addr_call draw_text1, path_buf2 addr_call draw_text1, path_buf2
@ -20174,7 +20226,7 @@ LBCB3: pla
sta path_buf2 sta path_buf2
lda #$00 lda #$00
sta path_buf1 sta path_buf1
MGTK_RELAY_CALL MGTK::MoveTo, LD6B3 MGTK_RELAY_CALL MGTK::MoveTo, point6
jsr LB961 jsr LB961
rts rts
@ -20201,7 +20253,7 @@ LBCDF: lda path_buf2,x
sta path_buf1 sta path_buf1
lda #$01 lda #$01
sta path_buf2 sta path_buf2
MGTK_RELAY_CALL MGTK::MoveTo, LD6B3 MGTK_RELAY_CALL MGTK::MoveTo, point6
jsr LB961 jsr LB961
rts rts
@ -20237,27 +20289,33 @@ LBD33: rts
jsr LB961 jsr LB961
rts rts
LBD3B: lda #<$D444 .proc LBD3B
sta $06 params := $6
lda #>$D444 textptr := $6
sta $06+1 textlen := $8
lda path_buf1 result := $9
sta $08
bne LBD51
lda LD6B3
ldx $D6B4
rts
LBD51: MGTK_RELAY_CALL MGTK::TextWidth, $6 lda #<$D444
lda $09 sta textptr
lda #>$D444
sta textptr+1
lda path_buf1
sta textlen
bne :+
lda point6::xcoord
ldx point6::xcoord+1
rts
: MGTK_RELAY_CALL MGTK::TextWidth, params
lda result
clc clc
adc LD6B3 adc point6::xcoord
tay tay
lda $0A lda result+1
adc $D6B4 adc point6::xcoord+1
tax tax
tya tya
rts rts
.endproc
LBD69: lda #$01 LBD69: lda #$01
sta path_buf2 sta path_buf2
@ -20269,7 +20327,9 @@ LBD75: lda #$00
sta path_buf1 sta path_buf1
rts rts
LBD7B: ldx #$11 ;; Compute length of some text???
.proc LBD7B
ldx #$11
LBD7D: lda L0020,x LBD7D: lda L0020,x
sta LBDB0,x sta LBDB0,x
dex dex
@ -20288,6 +20348,7 @@ LBD95: lda LBDB0,x
bpl LBD95 bpl LBD95
pla pla
rts rts
.endproc
LBD9F: sta RAMRDON LBD9F: sta RAMRDON
sta RAMWRTON sta RAMWRTON