Re: A89: Re: DoorsOS Libraries


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

Re: A89: Re: DoorsOS Libraries




> This is the exact asm file, and then I have a header file that just
> equ's the grayspr:: with the @000?
>
>    xdef _library
>    xdef _ti92plus
>    xdef _ti89
>
>    include "doorsos.h"
>    include "graphlib.h"
>
>    xdef grayspr@0000
>    xdef grayspr@0001
>
> ;put_4graysprite(...)
> ;Input:
> ;  d0.w = X
> ;  d1.w = Y
> ;  a0.l = Gray Sprite Location
> ;  a3.l = Plane 0
> ;  a4.l = Plane 1
> ;Output: nothing
> ;NO REGISTERS DESTROYED
>
> grayspr::put_4graysprite
> grayspr@0000:
> put_4graysprite:
>    movem.l d3-d4/a2,-(a7)
>
>    move.l a0,a2
>    move.w (a2)+,d3   ;Height
>    move.w (a2)+,d4   ;Width
>    mulu.w d3,d4      ;Height * Width

>    adda.w d3,a2
>    adda.w d3,a2
Change d3 to d4 here (the result of the multiplication).

>    move.l a3,a1
>
>    jsr graphlib::put_sprite2
>
>    addq.w #4,a0

>    adda.w d3,a0
>    adda.w d3,a2
Change d3 to d4 here (the result of the multiplication).
Also, remember that both of the sprite planes must contain width and height
information, so you should have to add #4 to a0 if I understand your routines
correctly.
Both things apply to the next function too.

>    move.l a4,a1
>
>    jsr graphlib::put_sprite2
>
>    movem.l (a7)+,d3-d4/a2
>    rts
>
> ;put_4graysprite2(...)
> ;Input:
> ;  d0.w = X
> ;  d1.w = Y
> ;  a0.l = Gray Sprite Location
> ;  a2.l = Masks
> ;  a3.l = Plane 0
> ;  a4.l = Plane 1
> ;Output: nothing
> ;NO REGISTERS DESTROYED
>
> grayspr::put_2greysprite
> grayspr@0001:
> put_4graysprite2:
>    movem.l d3/a2,-(a7)
>
>    move.l a0,a2
>    move.w (a2),d3   ;Height
>    mulu.w 2(a2),d3      ;Height * Width
>
>    move.l a3,a1
>
>    jsr graphlib::put_sprite2
>
>    addq.w #4,a0
>    adda.w d3,a0
>    adda.w d3,a2
>
>    move.l a4,a1
>
>    jsr graphlib::put_sprite2
>
>    movem.l (a7)+,d3/a2
>    rts
>
>    end


 / Niklas Brunlid
Check out Prosit for the TI-89 / TI-92+ at http://prosit.ticalc.org
Random PQF Quote follows:

"I'd like to know if I could compare you to a summer's day. Because --
well, June 12th was quite nice, and..."
        -- (Terry Pratchett, Wyrd Sisters)




Follow-Ups: References: