This chapter explains the structure of model data, material name specifications, and texture data handled by Sega Saturn.
POINT point_label[]={ POStoFIXED(x,y,z), POStoFIXED(x,y,z), POStoFIXED(x,y,z), POStoFIXED(x,y,z), ............. };
POINT:Point data x,y,z:Float type coordinate values
POLYGON polygon_label[]={ NORMAL(x,y,z), VERTICES(0,1,2,3), NORMAL(x,y,z), VERTICES(0,1,2,3), ............. };
NORMAL: Normal vector x,y,z:Float type coordinate values VERTICES: Point data of 4 points forming a polygon
ATTR attribute_label=[]={ ATTRIBUTE(Plane,Sort,Texture,Color,Gouraud,Mode,Dir,Option), ....... .... ..... ... ... ..... ... ..... };
ATTR: Attribute Plane: Attribute to determine whether back side is present or not Sort: Representative point of Z sort Texture: Texture name (No.) Color: Color data Gouraud: Attribute of Gouraud shading Mode: Drawing mode Dir: State of polygons and textures Option: Options and other functions
group | macro | Contents |
---|---|---|
[1] | No_Window | Not subject to restrictions within the window (default) | Window_In | Display inside Window | Window_Out | Display outside the window |
[2] | MESHoff | Normal display (default) | MESHon | Display as mesh |
[3] | ECdis | Disable EndCode | ECenb | Enable EndCode (default) |
[4] | SPdis | Also display transparent pixels (default) | SPenb | Do not display transparent pixels |
[5] | CL16Bnk | 16 colors Color bank mode (default) | CL16Look | 16 colors lookup table mode | CL64Bnk | 64 colors color bank mode | CL128Bnk | 128 colors color bank mode | CL256Bnk | 256 colors color bank mode | CL32KRGB | 32768 colors RGB mode |
[6] | CL_Replace | Overwrite (standard) mode (default) | CL_Shadow | shadow mode | CL_Half | half brightness mode | CL_Trans | Translucent mode | CL_Gouraud | gouraud shading mode |
macro | Contents |
---|---|
sprNoflip | Display texture normally |
sprHflip | Flip the texture horizontally |
sprVflip | Flip the texture vertically |
sprHVflip | Flip the texture vertically and horizontally |
sprPorygon | display polygons |
sprPolyLine | display polyline |
sprLine | Displays a straight line using the first two points |
macro | Contents |
---|---|
UseLight | Perform light source calculations |
UseClip | Do not display if a vertex goes off the screen |
Use Palette | Indicates that polygon colors are in palette format |
PDATA pdata_label[]={ point_label,n1, polygon_label,n2, attribute_label };
pdata_label: Indicates the PDATA type address to be passed to SGL. point_label: Indicates the address of the POINT type. nl: Indicates the number of points. polygon_label: Indicates the address of POLYGON type. n2: Indicates the number of polygons. attribute_label: Indicates the ATTR type address.
OBJECT object_label[]={ pdata_label, TRANSLATION(x,y,z), ROTATION(x,y,z), SCALING(x,y,z), object_child, object_sibling,
pdata_label: Indicates the PDATA type address. TRANSLATION: Indicates the amount of movement. ROTATION: Indicates the amount of rotation. SCALING: Indicates the amount of expansion. object_child: Indicates the address of the child's OBJECT type. object_sibling: Indicates the address of the sibling OBJECT type.
It becomes.
TEXDAT sample[]={ rgb,rgb,rgb,rgb,rgb,rgb,rgb,rgb rgb,rgb,rgb,rgb,rgb,rgb,rgb,rgb ...................................... };
TEXTB: Texture table sample: Indicates a label with texture data (file name as is) hsize,vsize: Texture size (hsize is always a multiple of 8) bgr: 1 pixel of texture data
B | G | R | |||||||||||||
1 | 4 | 3 | 2 | 1 | 0 | 4 | 3 | 2 | 1 | 0 | 4 | 3 | 2 | 1 | 0 |
Figure 4-1 Checkered texture
TEXDAT sample[]={ 0xffff,0x8000,0xffff,0x8000,0xffff,0x8000,0xffff,0x8000, 0x8000,0xffff,0x8000,0xffff,0x8000,0xffff,0x8000,0xffff };