coastline 0.0.4
Loading...
Searching...
No Matches
texrect.h
Go to the documentation of this file.
1#ifndef COASTLINE_TEXRECT_H
2#define COASTLINE_TEXRECT_H
3
8
9#include <PR/ultratypes.h>
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
25
27typedef void *(*AssetAllocator)(u32 size);
28
30enum {
36};
37
49
61
87 s32 x,
88 s32 y,
89 s32 width,
90 s32 height,
91 s32 primRed,
92 s32 primGreen,
93 s32 primBlue,
94 s32 primAlpha,
95 s32 envRed,
96 s32 envGreen,
97 s32 envBlue,
98 s32 envAlpha,
99 s32 blendMode);
100
115void GetTextureScaleAndMask(u32 size, s32 *scale, s32 *maskBits);
116
134 u8 *texture, s32 width, s32 height, s32 x, s32 y, s32 drawWidth, s32 drawHeight);
135
156 s32 width,
157 s32 height,
158 s32 x,
159 s32 y,
160 s32 drawWidth,
161 s32 drawHeight,
162 s32 red,
163 s32 green,
164 s32 blue);
165
166#ifdef __cplusplus
167}
168#endif
169
170#endif /* COASTLINE_TEXRECT_H */
A compressed texture of the cartridge and the memory it is loaded into.
Definition texrect.h:16
u8 format
Definition texrect.h:22
u16 height
Definition texrect.h:21
u32 romStart
Definition texrect.h:17
u8 * pixels
Definition texrect.h:19
u16 width
Definition texrect.h:20
u8 size
Definition texrect.h:23
u32 romEnd
Definition texrect.h:18
void DrawRedIntensityRect(u8 *texture, s32 width, s32 height, s32 x, s32 y, s32 drawWidth, s32 drawHeight)
Draw a texture stretched over a rectangle and upside down, shaded from black to red by its intensity.
void AllocAndDmaLoadAsset(Texture *texture, AssetAllocator alloc)
Allocate memory for an uncompressed texture and copy it there from the cartridge.
void DrawColoredTexturedRect(u8 *texture, s32 width, s32 height, s32 x, s32 y, s32 drawWidth, s32 drawHeight, s32 red, s32 green, s32 blue)
Draw a colour through a texture stretched over a rectangle and upside down, with the intensity of the...
@ TEXRECT_BLEND_SHADED
Definition texrect.h:34
@ TEXRECT_BLEND_SHADED_OPAQUE
Definition texrect.h:35
@ TEXRECT_BLEND_TEXTURE_2
Definition texrect.h:33
@ TEXRECT_BLEND_TEXTURE
Definition texrect.h:31
@ TEXRECT_BLEND_COLOR_THROUGH_TEXTURE
Definition texrect.h:32
void LoadAndDecompressAsset(Texture *texture, AssetAllocator alloc)
Allocate memory for a texture and decompress it there from the cartridge.
void *(* AssetAllocator)(u32 size)
An allocator of memory for a loaded asset.
Definition texrect.h:27
void GetTextureScaleAndMask(u32 size, s32 *scale, s32 *maskBits)
Get the texture coordinate scale of a texture side, and the bits of the mask that wraps it.
void DrawTexturedRect(Texture *texture, s32 x, s32 y, s32 width, s32 height, s32 primRed, s32 primGreen, s32 primBlue, s32 primAlpha, s32 envRed, s32 envGreen, s32 envBlue, s32 envAlpha, s32 blendMode)
Draw a texture over a rectangle of the screen, in strips that fit the texture memory,...
Integer and floating-point types of libultra.
unsigned int u32
Definition ultratypes.h:20
unsigned short u16
Definition ultratypes.h:19
int s32
Definition ultratypes.h:25
unsigned char u8
Definition ultratypes.h:18