17extern uint32_t TPX_RSP_ID;
21 TPX_CMD_SYNC_T3D = 0x0,
22 TPX_CMD_DRAW_COLOR = 0x1,
23 TPX_CMD_MATRIX_STACK = 0x2,
24 TPX_CMD_SET_DMEM = 0x3,
25 TPX_CMD_DRAW_TEXTURE = 0x4,
54static_assert(sizeof(TPXParticleS8) == 16, "TPXParticleS8 size mismatch");
59[[deprecated("Use 'TPXParticleS8' instead")]] typedef TPXParticleS8
TPXParticle;
72static_assert(sizeof(TPXParticleS16) == 24, "TPXParticle16 size mismatch");
133inline static
void tpx_particle_draw(TPXParticleS8 *particles, uint32_t count) {
164[[deprecated(
"Use 'tpx_particle_draw_tex_s8' instead")]]
165inline static void tpx_particle_draw_tex(TPXParticleS8 *particles, uint32_t count) {
227 return (idx & 1) ? pt[idx/2].posB : pt[idx/2].posA;
230[[deprecated(
"Use 'tpx_buffer_s8_get_pos' instead")]]
231static inline int8_t* tpx_buffer_get_pos(TPXParticleS8 pt[],
int idx) {
241 return (idx & 1) ? &pt[idx/2].sizeB : &pt[idx/2].sizeA;
244[[deprecated(
"Use 'tpx_buffer_s8_get_size' instead")]]
245static inline int8_t* tpx_buffer_get_size(TPXParticleS8 pt[],
int idx) {
255 return (idx & 1) ? (uint32_t*)&pt[idx/2].colorB : (uint32_t*)&pt[idx/2].colorA;
258[[deprecated(
"Use 'tpx_buffer_s8_get_color' instead")]]
259static inline uint32_t* tpx_buffer_get_color(TPXParticleS8 pt[],
int idx) {
269 return (idx & 1) ? pt[idx/2].colorB : pt[idx/2].colorA;
272[[deprecated(
"Use 'tpx_buffer_s8_get_rgba' instead")]]
273static inline uint8_t* tpx_buffer_get_rgba(TPXParticleS8 pt[],
int idx) {
283 return (idx & 1) ? pt[idx/2].posB : pt[idx/2].posA;
292 return (idx & 1) ? &pt[idx/2].sizeB : &pt[idx/2].sizeA;
301 return (idx & 1) ? pt[idx/2].colorB : pt[idx/2].colorA;
311 return (idx & 1) ? &pt[idx/2].texOffsetA : &pt[idx/2].texOffsetB;
322[[deprecated(
"Use 'tpx_buffer_s8_swap' instead")]]
323static inline void tpx_buffer_swap(TPXParticleS8 pt[], uint32_t idxA, uint32_t idxB) {
344[[deprecated(
"Use 'tpx_buffer_s8_copy' instead")]]
345static inline void tpx_buffer_copy(TPXParticleS8 pt[], uint32_t idxDst, uint32_t idxSrc) {
__attribute__((deprecated)) void t3d_debug_print_init()
Initializes the debug print system, make sure to have 'font.ia4.png' in your FS.
void tpx_state_set_base_size(uint16_t baseSize)
Definition tpx.c:69
static uint8_t * tpx_buffer_s16_get_tex_offset(TPXParticleS16 pt[], int idx)
Definition tpx.h:310
void tpx_init(TPXInitParams params)
Initializes the tinyPX library.
Definition tpx.c:21
void tpx_buffer_s16_swap(TPXParticleS16 pt[], uint32_t idxA, uint32_t idxB)
Definition tpx.c:167
void tpx_particle_draw_tex_s16(TPXParticleS16 *particles, uint32_t count)
Definition tpx.c:126
void tpx_state_set_tex_params(int16_t offsetX, uint16_t mirrorPoint)
Definition tpx.c:73
static int8_t * tpx_buffer_s8_get_size(TPXParticleS8 pt[], int idx)
Definition tpx.h:240
void tpx_destroy()
Definition tpx.c:200
static uint8_t * tpx_buffer_s8_get_rgba(TPXParticleS8 pt[], int idx)
Definition tpx.h:268
void tpx_matrix_push_pos(int count)
Definition tpx.c:151
static uint8_t * tpx_buffer_s16_get_rgba(TPXParticleS16 pt[], int idx)
Definition tpx.h:300
static int8_t * tpx_buffer_s8_get_pos(TPXParticleS8 pt[], int idx)
Definition tpx.h:226
void tpx_particle_draw_s8(TPXParticleS8 *particles, uint32_t count)
Definition tpx.c:114
void tpx_matrix_set(const T3DMat4FP *mat, bool doMultiply)
Definition tpx.c:138
void tpx_buffer_s8_swap(TPXParticleS8 pt[], uint32_t idxA, uint32_t idxB)
Definition tpx.c:156
static int16_t * tpx_buffer_s16_get_pos(TPXParticleS16 pt[], int idx)
Definition tpx.h:282
void tpx_matrix_pop(int count)
Definition tpx.c:146
static uint32_t * tpx_buffer_s8_get_color(TPXParticleS8 pt[], int idx)
Definition tpx.h:254
void tpx_matrix_push(const T3DMat4FP *mat)
Definition tpx.c:142
void tpx_state_from_t3d()
Definition tpx.c:48
void tpx_buffer_s8_copy(TPXParticleS8 pt[], uint32_t idxDst, uint32_t idxSrc)
void tpx_state_set_scale(float scaleX, float scaleY)
Definition tpx.c:63
void tpx_particle_draw_tex_s8(TPXParticleS8 *particles, uint32_t count)
Definition tpx.c:122
static int8_t * tpx_buffer_s16_get_size(TPXParticleS16 pt[], int idx)
Definition tpx.h:291
void tpx_buffer_s16_copy(TPXParticleS16 pt[], uint32_t idxDst, uint32_t idxSrc)
Definition tpx.c:189
void tpx_particle_draw_s16(TPXParticleS16 *particles, uint32_t count)
Definition tpx.c:118
TPXParticleS8 TPXParticle
Definition tpx.h:59