mirror of
https://github.com/mi57730/a2d.git
synced 2025-04-10 01:37:13 +00:00
simplify param names
This commit is contained in:
parent
91ed3397cc
commit
80e1b59799
@ -172,9 +172,9 @@ L8625: MGTK_RELAY_CALL MGTK::HiliteMenu, winfo18_port ; ???
|
||||
sta L8737
|
||||
sty L8738
|
||||
and #$F0
|
||||
sta online_params_unit_num
|
||||
sta on_line_unit_num
|
||||
sta ALTZPOFF
|
||||
MLI_CALL ON_LINE, online_params
|
||||
MLI_CALL ON_LINE, on_line_params
|
||||
sta ALTZPON
|
||||
beq L867B
|
||||
L8672: pha
|
||||
@ -183,7 +183,7 @@ L8672: pha
|
||||
pla
|
||||
rts
|
||||
|
||||
L867B: lda online_params_buffer
|
||||
L867B: lda on_line_buffer
|
||||
beq L8672
|
||||
jsr $8388 ; into dynamically loaded code???
|
||||
jsr DESKTOP_ALLOC_ICON ; AUX > MAIN call???
|
||||
@ -201,13 +201,13 @@ L869E: sta ($06),y
|
||||
cpx #$12
|
||||
bne L869E
|
||||
ldy #$09
|
||||
lda online_params_buffer
|
||||
lda on_line_buffer
|
||||
and #$0F
|
||||
sta online_params_buffer
|
||||
sta on_line_buffer
|
||||
sta ($06),y
|
||||
ldx #$00
|
||||
ldy #$0B
|
||||
L86B6: lda online_params_buffer+1,x
|
||||
L86B6: lda on_line_buffer+1,x
|
||||
cmp #$41 ; convert to lowercase ???
|
||||
bcc L86C4
|
||||
cmp #$5F
|
||||
@ -217,7 +217,7 @@ L86B6: lda online_params_buffer+1,x
|
||||
L86C4: sta ($06),y
|
||||
iny
|
||||
inx
|
||||
cpx online_params_buffer
|
||||
cpx on_line_buffer
|
||||
bne L86B6
|
||||
ldy #9
|
||||
lda ($06),y
|
||||
@ -298,11 +298,11 @@ L873D: DEFINE_POINT 500, 16
|
||||
DEFINE_POINT 400, 41
|
||||
DEFINE_POINT 400, 66
|
||||
|
||||
DEFINE_ON_LINE_PARAMS online_params, $60, online_params_buffer ; Slot 6 Drive 1
|
||||
online_params_unit_num := online_params::unit_num
|
||||
DEFINE_ON_LINE_PARAMS on_line_params, $60, on_line_buffer ; Slot 6 Drive 1
|
||||
on_line_unit_num := on_line_params::unit_num
|
||||
|
||||
;; Per ProDOS TRM this should be 256 bytes!
|
||||
online_params_buffer:
|
||||
on_line_buffer:
|
||||
.byte $0B
|
||||
.byte "GRAPHICS.TK",$00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
@ -3614,14 +3614,14 @@ LBB5C: MGTK_RELAY2_CALL MGTK::FrameRect, try_again_rect
|
||||
LBB75: MGTK_RELAY2_CALL MGTK::MoveTo, pos_prompt
|
||||
addr_call_indirect draw_pascal_string, prompt_addr
|
||||
LBB87: MGTK_RELAY2_CALL MGTK::GetEvent, event_params
|
||||
lda event_params_kind
|
||||
lda event_kind
|
||||
cmp #MGTK::event_kind_button_down
|
||||
bne LBB9A
|
||||
jmp LBC0C
|
||||
|
||||
LBB9A: cmp #MGTK::event_kind_key_down
|
||||
bne LBB87
|
||||
lda event_params_key
|
||||
lda event_key
|
||||
and #$7F
|
||||
bit alert_action
|
||||
bpl LBBEE
|
||||
@ -3657,7 +3657,7 @@ LBBEE: cmp #CHAR_RETURN
|
||||
LBC09: jmp LBB87
|
||||
|
||||
LBC0C: jsr LBDE1
|
||||
MGTK_RELAY2_CALL MGTK::MoveTo, event_params_coords
|
||||
MGTK_RELAY2_CALL MGTK::MoveTo, event_coords
|
||||
bit alert_action
|
||||
bpl LBC42
|
||||
MGTK_RELAY2_CALL MGTK::InRect, cancel_rect
|
||||
@ -3690,11 +3690,11 @@ LBC6D: MGTK_RELAY2_CALL MGTK::SetPenMode, penXOR
|
||||
lda #$00
|
||||
sta LBCE8
|
||||
LBC84: MGTK_RELAY2_CALL MGTK::GetEvent, event_params
|
||||
lda event_params_kind
|
||||
lda event_kind
|
||||
cmp #MGTK::event_kind_button_up
|
||||
beq LBCDB
|
||||
jsr LBDE1
|
||||
MGTK_RELAY2_CALL MGTK::MoveTo, event_params_coords
|
||||
MGTK_RELAY2_CALL MGTK::MoveTo, event_coords
|
||||
MGTK_RELAY2_CALL MGTK::InRect, try_again_rect
|
||||
cmp #MGTK::inrect_inside
|
||||
beq LBCB5
|
||||
@ -3727,11 +3727,11 @@ LBCE9: MGTK_RELAY2_CALL MGTK::SetPenMode, penXOR
|
||||
lda #$00
|
||||
sta LBD64
|
||||
LBD00: MGTK_RELAY2_CALL MGTK::GetEvent, event_params
|
||||
lda event_params_kind
|
||||
lda event_kind
|
||||
cmp #MGTK::event_kind_button_up
|
||||
beq LBD57
|
||||
jsr LBDE1
|
||||
MGTK_RELAY2_CALL MGTK::MoveTo, event_params_coords
|
||||
MGTK_RELAY2_CALL MGTK::MoveTo, event_coords
|
||||
MGTK_RELAY2_CALL MGTK::InRect, cancel_rect
|
||||
cmp #MGTK::inrect_inside
|
||||
beq LBD31
|
||||
@ -3764,11 +3764,11 @@ LBD65: lda #$00
|
||||
MGTK_RELAY2_CALL MGTK::SetPenMode, penXOR
|
||||
MGTK_RELAY2_CALL MGTK::PaintRect, try_again_rect
|
||||
LBD7C: MGTK_RELAY2_CALL MGTK::GetEvent, event_params
|
||||
lda event_params_kind
|
||||
lda event_kind
|
||||
cmp #MGTK::event_kind_button_up
|
||||
beq LBDD3
|
||||
jsr LBDE1
|
||||
MGTK_RELAY2_CALL MGTK::MoveTo, event_params_coords
|
||||
MGTK_RELAY2_CALL MGTK::MoveTo, event_coords
|
||||
MGTK_RELAY2_CALL MGTK::InRect, try_again_rect
|
||||
cmp #MGTK::inrect_inside
|
||||
beq LBDAD
|
||||
@ -3800,8 +3800,8 @@ LBDDB: lda #$02
|
||||
;;; ==================================================
|
||||
|
||||
LBDE0: .byte 0
|
||||
LBDE1: sub16 event_params_xcoord, portmap::viewloc::xcoord, event_params_xcoord
|
||||
sub16 event_params_ycoord, portmap::viewloc::ycoord, event_params_ycoord
|
||||
LBDE1: sub16 event_xcoord, portmap::viewloc::xcoord, event_xcoord
|
||||
sub16 event_ycoord, portmap::viewloc::ycoord, event_ycoord
|
||||
rts
|
||||
|
||||
.proc LBE08
|
||||
@ -4340,20 +4340,20 @@ notpenBIC: .byte 7
|
||||
;;; Re-used param space for events/queries (10 bytes)
|
||||
|
||||
event_params := *
|
||||
event_params_kind := event_params + 0
|
||||
event_kind := event_params + 0
|
||||
;; if kind is key_down
|
||||
event_params_key := event_params + 1
|
||||
event_params_modifiers := event_params + 2
|
||||
event_key := event_params + 1
|
||||
event_modifiers := event_params + 2
|
||||
;; if kind is no_event, button_down/up, drag, or apple_key:
|
||||
event_params_coords := event_params + 1
|
||||
event_params_xcoord := event_params + 1
|
||||
event_params_ycoord := event_params + 3
|
||||
event_coords := event_params + 1
|
||||
event_xcoord := event_params + 1
|
||||
event_ycoord := event_params + 3
|
||||
;; if kind is update:
|
||||
event_params_window_id := event_params + 1
|
||||
event_window_id := event_params + 1
|
||||
|
||||
activatectl_params := *
|
||||
activatectl_params_which_ctl := activatectl_params
|
||||
activatectl_params_activate := activatectl_params + 1
|
||||
activatectl_which_ctl := activatectl_params
|
||||
activatectl_activate := activatectl_params + 1
|
||||
|
||||
trackthumb_params := *
|
||||
trackthumb_which_ctl := trackthumb_params
|
||||
@ -4361,12 +4361,12 @@ trackthumb_mousex := trackthumb_params + 1
|
||||
trackthumb_mousey := trackthumb_params + 3
|
||||
trackthumb_thumbpos := trackthumb_params + 5
|
||||
trackthumb_thumbmoved := trackthumb_params + 6
|
||||
.assert trackthumb_mousex = event_params_xcoord, error, "param mismatch"
|
||||
.assert trackthumb_mousey = event_params_ycoord, error, "param mismatch"
|
||||
.assert trackthumb_mousex = event_xcoord, error, "param mismatch"
|
||||
.assert trackthumb_mousey = event_ycoord, error, "param mismatch"
|
||||
|
||||
updatethumb_params := *
|
||||
updatethumb_params_which_ctl := updatethumb_params
|
||||
updatethumb_params_thumbpos := updatethumb_params + 1
|
||||
updatethumb_which_ctl := updatethumb_params
|
||||
updatethumb_thumbpos := updatethumb_params + 1
|
||||
updatethumb_stash := updatethumb_params + 5 ; not part of struct
|
||||
|
||||
screentowindow_params := *
|
||||
@ -4375,31 +4375,31 @@ screentowindow_screenx := screentowindow_params + 1
|
||||
screentowindow_screeny := screentowindow_params + 3
|
||||
screentowindow_windowx := screentowindow_params + 5
|
||||
screentowindow_windowy := screentowindow_params + 7
|
||||
.assert screentowindow_screenx = event_params_xcoord, error, "param mismatch"
|
||||
.assert screentowindow_screeny = event_params_ycoord, error, "param mismatch"
|
||||
.assert screentowindow_screenx = event_xcoord, error, "param mismatch"
|
||||
.assert screentowindow_screeny = event_ycoord, error, "param mismatch"
|
||||
|
||||
findwindow_params := * + 1 ; offset to x/y overlap event_params x/y
|
||||
findwindow_params_mousex := findwindow_params + 0
|
||||
findwindow_params_mousey := findwindow_params + 2
|
||||
findwindow_params_which_area := findwindow_params + 4
|
||||
findwindow_params_window_id := findwindow_params + 5
|
||||
.assert findwindow_params_mousex = event_params_xcoord, error, "param mismatch"
|
||||
.assert findwindow_params_mousey = event_params_ycoord, error, "param mismatch"
|
||||
findwindow_mousex := findwindow_params + 0
|
||||
findwindow_mousey := findwindow_params + 2
|
||||
findwindow_which_area := findwindow_params + 4
|
||||
findwindow_window_id := findwindow_params + 5
|
||||
.assert findwindow_mousex = event_xcoord, error, "param mismatch"
|
||||
.assert findwindow_mousey = event_ycoord, error, "param mismatch"
|
||||
|
||||
findcontrol_params := * + 1 ; offset to x/y overlap event_params x/y
|
||||
findcontrol_params_mousex := findcontrol_params + 0
|
||||
findcontrol_params_mousey := findcontrol_params + 2
|
||||
findcontrol_mousex := findcontrol_params + 0
|
||||
findcontrol_mousey := findcontrol_params + 2
|
||||
findcontrol_which_ctl := findcontrol_params + 4
|
||||
findcontrol_which_part := findcontrol_params + 5
|
||||
.assert findcontrol_params_mousex = event_params_xcoord, error, "param mismatch"
|
||||
.assert findcontrol_params_mousey = event_params_ycoord, error, "param mismatch"
|
||||
.assert findcontrol_mousex = event_xcoord, error, "param mismatch"
|
||||
.assert findcontrol_mousey = event_ycoord, error, "param mismatch"
|
||||
|
||||
findicon_params := * + 1 ; offset to x/y overlap event_params x/y
|
||||
findicon_params_mousex := findicon_params + 0
|
||||
findicon_params_mousey := findicon_params + 2
|
||||
findicon_mousex := findicon_params + 0
|
||||
findicon_mousey := findicon_params + 2
|
||||
findicon_which_icon := findicon_params + 4
|
||||
.assert findicon_params_mousex = event_params_xcoord, error, "param mismatch"
|
||||
.assert findicon_params_mousey = event_params_ycoord, error, "param mismatch"
|
||||
.assert findicon_mousex = event_xcoord, error, "param mismatch"
|
||||
.assert findicon_mousey = event_ycoord, error, "param mismatch"
|
||||
|
||||
;; Enough space for all the param types, and then some
|
||||
.res 10, 0
|
||||
@ -5908,7 +5908,7 @@ main_loop:
|
||||
|
||||
;; Get an event
|
||||
jsr get_event
|
||||
lda event_params_kind
|
||||
lda event_kind
|
||||
|
||||
;; Is it a button-down event? (including w/ modifiers)
|
||||
cmp #MGTK::event_kind_button_down
|
||||
@ -5958,14 +5958,14 @@ redraw_windows:
|
||||
lda #$00
|
||||
sta L40F1
|
||||
L4100: jsr peek_event
|
||||
lda event_params_kind
|
||||
lda event_kind
|
||||
cmp #MGTK::event_kind_update
|
||||
bne L412B
|
||||
jsr get_event
|
||||
L410D: jsr L4113
|
||||
jmp L4100
|
||||
|
||||
L4113: MGTK_RELAY_CALL MGTK::BeginUpdate, event_params_window_id
|
||||
L4113: MGTK_RELAY_CALL MGTK::BeginUpdate, event_window_id
|
||||
bne L4151 ; did not really need updating
|
||||
jsr update_window
|
||||
MGTK_RELAY_CALL MGTK::EndUpdate
|
||||
@ -5996,7 +5996,7 @@ L4152: .byte 0
|
||||
|
||||
|
||||
.proc update_window
|
||||
lda event_params_window_id
|
||||
lda event_window_id
|
||||
cmp #9 ; only handle windows 0...8
|
||||
bcc L415B
|
||||
rts
|
||||
@ -6253,7 +6253,7 @@ flag: .byte $00
|
||||
|
||||
;; Handle accelerator keys
|
||||
handle_keydown:
|
||||
lda event_params_modifiers
|
||||
lda event_modifiers
|
||||
bne :+ ; either OA or CA ?
|
||||
jmp menu_accelerators ; nope
|
||||
: cmp #3 ; both OA + CA ?
|
||||
@ -6261,7 +6261,7 @@ handle_keydown:
|
||||
rts
|
||||
|
||||
;; Non-menu keys
|
||||
: lda event_params_key
|
||||
: lda event_key
|
||||
ora #$20 ; force to lower-case
|
||||
cmp #'h' ; OA-H (Highlight Icon)
|
||||
bne :+
|
||||
@ -6328,16 +6328,16 @@ L43E0: tsx
|
||||
.proc handle_click
|
||||
tsx
|
||||
stx LE256
|
||||
MGTK_RELAY_CALL MGTK::FindWindow, event_params_coords
|
||||
lda findwindow_params_which_area
|
||||
MGTK_RELAY_CALL MGTK::FindWindow, event_coords
|
||||
lda findwindow_which_area
|
||||
bne not_desktop
|
||||
|
||||
;; Click on desktop
|
||||
jsr detect_double_click
|
||||
sta double_click_flag
|
||||
lda #0
|
||||
sta findwindow_params_window_id
|
||||
DESKTOP_RELAY_CALL DT_FIND_ICON, event_params_coords
|
||||
sta findwindow_window_id
|
||||
DESKTOP_RELAY_CALL DT_FIND_ICON, event_coords
|
||||
lda findicon_which_icon
|
||||
beq L4415
|
||||
jmp L67D7
|
||||
@ -6353,7 +6353,7 @@ not_desktop:
|
||||
not_menu:
|
||||
pha ; which window - active or not?
|
||||
lda active_window_id
|
||||
cmp findwindow_params_window_id
|
||||
cmp findwindow_window_id
|
||||
beq handle_active_window_click
|
||||
pla
|
||||
jmp handle_inactive_window_click
|
||||
@ -6412,8 +6412,8 @@ L445D: jsr clear_selection
|
||||
sta selected_icon_count
|
||||
lda icon_param
|
||||
sta selected_icon_list
|
||||
L44A6: MGTK_RELAY_CALL MGTK::SelectWindow, findwindow_params_window_id
|
||||
lda findwindow_params_window_id
|
||||
L44A6: MGTK_RELAY_CALL MGTK::SelectWindow, findwindow_window_id
|
||||
lda findwindow_window_id
|
||||
sta active_window_id
|
||||
sta cached_window_id
|
||||
jsr DESKTOP_COPY_TO_BUF
|
||||
@ -6601,7 +6601,7 @@ L45C7: sta unit_num
|
||||
plp
|
||||
|
||||
adc #1
|
||||
sta status_params_unit_num
|
||||
sta status_unit_num
|
||||
|
||||
;; Execute SmartPort call
|
||||
jsr call
|
||||
@ -6636,7 +6636,7 @@ unit_num: .byte 1
|
||||
list_ptr: .addr status_buffer
|
||||
status_code: .byte 0
|
||||
.endproc
|
||||
status_params_unit_num := status_params::unit_num
|
||||
status_unit_num := status_params::unit_num
|
||||
|
||||
status_buffer: .res 16, 0
|
||||
.endproc
|
||||
@ -7319,9 +7319,9 @@ nope: dex
|
||||
;; Load the DA
|
||||
jsr open
|
||||
bmi done
|
||||
lda open_params_ref_num
|
||||
sta read_params_ref_num
|
||||
sta close_params_ref_num
|
||||
lda open_ref_num
|
||||
sta read_ref_num
|
||||
sta close_ref_num
|
||||
jsr read
|
||||
jsr close
|
||||
lda #$80
|
||||
@ -7358,13 +7358,13 @@ close: yxa_jump MLI_RELAY, CLOSE, close_params
|
||||
unused: .byte 0 ; ???
|
||||
|
||||
DEFINE_OPEN_PARAMS open_params, str_desk_acc, $1C00
|
||||
open_params_ref_num := open_params::ref_num
|
||||
open_ref_num := open_params::ref_num
|
||||
|
||||
DEFINE_READ_PARAMS read_params, DA_LOAD_ADDRESS, DA_MAX_SIZE
|
||||
read_params_ref_num := read_params::ref_num
|
||||
read_ref_num := read_params::ref_num
|
||||
|
||||
DEFINE_CLOSE_PARAMS close_params
|
||||
close_params_ref_num := close_params::ref_num
|
||||
close_ref_num := close_params::ref_num
|
||||
|
||||
.define prefix "Desk.acc/"
|
||||
|
||||
@ -8279,7 +8279,7 @@ L53EF: dec L704B
|
||||
lda L704C,x
|
||||
cmp active_window_id
|
||||
beq L5403
|
||||
sta findwindow_params_window_id
|
||||
sta findwindow_window_id
|
||||
jsr handle_inactive_window_click
|
||||
L5403: jsr close_window
|
||||
lda L704B
|
||||
@ -8465,7 +8465,7 @@ L5579: lda #$00
|
||||
jsr clear_selection
|
||||
L5581: jsr L55F0
|
||||
L5584: jsr get_event
|
||||
lda event_params_kind
|
||||
lda event_kind
|
||||
cmp #MGTK::event_kind_key_down
|
||||
beq L5595
|
||||
cmp #MGTK::event_kind_button_down
|
||||
@ -8654,14 +8654,14 @@ L5721: cpx #$08
|
||||
L572D: lda #$00
|
||||
sta L578C
|
||||
L5732: jsr get_event
|
||||
lda event_params_kind
|
||||
lda event_kind
|
||||
cmp #MGTK::event_kind_key_down
|
||||
beq L5743
|
||||
cmp #MGTK::event_kind_button_down
|
||||
bne L5732
|
||||
jmp L578B
|
||||
|
||||
L5743: lda event_params_key
|
||||
L5743: lda event_key
|
||||
and #$7F
|
||||
cmp #CHAR_RETURN
|
||||
beq L578B
|
||||
@ -8678,7 +8678,7 @@ L5743: lda event_params_key
|
||||
ldx #$00
|
||||
L5763: stx L578C
|
||||
lda L0800,x
|
||||
sta findwindow_params_window_id
|
||||
sta findwindow_window_id
|
||||
jsr handle_inactive_window_click
|
||||
jmp L5732
|
||||
|
||||
@ -8689,7 +8689,7 @@ L5772: ldx L578C
|
||||
dex
|
||||
L577C: stx L578C
|
||||
lda L0800,x
|
||||
sta findwindow_params_window_id
|
||||
sta findwindow_window_id
|
||||
jsr handle_inactive_window_click
|
||||
jmp L5732
|
||||
|
||||
@ -8722,12 +8722,12 @@ L578D: .byte 0
|
||||
.proc cmd_scroll
|
||||
jsr L5803
|
||||
loop: jsr get_event
|
||||
lda event_params_kind
|
||||
lda event_kind
|
||||
cmp #MGTK::event_kind_button_down
|
||||
beq done
|
||||
cmp #MGTK::event_kind_key_down
|
||||
bne loop
|
||||
lda event_params_key
|
||||
lda event_key
|
||||
cmp #CHAR_RETURN
|
||||
beq done
|
||||
cmp #CHAR_ESCAPE
|
||||
@ -8827,7 +8827,7 @@ L5861: .word 0
|
||||
sta updatethumb_stash
|
||||
inc updatethumb_stash
|
||||
lda #MGTK::ctl_horizontal_scroll_bar
|
||||
sta updatethumb_params_which_ctl
|
||||
sta updatethumb_which_ctl
|
||||
jsr L5C54
|
||||
lda updatethumb_stash
|
||||
: rts
|
||||
@ -8840,7 +8840,7 @@ L587D: .byte 0
|
||||
sta updatethumb_stash
|
||||
dec updatethumb_stash
|
||||
lda #MGTK::ctl_horizontal_scroll_bar
|
||||
sta updatethumb_params_which_ctl
|
||||
sta updatethumb_which_ctl
|
||||
jsr L5C54
|
||||
lda updatethumb_stash
|
||||
: rts
|
||||
@ -8854,7 +8854,7 @@ L587D: .byte 0
|
||||
sta updatethumb_stash
|
||||
inc updatethumb_stash
|
||||
lda #MGTK::ctl_vertical_scroll_bar
|
||||
sta updatethumb_params_which_ctl
|
||||
sta updatethumb_which_ctl
|
||||
jsr L5C54
|
||||
lda updatethumb_stash
|
||||
: rts
|
||||
@ -8867,7 +8867,7 @@ L58AD: .byte 0
|
||||
sta updatethumb_stash
|
||||
dec updatethumb_stash
|
||||
lda #MGTK::ctl_vertical_scroll_bar
|
||||
sta updatethumb_params_which_ctl
|
||||
sta updatethumb_which_ctl
|
||||
jsr L5C54
|
||||
lda updatethumb_stash
|
||||
: rts
|
||||
@ -9068,7 +9068,7 @@ L5A2F: ldx L704B
|
||||
lda L704C,x
|
||||
cmp active_window_id
|
||||
beq L5A43
|
||||
sta findwindow_params_window_id
|
||||
sta findwindow_window_id
|
||||
jsr handle_inactive_window_click
|
||||
L5A43: jsr close_window
|
||||
dec L704B
|
||||
@ -9190,11 +9190,11 @@ L5B1B: .byte 0
|
||||
;; Restore event coords (following detect_double_click)
|
||||
ldx #3
|
||||
: lda saved_event_coords,x
|
||||
sta event_params_coords,x
|
||||
sta event_coords,x
|
||||
dex
|
||||
bpl :-
|
||||
|
||||
MGTK_RELAY_CALL MGTK::FindControl, event_params_coords
|
||||
MGTK_RELAY_CALL MGTK::FindControl, event_coords
|
||||
lda findcontrol_which_ctl
|
||||
bne :+
|
||||
jmp handle_content_click ; 0 = ctl_not_a_control
|
||||
@ -9326,7 +9326,7 @@ done_client_click:
|
||||
|
||||
.proc L5C54
|
||||
lda updatethumb_stash
|
||||
sta updatethumb_params_thumbpos
|
||||
sta updatethumb_thumbpos
|
||||
MGTK_RELAY_CALL MGTK::UpdateThumb, updatethumb_params
|
||||
jsr L6523
|
||||
jsr L84D1
|
||||
@ -9347,12 +9347,12 @@ done_client_click:
|
||||
.proc check_control_repeat
|
||||
sta ctl
|
||||
jsr peek_event
|
||||
lda event_params_kind
|
||||
lda event_kind
|
||||
cmp #MGTK::event_kind_drag
|
||||
beq :+
|
||||
bail: return #$FF ; high bit set = not repeating
|
||||
|
||||
: MGTK_RELAY_CALL MGTK::FindControl, event_params_coords
|
||||
: MGTK_RELAY_CALL MGTK::FindControl, event_coords
|
||||
lda findcontrol_which_ctl
|
||||
beq bail
|
||||
cmp #MGTK::ctl_dead_zone
|
||||
@ -9374,7 +9374,7 @@ ctl: .byte 0
|
||||
|
||||
: lda active_window_id
|
||||
sta $D20E
|
||||
DESKTOP_RELAY_CALL DT_FIND_ICON, event_params_coords
|
||||
DESKTOP_RELAY_CALL DT_FIND_ICON, event_coords
|
||||
lda findicon_which_icon
|
||||
bne L5CDA
|
||||
jsr L5F13
|
||||
@ -9577,7 +9577,7 @@ L5E77: .byte 0
|
||||
lda L5F0A
|
||||
cmp active_window_id
|
||||
beq L5E8F
|
||||
sta findwindow_params_window_id
|
||||
sta findwindow_window_id
|
||||
jsr handle_inactive_window_click
|
||||
L5E8F: lda active_window_id
|
||||
sta getwinport_params2::window_id
|
||||
@ -9646,13 +9646,13 @@ L5F0F: .byte 0
|
||||
start: copy16 #notpenXOR, $06
|
||||
jsr L60D5
|
||||
ldx #$03
|
||||
L5F20: lda event_params_coords,x
|
||||
L5F20: lda event_coords,x
|
||||
sta L5F0B,x
|
||||
sta L5F0F,x
|
||||
dex
|
||||
bpl L5F20
|
||||
jsr peek_event
|
||||
lda event_params_kind
|
||||
lda event_kind
|
||||
cmp #MGTK::event_kind_drag
|
||||
beq L5F3F
|
||||
bit BUTN0
|
||||
@ -9675,7 +9675,7 @@ L5F50: lda L5F0B,x
|
||||
jsr set_penmode_xor
|
||||
MGTK_RELAY_CALL MGTK::FrameRect, rect_E230
|
||||
L5F6B: jsr peek_event
|
||||
lda event_params_kind
|
||||
lda event_kind
|
||||
cmp #MGTK::event_kind_drag
|
||||
beq L5FC5
|
||||
MGTK_RELAY_CALL MGTK::FrameRect, rect_E230
|
||||
@ -9706,8 +9706,8 @@ L5FB9: lda icon_param
|
||||
jmp L5F80
|
||||
|
||||
L5FC5: jsr L60D5
|
||||
sub16 event_params_xcoord, L60CF, L60CB
|
||||
sub16 event_params_ycoord, L60D1, L60CD
|
||||
sub16 event_xcoord, L60CF, L60CB
|
||||
sub16 event_ycoord, L60D1, L60CD
|
||||
lda L60CC
|
||||
bpl L5FFE
|
||||
lda L60CB
|
||||
@ -9730,36 +9730,36 @@ L600E: lda L60CB
|
||||
|
||||
L601F: MGTK_RELAY_CALL MGTK::FrameRect, rect_E230
|
||||
ldx #$03
|
||||
L602A: lda event_params_coords,x
|
||||
L602A: lda event_coords,x
|
||||
sta L60CF,x
|
||||
dex
|
||||
bpl L602A
|
||||
cmp16 event_params_xcoord, rect_E230::x2
|
||||
cmp16 event_xcoord, rect_E230::x2
|
||||
bpl L6068
|
||||
cmp16 event_params_xcoord, rect_E230::x1
|
||||
cmp16 event_xcoord, rect_E230::x1
|
||||
bmi L6054
|
||||
bit L60D3
|
||||
bpl L6068
|
||||
L6054: copy16 event_params_xcoord, rect_E230::x1
|
||||
L6054: copy16 event_xcoord, rect_E230::x1
|
||||
lda #$80
|
||||
sta L60D3
|
||||
jmp L6079
|
||||
|
||||
L6068: copy16 event_params_xcoord, rect_E230::x2
|
||||
L6068: copy16 event_xcoord, rect_E230::x2
|
||||
lda #$00
|
||||
sta L60D3
|
||||
L6079: cmp16 event_params_ycoord, rect_E230::y2
|
||||
L6079: cmp16 event_ycoord, rect_E230::y2
|
||||
bpl L60AE
|
||||
cmp16 event_params_ycoord, rect_E230::y1
|
||||
cmp16 event_ycoord, rect_E230::y1
|
||||
bmi L609A
|
||||
bit L60D4
|
||||
bpl L60AE
|
||||
L609A: copy16 event_params_ycoord, rect_E230::y1
|
||||
L609A: copy16 event_ycoord, rect_E230::y1
|
||||
lda #$80
|
||||
sta L60D4
|
||||
jmp L60BF
|
||||
|
||||
L60AE: copy16 event_params_ycoord, rect_E230::y2
|
||||
L60AE: copy16 event_ycoord, rect_E230::y2
|
||||
lda #$00
|
||||
sta L60D4
|
||||
L60BF: MGTK_RELAY_CALL MGTK::FrameRect, rect_E230
|
||||
@ -10561,13 +10561,13 @@ L6893: txa
|
||||
|
||||
L68B3: jsr clear_selection
|
||||
ldx #3
|
||||
L68B8: lda event_params_coords,x
|
||||
L68B8: lda event_coords,x
|
||||
sta rect_E230::x1,x
|
||||
sta rect_E230::x2,x
|
||||
dex
|
||||
bpl L68B8
|
||||
jsr peek_event
|
||||
lda event_params_kind
|
||||
lda event_kind
|
||||
cmp #MGTK::event_kind_drag
|
||||
beq L68CF
|
||||
rts
|
||||
@ -10576,7 +10576,7 @@ L68CF: MGTK_RELAY_CALL MGTK::SetPattern, checkerboard_pattern3
|
||||
jsr set_penmode_xor
|
||||
MGTK_RELAY_CALL MGTK::FrameRect, rect_E230
|
||||
L68E4: jsr peek_event
|
||||
lda event_params_kind
|
||||
lda event_kind
|
||||
cmp #MGTK::event_kind_drag
|
||||
beq L6932
|
||||
MGTK_RELAY_CALL MGTK::FrameRect, rect_E230
|
||||
@ -10603,8 +10603,8 @@ L692C: pla
|
||||
inx
|
||||
jmp L68F9
|
||||
|
||||
L6932: sub16 event_params_xcoord, L6A39, L6A35
|
||||
sub16 event_params_ycoord, L6A3B, L6A37
|
||||
L6932: sub16 event_xcoord, L6A39, L6A35
|
||||
sub16 event_ycoord, L6A3B, L6A37
|
||||
lda L6A36
|
||||
bpl L6968
|
||||
lda L6A35
|
||||
@ -10627,36 +10627,36 @@ L6978: lda L6A35
|
||||
|
||||
L6989: MGTK_RELAY_CALL MGTK::FrameRect, rect_E230
|
||||
ldx #$03
|
||||
L6994: lda event_params_coords,x
|
||||
L6994: lda event_coords,x
|
||||
sta L6A39,x
|
||||
dex
|
||||
bpl L6994
|
||||
cmp16 event_params_xcoord, rect_E230::x2
|
||||
cmp16 event_xcoord, rect_E230::x2
|
||||
bpl L69D2
|
||||
cmp16 event_params_xcoord, rect_E230::x1
|
||||
cmp16 event_xcoord, rect_E230::x1
|
||||
bmi L69BE
|
||||
bit L6A3D
|
||||
bpl L69D2
|
||||
L69BE: copy16 event_params_xcoord, rect_E230::x1
|
||||
L69BE: copy16 event_xcoord, rect_E230::x1
|
||||
lda #$80
|
||||
sta L6A3D
|
||||
jmp L69E3
|
||||
|
||||
L69D2: copy16 event_params_xcoord, rect_E230::x2
|
||||
L69D2: copy16 event_xcoord, rect_E230::x2
|
||||
lda #$00
|
||||
sta L6A3D
|
||||
L69E3: cmp16 event_params_ycoord, rect_E230::y2
|
||||
L69E3: cmp16 event_ycoord, rect_E230::y2
|
||||
bpl L6A18
|
||||
cmp16 event_params_ycoord, rect_E230::y1
|
||||
cmp16 event_ycoord, rect_E230::y1
|
||||
bmi L6A04
|
||||
bit L6A3E
|
||||
bpl L6A18
|
||||
L6A04: copy16 event_params_ycoord, rect_E230::y1
|
||||
L6A04: copy16 event_ycoord, rect_E230::y1
|
||||
lda #$80
|
||||
sta L6A3E
|
||||
jmp L6A29
|
||||
|
||||
L6A18: copy16 event_params_ycoord, rect_E230::y2
|
||||
L6A18: copy16 event_ycoord, rect_E230::y2
|
||||
lda #$00
|
||||
sta L6A3E
|
||||
L6A29: MGTK_RELAY_CALL MGTK::FrameRect, rect_E230
|
||||
@ -11086,9 +11086,9 @@ config_port:
|
||||
|
||||
;; deactivate horizontal scrollbar
|
||||
lda #MGTK::ctl_horizontal_scroll_bar
|
||||
sta activatectl_params_which_ctl
|
||||
sta activatectl_which_ctl
|
||||
lda #MGTK::activatectl_deactivate
|
||||
sta activatectl_params_activate
|
||||
sta activatectl_activate
|
||||
jsr activate_ctl
|
||||
|
||||
jmp check_vscroll
|
||||
@ -11096,9 +11096,9 @@ config_port:
|
||||
activate_hscroll:
|
||||
;; activate horizontal scrollbar
|
||||
lda #MGTK::ctl_horizontal_scroll_bar
|
||||
sta activatectl_params_which_ctl
|
||||
sta activatectl_which_ctl
|
||||
lda #MGTK::activatectl_activate
|
||||
sta activatectl_params_activate
|
||||
sta activatectl_activate
|
||||
jsr activate_ctl
|
||||
jsr update_hthumb
|
||||
|
||||
@ -11111,9 +11111,9 @@ check_vscroll:
|
||||
|
||||
;; deactivate vertical scrollbar
|
||||
lda #MGTK::ctl_vertical_scroll_bar
|
||||
sta activatectl_params_which_ctl
|
||||
sta activatectl_which_ctl
|
||||
lda #MGTK::activatectl_deactivate
|
||||
sta activatectl_params_activate
|
||||
sta activatectl_activate
|
||||
jsr activate_ctl
|
||||
|
||||
rts
|
||||
@ -11121,9 +11121,9 @@ check_vscroll:
|
||||
activate_vscroll:
|
||||
;; activate vertical scrollbar
|
||||
lda #MGTK::ctl_vertical_scroll_bar
|
||||
sta activatectl_params_which_ctl
|
||||
sta activatectl_which_ctl
|
||||
lda #MGTK::activatectl_activate
|
||||
sta activatectl_params_activate
|
||||
sta activatectl_activate
|
||||
jsr activate_ctl
|
||||
jmp update_vthumb
|
||||
|
||||
@ -13532,7 +13532,7 @@ L84D0: .byte 0
|
||||
jsr cached_icons_window_to_screen
|
||||
L84DC: sub16 grafport2::cliprect::x2, grafport2::cliprect::x1, L85F8
|
||||
sub16 grafport2::cliprect::y2, grafport2::cliprect::y1, L85FA
|
||||
lda event_params_kind
|
||||
lda event_kind
|
||||
cmp #MGTK::event_kind_button_down
|
||||
bne L850C
|
||||
asl a
|
||||
@ -13630,7 +13630,7 @@ L85FA: .word 0
|
||||
|
||||
;; Stash initial coords
|
||||
ldx #3
|
||||
: lda event_params_coords,x
|
||||
: lda event_coords,x
|
||||
sta coords,x
|
||||
sta saved_event_coords,x
|
||||
dex
|
||||
@ -13658,7 +13658,7 @@ loop: dec counter
|
||||
lda #$FF ; ???
|
||||
sta unused
|
||||
|
||||
lda event_params_kind
|
||||
lda event_kind
|
||||
sta state ; unused ???
|
||||
|
||||
cmp #MGTK::event_kind_no_event
|
||||
@ -13680,11 +13680,11 @@ exit: return #$FF ; not double-click
|
||||
;; Is the new coord within range of the old coord?
|
||||
.proc check_delta
|
||||
;; compute x delta
|
||||
lda event_params_xcoord
|
||||
lda event_xcoord
|
||||
sec
|
||||
sbc xcoord
|
||||
sta delta
|
||||
lda event_params_xcoord+1
|
||||
lda event_xcoord+1
|
||||
sbc xcoord+1
|
||||
bpl :+
|
||||
|
||||
@ -13700,11 +13700,11 @@ fail: return #$FF
|
||||
bcs fail
|
||||
|
||||
;; compute y delta
|
||||
check_y:lda event_params_ycoord
|
||||
check_y:lda event_ycoord
|
||||
sec
|
||||
sbc ycoord
|
||||
sta delta
|
||||
lda event_params_ycoord+1
|
||||
lda event_ycoord+1
|
||||
sbc ycoord+1
|
||||
bpl :+
|
||||
|
||||
@ -15333,7 +15333,7 @@ found: lda DEVLST,y ;
|
||||
lsr a
|
||||
plp
|
||||
adc #1
|
||||
sta control_params_unit_number
|
||||
sta control_unit_number
|
||||
|
||||
jsr call
|
||||
.byte $04 ; $04 = CONTROL
|
||||
@ -15347,7 +15347,7 @@ unit_number: .byte $0
|
||||
control_list: .addr list
|
||||
control_code: .byte 4 ; Eject disk
|
||||
.endproc
|
||||
control_params_unit_number := control_params::unit_number
|
||||
control_unit_number := control_params::unit_number
|
||||
list: .word 0 ; 0 items in list
|
||||
unit_num:
|
||||
.byte 0
|
||||
@ -17138,10 +17138,10 @@ start: yax_call JT_MLI_RELAY, CLOSE, close_params
|
||||
|
||||
.proc check_escape_key_down
|
||||
yax_call JT_MGTK_RELAY, MGTK::GetEvent, event_params
|
||||
lda event_params_kind
|
||||
lda event_kind
|
||||
cmp #MGTK::event_kind_key_down
|
||||
bne nope
|
||||
lda event_params_key
|
||||
lda event_key
|
||||
cmp #CHAR_ESCAPE
|
||||
bne nope
|
||||
lda #$FF
|
||||
@ -17241,13 +17241,13 @@ not_found:
|
||||
: lda #$FC ; "Please insert source disk"
|
||||
show: jsr JT_SHOW_ALERT0
|
||||
bne LA4C2
|
||||
jmp do_online
|
||||
jmp do_on_line
|
||||
|
||||
LA4C2: jmp LA39F
|
||||
|
||||
flag: .byte 0
|
||||
|
||||
do_online:
|
||||
do_on_line:
|
||||
yax_call JT_MLI_RELAY, ON_LINE, on_line_params2
|
||||
rts
|
||||
|
||||
@ -17333,7 +17333,7 @@ dialog_param_addr:
|
||||
lda #$14
|
||||
sta LD8E9
|
||||
: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
||||
lda event_params_kind
|
||||
lda event_kind
|
||||
cmp #MGTK::event_kind_button_down
|
||||
bne :+
|
||||
jmp prompt_click_handler
|
||||
@ -17344,8 +17344,8 @@ dialog_param_addr:
|
||||
|
||||
: lda LD8E8
|
||||
beq prompt_input_loop
|
||||
MGTK_RELAY_CALL MGTK::FindWindow, event_params_coords
|
||||
lda findwindow_params_which_area
|
||||
MGTK_RELAY_CALL MGTK::FindWindow, event_coords
|
||||
lda findwindow_which_area
|
||||
bne :+
|
||||
jmp prompt_input_loop
|
||||
|
||||
@ -17379,8 +17379,8 @@ done: jsr reset_state
|
||||
prompt_button_all := 4
|
||||
|
||||
.proc prompt_click_handler
|
||||
MGTK_RELAY_CALL MGTK::FindWindow, event_params_coords
|
||||
lda findwindow_params_which_area
|
||||
MGTK_RELAY_CALL MGTK::FindWindow, event_coords
|
||||
lda findwindow_which_area
|
||||
bne :+
|
||||
return #$FF
|
||||
: cmp #MGTK::area_content
|
||||
@ -17389,7 +17389,7 @@ done: jsr reset_state
|
||||
: return #$FF
|
||||
|
||||
content:
|
||||
lda findwindow_params_window_id
|
||||
lda findwindow_window_id
|
||||
cmp winfoF
|
||||
beq :+
|
||||
return #$FF
|
||||
@ -17478,10 +17478,10 @@ LA6F7: jsr LB9B8
|
||||
;;; Key handler for prompt dialog
|
||||
|
||||
.proc prompt_key_handler
|
||||
lda event_params_modifiers
|
||||
lda event_modifiers
|
||||
cmp #MGTK::event_modifier_solid_apple
|
||||
bne LA71A
|
||||
lda event_params_key
|
||||
lda event_key
|
||||
and #$7F
|
||||
cmp #CHAR_LEFT
|
||||
bne LA710
|
||||
@ -17493,7 +17493,7 @@ LA710: cmp #CHAR_RIGHT
|
||||
|
||||
LA717: return #$FF
|
||||
|
||||
LA71A: lda event_params_key
|
||||
LA71A: lda event_key
|
||||
and #$7F
|
||||
cmp #CHAR_LEFT
|
||||
bne LA72E
|
||||
@ -17690,12 +17690,12 @@ jump_relay:
|
||||
copy16 #dialog_label_default_x, dialog_label_pos
|
||||
|
||||
: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
||||
lda event_params_kind
|
||||
lda event_kind
|
||||
cmp #MGTK::event_kind_button_down
|
||||
beq close
|
||||
cmp #MGTK::event_kind_key_down
|
||||
bne :-
|
||||
lda event_params_key
|
||||
lda event_key
|
||||
and #$7F
|
||||
cmp #CHAR_ESCAPE
|
||||
beq close
|
||||
@ -18734,7 +18734,7 @@ set_penmode_xor2:
|
||||
rts
|
||||
|
||||
ldx #$03
|
||||
LB447: lda event_params_coords,x
|
||||
LB447: lda event_coords,x
|
||||
sta LB502,x
|
||||
dex
|
||||
bpl LB447
|
||||
@ -18758,7 +18758,7 @@ LB476: MGTK_RELAY_CALL MGTK::PeekEvent, event_params
|
||||
bmi LB4B7
|
||||
lda #$FF
|
||||
sta LB508
|
||||
lda event_params_kind
|
||||
lda event_kind
|
||||
sta LB507
|
||||
cmp #MGTK::event_kind_no_event
|
||||
beq LB45F
|
||||
@ -18776,11 +18776,11 @@ LB4A7: cmp #$01
|
||||
|
||||
LB4B7: return #$FF
|
||||
|
||||
LB4BA: lda event_params_xcoord
|
||||
LB4BA: lda event_xcoord
|
||||
sec
|
||||
sbc LB502
|
||||
sta LB506
|
||||
lda event_params_xcoord+1
|
||||
lda event_xcoord+1
|
||||
sbc LB503
|
||||
bpl LB4D6
|
||||
lda LB506
|
||||
@ -18791,11 +18791,11 @@ LB4D3: return #$FF
|
||||
LB4D6: lda LB506
|
||||
cmp #$05
|
||||
bcs LB4D3
|
||||
LB4DD: lda event_params_ycoord
|
||||
LB4DD: lda event_ycoord
|
||||
sec
|
||||
sbc LB504
|
||||
sta LB506
|
||||
lda event_params_ycoord+1
|
||||
lda event_ycoord+1
|
||||
sbc LB505
|
||||
bpl LB4F6
|
||||
lda LB506
|
||||
@ -19188,7 +19188,7 @@ event_loop:
|
||||
lda #0
|
||||
sta down_flag
|
||||
loop: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
||||
lda event_params_kind
|
||||
lda event_kind
|
||||
cmp #MGTK::event_kind_button_up
|
||||
beq exit
|
||||
lda winfoF
|
||||
@ -20352,15 +20352,15 @@ dx: .word 0
|
||||
beq :+
|
||||
jmp L0D0A
|
||||
|
||||
: lda get_file_info_params_type
|
||||
: lda get_file_info_type
|
||||
cmp #FT_DIRECTORY
|
||||
beq L0BC3
|
||||
jmp L0D0A
|
||||
|
||||
L0BC3: MLI_RELAY_CALL OPEN, open_params
|
||||
lda open_params_ref_num
|
||||
sta read_params_ref_num
|
||||
sta close_params_ref_num
|
||||
lda open_ref_num
|
||||
sta read_ref_num
|
||||
sta close_ref_num
|
||||
MLI_RELAY_CALL READ, read_params
|
||||
lda #$00
|
||||
sta L0D04
|
||||
@ -20464,18 +20464,18 @@ L0CCB: MLI_RELAY_CALL CLOSE, close_params
|
||||
jmp L0D0A
|
||||
|
||||
DEFINE_OPEN_PARAMS open_params, str_desk_acc, $1000
|
||||
open_params_ref_num := open_params::ref_num
|
||||
open_ref_num := open_params::ref_num
|
||||
|
||||
DEFINE_READ_PARAMS read_params, $1400, $200
|
||||
read_params_ref_num := read_params::ref_num
|
||||
read_ref_num := read_params::ref_num
|
||||
|
||||
DEFINE_GET_FILE_INFO_PARAMS get_file_info_params, str_desk_acc
|
||||
get_file_info_params_type := get_file_info_params::file_type
|
||||
get_file_info_type := get_file_info_params::file_type
|
||||
|
||||
.byte 0
|
||||
|
||||
DEFINE_CLOSE_PARAMS close_params
|
||||
close_params_ref_num := close_params::ref_num
|
||||
close_ref_num := close_params::ref_num
|
||||
|
||||
str_desk_acc:
|
||||
PASCAL_STRING "Desk.acc"
|
||||
|
@ -24,60 +24,22 @@ start:
|
||||
|
||||
default_start_address := $2000
|
||||
|
||||
.proc set_prefix_params
|
||||
params: .byte 1
|
||||
path: .addr PREFIX
|
||||
.endproc
|
||||
DEFINE_SET_PREFIX_PARAMS set_prefix_params, PREFIX
|
||||
|
||||
prefix_length:
|
||||
.byte 0
|
||||
|
||||
.proc open_params
|
||||
params: .byte 3
|
||||
path: .addr FILENAME
|
||||
buffer: .addr $800
|
||||
ref_num:.byte 1
|
||||
.endproc
|
||||
|
||||
.proc read_params
|
||||
params: .byte 4
|
||||
ref_num:.byte 0
|
||||
buffer: .addr default_start_address
|
||||
request:.word $9F00
|
||||
trans: .word 0
|
||||
.endproc
|
||||
|
||||
.proc close_params
|
||||
params: .byte 1
|
||||
ref_nun:.byte 0
|
||||
.endproc
|
||||
|
||||
.proc get_info_params
|
||||
params: .byte $A
|
||||
path: .addr FILENAME
|
||||
access: .byte 0
|
||||
type: .byte 0
|
||||
auxtype:.word 0
|
||||
storage:.byte 0
|
||||
blocks: .word 0
|
||||
mod_date: .word 0
|
||||
mod_time: .word 0
|
||||
create_date: .word 0
|
||||
create_time: .word 0
|
||||
.endproc
|
||||
DEFINE_OPEN_PARAMS open_params, FILENAME, $800, 1
|
||||
DEFINE_READ_PARAMS read_params, default_start_address, $9F00
|
||||
DEFINE_CLOSE_PARAMS close_params
|
||||
DEFINE_GET_FILE_INFO_PARAMS get_info_params, FILENAME
|
||||
|
||||
.res 3
|
||||
|
||||
bs_path:
|
||||
PASCAL_STRING "BASIC.SYSTEM"
|
||||
|
||||
.proc quit_params
|
||||
params: .byte 4
|
||||
.byte $EE ; nonstandard ???
|
||||
.word FILENAME ; nonstandard ???
|
||||
.byte 0
|
||||
.word 0
|
||||
.endproc
|
||||
DEFINE_QUIT_PARAMS quit_params, $EE, FILENAME
|
||||
|
||||
;;; ==================================================
|
||||
|
||||
@ -113,7 +75,7 @@ begin: lda ROMIN2
|
||||
MLI_CALL GET_FILE_INFO, get_info_params
|
||||
beq :+
|
||||
jmp exit
|
||||
: lda get_info_params::type
|
||||
: lda get_info_params::file_type
|
||||
cmp #FT_S16
|
||||
bne not_s16
|
||||
jsr update_bitmap
|
||||
@ -122,19 +84,19 @@ not_s16:
|
||||
|
||||
cmp #FT_BINARY
|
||||
bne not_binary
|
||||
lda get_info_params::auxtype
|
||||
lda get_info_params::aux_type
|
||||
sta jmp_addr
|
||||
sta read_params::buffer
|
||||
lda get_info_params::auxtype+1
|
||||
sta read_params::data_buffer
|
||||
lda get_info_params::aux_type+1
|
||||
sta jmp_addr+1
|
||||
sta read_params::buffer+1
|
||||
sta read_params::data_buffer+1
|
||||
cmp #$0C ; If loading at page < $0C
|
||||
bcs :+
|
||||
lda #$BB ; ... use a high address buffer ($BB)
|
||||
sta open_params::buffer+1
|
||||
sta open_params::io_buffer+1
|
||||
bne load_target ; always
|
||||
: lda #$08 ; ... otherwise a low address buffer ($08)
|
||||
sta open_params::buffer+1
|
||||
sta open_params::io_buffer+1
|
||||
bne load_target ; always
|
||||
not_binary:
|
||||
|
||||
@ -142,7 +104,7 @@ not_binary:
|
||||
bne load_target
|
||||
|
||||
;; Invoke BASIC.SYSTEM as path instead.
|
||||
copy16 #bs_path, open_params::path
|
||||
copy16 #bs_path, open_params::pathname
|
||||
|
||||
;; Try opening BASIC.SYSTEM with current prefix.
|
||||
check_for_bs:
|
||||
@ -180,7 +142,7 @@ do_read:
|
||||
bne exit
|
||||
|
||||
;; If it's BASIC, set prefix and copy filename to interpreter buffer.
|
||||
lda get_info_params::type
|
||||
lda get_info_params::file_type
|
||||
cmp #FT_BASIC
|
||||
bne update_stack
|
||||
jsr set_prefix
|
||||
|
112
desktop/mgtk.s
112
desktop/mgtk.s
@ -3512,7 +3512,7 @@ store_xa_at_params:
|
||||
ldy #0
|
||||
|
||||
;; Store result (X,A) at params+Y
|
||||
store_xa_at_params_y:
|
||||
store_xa_at_y:
|
||||
sta (params_addr),y
|
||||
txa
|
||||
iny
|
||||
@ -4160,14 +4160,14 @@ L6348: lda $82,x
|
||||
stx fill_rect_params2_height
|
||||
inx
|
||||
stx L78CD
|
||||
stx test_rect_params_bottom
|
||||
stx test_rect_bottom
|
||||
stx test_rect_params2_top
|
||||
stx fill_rect_params4_top
|
||||
inx
|
||||
stx set_port_params_top
|
||||
stx set_port_top
|
||||
stx L78CF
|
||||
stx L6594
|
||||
stx fill_rect_params_top
|
||||
stx fill_rect_top
|
||||
dex
|
||||
stx menu_item_y_table
|
||||
clc
|
||||
@ -4426,7 +4426,7 @@ top: .word 0
|
||||
right: .word 559
|
||||
bottom: .word 191
|
||||
.endproc
|
||||
fill_rect_params_top := fill_rect_params::top
|
||||
fill_rect_top := fill_rect_params::top
|
||||
|
||||
.byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
|
||||
@ -4459,7 +4459,7 @@ checkerboard_pattern:
|
||||
|
||||
ldax mouse_state_addr
|
||||
ldy #2
|
||||
jmp store_xa_at_params_y
|
||||
jmp store_xa_at_y
|
||||
|
||||
fail: lda #$95
|
||||
jmp exit_with_a
|
||||
@ -4813,8 +4813,8 @@ top: .word $ffff
|
||||
right: .word $230
|
||||
bottom: .word $C
|
||||
.endproc
|
||||
test_rect_params_top := test_rect_params::top
|
||||
test_rect_params_bottom := test_rect_params::bottom
|
||||
test_rect_top := test_rect_params::top
|
||||
test_rect_bottom := test_rect_params::bottom
|
||||
|
||||
.proc fill_rect_params2
|
||||
left: .word 0
|
||||
@ -5857,19 +5857,19 @@ resize_box_bitmap:
|
||||
.byte px(%1000000),px(%0000000),px(%0000001)
|
||||
.byte px(%1111111),px(%1111111),px(%1111111)
|
||||
|
||||
up_scroll_params_addr:
|
||||
up_scroll_addr:
|
||||
.addr up_scroll_params
|
||||
|
||||
down_scroll_params_addr:
|
||||
down_scroll_addr:
|
||||
.addr down_scroll_params
|
||||
|
||||
left_scroll_params_addr:
|
||||
left_scroll_addr:
|
||||
.addr left_scroll_params
|
||||
|
||||
right_scroll_params_addr:
|
||||
right_scroll_addr:
|
||||
.addr right_scroll_params
|
||||
|
||||
resize_box_params_addr:
|
||||
resize_box_addr:
|
||||
.addr resize_box_params
|
||||
|
||||
L700B: .byte $00
|
||||
@ -6252,9 +6252,9 @@ L72F8: pla
|
||||
L72FF: pha
|
||||
L7300: pla
|
||||
stax down_scroll_params::unk1
|
||||
ldax down_scroll_params_addr
|
||||
ldax down_scroll_addr
|
||||
jsr L791C
|
||||
ldax up_scroll_params_addr
|
||||
ldax up_scroll_addr
|
||||
jsr L791C
|
||||
L7319: bit $AF
|
||||
bpl L7363
|
||||
@ -6284,9 +6284,9 @@ L7342: pla
|
||||
L7349: pha
|
||||
L734A: pla
|
||||
stax right_scroll_params
|
||||
ldax right_scroll_params_addr
|
||||
ldax right_scroll_addr
|
||||
jsr L791C
|
||||
ldax left_scroll_params_addr
|
||||
ldax left_scroll_addr
|
||||
jsr L791C
|
||||
L7363: lda #$00
|
||||
jsr set_fill_mode
|
||||
@ -6324,7 +6324,7 @@ L73A8: lda $C7,x
|
||||
bpl L73A8
|
||||
lda #$04
|
||||
jsr set_fill_mode
|
||||
ldax resize_box_params_addr
|
||||
ldax resize_box_addr
|
||||
jsr L791C
|
||||
L73BE: rts
|
||||
|
||||
@ -6377,7 +6377,7 @@ L7408: pha
|
||||
tax
|
||||
pla
|
||||
ldy #$04
|
||||
jmp store_xa_at_params_y
|
||||
jmp store_xa_at_y
|
||||
|
||||
L7416: lda #$00
|
||||
sta L747A
|
||||
@ -6510,7 +6510,7 @@ L74F4: ldy #next_offset_in_window_params ; Called from elsewhere
|
||||
jsr window_by_id_or_exit
|
||||
ldax ptr
|
||||
ldy #1
|
||||
jmp store_xa_at_params_y
|
||||
jmp store_xa_at_y
|
||||
.endproc
|
||||
|
||||
;;; ==================================================
|
||||
@ -6828,7 +6828,7 @@ L774B: lda ($A9),y
|
||||
cpy #$0B
|
||||
bne L774B
|
||||
ldx #$00
|
||||
stx set_input_params_unk
|
||||
stx set_input_unk
|
||||
bit drag_resize_flag
|
||||
bmi L777D
|
||||
L775F: lda $B7,x
|
||||
@ -6923,7 +6923,7 @@ L77F4: sta L769F,x
|
||||
bpl L77E4
|
||||
cpy #$04
|
||||
bne L7814
|
||||
lda set_input_params_unk
|
||||
lda set_input_unk
|
||||
L7814: rts
|
||||
|
||||
;;; ==================================================
|
||||
@ -6972,10 +6972,10 @@ L7854: lda $C7,x
|
||||
jsr L50A9
|
||||
ldx #$03
|
||||
L7860: lda $92,x
|
||||
sta set_port_params_maprect,x
|
||||
sta set_port_maprect,x
|
||||
sta set_port_params,x
|
||||
lda $96,x
|
||||
sta set_port_params_size,x
|
||||
sta set_port_size,x
|
||||
dex
|
||||
bpl L7860
|
||||
rts
|
||||
@ -6989,7 +6989,7 @@ L7872: sta L7010
|
||||
lda #$00
|
||||
jsr set_fill_mode
|
||||
MGTK_CALL MGTK::SetPattern, checkerboard_pattern
|
||||
MGTK_CALL MGTK::PaintRect, set_port_params_maprect
|
||||
MGTK_CALL MGTK::PaintRect, set_port_maprect
|
||||
jsr L6553
|
||||
jsr top_window
|
||||
beq L78CA
|
||||
@ -7031,9 +7031,9 @@ voffset: .word 0
|
||||
width: .word 0
|
||||
height: .word 0
|
||||
.endproc
|
||||
set_port_params_top := set_port_params::top
|
||||
set_port_params_size := set_port_params::width
|
||||
set_port_params_maprect := set_port_params::hoffset ; Re-used since h/voff are 0
|
||||
set_port_top := set_port_params::top
|
||||
set_port_size := set_port_params::width
|
||||
set_port_maprect := set_port_params::hoffset ; Re-used since h/voff are 0
|
||||
|
||||
;;; ==================================================
|
||||
;;; WindowToScreen
|
||||
@ -7537,7 +7537,7 @@ L7C87: ldx #$01
|
||||
bne L7C8E
|
||||
dex
|
||||
L7C8E: ldy #$05
|
||||
jmp store_xa_at_params_y
|
||||
jmp store_xa_at_y
|
||||
|
||||
L7C93: sta $82
|
||||
sty $83
|
||||
@ -7782,13 +7782,13 @@ L7EA3: lda mouse_x,x
|
||||
bpl L7EA3
|
||||
rts
|
||||
|
||||
L7EAD: jsr stash_params_addr
|
||||
L7EAD: jsr stash_addr
|
||||
lda L7F2E
|
||||
sta params_addr
|
||||
lda L7F2F
|
||||
sta params_addr+1
|
||||
jsr SetCursorImpl
|
||||
jsr restore_params_addr
|
||||
jsr restore_addr
|
||||
lda #$00
|
||||
sta L7D74
|
||||
lda #$40
|
||||
@ -7797,7 +7797,7 @@ L7EAD: jsr stash_params_addr
|
||||
|
||||
L7ECD: lda #$00
|
||||
sta L7D81
|
||||
sta set_input_params_unk
|
||||
sta set_input_unk
|
||||
rts
|
||||
|
||||
;; Look at buttons (apple keys), compute modifiers in A
|
||||
@ -7813,7 +7813,7 @@ L7ECD: lda #$00
|
||||
.endproc
|
||||
|
||||
L7EE2: jsr compute_modifiers
|
||||
sta set_input_params_modifiers
|
||||
sta set_input_modifiers
|
||||
L7EE8: clc
|
||||
lda KBD
|
||||
bpl L7EF4
|
||||
@ -7836,7 +7836,7 @@ L7EFB: cmp #$04
|
||||
|
||||
L7F0C: jmp L825F
|
||||
|
||||
L7F0F: jsr stash_params_addr
|
||||
L7F0F: jsr stash_addr
|
||||
lda active_cursor
|
||||
sta L7F2E
|
||||
lda active_cursor+1
|
||||
@ -7846,26 +7846,26 @@ L7F0F: jsr stash_params_addr
|
||||
lda L6066
|
||||
sta params_addr+1
|
||||
jsr SetCursorImpl
|
||||
jmp restore_params_addr
|
||||
jmp restore_addr
|
||||
|
||||
L7F2E: .byte 0
|
||||
L7F2F: .byte 0
|
||||
|
||||
stash_params_addr:
|
||||
stash_addr:
|
||||
lda params_addr
|
||||
sta stashed_params_addr
|
||||
sta stashed_addr
|
||||
lda params_addr+1
|
||||
sta stashed_params_addr+1
|
||||
sta stashed_addr+1
|
||||
rts
|
||||
|
||||
restore_params_addr:
|
||||
lda stashed_params_addr
|
||||
restore_addr:
|
||||
lda stashed_addr
|
||||
sta params_addr
|
||||
lda stashed_params_addr+1
|
||||
lda stashed_addr+1
|
||||
sta params_addr+1
|
||||
rts
|
||||
|
||||
stashed_params_addr: .addr 0
|
||||
stashed_addr: .addr 0
|
||||
|
||||
L7F48: jsr compute_modifiers
|
||||
ror a
|
||||
@ -8096,7 +8096,7 @@ L810F: rts
|
||||
.endproc
|
||||
|
||||
L8110: sta $C9
|
||||
lda set_input_params_modifiers
|
||||
lda set_input_modifiers
|
||||
and #$03
|
||||
sta $CA
|
||||
lda L6BD9
|
||||
@ -8274,17 +8274,17 @@ L827A: cmp #$0D
|
||||
jmp L7EAD
|
||||
|
||||
L8281: pha
|
||||
lda set_input_params_modifiers
|
||||
lda set_input_modifiers
|
||||
beq L828C
|
||||
ora #$80
|
||||
sta set_input_params_modifiers
|
||||
sta set_input_modifiers
|
||||
L828C: pla
|
||||
ldx #$C0
|
||||
stx mouse_status
|
||||
L8292: cmp #$0B
|
||||
bne L82A2
|
||||
lda #$F8
|
||||
bit set_input_params_modifiers
|
||||
bit set_input_modifiers
|
||||
bpl L829F
|
||||
lda #$D0
|
||||
L829F: jmp L823D
|
||||
@ -8292,7 +8292,7 @@ L829F: jmp L823D
|
||||
L82A2: cmp #$0A
|
||||
bne L82B2
|
||||
lda #$08
|
||||
bit set_input_params_modifiers
|
||||
bit set_input_modifiers
|
||||
bpl L82AF
|
||||
lda #$30
|
||||
L82AF: jmp L823D
|
||||
@ -8303,7 +8303,7 @@ L82B2: cmp #$15
|
||||
bcc L82EA
|
||||
clc
|
||||
lda #$08
|
||||
bit set_input_params_modifiers
|
||||
bit set_input_modifiers
|
||||
bpl L82C5
|
||||
lda #$40
|
||||
L82C5: adc L7D75
|
||||
@ -8328,7 +8328,7 @@ L82ED: cmp #$08
|
||||
jsr L8352
|
||||
bcc L831A
|
||||
lda L7D75
|
||||
bit set_input_params_modifiers
|
||||
bit set_input_modifiers
|
||||
bpl L8303
|
||||
sbc #$40
|
||||
jmp L8305
|
||||
@ -8344,13 +8344,13 @@ L8305: sta L7D75
|
||||
sta L7D76
|
||||
L831A: jmp L7E98
|
||||
|
||||
L831D: sta set_input_params_key
|
||||
L831D: sta set_input_key
|
||||
ldx #sizeof_grafport-1
|
||||
L8322: lda $A7,x
|
||||
sta $0600,x
|
||||
dex
|
||||
bpl L8322
|
||||
lda set_input_params_key
|
||||
lda set_input_key
|
||||
jsr L8110
|
||||
php
|
||||
ldx #sizeof_grafport-1
|
||||
@ -8376,9 +8376,9 @@ modifiers:
|
||||
.byte 0
|
||||
unk: .byte 0
|
||||
.endproc
|
||||
set_input_params_key := set_input_params::key
|
||||
set_input_params_modifiers := set_input_params::modifiers
|
||||
set_input_params_unk := set_input_params::unk
|
||||
set_input_key := set_input_params::key
|
||||
set_input_modifiers := set_input_params::modifiers
|
||||
set_input_unk := set_input_params::unk
|
||||
|
||||
L8352: lda L7D74
|
||||
cmp #$04
|
||||
@ -8440,7 +8440,7 @@ L83B5: jsr L70B7
|
||||
sbc $C8
|
||||
beq L83C6
|
||||
ldx #$FF
|
||||
L83C6: bit set_input_params_modifiers
|
||||
L83C6: bit set_input_modifiers
|
||||
bpl L83D1
|
||||
cpx #$64
|
||||
bcc L83D7
|
||||
@ -8462,7 +8462,7 @@ L83E2: sec
|
||||
L83E8: sta L769B
|
||||
bcs L83F0
|
||||
dec L769C
|
||||
L83F0: inc set_input_params_unk
|
||||
L83F0: inc set_input_unk
|
||||
clc
|
||||
rts
|
||||
|
||||
|
114
desktop/ovl4.s
114
desktop/ovl4.s
@ -23,16 +23,16 @@ notpenBIC := $D207
|
||||
|
||||
|
||||
event_params := $D208
|
||||
event_params_kind := event_params + 0
|
||||
event_kind := event_params + 0
|
||||
;; if kind is key_down
|
||||
event_params_key := event_params + 1
|
||||
event_params_modifiers := event_params + 2
|
||||
event_key := event_params + 1
|
||||
event_modifiers := event_params + 2
|
||||
;; if kind is no_event, button_down/up, drag, or apple_key:
|
||||
event_params_coords := event_params + 1
|
||||
event_params_xcoord := event_params + 1
|
||||
event_params_ycoord := event_params + 3
|
||||
event_coords := event_params + 1
|
||||
event_xcoord := event_params + 1
|
||||
event_ycoord := event_params + 3
|
||||
;; if kind is update:
|
||||
event_params_window_id := event_params + 1
|
||||
event_window_id := event_params + 1
|
||||
|
||||
screentowindow_params := event_params
|
||||
screentowindow_window_id := screentowindow_params + 0
|
||||
@ -40,28 +40,28 @@ screentowindow_screenx := screentowindow_params + 1
|
||||
screentowindow_screeny := screentowindow_params + 3
|
||||
screentowindow_windowx := screentowindow_params + 5
|
||||
screentowindow_windowy := screentowindow_params + 7
|
||||
.assert screentowindow_screenx = event_params_xcoord, error, "param mismatch"
|
||||
.assert screentowindow_screeny = event_params_ycoord, error, "param mismatch"
|
||||
.assert screentowindow_screenx = event_xcoord, error, "param mismatch"
|
||||
.assert screentowindow_screeny = event_ycoord, error, "param mismatch"
|
||||
|
||||
findwindow_params := event_params + 1 ; offset to x/y overlap event_params x/y
|
||||
findwindow_params_mousex := findwindow_params + 0
|
||||
findwindow_params_mousey := findwindow_params + 2
|
||||
findwindow_params_which_area := findwindow_params + 4
|
||||
findwindow_params_window_id := findwindow_params + 5
|
||||
.assert findwindow_params_mousex = event_params_xcoord, error, "param mismatch"
|
||||
.assert findwindow_params_mousey = event_params_ycoord, error, "param mismatch"
|
||||
findwindow_mousex := findwindow_params + 0
|
||||
findwindow_mousey := findwindow_params + 2
|
||||
findwindow_which_area := findwindow_params + 4
|
||||
findwindow_window_id := findwindow_params + 5
|
||||
.assert findwindow_mousex = event_xcoord, error, "param mismatch"
|
||||
.assert findwindow_mousey = event_ycoord, error, "param mismatch"
|
||||
|
||||
findcontrol_params := event_params + 1 ; offset to x/y overlap event_params x/y
|
||||
findcontrol_params_mousex := findcontrol_params + 0
|
||||
findcontrol_params_mousey := findcontrol_params + 2
|
||||
findcontrol_mousex := findcontrol_params + 0
|
||||
findcontrol_mousey := findcontrol_params + 2
|
||||
findcontrol_which_ctl := findcontrol_params + 4
|
||||
findcontrol_which_part := findcontrol_params + 5
|
||||
.assert findcontrol_params_mousex = event_params_xcoord, error, "param mismatch"
|
||||
.assert findcontrol_params_mousey = event_params_ycoord, error, "param mismatch"
|
||||
.assert findcontrol_mousex = event_xcoord, error, "param mismatch"
|
||||
.assert findcontrol_mousey = event_ycoord, error, "param mismatch"
|
||||
|
||||
activatectl_params := event_params
|
||||
activatectl_params_which_ctl := activatectl_params
|
||||
activatectl_params_activate := activatectl_params + 1
|
||||
activatectl_which_ctl := activatectl_params
|
||||
activatectl_activate := activatectl_params + 1
|
||||
|
||||
trackthumb_params := event_params
|
||||
trackthumb_which_ctl := trackthumb_params
|
||||
@ -69,12 +69,12 @@ trackthumb_mousex := trackthumb_params + 1
|
||||
trackthumb_mousey := trackthumb_params + 3
|
||||
trackthumb_thumbpos := trackthumb_params + 5
|
||||
trackthumb_thumbmoved := trackthumb_params + 6
|
||||
.assert trackthumb_mousex = event_params_xcoord, error, "param mismatch"
|
||||
.assert trackthumb_mousey = event_params_ycoord, error, "param mismatch"
|
||||
.assert trackthumb_mousex = event_xcoord, error, "param mismatch"
|
||||
.assert trackthumb_mousey = event_ycoord, error, "param mismatch"
|
||||
|
||||
updatethumb_params := event_params
|
||||
updatethumb_params_which_ctl := updatethumb_params
|
||||
updatethumb_params_thumbpos := updatethumb_params + 1
|
||||
updatethumb_which_ctl := updatethumb_params
|
||||
updatethumb_thumbpos := updatethumb_params + 1
|
||||
updatethumb_stash := updatethumb_params + 5 ; not part of struct
|
||||
|
||||
;;; ============================================================
|
||||
@ -173,7 +173,7 @@ L5106: bit $D8EC
|
||||
lda #$14
|
||||
sta $D8E9
|
||||
L5118: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
||||
lda event_params_kind
|
||||
lda event_kind
|
||||
cmp #MGTK::event_kind_button_down
|
||||
bne :+
|
||||
jsr L51AF
|
||||
@ -183,10 +183,10 @@ L5118: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
||||
bne :+
|
||||
jsr L59B9
|
||||
: MGTK_RELAY_CALL MGTK::FindWindow, findwindow_params
|
||||
lda findwindow_params_which_area
|
||||
lda findwindow_which_area
|
||||
bne :+
|
||||
jmp L5106
|
||||
: lda findwindow_params_window_id
|
||||
: lda findwindow_window_id
|
||||
cmp $D5B7
|
||||
beq L5151
|
||||
jmp L5106
|
||||
@ -216,7 +216,7 @@ L5199: MGTK_RELAY_CALL MGTK::InitPort, $D239
|
||||
|
||||
L51AE: .byte 0
|
||||
L51AF: MGTK_RELAY_CALL MGTK::FindWindow, findwindow_params
|
||||
lda findwindow_params_which_area
|
||||
lda findwindow_which_area
|
||||
bne L51BE
|
||||
rts
|
||||
|
||||
@ -461,9 +461,9 @@ L5488: lda #MGTK::ctl_vertical_scroll_bar
|
||||
bne :+
|
||||
rts
|
||||
: lda trackthumb_thumbpos
|
||||
sta updatethumb_params_thumbpos
|
||||
sta updatethumb_thumbpos
|
||||
lda #MGTK::ctl_vertical_scroll_bar
|
||||
sta updatethumb_params_which_ctl
|
||||
sta updatethumb_which_ctl
|
||||
MGTK_RELAY_CALL MGTK::UpdateThumb, updatethumb_params
|
||||
lda $D20D
|
||||
jsr L6227
|
||||
@ -475,11 +475,11 @@ L54BA: lda $D5FA
|
||||
sbc #$09
|
||||
bpl L54C4
|
||||
lda #$00
|
||||
L54C4: sta updatethumb_params_thumbpos
|
||||
L54C4: sta updatethumb_thumbpos
|
||||
lda #MGTK::ctl_vertical_scroll_bar
|
||||
sta updatethumb_params_which_ctl
|
||||
sta updatethumb_which_ctl
|
||||
MGTK_RELAY_CALL MGTK::UpdateThumb, updatethumb_params
|
||||
lda updatethumb_params_thumbpos
|
||||
lda updatethumb_thumbpos
|
||||
jsr L6227
|
||||
jsr L606D
|
||||
rts
|
||||
@ -491,11 +491,11 @@ L54DF: lda $D5FA
|
||||
beq L54EF
|
||||
bcc L54EF
|
||||
lda $177F
|
||||
L54EF: sta updatethumb_params_thumbpos
|
||||
L54EF: sta updatethumb_thumbpos
|
||||
lda #MGTK::ctl_vertical_scroll_bar
|
||||
sta updatethumb_params_which_ctl
|
||||
sta updatethumb_which_ctl
|
||||
MGTK_RELAY_CALL MGTK::UpdateThumb, updatethumb_params
|
||||
lda updatethumb_params_thumbpos
|
||||
lda updatethumb_thumbpos
|
||||
jsr L6227
|
||||
jsr L606D
|
||||
rts
|
||||
@ -506,11 +506,11 @@ L550A: lda $D5FA
|
||||
|
||||
L5510: sec
|
||||
sbc #$01
|
||||
sta updatethumb_params_thumbpos
|
||||
sta updatethumb_thumbpos
|
||||
lda #MGTK::ctl_vertical_scroll_bar
|
||||
sta updatethumb_params_which_ctl
|
||||
sta updatethumb_which_ctl
|
||||
MGTK_RELAY_CALL MGTK::UpdateThumb, updatethumb_params
|
||||
lda updatethumb_params_thumbpos
|
||||
lda updatethumb_thumbpos
|
||||
jsr L6227
|
||||
jsr L606D
|
||||
jsr L555F
|
||||
@ -523,18 +523,18 @@ L5533: lda $D5FA
|
||||
|
||||
L553C: clc
|
||||
adc #$01
|
||||
sta updatethumb_params_thumbpos
|
||||
sta updatethumb_thumbpos
|
||||
lda #MGTK::ctl_vertical_scroll_bar
|
||||
sta updatethumb_params_which_ctl
|
||||
sta updatethumb_which_ctl
|
||||
MGTK_RELAY_CALL MGTK::UpdateThumb, updatethumb_params
|
||||
lda updatethumb_params_thumbpos
|
||||
lda updatethumb_thumbpos
|
||||
jsr L6227
|
||||
jsr L606D
|
||||
jsr L555F
|
||||
jmp L5533
|
||||
|
||||
L555F: MGTK_RELAY_CALL MGTK::PeekEvent, event_params
|
||||
lda event_params_kind
|
||||
lda event_kind
|
||||
cmp #MGTK::event_kind_button_down
|
||||
beq L5576
|
||||
cmp #MGTK::event_kind_drag
|
||||
@ -545,14 +545,14 @@ L555F: MGTK_RELAY_CALL MGTK::PeekEvent, event_params
|
||||
|
||||
L5576: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
||||
MGTK_RELAY_CALL MGTK::FindWindow, findwindow_params
|
||||
lda findwindow_params_window_id
|
||||
lda findwindow_window_id
|
||||
cmp $D5F1
|
||||
beq :+
|
||||
pla
|
||||
pla
|
||||
rts
|
||||
|
||||
: lda findwindow_params_which_area
|
||||
: lda findwindow_which_area
|
||||
cmp #MGTK::area_content
|
||||
beq :+
|
||||
pla
|
||||
@ -699,7 +699,7 @@ L56E3: MGTK_RELAY_CALL MGTK::InitPort, $D239
|
||||
L56F6: lda #$00
|
||||
sta L577B
|
||||
L56FB: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
||||
lda event_params_kind
|
||||
lda event_kind
|
||||
cmp #MGTK::event_kind_button_up
|
||||
beq L575E
|
||||
lda $D5B7
|
||||
@ -737,7 +737,7 @@ L577B: .byte 0
|
||||
L577C: lda #$00
|
||||
sta L5801
|
||||
L5781: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
||||
lda event_params_kind
|
||||
lda event_kind
|
||||
cmp #MGTK::event_kind_button_up
|
||||
beq L57E4
|
||||
lda $D5B7
|
||||
@ -775,7 +775,7 @@ L5801: .byte 0
|
||||
L5802: lda #$00
|
||||
sta L5887
|
||||
L5807: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
||||
lda event_params_kind
|
||||
lda event_kind
|
||||
cmp #MGTK::event_kind_button_up
|
||||
beq L586A
|
||||
lda $D5B7
|
||||
@ -813,7 +813,7 @@ L5887: .byte 0
|
||||
L5888: lda #$00
|
||||
sta L590D
|
||||
L588D: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
||||
lda event_params_kind
|
||||
lda event_kind
|
||||
cmp #MGTK::event_kind_button_up
|
||||
beq L58F0
|
||||
lda $D5B7
|
||||
@ -851,7 +851,7 @@ L590D: .byte 0
|
||||
L590E: lda #$00
|
||||
sta L5993
|
||||
L5913: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
||||
lda event_params_kind
|
||||
lda event_kind
|
||||
cmp #MGTK::event_kind_button_up
|
||||
beq L5976
|
||||
lda $D5B7
|
||||
@ -1685,9 +1685,9 @@ L6163: sta L61B0
|
||||
cmp #$0A
|
||||
bcs L6181
|
||||
lda #MGTK::ctl_vertical_scroll_bar
|
||||
sta activatectl_params_which_ctl
|
||||
sta activatectl_which_ctl
|
||||
lda #MGTK::activatectl_deactivate
|
||||
sta activatectl_params_activate
|
||||
sta activatectl_activate
|
||||
MGTK_RELAY_CALL MGTK::ActivateCtl, activatectl_params
|
||||
rts
|
||||
|
||||
@ -1695,14 +1695,14 @@ L6181: lda $177F
|
||||
sta $D5F9
|
||||
.assert MGTK::ctl_vertical_scroll_bar = MGTK::activatectl_activate, error, "need to match"
|
||||
lda #MGTK::ctl_vertical_scroll_bar
|
||||
sta activatectl_params_which_ctl
|
||||
sta activatectl_params_activate
|
||||
sta activatectl_which_ctl
|
||||
sta activatectl_activate
|
||||
MGTK_RELAY_CALL MGTK::ActivateCtl, activatectl_params
|
||||
lda L61B0
|
||||
sta updatethumb_params_thumbpos
|
||||
sta updatethumb_thumbpos
|
||||
jsr L6227
|
||||
lda #MGTK::ctl_vertical_scroll_bar
|
||||
sta updatethumb_params_which_ctl
|
||||
sta updatethumb_which_ctl
|
||||
MGTK_RELAY_CALL MGTK::UpdateThumb, updatethumb_params
|
||||
rts
|
||||
|
||||
|
@ -125,7 +125,7 @@ end:
|
||||
.endmacro
|
||||
|
||||
|
||||
.macro DEFINE_OPEN_PARAMS name, pn, io
|
||||
.macro DEFINE_OPEN_PARAMS name, pn, io, rn
|
||||
.if .xmatch(.string(pn), "pathname")
|
||||
;; If 'pathname' is passed then expansion yields a circular reference.
|
||||
.error "Can't pass 'pathname' label to DEFINE_*_PARAMS"
|
||||
@ -134,7 +134,11 @@ end:
|
||||
param_count: .byte 3
|
||||
pathname: .addr pn
|
||||
io_buffer: .addr io
|
||||
.ifnblank rn
|
||||
ref_num: .byte rn
|
||||
.else
|
||||
ref_num: .byte 0
|
||||
.endif
|
||||
.endproc
|
||||
.endmacro
|
||||
|
||||
@ -248,13 +252,21 @@ int_num: .byte 0
|
||||
.endproc
|
||||
.endmacro
|
||||
|
||||
.macro DEFINE_QUIT_PARAMS name
|
||||
.macro DEFINE_QUIT_PARAMS name, arg1, arg2
|
||||
.proc name
|
||||
param_count: .byte 4
|
||||
.byte 0
|
||||
.word 0
|
||||
.byte 0
|
||||
.word 0
|
||||
param_count: .byte 4
|
||||
.ifnblank arg1
|
||||
.byte arg1
|
||||
.else
|
||||
.byte 0
|
||||
.endif
|
||||
.ifnblank arg2
|
||||
.word arg2
|
||||
.else
|
||||
.word 0
|
||||
.endif
|
||||
.byte 0
|
||||
.word 0
|
||||
.endproc
|
||||
.endmacro
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user