Re: A82: 83 port : scalespr
[Prev][Next][Index][Thread]
Re: A82: 83 port : scalespr
Thank you, I was sure it was because of a stupid error but I couldn't find it
:-(
Eric
On Wed, 10 May 2000, Sam Heald wrote:
>
> The 83 version clears the graph memory during the display loop. Yours
> doesn't. This works fine:
>
> start:
> ld hl,$0000 ; initial scale factor
> ld b,17 ; number of frames
> aniLoop:
> push bc
>
> push hl
> ld hl,GRAPH_MEM
> ld (hl),0
> ld de,GRAPH_MEM+1
> ld bc,767
> ldir
> pop hl
>
> push hl
> ld b,SPR_HEIGHT
> ld c,SPR_WIDTH
> call getScaledSize ; A = scaled height, H = scaled width
> ld b,a ; calculations to centre sprite on screen...
> ld a,SPR_HEIGHT+(2*Y_OFFSET)
> sub b
> sra a
> ld e,a ; E = y-position
> ld a,SPR_WIDTH+(2*X_OFFSET)
> sub h
> sra a ; A = x-position
> pop hl
>
> push hl
> ld b,SPR_HEIGHT
> ld c,SPR_WIDTH/8
> ld ix,picShoes
> call putScaledSprite
> call CR_GRBCopy
> pop hl
>
> ld de,$0010 ; increase scale factor
> add hl,de
>
> pop bc
> djnz aniLoop ; display next frame
>
> jp CR_KHAND
> ________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
>
>
References: