Merge remote-tracking branch 'origin/disasm'
This commit is contained in:
@@ -88,7 +88,7 @@ call_init:
|
||||
sta RAMWRTON
|
||||
rts
|
||||
.endproc
|
||||
sizeof_routine := * - routine
|
||||
sizeof_routine = * - routine
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
@@ -152,31 +152,31 @@ flag: .byte MGTK::zp_overwrite
|
||||
;;; ============================================================
|
||||
;;; Button Definitions
|
||||
|
||||
button_width := 17
|
||||
button_height := 9
|
||||
button_width = 17
|
||||
button_height = 9
|
||||
|
||||
col1_left := 13
|
||||
col1_right := col1_left+button_width ; 30
|
||||
col2_left := 42
|
||||
col2_right := col2_left+button_width ; 59
|
||||
col3_left := 70
|
||||
col3_right := col3_left+button_width ; 87
|
||||
col4_left := 98
|
||||
col4_right := col4_left+button_width ; 115
|
||||
col1_left = 13
|
||||
col1_right = col1_left+button_width ; 30
|
||||
col2_left = 42
|
||||
col2_right = col2_left+button_width ; 59
|
||||
col3_left = 70
|
||||
col3_right = col3_left+button_width ; 87
|
||||
col4_left = 98
|
||||
col4_right = col4_left+button_width ; 115
|
||||
|
||||
row1_top := 22
|
||||
row1_bot := row1_top+button_height ; 31
|
||||
row2_top := 38
|
||||
row2_bot := row2_top+button_height ; 47
|
||||
row3_top := 53
|
||||
row3_bot := row3_top+button_height ; 62
|
||||
row4_top := 68
|
||||
row4_bot := row4_top+button_height ; 77
|
||||
row5_top := 83
|
||||
row5_bot := row5_top+button_height ; 92
|
||||
row1_top = 22
|
||||
row1_bot = row1_top+button_height ; 31
|
||||
row2_top = 38
|
||||
row2_bot = row2_top+button_height ; 47
|
||||
row3_top = 53
|
||||
row3_bot = row3_top+button_height ; 62
|
||||
row4_top = 68
|
||||
row4_bot = row4_top+button_height ; 77
|
||||
row5_top = 83
|
||||
row5_bot = row5_top+button_height ; 92
|
||||
|
||||
border_lt := 1 ; border width pixels (left/top)
|
||||
border_br := 2 ; (bottom/right)
|
||||
border_lt = 1 ; border width pixels (left/top)
|
||||
border_br = 2 ; (bottom/right)
|
||||
|
||||
.proc btn_c
|
||||
viewloc: DEFINE_POINT col1_left - border_lt, row1_top - border_lt
|
||||
@@ -381,7 +381,7 @@ port: .word col4_left,row4_top,col4_right,row5_bot
|
||||
;; drawing the shadowed buttons.
|
||||
|
||||
;; bitmaps are low 7 bits, 0=black 1=white
|
||||
bitmap_stride := 3 ; bytes
|
||||
bitmap_stride = 3 ; bytes
|
||||
button_bitmap: ; bitmap for normal buttons
|
||||
.byte px(%0000000),px(%0000000),px(%0000001)
|
||||
.byte px(%0111111),px(%1111111),px(%1111100)
|
||||
@@ -397,7 +397,7 @@ button_bitmap: ; bitmap for normal buttons
|
||||
.byte px(%0000000),px(%0000000),px(%0000000)
|
||||
.byte px(%1000000),px(%0000000),px(%0000000)
|
||||
|
||||
wide_bitmap_stride := 8
|
||||
wide_bitmap_stride = 8
|
||||
wide_button_bitmap: ; bitmap for '0' button
|
||||
.byte px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%0000000),px(%1111111)
|
||||
.byte px(%0111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111111),px(%1111110),px(%0111111)
|
||||
@@ -483,10 +483,10 @@ white_pattern:
|
||||
backcolor: .byte $7F
|
||||
.endproc
|
||||
|
||||
display_left := 10
|
||||
display_top := 5
|
||||
display_width := 120
|
||||
display_height := 17
|
||||
display_left = 10
|
||||
display_top = 5
|
||||
display_width = 120
|
||||
display_height = 17
|
||||
|
||||
.proc frame_display_params
|
||||
left: .word display_left
|
||||
@@ -514,7 +514,7 @@ textptr: .addr text_buffer1
|
||||
textlen: .byte 15
|
||||
.endproc
|
||||
|
||||
text_buffer_size := 14
|
||||
text_buffer_size = 14
|
||||
|
||||
text_buffer1:
|
||||
.res text_buffer_size+2, 0
|
||||
@@ -595,7 +595,7 @@ textfont: .addr 0
|
||||
|
||||
.byte 0 ; ???
|
||||
|
||||
menu_bar_height := 13
|
||||
menu_bar_height = 13
|
||||
|
||||
;; params for MGTK::SetPortBits when decorating title bar
|
||||
.proc screen_port
|
||||
@@ -619,10 +619,10 @@ penmode: .byte MGTK::pencopy
|
||||
penmode: .byte MGTK::notpenXOR
|
||||
.endproc
|
||||
|
||||
window_width := 130
|
||||
window_height := 96
|
||||
default_left := 210
|
||||
default_top := 60
|
||||
window_width = 130
|
||||
window_height = 96
|
||||
default_left = 210
|
||||
default_top = 60
|
||||
|
||||
.proc winfo
|
||||
window_id: .byte da_window_id
|
||||
@@ -786,7 +786,7 @@ exit: MGTK_CALL MGTK::CloseWindow, closewindow_params
|
||||
sta RAMWRTOFF
|
||||
jmp exit_da
|
||||
.endproc
|
||||
sizeof_routine := * - routine ; Can't use .sizeof before the .proc definition
|
||||
sizeof_routine = * - routine ; Can't use .sizeof before the .proc definition
|
||||
.endproc
|
||||
|
||||
: cmp #MGTK::Area::dragbar ; Title bar?
|
||||
@@ -1479,8 +1479,8 @@ loop: ldy #0
|
||||
;;; Draw the title bar decoration
|
||||
|
||||
draw_title_bar:
|
||||
offset_left := 115 ; pixels from left of client area
|
||||
offset_top := 22 ; pixels from top of client area (up!)
|
||||
offset_left = 115 ; pixels from left of client area
|
||||
offset_top = 22 ; pixels from top of client area (up!)
|
||||
ldx winfo::left+1
|
||||
lda winfo::left
|
||||
clc
|
||||
@@ -1549,7 +1549,7 @@ loop: inc TXTPTR
|
||||
end: rts
|
||||
.endproc
|
||||
.org save_org + .sizeof(adjust_txtptr_copied)
|
||||
sizeof_adjust_txtptr_copied := .sizeof(adjust_txtptr_copied)
|
||||
sizeof_adjust_txtptr_copied = .sizeof(adjust_txtptr_copied)
|
||||
|
||||
|
||||
CALL_FLOAT:
|
||||
|
||||
@@ -31,7 +31,7 @@ filename:
|
||||
|
||||
write_buffer:
|
||||
.byte 0,0
|
||||
sizeof_write_buffer := * - write_buffer
|
||||
sizeof_write_buffer = * - write_buffer
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
@@ -128,10 +128,10 @@ start_da:
|
||||
;; The following 7 rects are iterated over to identify
|
||||
;; a hit target for a click.
|
||||
|
||||
num_hit_rects := 7
|
||||
first_hit_rect := *
|
||||
up_rect_index := 3
|
||||
down_rect_index := 4
|
||||
num_hit_rects = 7
|
||||
first_hit_rect = *
|
||||
up_rect_index = 3
|
||||
down_rect_index = 4
|
||||
|
||||
ok_button_rect:
|
||||
.word $6A,$2E,$B5,$39
|
||||
@@ -209,7 +209,7 @@ which_area:.byte 0
|
||||
window_id: .byte 0
|
||||
.endproc
|
||||
|
||||
da_window_id := 100
|
||||
da_window_id = 100
|
||||
|
||||
.proc screentowindow_params
|
||||
window_id: .byte da_window_id
|
||||
@@ -520,12 +520,12 @@ decrement_table:
|
||||
.addr 0, decrement_day, decrement_month, decrement_year
|
||||
|
||||
|
||||
day_min := 1
|
||||
day_max := 31
|
||||
month_min := 1
|
||||
month_max := 12
|
||||
year_min := 0
|
||||
year_max := 99
|
||||
day_min = 1
|
||||
day_max = 31
|
||||
month_min = 1
|
||||
month_max = 12
|
||||
year_min = 0
|
||||
year_max = 99
|
||||
|
||||
increment_day:
|
||||
clc
|
||||
@@ -598,7 +598,7 @@ decrement_year:
|
||||
|
||||
ptr := $07
|
||||
str := month_string + 3
|
||||
len := 3
|
||||
len = 3
|
||||
|
||||
copy16 #str, ptr
|
||||
|
||||
@@ -661,7 +661,7 @@ skip: jmp dest
|
||||
sta RAMWRTOFF
|
||||
jmp save_date_and_exit
|
||||
.endproc
|
||||
sizeof_routine := * - routine
|
||||
sizeof_routine = * - routine
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
@@ -64,7 +64,7 @@ stash_stack: .byte 0
|
||||
jmp create_window
|
||||
.endproc
|
||||
|
||||
da_window_id := 51
|
||||
da_window_id = 51
|
||||
|
||||
;;; ============================================================
|
||||
;;; Redraw the screen (all windows) after a EventKind::drag
|
||||
@@ -98,7 +98,7 @@ skip: lda #0
|
||||
sta RAMWRTON
|
||||
rts
|
||||
.endproc
|
||||
sizeof_routine := * - routine
|
||||
sizeof_routine = * - routine
|
||||
.endproc
|
||||
|
||||
;;; ============================================================
|
||||
@@ -176,16 +176,16 @@ a_grafport: .addr setport_params
|
||||
getwinport_params_window_id := getwinport_params::window_id
|
||||
|
||||
;; Puzzle piece row/columns
|
||||
cw := 28
|
||||
c1 := 5
|
||||
c2 := c1 + cw
|
||||
c3 := c2 + cw
|
||||
c4 := c3 + cw
|
||||
rh := 16
|
||||
r1 := 3
|
||||
r2 := r1 + rh
|
||||
r3 := r2 + rh
|
||||
r4 := r3 + rh
|
||||
cw = 28
|
||||
c1 = 5
|
||||
c2 = c1 + cw
|
||||
c3 = c2 + cw
|
||||
c4 = c3 + cw
|
||||
rh = 16
|
||||
r1 = 3
|
||||
r2 = r1 + rh
|
||||
r3 = r2 + rh
|
||||
r4 = r3 + rh
|
||||
|
||||
space_positions: ; left, top for all 16 holes
|
||||
.word c1,r1
|
||||
@@ -579,10 +579,10 @@ setport_params:
|
||||
.byte $00,$2F,$02,$B1,$00,$00,$01,$02
|
||||
.byte $06
|
||||
|
||||
default_left := 220
|
||||
default_top := 80
|
||||
default_width := $79
|
||||
default_height := $44
|
||||
default_left = 220
|
||||
default_top = 80
|
||||
default_width = $79
|
||||
default_height = $44
|
||||
|
||||
.proc winfo
|
||||
window_id: .byte da_window_id
|
||||
@@ -743,7 +743,7 @@ destroy:
|
||||
sta RAMWRTOFF
|
||||
jmp exit_da
|
||||
.endproc
|
||||
sizeof_routine := * - routine
|
||||
sizeof_routine = * - routine
|
||||
|
||||
;; title bar?
|
||||
check_title:
|
||||
@@ -844,7 +844,7 @@ nope: clc
|
||||
;;; ============================================================
|
||||
;;; Process piece click
|
||||
|
||||
hole_piece := 12
|
||||
hole_piece = 12
|
||||
|
||||
.proc process_click
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ call_main_addr := call_main_trampoline+7 ; address patched in her
|
||||
sta RAMWRTON
|
||||
rts
|
||||
.endproc
|
||||
sizeof_call_main_template := * - call_main_template
|
||||
sizeof_call_main_template = * - call_main_template
|
||||
|
||||
.proc call_init
|
||||
;; run the DA
|
||||
@@ -160,7 +160,7 @@ params_start:
|
||||
|
||||
io_buf := $0C00
|
||||
default_buffer := $1200
|
||||
read_length := $0100
|
||||
read_length = $0100
|
||||
|
||||
DEFINE_OPEN_PARAMS open_params, pathbuf, io_buf
|
||||
DEFINE_READ_PARAMS read_params, default_buffer, read_length
|
||||
@@ -185,10 +185,10 @@ black_pattern:
|
||||
white_pattern:
|
||||
.res $8, $FF
|
||||
|
||||
da_window_id := 100
|
||||
da_window_id = 100
|
||||
|
||||
line_spacing := 10
|
||||
right_const := 506
|
||||
line_spacing = 10
|
||||
right_const = 506
|
||||
|
||||
L095A: .byte $00
|
||||
L095B: .word right_const
|
||||
@@ -279,10 +279,10 @@ textptr: .addr 0 ; address
|
||||
textlen: .byte 0 ; length
|
||||
.endproc
|
||||
|
||||
default_width := 512
|
||||
default_height := 150
|
||||
default_left := 10
|
||||
default_top := 28
|
||||
default_width = 512
|
||||
default_height = 150
|
||||
default_left = 10
|
||||
default_top = 28
|
||||
|
||||
.proc winfo
|
||||
window_id: .byte da_window_id ; window identifier
|
||||
@@ -582,7 +582,7 @@ no_mod:
|
||||
jsr redraw_screen
|
||||
jsr calc_window_size
|
||||
|
||||
max_width := default_width
|
||||
max_width = default_width
|
||||
lda #>max_width
|
||||
cmp winfo::maprect::x2+1
|
||||
bne :+
|
||||
@@ -731,7 +731,7 @@ end: rts
|
||||
end: rts
|
||||
.endproc
|
||||
|
||||
vscroll_max := $FA
|
||||
vscroll_max = $FA
|
||||
|
||||
.proc on_vscroll_below_click
|
||||
loop: jsr page_down
|
||||
@@ -1481,8 +1481,8 @@ ignore: clc ; Click ignored
|
||||
|
||||
fixed_str: DEFINE_STRING "Fixed "
|
||||
prop_str: DEFINE_STRING "Proportional"
|
||||
label_width := 50
|
||||
title_bar_height := 12
|
||||
label_width = 50
|
||||
title_bar_height = 12
|
||||
|
||||
.proc mode_mapinfo ; bounding port for mode label
|
||||
viewloc: DEFINE_POINT 0, 0, viewloc
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
|
||||
dir_data_buffer := $0E00
|
||||
dir_data_buffer_len := $0E00
|
||||
dir_data_buffer_len = $0E00
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
@@ -139,7 +139,7 @@ on_line_buffer:
|
||||
|
||||
io_buf := $1C00
|
||||
buffer := dir_data_buffer
|
||||
buffer_len := dir_data_buffer_len
|
||||
buffer_len = dir_data_buffer_len
|
||||
|
||||
DEFINE_OPEN_PARAMS open_params, path_buf, io_buf
|
||||
DEFINE_READ_PARAMS read_params, buffer, buffer_len
|
||||
|
||||
Reference in New Issue
Block a user