GetTPage

Calculates value of member tpage in a primitive

u_short GetTPage (
        int tp ,
        int abr,
        int x,
        int y
)

Arguments

tp Texture mode 
0: 4-bit CLUT 
1: 8-bit CLUT 
2: 16-bit Direct
abr 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
x, y Texture page address

Return Value

The calculated texture page ID is returned.

Explanation

The texture page ID of the texture page address specified by (x, y) is calculated and its value is returned.

Notes

The semi-transparency rate is also valid for polygons for which texture mapping is not performed.
The texture page address is limited to a multiple of 64 in the x direction and a multiple of 256 in the y direction.