coastline 0.0.4
Loading...
Searching...
No Matches
texture.h
Go to the documentation of this file.
1#ifndef COASTLINE_PLATFORM_WIN_GLIDE_TEXTURE_H
2#define COASTLINE_PLATFORM_WIN_GLIDE_TEXTURE_H
3
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12
18int CalculateMipMapLevel(int *level, int width, int height);
19
25int CalculateAspectRatioLevel(int *level, int width, int height);
26
32
37unsigned ConvertN64Rgba5551ToArgb1555(unsigned color);
38
39#ifdef __cplusplus
40}
41#endif
42
43#endif /* COASTLINE_PLATFORM_WIN_GLIDE_TEXTURE_H */
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.