mirror of
https://github.com/mi57730/a2d.git
synced 2024-12-01 05:50:24 +00:00
MGTK internal renames
This commit is contained in:
parent
1ae615fb20
commit
a63eca2a0e
@ -740,7 +740,7 @@ font: .addr 0
|
||||
screen_width := 560
|
||||
screen_height := 192
|
||||
|
||||
;; params for MGTK::SetPortSite when decorating title bar
|
||||
;; params for MGTK::SetPortBits when decorating title bar
|
||||
.proc screen_box
|
||||
.word 0
|
||||
.word menu_bar_height
|
||||
@ -1668,7 +1668,7 @@ draw_title_bar:
|
||||
bcs :+
|
||||
dex
|
||||
: stx title_bar_decoration::top+1
|
||||
MGTK_CALL MGTK::SetPortSite, screen_box ; set clipping rect to whole screen
|
||||
MGTK_CALL MGTK::SetPortBits, screen_box ; set clipping rect to whole screen
|
||||
MGTK_CALL MGTK::PaintBits, title_bar_decoration ; Draws decoration in title bar
|
||||
lda #window_id
|
||||
sta query_state_params::id
|
||||
|
@ -747,7 +747,7 @@ font: .addr 0
|
||||
screen_width := 560
|
||||
screen_height := 192
|
||||
|
||||
;; params for MGTK::SetPortSite when decorating title bar
|
||||
;; params for MGTK::SetPortBits when decorating title bar
|
||||
.proc screen_box
|
||||
left: .word 0
|
||||
top: .word menu_bar_height
|
||||
@ -1715,7 +1715,7 @@ draw_title_bar:
|
||||
bcs :+
|
||||
dex
|
||||
: stx title_bar_decoration::top+1
|
||||
MGTK_CALL MGTK::SetPortSite, screen_box ; set clipping rect to whole screen
|
||||
MGTK_CALL MGTK::SetPortBits, screen_box ; set clipping rect to whole screen
|
||||
MGTK_CALL MGTK::PaintBits, title_bar_decoration ; Draws decoration in title bar
|
||||
lda #window_id
|
||||
sta query_state_params::id
|
||||
|
@ -1471,7 +1471,7 @@ base: .word 10 ; vertical text offset (to baseline)
|
||||
.endproc
|
||||
|
||||
.proc draw_mode
|
||||
MGTK_CALL MGTK::SetPortSite, mode_box
|
||||
MGTK_CALL MGTK::SetPortBits, mode_box
|
||||
MGTK_CALL MGTK::MoveTo, mode_pos
|
||||
lda fixed_mode_flag
|
||||
beq else ; is proportional?
|
||||
@ -1484,6 +1484,6 @@ loop: lda default_box,x
|
||||
sta window_params::box,x
|
||||
dex
|
||||
bpl loop
|
||||
MGTK_CALL MGTK::SetPortSite, window_params::box
|
||||
MGTK_CALL MGTK::SetPortBits, window_params::box
|
||||
rts
|
||||
.endproc
|
||||
|
@ -2247,7 +2247,7 @@ LA085: jsr LA6A3
|
||||
jsr LA097
|
||||
lda L9F93
|
||||
bne LA085
|
||||
MGTK_CALL MGTK::SetPortSite, query_screen_params
|
||||
MGTK_CALL MGTK::SetPortBits, query_screen_params
|
||||
rts
|
||||
|
||||
LA097: MGTK_CALL MGTK::HideCursor, DESKTOP_DIRECT ; These params should be ignored - bogus?
|
||||
@ -2632,7 +2632,7 @@ LA3FD: jsr LA6A3
|
||||
jsr LA411
|
||||
lda L9F93
|
||||
bne LA3FD
|
||||
MGTK_CALL MGTK::SetPortSite, query_screen_params
|
||||
MGTK_CALL MGTK::SetPortBits, query_screen_params
|
||||
jmp LA446
|
||||
|
||||
LA411: lda #$00
|
||||
@ -2944,7 +2944,7 @@ LA674: lda L8E15,x
|
||||
lda #$02
|
||||
sta LA62C
|
||||
sta set_box_params2::width+1
|
||||
LA69C: MGTK_CALL MGTK::SetPortSite, set_box_params2
|
||||
LA69C: MGTK_CALL MGTK::SetPortBits, set_box_params2
|
||||
rts
|
||||
|
||||
LA6A3: lda #$00
|
||||
@ -3033,7 +3033,7 @@ LA747: lda LA6B0
|
||||
bne LA775
|
||||
lda #$00
|
||||
sta LA6B0
|
||||
LA753: MGTK_CALL MGTK::SetPortSite, set_box_params2
|
||||
LA753: MGTK_CALL MGTK::SetPortBits, set_box_params2
|
||||
lda set_box_params2::width+1
|
||||
cmp LA62C
|
||||
bne LA76F
|
||||
@ -3934,7 +3934,7 @@ LBA0B: sta state2_left,x
|
||||
MGTK_RELAY2_CALL MGTK::PaintRect, alert_rect ; alert background
|
||||
MGTK_RELAY2_CALL MGTK::SetPenMode, const2 ; ensures corners are inverted
|
||||
MGTK_RELAY2_CALL MGTK::FrameRect, alert_rect ; alert outline
|
||||
MGTK_RELAY2_CALL MGTK::SetPortSite, LB6D3
|
||||
MGTK_RELAY2_CALL MGTK::SetPortBits, LB6D3
|
||||
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::SetPenMode, const0 ; restores normal mode
|
||||
@ -19938,7 +19938,7 @@ LB8F5: jsr LBD3B
|
||||
lda $D6B5+1
|
||||
sta $08+1
|
||||
MGTK_RELAY_CALL MGTK::MoveTo, $6
|
||||
MGTK_RELAY_CALL MGTK::SetPortSite, LD6C7
|
||||
MGTK_RELAY_CALL MGTK::SetPortBits, LD6C7
|
||||
bit LD8EB
|
||||
bpl LB92D
|
||||
MGTK_RELAY_CALL MGTK::SetTextBG, desktop_aux::LAE6C
|
||||
@ -19969,7 +19969,7 @@ LB961: lda path_buf1
|
||||
MGTK_RELAY_CALL MGTK::SetPenMode, const2
|
||||
MGTK_RELAY_CALL MGTK::FrameRect, LD6AB
|
||||
MGTK_RELAY_CALL MGTK::MoveTo, LD6B3
|
||||
MGTK_RELAY_CALL MGTK::SetPortSite, LD6C7
|
||||
MGTK_RELAY_CALL MGTK::SetPortBits, LD6C7
|
||||
addr_call draw_text1, path_buf1
|
||||
addr_call draw_text1, path_buf2
|
||||
addr_call draw_text1, str_2_spaces
|
||||
@ -20146,7 +20146,7 @@ LBB1A: lda LBB62
|
||||
lda $D6B5+1
|
||||
sta $08+1
|
||||
MGTK_RELAY_CALL MGTK::MoveTo, $6
|
||||
MGTK_RELAY_CALL MGTK::SetPortSite, LD6C7
|
||||
MGTK_RELAY_CALL MGTK::SetPortBits, LD6C7
|
||||
addr_call draw_text1, str_1_char
|
||||
addr_call draw_text1, path_buf2
|
||||
lda winF
|
||||
@ -20167,7 +20167,7 @@ LBB69: dec path_buf1
|
||||
lda $D6B5+1
|
||||
sta $08+1
|
||||
MGTK_RELAY_CALL MGTK::MoveTo, $6
|
||||
MGTK_RELAY_CALL MGTK::SetPortSite, LD6C7
|
||||
MGTK_RELAY_CALL MGTK::SetPortBits, LD6C7
|
||||
addr_call draw_text1, path_buf2
|
||||
addr_call draw_text1, str_2_spaces
|
||||
lda winF
|
||||
@ -20199,7 +20199,7 @@ LBBBC: ldx path_buf1
|
||||
lda $D6B5+1
|
||||
sta $08+1
|
||||
MGTK_RELAY_CALL MGTK::MoveTo, $6
|
||||
MGTK_RELAY_CALL MGTK::SetPortSite, LD6C7
|
||||
MGTK_RELAY_CALL MGTK::SetPortBits, LD6C7
|
||||
addr_call draw_text1, path_buf2
|
||||
addr_call draw_text1, str_2_spaces
|
||||
lda winF
|
||||
@ -20227,7 +20227,7 @@ LBC21: lda $D485,x
|
||||
bne LBC21
|
||||
LBC2D: dec path_buf2
|
||||
MGTK_RELAY_CALL MGTK::MoveTo, LD6B3
|
||||
MGTK_RELAY_CALL MGTK::SetPortSite, LD6C7
|
||||
MGTK_RELAY_CALL MGTK::SetPortBits, LD6C7
|
||||
addr_call draw_text1, path_buf1
|
||||
addr_call draw_text1, path_buf2
|
||||
addr_call draw_text1, str_2_spaces
|
||||
|
753
desktop/mgtk.s
753
desktop/mgtk.s
File diff suppressed because it is too large
Load Diff
47
mgtk.inc
47
mgtk.inc
@ -12,11 +12,13 @@ MLI := $4000
|
||||
;;; Graphics Primitives
|
||||
;;; ==================================================
|
||||
|
||||
NoOp := $00 ; No-op
|
||||
;; (input length 0 bytes)
|
||||
|
||||
;;; --------------------------------------------------
|
||||
;;; Initialization Commands
|
||||
|
||||
NoOp := $00 ; No-op
|
||||
;; (input length 0 bytes)
|
||||
InitGraf := $01
|
||||
|
||||
SetSwitches := $02 ; Configure display switches
|
||||
;; (input length 1 byte)
|
||||
@ -77,7 +79,7 @@ GetPort := $05 ; Get pointer to active drawing state
|
||||
;; (output length 2 bytes)
|
||||
;; .addr state (out)
|
||||
|
||||
SetPortSite := $06 ; Set just the drawing box, subset of full state
|
||||
SetPortBits := $06 ; Set just the drawing box, subset of full state
|
||||
;; (input length 16 bytes)
|
||||
;; .word left pixels from screen edge
|
||||
;; .word top
|
||||
@ -172,7 +174,7 @@ PaintBits := $14 ; Draw pattern
|
||||
;; .word width pixels
|
||||
;; .word height pixels
|
||||
|
||||
;; $15 used in DeskTop but not DAs - icon redraw
|
||||
PaintPoly := $15
|
||||
;; (input length 0 bytes)
|
||||
|
||||
FramePoly := $16 ; Draw multiple closed polygons
|
||||
@ -187,6 +189,8 @@ FramePoly := $16 ; Draw multiple closed polygons
|
||||
;; $17 used in DeskTop but not DAs - maybe selection drag
|
||||
;; (input length 0 bytes)
|
||||
|
||||
InPoly := $16
|
||||
|
||||
;;; --------------------------------------------------
|
||||
;;; Text Commands
|
||||
|
||||
@ -212,6 +216,7 @@ SetZP2 := $1B ; Stash or restore lower 128 bytes of ZP; calls are idempo
|
||||
;; (input length 1 byte)
|
||||
;; .byte flag (high bit set = stash ZP, clear = unstash ZP)
|
||||
|
||||
Version := $1C ; ???
|
||||
|
||||
;;; ==================================================
|
||||
;;; Mouse Graphics Tool Kit Calls
|
||||
@ -220,13 +225,16 @@ SetZP2 := $1B ; Stash or restore lower 128 bytes of ZP; calls are idempo
|
||||
;;; --------------------------------------------------
|
||||
;;; Initialization Calls
|
||||
|
||||
StartDeskTop := $1D; Inits state, registers interrupt handler, draws desktop
|
||||
StartDeskTop := $1D ; Inits state, registers interrupt handler, draws desktop
|
||||
;; (input length 12 byte)
|
||||
;; ???
|
||||
|
||||
StopDeskTop := $1E ; Deallocates interrupt, hides cursor
|
||||
;; (no parameters; pass $0000 as address)
|
||||
|
||||
|
||||
;;; $1F ???
|
||||
|
||||
SetUserHook := $20 ; Install mouse hook; A=0 on success, $95 if mouse disabled
|
||||
;; NOTE: Doesn't set the internal flag - buggy ???
|
||||
;; (input length 2 bytes)
|
||||
@ -234,6 +242,10 @@ SetUserHook := $20 ; Install mouse hook; A=0 on success, $95 if mouse
|
||||
;; .addr hook Mouse hook routine to install
|
||||
;; .addr mouse_state (out) Address of mouse state (.word x, y; .byte status)
|
||||
|
||||
ScaleMouse := $21 ; ???
|
||||
|
||||
KeyboardMouse := $22 ; ???
|
||||
|
||||
GetIntHandler := $23 ; Get address of interrupt handler
|
||||
;; (input length 0)
|
||||
;; (output length 2 bytes)
|
||||
@ -266,6 +278,8 @@ GetCursorAddr := $28 ; Get cursor definition
|
||||
;;; --------------------------------------------------
|
||||
;;; Event Manager Calls
|
||||
|
||||
CheckEvents := $29 ; ???
|
||||
|
||||
GetEvent := $2A
|
||||
;; (input length 0 bytes)
|
||||
;; (output length 5 bytes)
|
||||
@ -283,6 +297,8 @@ FlushEvents := $2B
|
||||
;; $2C used in DeskTop but not DAs - icon drag
|
||||
;; (input length 0 bytes)
|
||||
|
||||
PeekEvent := $4C
|
||||
|
||||
PostEvent := $2D ; Set pending input state (mouse or keyboard)
|
||||
;; (input length 5 bytes)
|
||||
;; .byte state
|
||||
@ -300,6 +316,8 @@ SetKeyEvent := $2E ; When set, keyboard is ignored in $29 calls
|
||||
;;; --------------------------------------------------
|
||||
;;; Menu Manager Calls
|
||||
|
||||
InitMenu := $2F
|
||||
|
||||
SetMenu := $30 ; Configure (and draw) menu
|
||||
;; (input not copied)
|
||||
;; .word count Number of top-level menus
|
||||
@ -328,6 +346,13 @@ MenuSelect := $31 ; Enter modal loop for handling mouse-down on menu b
|
||||
;; .byte menu_id Top level menu identifier, or 0 if none
|
||||
;; .byte item_num Index (1-based) of item in menu, or 0 if none
|
||||
|
||||
MenuKey := $32
|
||||
HiliteMenu := $33
|
||||
DisableMenu := $34
|
||||
DisableItem := $35
|
||||
CheckItem := $36
|
||||
SetMark := $37
|
||||
|
||||
;;; --------------------------------------------------
|
||||
;;; Window Manager Calls
|
||||
|
||||
@ -373,6 +398,8 @@ CloseWindow := $39
|
||||
;; (input length 1 byte)
|
||||
;; .byte id
|
||||
|
||||
CloseAll := $3A
|
||||
|
||||
GetWinPtr := $3B ; Get pointer to window params by id; A=0 on success
|
||||
;; (input length 1 byte)
|
||||
;; (output length 3 bytes)
|
||||
@ -391,10 +418,12 @@ SetWinPort := $3D ; Update drawing state by passed window id
|
||||
;; .byte ???
|
||||
|
||||
|
||||
BeginUpdate := $3E ; Draws window border, background, title bar, scroll bars
|
||||
BeginUpdate := $3E
|
||||
;; (input length 1 byte)
|
||||
;; .byte id
|
||||
|
||||
EndUpdate := $3F
|
||||
|
||||
FindWindow := $40
|
||||
;; (input length 4 bytes)
|
||||
;; .word queryx relative to screen
|
||||
@ -439,6 +468,8 @@ ScreenToWindow := $46 ; Map screen coords to client coords
|
||||
;; .word clientx
|
||||
;; .word clienty
|
||||
|
||||
WindowToScreen := $47
|
||||
|
||||
;;; --------------------------------------------------
|
||||
;;; Control Manager Calls
|
||||
|
||||
@ -469,12 +500,14 @@ UpdateThumb := $4B
|
||||
;; .byte pos new position 0...250
|
||||
;; .byte ???
|
||||
|
||||
ActivateCtl := $4C ; ???
|
||||
|
||||
;;; $4E is last call
|
||||
|
||||
;;; ==================================================
|
||||
;;; Graphics Primitives Constants
|
||||
|
||||
;;; Used in GetWinPort / SetPortSite
|
||||
;;; Used in GetWinPort / SetPortBits
|
||||
screen_mapbits := $2000 ; Screen address
|
||||
screen_mapwidth := $80 ; Stride in bytes
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user