mirror of
https://github.com/mi57730/a2d.git
synced 2025-02-20 17:29:01 +00:00
disasm: icon logic
This commit is contained in:
parent
ceec6f41a4
commit
0b0171d1a5
@ -250,7 +250,7 @@ GLYPH_FOLDERR = $02
|
|||||||
GLYPH_SPC = $00
|
GLYPH_SPC = $00
|
||||||
GLYPH_INSPT = $06
|
GLYPH_INSPT = $06
|
||||||
|
|
||||||
GLYPH_LARROW = $09
|
GLYPH_LARROW = $08
|
||||||
GLYPH_RARROW = $15
|
GLYPH_RARROW = $15
|
||||||
GLYPH_UARROW = $0B
|
GLYPH_UARROW = $0B
|
||||||
GLYPH_DARROW = $0A
|
GLYPH_DARROW = $0A
|
||||||
|
@ -62,7 +62,7 @@ v6: DEFINE_POINT 0, 0, v6
|
|||||||
v7: DEFINE_POINT 0, 0, v7
|
v7: DEFINE_POINT 0, 0, v7
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
.proc paintbits_params2
|
.proc icon_paintbits_params
|
||||||
viewloc: DEFINE_POINT 0, 0, viewloc
|
viewloc: DEFINE_POINT 0, 0, viewloc
|
||||||
mapbits: .addr 0
|
mapbits: .addr 0
|
||||||
mapwidth: .byte 0
|
mapwidth: .byte 0
|
||||||
@ -70,7 +70,7 @@ reserved: .byte 0
|
|||||||
maprect: DEFINE_RECT 0,0,0,0,maprect
|
maprect: DEFINE_RECT 0,0,0,0,maprect
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
.proc paintbits_params
|
.proc mask_paintbits_params
|
||||||
viewloc: DEFINE_POINT 0, 0, viewloc
|
viewloc: DEFINE_POINT 0, 0, viewloc
|
||||||
mapbits: .addr 0
|
mapbits: .addr 0
|
||||||
mapwidth: .byte 0
|
mapwidth: .byte 0
|
||||||
@ -1589,22 +1589,22 @@ L9F9F: copy #$80, L9F92
|
|||||||
;; copy icon coords and bits
|
;; copy icon coords and bits
|
||||||
: ldy #IconEntry::iconx
|
: ldy #IconEntry::iconx
|
||||||
: lda ($06),y
|
: lda ($06),y
|
||||||
sta paintbits_params2::viewloc-IconEntry::iconx,y
|
sta icon_paintbits_params::viewloc-IconEntry::iconx,y
|
||||||
iny
|
iny
|
||||||
cpy #IconEntry::iconx + 6 ; x/y/bits
|
cpy #IconEntry::iconx + 6 ; x/y/bits
|
||||||
bne :-
|
bne :-
|
||||||
|
|
||||||
jsr push_pointers
|
jsr push_pointers
|
||||||
copy16 paintbits_params2::mapbits, $08
|
copy16 icon_paintbits_params::mapbits, $08
|
||||||
ldy #11
|
ldy #11
|
||||||
: lda ($08),y
|
: lda ($08),y
|
||||||
sta paintbits_params2::mapbits,y
|
sta icon_paintbits_params::mapbits,y
|
||||||
dey
|
dey
|
||||||
bpl :-
|
bpl :-
|
||||||
|
|
||||||
bit L9F92
|
bit L9F92
|
||||||
bpl :+
|
bpl :+
|
||||||
jsr LA12C
|
jsr prepare_mask_params
|
||||||
: jsr pop_pointers
|
: jsr pop_pointers
|
||||||
|
|
||||||
ldy #9
|
ldy #9
|
||||||
@ -1618,7 +1618,7 @@ L9F9F: copy #$80, L9F92
|
|||||||
sta textwidth_params::textlen
|
sta textwidth_params::textlen
|
||||||
MGTK_CALL MGTK::TextWidth, textwidth_params
|
MGTK_CALL MGTK::TextWidth, textwidth_params
|
||||||
lda textwidth_params::result
|
lda textwidth_params::result
|
||||||
cmp paintbits_params2::maprect::x2
|
cmp icon_paintbits_params::maprect::x2
|
||||||
bcs :+
|
bcs :+
|
||||||
inc drawtext_params::textlen
|
inc drawtext_params::textlen
|
||||||
ldx drawtext_params::textlen
|
ldx drawtext_params::textlen
|
||||||
@ -1628,15 +1628,15 @@ L9F9F: copy #$80, L9F92
|
|||||||
|
|
||||||
: lsr a
|
: lsr a
|
||||||
sta moveto_params2::xcoord+1
|
sta moveto_params2::xcoord+1
|
||||||
lda paintbits_params2::maprect::x2
|
lda icon_paintbits_params::maprect::x2
|
||||||
lsr a
|
lsr a
|
||||||
sta moveto_params2::xcoord
|
sta moveto_params2::xcoord
|
||||||
lda moveto_params2::xcoord+1
|
lda moveto_params2::xcoord+1
|
||||||
sec
|
sec
|
||||||
sbc moveto_params2::xcoord
|
sbc moveto_params2::xcoord
|
||||||
sta moveto_params2::xcoord
|
sta moveto_params2::xcoord
|
||||||
sub16_8 paintbits_params2::viewloc::xcoord, moveto_params2::xcoord, moveto_params2::xcoord
|
sub16_8 icon_paintbits_params::viewloc::xcoord, moveto_params2::xcoord, moveto_params2::xcoord
|
||||||
add16_8 paintbits_params2::viewloc::ycoord, paintbits_params2::maprect::y2, moveto_params2::ycoord
|
add16_8 icon_paintbits_params::viewloc::ycoord, icon_paintbits_params::maprect::y2, moveto_params2::ycoord
|
||||||
add16 moveto_params2::ycoord, #1, moveto_params2::ycoord
|
add16 moveto_params2::ycoord, #1, moveto_params2::ycoord
|
||||||
add16_8 moveto_params2::ycoord, font_height, moveto_params2::ycoord
|
add16_8 moveto_params2::ycoord, font_height, moveto_params2::ycoord
|
||||||
|
|
||||||
@ -1662,9 +1662,9 @@ LA097: MGTK_CALL MGTK::HideCursor, DESKTOP_DIRECT ; These params should be igno
|
|||||||
MGTK_CALL MGTK::SetPenMode, pencopy_2
|
MGTK_CALL MGTK::SetPenMode, pencopy_2
|
||||||
jmp LA0C2
|
jmp LA0C2
|
||||||
|
|
||||||
LA0B6: MGTK_CALL MGTK::PaintBits, paintbits_params
|
LA0B6: MGTK_CALL MGTK::PaintBits, mask_paintbits_params
|
||||||
MGTK_CALL MGTK::SetPenMode, penXOR_2
|
MGTK_CALL MGTK::SetPenMode, penXOR_2
|
||||||
LA0C2: MGTK_CALL MGTK::PaintBits, paintbits_params2
|
LA0C2: MGTK_CALL MGTK::PaintBits, icon_paintbits_params
|
||||||
ldy #IconEntry::win_type
|
ldy #IconEntry::win_type
|
||||||
lda ($06),y
|
lda ($06),y
|
||||||
and #icon_entry_open_mask
|
and #icon_entry_open_mask
|
||||||
@ -1695,33 +1695,44 @@ setbg: sta settextbg_params
|
|||||||
MGTK_CALL MGTK::ShowCursor
|
MGTK_CALL MGTK::ShowCursor
|
||||||
rts
|
rts
|
||||||
|
|
||||||
LA12C: COPY_BLOCK paintbits_params2, paintbits_params
|
;;; ============================================================
|
||||||
|
|
||||||
ldy paintbits_params::maprect::y2
|
.proc prepare_mask_params
|
||||||
LA13A: lda paintbits_params::mapwidth
|
COPY_BLOCK icon_paintbits_params, mask_paintbits_params
|
||||||
|
|
||||||
|
;; Calculate address of mask bitmap
|
||||||
|
ldy mask_paintbits_params::maprect::y2
|
||||||
|
loop: lda mask_paintbits_params::mapwidth
|
||||||
clc
|
clc
|
||||||
adc paintbits_params::mapbits
|
adc mask_paintbits_params::mapbits
|
||||||
sta paintbits_params::mapbits
|
sta mask_paintbits_params::mapbits
|
||||||
bcc LA149
|
bcc :+
|
||||||
inc paintbits_params::mapbits+1
|
inc mask_paintbits_params::mapbits+1
|
||||||
LA149: dey
|
: dey
|
||||||
bpl LA13A
|
bpl loop
|
||||||
rts
|
rts
|
||||||
|
.endproc
|
||||||
|
|
||||||
LA14D: ldx #0
|
;;; ============================================================
|
||||||
LA14F: add16 paintbits_params2::viewloc::xcoord,x, paintbits_params2::maprect::x1,x, paintrect_params6::x1,x
|
|
||||||
add16 paintbits_params2::viewloc::xcoord,x, paintbits_params2::maprect::x2,x, paintrect_params6::x2,x
|
.proc LA14D
|
||||||
|
ldx #0
|
||||||
|
loop: add16 icon_paintbits_params::viewloc::xcoord,x, icon_paintbits_params::maprect::x1,x, paintrect_params6::x1,x
|
||||||
|
add16 icon_paintbits_params::viewloc::xcoord,x, icon_paintbits_params::maprect::x2,x, paintrect_params6::x2,x
|
||||||
inx
|
inx
|
||||||
inx
|
inx
|
||||||
cpx #4
|
cpx #4
|
||||||
bne LA14F
|
bne loop
|
||||||
|
|
||||||
lda paintrect_params6::y2
|
lda paintrect_params6::y2
|
||||||
sec
|
sec
|
||||||
sbc #1
|
sbc #1
|
||||||
sta paintrect_params6::y2
|
sta paintrect_params6::y2
|
||||||
bcs LA189
|
bcs :+
|
||||||
dec paintrect_params6::y2+1
|
dec paintrect_params6::y2+1
|
||||||
LA189: rts
|
: rts
|
||||||
|
.endproc
|
||||||
|
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
;;; ============================================================
|
;;; ============================================================
|
||||||
|
Loading…
x
Reference in New Issue
Block a user