2021-09-03 04:31:15 +00:00
|
|
|
;======================
|
|
|
|
; hgr 2x16 draw sprite
|
|
|
|
;======================
|
|
|
|
; Note: NOT TRANSPARENT
|
|
|
|
;
|
|
|
|
; SPRITE in INL/INH
|
|
|
|
; Location at CURSOR_X*7 CURSOR_Y
|
|
|
|
; X, Y, A trashed
|
|
|
|
|
|
|
|
hgr_draw_sprite_2x16:
|
|
|
|
|
|
|
|
; set up pointers
|
|
|
|
lda INL
|
|
|
|
sta hds2_smc1+1
|
2021-09-04 04:30:47 +00:00
|
|
|
sta hds2_smc2+1
|
2021-09-03 04:31:15 +00:00
|
|
|
lda INH
|
|
|
|
sta hds2_smc1+2
|
2021-09-04 04:30:47 +00:00
|
|
|
sta hds2_smc2+2
|
|
|
|
|
|
|
|
; clc
|
|
|
|
; lda INL
|
|
|
|
; adc #1
|
|
|
|
; sta hds2_smc2+1
|
|
|
|
; lda #0
|
|
|
|
; adc INH
|
|
|
|
; sta hds2_smc2+2
|
2021-09-03 04:31:15 +00:00
|
|
|
|
|
|
|
ldx #0
|
|
|
|
hgr_2x16_sprite_yloop:
|
|
|
|
txa
|
|
|
|
pha
|
|
|
|
|
2021-09-04 04:30:47 +00:00
|
|
|
lsr
|
|
|
|
|
2021-09-03 04:31:15 +00:00
|
|
|
clc
|
|
|
|
adc CURSOR_Y
|
|
|
|
|
|
|
|
tax
|
|
|
|
lda hposn_low,X
|
|
|
|
sta GBASL
|
|
|
|
lda hposn_high,X
|
|
|
|
sta GBASH
|
|
|
|
|
|
|
|
pla
|
|
|
|
tax
|
|
|
|
|
|
|
|
ldy CURSOR_X
|
|
|
|
hds2_smc1:
|
2021-09-04 04:30:47 +00:00
|
|
|
lda $D000,X
|
|
|
|
sta (GBASL),Y
|
|
|
|
|
|
|
|
inx
|
|
|
|
iny
|
|
|
|
|
|
|
|
hds2_smc2:
|
|
|
|
lda $D000,X
|
2021-09-03 04:31:15 +00:00
|
|
|
sta (GBASL),Y
|
|
|
|
|
|
|
|
inx
|
2021-09-04 04:30:47 +00:00
|
|
|
cpx #32
|
2021-09-03 04:31:15 +00:00
|
|
|
bne hgr_2x16_sprite_yloop
|
|
|
|
|
|
|
|
rts
|