A92: Re: Quitting ASM or not -- please answer these questions


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

A92: Re: Quitting ASM or not -- please answer these questions



>l printed out J.Mardell's guide on 8.5x14 in. paper, l've read it all and
>things make sense!  However a couple of things are missing...


>1. Can l make a matrix like array in plusshell programs?  ls it defined the
> same way?

Arrays should work the same way in PlusShell as explained in Jimmy's guide.

>2. How can l display a sprite?  lf this is done by way of a library, and
the
>.h file tells how [input], don't bother with this question.


Jimmy Mardell wrote a fast 16x16 grayscale sprite routine. It was written
for Fargo I, however I've modified it slightly to work Fargo II / PlusShell
(it's attached).  Download sprmaker from ticalc.org for information about
it's usage.

>from: Library Input/Output
>Where can l find the parameters for all the functions in the new plusshell
>libraries?

Which ones can't you find?  Most are described in the HTML files in the DOCS
directory.

>from: Displaying sprites, help me and SimTown will be asm
>When making games (like Zelda) do asm programmers use arrays to place the
>sprites onto the screen at given locations?

Are you talking about map storage?  Yes, a map can be stored in a giant
"array", and each "tile" probably gets one byte.  Then you can draw the
screen simply by looking up the appropriate values in your array and calling
PutSprite (with the tile number in the d2 register) to draw the right tile
the screen.

>from: Using a 2 dimensional array to put sprites
>How can l sort of use "indirection" to put a sprite at a location?
...
>Now: let's say that d0 equals 00000001 (which in my SimTown game l might
want
>to be the code for a road tile).  l know that my label for the sprite can't
>start with a number, but l don't want to:
>cmp d0,00000001
>beq road_tile
>cmp d0,00000002
>beq clear_land
>lnstead, l want to somehow jump to what d0 equals.  so when d0 equals
00000001
>l want to somehow convert that value into a label it can jump to.

PutSprite can do this.  The d2 parameter specifies which sprite to put.  If
you want to know more about sprmaker, download the .zip file from
ticalc.org, it includes a DOS sprite editor and full docs.

-Don
----
Donald R Barnes
    don.barnes@wmich.edu
    http://www.geocities.com/SiliconValley/Park/1809/

PutSprite.asm