A89: Re: Cutting off sprites


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

A89: Re: Cutting off sprites




In a message dated 8/26/99 8:38:28 PM Eastern Daylight Time, 
medlingn@zdnetmail.com writes:

> Ok.  For top\bottom cut offs, just make sure your draw loop only loops the 
> number of lines you want to draw, and start the address for the sprite at 
the 

whoa wait though....the problem l'm having is with getting the compiler to 
pass the register d2 as the "argument" for how high the sprite is supposed to 
be.  l can put in any decimal number in  place of d2 in the dc.w parts of 
sprite:, but putting %d2 there gives a "bad expression" error.
Down below,
    dc.w    %d2
is giving the error.

sprite(x,y,lines)
int x;
int y;
int lines;
{
asm("
    move.w 8(%sp),%d0
    move.w 10(%sp),%d1
    move.w 12(%sp),%d2
    lea sprites(%PC),%a0
    bra oversprite
sprites:
    dc.w    %d2 //problem here
    dc.w    3
    dc.b    255,255,255
    dc.b    255,255,255
    dc.b    255,255,255
    dc.b    255,255,255
    dc.b    255,255,255
    dc.b    255,255,255
    dc.b    255,255,255
    dc.b    255,255,255
    dc.b    255,255,255
    dc.b    255,255,255
    dc.b    255,255,255
    dc.b    255,255,255
    dc.b    255,255,255
    dc.b    255,255,255
    dc.b    255,255,255
    dc.b    255,255,255
    dc.b    255,255,255
    dc.b    255,255,255
    dc.b    255,255,255
    dc.b    255,255,255
    dc.b    255,255,255
    dc.b    255,255,255
    dc.b    255,255,255
    dc.b    255,255,255
oversprite:
");
put_sprite();
};


Follow-Ups: