8#define EFFECT_GLOBALS_TLB_IDX 0x10
16#define FX_ENTRY(name, gfx_name) { \
17 name##_main, effect_##name##_ROM_START, effect_##name##_ROM_END, effect_##name##_VRAM, gfx_name##_ROM_START, \
21#include "effects/effect_table.c"
23s32
D_8007FEB8[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 5, 3, 4, 13, 60, 0, 512, 0, 0, 3, 0 };
99 if (effectGraphics->
data != NULL) {
101 effectGraphics->
data = NULL;
118 if (effectInstance != NULL) {
143 if (effectInstance != NULL) {
163 gSPClearGeometryMode(
gMainGfxPos++, G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG |
164 G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD |
165 G_SHADING_SMOOTH | G_CLIPPING | 0x40F9FA);
166 gSPSetGeometryMode(
gMainGfxPos++, G_ZBUFFER | G_SHADE | G_CULL_BACK | G_SHADING_SMOOTH);
178 G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
182 renderUI(effectInstance);
206 ASSERT(newEffectInst != NULL);
225 if (effectGraphics->
update == NULL) {
235 if (effectGraphics->
renderUI == NULL) {
241 newEffectInst->
graphics = effectGraphics;
243 if (effectBp->
init != NULL) {
244 effectBp->
init(newEffectInst);
250 return newEffectInst;
264 if (effectInstance->
data.
any == NULL) {
281 if (effect->
data.
any != NULL) {
325 osMapTLB(i, OS_PM_4K, effectEntry->
dmaDest, (s32)((*tlbMappablePages)[i]) & 0xFFFFFF, -1, -1);
333 effectGraphics->
data = effectDataBuf;
334 ASSERT(effectDataBuf != NULL);
#define general_heap_malloc
#define create_effect_instance
EffectInstance * gEffectInstances[96]
void render_effects_world(void)
void update_effects(void)
void remove_all_effects(void)
void set_effect_pos_offset(EffectInstance *effect, f32 x, f32 y, f32 z)
void stub_effect_delegate(EffectInstance *effect)
Used for unbound function points in effect structs.
void clear_effect_data(void)
TlbEntry TlbMappablePage[15]
BSS EffectGraphics gEffectGraphicsData[15]
TlbMappablePage gEffectDataBuffer
#define EFFECT_GLOBALS_TLB_IDX
void render_effects_UI(void)
struct EffectGraphics * graphics
#define ASSERT(condition)
@ FX_INSTANCE_FLAG_BATTLE
@ FX_INSTANCE_FLAG_ENABLED
@ FX_INSTANCE_FLAG_HAS_UPDATED
u32 dma_copy(Addr romStart, Addr romEnd, void *vramDest)
s32 general_heap_free(void *data)
#define DMA_COPY_SEGMENT(segment)
void(* renderUI)(EffectInstance *effectInst)
void(* init)(EffectInstance *effectInst)
void(* update)(EffectInstance *effectInst)
void(* renderWorld)(EffectInstance *effectInst)
void(* renderUI)(EffectInstance *effectInst)
void(* renderWorld)(EffectInstance *effectInst)
void(* update)(EffectInstance *effectInst)
u8 Addr[]
Linker symbol address, as in ld_addrs.h.
GameStatus * gGameStatusPtr
DisplayContext * gDisplayContext