int CalculateMipMapLevel(int *level, int width, int height)
Select the Glide mip level for the larger dimension, clamping dimensions above 256.
int CalculateAspectRatioLevel(int *level, int width, int height)
Select the Glide aspect level from the truncated ratio of eight times the larger dimension.
unsigned ConvertN64Rgba5551ToArgb1555(unsigned color)
Swap the bytes of an N64 RGBA5551 colour and move its alpha bit to the high bit.
int GetGlideTexFormatBytesPerPixel(int format)
Get one byte for texture formats 2, 3, and 4, and two bytes for other formats.