sp1_DrawUpdateStructIfNotRem.asm
bitfixer_bitfixer/dg/z88dk/libsrc/sprites/software/sp1/spectrum/updater/sp1_DrawUpdateStructIfNotRem.asm

; sp1_DrawUpdateStructIfNotRem(struct sp1_update *u)
; 12.2006 aralbrec, Sprite Pack v3.0
; sinclair spectrum version

; FASTCALL

PUBLIC sp1_DrawUpdateStructIfNotRem
EXTERN SP1DrawUpdateStruct

; Draw the char's graphics to screen if it hasn't
; been removed.  Validates char as well.
;
; enter : hl = & struct sp1_update
; uses  : af, bc, de, hl, ix, b' for MaskLB and MaskRB sprites

.sp1_DrawUpdateStructIfNotRem

   bit 6,(hl)
   ret nz                    ; do not draw if removed
   
   ld a,(hl)
   and $7f
   ld (hl),a                 ; validate char
   
   ld b,a
   jp SP1DrawUpdateStruct
