| I uploaded xspecs.lzh (Robert's archive) and xspecssas.lzh (the files I
modifed for SAS C) to EOT::Amiga:[upload].
This is the list of routines in the library (from the readme file in
xspecssas.lzh).
Robert's archive did not include documentation for the xspecs library.
The following is the list of routine declarations given in the xspecs.h
include file. The names are pretty obvious if you have been programming
the Amiga much. I have included the return codes given in xspecs.h.
The argument descriptions are my best guesses after reading the example and
playing a bit. As with any guess, no warantee for correctness is stated
or implied :-) Some of the routines I have not used, but guessed at anyway.
I marked these routines with an @ sign 'cause you are taking my word for
it @ your own risk.
LONG XSpecsAllocateView __ARGS( (long) );
arg: appears to be the modes bits for the ViewPort structure
(defined in <graphics/view.h>). The example defines it as
0xC000 which would be the flags HIRES and SPRITES)
returns:
XCANTALLOCVIEW /* Can't allocate two Views and related items */
XIMPROPERVIEWMODE /* Improper View Modes Specified in call */
XVIEWALLOCATED /* Success! */
VOID XSpecsDeallocateView();
struct MsgPort *XSpecsOn __ARGS( (long) );
Starts the Xspecs flickering.
arg: appears to be the IDCMP flags to use with the window.
returns:
The message port to receive windows events on OR
XNOUSERPORT /* Function was unsucccessful */
VOID XSpecsOff();
Stops the Xspecs.
VOID XSpecsSetAPen __ARGS( (ULONG) );
Set pen to use for drawing, writing
arg: pen number
@ VOID XSpecsSetRGB4 __ARGS( (ULONG, ULONG, ULONG, ULONG) );
Set color of given pen
arg1: pen number (0..31)
arg2: red intensity (0..15)
arg3: green intensity (0..15)
arg4: blue intensity (0..15)
VOID XSpecsLoadRGB4 __ARGS( (APTR, ULONG) );
Load color table into color registers
arg1: pointer to color table array
arg2: number of words in array
LONG XSpecsText __ARGS( (APTR, LONG, LONG, LONG, ULONG) );
Draw the given text string
arg1: pointer to text string
arg2,3,4: x,y,z coordinate to place string at
arg5: number of bytes in string
returns:
COORGOOD /* Success! */
COOROUTERLIMITS /* Attempted to move outside of screen limits */
@ LONG XSpecsWritePixel __ARGS( (LONG, LONG, LONG ) );
Write a pixel
arg1,2,3: x,y,z coordinates
returns:
COORGOOD /* Success! */
COOROUTERLIMITS /* Attempted to move outside of screen limits */
LONG XSpecsDraw __ARGS( (LONG, LONG, LONG) );
arg1,2,3: x,y,z coordinate to draw to
returns:
COORGOOD /* Success! */
COOROUTERLIMITS /* Attempted to move outside of screen limits */
LONG XSpecsChangeSprite __ARGS( (APTR, ULONG) );
arg1: pointer to sprite image (in chip memory)
arg2: sprite number
returns:
XSPRITECHANGED /* Success! */
XNOSPRITENUM /* Have to call XSpecsGetSprite() first */
LONG XSpecsMoveSprite __ARGS( (LONG, LONG, LONG, LONG, LONG, ULONG) );
arg1,2,3: x,y,z
arg4,5: ?
arg6: sprite number
returns:
COORGOOD /* Success! */
COOROUTERLIMITS /* Attempted to move outside of screen limits */
@ LONG XSpecsLeftXY __ARGS( (LONG, LONG, LONG) );
I guess that this returns the x,y screen coord for the left eye image of
a given x,y,z 3D location.
arg1,2,3: x,y,z
returns:
XPOINTOUTERLIMITS /* Point is Outside of screen limits */
/* Need to also create a define which will extract the x and y value from */
/* the value returned from these functions. x = bits 31-16 and y = 15-0 */
@ LONG XSpecsRightXY __ARGS( (LONG, LONG, LONG) );
I guess that this returns the x,y screen coord for the right eye image of
a given x,y,z 3D location.
arg1,2,3: x,y,z
returns:
same as XSpecsLeftXY
@ struct RastPort *XSpecsLeftRastPort();
guess: get rast port for left eye image
@ struct RastPort *XSpecsRightRastPort();
guess: get rast port for right eye image
@ struct ViewPort *XSpecsLeftViewPort();
guess: get viewport for left eye image
@ struct ViewPort *XSpecsRightViewPort();
guess: get viewport for right eye image
@ VOID XSpecsSetDrMd __ARGS( (ULONG) );
Set drawing mode
arg1: draw mode (JAM1, JAM2, ..|INVERSVID)
LONG XSpecsPolyDraw __ARGS( (APTR, ULONG) );
Draw a set of connected lines
arg1: pointer to array of x,y,z coords
arg2: number of points in array (number of x,y,z coord triples)
returns:
COORGOOD /* Success! */
COOROUTERLIMITS /* Attempted to move outside of screen limits */
LONG XSpecsMove __ARGS( (LONG, LONG, LONG) );
Move to x,y,z
arg1,2,3: x,y,z
returns:
COORGOOD /* Success! */
COOROUTERLIMITS /* Attempted to move outside of screen limits */
LONG XSpecsGetSprite __ARGS( (APTR, APTR, ULONG) );
Get a sprite
arg1: pointer to SimpleSprite structure
arg2: pointer to sprite image in chip memory
arg3: sprite number
Returns:
XNOSPRITEASS /* Unable to assign the sprite */
VOID XSpecsFreeSprite __ARGS( (ULONG) );
arg: sprite number
LONG XSpecsTime();
Returns absolute time value of some sort. I bet it increments every
time an eye is exposed, so waiting for it to increment by at least two
(which is what the demo does) guarantees that both left and right eyes have
seen the data.
|