/* * "ESCPIXEL.H" * * Part of The Escotia Playstation Library * * Functions to make programming a chore not a pleasure * * Author: ScoTT Campbell * Date: 18/9/98 */ #ifndef __ESCPIXELHEADER #define __ESCPIXELHEADER /* EsGBOXO */ /* Rectangle handler with gradation */ typedef struct{ unsigned long int attribute; short int x,y; unsigned char r, g, b; }EsPIXEL; /* Members * attribute Attribute bits as shown below. (Bits not * defined below are reserved by the system) * * 28-29: Semi-transparency rate * 0: 0.5 x Back + 0.5 x Forward * 1: 1.0 x Back + 1.0 x Forward * 2: 1.0 x Back - 1.0 x Forward * 3: 1.0 x Back + 0.25 x Forward * * 30: Semi-transparency mode * 0: Semi-transparency OFF * 1: Semi-transparency ON * * 31: Display Mode * 0: Enable display * 1: Disable display * * x, y Display position * r, g, b Drawing colour */ /******************************/ /* Start of EsPIXEL functions */ /******************************/ void InitPixel(EsPIXEL* pixelPtr, int xPosition, int yPosition); /* Initialisation of a pixel in one easy function */ /* xPosition and yPosition are the display position for the pixel */ /* and can be changed after initialisation using MovePixel() or SetPixelPosition() */ /* The pixel's attributes are set to a default of no transparency and display enabled */ /* and can be changed with the function SetPixelAttributes() */ /* The pixel is set to a default colour of white. This can be changed using */ /* SetPixelColour() or SetPixelColourVector() */ void SetPixelPosition(EsPIXEL* pixelPtr, int xPosition, int yPosition); /* Pixel pointed to by pixelPtr has display position changed to (xPosition, yPosition) */ void SetPixelXPosition(EsPIXEL* pixelPtr, int xPosition); /* Pixel pointed to by pixelPtr has display X position changed to xPosition */ void SetPixelYPosition(EsPIXEL* pixelPtr, int yPosition); /* Pixel pointed to by pixelPtr has display Y position changed to yPosition */ void MovePixel(EsPIXEL* pixelPtr, int xAmount, int yAmount); /* Pixel pointed to by pixelPtr has display position adjusted by (xAmount, yAmount) */ void SetPixelAttributes(EsPIXEL* pixelPtr, unsigned long int attributes); /* Pixel pointed to by pixelPtr has attributes set to value specified by attributes */ void SetPixelColourVector(EsPIXEL* pixelPtr, CVECTOR* colourVectorPtr); /* Pixel pointed to by pixelPtr has it's colour set to the values of *colourVectorPtr */ void SetPixelColour(EsPIXEL* pixelPtr, unsigned char r, unsigned char g, unsigned char b); /* Pixel pointed to by pixelPtr has it's colour set to r, g, b */ void EsSortPixel(EsPIXEL* pixelPtr, GsOT* otPtr, unsigned short int pri); /* Enters a pixel into position pri of an OT pointed to by otPtr */ /****************************/ /* End of EsPIXEL functions */ /****************************/ #endif