effect flags (#1052)

* damage intensity

* standardized battle script names

* few more

* effect flags

* slight name change

* renderUI = NULL

* rm space

---------

Co-authored-by: HailSanta <Hail2Santa@gmail.com>
This commit is contained in:
HailSanta 2023-05-08 23:46:47 -04:00 committed by GitHub
parent 5511e18133
commit ee0bd3c304
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
176 changed files with 777 additions and 827 deletions

View File

@ -307,7 +307,7 @@
#define GetNpcYaw dead_GetNpcYaw
#define PlayAmbientSounds dead_PlayAmbientSounds
#define SetTexPanner dead_SetTexPanner
#define func_802D7B10 dead_func_802D7B10
#define DismissEffect dead_DismissEffect
#define Entity_Chest dead_Entity_Chest
#define snd_ambient_mute dead_snd_ambient_mute
#define GetPlayerAnimation dead_GetPlayerAnimation

View File

@ -384,7 +384,7 @@ enum SparkesFXTypes {
};
typedef struct ShapeSpellFXData {
/* 0x00 */ s32 isChild;
/* 0x00 */ b32 isChild;
/* 0x04 */ Vec3f pos;
/* 0x10 */ f32 unk_10;
/* 0x14 */ f32 unk_14;
@ -526,30 +526,26 @@ typedef struct ExplosionFXData {
} ExplosionFXData; // size = 0x3C
typedef struct LensFlareFXData {
/* 0x00 */ s32 unk_00;
/* 0x04 */ f32 unk_04;
/* 0x08 */ f32 unk_08;
/* 0x0C */ f32 unk_0C;
/* 0x10 */ f32 unk_10;
/* 0x14 */ f32 unk_14;
/* 0x18 */ f32 unk_18;
/* 0x1C */ f32 unk_1C;
/* 0x20 */ f32 unk_20;
/* 0x24 */ s32 unk_24;
/* 0x28 */ s32 unk_28;
/* 0x2C */ s32 unk_2C;
/* 0x30 */ s32 unk_30;
/* 0x00 */ s32 type;
/* 0x04 */ Vec3f pos;
/* 0x10 */ f32 largeFlareRot;
/* 0x14 */ f32 largeFlareRotVel;
/* 0x18 */ f32 largeFlareScale;
/* 0x1C */ f32 largeFlareScaleVel;
/* 0x20 */ f32 smallFlareScale;
/* 0x24 */ s32 largeFlareAlpha;
/* 0x28 */ s32 smallFlareAlpha;
/* 0x2C */ s32 timeLeft;
/* 0x30 */ s32 lifetime;
} LensFlareFXData; // size = 0x34
typedef struct GotItemOutlineFXData {
/* 0x00 */ s32 unk_00;
/* 0x04 */ f32 unk_04;
/* 0x08 */ f32 unk_08;
/* 0x0C */ f32 unk_0C;
/* 0x10 */ s32 unk_10;
/* 0x14 */ s32 unk_14;
/* 0x18 */ f32 unk_18;
/* 0x1C */ s32 unk_1C;
/* 0x00 */ s32 type;
/* 0x04 */ Vec3f pos;
/* 0x10 */ s32 lifetime;
/* 0x14 */ s32 timeLeft;
/* 0x18 */ f32 scale;
/* 0x1C */ s32 alpha;
} GotItemOutlineFXData; // size = 0x20
typedef struct SpikyWhiteAuraFXData {
@ -2380,7 +2376,7 @@ typedef struct SpiritCardFXData {
/* 0x10 */ s32 unk_10;
/* 0x14 */ s32 unk_14;
/* 0x18 */ f32 unk_18;
/* 0x1C */ struct EffectInstance* unk_1C;
/* 0x1C */ struct EffectInstance* child;
/* 0x20 */ f32 unk_20;
/* 0x24 */ f32 yaw;
/* 0x28 */ char unk_28[0xC];
@ -2805,7 +2801,7 @@ typedef struct EffectBlueprint {
/* 0x08 */ void (*init)(EffectInstance* effectInst);
/* 0x0C */ void (*update)(EffectInstance* effectInst);
/* 0x10 */ void (*renderWorld)(EffectInstance* effectInst);
/* 0x14 */ void (*unk_14)(EffectInstance* effectInst);
/* 0x14 */ void (*renderUI)(EffectInstance* effectInst);
} EffectBlueprint; // size = 0x18
typedef struct EffectGraphics {

View File

@ -4136,40 +4136,17 @@ enum DamageIntensityRange {
DAMAGE_INTENSITY_UNUSED = 4, // unused
};
enum EffectInstanceFlags {
FX_INSTANCE_FLAG_ENABLED = 0x00000001,
FX_INSTANCE_FLAG_BATTLE = 0x00000004, // effect was created during battle
FX_INSTANCE_FLAG_HAS_UPDATED = 0x00000008, // has run update at least once
FX_INSTANCE_FLAG_DISMISS = 0x00000010, // effect should perform cleanup and self-delete
};
enum EffectGfxDataFlags {
FX_GRAPHICS_DISABLED = 0x00000000,
FX_GRAPHICS_ENABLED = 0x00000001,
FX_GRAPHICS_FLAG_2 = 0x00000002,
FX_GRAPHICS_FLAG_4 = 0x00000004,
FX_GRAPHICS_FLAG_8 = 0x00000008,
FX_GRAPHICS_FLAG_10 = 0x00000010,
FX_GRAPHICS_FLAG_20 = 0x00000020,
FX_GRAPHICS_FLAG_40 = 0x00000040,
FX_GRAPHICS_FLAG_80 = 0x00000080,
FX_GRAPHICS_FLAG_100 = 0x00000100,
FX_GRAPHICS_FLAG_200 = 0x00000200,
FX_GRAPHICS_FLAG_400 = 0x00000400,
FX_GRAPHICS_FLAG_800 = 0x00000800,
FX_GRAPHICS_FLAG_1000 = 0x00001000,
FX_GRAPHICS_FLAG_2000 = 0x00002000,
FX_GRAPHICS_FLAG_4000 = 0x00004000,
FX_GRAPHICS_FLAG_8000 = 0x00008000,
FX_GRAPHICS_FLAG_10000 = 0x00010000,
FX_GRAPHICS_FLAG_20000 = 0x00020000,
FX_GRAPHICS_FLAG_40000 = 0x00040000,
FX_GRAPHICS_FLAG_80000 = 0x00080000,
FX_GRAPHICS_FLAG_100000 = 0x00100000,
FX_GRAPHICS_FLAG_200000 = 0x00200000,
FX_GRAPHICS_FLAG_400000 = 0x00400000,
FX_GRAPHICS_FLAG_800000 = 0x00800000,
FX_GRAPHICS_FLAG_1000000 = 0x01000000,
FX_GRAPHICS_FLAG_2000000 = 0x02000000,
FX_GRAPHICS_FLAG_4000000 = 0x04000000,
FX_GRAPHICS_FLAG_8000000 = 0x08000000,
FX_GRAPHICS_FLAG_10000000 = 0x10000000,
FX_GRAPHICS_FLAG_20000000 = 0x20000000,
FX_GRAPHICS_FLAG_40000000 = 0x40000000,
FX_GRAPHICS_FLAG_80000000 = 0x80000000,
FX_GRAPHICS_LOADED = 0x00000001,
FX_GRAPHICS_CAN_FREE = 0x00000002,
};
enum MoveIDs {
@ -5957,41 +5934,6 @@ enum TempSetZoneEnabledFlags {
TEMP_SET_ZONE_ENABLED_FLAG_80000000 = 0x80000000,
};
enum EffectInstanceFlags {
EFFECT_INSTANCE_FLAG_1 = 0x00000001,
EFFECT_INSTANCE_FLAG_2 = 0x00000002,
EFFECT_INSTANCE_FLAG_4 = 0x00000004,
EFFECT_INSTANCE_FLAG_8 = 0x00000008,
EFFECT_INSTANCE_FLAG_10 = 0x00000010, // mark ready for cleanup
EFFECT_INSTANCE_FLAG_20 = 0x00000020,
EFFECT_INSTANCE_FLAG_40 = 0x00000040,
EFFECT_INSTANCE_FLAG_80 = 0x00000080,
EFFECT_INSTANCE_FLAG_100 = 0x00000100,
EFFECT_INSTANCE_FLAG_200 = 0x00000200,
EFFECT_INSTANCE_FLAG_400 = 0x00000400,
EFFECT_INSTANCE_FLAG_800 = 0x00000800,
EFFECT_INSTANCE_FLAG_1000 = 0x00001000,
EFFECT_INSTANCE_FLAG_2000 = 0x00002000,
EFFECT_INSTANCE_FLAG_4000 = 0x00004000,
EFFECT_INSTANCE_FLAG_8000 = 0x00008000,
EFFECT_INSTANCE_FLAG_10000 = 0x00010000,
EFFECT_INSTANCE_FLAG_20000 = 0x00020000,
EFFECT_INSTANCE_FLAG_40000 = 0x00040000,
EFFECT_INSTANCE_FLAG_80000 = 0x00080000,
EFFECT_INSTANCE_FLAG_100000 = 0x00100000,
EFFECT_INSTANCE_FLAG_200000 = 0x00200000,
EFFECT_INSTANCE_FLAG_400000 = 0x00400000,
EFFECT_INSTANCE_FLAG_800000 = 0x00800000,
EFFECT_INSTANCE_FLAG_1000000 = 0x01000000,
EFFECT_INSTANCE_FLAG_2000000 = 0x02000000,
EFFECT_INSTANCE_FLAG_4000000 = 0x04000000,
EFFECT_INSTANCE_FLAG_8000000 = 0x08000000,
EFFECT_INSTANCE_FLAG_10000000 = 0x10000000,
EFFECT_INSTANCE_FLAG_20000000 = 0x20000000,
EFFECT_INSTANCE_FLAG_40000000 = 0x40000000,
EFFECT_INSTANCE_FLAG_80000000 = 0x80000000,
};
enum ModelTransformGroupFlags {
MODEL_TRANSFORM_GROUP_FLAG_1 = 0x00000001,
MODEL_TRANSFORM_GROUP_FLAG_2 = 0x00000002,

View File

@ -844,7 +844,7 @@ void partner_init_after_battle(s32 arg0);
void load_map_script_lib(void);
void remove_item_entity_by_index(s32 index);
void set_entity_commandlist(Entity* entity, s32* entityScript);
s32 func_800DFCF4(void);
s32 is_player_dismounted(void);
void func_800EF300(void);
void func_800EF314(void);
void func_800EF43C(void);

View File

@ -592,7 +592,7 @@ Npc* npc_find_closest_simple(f32 x, f32 y, f32 z, f32 radius);
s32 npc_get_collider_below(Npc* npc);
void func_8003D3BC(Npc* npc);
void npc_imgfx_update(Npc* npc);
void npc_set_imgfx_params(Npc* npc, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6);

View File

@ -276,8 +276,8 @@ ApiStatus ShowGotItem(Evt* script, s32 isInitialCall);
ApiStatus ShowEmote(Evt* script, s32 isInitialCall);
ApiStatus ShowSleepBubble(Evt* script, s32 isInitialCall);
ApiStatus RemoveEffect(Evt* script, s32 isInitialCall);
ApiStatus func_802D7B10(Evt* script, s32 isInitialCall);
ApiStatus func_802D7B44(Evt* script, s32 isInitialCall);
ApiStatus DismissEffect(Evt* script, s32 isInitialCall);
ApiStatus DismissItemOutline(Evt* script, s32 isInitialCall);
ApiStatus PlayEffect(Evt* script, s32 isInitialCall);
ApiStatus SetSpriteShading(Evt* script, s32 isInitialCall);
ApiStatus EnableSpriteShading(Evt* script, s32 isInitialCall);

View File

@ -759,7 +759,7 @@ void btl_state_update_begin_player_turn(void) {
battleStatus->waterBlockTurnsLeft--;
battleStatus->buffEffect->data.partnerBuff->unk_0C[FX_BUFF_DATA_WATER_BLOCK].turnsLeft = battleStatus->waterBlockTurnsLeft;
if (battleStatus->waterBlockTurnsLeft <= 0) {
battleStatus->waterBlockEffect->flags |= EFFECT_INSTANCE_FLAG_10;
battleStatus->waterBlockEffect->flags |= FX_INSTANCE_FLAG_DISMISS;
fx_water_block(1, player->currentPos.x, player->currentPos.y + 18.0f, player->currentPos.z + 5.0f, 1.5f, 10);
fx_water_splash(0, player->currentPos.x - 10.0f, player->currentPos.y + 5.0f, player->currentPos.z + 5.0f, 1.0f, 24);
fx_water_splash(0, player->currentPos.x - 15.0f, player->currentPos.y + 32.0f, player->currentPos.z + 5.0f, 1.0f, 24);
@ -926,7 +926,7 @@ back:
if (player->debuffDuration <= 0) {
if (player->debuff == STATUS_FROZEN) {
sfx_play_sound(SOUND_FROZEN_SHATTER);
player->icePillarEffect->flags |= 0x10;
player->icePillarEffect->flags |= FX_INSTANCE_FLAG_DISMISS;
player->icePillarEffect = NULL;
dispatch_event_player(EVENT_32);
} else {
@ -2365,7 +2365,7 @@ void btl_state_update_defeat(void) {
if (player->debuff != 0) {
if (player->debuff == STATUS_FROZEN) {
sfx_play_sound(SOUND_FROZEN_SHATTER);
player->icePillarEffect->flags |= EFFECT_INSTANCE_FLAG_10;
player->icePillarEffect->flags |= FX_INSTANCE_FLAG_DISMISS;
player->icePillarEffect = NULL;
}
player->debuff = 0;

View File

@ -788,7 +788,7 @@ void appendGfx_npc_actor(s32 isPartner, s32 actorIndex) {
} else {
effect = actor->icePillarEffect;
if (effect != NULL) {
effect->flags |= EFFECT_INSTANCE_FLAG_10;
effect->flags |= FX_INSTANCE_FLAG_DISMISS;
actor->icePillarEffect = NULL;
}
}
@ -3696,7 +3696,7 @@ void func_8025D830(ActorPart* part, s32 decorationIndex) {
}
void func_8025D8EC(ActorPart* part, s32 decorationIndex) {
part->decorationTable->effect[decorationIndex]->flags |= EFFECT_INSTANCE_FLAG_10;
part->decorationTable->effect[decorationIndex]->flags |= FX_INSTANCE_FLAG_DISMISS;
}
void func_8025D90C(ActorPart* part, s32 decorationIndex) {

View File

@ -419,8 +419,8 @@ API_CALLABLE(BattleMerleeUpdateFX) {
if (D_8029FBA4 == 2) {
BattleMerleeOrbEffect->data.energyOrbWave->scale = 0.00001f;
BattleMerleeWaveEffect->data.energyOrbWave->scale = 0.00001f;
BattleMerleeOrbEffect->flags |= 0x10;
BattleMerleeWaveEffect->flags |= 0x10;
BattleMerleeOrbEffect->flags |= FX_INSTANCE_FLAG_DISMISS;
BattleMerleeWaveEffect->flags |= FX_INSTANCE_FLAG_DISMISS;
return ApiStatus_DONE1;
}

View File

@ -2098,7 +2098,7 @@ s32 inflict_status(Actor* target, s32 statusTypeKey, s32 duration) {
if (target->actorID != ACTOR_PARTNER) {
effect = target->icePillarEffect;
if (effect != NULL) {
effect->flags |= EFFECT_INSTANCE_FLAG_10;
effect->flags |= FX_INSTANCE_FLAG_DISMISS;
}
target->icePillarEffect = fx_ice_pillar(0, target->currentPos.x, target->currentPos.y,
target->currentPos.z, 1.0f, 0);
@ -2849,13 +2849,13 @@ void remove_player_buffs(s32 buffs) {
if (buffs & PLAYER_BUFF_TRANSPARENT && (player->transparentStatus != 0)) {
player->transparentDuration = 0;
player->transparentStatus = 0;
playerPartsTable->flags &= ~0x100;
playerPartsTable->flags &= ~ACTOR_PART_FLAG_100;
remove_status_transparent(player->hudElementDataIndex);
}
if (buffs & PLAYER_BUFF_WATER_BLOCK && (battleStatus->waterBlockTurnsLeft != 0)) {
battleStatus->waterBlockTurnsLeft = 0;
battleStatus->buffEffect->data.partnerBuff->unk_0C[FX_BUFF_DATA_WATER_BLOCK].turnsLeft = 0;
battleStatus->waterBlockEffect->flags |= 0x10;
battleStatus->waterBlockEffect->flags |= FX_INSTANCE_FLAG_DISMISS;
fx_water_block(1, player->currentPos.x, player->currentPos.y + 18.0f, player->currentPos.z + 5.0f, 1.5f, 0xA);
fx_water_splash(0, player->currentPos.x - 10.0f, player->currentPos.y + 5.0f, player->currentPos.z + 5.0f, 1.0f, 0x18);

View File

@ -454,50 +454,50 @@ s32 pad_after_move_table[] = {
0x00000000, 0x00000000, 0x00000000
};
extern IMG_BIN ui_msg_frame_part_0_png[];
extern IMG_BIN ui_msg_frame_part_1_png[];
extern IMG_BIN ui_msg_frame_part_2_png[];
extern IMG_BIN ui_msg_frame_part_3_png[];
extern IMG_BIN ui_msg_frame_part_4_png[];
extern IMG_BIN ui_msg_frame_part_5_png[];
extern IMG_BIN ui_msg_frame_part_6_png[];
extern IMG_BIN ui_msg_frame_part_7_png[];
extern IMG_BIN ui_msg_frame_part_8_png[];
extern IMG_BIN ui_msg_frame_part_9_png[];
extern IMG_BIN ui_msg_frame_part_A_png[];
extern IMG_BIN ui_msg_frame_part_B_png[];
extern IMG_BIN ui_msg_frame_part_C_png[];
extern IMG_BIN ui_msg_frame_part_D_png[];
extern IMG_BIN ui_msg_frame_part_E_png[];
extern IMG_BIN ui_msg_frame_part_F_png[];
extern IMG_BIN ui_msg_frame_part_10_png[];
extern IMG_BIN ui_msg_frame_part_11_png[];
extern IMG_BIN ui_msg_frame_part_12_png[];
extern IMG_BIN ui_msg_frame_part_13_png[];
extern IMG_BIN ui_msg_frame_part_14_png[];
extern IMG_BIN ui_msg_frame_part_15_png[];
extern IMG_BIN ui_msg_frame_part_16_png[];
extern IMG_BIN ui_msg_frame_part_17_png[];
extern IMG_BIN ui_msg_frame_part_18_png[];
extern IMG_BIN ui_msg_frame_part_19_png[];
extern IMG_BIN ui_msg_frame_part_1A_png[];
extern IMG_BIN ui_msg_frame_part_1B_png[];
extern IMG_BIN ui_msg_frame_part_1C_png[];
extern IMG_BIN ui_msg_frame_part_1D_png[];
extern IMG_BIN ui_msg_frame_part_1E_png[];
extern IMG_BIN ui_msg_frame_part_1F_png[];
extern IMG_BIN ui_msg_frame_a_1_1_png[];
extern IMG_BIN ui_msg_frame_a_1_2_png[];
extern IMG_BIN ui_msg_frame_a_1_3_png[];
extern IMG_BIN ui_msg_frame_a_1_4_png[];
extern IMG_BIN ui_msg_frame_a_1_5_png[];
extern IMG_BIN ui_msg_frame_a_2_1_png[];
extern IMG_BIN ui_msg_frame_a_2_5_png[];
extern IMG_BIN ui_msg_frame_a_3_1_png[];
extern IMG_BIN ui_msg_frame_a_3_5_png[];
extern IMG_BIN ui_msg_frame_a_4_1_png[];
extern IMG_BIN ui_msg_frame_a_4_5_png[];
extern IMG_BIN ui_msg_frame_a_5_1_png[];
extern IMG_BIN ui_msg_frame_a_5_2_png[];
extern IMG_BIN ui_msg_frame_a_5_3_png[];
extern IMG_BIN ui_msg_frame_a_5_4_png[];
extern IMG_BIN ui_msg_frame_a_5_5_png[];
extern IMG_BIN ui_msg_frame_b_1_1_png[];
extern IMG_BIN ui_msg_frame_b_1_2_png[];
extern IMG_BIN ui_msg_frame_b_1_3_png[];
extern IMG_BIN ui_msg_frame_b_1_4_png[];
extern IMG_BIN ui_msg_frame_b_1_5_png[];
extern IMG_BIN ui_msg_frame_b_2_1_png[];
extern IMG_BIN ui_msg_frame_b_2_5_png[];
extern IMG_BIN ui_msg_frame_b_3_1_png[];
extern IMG_BIN ui_msg_frame_b_3_5_png[];
extern IMG_BIN ui_msg_frame_b_4_1_png[];
extern IMG_BIN ui_msg_frame_b_4_5_png[];
extern IMG_BIN ui_msg_frame_b_5_1_png[];
extern IMG_BIN ui_msg_frame_b_5_2_png[];
extern IMG_BIN ui_msg_frame_b_5_3_png[];
extern IMG_BIN ui_msg_frame_b_5_4_png[];
extern IMG_BIN ui_msg_frame_b_5_5_png[];
IMG_BIN* gMessageBoxFrameParts[2][16] = {
{
ui_msg_frame_part_0_png, ui_msg_frame_part_1_png, ui_msg_frame_part_2_png, ui_msg_frame_part_3_png,
ui_msg_frame_part_4_png, ui_msg_frame_part_5_png, ui_msg_frame_part_6_png, ui_msg_frame_part_7_png,
ui_msg_frame_part_8_png, ui_msg_frame_part_9_png, ui_msg_frame_part_A_png, ui_msg_frame_part_B_png,
ui_msg_frame_part_C_png, ui_msg_frame_part_D_png, ui_msg_frame_part_E_png, ui_msg_frame_part_F_png,
ui_msg_frame_a_1_1_png, ui_msg_frame_a_1_2_png, ui_msg_frame_a_1_3_png, ui_msg_frame_a_1_4_png,
ui_msg_frame_a_1_5_png, ui_msg_frame_a_2_1_png, ui_msg_frame_a_2_5_png, ui_msg_frame_a_3_1_png,
ui_msg_frame_a_3_5_png, ui_msg_frame_a_4_1_png, ui_msg_frame_a_4_5_png, ui_msg_frame_a_5_1_png,
ui_msg_frame_a_5_2_png, ui_msg_frame_a_5_3_png, ui_msg_frame_a_5_4_png, ui_msg_frame_a_5_5_png,
},
{
ui_msg_frame_part_10_png, ui_msg_frame_part_11_png, ui_msg_frame_part_12_png, ui_msg_frame_part_13_png,
ui_msg_frame_part_14_png, ui_msg_frame_part_15_png, ui_msg_frame_part_16_png, ui_msg_frame_part_17_png,
ui_msg_frame_part_18_png, ui_msg_frame_part_19_png, ui_msg_frame_part_1A_png, ui_msg_frame_part_1B_png,
ui_msg_frame_part_1C_png, ui_msg_frame_part_1D_png, ui_msg_frame_part_1E_png, ui_msg_frame_part_1F_png,
ui_msg_frame_b_1_1_png, ui_msg_frame_b_1_2_png, ui_msg_frame_b_1_3_png, ui_msg_frame_b_1_4_png,
ui_msg_frame_b_1_5_png, ui_msg_frame_b_2_1_png, ui_msg_frame_b_2_5_png, ui_msg_frame_b_3_1_png,
ui_msg_frame_b_3_5_png, ui_msg_frame_b_4_1_png, ui_msg_frame_b_4_5_png, ui_msg_frame_b_5_1_png,
ui_msg_frame_b_5_2_png, ui_msg_frame_b_5_3_png, ui_msg_frame_b_5_4_png, ui_msg_frame_b_5_5_png,
}
};

View File

@ -781,7 +781,7 @@ void player_reset_data(void) {
func_800E5520();
}
s32 func_800DFCF4(void) {
b32 is_player_dismounted(void) {
if (gPartnerStatus.partnerActionState == PARTNER_ACTION_USE &&
(gPartnerStatus.actingPartner == PARTNER_WATT
|| gPartnerStatus.actingPartner == PARTNER_BOW
@ -824,7 +824,7 @@ s32 get_overriding_player_anim(s32 anim) {
if (anim == ANIM_MarioW1_Lift || anim == ANIM_Peach2_SpreadArms || anim == ANIM_Mario1_Idle) {
if (!(playerStatus->animFlags & PA_FLAG_USING_PEACH_PHYSICS)) {
if (!func_800DFCF4()) {
if (!is_player_dismounted()) {
return -1;
}
} else if (!(playerStatus->animFlags & PA_FLAG_INVISIBLE)) {

View File

@ -2722,15 +2722,15 @@ block_47: // TODO required to match
(BUTTON_STICK_RIGHT | BUTTON_STICK_LEFT | BUTTON_STICK_DOWN | BUTTON_STICK_UP | BUTTON_A | BUTTON_B))
{
hide_item_entity(itemEntity);
if (func_800DFCF4() &&
playerStatus->actionState != ACTION_STATE_USE_SPINNING_FLOWER &&
!(playerStatus->animFlags & PA_FLAG_NO_OOB_RESPAWN))
{
if (is_player_dismounted()
&& playerStatus->actionState != ACTION_STATE_USE_SPINNING_FLOWER
&& !(playerStatus->animFlags & PA_FLAG_NO_OOB_RESPAWN)
) {
set_action_state(ACTION_STATE_IDLE);
}
if (gItemTable[itemEntity->itemID].typeFlags & ITEM_TYPE_FLAG_GEAR) {
D_801568F0->data.gotItemOutline->unk_14 = 0xA;
D_801568F0->data.gotItemOutline->timeLeft = 10;
}
set_window_update(WINDOW_ID_12, (s32) basic_hidden_window_update);
set_window_update(WINDOW_ID_19, (s32) basic_hidden_window_update);

View File

@ -986,7 +986,7 @@ API_CALLABLE(func_80218E2C_4652BC) {
EffectInstance* tattleEffect = (EffectInstance*) evt_get_variable(script, *script->ptrReadPos);
tattleEffect->data.tattleWindow->pos.y = 144.0f;
tattleEffect->flags |= EFFECT_INSTANCE_FLAG_10;
tattleEffect->flags |= FX_INSTANCE_FLAG_DISMISS;
return ApiStatus_DONE2;
}
@ -2911,7 +2911,7 @@ API_CALLABLE(func_80219188_465618) {
}
if (wattEffectData->effect2 != NULL) {
wattEffectData->effect2->flags |= EFFECT_INSTANCE_FLAG_10;
wattEffectData->effect2->flags |= FX_INSTANCE_FLAG_DISMISS;
wattEffectData->effect2 = NULL;
}
wattEffectData->effect1->data.staticStatus->pos.x = x;
@ -2920,7 +2920,7 @@ API_CALLABLE(func_80219188_465618) {
break;
case 1:
if (wattEffectData->effect1 != NULL) {
wattEffectData->effect1->flags |= EFFECT_INSTANCE_FLAG_10;
wattEffectData->effect1->flags |= FX_INSTANCE_FLAG_DISMISS;
wattEffectData->effect1 = NULL;
}
if (wattEffectData->effect2 == NULL) {
@ -2934,21 +2934,21 @@ API_CALLABLE(func_80219188_465618) {
}
} else {
if (wattEffectData->effect1 != NULL) {
wattEffectData->effect1->flags |= EFFECT_INSTANCE_FLAG_10;
wattEffectData->effect1->flags |= FX_INSTANCE_FLAG_DISMISS;
wattEffectData->effect1 = NULL;
}
if (wattEffectData->effect2 != NULL) {
wattEffectData->effect2->flags |= EFFECT_INSTANCE_FLAG_10;
wattEffectData->effect2->flags |= FX_INSTANCE_FLAG_DISMISS;
wattEffectData->effect2 = NULL;
}
}
if (wattEffectData->debuff != actor->debuff && wattEffectData->unk_0C) {
if (wattEffectData->effect1 != NULL) {
wattEffectData->effect1->flags |= EFFECT_INSTANCE_FLAG_10;
wattEffectData->effect1->flags |= FX_INSTANCE_FLAG_DISMISS;
wattEffectData->effect1 = NULL;
}
if (wattEffectData->effect2 != NULL) {
wattEffectData->effect2->flags |= EFFECT_INSTANCE_FLAG_10;
wattEffectData->effect2->flags |= FX_INSTANCE_FLAG_DISMISS;
wattEffectData->effect2 = NULL;
}
}
@ -2964,11 +2964,11 @@ API_CALLABLE(func_80219604_465A94) {
wattEffectData->flags = 0;
if (wattEffectData->effect1 != NULL) {
wattEffectData->effect1->flags |= EFFECT_INSTANCE_FLAG_10;
wattEffectData->effect1->flags |= FX_INSTANCE_FLAG_DISMISS;
}
if (wattEffectData->effect2 != NULL) {
wattEffectData->effect2->flags |= EFFECT_INSTANCE_FLAG_10;
wattEffectData->effect2->flags |= FX_INSTANCE_FLAG_DISMISS;
}
return ApiStatus_DONE2;

View File

@ -1211,7 +1211,7 @@ EvtScript EVS_Enemy_FanSmack_Impl = {
EVT_CASE_OR_EQ(DMG_SRC_LAST_FAN_SMACK_LEFT)
EVT_CASE_OR_EQ(DMG_SRC_LAST_FAN_SMACK_RIGHT)
EVT_WAIT(40)
EVT_CALL(func_802D7B10, LVarF)
EVT_CALL(DismissEffect, LVarF)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2023)
EVT_END_CASE_GROUP
EVT_END_SWITCH

View File

@ -23,7 +23,7 @@ API_CALLABLE(N(UnkTattleEffectFunc2)) {
EffectInstance* effect = (EffectInstance*)evt_get_variable(script, *args++);
effect->data.tattleWindow->pos.y = 144.0f;
effect->flags |= EFFECT_INSTANCE_FLAG_10;
effect->flags |= FX_INSTANCE_FLAG_DISMISS;
return ApiStatus_DONE2;
}

View File

@ -42,7 +42,7 @@ API_CALLABLE(N(UnkWattEffectFunc1)) {
}
if (wattEffectData->effect2 != NULL) {
wattEffectData->effect2->flags |= EFFECT_INSTANCE_FLAG_10;
wattEffectData->effect2->flags |= FX_INSTANCE_FLAG_DISMISS;
wattEffectData->effect2 = NULL;
}
wattEffectData->effect1->data.staticStatus->pos.x = x;
@ -51,7 +51,7 @@ API_CALLABLE(N(UnkWattEffectFunc1)) {
break;
case 1:
if (wattEffectData->effect1 != NULL) {
wattEffectData->effect1->flags |= EFFECT_INSTANCE_FLAG_10;
wattEffectData->effect1->flags |= FX_INSTANCE_FLAG_DISMISS;
wattEffectData->effect1 = NULL;
}
if (wattEffectData->effect2 == NULL) {
@ -65,21 +65,21 @@ API_CALLABLE(N(UnkWattEffectFunc1)) {
}
} else {
if (wattEffectData->effect1 != NULL) {
wattEffectData->effect1->flags |= EFFECT_INSTANCE_FLAG_10;
wattEffectData->effect1->flags |= FX_INSTANCE_FLAG_DISMISS;
wattEffectData->effect1 = NULL;
}
if (wattEffectData->effect2 != NULL) {
wattEffectData->effect2->flags |= EFFECT_INSTANCE_FLAG_10;
wattEffectData->effect2->flags |= FX_INSTANCE_FLAG_DISMISS;
wattEffectData->effect2 = NULL;
}
}
if (wattEffectData->debuff != actor->debuff && wattEffectData->unk_0C) {
if (wattEffectData->effect1 != NULL) {
wattEffectData->effect1->flags |= EFFECT_INSTANCE_FLAG_10;
wattEffectData->effect1->flags |= FX_INSTANCE_FLAG_DISMISS;
wattEffectData->effect1 = NULL;
}
if (wattEffectData->effect2 != NULL) {
wattEffectData->effect2->flags |= EFFECT_INSTANCE_FLAG_10;
wattEffectData->effect2->flags |= FX_INSTANCE_FLAG_DISMISS;
wattEffectData->effect2 = NULL;
}
}
@ -97,11 +97,11 @@ API_CALLABLE(N(UnkWattEffectFunc2)) {
wattEffectData->flags = FALSE;
if (wattEffectData->effect1 != NULL) {
wattEffectData->effect1->flags |= EFFECT_INSTANCE_FLAG_10;
wattEffectData->effect1->flags |= FX_INSTANCE_FLAG_DISMISS;
}
if (wattEffectData->effect2 != NULL) {
wattEffectData->effect2->flags |= EFFECT_INSTANCE_FLAG_10;
wattEffectData->effect2->flags |= FX_INSTANCE_FLAG_DISMISS;
}
return ApiStatus_DONE2;

View File

@ -668,7 +668,7 @@ API_CALLABLE(N(ProcessPeachStarBeam)) {
if (!cond) {
N(starBeamStage) = 2;
N(effect)->flags |= EFFECT_INSTANCE_FLAG_10;
N(effect)->flags |= FX_INSTANCE_FLAG_DISMISS;
return ApiStatus_DONE2;
}
break;
@ -738,7 +738,7 @@ API_CALLABLE(N(ProcessPeachStarBeam)) {
if (!cond) {
N(starBeamStage) = 2;
N(effect)->flags |= EFFECT_INSTANCE_FLAG_10;
N(effect)->flags |= FX_INSTANCE_FLAG_DISMISS;
return ApiStatus_DONE2;
}
break;

View File

@ -346,7 +346,7 @@ API_CALLABLE(N(CloseTattleWindow)) {
EffectInstance* effect = N(tattleEffect);
effect->data.tattleWindow->pos.y = 144.0f;
effect->flags |= EFFECT_INSTANCE_FLAG_10;
effect->flags |= FX_INSTANCE_FLAG_DISMISS;
return ApiStatus_DONE2;
}

View File

@ -589,7 +589,7 @@ API_CALLABLE(N(FlyAround)) {
case 2:
state->moveTime = 5;
script->functionTemp[0] = 3;
airRaidEffect->flags |= 0x10;
airRaidEffect->flags |= FX_INSTANCE_FLAG_DISMISS;
// fallthrough
case 3:
add_vec2D_polar(&state->currentPos.x, &state->currentPos.y, state->speed, state->angle);

View File

@ -354,7 +354,7 @@ API_CALLABLE(N(ProcessTidalWave)) {
sEffect->data.waterFountain->unk_40 = partner->scale.x;
if (state->moveTime == 0) {
partner->rotation.z = 0.0f;
sEffect->flags |= EFFECT_INSTANCE_FLAG_10;
sEffect->flags |= FX_INSTANCE_FLAG_DISMISS;
return ApiStatus_DONE2;
}
state->moveTime--;

View File

@ -77,7 +77,7 @@ API_CALLABLE(N(WattFXUpdate)) {
sWattEffectData_effect1 = fx_static_status(0, x, y, z, 1.0f, 5, 0);
}
if (sWattEffectData_effect2 != NULL) {
sWattEffectData_effect2->flags |= EFFECT_INSTANCE_FLAG_10;
sWattEffectData_effect2->flags |= FX_INSTANCE_FLAG_DISMISS;
sWattEffectData_effect2 = NULL;
}
sWattEffectData_effect1->data.staticStatus->pos.x = x;
@ -86,7 +86,7 @@ API_CALLABLE(N(WattFXUpdate)) {
break;
case 1:
if (sWattEffectData_effect1 != NULL) {
sWattEffectData_effect1->flags |= EFFECT_INSTANCE_FLAG_10;
sWattEffectData_effect1->flags |= FX_INSTANCE_FLAG_DISMISS;
sWattEffectData_effect1 = NULL;
}
if (sWattEffectData_effect2 == NULL) {
@ -99,11 +99,11 @@ API_CALLABLE(N(WattFXUpdate)) {
}
} else {
if (sWattEffectData_effect1 != NULL) {
sWattEffectData_effect1->flags |= EFFECT_INSTANCE_FLAG_10;
sWattEffectData_effect1->flags |= FX_INSTANCE_FLAG_DISMISS;
sWattEffectData_effect1 = NULL;
}
if (sWattEffectData_effect2 != NULL) {
sWattEffectData_effect2->flags |= EFFECT_INSTANCE_FLAG_10;
sWattEffectData_effect2->flags |= FX_INSTANCE_FLAG_DISMISS;
sWattEffectData_effect2 = NULL;
}
}
@ -167,7 +167,7 @@ API_CALLABLE(N(ElectroDashFXDisable)) {
EffectInstance* effect = N(radialShimmer);
if (effect != NULL) {
effect->flags |= EFFECT_INSTANCE_FLAG_10;
effect->flags |= FX_INSTANCE_FLAG_DISMISS;
}
N(radialShimmer) = NULL;
@ -392,7 +392,7 @@ API_CALLABLE(N(MegaShockFX)) {
script->functionTemp[3]--;
}
if (script->functionTemp[2] == 0) {
N(thunderboltRing)->flags |= EFFECT_INSTANCE_FLAG_10;
N(thunderboltRing)->flags |= FX_INSTANCE_FLAG_DISMISS;
return ApiStatus_DONE2;
}
script->functionTemp[2]--;

View File

@ -6,8 +6,6 @@
typedef s32 TlbEntry[0x1000 / 4];
typedef TlbEntry TlbMappablePage[15];
#define EFFECT_LOADED 1
extern EffectGraphics gEffectGraphicsData[15];
extern EffectInstance* gEffectInstances[96];
@ -202,38 +200,41 @@ void update_effects(void) {
EffectGraphics* effectGraphics;
s32 i;
// reset free delay for each EffectGraphics touched in previous update
for (i = 0, effectGraphics = gEffectGraphicsData; i < ARRAY_COUNT(gEffectGraphicsData); i++, effectGraphics++) {
if (effectGraphics->flags & FX_GRAPHICS_ENABLED) {
if (!(effectGraphics->flags & FX_GRAPHICS_FLAG_2)) {
effectGraphics->flags |= FX_GRAPHICS_FLAG_2;
if (effectGraphics->flags & FX_GRAPHICS_LOADED) {
if (!(effectGraphics->flags & FX_GRAPHICS_CAN_FREE)) {
effectGraphics->flags |= FX_GRAPHICS_CAN_FREE;
effectGraphics->freeDelay = 3;
}
}
}
// update each EffectInstances
for (i = 0; i < ARRAY_COUNT(gEffectInstances); i++) {
EffectInstance* effectInstance = gEffectInstances[i];
if (effectInstance != NULL && (effectInstance->flags & EFFECT_INSTANCE_FLAG_1)) {
effectInstance->graphics->flags &= ~FX_GRAPHICS_FLAG_2;
if (effectInstance != NULL && (effectInstance->flags & FX_INSTANCE_FLAG_ENABLED)) {
effectInstance->graphics->flags &= ~FX_GRAPHICS_CAN_FREE;
if (gGameStatusPtr->isBattle) {
if (effectInstance->flags & EFFECT_INSTANCE_FLAG_4) {
if (effectInstance->flags & FX_INSTANCE_FLAG_BATTLE) {
effectInstance->graphics->update(effectInstance);
effectInstance->flags |= EFFECT_INSTANCE_FLAG_8;
effectInstance->flags |= FX_INSTANCE_FLAG_HAS_UPDATED;
}
} else {
if (!(effectInstance->flags & EFFECT_INSTANCE_FLAG_4)) {
if (!(effectInstance->flags & FX_INSTANCE_FLAG_BATTLE)) {
effectInstance->graphics->update(effectInstance);
effectInstance->flags |= EFFECT_INSTANCE_FLAG_8;
effectInstance->flags |= FX_INSTANCE_FLAG_HAS_UPDATED;
}
}
}
}
// free any EffectGraphics which haven't been used recently
for (i = 0, effectGraphics = gEffectGraphicsData; i < ARRAY_COUNT(gEffectGraphicsData); i++, effectGraphics++) {
if (effectGraphics->flags & FX_GRAPHICS_ENABLED) {
if (effectGraphics->flags & FX_GRAPHICS_FLAG_2) {
if (effectGraphics->flags & FX_GRAPHICS_LOADED) {
if (effectGraphics->flags & FX_GRAPHICS_CAN_FREE) {
if (effectGraphics->freeDelay != 0) {
effectGraphics->freeDelay--;
} else {
@ -254,14 +255,20 @@ void render_effects_world(void) {
s32 i;
for (i = 0; i < ARRAY_COUNT(gEffectInstances); i++) {
if (gEffectInstances[i] != NULL && gEffectInstances[i]->flags & 1 && gEffectInstances[i]->flags & 8) {
if (gGameStatusPtr->isBattle) {
if (gEffectInstances[i]->flags & 4) {
gEffectInstances[i]->graphics->renderWorld(gEffectInstances[i]);
}
} else {
if (!(gEffectInstances[i]->flags & 4)) {
gEffectInstances[i]->graphics->renderWorld(gEffectInstances[i]);
EffectInstance* effectInstance = gEffectInstances[i];
if (effectInstance != NULL) {
if (effectInstance->flags & FX_INSTANCE_FLAG_ENABLED) {
if (effectInstance->flags & FX_INSTANCE_FLAG_HAS_UPDATED) {
if (gGameStatusPtr->isBattle) {
if (effectInstance->flags & FX_INSTANCE_FLAG_BATTLE) {
effectInstance->graphics->renderWorld(effectInstance);
}
} else {
if (!(effectInstance->flags & FX_INSTANCE_FLAG_BATTLE)) {
effectInstance->graphics->renderWorld(effectInstance);
}
}
}
}
}
@ -276,15 +283,15 @@ void render_effects_UI(void) {
EffectInstance* effectInstance = gEffectInstances[i];
if (effectInstance != NULL) {
if (effectInstance->flags & EFFECT_INSTANCE_FLAG_1) {
if (effectInstance->flags & EFFECT_INSTANCE_FLAG_8) {
if (effectInstance->flags & FX_INSTANCE_FLAG_ENABLED) {
if (effectInstance->flags & FX_INSTANCE_FLAG_HAS_UPDATED) {
void (*renderUI)(EffectInstance* effect);
if (gGameStatusPtr->isBattle && !(effectInstance->flags & EFFECT_INSTANCE_FLAG_4)) {
if (gGameStatusPtr->isBattle && !(effectInstance->flags & FX_INSTANCE_FLAG_BATTLE)) {
continue;
}
if (!gGameStatusPtr->isBattle && effectInstance->flags & EFFECT_INSTANCE_FLAG_4) {
if (!gGameStatusPtr->isBattle && effectInstance->flags & FX_INSTANCE_FLAG_BATTLE) {
continue;
}
@ -324,7 +331,7 @@ void render_effects_UI(void) {
EffectInstance* create_effect_instance(EffectBlueprint* effectBp) {
EffectInstance* newEffectInst;
EffectGraphics* curEffect;
EffectGraphics* effectGraphics;
s32 i;
// Search for an unused instance
@ -340,47 +347,48 @@ EffectInstance* create_effect_instance(EffectBlueprint* effectBp) {
gEffectInstances[i] = newEffectInst = general_heap_malloc(sizeof(*newEffectInst));
ASSERT(newEffectInst != NULL);
curEffect = &gEffectGraphicsData[0];
effectGraphics = &gEffectGraphicsData[0];
newEffectInst->effectIndex = effectBp->effectID;
newEffectInst->flags = 1;
newEffectInst->flags = FX_INSTANCE_FLAG_ENABLED;
// Look for a loaded effect of the proper index
for (i = 0; i < ARRAY_COUNT(gEffectGraphicsData); i++) {
if ((curEffect->flags & EFFECT_LOADED) && (curEffect->effectIndex == effectBp->effectID)) {
if ((effectGraphics->flags & FX_GRAPHICS_LOADED) && (effectGraphics->effectIndex == effectBp->effectID)) {
break;
}
curEffect++;
effectGraphics++;
}
ASSERT(i < ARRAY_COUNT(gEffectGraphicsData));
// If this is the first new instance of the effect, initialize the function pointers
if (curEffect->instanceCounter == 0) {
curEffect->update = effectBp->update;
if (curEffect->update == NULL) {
curEffect->renderWorld = stub_effect_delegate;
if (effectGraphics->instanceCounter == 0) {
effectGraphics->update = effectBp->update;
if (effectGraphics->update == NULL) {
effectGraphics->renderWorld = stub_effect_delegate;
}
curEffect->renderWorld = effectBp->renderWorld;
if (curEffect->renderUI == NULL) {
curEffect->renderUI = stub_effect_delegate;
effectGraphics->renderWorld = effectBp->renderWorld;
// @bug? null check for renderUI instead of renderWorld
if (effectGraphics->renderUI == NULL) {
effectGraphics->renderUI = stub_effect_delegate;
}
curEffect->renderUI = effectBp->unk_14;
if (curEffect->renderUI == NULL) {
curEffect->renderUI = stub_effect_delegate;
effectGraphics->renderUI = effectBp->renderUI;
if (effectGraphics->renderUI == NULL) {
effectGraphics->renderUI = stub_effect_delegate;
}
}
curEffect->instanceCounter++;
newEffectInst->graphics = curEffect;
effectGraphics->instanceCounter++;
newEffectInst->graphics = effectGraphics;
if (effectBp->init != NULL) {
effectBp->init(newEffectInst);
}
if (gGameStatusPtr->isBattle) {
newEffectInst->flags |= 4;
newEffectInst->flags |= FX_INSTANCE_FLAG_BATTLE;
}
return newEffectInst;
}
@ -412,7 +420,7 @@ void remove_all_effects(void) {
for (i = 0; i < ARRAY_COUNT(gEffectInstances); i++) {
EffectInstance* effect = gEffectInstances[i];
if (effect != NULL && effect->flags & 4) {
if (effect != NULL && effect->flags & FX_INSTANCE_FLAG_BATTLE) {
if (effect->data.any != NULL) {
general_heap_free(effect->data.any);
}
@ -424,32 +432,32 @@ void remove_all_effects(void) {
s32 load_effect(s32 effectIndex) {
EffectTableEntry* effectEntry = &gEffectTable[effectIndex];
EffectGraphics* curEffect;
EffectGraphics* effectGraphics;
TlbMappablePage* tlbMappablePages;
s32 i;
// Look for a loaded effect matching the desired index
for (i = 0, curEffect = &gEffectGraphicsData[0]; i < ARRAY_COUNT(gEffectGraphicsData); i++) {
if (curEffect->flags & EFFECT_LOADED && curEffect->effectIndex == effectIndex) {
for (i = 0, effectGraphics = &gEffectGraphicsData[0]; i < ARRAY_COUNT(gEffectGraphicsData); i++) {
if (effectGraphics->flags & FX_GRAPHICS_LOADED && effectGraphics->effectIndex == effectIndex) {
break;
}
curEffect++;
effectGraphics++;
}
// If an effect was found within the table, initialize it and return
if (i < ARRAY_COUNT(gEffectGraphicsData)) {
curEffect->effectIndex = effectIndex;
curEffect->instanceCounter = 0;
curEffect->flags = EFFECT_LOADED;
effectGraphics->effectIndex = effectIndex;
effectGraphics->instanceCounter = 0;
effectGraphics->flags = FX_GRAPHICS_LOADED;
return 1;
}
// If a loaded effect wasn't found, look for the first empty space
for (i = 0, curEffect = &gEffectGraphicsData[0]; i < ARRAY_COUNT(gEffectGraphicsData); i++) {
if (!(curEffect->flags & EFFECT_LOADED)) {
for (i = 0, effectGraphics = &gEffectGraphicsData[0]; i < ARRAY_COUNT(gEffectGraphicsData); i++) {
if (!(effectGraphics->flags & FX_GRAPHICS_LOADED)) {
break;
}
curEffect++;
effectGraphics++;
}
// If no empty space was found, panic
@ -465,14 +473,14 @@ s32 load_effect(s32 effectIndex) {
// If there's extra data the effect normally loads, allocate space and copy into the new space
if (effectEntry->graphicsDmaStart != NULL) {
void* effectDataBuf = general_heap_malloc(effectEntry->graphicsDmaEnd - effectEntry->graphicsDmaStart);
curEffect->data = effectDataBuf;
effectGraphics->data = effectDataBuf;
ASSERT(effectDataBuf != NULL);
dma_copy(effectEntry->graphicsDmaStart, effectEntry->graphicsDmaEnd, curEffect->data);
dma_copy(effectEntry->graphicsDmaStart, effectEntry->graphicsDmaEnd, effectGraphics->data);
}
// Initialize the newly loaded effect data
curEffect->effectIndex = effectIndex;
curEffect->instanceCounter = 0;
curEffect->flags = EFFECT_LOADED;
effectGraphics->effectIndex = effectIndex;
effectGraphics->instanceCounter = 0;
effectGraphics->flags = FX_GRAPHICS_LOADED;
return 1;
}

View File

@ -44,7 +44,7 @@ EffectInstance* attack_result_text_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3,
bp.init = attack_result_text_init;
bp.update = attack_result_text_update;
bp.renderWorld = attack_result_text_render;
bp.unk_14 = func_E0090428;
bp.renderUI = func_E0090428;
bp.effectID = EFFECT_ATTACK_RESULT_TEXT;
effect = shim_create_effect_instance(&bp);

View File

@ -36,7 +36,7 @@ void aura_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, EffectInstance*
bp.update = aura_update;
bp.renderWorld = aura_render;
bp.unk_00 = 0;
bp.unk_14 = 0;
bp.renderUI = NULL;
bp.effectID = EFFECT_AURA;
effect = shim_create_effect_instance(bpPtr);
@ -162,8 +162,8 @@ void aura_update(EffectInstance* effect) {
s32 lifeTime;
data = effect->data.aura;
if (effect->flags & 0x10) {
effect->flags &= ~0x10;
if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
data->fadeTime = 5;
}

View File

@ -24,7 +24,7 @@ EffectInstance* balloon_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s
bp.update = balloon_update;
bp.renderWorld = balloon_render;
bp.unk_00 = 0;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_BALLOON;
effect = shim_create_effect_instance(&bp);

View File

@ -39,7 +39,7 @@ void big_smoke_puff_main(f32 x, f32 y, f32 z) {
bp.init = big_smoke_puff_init;
bp.update = big_smoke_puff_update;
bp.renderWorld = big_smoke_puff_render;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_BIG_SMOKE_PUFF;
effect = shim_create_effect_instance(&bp);

View File

@ -24,7 +24,7 @@ void big_snowflakes_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3) {
bp.init = big_snowflakes_init;
bp.update = big_snowflakes_update;
bp.renderWorld = big_snowflakes_render;
bp.unk_14 = 0;
bp.renderUI = NULL;
bp.effectID = EFFECT_BIG_SNOWFLAKES;
effect = shim_create_effect_instance(&bp);

View File

@ -36,7 +36,7 @@ void blast_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5) {
bp.update = blast_update;
bp.renderWorld = blast_render;
bp.unk_00 = 0;
bp.unk_14 = 0;
bp.renderUI = NULL;
bp.effectID = EFFECT_BLAST;
effect = shim_create_effect_instance(bpPtr);

View File

@ -62,7 +62,7 @@ EffectInstance* bombette_breaking_main(s32 type, s32 modelID, s32 treeIndex, f32
bp.init = bombette_breaking_init;
bp.update = bombette_breaking_update;
bp.renderWorld = bombette_breaking_render;
bp.unk_14 = 0;
bp.renderUI = NULL;
bp.effectID = EFFECT_BOMBETTE_BREAKING;
f20 *= 0.5;

View File

@ -29,7 +29,7 @@ EffectInstance* breaking_junk_main(s32 arg0, f32 x, f32 y, f32 z, f32 scale, s32
bp.init = breaking_junk_init;
bp.update = breaking_junk_update;
bp.renderWorld = breaking_junk_render;
bp.unk_14 = 0;
bp.renderUI = NULL;
bp.effectID = EFFECT_BREAKING_JUNK;
effect = shim_create_effect_instance(bpPtr);
@ -87,8 +87,8 @@ void breaking_junk_update(EffectInstance* effect) {
BreakingJunkFXData* data = effect->data.breakingJunk;
s32 i;
if (effect->flags & 0x10) {
effect->flags &= ~0x10;
if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
data->timeLeft = 16;
}
if (data->timeLeft < 1000) {

View File

@ -57,7 +57,7 @@ void bulb_glow_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, EffectInst
bp.update = bulb_glow_update;
bp.renderWorld = bulb_glow_render;
bp.unk_00 = 0;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_BULB_GLOW;
effect = shim_create_effect_instance(&bp);
@ -94,8 +94,8 @@ void bulb_glow_update(EffectInstance* effect) {
BulbGlowFXData* data = effect->data.bulbGlow;
s32 unk18;
if (effect->flags & 0x10) {
effect->flags &= ~0x10;
if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
data->unk_14 = 10;
}

View File

@ -40,7 +40,7 @@ EffectInstance* butterflies_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3) {
bp.init = butterflies_init;
bp.update = butterflies_update;
bp.renderWorld = butterflies_render;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_BUTTERFLIES;
effect = shim_create_effect_instance(&bp);
@ -83,8 +83,8 @@ void butterflies_update(EffectInstance* effect) {
f32 var_f24;
temp_s0 = effect->data.butterflies;
if (effect->flags & 0x10) {
effect->flags &= ~0x10;
if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
temp_s0->unk_04 = 900;
}

View File

@ -179,7 +179,7 @@ EffectInstance* chapter_change_main(s32 arg0, f32 posX, f32 posY, f32 arg3, f32
bp.update = chapter_change_update;
bp.renderWorld = chapter_change_render;
bp.unk_00 = 0;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_CHAPTER_CHANGE;
effect = shim_create_effect_instance(&bp);
@ -227,8 +227,8 @@ void chapter_change_init(EffectInstance* effect) {
void chapter_change_update(EffectInstance* effect) {
ChapterChangeFXData* data = effect->data.chapterChange;
if (effect->flags & EFFECT_INSTANCE_FLAG_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAG_10;
if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
data->timeLeft = 16;
}

View File

@ -22,7 +22,7 @@ EffectInstance* chomp_drop_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4
bp.update = chomp_drop_update;
bp.renderWorld = chomp_drop_render;
bp.unk_00 = 0;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_CHOMP_DROP;
effect = shim_create_effect_instance(&bp);

View File

@ -21,7 +21,7 @@ void cloud_puff_main(f32 arg0, f32 arg1, f32 arg2, f32 arg3) {
bp.init = cloud_puff_init;
bp.update = cloud_puff_update;
bp.renderWorld = cloud_puff_render;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_CLOUD_PUFF;
effect = shim_create_effect_instance(&bp);

View File

@ -20,7 +20,7 @@ void cloud_trail_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3) {
bp.init = cloud_trail_init;
bp.update = cloud_trail_update;
bp.renderWorld = cloud_trail_render;
bp.unk_14 = 0;
bp.renderUI = NULL;
bp.effectID = EFFECT_CLOUD_TRAIL;
effect = shim_create_effect_instance(&bp);

View File

@ -86,7 +86,7 @@ EffectInstance* cold_breath_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg
bp.update = cold_breath_update;
bp.renderWorld = cold_breath_render;
bp.unk_00 = 0;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_COLD_BREATH;
effect = shim_create_effect_instance(&bp);
@ -126,8 +126,8 @@ void cold_breath_update(EffectInstance* effect) {
ColdBreathFXData* data = effect->data.coldBreath;
s32 unk00 = data->unk_00;
if (effect->flags & 0x10) {
effect->flags &= ~0x10;
if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
data->unk_10 = 0x10;
}

View File

@ -105,7 +105,7 @@ EffectInstance* confetti_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4,
bpPtr->update = confetti_update;
bpPtr->renderWorld = confetti_render;
bpPtr->unk_00 = 0;
bpPtr->unk_14 = NULL;
bpPtr->renderUI = NULL;
bpPtr->effectID = EFFECT_CONFETTI;
effect = shim_create_effect_instance(bpPtr);

View File

@ -89,7 +89,7 @@ void damage_indicator_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32
bp.init = damage_indicator_init;
bp.update = damage_indicator_update;
bp.renderWorld = damage_indicator_render;
bp.unk_14 = func_E003C47C;
bp.renderUI = func_E003C47C;
bp.unk_00 = 0;
bp.effectID = EFFECT_DAMAGE_INDICATOR;

View File

@ -91,7 +91,7 @@ void damage_stars_main(
bpPtr->init = damage_stars_init;
bpPtr->update = damage_stars_update;
bpPtr->renderWorld = damage_stars_render;
bpPtr->unk_14 = NULL;
bpPtr->renderUI = NULL;
bpPtr->effectID = EFFECT_DAMAGE_STARS;
effect = shim_create_effect_instance(bpPtr);

View File

@ -23,7 +23,7 @@ EffectInstance* debuff_main(s32 type, f32 x, f32 y, f32 z) {
bp.init = debuff_init;
bp.update = debuff_update;
bp.renderWorld = debuff_render;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_DEBUFF;
effect = shim_create_effect_instance(&bp);

View File

@ -44,7 +44,7 @@ EffectInstance* disable_x_main(s32 type, f32 x, f32 y, f32 z, s32 arg4) {
bp.init = disable_x_init;
bp.update = disable_x_update;
bp.renderWorld = disable_x_render;
bp.unk_14 = func_E0082528;
bp.renderUI = func_E0082528;
bp.effectID = EFFECT_DISABLE_X;
effect = shim_create_effect_instance(&bp);
@ -111,8 +111,8 @@ void disable_x_update(EffectInstance* effect) {
u32 type;
s32 i;
if (effect->flags & 0x10) {
effect->flags &= ~0x10;
if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
data->unk_28 = 21;
}

View File

@ -20,7 +20,7 @@ void drop_leaves_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg4) {
bp.update = drop_leaves_update;
bp.renderWorld = drop_leaves_render;
bp.unk_00 = 0;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_DROP_LEAVES;
effect = shim_create_effect_instance(&bp);

View File

@ -30,7 +30,7 @@ EffectInstance* dust_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg4) {
bp.update = dust_update;
bp.renderWorld = dust_render;
bp.unk_00 = 0;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_DUST;
effect = shim_create_effect_instance(bpPtr);

View File

@ -65,7 +65,7 @@ void effect_3D_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5,
bpPtr->init = effect_3D_init;
bpPtr->update = effect_3D_update;
bpPtr->renderWorld = effect_3D_render;
bpPtr->unk_14 = NULL;
bpPtr->renderUI = NULL;
bpPtr->effectID = EFFECT_3D;
effect = shim_create_effect_instance(bpPtr);

View File

@ -30,7 +30,7 @@ EffectInstance* effect_46_main(s32 arg0, PlayerStatus* arg1, f32 arg2, s32 arg3)
bp.update = effect_46_update;
bp.renderWorld = effect_46_render;
bp.unk_00 = 0;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_46;
effect = shim_create_effect_instance(&bp);

View File

@ -47,7 +47,7 @@ EffectInstance* effect_63_main(
bpPtr->update = effect_63_update;
bpPtr->renderWorld = effect_63_render;
bpPtr->unk_00 = 0;
bpPtr->unk_14 = NULL;
bpPtr->renderUI = NULL;
bpPtr->effectID = EFFECT_63;
effect = shim_create_effect_instance(bpPtr);
@ -134,8 +134,8 @@ void effect_63_update(EffectInstance* effect) {
s32 unk_24;
s32 i;
if (effect->flags & 0x10) {
effect->flags &= ~0x10;
if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
part->unk_20 = 0x10;
}

View File

@ -30,7 +30,7 @@ EffectInstance* effect_65_main(
bp.update = effect_65_update;
bp.renderWorld = effect_65_render;
bp.unk_00 = 0;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_65;
effect = shim_create_effect_instance(&bp);
@ -128,8 +128,8 @@ void effect_65_update(EffectInstance* effect) {
f32 dist;
s32 idx;
if (effect->flags & EFFECT_INSTANCE_FLAG_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAG_10;
if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
data->timeLeft = 16;
}

View File

@ -24,7 +24,7 @@ EffectInstance* effect_75_main(s32 arg0, f32 posX, f32 posY, f32 posZ, f32 scale
bp.update = effect_75_update;
bp.renderWorld = effect_75_render;
bp.unk_00 = 0;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_75;
effect = shim_create_effect_instance(&bp);
@ -79,8 +79,8 @@ void effect_75_update(EffectInstance* effect) {
Effect75FXData* data = effect->data.unk_75;
s32 unk_14;
if (effect->flags & 0x10) {
effect->flags &= ~0x10;
if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
data->unk_10 = 0x10;
}

View File

@ -39,7 +39,7 @@ EffectInstance* effect_86_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4,
bp.update = effect_86_update;
bp.renderWorld = effect_86_render;
bp.unk_00 = 0;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_86;
effect = shim_create_effect_instance(&bp);
@ -79,8 +79,8 @@ void effect_86_init(EffectInstance* effect) {
void effect_86_update(EffectInstance* effect) {
Effect86FXData* data = effect->data.unk_86;
if (effect->flags & 0x10) {
effect->flags &= ~0x10;
if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
data->unk_10 = 0x10;
}

View File

@ -45,7 +45,7 @@ EffectInstance* embers_main(
bp.update = embers_update;
bp.renderWorld = embers_render;
bp.unk_00 = 0;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_EMBERS;
effect = shim_create_effect_instance(&bp);
@ -101,8 +101,8 @@ void embers_update(EffectInstance* effect) {
f32 unk_6C;
s32 i;
if (effect->flags & 0x10) {
effect->flags &= ~0x10;
if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
part->unk_18 = 0x10;
}

View File

@ -102,7 +102,7 @@ void emote_main(s32 arg0, Npc* arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32
bp.init = emote_init;
bp.update = emote_update;
bp.renderWorld = emote_render;
bp.unk_14 = 0;
bp.renderUI = NULL;
bp.effectID = EFFECT_EMOTE;
effect = shim_create_effect_instance(bpPtr);

View File

@ -38,7 +38,7 @@ void ending_decals_main(s32 type, f32 posX, f32 posY, f32 posZ, f32 arg4, Effect
bp.update = ending_decals_update;
bp.renderWorld = ending_decals_render;
bp.unk_00 = 0;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_ENDING_DECALS;
effect = shim_create_effect_instance(&bp);
@ -86,8 +86,8 @@ void ending_decals_init(EffectInstance* effect) {
void ending_decals_update(EffectInstance* effect) {
EndingDecalsFXData* data = effect->data.endingDecals;
if (effect->flags & 0x10) {
effect->flags &= ~0x10;
if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
data->unk_1C = 10;
}

View File

@ -45,7 +45,7 @@ EffectInstance* energy_in_out_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 a
bp.update = energy_in_out_update;
bp.renderWorld = energy_in_out_render;
bp.unk_00 = 0;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_ENERGY_IN_OUT;
effect = shim_create_effect_instance(&bp);
@ -173,8 +173,8 @@ void energy_in_out_update(EffectInstance* effect) {
f32 angle;
s32 i;
if (effect->flags & 0x10) {
effect->flags &= ~0x10;
if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
part->unk_10 = 16;
}

View File

@ -22,7 +22,7 @@ EffectInstance* energy_orb_wave_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32
bp.update = energy_orb_wave_update;
bp.renderWorld = energy_orb_wave_render;
bp.unk_00 = 0;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_ENERGY_ORB_WAVE;
effect = shim_create_effect_instance(&bp);
@ -88,8 +88,8 @@ void energy_orb_wave_update(EffectInstance* effect) {
u16 var_4;
s32 var_3;
if (effect->flags & EFFECT_INSTANCE_FLAG_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAG_10;
if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
data->unk_10 = 30;
}

View File

@ -26,7 +26,7 @@ void energy_shockwave_main(
bp.update = energy_shockwave_update;
bp.renderWorld = energy_shockwave_render;
bp.unk_00 = 0;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_ENERGY_SHOCKWAVE;
effect = shim_create_effect_instance(&bp);
@ -80,7 +80,7 @@ void energy_shockwave_update(EffectInstance* effect) {
angle = func_E0200044(360, unk_2C);
shim_sin_deg(angle);
shim_cos_deg(angle);
shim_load_effect(58);
shim_load_effect(EFFECT_SHIMMER_WAVE);
shimmer_wave_main(0, data->unk_04, data->unk_08, data->unk_0C, unk_2C * 8, 10.0f, 10, 20);
}

View File

@ -36,7 +36,7 @@ void explosion_main(s32 type, f32 x, f32 y, f32 z) {
bpPtr->init = explosion_init;
bpPtr->update = explosion_update;
bpPtr->renderWorld = explosion_render;
bpPtr->unk_14 = NULL;
bpPtr->renderUI = NULL;
bpPtr->effectID = EFFECT_EXPLOSION;

View File

@ -20,7 +20,7 @@ void falling_leaves_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3) {
bp.update = falling_leaves_update;
bp.renderWorld = falling_leaves_render;
bp.unk_00 = 0;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_FALLING_LEAVES;
effect = shim_create_effect_instance(&bp);

View File

@ -31,7 +31,7 @@ EffectInstance* fire_breath_main(
bp.init = fire_breath_init;
bp.update = fire_breath_update;
bp.renderWorld = fire_breath_render;
bp.unk_14 = 0;
bp.renderUI = NULL;
bp.effectID = EFFECT_FIRE_BREATH;
effect = shim_create_effect_instance(&bp);

View File

@ -28,7 +28,7 @@ EffectInstance* fire_flower_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg
bp.init = fire_flower_init;
bp.update = fire_flower_update;
bp.renderWorld = fire_flower_render;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_FIRE_FLOWER;
effect = shim_create_effect_instance(&bp);
@ -96,7 +96,7 @@ void fire_flower_update(EffectInstance* effect) {
switch (unk_04) {
case 0:
shim_load_effect(45);
shim_load_effect(EFFECT_STARS_SPREAD);
stars_spread_main(0, part->pos.x - 10.0f, part->pos.y, part->pos.z, 7, 20);
part->unk_34 = 0;
part->unk_38 = 0;

View File

@ -58,7 +58,7 @@ EffectInstance* firework_main(
bp.init = firework_init;
bp.update = firework_update;
bp.renderWorld = firework_render;
bp.unk_14 = func_E0086398;
bp.renderUI = func_E0086398;
bp.effectID = EFFECT_FIREWORK;
effect = shim_create_effect_instance(&bp);

View File

@ -93,7 +93,7 @@ EffectInstance* firework_rocket_main(s32 variation, f32 centerX, f32 centerY, f3
bp.update = firework_rocket_update;
bp.renderWorld = firework_rocket_render;
bp.unk_00 = 0;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_FIREWORK_ROCKET;
effect = shim_create_effect_instance(&bp);
@ -147,8 +147,8 @@ void firework_rocket_update(EffectInstance* effect) {
s32 lifeTime;
s32 i;
if (effect->flags & EFFECT_INSTANCE_FLAG_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAG_10;
if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
data->timeLeft = 16;
}

View File

@ -57,7 +57,7 @@ void flame_main(
bpPtr->update = flame_update;
bpPtr->renderWorld = flame_render;
bpPtr->unk_00 = 0;
bpPtr->unk_14 = NULL;
bpPtr->renderUI = NULL;
bpPtr->effectID = EFFECT_FLAME;
effect = shim_create_effect_instance(bpPtr);

View File

@ -28,7 +28,7 @@ EffectInstance* flashing_box_shockwave_main(
bp.update = flashing_box_shockwave_update;
bp.renderWorld = flashing_box_shockwave_render;
bp.unk_00 = 0;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_FLASHING_BOX_SHOCKWAVE;
effect = shim_create_effect_instance(&bp);

View File

@ -29,7 +29,7 @@ EffectInstance* floating_cloud_puff_main(
bp.update = floating_cloud_puff_update;
bp.renderWorld = floating_cloud_puff_render;
bp.unk_00 = 0;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_FLOATING_CLOUD_PUFF;
effect = shim_create_effect_instance(&bp);
@ -66,8 +66,8 @@ void floating_cloud_puff_update(EffectInstance* effect) {
FloatingCloudPuffFXData* data = effect->data.floatingCloudPuff;
s32 unk_14;
if (effect->flags & 0x10) {
effect->flags &= ~0x10;
if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
data->unk_10 = 16;
}

View File

@ -21,7 +21,7 @@ void floating_flower_main(s32 type, f32 posX, f32 posY, f32 posZ, s32 duration)
bp.init = floating_flower_init;
bp.update = floating_flower_update;
bp.renderWorld = floating_flower_render;
bp.unk_14 = 0;
bp.renderUI = NULL;
bp.effectID = EFFECT_FLOATING_FLOWER;
effect = shim_create_effect_instance(&bp);

View File

@ -26,7 +26,7 @@ EffectInstance* floating_rock_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 a
bp.update = floating_rock_update;
bp.renderWorld = floating_rock_render;
bp.unk_00 = 0;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_FLOATING_ROCK;
effect = shim_create_effect_instance(&bp);

View File

@ -55,7 +55,7 @@ void flower_splash_main(f32 posX, f32 posY, f32 posZ, f32 angle) {
bp.update = flower_splash_update;
bp.renderWorld = flower_splash_render;
bp.unk_00 = 0;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_FLOWER_SPLASH;
effect = shim_create_effect_instance(&bp);

View File

@ -57,7 +57,7 @@ void flower_trail_main(s32 triggeredByNpc, f32 posX, f32 posY, f32 posZ, f32 ang
bp.update = flower_trail_update;
bp.renderWorld = flower_trail_render;
bp.unk_00 = 0;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_FLOWER_TRAIL;
effect = shim_create_effect_instance(&bp);

View File

@ -32,7 +32,7 @@ void footprint_main(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5,
bp.init = footprint_init;
bp.update = footprint_update;
bp.renderWorld = footprint_render;
bp.unk_14 = 0;
bp.renderUI = NULL;
bp.effectID = EFFECT_FOOTPRINT;
effect = shim_create_effect_instance(&bp);

View File

@ -33,7 +33,7 @@ EffectInstance* fright_jar_main(
bp.update = fright_jar_update;
bp.renderWorld = fright_jar_render;
bp.unk_00 = 0;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_FRIGHT_JAR;
effect = shim_create_effect_instance(&bp);
@ -67,8 +67,8 @@ void fright_jar_update(EffectInstance* effect) {
FrightJarFXData* data = effect->data.frightJar;
s32 unk_10;
if (effect->flags & 0x10) {
effect->flags &= ~0x10;
if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
data->unk_10 = 16;
}

View File

@ -29,7 +29,7 @@ void gather_energy_pink_main(s32 type, f32 posX, f32 posY, f32 posZ, f32 scale,
bp.init = gather_energy_pink_init;
bp.update = gather_energy_pink_update;
bp.renderWorld = gather_energy_pink_render;
bp.unk_14 = 0;
bp.renderUI = NULL;
bp.effectID = EFFECT_GATHER_ENERGY_PINK;
effect = shim_create_effect_instance(&bp);

View File

@ -23,7 +23,7 @@ EffectInstance* gather_magic_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 ar
bp.init = gather_magic_init;
bp.update = gather_magic_update;
bp.renderWorld = gather_magic_render;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_GATHER_MAGIC;
effect = shim_create_effect_instance(&bp);

View File

@ -1,8 +1,8 @@
#include "common.h"
#include "effects_internal.h"
extern char D_09000000_345B40[][0x1000];
extern char D_09004000_349B40[][0x1000];
extern IMG_BIN D_09000000_345B40[][0x1000];
extern IMG_BIN D_09004000_349B40[][0x1000];
extern Gfx D_09008100_34DC40[];
extern Gfx D_09008170_34DCB0[];
extern Gfx D_09008190_34DCD0[];
@ -13,8 +13,8 @@ Gfx* D_E0036630[] = {
D_09008170_34DCB0, D_09008190_34DCD0, D_090081A8_34DCE8, D_090081C0_34DD00
};
u8 D_E0036640[] = { 0x3C, 0x78, 0x8C, 0x93, 0x95, 0x96, 0x00, 0x00 };
u8 D_E0036648[] = { 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x00, 0x00 };
u8 AnimScaleIn[] = { 60, 120, 140, 147, 149, 150 };
u8 AnimScaleOut[] = { 150, 150, 150, 150, 150, 150 };
void got_item_outline_init(EffectInstance* effect);
void got_item_outline_update(EffectInstance* effect);
@ -22,10 +22,10 @@ void got_item_outline_render(EffectInstance* effect);
void got_item_outline_appendGfx(void* effect);
void got_item_outline_main(
s32 arg0,
f32 arg1,
f32 arg2,
f32 arg3,
s32 type,
f32 posX,
f32 posY,
f32 posZ,
f32 arg4,
EffectInstance** outEffect
) {
@ -38,7 +38,7 @@ void got_item_outline_main(
bp.update = got_item_outline_update;
bp.renderWorld = got_item_outline_render;
bp.unk_00 = 0;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_GOT_ITEM_OUTLINE;
effect = shim_create_effect_instance(&bp);
@ -46,13 +46,13 @@ void got_item_outline_main(
data = effect->data.gotItemOutline = shim_general_heap_malloc(numParts * sizeof(*data));
ASSERT(effect->data.gotItemOutline != NULL);
data->unk_14 = 100;
data->unk_00 = arg0;
data->unk_10 = 0;
data->unk_04 = arg1;
data->unk_08 = arg2;
data->unk_0C = arg3;
data->unk_1C = 255;
data->timeLeft = 100;
data->type = type;
data->lifetime = 0;
data->pos.x = posX;
data->pos.y = posY;
data->pos.z = posZ;
data->alpha = 255;
*outEffect = effect;
}
@ -62,31 +62,31 @@ void got_item_outline_init(EffectInstance* effect) {
void got_item_outline_update(EffectInstance* effect) {
GotItemOutlineFXData* data = effect->data.gotItemOutline;
s32 unk_10;
s32 time;
if (data->unk_14 < 100) {
data->unk_14--;
if (data->unk_14 < 0) {
if (data->timeLeft < 100) {
data->timeLeft--;
if (data->timeLeft < 0) {
shim_remove_effect(effect);
return;
}
}
data->unk_10++;
unk_10 = data->unk_10;
data->lifetime++;
time = data->lifetime;
if (data->unk_14 < 6) {
data->unk_18 = D_E0036648[5 - data->unk_14] / 150.0f;
data->unk_1C /= 2;
if (data->timeLeft < 6) {
data->scale = AnimScaleOut[5 - data->timeLeft] / 150.0f;
data->alpha /= 2;
} else {
if (unk_10 < 7) {
data->unk_18 = D_E0036640[unk_10 - 1] / 150.0f;
if (time < 7) {
data->scale = AnimScaleIn[time - 1] / 150.0f;
} else {
data->unk_18 = 1.0f;
data->scale = 1.0f;
}
if (unk_10 >= 7) {
data->unk_10 = 7;
if (time >= 7) {
data->lifetime = 7;
}
}
}
@ -109,49 +109,49 @@ void func_E003621C(void) {
void got_item_outline_appendGfx(void* effect) {
GotItemOutlineFXData* data = ((EffectInstance*)effect)->data.gotItemOutline;
s32 unk_00 = data->unk_00;
f32 unk_18 = data->unk_18;
Matrix4f sp18;
Matrix4f sp58;
s32 type = data->type;
f32 scale = data->scale;
Matrix4f mtxTransform;
Matrix4f mtxTemp;
s32 i;
if (unk_18 != 0.0f) {
if (scale != 0.0f) {
gDPPipeSync(gMainGfxPos++);
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
gSPDisplayList(gMainGfxPos++, D_09008100_34DC40);
if (unk_00 == 0) {
gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 255, data->unk_1C);
if (type == 0) {
gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 255, data->alpha);
gDPSetEnvColor(gMainGfxPos++, 0, 0, 0, 255);
} else {
gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 255, data->unk_1C);
gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 255, data->alpha);
gDPSetEnvColor(gMainGfxPos++, 255, 255, 0, 255);
}
shim_guTranslateF(sp18, data->unk_04, data->unk_08, data->unk_0C);
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
shim_guMtxCatF(sp58, sp18, sp18);
shim_guTranslateF(sp58, 0.0f, 0.0f, -2.0f);
shim_guMtxCatF(sp58, sp18, sp18);
shim_guTranslateF(mtxTransform, data->pos.x, data->pos.y, data->pos.z);
shim_guRotateF(mtxTemp, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
shim_guMtxCatF(mtxTemp, mtxTransform, mtxTransform);
shim_guTranslateF(mtxTemp, 0.0f, 0.0f, -2.0f);
shim_guMtxCatF(mtxTemp, mtxTransform, mtxTransform);
unk_18 *= 0.6;
scale *= 0.6;
shim_guScaleF(sp58, unk_18, unk_18, 1.0f);
shim_guMtxCatF(sp58, sp18, sp18);
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
shim_guScaleF(mtxTemp, scale, scale, 1.0f);
shim_guMtxCatF(mtxTemp, mtxTransform, mtxTransform);
shim_guMtxF2L(mtxTransform, &gDisplayContext->matrixStack[gMatrixListPos]);
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
for (i = 0; i < 4; i++) {
char* temp;
IMG_PTR img;
if (unk_00 == 0) {
temp = D_09000000_345B40[i];
if (type == 0) {
img = D_09000000_345B40[i];
} else {
temp = D_09004000_349B40[i];
img = D_09004000_349B40[i];
}
gDPSetTextureImage(gMainGfxPos++, G_IM_FMT_IA, G_IM_SIZ_8b, 128, temp);
gDPSetTextureImage(gMainGfxPos++, G_IM_FMT_IA, G_IM_SIZ_8b, 128, img);
gDPSetTile(gMainGfxPos++, G_IM_FMT_IA, G_IM_SIZ_8b, 16, 0, G_TX_LOADTILE, 0,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);

View File

@ -32,7 +32,7 @@ EffectInstance* green_impact_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 ar
bpPtr->init = green_impact_init;
bpPtr->update = green_impact_update;
bpPtr->renderWorld = green_impact_render;
bpPtr->unk_14 = NULL;
bpPtr->renderUI = NULL;
bpPtr->effectID = EFFECT_GREEN_IMPACT;
effect = shim_create_effect_instance(bpPtr);

View File

@ -36,7 +36,7 @@ EffectInstance* hieroglyphs_main(s32 arg0, f32 posX, f32 posY, f32 posZ, f32 arg
effectBp.update = hieroglyphs_update;
effectBp.renderWorld = hieroglyphs_render;
effectBp.unk_00 = 0;
effectBp.unk_14 = 0;
effectBp.renderUI = NULL;
effectBp.effectID = EFFECT_HIEROGLYPHS;
effect = shim_create_effect_instance(&effectBp);
@ -75,8 +75,8 @@ void hieroglyphs_update(EffectInstance* effect) {
HieroglyphsFXData* data = effect->data.hieroglyphs;
s32 temp_a2;
if (effect->flags & 16) {
effect->flags &= ~16;
if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
data->timeLeft = 16;
}

View File

@ -23,7 +23,7 @@ EffectInstance* huff_puff_breath_main(s32 type, f32 posX, f32 posY, f32 posZ, f3
effectBp.update = huff_puff_breath_update;
effectBp.renderWorld = huff_puff_breath_render;
effectBp.unk_00 = 0;
effectBp.unk_14 = 0;
effectBp.renderUI = NULL;
effectBp.effectID = EFFECT_HUFF_PUFF_BREATH;
effect = shim_create_effect_instance(&effectBp);
@ -74,8 +74,8 @@ void huff_puff_breath_update(EffectInstance* effect) {
HuffPuffBreathFXData* data = effect->data.huffPuffBreath;
s32 temp_a2;
if (effect->flags & 16) {
effect->flags &= ~16;
if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
data->timeLeft = 16;
}
if (data->timeLeft < 1000) {

View File

@ -25,7 +25,7 @@ EffectInstance* ice_pillar_main(s32 arg0, f32 x, f32 y, f32 z, f32 scale, s32 ar
effectBp.update = ice_pillar_update;
effectBp.renderWorld = ice_pillar_render;
effectBp.unk_00 = 0;
effectBp.unk_14 = 0;
effectBp.renderUI = NULL;
effectBp.effectID = EFFECT_ICE_PILLAR;
effect = shim_create_effect_instance(&effectBp);
@ -72,8 +72,8 @@ void ice_pillar_update(EffectInstance* effect) {
s32 lifeTime;
s32 i;
if (effect->flags & 0x10) {
effect->flags &= ~0x10;
if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
data->timeLeft = 16;
}

View File

@ -30,7 +30,7 @@ EffectInstance* ice_shard_main(
bp.update = ice_shard_update;
bp.renderWorld = ice_shard_render;
bp.unk_00 = 0;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_ICE_SHARD;
effect = shim_create_effect_instance(&bp);
@ -76,8 +76,8 @@ void ice_shard_update(EffectInstance* effect) {
IceShardFXData* data = effect->data.iceShard;
s32 unk_00 = data->type;
if (effect->flags & EFFECT_INSTANCE_FLAG_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAG_10;
if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
data->timeLeft = 16;
}

View File

@ -98,7 +98,7 @@ void landing_dust_main(s32 type, f32 x, f32 y, f32 z, f32 arg4) {
bpPtr->update = landing_dust_update;
bpPtr->renderWorld = landing_dust_render;
bpPtr->unk_00 = 0;
bpPtr->unk_14 = NULL;
bpPtr->renderUI = NULL;
bpPtr->effectID = EFFECT_LANDING_DUST;
effect = shim_create_effect_instance(bpPtr);

View File

@ -23,7 +23,7 @@ void lens_flare_update(EffectInstance* effect);
void lens_flare_render(EffectInstance* effect);
void lens_flare_appendGfx(void* effect);
void lens_flare_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg4) {
void lens_flare_main(s32 type, f32 posX, f32 posY, f32 posZ, s32 duration) {
EffectBlueprint bp;
EffectInstance* effect;
LensFlareFXData* data;
@ -33,7 +33,7 @@ void lens_flare_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg4) {
bp.update = lens_flare_update;
bp.renderWorld = lens_flare_render;
bp.unk_00 = 0;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_LENS_FLARE;
effect = shim_create_effect_instance(&bp);
@ -41,23 +41,25 @@ void lens_flare_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg4) {
data = effect->data.lensFlare = shim_general_heap_malloc(numParts * sizeof(*data));
ASSERT(effect->data.lensFlare != NULL);
data->unk_00 = arg0;
data->unk_04 = arg1;
data->unk_08 = arg2;
data->unk_0C = arg3;
data->unk_2C = arg4;
data->unk_30 = 0;
data->unk_24 = 0;
data->unk_10 = 0;
if (arg0 == 0) {
data->unk_14 = 30.0f;
data->type = type;
data->pos.x = posX;
data->pos.y = posY;
data->pos.z = posZ;
data->timeLeft = duration;
data->lifetime = 0;
data->largeFlareAlpha = 0;
data->largeFlareRot = 0;
if (type == 0) {
data->largeFlareRotVel = 30.0f;
} else {
data->unk_14 = 0;
data->largeFlareRotVel = 0;
}
data->unk_18 = 0;
data->unk_28 = 0;
data->unk_20 = 0;
data->unk_1C = 0.8f;
data->largeFlareScale = 0;
data->largeFlareScaleVel = 0.8f;
data->smallFlareAlpha = 0;
data->smallFlareScale = 0;
}
void lens_flare_init(EffectInstance* effect) {
@ -65,30 +67,30 @@ void lens_flare_init(EffectInstance* effect) {
void lens_flare_update(EffectInstance* effect) {
LensFlareFXData* data = effect->data.lensFlare;
s32 unk_2C;
s32 time;
data->unk_2C--;
data->unk_30++;
data->timeLeft--;
data->lifetime++;
if (data->unk_2C < 0) {
if (data->timeLeft < 0) {
shim_remove_effect(effect);
return;
}
unk_2C = data->unk_2C;
time = data->timeLeft;
if (data->unk_30 < 7) {
data->unk_24 += (218 - data->unk_24) * 0.5;
if (data->lifetime < 7) {
data->largeFlareAlpha += (218 - data->largeFlareAlpha) * 0.5;
} else {
data->unk_24 *= 0.78;
data->largeFlareAlpha *= 0.78;
}
data->unk_18 += data->unk_1C;
data->unk_1C += 0.29;
data->unk_10 += data->unk_14;
data->unk_14 *= 0.93;
data->unk_20 = shim_sin_deg(unk_2C * 50) * 0.5 + 0.9;
data->unk_28 = shim_sin_deg(unk_2C * 40) * 64.0f + 144.0f;
data->largeFlareScale += data->largeFlareScaleVel;
data->largeFlareScaleVel += 0.29;
data->largeFlareRot += data->largeFlareRotVel;
data->largeFlareRotVel *= 0.93;
data->smallFlareScale = shim_sin_deg(time * 50) * 0.5 + 0.9;
data->smallFlareAlpha = shim_sin_deg(time * 40) * 64.0f + 144.0f;
}
void lens_flare_render(EffectInstance* effect) {
@ -106,53 +108,55 @@ void lens_flare_render(EffectInstance* effect) {
void lens_flare_appendGfx(void* effect) {
LensFlareFXData* data = ((EffectInstance*)effect)->data.lensFlare;
s32 unk_00 = data->unk_00;
s32 primA;
s32 type = data->type;
s32 alpha;
s32 idx;
Matrix4f sp18;
Matrix4f sp58;
Matrix4f sp98;
Matrix4f mtxTransform;
Matrix4f mtxTemp;
Matrix4f mtxShared;
gDPPipeSync(gMainGfxPos++);
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
gSPDisplayList(gMainGfxPos++, D_E0034788[unk_00]);
gSPDisplayList(gMainGfxPos++, D_E0034788[type]);
shim_guTranslateF(sp18, data->unk_04, data->unk_08, data->unk_0C);
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
shim_guMtxCatF(sp58, sp18, sp98);
shim_guTranslateF(mtxTransform, data->pos.x, data->pos.y, data->pos.z);
shim_guRotateF(mtxTemp, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
shim_guMtxCatF(mtxTemp, mtxTransform, mtxShared);
primA = data->unk_28;
idx = data->unk_30 * 3;
alpha = data->smallFlareAlpha;
idx = data->lifetime * 3;
if (unk_00 == 0) {
shim_guScaleF(sp58, data->unk_20, data->unk_20, data->unk_20);
shim_guMtxCatF(sp58, sp98, sp18);
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
// small twinkling shine which changes color
if (type == 0) {
shim_guScaleF(mtxTemp, data->smallFlareScale, data->smallFlareScale, data->smallFlareScale);
shim_guMtxCatF(mtxTemp, mtxShared, mtxTransform);
shim_guMtxF2L(mtxTransform, &gDisplayContext->matrixStack[gMatrixListPos]);
idx %= ARRAY_COUNT(D_E0034790);
gDPSetPrimColor(gMainGfxPos++, 0, 0, D_E0034790[idx], D_E0034790[idx + 1], D_E0034790[idx + 2], primA);
gDPSetPrimColor(gMainGfxPos++, 0, 0, D_E0034790[idx], D_E0034790[idx + 1], D_E0034790[idx + 2], alpha);
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gSPDisplayList(gMainGfxPos++, D_E0034780[0]);
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
}
primA = data->unk_24;
if (primA > 255) {
primA = 255;
alpha = data->largeFlareAlpha;
if (alpha > 255) {
alpha = 255;
}
if (primA > 0) {
shim_guScaleF(sp58, data->unk_18, data->unk_18, data->unk_18);
shim_guMtxCatF(sp58, sp98, sp18);
shim_guRotateF(sp58, data->unk_10, 0.0f, 0.0f, 1.0f);
shim_guMtxCatF(sp58, sp18, sp18);
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
// large growing white shine
if (alpha > 0) {
shim_guScaleF(mtxTemp, data->largeFlareScale, data->largeFlareScale, data->largeFlareScale);
shim_guMtxCatF(mtxTemp, mtxShared, mtxTransform);
shim_guRotateF(mtxTemp, data->largeFlareRot, 0.0f, 0.0f, 1.0f);
shim_guMtxCatF(mtxTemp, mtxTransform, mtxTransform);
shim_guMtxF2L(mtxTransform, &gDisplayContext->matrixStack[gMatrixListPos]);
gDPSetPrimColor(gMainGfxPos++, 0, 0, D_E0034790[idx], D_E0034790[idx + 1], D_E0034790[idx + 2], primA);
gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 255, primA);
gDPSetPrimColor(gMainGfxPos++, 0, 0, D_E0034790[idx], D_E0034790[idx + 1], D_E0034790[idx + 2], alpha);
gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 255, alpha);
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gSPDisplayList(gMainGfxPos++, D_E0034780[unk_00]);
gSPDisplayList(gMainGfxPos++, D_E0034780[type]);
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
}

View File

@ -104,7 +104,7 @@ void light_rays_main(
bpPtr->update = light_rays_update;
bpPtr->renderWorld = light_rays_render;
bpPtr->unk_00 = 0;
bpPtr->unk_14 = NULL;
bpPtr->renderUI = NULL;
bpPtr->effectID = EFFECT_LIGHT_RAYS;
effect = shim_create_effect_instance(bpPtr);
@ -195,8 +195,8 @@ void light_rays_update(EffectInstance* effect) {
part->lifetime++;
if (effect->flags & EFFECT_INSTANCE_FLAG_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAG_10;
if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
part->timeLeft = 10;
}

View File

@ -42,7 +42,7 @@ EffectInstance* lightning_main(
bp.update = lightning_update;
bp.renderWorld = lightning_render;
bp.unk_00 = 0;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_LIGHTNING;
effect = shim_create_effect_instance(&bp);
@ -114,8 +114,8 @@ void lightning_update(EffectInstance* effect) {
LightningFXData* data = effect->data.lightning;
s32 unk_00;
if (effect->flags & 0x10) {
effect->flags &= ~0x10;
if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
data->unk_14 = 0;
}

View File

@ -64,7 +64,7 @@ EffectInstance* lightning_bolt_main(
bp.update = lightning_bolt_update;
bp.renderWorld = lightning_bolt_render;
bp.unk_00 = 0;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_LIGHTNING_BOLT;
effect = shim_create_effect_instance(&bp);
@ -120,8 +120,8 @@ void lightning_bolt_update(EffectInstance* effect) {
LightningBoltFXData* data = effect->data.lightningBolt;
s32 type = data->type;
if (effect->flags & EFFECT_INSTANCE_FLAG_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAG_10;
if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
data->timeLeft = 16;
}

View File

@ -60,7 +60,7 @@ EffectInstance* lil_oink_main(void) {
bp.init = lil_oink_init;
bp.update = lil_oink_update;
bp.renderWorld = lil_oink_render;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_LIL_OINK;
effect = shim_create_effect_instance(&bp);

View File

@ -19,7 +19,7 @@ EffectInstance* merlin_house_stars_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3)
bp.update = merlin_house_stars_update;
bp.renderWorld = merlin_house_stars_render;
bp.unk_00 = 0;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_MERLIN_HOUSE_STARS;
effect = shim_create_effect_instance(&bp);
@ -51,8 +51,8 @@ void merlin_house_stars_update(EffectInstance* effect) {
MerlinHouseStarsFXData* data = effect->data.merlinHouseStars;
s32 unk_04;
if (effect->flags & 0x10) {
effect->flags &= ~0x10;
if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
data->unk_04 = 30;
}

View File

@ -66,7 +66,7 @@ EffectInstance* misc_particles_main(
bp.update = misc_particles_update;
bp.renderWorld = misc_particles_render;
bp.unk_00 = 0;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_MISC_PARTICLES;
effect = shim_create_effect_instance(&bp);
@ -160,8 +160,8 @@ void misc_particles_update(EffectInstance* effect) {
f32 temp_cos;
s32 i;
if (effect->flags & EFFECT_INSTANCE_FLAG_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAG_10;
if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
particle->timeLeft = 16;
}

View File

@ -41,7 +41,7 @@ EffectInstance* motion_blur_flame_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f
bp.update = motion_blur_flame_update;
bp.renderWorld = motion_blur_flame_render;
bp.unk_00 = 0;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_MOTION_BLUR_FLAME;
effect = shim_create_effect_instance(&bp);
@ -80,8 +80,8 @@ void motion_blur_flame_update(EffectInstance* effect) {
MotionBlurFlameFXData* data = effect->data.motionBlurFlame;
s32 temp;
if (effect->flags & 0x10) {
effect->flags &= ~0x10;
if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
data->unk_50 = 30;
}
data->unk_54++;

View File

@ -37,7 +37,7 @@ EffectInstance* moving_cloud_main(
bp.update = moving_cloud_update;
bp.renderWorld = moving_cloud_render;
bp.unk_00 = 0;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_MOVING_CLOUD;
effect = shim_create_effect_instance(&bp);
@ -120,8 +120,8 @@ void moving_cloud_update(EffectInstance* effect) {
s32 unk_00 = data->unk_00;
s32 unk_1C;
if (effect->flags & 0x10) {
effect->flags &= ~0x10;
if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
data->unk_1C = 16;
}

View File

@ -45,7 +45,7 @@ void music_note_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3) {
bp.init = music_note_init;
bp.update = music_note_update;
bp.renderWorld = music_note_render;
bp.unk_14 = 0;
bp.renderUI = NULL;
bp.effectID = EFFECT_MUSIC_NOTE;
effect = shim_create_effect_instance(bpPtr);

View File

@ -46,7 +46,7 @@ EffectInstance* partner_buff_main(s32 useRandomValues, f32 arg1, f32 arg2, f32 a
bp.init = partner_buff_init;
bp.update = partner_buff_update;
bp.renderWorld = partner_buff_render;
bp.unk_14 = func_E011A3A0;
bp.renderUI = func_E011A3A0;
bp.effectID = EFFECT_PARTNER_BUFF;
effect = shim_create_effect_instance(&bp);
@ -87,8 +87,8 @@ void partner_buff_update(EffectInstance* effect) {
s32 time;
s32 i;
if (effect->flags & EFFECT_INSTANCE_FLAG_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAG_10;
if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
data->timeLeft = 16;
}
if (data->timeLeft < 1000) {

View File

@ -45,7 +45,7 @@ EffectInstance* peach_star_beam_main(s32 type, f32 x, f32 y, f32 z, f32 arg4, s3
bp.init = peach_star_beam_init;
bp.update = peach_star_beam_update;
bp.renderWorld = peach_star_beam_render;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_PEACH_STAR_BEAM;
effect = shim_create_effect_instance(&bp);
@ -106,8 +106,8 @@ void peach_star_beam_update(EffectInstance* effect) {
f32 spiritAngle;
s32 i;
if (effect->flags & 0x10) {
effect->flags &= ~0x10;
if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
data->timeLeft = 16;
}

View File

@ -110,7 +110,7 @@ EffectInstance* pink_sparkles_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 a
bp.update = pink_sparkles_update;
bp.renderWorld = pink_sparkles_render;
bp.unk_00 = 0;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_PINK_SPARKLES;
effect = shim_create_effect_instance(&bp);

View File

@ -89,7 +89,7 @@ EffectInstance* purple_ring_main(
bpPtr->update = purple_ring_update;
bpPtr->renderWorld = purple_ring_render;
bpPtr->unk_00 = 0;
bpPtr->unk_14 = NULL;
bpPtr->renderUI = NULL;
bpPtr->effectID = EFFECT_PURPLE_RING;
effect = shim_create_effect_instance(bpPtr);

View File

@ -12,7 +12,7 @@ EffectInstance* quizmo_answer_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3) {
bp.init = NULL;
bp.update = NULL;
bp.renderWorld = NULL;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_QUIZMO_ANSWER;
effect = shim_create_effect_instance(&bp);

View File

@ -33,7 +33,7 @@ EffectInstance* quizmo_assistant_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f3
bp.update = quizmo_assistant_update;
bp.renderWorld = quizmo_assistant_render;
bp.unk_00 = 0;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_QUIZMO_ASSISTANT;
effect = shim_create_effect_instance(&bp);
@ -63,8 +63,8 @@ void quizmo_assistant_init(EffectInstance* effect) {
void quizmo_assistant_update(EffectInstance* effect) {
QuizmoAssistantFXData* data = effect->data.quizmoAssistant;
if (effect->flags & EFFECT_INSTANCE_FLAG_10) {
effect->flags &= ~EFFECT_INSTANCE_FLAG_10;
if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
data->vanishTimer = 16;
}

View File

@ -86,7 +86,7 @@ EffectInstance* quizmo_audience_main(s32 arg0, f32 posX, f32 posY, f32 posZ) {
effectBp.update = quizmo_audience_update;
effectBp.renderWorld = quizmo_audience_render;
effectBp.unk_00 = 0;
effectBp.unk_14 = 0;
effectBp.renderUI = NULL;
effectBp.effectID = EFFECT_QUIZMO_AUDIENCE;
effect = shim_create_effect_instance(&effectBp);
@ -120,8 +120,8 @@ void quizmo_audience_update(EffectInstance* effect) {
s32 posIdx;
s32 i;
if (effect->flags & 0x10) {
effect->flags &= ~0x10;
if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
data->timeLeft = 30;
}

View File

@ -30,7 +30,7 @@ EffectInstance* quizmo_stage_main(s32 arg0, f32 posX, f32 posY, f32 posZ) {
effectBp.update = quizmo_stage_update;
effectBp.renderWorld = quizmo_stage_render;
effectBp.unk_00 = 0;
effectBp.unk_14 = 0;
effectBp.renderUI = NULL;
effectBp.effectID = EFFECT_QUIZMO_STAGE;
effect = shim_create_effect_instance(&effectBp);
@ -65,8 +65,8 @@ void quizmo_stage_update(EffectInstance *effect) {
QuizmoStageFXData *data = effect->data.quizmoStage;
s32 lifeTime;
if (effect->flags & 16) {
effect->flags &= ~16;
if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
data->vanishTimer = 30;
}

View File

@ -43,7 +43,7 @@ EffectInstance* radial_shimmer_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32
bp.update = radial_shimmer_update;
bp.renderWorld = radial_shimmer_render;
bp.unk_00 = 0;
bp.unk_14 = NULL;
bp.renderUI = NULL;
bp.effectID = EFFECT_RADIAL_SHIMMER;
effect = shim_create_effect_instance(&bp);
@ -215,8 +215,8 @@ void radial_shimmer_update(EffectInstance* effect) {
part->timeLeft--;
part->lifeTime++;
if (effect->flags & 0x10) {
effect->flags &= ~0x10;
if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
part->timeLeft = 16;
}

Some files were not shown because too many files have changed in this diff Show More