SYSSPR
                                    ======

                            System Sprite Utilities


A set of system sprite utilities first developed for Sprv/Msprv to get
information on sprites. Basically just wrappers for the corresponding
vectored utilities.


Usage:
------

SET_SSPR

        SET_SSPR sprite_no%, address

        Set system sprite

where
        sprite_no% is the system sprite to replace (see list below), and
        address    is the address of the replacement sprite

Note: a system sprite may not be larger than max 64x64 pix !

Note: This command is not the same as EasyPtr's SPRS, or Qptr's CH_PTR,
      which only set the default sprite for a given (sub)window.


GET_SSPR

        address = GET_SSPR(no%)

        Get the address of a system sprite, given the number

where
        address is the address of the sprite, or an error code or 0
        no%     is the system sprite number (see list below)

  alternatively:

        max | current = GET_SSPR(-1)

where max is space in systems sprite table and
        current is the number of system sprites currently defined

Note the result of this call should be checked!
        If the address returned is 0, then no sprite of that number is defined

    Possible negative results are:
          IPAR => Illegal sprite number (set/get)
          ITNF => there are no system sprites!


GET_FSPR

        fsddr = GET_FSPR(address)

        Given the address of a (possible) chain of sprites, return the
        address of a fitting sprite for the display mode

where
        fsaddr is the address of the fitting sprite - or system sprite #0
        address  is the address of the first sprite in the chain



Note: In all cases above a "hard" IPAR error implies wrong number or type
of parameters.


What are system sprites?
------------------------

System sprites are those currently defined inside the Pointer Environment
and in SMSQ/E.

System sprites (currently 38)
:
sp.arrow     = 0
sp.lock      = 1
sp.null      = 2
sp.mode      = 3
sp.key       = 4
sp.busy      = 5
sp.wmove     = 6        : rem window sprite for move window
sp.wsize     = 7        : rem window sprite for resize window
sp.wmovep    = 8        : rem mouse pointer for move window
sp.wsizep    = 9        : rem mouse pointer for resize window
sp.sleep     = 10
sp.wake      = 11
sp.f1        = 12
sp.f2        = sp.f1+1
sp.f3        = sp.f1+2
sp.f4        = sp.f1+3
sp.f5        = sp.f1+4
sp.f6        = sp.f1+5
sp.f7        = sp.f1+6
sp.f8        = sp.f1+7
sp.f9        = sp.f1+8  : rem 20
sp.f10       = sp.f1+9
sp.f11       = sp.f1+10
sp.f12       = sp.f1+11
sp.cf1       = sp.f1+12 : rem 24
sp.cf2       = sp.cf1+1
sp.cf3       = sp.cf1+2
sp.cf4       = sp.cf1+3
sp.cf5       = sp.cf1+4
sp.cf6       = sp.cf1+5
sp.cf7       = sp.cf1+6 : rem 30
sp.cf8       = sp.cf1+7
sp.cf9       = sp.cf1+8
sp.cf10      = sp.cf1+9
sp.cf11      = sp.cf1+10
sp.cf12      = sp.cf1+11
sp.cursor    = 36
sp.curflash  = 37
:
sp.max       = 64       : rem maximum number of system sprites


The included example script dev4_spr_sys_mksysspr_bas illustrates how to
produce these sprites as usable sprites. That requires this toolkit loaded
and access to the SMSQ/E source code.


Status of software:
--------------------

V0.01, ©PWitte, March 2oo4
V0.02, pjw, December 2oi8, name change
V0.03, pjw, June 5th 2019, modularised, better checking of parameters
V0.04, pjw, 2020 Jun 09, added get info, also simplified some code

               Conditions of use and DISCLAIMER as per Knoware.no