/* * "ATTRIBUT.H" * * Part of The Escotia Playstation Library * * Functions to make programming a chore not a pleasure * * Author: ScoTT Campbell * Date: 11/9/98 * */ #ifndef __ESCATTRIHEADER #define __ESCATTRIHEADER /* Attribute Macros */ #define NORMAL_SEMI_TRANSPARENCY (unsigned long int)(0) #define PIXEL_ADDITION_TRANSPARENCY (unsigned long int)(1<<28) #define PIXEL_SUBTRACTION_TRANSPARENCY (unsigned long int)(1<<29) #define QUARTER_PIXEL_ADDITION_TRANSPARENCY (unsigned long int)(3<<29) #define SEMI_TRANSPARENCY_ON (unsigned long int)(1<<30) #define SEMI_TRANSPARENCY_OFF (unsigned long int)(0) #define DISPLAY_ON (unsigned long int)(0) #define DISPLAY_OFF (unsigned long int)(1<<31) unsigned long int CreateAttribute(unsigned long int transparencyType, unsigned long int transparencySwitch, unsigned long int displaySwitch); /* Pre: The three arguments given are from the above macros in the relevant order */ /* Post: The value returned will be the attribute value required to satisfy the specified macro attributes */ /* CreateAttribute() will give a value that can be assigned to the type who's attributes you want to set */ /* Note CreateSpriteAttribute() should be used for sprites */ /* These definitions only make sense when used with sprites */ #define SPRITE_BRIGHTNESS_REGULATION_ON (unsigned long int)(0) // Switch brightness regulation on #define SPRITE_BRIGHTNESS_REGULATION_OFF (unsigned long int)(1<<6) // Switch brightness regulation off #define SPRITE_ROTATION_ON (unsigned long int)(1<<27) // Switch rotation and scaling on #define SPRITE_ROTATION_OFF (unsigned long int)(0) // Switch rotation and scaling off unsigned long int CreateSpriteAttribute(unsigned long int brightnessSwitch, unsigned long int rotationSwitch, unsigned long int transparencyType, unsigned long int transparencySwitch, unsigned long int displaySwitch); /* Pre: The three arguments given are from the above macros in the relevant order */ /* Post: The value returned will be the attribute value required to satisfy the specified macro attributes */ /* CreateAttribute() will give a value that can be assigned to the sprite who's attributes you want to set */ /* Note CreateAttribute() should be used for types other than GsSPRITE */ #endif