home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / graphics / spritegen / docs / MakeSpGen next >
Encoding:
Text File  |  1992-09-28  |  3.2 KB  |  72 lines

  1. Usage: MakeSpGen
  2.          <Library>              name of auxillary Basic file
  3.          <Out>                  output sprite filename
  4.          [-Verbose <n>]         non-negative integer (0)
  5.          [-Debug]               error messages include line numbers (off)
  6.          [-Size <n>]            kilobytes of memory to reserve for generated file (100)
  7.          [-Radius <n>]          in OS units of sprites (60)
  8.          [-NFrame <n>]          positive integer (16)
  9.          [-Mode <n>]            screen MODE to create sprites in (9)
  10.          [-Prefix <string>]     each sprite named: <prefix>1, <prefix>2, ... ("a")
  11.          [-Extra <parameters>]  parameters specific to <Library>
  12.  
  13. This is an engine for generating a sprite file consisting of a number of
  14. frames of animation.  The sprites are all defined without a mask but
  15. with a palette.  The sprites themselves are square.
  16.  
  17. -------------------------------------------------------------------
  18.  
  19. The external Library file provides the following routines:
  20.  
  21. PROC_Define_Constants()
  22.   IN:   Called just the once, to initialise the library
  23.   OUT:  Internal defaults are set, and the following variables:
  24.                 Usage$ = help if -Extra parameter is invalid
  25.                 Param$ = OS_ReadArgs format string for -Extra parameter
  26.  
  27. PROC_Params(pointer)
  28.   IN:   Called once, after Define_Constants
  29.                 pointer!0 = Param$ argument 1
  30.                 pointer!4 = Param$ argument 2, etc..
  31.   OUT:  Default values are updated according to CLI parameters
  32.  
  33. PROC_Define_Palette()
  34.   IN:   Called to change palette
  35.         If verbose just called once, else called for each sprite, just
  36.         prior to the call to PROC_Draw_Frame
  37.   OUT:  Current palette is altered, if need to
  38.  
  39. PROC_Draw_Frame(
  40.         f,       (0, 1] = how much animated
  41.         xc,      OS co-ordinate of center (pixel middle)
  42.         yc)      OS co-ordinate of center (pixel middle)
  43.   IN:   called to draw each frame of animation
  44.         the background has been cleared to colour 0
  45.         the foreground colour is undefined
  46.         the following variables will be defined:
  47.                 RMax    OS unit radius of sprite to plot
  48.                 X       OS units per pixel width
  49.                 Y       OS units per pixel height
  50.                 HalfX   X / 2
  51.                 HalfY   Y / 2
  52.   OUT:  the sprite is plotted in the area
  53.           xc-RMax <= x <= xc+RMax, yc-RMax <= y <= yc+RMax
  54.   NOTE: basic always rounds down, so when PLOT xc+x+0.5, etc.
  55. -------------------------------------------------------------------
  56.  
  57. The engine contains some auxillary routines.
  58.  
  59. PROCerror()     Generates an error [ERROR ERR, FNreport]
  60. FNreport()      Returns REPORT$, but with line number information if Debug'ing
  61. PROCgeti(RETURN v, pointer)  integer
  62. PROCgetr(RETURN v, pointer)  real
  63. PROCgetz(RETURN v$, pointer) string
  64.                 if pointer != 0 then update variable
  65.                 these are used to read each -Extra parameter
  66. FNeval(string$) Better error message if EVAL(string$) fails
  67. PROC_Read_Colours(c$, RETURN Col%(), n_want)
  68.                 Used to process a "colour" string of form:
  69.                         rrGGbb:rrGGbb:rrGGbb:...:rrGGbb
  70.  
  71. -------------------------------------------------------------------
  72.