1
; void __CALLEE__ sp1_PrintAtInv_callee(uchar row, uchar col, uint tile)
2
; 01.2008 aralbrec, Sprite Pack v3.0
3
; ts2068 hi-res version
5
XLIB sp1_PrintAtInv_callee
6
XDEF ASMDISP_SP1_PRINTATINV_CALLEE
8
LIB sp1_GetUpdateStruct_callee, sp1_PrintAt_callee
9
XREF ASMDISP_SP1_GETUPDATESTRUCT_CALLEE, ASMDISP_SP1_PRINTAT_CALLEE
12
.sp1_PrintAtInv_callee
23
; Print tile and colour to given coordinate and invalidate
24
; the tile so that it is redrawn in the next update.
26
; enter : d = row coord
29
; uses : af, bc, de, hl
33
call sp1_GetUpdateStruct_callee + ASMDISP_SP1_GETUPDATESTRUCT_CALLEE
37
jp p, sp1_PrintAt_callee + ASMDISP_SP1_PRINTAT_CALLEE + 3 ; if already marked for invalidation just do PrintAt
38
ld (hl),a ; mark struct_sp1_update as invalidated
41
ld d,h ; de = & struct sp1_update
43
ld (hl),c ; write tile
49
ld (hl),0 ; mark no struct sp1_update following in invalidated list
51
ld hl,(SP1V_UPDATELISTT) ; current last sp1_update in invalidated list
54
ld (hl),d ; store this new sp1_update into current tail
57
ld (SP1V_UPDATELISTT),de ; this new struct sp1_update is now the tail in invalidated list
61
DEFC ASMDISP_SP1_PRINTATINV_CALLEE = asmentry - sp1_PrintAtInv_callee