Re: A86: Re: moving a sprite


[Prev][Next][Index][Thread]

Re: A86: Re: moving a sprite




In a message dated 9/16/98 7:54:59 PM Pacific Daylight Time,
assets@eden.rutgers.edu writes:

<< Yeah, you only copied half of it.  This is just a findpixel routine that
 jumps to (bc) at the end. >>

I tried it with the WHOLE thing and it still didn't work.  I included the code
jsut in case the original putsprite had problems unnoticible to the amatuer
eye.


Draw_Sprite:
ld h,63 
ld a,c 
add a,a 
add a,a 
ld l,a 
add hl,hl 
add hl,hl 
ld a,b	 
rra 
rra 
rra 
or l	 
ld l,a 
ld a,7	 
and b
ld d,a		
ld e,8	
push bc

ps_loop: 
ld b,d		 
ld a,(ix)			 
inc ix		 
ld c,0 
call bit_shift 
xor (hl)		 
ld (hl),a 
inc l 
ld a,(hl) 
xor c			 
ld (hl),a 
ld a,15		 
call add_hl_a 
dec e		 
jr nz,ps_loop 
pop bc
ret

add_hl_a:		 
add a,l 
ld l,a 
ret nc 
inc h 
ret

bit_shift:			 
dec b		 
ret m 
srl a
rr c 
jr bit_shift
.end


Thanks,
BlAsTo1414


Follow-Ups: