home *** CD-ROM | disk | FTP | other *** search
- Usage: MakeSpGen
- <Library> name of auxillary Basic file
- <Out> output sprite filename
- [-Verbose <n>] non-negative integer (0)
- [-Debug] error messages include line numbers (off)
- [-Size <n>] kilobytes of memory to reserve for generated file (100)
- [-Radius <n>] in OS units of sprites (60)
- [-NFrame <n>] positive integer (16)
- [-Mode <n>] screen MODE to create sprites in (9)
- [-Prefix <string>] each sprite named: <prefix>1, <prefix>2, ... ("a")
- [-Extra <parameters>] parameters specific to <Library>
-
- This is an engine for generating a sprite file consisting of a number of
- frames of animation. The sprites are all defined without a mask but
- with a palette. The sprites themselves are square.
-
- -------------------------------------------------------------------
-
- The external Library file provides the following routines:
-
- PROC_Define_Constants()
- IN: Called just the once, to initialise the library
- OUT: Internal defaults are set, and the following variables:
- Usage$ = help if -Extra parameter is invalid
- Param$ = OS_ReadArgs format string for -Extra parameter
-
- PROC_Params(pointer)
- IN: Called once, after Define_Constants
- pointer!0 = Param$ argument 1
- pointer!4 = Param$ argument 2, etc..
- OUT: Default values are updated according to CLI parameters
-
- PROC_Define_Palette()
- IN: Called to change palette
- If verbose just called once, else called for each sprite, just
- prior to the call to PROC_Draw_Frame
- OUT: Current palette is altered, if need to
-
- PROC_Draw_Frame(
- f, (0, 1] = how much animated
- xc, OS co-ordinate of center (pixel middle)
- yc) OS co-ordinate of center (pixel middle)
- IN: called to draw each frame of animation
- the background has been cleared to colour 0
- the foreground colour is undefined
- the following variables will be defined:
- RMax OS unit radius of sprite to plot
- X OS units per pixel width
- Y OS units per pixel height
- HalfX X / 2
- HalfY Y / 2
- OUT: the sprite is plotted in the area
- xc-RMax <= x <= xc+RMax, yc-RMax <= y <= yc+RMax
- NOTE: basic always rounds down, so when PLOT xc+x+0.5, etc.
- -------------------------------------------------------------------
-
- The engine contains some auxillary routines.
-
- PROCerror() Generates an error [ERROR ERR, FNreport]
- FNreport() Returns REPORT$, but with line number information if Debug'ing
- PROCgeti(RETURN v, pointer) integer
- PROCgetr(RETURN v, pointer) real
- PROCgetz(RETURN v$, pointer) string
- if pointer != 0 then update variable
- these are used to read each -Extra parameter
- FNeval(string$) Better error message if EVAL(string$) fails
- PROC_Read_Colours(c$, RETURN Col%(), n_want)
- Used to process a "colour" string of form:
- rrGGbb:rrGGbb:rrGGbb:...:rrGGbb
-
- -------------------------------------------------------------------
-