Return to previous page | Return to menu | Go to next page
Macro
Specify polygon attributes
#define ATTRIBUTE(plane,sort,texture,color,gouraud,mode,dir, option)
{
Plane, (sort) | (((dir) >> 16) & 0x01c) | (option),
Texture, (mode) | (((dir) >> 24) & 0xc0, color, /
Gouraud, (dir) & 0x03f
}
Uint8 plane ;
Uint8 sort ;
Uint16 texture ;
Uint16 color ;
Uint16 gouraud ;
Uint16 mode ;
Uint32 dir ;
Uint16 option ;
plane Front / back attribute sort Z sort specification texture Texture number or No_Texture color C_RGB macro specified color, color palette number or No_Palet gouraud Gouraud table or No_Gouraud mode Specify various modes for polygon dir Specify the texture display direction, etc. option Other settings for polygon
Set surface attributes related to polygon drawing (especially polygon surface).
For the meaning of each parameter and details of the assigned value,
Refer to Programmer's Tutorial “Chapter 7: Polygon surface attributes”.
Also refer to “ATTRIBUTE macro substitution value list” at the end of the structure reference.
The member “color” may specify the color bank number when using textures.
Reference: Chapter 7 Polygon surface attributes
ATTRIBUTE