Merge remote-tracking branch 'origin/disasm'

This commit is contained in:
Joshua Bell 2018-12-20 16:38:46 -08:00
commit 1817a81db4
2 changed files with 40 additions and 34 deletions

View File

@ -133,8 +133,7 @@ DESKTOP_RELAY := $D040
;;; ============================================================ ;;; ============================================================
;;; Internals ;;; Internals
;;; Set to specific machine type; used for insertion point blinking ;;; Set to specific machine type; used for double-click timing.
;;; and double-click timing.
;;; //e - $96 ;;; //e - $96
;;; //c - $FA ;;; //c - $FA
;;; IIgs - $FD ;;; IIgs - $FD

View File

@ -1792,11 +1792,13 @@ L4DC2: ldy #1
;;; ============================================================ ;;; ============================================================
.proc cmd_open .proc cmd_open
ptr := $06
ldx #0 ldx #0
stx dir_count stx dir_count
L4DEC: cpx selected_icon_count L4DEC: cpx selected_icon_count
bne L4DF2 bne :+
;; Were any directories opened? ;; Were any directories opened?
lda dir_count lda dir_count
@ -1804,37 +1806,44 @@ L4DEC: cpx selected_icon_count
jsr clear_selection jsr clear_selection
done: rts done: rts
L4DF2: txa : txa
pha pha
lda selected_icon_list,x lda selected_icon_list,x
jsr icon_entry_lookup jsr icon_entry_lookup
stax $06 stax ptr
ldy #IconEntry::win_type ldy #IconEntry::win_type
lda ($06),y lda (ptr),y
and #icon_entry_type_mask and #icon_entry_type_mask
bne L4E10 bne not_dir
ldy #$00 ldy #0
lda ($06),y lda (ptr),y
jsr open_folder_or_volume_icon jsr open_folder_or_volume_icon
inc dir_count inc dir_count
jmp L4E14 jmp next_file
L4E10: cmp #$40 not_dir:
bcc L4E1A cmp #%01000000 ; type <= %0100 = basic, binary, or system
L4E14: pla bcc maybe_open_file
next_file:
pla
tax tax
inx inx
jmp L4DEC jmp L4DEC
L4E1A: sta L4E71 maybe_open_file:
sta L4E71
lda selected_icon_count lda selected_icon_count
cmp #$02 cmp #2 ; multiple files open?
bcs L4E14 bcs next_file ; don't try to invoke
pla pla
lda active_window_id lda active_window_id
jsr window_address_lookup jsr window_address_lookup
stax $06 stax $06
ldy #$00
ldy #0
lda ($06),y lda ($06),y
tay tay
L4E34: lda ($06),y L4E34: lda ($06),y
@ -3891,26 +3900,20 @@ window_id:
.endproc .endproc
;;; ============================================================ ;;; ============================================================
;;; Drag Selection
.proc L5F13_impl .proc L5F13_impl
L5F0B: .byte 0 pt1: DEFINE_POINT 0, 0
.byte 0 pt2: DEFINE_POINT 0, 0
.byte 0
.byte 0
L5F0F: .byte 0
.byte 0
.byte 0
.byte 0
start: copy16 #notpenXOR, $06 start: copy16 #notpenXOR, $06
jsr L60D5 jsr L60D5
ldx #$03 ldx #.sizeof(MGTK::Point)-1
L5F20: lda event_coords,x L5F20: lda event_coords,x
sta L5F0B,x sta pt1,x
sta L5F0F,x sta pt2,x
dex dex
bpl L5F20 bpl L5F20
@ -3929,9 +3932,9 @@ L5F3F: jsr clear_selection
jsr get_port2 jsr get_port2
jsr offset_grafport2_and_set jsr offset_grafport2_and_set
ldx #$03 ldx #$03
L5F50: lda L5F0B,x L5F50: lda pt1,x
sta rect_E230::x1,x sta rect_E230::x1,x
lda L5F0F,x lda pt2,x
sta rect_E230::x2,x sta rect_E230::x2,x
dex dex
bpl L5F50 bpl L5F50
@ -5485,11 +5488,14 @@ pathlen: .byte 0
stax ptr stax ptr
sty vol_info_path_buf sty vol_info_path_buf
L6F52: lda (ptr),y
: lda (ptr),y
sta vol_info_path_buf,y sta vol_info_path_buf,y
dey dey
bne L6F52 bne :-
jsr get_vol_free_used jsr get_vol_free_used
bne L6F8F bne L6F8F
lda L704B lda L704B
beq L6F8F beq L6F8F
@ -5925,7 +5931,8 @@ L72E2: lda $0C04
rts rts
get_vol_free_used: MLI_RELAY_CALL GET_FILE_INFO, get_file_info_params4 get_vol_free_used:
MLI_RELAY_CALL GET_FILE_INFO, get_file_info_params4
beq :+ beq :+
rts rts