mirror of
https://github.com/zeldaret/mm.git
synced 2024-11-23 12:59:44 +00:00
Split effect headers and a bit of cleanup (#1482)
* split * bss * z64eff_ss_dead.h * clean eff_blure * eff_shield_particle cleanup * tire?mark * and more cleanup * format * forgot to remove this * review * EffectBlureDrawMode enum * review * review * bss
This commit is contained in:
parent
55badb7162
commit
2fdcdd91b3
@ -92,131 +92,7 @@ void Item_DropCollectibleRandom(PlayState* play, Actor* fromActor, Vec3f* spawnP
|
|||||||
s32 func_800A8150(s32 index);
|
s32 func_800A8150(s32 index);
|
||||||
s32 func_800A817C(s32 index);
|
s32 func_800A817C(s32 index);
|
||||||
bool Item_CanDropBigFairy(PlayState* play, s32 index, s32 collectibleFlag);
|
bool Item_CanDropBigFairy(PlayState* play, s32 index, s32 collectibleFlag);
|
||||||
void EffectBlure_AddVertex(EffectBlure* this, Vec3f* p1, Vec3f* p2);
|
|
||||||
void EffectBlure_AddSpace(EffectBlure* this);
|
|
||||||
void EffectBlure_Init1(void* thisx, void* initParamsx);
|
|
||||||
void EffectBlure_Init2(void* thisx, void* initParamsx);
|
|
||||||
void EffectBlure_Destroy(void* thisx);
|
|
||||||
s32 EffectBlure_Update(void* thisx);
|
|
||||||
void EffectBlure_Draw(void* thisx, GraphicsContext* gfxCtx);
|
|
||||||
void EffectShieldParticle_Init(void* thisx, void* initParamsx);
|
|
||||||
void EffectShieldParticle_Destroy(void* thisx);
|
|
||||||
s32 EffectShieldParticle_Update(void* thisx);
|
|
||||||
void EffectShieldParticle_Draw(void* thisx, GraphicsContext* gfxCtx);
|
|
||||||
void EffectSpark_Init(void* thisx, void* initParamsx);
|
|
||||||
void EffectSpark_Destroy(void* thisx);
|
|
||||||
s32 EffectSpark_Update(void* thisx);
|
|
||||||
void EffectSpark_Draw(void* thisx, GraphicsContext* gfxCtx);
|
|
||||||
void func_800AE2A0(PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3);
|
|
||||||
void func_800AE434(PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3);
|
|
||||||
void func_800AE5A0(PlayState* play);
|
|
||||||
void func_800AE5E4(PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3);
|
|
||||||
void func_800AE778(PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3);
|
|
||||||
void func_800AE8EC(PlayState* play);
|
|
||||||
void func_800AE930(CollisionContext* colCtx, EffectTireMark* this, Vec3f* pos, f32 arg3, s16 angle, CollisionPoly* colPoly, s32 bgId);
|
|
||||||
void func_800AEF44(EffectTireMark* this);
|
|
||||||
void EffectTireMark_Init(void* thisx, void* initParamsx);
|
|
||||||
void EffectTireMark_Destroy(void* thisx);
|
|
||||||
s32 EffectTireMark_Update(void* thisx);
|
|
||||||
void EffectTireMark_Draw(void* thisx, GraphicsContext* gfxCtx);
|
|
||||||
PlayState* Effect_GetPlayState(void);
|
|
||||||
void* Effect_GetByIndex(s32 index);
|
|
||||||
void Effect_Init(PlayState* play);
|
|
||||||
void Effect_Add(PlayState* play, s32* pIndex, s32 type, u8 arg3, u8 arg4, void* initParams);
|
|
||||||
void Effect_DrawAll(GraphicsContext* gfxCtx);
|
|
||||||
void Effect_UpdateAll(PlayState* play);
|
|
||||||
void Effect_Destroy(PlayState* play, s32 index);
|
|
||||||
void Effect_DestroyAll(PlayState* play);
|
|
||||||
void EffectSS_Init(PlayState* play, s32 numEntries);
|
|
||||||
void EffectSS_Clear(PlayState* play);
|
|
||||||
EffectSs* EffectSS_GetTable(void);
|
|
||||||
void EffectSS_Delete(EffectSs* effectSs);
|
|
||||||
void EffectSS_ResetEntry(EffectSs* particle);
|
|
||||||
s32 EffectSS_FindFreeSpace(s32 priority, s32* tableEntry);
|
|
||||||
void EffectSS_Copy(PlayState* play, EffectSs* effectsSs);
|
|
||||||
void EffectSs_Spawn(PlayState* play, s32 type, s32 priority, void* initData);
|
|
||||||
void EffectSS_UpdateParticle(PlayState* play, s32 index);
|
|
||||||
void EffectSS_UpdateAllParticles(PlayState* play);
|
|
||||||
void EffectSS_DrawParticle(PlayState* play, s32 index);
|
|
||||||
void EffectSS_DrawAllParticles(PlayState* play);
|
|
||||||
s16 func_800B096C(s16 arg0, s16 arg1, s32 arg2);
|
|
||||||
s16 func_800B09D0(s16 arg0, s16 arg1, f32 arg2);
|
|
||||||
u8 func_800B0A24(u8 arg0, u8 arg1, f32 arg2);
|
|
||||||
void EffectSs_DrawGEffect(PlayState* play, EffectSs* this, void* texture);
|
|
||||||
void EffectSsDust_Spawn(PlayState* play, u16 drawFlags, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life, u8 updateMode);
|
|
||||||
void func_800B0DE0(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep);
|
|
||||||
void func_800B0E48(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep);
|
|
||||||
void func_800B0EB0(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life);
|
|
||||||
void func_800B0F18(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life);
|
|
||||||
void func_800B0F80(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life);
|
|
||||||
void func_800B0FE8(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep);
|
|
||||||
void func_800B1054(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep);
|
|
||||||
void func_800B10C0(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
|
|
||||||
void func_800B1130(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
|
|
||||||
void func_800B11A0(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep);
|
|
||||||
void func_800B1210(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep);
|
|
||||||
void func_800B1280(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep, s16 life);
|
|
||||||
void func_800B12F0(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep, s16 life);
|
|
||||||
void func_800B1360(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor);
|
|
||||||
void func_800B139C(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor);
|
|
||||||
void func_800B13D8(Vec3f* srcPos, f32 randScale, Vec3f* newPos, Vec3f* velocity, Vec3f* accel);
|
|
||||||
void func_800B14D4(PlayState* play, f32 randScale, Vec3f* srcPos);
|
|
||||||
void func_800B1598(PlayState* play, f32 randScale, Vec3f* srcPos);
|
|
||||||
void EffectSsKirakira_SpawnSmallYellow(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
|
|
||||||
void EffectSsKirakira_SpawnSmall(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor);
|
|
||||||
void EffectSsGSpk_SpawnSmall(PlayState* play, Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor);
|
|
||||||
void EffectSsKirakira_SpawnDispersed(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s32 life);
|
|
||||||
// void EffectSsKirakira_SpawnFocused(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE2 param_7, UNK_TYPE4 param_8);
|
|
||||||
// void EffectSsBomb2_SpawnFade(UNK_TYPE4 uParm1, Vec3f* pzParm2, Vec3f* pzParm3, Vec3f* pzParm4);
|
|
||||||
void EffectSsBomb2_SpawnLayered(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep);
|
|
||||||
// void EffectSsBlast_Spawn(UNK_TYPE4 uParm1, Vec3f* pzParm2, Vec3f* pzParm3, Vec3f* pzParm4, Color_RGBA8* param_5, Color_RGBA8* param_6, UNK_TYPE2 param_7, UNK_TYPE2 param_8, UNK_TYPE2 param_9, UNK_TYPE2 param_10);
|
|
||||||
void EffectSsBlast_SpawnWhiteCustomScale(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep, s16 life);
|
|
||||||
// void EffectSsBlast_SpawnShockwave(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE2 param_7);
|
|
||||||
void EffectSsBlast_SpawnWhiteShockwave(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
|
|
||||||
// void EffectSsGSpk_SpawnAccel(UNK_TYPE4 uParm1, UNK_TYPE4 uParm2, Vec3f* pzParm3, Vec3f* pzParm4, Vec3f* param_5, Color_RGBA8* param_6, Color_RGBA8* param_7, UNK_TYPE2 param_8, UNK_TYPE2 param_9);
|
|
||||||
// void EffectSsGSpk_SpawnNoAccel(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE2 param_8, UNK_TYPE2 param_9);
|
|
||||||
void EffectSsGSpk_SpawnFuse(PlayState* play, Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
|
|
||||||
// void EffectSsGSpk_SpawnRandColor(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE2 param_6, UNK_TYPE2 param_7);
|
|
||||||
// void EffectSsGSpk_SpawnSmall(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
|
|
||||||
void EffectSsDFire_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep, s16 alpha, s16 alphaStep, s16 fadeDelay, s32 life);
|
|
||||||
void EffectSsBubble_Spawn(PlayState* play, Vec3f* pos, f32 yPosOffset, f32 yPosRandScale, f32 xzPosRandScale, f32 scale);
|
|
||||||
void EffectSsGRipple_Spawn(PlayState* play, Vec3f* pos, s16 radius, s16 radiusMax, s16 life);
|
|
||||||
void EffectSsGSplash_Spawn(PlayState* play, Vec3f* pos, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 type, s16 scale);
|
|
||||||
void EffectSsGFire_Spawn(PlayState* play, Vec3f* pos);
|
|
||||||
// void EffectSsLightning_Spawn(UNK_TYPE4 uParm1, Vec3f* pzParm2, Color_RGBA8* pzParm3, Color_RGBA8* pzParm4, UNK_TYPE2 param_5, UNK_TYPE2 param_6, UNK_TYPE2 param_7, UNK_TYPE2 param_8);
|
|
||||||
void EffectSsDtBubble_SpawnColorProfile(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 life, s16 colorProfile, s16 randXZ);
|
|
||||||
void EffectSsDtBubble_SpawnCustomColor(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 life, s16 randXZ);
|
|
||||||
void EffectSsHahen_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 flags, s16 scale, s16 objectId, s16 life, Gfx* dList);
|
|
||||||
void EffectSsHahen_SpawnBurst(PlayState* play, Vec3f* pos, f32 burstScale, s16 flags, s16 scale, s16 randScaleRange, s16 count, s16 objectId, s16 life, Gfx* dList);
|
|
||||||
// void func_800B2364(void);
|
|
||||||
void EffectSsStick_Spawn(PlayState* play, Vec3f* pos, s16 yaw);
|
|
||||||
// void EffectSsSibuki_Spawn(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5, UNK_TYPE2 param_6, UNK_TYPE2 param_7);
|
|
||||||
void EffectSsSibuki_SpawnBurst(PlayState* play, Vec3f* pos);
|
|
||||||
void EffectSsStone1_Spawn(PlayState* play, Vec3f* pos, s32 reg0);
|
|
||||||
void EffectSsHitmark_SpawnFixedScale(PlayState* play, s32 type, Vec3f* pos);
|
|
||||||
void EffectSsHitmark_SpawnCustomScale(PlayState* play, s32 type, s16 scale, Vec3f* pos);
|
|
||||||
void EffectSsFhgFlash_SpawnShock(PlayState* play, Actor* actor, Vec3f* pos, s16 scale, u8 params);
|
|
||||||
void EffectSsKFire_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scaleMax, u8 type);
|
|
||||||
void EffectSsSolderSrchBall_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16* playerDetected, s16 flags);
|
|
||||||
void EffectSsKakera_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* arg3, s16 gravity, s16 arg5, s16 arg6, s16 arg7, s16 arg8, s16 scale, s16 arg10, s16 arg11, s32 life, s16 colorIdx, s16 objectId, Gfx* dList);
|
|
||||||
// void EffectSsIcePiece_Spawn(UNK_TYPE4 uParm1, Vec3f* pzParm2, UNK_TYPE4 uParm3, Vec3f* pzParm4, Vec3f* param_5, UNK_TYPE4 param_6);
|
|
||||||
void EffectSsIcePiece_SpawnBurst(PlayState* play, Vec3f* refPos, f32 scale);
|
|
||||||
void func_800B2B44(PlayState* play, Actor* actor, Vec3f* pos, f32 scale);
|
|
||||||
// void func_800B2B7C(void);
|
|
||||||
void EffectSsEnIce_Spawn(PlayState* play, Vec3f* pos, f32 scale, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s32 life);
|
|
||||||
// void EffectSsFireTail_Spawn(UNK_TYPE4 uParm1, UNK_TYPE4 uParm2, Vec3f* pzParm3, UNK_TYPE4 uParm4, Vec3f* param_5, UNK_TYPE2 param_6, Color_RGBA8* param_7, Color_RGBA8* param_8, UNK_TYPE2 param_9, UNK_TYPE2 param_10, UNK_TYPE4 param_11);
|
|
||||||
// void EffectSsFireTail_SpawnFlame(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5, UNK_TYPE4 param_6);
|
|
||||||
void EffectSsFireTail_SpawnFlameOnPlayer(PlayState* play, f32 scale, s16 bodyPart, f32 colorIntensity);
|
|
||||||
void EffectSsEnFire_SpawnVec3f(PlayState* play, Actor* actor, Vec3f* pos, s16 scale, s16 params, s16 flags, s16 bodyPart);
|
|
||||||
// void EffectSsEnFire_SpawnVec3s(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5, UNK_TYPE2 param_6, UNK_TYPE2 param_7);
|
|
||||||
void EffectSsExtra_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scoreIndex);
|
|
||||||
void EffectSsDeadDb_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* prim, Color_RGBA8* env, s16 scale, s16 scaleStep, s32 life);
|
|
||||||
void func_800B3030(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep, s32 colorIndex);
|
|
||||||
void EffectSsDeadDd_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* prim, Color_RGBA8* env, s16 scale, s16 scaleStep, s16 alphaStep, s32 life);
|
|
||||||
// void EffectSsDeadDs_Spawn(UNK_TYPE4 uParm1, Vec3f* pzParm2, Vec3f* pzParm3, Vec3f* pzParm4, UNK_TYPE2 param_5, UNK_TYPE2 param_6, UNK_TYPE2 param_7, UNK_TYPE4 param_8);
|
|
||||||
void func_800B31BC(PlayState* play, Vec3f* pos, s16 scale, s16 scaleStep, s16 alpha, s32 life);
|
|
||||||
void EffectSsIceSmoke_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale);
|
|
||||||
void EffectSsIceBlock_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale);
|
|
||||||
void FlagSet_Update(GameState* gameState);
|
void FlagSet_Update(GameState* gameState);
|
||||||
void FlagSet_Draw(GameState* gameState);
|
void FlagSet_Draw(GameState* gameState);
|
||||||
void Overlay_LoadGameState(GameStateOverlay* overlayEntry);
|
void Overlay_LoadGameState(GameStateOverlay* overlayEntry);
|
||||||
|
@ -35,45 +35,6 @@ extern u8 sDropTable[DROP_TABLE_SIZE * DROP_TABLE_NUMBER];
|
|||||||
extern u8 sDropTableAmounts[DROP_TABLE_SIZE * DROP_TABLE_NUMBER];
|
extern u8 sDropTableAmounts[DROP_TABLE_SIZE * DROP_TABLE_NUMBER];
|
||||||
extern s32 D_801AE194[32];
|
extern s32 D_801AE194[32];
|
||||||
extern u8 D_801AE214[32];
|
extern u8 D_801AE214[32];
|
||||||
// extern UNK_TYPE4 D_801AE240;
|
|
||||||
// extern UNK_TYPE4 D_801AE250;
|
|
||||||
extern UNK_PTR D_801AE260[3];
|
|
||||||
// extern UNK_TYPE4 D_801AE27C;
|
|
||||||
// extern UNK_TYPE4 D_801AE28C;
|
|
||||||
// extern UNK_TYPE4 D_801AE29C;
|
|
||||||
// extern UNK_TYPE4 D_801AE2AC;
|
|
||||||
// extern UNK_TYPE4 D_801AE2BC;
|
|
||||||
// extern UNK_TYPE4 D_801AE2CC;
|
|
||||||
// extern UNK_TYPE4 D_801AE2DC;
|
|
||||||
// extern EffectSsInfo sEffectSsInfo;
|
|
||||||
// extern UNK_TYPE1 D_801AE3B0;
|
|
||||||
// extern UNK_TYPE1 D_801AE3B4;
|
|
||||||
// extern UNK_TYPE4 D_801AE3B8;
|
|
||||||
// extern UNK_TYPE4 D_801AE3BC;
|
|
||||||
// extern UNK_TYPE1 D_801AE3C0;
|
|
||||||
// extern UNK_TYPE1 D_801AE3C4;
|
|
||||||
// extern UNK_TYPE1 D_801AE3C8;
|
|
||||||
// extern UNK_TYPE1 D_801AE3CC;
|
|
||||||
// extern UNK_TYPE4 D_801AE3D0;
|
|
||||||
// extern UNK_TYPE4 D_801AE3D4;
|
|
||||||
// extern UNK_TYPE4 D_801AE3D8;
|
|
||||||
// extern UNK_TYPE4 D_801AE3DC;
|
|
||||||
// extern UNK_TYPE4 D_801AE3E0;
|
|
||||||
// extern UNK_TYPE4 D_801AE3EC;
|
|
||||||
// extern UNK_TYPE1 D_801AE3F8;
|
|
||||||
// extern UNK_TYPE4 D_801AE3FC;
|
|
||||||
// extern UNK_TYPE4 D_801AE404;
|
|
||||||
// extern UNK_TYPE1 D_801AE47C;
|
|
||||||
// extern UNK_TYPE1 D_801AE480;
|
|
||||||
// extern UNK_TYPE1 D_801AE484;
|
|
||||||
// extern UNK_TYPE1 D_801AE485;
|
|
||||||
// extern UNK_TYPE1 D_801AE486;
|
|
||||||
// extern UNK_TYPE1 D_801AE488;
|
|
||||||
// extern UNK_TYPE1 D_801AE489;
|
|
||||||
// extern UNK_TYPE1 D_801AE48A;
|
|
||||||
// extern UNK_TYPE1 D_801AE48C;
|
|
||||||
// extern UNK_TYPE1 D_801AE490;
|
|
||||||
extern EffectSsOverlay gParticleOverlayTable[39];
|
|
||||||
|
|
||||||
// extern s32 sEntryIndex;
|
// extern s32 sEntryIndex;
|
||||||
// extern u32 sCurrentBit;
|
// extern u32 sCurrentBit;
|
||||||
@ -1474,46 +1435,6 @@ extern u8 gSampleBankTable[];
|
|||||||
// bss
|
// bss
|
||||||
// extern UNK_TYPE1 D_801ED894;
|
// extern UNK_TYPE1 D_801ED894;
|
||||||
|
|
||||||
extern Vec3f D_801EDE00;
|
|
||||||
extern Vec3f D_801EDE10;
|
|
||||||
extern Vec3f D_801EDE20;
|
|
||||||
extern Vec3f D_801EDE30;
|
|
||||||
extern TriNorm D_801EDE40;
|
|
||||||
extern TriNorm D_801EDE78;
|
|
||||||
extern LineSegment D_801EDEB0;
|
|
||||||
extern TriNorm D_801EDEC8;
|
|
||||||
extern TriNorm D_801EDF00;
|
|
||||||
extern Vec3f D_801EDF38;
|
|
||||||
extern Vec3f D_801EDF48;
|
|
||||||
extern TriNorm D_801EDF58;
|
|
||||||
extern TriNorm D_801EDF90;
|
|
||||||
extern LineSegment D_801EDFC8;
|
|
||||||
extern Vec3f D_801EDFE0;
|
|
||||||
extern Vec3f D_801EDFF0;
|
|
||||||
extern TriNorm D_801EE000;
|
|
||||||
extern TriNorm D_801EE038;
|
|
||||||
extern TriNorm D_801EE070[2];
|
|
||||||
extern Vec3f D_801EE0D8;
|
|
||||||
extern TriNorm D_801EE0E8[2];
|
|
||||||
extern TriNorm D_801EE150;
|
|
||||||
extern TriNorm D_801EE188;
|
|
||||||
extern Vec3f D_801EE1C0;
|
|
||||||
extern Vec3f D_801EE1D0;
|
|
||||||
extern Vec3f D_801EE1E0;
|
|
||||||
extern Vec3f D_801EE1F0;
|
|
||||||
// extern UNK_TYPE1 D_801EE1F4;
|
|
||||||
// extern UNK_TYPE1 D_801EE1F8;
|
|
||||||
extern EffectSparkInit D_801EE200;
|
|
||||||
extern TriNorm D_801EE6C8;
|
|
||||||
extern TriNorm D_801EE700;
|
|
||||||
extern EffectSparkInit D_801EE738;
|
|
||||||
extern EffectSparkInit D_801EEC00;
|
|
||||||
extern EffectSparkInit D_801EF0C8;
|
|
||||||
extern TriNorm D_801EF590;
|
|
||||||
extern TriNorm D_801EF5C8;
|
|
||||||
extern TriNorm D_801EF600;
|
|
||||||
extern TriNorm D_801EF638;
|
|
||||||
|
|
||||||
// extern UNK_TYPE1 D_801F4E20;
|
// extern UNK_TYPE1 D_801F4E20;
|
||||||
// extern UNK_TYPE1 sBeatingHeartsDDPrim;
|
// extern UNK_TYPE1 sBeatingHeartsDDPrim;
|
||||||
// extern UNK_TYPE1 sBeatingHeartsDDEnv;
|
// extern UNK_TYPE1 sBeatingHeartsDDEnv;
|
||||||
|
@ -335,7 +335,7 @@ typedef struct {
|
|||||||
/* 0x1414 */ s32 vtxListMax;
|
/* 0x1414 */ s32 vtxListMax;
|
||||||
} DynaCollisionContext; // size = 0x1418
|
} DynaCollisionContext; // size = 0x1418
|
||||||
|
|
||||||
typedef struct {
|
typedef struct CollisionContext {
|
||||||
/* 0x0000 */ CollisionHeader* colHeader; // scene's static collision
|
/* 0x0000 */ CollisionHeader* colHeader; // scene's static collision
|
||||||
/* 0x0004 */ Vec3f minBounds; // minimum coordinates of collision bounding box
|
/* 0x0004 */ Vec3f minBounds; // minimum coordinates of collision bounding box
|
||||||
/* 0x0010 */ Vec3f maxBounds; // maximum coordinates of collision bounding box
|
/* 0x0010 */ Vec3f maxBounds; // maximum coordinates of collision bounding box
|
||||||
|
93
include/z64eff_blure.h
Normal file
93
include/z64eff_blure.h
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
#ifndef Z64EFF_BLURE_H
|
||||||
|
#define Z64EFF_BLURE_H
|
||||||
|
|
||||||
|
#include "ultra64.h"
|
||||||
|
|
||||||
|
#include "color.h"
|
||||||
|
#include "z64math.h"
|
||||||
|
|
||||||
|
struct GraphicsContext;
|
||||||
|
|
||||||
|
#define EFFECT_BLURE_COLOR_COUNT 4
|
||||||
|
|
||||||
|
#define EFFECT_BLURE_FLAG_2 (1 << 1)
|
||||||
|
#define EFFECT_BLURE_FLAG_4 (1 << 2)
|
||||||
|
#define EFFECT_BLURE_FLAG_10 (1 << 4)
|
||||||
|
|
||||||
|
#define EFFECT_BLURE_ELEMENT_FLAG_1 (1 << 0)
|
||||||
|
#define EFFECT_BLURE_ELEMENT_FLAG_2 (1 << 1)
|
||||||
|
#define EFFECT_BLURE_ELEMENT_FLAG_4 (1 << 2)
|
||||||
|
#define EFFECT_BLURE_ELEMENT_FLAG_8 (1 << 3)
|
||||||
|
#define EFFECT_BLURE_ELEMENT_FLAG_10 (1 << 4)
|
||||||
|
#define EFFECT_BLURE_ELEMENT_FLAG_20 (1 << 5)
|
||||||
|
|
||||||
|
typedef struct EffectBlureElement {
|
||||||
|
/* 0x00 */ s32 state;
|
||||||
|
/* 0x04 */ s32 timer;
|
||||||
|
/* 0x08 */ Vec3s p1;
|
||||||
|
/* 0x0E */ Vec3s p2;
|
||||||
|
/* 0x14 */ u16 flags;
|
||||||
|
} EffectBlureElement; // size = 0x18
|
||||||
|
|
||||||
|
typedef struct EffectBlureInit1 {
|
||||||
|
/* 0x000 */ char unk_00[0x184];
|
||||||
|
/* 0x184 */ u8 p1StartColor[EFFECT_BLURE_COLOR_COUNT];
|
||||||
|
/* 0x188 */ u8 p2StartColor[EFFECT_BLURE_COLOR_COUNT];
|
||||||
|
/* 0x18C */ u8 p1EndColor[EFFECT_BLURE_COLOR_COUNT];
|
||||||
|
/* 0x190 */ u8 p2EndColor[EFFECT_BLURE_COLOR_COUNT];
|
||||||
|
/* 0x194 */ s32 elemDuration;
|
||||||
|
/* 0x198 */ s32 unkFlag;
|
||||||
|
/* 0x19C */ s32 calcMode;
|
||||||
|
} EffectBlureInit1; // size = 0x1A0
|
||||||
|
|
||||||
|
typedef enum EffectBlureDrawMode {
|
||||||
|
/* 0 */ EFF_BLURE_DRAW_MODE_SIMPLE,
|
||||||
|
/* 1 */ EFF_BLURE_DRAW_MODE_SIMPLE_ALT_COLORS,
|
||||||
|
/* 2 */ EFF_BLURE_DRAW_MODE_SMOOTH,
|
||||||
|
/* 3 */ EFF_BLURE_DRAW_MODE_MAX
|
||||||
|
} EffectBlureDrawMode;
|
||||||
|
|
||||||
|
typedef struct EffectBlureInit2 {
|
||||||
|
/* 0x00 */ s32 calcMode;
|
||||||
|
/* 0x04 */ u16 flags;
|
||||||
|
/* 0x06 */ s16 addAngleChange;
|
||||||
|
/* 0x08 */ u8 p1StartColor[EFFECT_BLURE_COLOR_COUNT];
|
||||||
|
/* 0x0C */ u8 p2StartColor[EFFECT_BLURE_COLOR_COUNT];
|
||||||
|
/* 0x10 */ u8 p1EndColor[EFFECT_BLURE_COLOR_COUNT];
|
||||||
|
/* 0x14 */ u8 p2EndColor[EFFECT_BLURE_COLOR_COUNT];
|
||||||
|
/* 0x18 */ u8 elemDuration;
|
||||||
|
/* 0x19 */ u8 unkFlag;
|
||||||
|
/* 0x1A */ u8 drawMode; // EffectBlureDrawMode enum
|
||||||
|
/* 0x1B */ u8 mode4Param;
|
||||||
|
/* 0x1C */ Color_RGBA8 altPrimColor; // used with EFF_BLURE_DRAW_MODE_SIMPLE_ALT_COLORS
|
||||||
|
/* 0x20 */ Color_RGBA8 altEnvColor; // used with EFF_BLURE_DRAW_MODE_SIMPLE_ALT_COLORS
|
||||||
|
} EffectBlureInit2; // size = 0x24
|
||||||
|
|
||||||
|
typedef struct EffectBlure {
|
||||||
|
/* 0x000 */ EffectBlureElement elements[16];
|
||||||
|
/* 0x180 */ s32 calcMode;
|
||||||
|
/* 0x184 */ f32 mode4Param;
|
||||||
|
/* 0x188 */ u16 flags;
|
||||||
|
/* 0x18A */ s16 addAngleChange;
|
||||||
|
/* 0x18C */ s16 addAngle;
|
||||||
|
/* 0x18E */ u8 p1StartColor[EFFECT_BLURE_COLOR_COUNT];
|
||||||
|
/* 0x192 */ u8 p2StartColor[EFFECT_BLURE_COLOR_COUNT];
|
||||||
|
/* 0x196 */ u8 p1EndColor[EFFECT_BLURE_COLOR_COUNT];
|
||||||
|
/* 0x19A */ u8 p2EndColor[EFFECT_BLURE_COLOR_COUNT];
|
||||||
|
/* 0x19E */ u8 numElements; // "now_edge_num"
|
||||||
|
/* 0x19F */ u8 elemDuration;
|
||||||
|
/* 0x1A0 */ u8 unkFlag;
|
||||||
|
/* 0x1A1 */ u8 drawMode; // EffectBlureDrawMode enum
|
||||||
|
/* 0x1A2 */ Color_RGBA8 altPrimColor; // used with EFF_BLURE_DRAW_MODE_SIMPLE_ALT_COLORS
|
||||||
|
/* 0x1A6 */ Color_RGBA8 altEnvColor; // used with EFF_BLURE_DRAW_MODE_SIMPLE_ALT_COLORS
|
||||||
|
} EffectBlure; // size = 0x1AC
|
||||||
|
|
||||||
|
void EffectBlure_AddVertex(EffectBlure* this, Vec3f* p1, Vec3f* p2);
|
||||||
|
void EffectBlure_AddSpace(EffectBlure* this);
|
||||||
|
void EffectBlure_Init1(void* thisx, void* initParamsx);
|
||||||
|
void EffectBlure_Init2(void* thisx, void* initParamsx);
|
||||||
|
void EffectBlure_Destroy(void* thisx);
|
||||||
|
s32 EffectBlure_Update(void* thisx);
|
||||||
|
void EffectBlure_Draw(void* thisx, struct GraphicsContext* gfxCtx);
|
||||||
|
|
||||||
|
#endif
|
65
include/z64eff_shield_particle.h
Normal file
65
include/z64eff_shield_particle.h
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
#ifndef Z64EFF_SHIELD_PARTICLE_H
|
||||||
|
#define Z64EFF_SHIELD_PARTICLE_H
|
||||||
|
|
||||||
|
#include "ultra64.h"
|
||||||
|
|
||||||
|
#include "color.h"
|
||||||
|
#include "z64light.h"
|
||||||
|
#include "z64math.h"
|
||||||
|
|
||||||
|
struct GraphicsContext;
|
||||||
|
|
||||||
|
typedef struct EffectShieldParticleElement {
|
||||||
|
/* 0x00 */ f32 initialSpeed;
|
||||||
|
/* 0x04 */ f32 endXChange;
|
||||||
|
/* 0x08 */ f32 endX;
|
||||||
|
/* 0x0C */ f32 startXChange;
|
||||||
|
/* 0x10 */ f32 startX;
|
||||||
|
/* 0x14 */ s16 yaw;
|
||||||
|
/* 0x16 */ s16 pitch;
|
||||||
|
} EffectShieldParticleElement; // size = 0x18
|
||||||
|
|
||||||
|
typedef struct EffectShieldParticleInit {
|
||||||
|
/* 0x00 */ u8 numElements;
|
||||||
|
/* 0x02 */ Vec3s position;
|
||||||
|
/* 0x08 */ Color_RGBA8 primColorStart;
|
||||||
|
/* 0x0C */ Color_RGBA8 envColorStart;
|
||||||
|
/* 0x10 */ Color_RGBA8 primColorMid;
|
||||||
|
/* 0x14 */ Color_RGBA8 envColorMid;
|
||||||
|
/* 0x18 */ Color_RGBA8 primColorEnd;
|
||||||
|
/* 0x1C */ Color_RGBA8 envColorEnd;
|
||||||
|
/* 0x20 */ f32 deceleration;
|
||||||
|
/* 0x24 */ f32 maxInitialSpeed;
|
||||||
|
/* 0x28 */ f32 lengthCutoff;
|
||||||
|
/* 0x2C */ u8 duration;
|
||||||
|
/* 0x2E */ LightPoint lightPoint;
|
||||||
|
/* 0x3C */ s32 lightDecay; // halves light radius every frame when set to 1
|
||||||
|
} EffectShieldParticleInit; // size = 0x40
|
||||||
|
|
||||||
|
typedef struct EffectShieldParticle {
|
||||||
|
/* 0x000 */ EffectShieldParticleElement elements[16];
|
||||||
|
/* 0x180 */ u8 numElements;
|
||||||
|
/* 0x182 */ Vec3s position;
|
||||||
|
/* 0x188 */ Color_RGBA8 primColorStart;
|
||||||
|
/* 0x18C */ Color_RGBA8 envColorStart;
|
||||||
|
/* 0x190 */ Color_RGBA8 primColorMid;
|
||||||
|
/* 0x194 */ Color_RGBA8 envColorMid;
|
||||||
|
/* 0x198 */ Color_RGBA8 primColorEnd;
|
||||||
|
/* 0x19C */ Color_RGBA8 envColorEnd;
|
||||||
|
/* 0x1A0 */ f32 deceleration;
|
||||||
|
/* 0x1A4 */ char unk_1A4[0x04];
|
||||||
|
/* 0x1A8 */ f32 maxInitialSpeed;
|
||||||
|
/* 0x1AC */ f32 lengthCutoff;
|
||||||
|
/* 0x1B0 */ u8 duration;
|
||||||
|
/* 0x1B1 */ u8 timer;
|
||||||
|
/* 0x1B2 */ LightInfo lightInfo;
|
||||||
|
/* 0x1C0 */ LightNode* lightNode;
|
||||||
|
/* 0x1C4 */ s32 lightDecay; // halves light radius every frame when set to 1
|
||||||
|
} EffectShieldParticle; // size = 0x1C8
|
||||||
|
|
||||||
|
void EffectShieldParticle_Init(void* thisx, void* initParamsx);
|
||||||
|
void EffectShieldParticle_Destroy(void* thisx);
|
||||||
|
s32 EffectShieldParticle_Update(void* thisx);
|
||||||
|
void EffectShieldParticle_Draw(void* thisx, struct GraphicsContext* gfxCtx);
|
||||||
|
|
||||||
|
#endif
|
51
include/z64eff_spark.h
Normal file
51
include/z64eff_spark.h
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
#ifndef Z64EFF_SPARK_H
|
||||||
|
#define Z64EFF_SPARK_H
|
||||||
|
|
||||||
|
#include "ultra64.h"
|
||||||
|
|
||||||
|
#include "color.h"
|
||||||
|
#include "z64math.h"
|
||||||
|
|
||||||
|
struct GraphicsContext;
|
||||||
|
|
||||||
|
typedef struct EffectSparkElement {
|
||||||
|
/* 0x00 */ Vec3f velocity;
|
||||||
|
/* 0x0C */ Vec3f position;
|
||||||
|
/* 0x18 */ Vec3s unkVelocity;
|
||||||
|
/* 0x1E */ Vec3s unkPosition;
|
||||||
|
} EffectSparkElement; // size = 0x24
|
||||||
|
|
||||||
|
typedef struct EffectSparkInit {
|
||||||
|
/* 0x000 */ Vec3s position;
|
||||||
|
/* 0x008 */ s32 numElements; // "table_size"; calculated as uDiv * vDiv + 2
|
||||||
|
/* 0x00C */ EffectSparkElement elements[32];
|
||||||
|
/* 0x48C */ f32 speed;
|
||||||
|
/* 0x490 */ f32 gravity;
|
||||||
|
/* 0x494 */ u32 uDiv; // "u_div"
|
||||||
|
/* 0x498 */ u32 vDiv; // "v_div"
|
||||||
|
/* 0x49C */ Color_RGBA8 colorStart[4];
|
||||||
|
/* 0x4AC */ Color_RGBA8 colorEnd[4];
|
||||||
|
/* 0x4BC */ s32 timer;
|
||||||
|
/* 0x4C0 */ s32 duration;
|
||||||
|
} EffectSparkInit; // size = 0x4C4
|
||||||
|
|
||||||
|
typedef struct EffectSpark {
|
||||||
|
/* 0x000 */ Vec3s position;
|
||||||
|
/* 0x008 */ s32 numElements; // "table_size"; calculated as uDiv * vDiv + 2
|
||||||
|
/* 0x00C */ EffectSparkElement elements[32];
|
||||||
|
/* 0x48C */ f32 speed;
|
||||||
|
/* 0x490 */ f32 gravity;
|
||||||
|
/* 0x494 */ u32 uDiv; // "u_div"
|
||||||
|
/* 0x498 */ u32 vDiv; // "v_div"
|
||||||
|
/* 0x49C */ Color_RGBA8 colorStart[4];
|
||||||
|
/* 0x4AC */ Color_RGBA8 colorEnd[4];
|
||||||
|
/* 0x4BC */ s32 timer;
|
||||||
|
/* 0x4C0 */ s32 duration;
|
||||||
|
} EffectSpark; // size = 0x4C4
|
||||||
|
|
||||||
|
void EffectSpark_Init(void* thisx, void* initParamsx);
|
||||||
|
void EffectSpark_Destroy(void* thisx);
|
||||||
|
s32 EffectSpark_Update(void* thisx);
|
||||||
|
void EffectSpark_Draw(void* thisx, struct GraphicsContext* gfxCtx);
|
||||||
|
|
||||||
|
#endif
|
17
include/z64eff_ss_dead.h
Normal file
17
include/z64eff_ss_dead.h
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#ifndef Z64EFF_SS_DEAD_H
|
||||||
|
#define Z64EFF_SS_DEAD_H
|
||||||
|
|
||||||
|
#include "ultra64.h"
|
||||||
|
|
||||||
|
#include "color.h"
|
||||||
|
|
||||||
|
struct PlayState;
|
||||||
|
|
||||||
|
void func_800AE2A0(struct PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3);
|
||||||
|
void func_800AE434(struct PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3);
|
||||||
|
void func_800AE5A0(struct PlayState* play);
|
||||||
|
void func_800AE5E4(struct PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3);
|
||||||
|
void func_800AE778(struct PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3);
|
||||||
|
void func_800AE8EC(struct PlayState* play);
|
||||||
|
|
||||||
|
#endif
|
47
include/z64eff_tire_mark.h
Normal file
47
include/z64eff_tire_mark.h
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
#ifndef Z64EFF_TIRE_MARK_H
|
||||||
|
#define Z64EFF_TIRE_MARK_H
|
||||||
|
|
||||||
|
#include "ultra64.h"
|
||||||
|
|
||||||
|
#include "color.h"
|
||||||
|
#include "z64math.h"
|
||||||
|
#include "unk.h"
|
||||||
|
|
||||||
|
struct CollisionContext;
|
||||||
|
struct CollisionPoly;
|
||||||
|
struct GraphicsContext;
|
||||||
|
|
||||||
|
#define EFFECT_TIRE_MARK_ELEMENT_FLAG_1 (1 << 0)
|
||||||
|
#define EFFECT_TIRE_MARK_ELEMENT_FLAG_2 (1 << 1)
|
||||||
|
|
||||||
|
typedef struct EffectTireMarkElement {
|
||||||
|
/* 0x00 */ u16 flags;
|
||||||
|
/* 0x02 */ Vec3s p1;
|
||||||
|
/* 0x08 */ Vec3s p2;
|
||||||
|
/* 0x0E */ s16 life;
|
||||||
|
/* 0x10 */ UNK_TYPE1 pad10[0x4];
|
||||||
|
/* 0x14 */ struct CollisionPoly* colPoly;
|
||||||
|
} EffectTireMarkElement; // size = 0x18
|
||||||
|
|
||||||
|
typedef struct EffectTireMarkInit {
|
||||||
|
/* 0x0 */ s16 unk0;
|
||||||
|
/* 0x2 */ s16 elemDuration;
|
||||||
|
/* 0x4 */ Color_RGBA8 color;
|
||||||
|
} EffectTireMarkInit; // size = 0x8
|
||||||
|
|
||||||
|
typedef struct EffectTireMark {
|
||||||
|
/* 0x000 */ EffectTireMarkElement elements[64];
|
||||||
|
/* 0x600 */ s16 unk600;
|
||||||
|
/* 0x602 */ s16 numElements;
|
||||||
|
/* 0x604 */ s16 elemDuration;
|
||||||
|
/* 0x606 */ Color_RGBA8 color;
|
||||||
|
} EffectTireMark; // size = 0x60C
|
||||||
|
|
||||||
|
void func_800AE930(struct CollisionContext* colCtx, EffectTireMark* this, Vec3f* pos, f32 arg3, s16 angle, struct CollisionPoly* colPoly, s32 bgId);
|
||||||
|
void func_800AEF44(EffectTireMark* this);
|
||||||
|
void EffectTireMark_Init(void* thisx, void* initParamsx);
|
||||||
|
void EffectTireMark_Destroy(void* thisx);
|
||||||
|
s32 EffectTireMark_Update(void* thisx);
|
||||||
|
void EffectTireMark_Draw(void* thisx, struct GraphicsContext* gfxCtx);
|
||||||
|
|
||||||
|
#endif
|
@ -8,289 +8,33 @@
|
|||||||
#include "z64math.h"
|
#include "z64math.h"
|
||||||
#include "unk.h"
|
#include "unk.h"
|
||||||
|
|
||||||
|
#include "z64eff_blure.h"
|
||||||
|
#include "z64eff_tire_mark.h"
|
||||||
|
#include "z64eff_spark.h"
|
||||||
|
#include "z64eff_shield_particle.h"
|
||||||
|
#include "z64effect_ss.h"
|
||||||
|
|
||||||
struct GraphicsContext;
|
struct GraphicsContext;
|
||||||
struct PlayState;
|
struct PlayState;
|
||||||
struct Actor;
|
|
||||||
struct CollisionPoly;
|
|
||||||
|
|
||||||
#define SPARK_COUNT 3
|
typedef enum EffectType {
|
||||||
#define BLURE_COUNT 25
|
|
||||||
#define SHIELD_PARTICLE_COUNT 3
|
|
||||||
#define TIRE_MARK_COUNT 15
|
|
||||||
|
|
||||||
#define TOTAL_EFFECT_COUNT SPARK_COUNT + BLURE_COUNT + SHIELD_PARTICLE_COUNT + TIRE_MARK_COUNT
|
|
||||||
|
|
||||||
/* G Effect Regs */
|
|
||||||
|
|
||||||
#define rgTexIndex regs[0]
|
|
||||||
#define rgScale regs[1]
|
|
||||||
#define rgTexIndexStep regs[2]
|
|
||||||
#define rgPrimColorR regs[3]
|
|
||||||
#define rgPrimColorG regs[4]
|
|
||||||
#define rgPrimColorB regs[5]
|
|
||||||
#define rgPrimColorA regs[6]
|
|
||||||
#define rgEnvColorR regs[7]
|
|
||||||
#define rgEnvColorG regs[8]
|
|
||||||
#define rgEnvColorB regs[9]
|
|
||||||
#define rgEnvColorA regs[10]
|
|
||||||
#define rgObjectSlot regs[11]
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
/* 0x0 */ u8 active;
|
|
||||||
/* 0x1 */ u8 unk1;
|
|
||||||
/* 0x2 */ u8 unk2;
|
|
||||||
} EffectStatus; // size = 0x3
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
/* 0x00 */ Vec3f velocity;
|
|
||||||
/* 0x0C */ Vec3f position;
|
|
||||||
/* 0x18 */ Vec3s unkVelocity;
|
|
||||||
/* 0x1E */ Vec3s unkPosition;
|
|
||||||
} EffectSparkElement; // size = 0x24
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
/* 0x000 */ Vec3s position;
|
|
||||||
/* 0x008 */ s32 numElements; // "table_size"; calculated as uDiv * vDiv + 2
|
|
||||||
/* 0x00C */ EffectSparkElement elements[32];
|
|
||||||
/* 0x48C */ f32 speed;
|
|
||||||
/* 0x490 */ f32 gravity;
|
|
||||||
/* 0x494 */ u32 uDiv; // "u_div"
|
|
||||||
/* 0x498 */ u32 vDiv; // "v_div"
|
|
||||||
/* 0x49C */ Color_RGBA8 colorStart[4];
|
|
||||||
/* 0x4AC */ Color_RGBA8 colorEnd[4];
|
|
||||||
/* 0x4BC */ s32 timer;
|
|
||||||
/* 0x4C0 */ s32 duration;
|
|
||||||
} EffectSparkInit; // size = 0x4C4
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
/* 0x000 */ Vec3s position;
|
|
||||||
/* 0x008 */ s32 numElements; // "table_size"; calculated as uDiv * vDiv + 2
|
|
||||||
/* 0x00C */ EffectSparkElement elements[32];
|
|
||||||
/* 0x48C */ f32 speed;
|
|
||||||
/* 0x490 */ f32 gravity;
|
|
||||||
/* 0x494 */ u32 uDiv; // "u_div"
|
|
||||||
/* 0x498 */ u32 vDiv; // "v_div"
|
|
||||||
/* 0x49C */ Color_RGBA8 colorStart[4];
|
|
||||||
/* 0x4AC */ Color_RGBA8 colorEnd[4];
|
|
||||||
/* 0x4BC */ s32 timer;
|
|
||||||
/* 0x4C0 */ s32 duration;
|
|
||||||
} EffectSpark; // size = 0x4C4
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
/* 0x00 */ s32 state;
|
|
||||||
/* 0x04 */ s32 timer;
|
|
||||||
/* 0x08 */ Vec3s p1;
|
|
||||||
/* 0x0E */ Vec3s p2;
|
|
||||||
/* 0x14 */ u16 flags;
|
|
||||||
} EffectBlureElement; // size = 0x18
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
/* 0x000 */ char unk_00[0x184];
|
|
||||||
/* 0x184 */ u8 p1StartColor[4];
|
|
||||||
/* 0x188 */ u8 p2StartColor[4];
|
|
||||||
/* 0x18C */ u8 p1EndColor[4];
|
|
||||||
/* 0x190 */ u8 p2EndColor[4];
|
|
||||||
/* 0x194 */ s32 elemDuration;
|
|
||||||
/* 0x198 */ s32 unkFlag;
|
|
||||||
/* 0x19C */ s32 calcMode;
|
|
||||||
} EffectBlureInit1; // size = 0x1A0
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
/* 0x00 */ s32 calcMode;
|
|
||||||
/* 0x04 */ u16 flags;
|
|
||||||
/* 0x06 */ s16 addAngleChange;
|
|
||||||
/* 0x08 */ u8 p1StartColor[4];
|
|
||||||
/* 0x0C */ u8 p2StartColor[4];
|
|
||||||
/* 0x10 */ u8 p1EndColor[4];
|
|
||||||
/* 0x14 */ u8 p2EndColor[4];
|
|
||||||
/* 0x18 */ u8 elemDuration;
|
|
||||||
/* 0x19 */ u8 unkFlag;
|
|
||||||
/* 0x1A */ u8 drawMode; // 0: simple; 1: simple with alt colors; 2+: smooth
|
|
||||||
/* 0x1B */ u8 mode4Param;
|
|
||||||
/* 0x1C */ Color_RGBA8 altPrimColor; // used with drawMode 1
|
|
||||||
/* 0x20 */ Color_RGBA8 altEnvColor; // used with drawMode 1
|
|
||||||
} EffectBlureInit2; // size = 0x24
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
/* 0x000 */ EffectBlureElement elements[16];
|
|
||||||
/* 0x180 */ s32 calcMode;
|
|
||||||
/* 0x184 */ f32 mode4Param;
|
|
||||||
/* 0x188 */ u16 flags;
|
|
||||||
/* 0x18A */ s16 addAngleChange;
|
|
||||||
/* 0x18C */ s16 addAngle;
|
|
||||||
/* 0x18E */ u8 p1StartColor[4];
|
|
||||||
/* 0x192 */ u8 p2StartColor[4];
|
|
||||||
/* 0x196 */ u8 p1EndColor[4];
|
|
||||||
/* 0x19A */ u8 p2EndColor[4];
|
|
||||||
/* 0x19E */ u8 numElements; // "now_edge_num"
|
|
||||||
/* 0x19F */ u8 elemDuration;
|
|
||||||
/* 0x1A0 */ u8 unkFlag;
|
|
||||||
/* 0x1A1 */ u8 drawMode; // 0: simple; 1: simple with alt colors; 2+: smooth
|
|
||||||
/* 0x1A2 */ Color_RGBA8 altPrimColor; // used with drawMode 1
|
|
||||||
/* 0x1A6 */ Color_RGBA8 altEnvColor; // used with drawMode 1
|
|
||||||
} EffectBlure; // size = 0x1AC
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
/* 0x00 */ f32 initialSpeed;
|
|
||||||
/* 0x04 */ f32 endXChange;
|
|
||||||
/* 0x08 */ f32 endX;
|
|
||||||
/* 0x0C */ f32 startXChange;
|
|
||||||
/* 0x10 */ f32 startX;
|
|
||||||
/* 0x14 */ s16 yaw;
|
|
||||||
/* 0x16 */ s16 pitch;
|
|
||||||
} EffectShieldParticleElement; // size = 0x18
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
/* 0x00 */ u8 numElements;
|
|
||||||
/* 0x02 */ Vec3s position;
|
|
||||||
/* 0x08 */ Color_RGBA8 primColorStart;
|
|
||||||
/* 0x0C */ Color_RGBA8 envColorStart;
|
|
||||||
/* 0x10 */ Color_RGBA8 primColorMid;
|
|
||||||
/* 0x14 */ Color_RGBA8 envColorMid;
|
|
||||||
/* 0x18 */ Color_RGBA8 primColorEnd;
|
|
||||||
/* 0x1C */ Color_RGBA8 envColorEnd;
|
|
||||||
/* 0x20 */ f32 deceleration;
|
|
||||||
/* 0x24 */ f32 maxInitialSpeed;
|
|
||||||
/* 0x28 */ f32 lengthCutoff;
|
|
||||||
/* 0x2C */ u8 duration;
|
|
||||||
/* 0x2E */ LightPoint lightPoint;
|
|
||||||
/* 0x3C */ s32 lightDecay; // halves light radius every frame when set to 1
|
|
||||||
} EffectShieldParticleInit; // size = 0x40
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
/* 0x000 */ EffectShieldParticleElement elements[16];
|
|
||||||
/* 0x180 */ u8 numElements;
|
|
||||||
/* 0x182 */ Vec3s position;
|
|
||||||
/* 0x188 */ Color_RGBA8 primColorStart;
|
|
||||||
/* 0x18C */ Color_RGBA8 envColorStart;
|
|
||||||
/* 0x190 */ Color_RGBA8 primColorMid;
|
|
||||||
/* 0x194 */ Color_RGBA8 envColorMid;
|
|
||||||
/* 0x198 */ Color_RGBA8 primColorEnd;
|
|
||||||
/* 0x19C */ Color_RGBA8 envColorEnd;
|
|
||||||
/* 0x1A0 */ f32 deceleration;
|
|
||||||
/* 0x1A4 */ char unk_1A4[0x04];
|
|
||||||
/* 0x1A8 */ f32 maxInitialSpeed;
|
|
||||||
/* 0x1AC */ f32 lengthCutoff;
|
|
||||||
/* 0x1B0 */ u8 duration;
|
|
||||||
/* 0x1B1 */ u8 timer;
|
|
||||||
/* 0x1B2 */ LightInfo lightInfo;
|
|
||||||
/* 0x1C0 */ LightNode* lightNode;
|
|
||||||
/* 0x1C4 */ s32 lightDecay; // halves light radius every frame when set to 1
|
|
||||||
} EffectShieldParticle; // size = 0x1C8
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
/* 0x00 */ u16 flags;
|
|
||||||
/* 0x02 */ Vec3s p1;
|
|
||||||
/* 0x08 */ Vec3s p2;
|
|
||||||
/* 0x0E */ s16 life;
|
|
||||||
/* 0x10 */ UNK_TYPE1 pad10[0x4];
|
|
||||||
/* 0x14 */ struct CollisionPoly* colPoly;
|
|
||||||
} EffectTireMarkElement; // size = 0x18
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
/* 0x0 */ s16 unk0;
|
|
||||||
/* 0x2 */ s16 elemDuration;
|
|
||||||
/* 0x4 */ Color_RGBA8 color;
|
|
||||||
} EffectTireMarkInit; // size = 0x8
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
/* 0x000 */ EffectTireMarkElement elements[64];
|
|
||||||
/* 0x600 */ s16 unk600;
|
|
||||||
/* 0x602 */ s16 numElements;
|
|
||||||
/* 0x604 */ s16 elemDuration;
|
|
||||||
/* 0x606 */ Color_RGBA8 color;
|
|
||||||
} EffectTireMark; // size = 0x60C
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
/* 0x0000 */ struct PlayState* play;
|
|
||||||
struct {
|
|
||||||
EffectStatus status;
|
|
||||||
EffectSpark effect;
|
|
||||||
} /* 0x0004 */ sparks[SPARK_COUNT];
|
|
||||||
struct {
|
|
||||||
EffectStatus status;
|
|
||||||
EffectBlure effect;
|
|
||||||
} /* 0x0E5C */ blures[BLURE_COUNT];
|
|
||||||
struct {
|
|
||||||
EffectStatus status;
|
|
||||||
EffectShieldParticle effect;
|
|
||||||
} /* 0x388C */ shieldParticles[SHIELD_PARTICLE_COUNT];
|
|
||||||
struct {
|
|
||||||
EffectStatus status;
|
|
||||||
EffectTireMark effect;
|
|
||||||
} /* 0x3DF0 */ tireMarks[TIRE_MARK_COUNT];
|
|
||||||
} EffectContext; // size = 0x98E0
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
/* 0x00 */ u32 size;
|
|
||||||
/* 0x04 */ void (*init)(void* effect, void* initParams);
|
|
||||||
/* 0x08 */ void (*destroy)(void* effect);
|
|
||||||
/* 0x0C */ s32 (*update)(void* effect);
|
|
||||||
/* 0x10 */ void (*draw)(void* effect, struct GraphicsContext* gfxCtx);
|
|
||||||
} EffectInfo; // size = 0x14
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
/* 0 */ EFFECT_SPARK,
|
/* 0 */ EFFECT_SPARK,
|
||||||
/* 1 */ EFFECT_BLURE1,
|
/* 1 */ EFFECT_BLURE1,
|
||||||
/* 2 */ EFFECT_BLURE2,
|
/* 2 */ EFFECT_BLURE2,
|
||||||
/* 3 */ EFFECT_SHIELD_PARTICLE,
|
/* 3 */ EFFECT_SHIELD_PARTICLE,
|
||||||
/* 4 */ EFFECT_TIRE_MARK
|
/* 4 */ EFFECT_TIRE_MARK,
|
||||||
|
/* 5 */ EFFECT_MAX
|
||||||
} EffectType;
|
} EffectType;
|
||||||
|
|
||||||
/* Effect Soft Sprites */
|
/* Effect Soft Sprites */
|
||||||
|
|
||||||
struct EffectSs;
|
struct PlayState* Effect_GetPlayState(void);
|
||||||
|
void* Effect_GetByIndex(s32 index);
|
||||||
typedef u32 (*EffectSsInitFunc)(struct PlayState* play, u32 index, struct EffectSs* effectSs, void* initParams);
|
void Effect_Init(struct PlayState* play);
|
||||||
typedef void(*EffectSsUpdateFunc)(struct PlayState* play, u32 index, struct EffectSs* particle);
|
void Effect_Add(struct PlayState* play, s32* pIndex, EffectType type, u8 arg3, u8 arg4, void* initParams);
|
||||||
typedef void(*EffectSsDrawFunc)(struct PlayState* play, u32 index, struct EffectSs* particle);
|
void Effect_DrawAll(struct GraphicsContext* gfxCtx);
|
||||||
|
void Effect_UpdateAll(struct PlayState* play);
|
||||||
typedef struct {
|
void Effect_Destroy(struct PlayState* play, s32 index);
|
||||||
/* 0x0 */ u32 type;
|
void Effect_DestroyAll(struct PlayState* play);
|
||||||
/* 0x4 */ EffectSsInitFunc init;
|
|
||||||
} EffectSsInit; // size = 0x8
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
/* 0x00 */ uintptr_t vromStart;
|
|
||||||
/* 0x04 */ uintptr_t vromEnd;
|
|
||||||
/* 0x08 */ void* vramStart;
|
|
||||||
/* 0x0C */ void* vramEnd;
|
|
||||||
/* 0x10 */ void* loadedRamAddr;
|
|
||||||
/* 0x14 */ EffectSsInit* initInfo;
|
|
||||||
/* 0x18 */ u8 unk18; // Always 1?
|
|
||||||
} EffectSsOverlay; // size = 0x1C
|
|
||||||
|
|
||||||
typedef struct EffectSs {
|
|
||||||
/* 0x00 */ Vec3f pos;
|
|
||||||
/* 0x0C */ Vec3f velocity;
|
|
||||||
/* 0x18 */ Vec3f accel;
|
|
||||||
/* 0x24 */ EffectSsUpdateFunc update;
|
|
||||||
/* 0x28 */ EffectSsDrawFunc draw;
|
|
||||||
/* 0x2C */ Vec3f vec;
|
|
||||||
/* 0x38 */ void* gfx;
|
|
||||||
/* 0x3C */ struct Actor* actor;
|
|
||||||
/* 0x40 */ s16 regs[13]; // These are particle-specific
|
|
||||||
/* 0x5A */ u16 flags; // bit 0: set if this entry is not considered free on a priority tie bit 1: ? bit 2: ?
|
|
||||||
/* 0x5C */ s16 life; // -1 means this entry is free
|
|
||||||
/* 0x5E */ u8 priority; // Lower number mean higher priority
|
|
||||||
/* 0x5F */ u8 type;
|
|
||||||
} EffectSs; // size = 0x60
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
/* 0x0 */ EffectSs* data_table; // Name from debug assert
|
|
||||||
/* 0x4 */ s32 searchIndex;
|
|
||||||
/* 0x8 */ s32 size;
|
|
||||||
} EffectSsInfo; // size = 0xC
|
|
||||||
|
|
||||||
#define DEFINE_EFFECT_SS(_name, enumValue) enumValue,
|
|
||||||
#define DEFINE_EFFECT_SS_UNSET(enumValue) enumValue,
|
|
||||||
|
|
||||||
typedef enum EffectSsType {
|
|
||||||
#include "tables/effect_ss_table.h"
|
|
||||||
/* 0x27 */ EFFECT_SS_MAX
|
|
||||||
} EffectSsType;
|
|
||||||
|
|
||||||
#undef DEFINE_EFFECT_SS
|
|
||||||
#undef DEFINE_EFFECT_SS_UNSET
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
170
include/z64effect_ss.h
Normal file
170
include/z64effect_ss.h
Normal file
@ -0,0 +1,170 @@
|
|||||||
|
#ifndef Z64EFFECT_SS_H
|
||||||
|
#define Z64EFFECT_SS_H
|
||||||
|
|
||||||
|
#include "ultra64.h"
|
||||||
|
|
||||||
|
#include "color.h"
|
||||||
|
#include "z64math.h"
|
||||||
|
|
||||||
|
#include "z64eff_ss_dead.h"
|
||||||
|
|
||||||
|
struct Actor;
|
||||||
|
struct PlayState;
|
||||||
|
struct EffectSs;
|
||||||
|
|
||||||
|
/* G Effect Regs */
|
||||||
|
|
||||||
|
#define rgTexIndex regs[0]
|
||||||
|
#define rgScale regs[1]
|
||||||
|
#define rgTexIndexStep regs[2]
|
||||||
|
#define rgPrimColorR regs[3]
|
||||||
|
#define rgPrimColorG regs[4]
|
||||||
|
#define rgPrimColorB regs[5]
|
||||||
|
#define rgPrimColorA regs[6]
|
||||||
|
#define rgEnvColorR regs[7]
|
||||||
|
#define rgEnvColorG regs[8]
|
||||||
|
#define rgEnvColorB regs[9]
|
||||||
|
#define rgEnvColorA regs[10]
|
||||||
|
#define rgObjectSlot regs[11]
|
||||||
|
|
||||||
|
typedef u32 (*EffectSsInitFunc)(struct PlayState* play, u32 index, struct EffectSs* effectSs, void* initParams);
|
||||||
|
typedef void(*EffectSsUpdateFunc)(struct PlayState* play, u32 index, struct EffectSs* particle);
|
||||||
|
typedef void(*EffectSsDrawFunc)(struct PlayState* play, u32 index, struct EffectSs* particle);
|
||||||
|
|
||||||
|
typedef struct EffectSsInit {
|
||||||
|
/* 0x0 */ u32 type;
|
||||||
|
/* 0x4 */ EffectSsInitFunc init;
|
||||||
|
} EffectSsInit; // size = 0x8
|
||||||
|
|
||||||
|
typedef struct EffectSsOverlay {
|
||||||
|
/* 0x00 */ uintptr_t vromStart;
|
||||||
|
/* 0x04 */ uintptr_t vromEnd;
|
||||||
|
/* 0x08 */ void* vramStart;
|
||||||
|
/* 0x0C */ void* vramEnd;
|
||||||
|
/* 0x10 */ void* loadedRamAddr;
|
||||||
|
/* 0x14 */ EffectSsInit* initInfo;
|
||||||
|
/* 0x18 */ u8 unk18; // Always 1?
|
||||||
|
} EffectSsOverlay; // size = 0x1C
|
||||||
|
|
||||||
|
typedef struct EffectSs {
|
||||||
|
/* 0x00 */ Vec3f pos;
|
||||||
|
/* 0x0C */ Vec3f velocity;
|
||||||
|
/* 0x18 */ Vec3f accel;
|
||||||
|
/* 0x24 */ EffectSsUpdateFunc update;
|
||||||
|
/* 0x28 */ EffectSsDrawFunc draw;
|
||||||
|
/* 0x2C */ Vec3f vec;
|
||||||
|
/* 0x38 */ void* gfx;
|
||||||
|
/* 0x3C */ struct Actor* actor;
|
||||||
|
/* 0x40 */ s16 regs[13]; // These are particle-specific
|
||||||
|
/* 0x5A */ u16 flags; // bit 0: set if this entry is not considered free on a priority tie bit 1: ? bit 2: ?
|
||||||
|
/* 0x5C */ s16 life; // -1 means this entry is free
|
||||||
|
/* 0x5E */ u8 priority; // Lower number mean higher priority
|
||||||
|
/* 0x5F */ u8 type;
|
||||||
|
} EffectSs; // size = 0x60
|
||||||
|
|
||||||
|
typedef struct EffectSsInfo {
|
||||||
|
/* 0x0 */ EffectSs* dataTable; // "data_table" from debug assert
|
||||||
|
/* 0x4 */ s32 searchIndex;
|
||||||
|
/* 0x8 */ s32 size;
|
||||||
|
} EffectSsInfo; // size = 0xC
|
||||||
|
|
||||||
|
#define DEFINE_EFFECT_SS(_name, enumValue) enumValue,
|
||||||
|
#define DEFINE_EFFECT_SS_UNSET(enumValue) enumValue,
|
||||||
|
|
||||||
|
typedef enum EffectSsType {
|
||||||
|
#include "tables/effect_ss_table.h"
|
||||||
|
/* 0x27 */ EFFECT_SS_MAX
|
||||||
|
} EffectSsType;
|
||||||
|
|
||||||
|
#undef DEFINE_EFFECT_SS
|
||||||
|
#undef DEFINE_EFFECT_SS_UNSET
|
||||||
|
|
||||||
|
void EffectSS_Init(struct PlayState* play, s32 numEntries);
|
||||||
|
void EffectSS_Clear(struct PlayState* play);
|
||||||
|
EffectSs* EffectSS_GetTable(void);
|
||||||
|
void EffectSS_Delete(EffectSs* effectSs);
|
||||||
|
void EffectSS_Copy(struct PlayState* play, EffectSs* effectsSs);
|
||||||
|
void EffectSs_Spawn(struct PlayState* play, s32 type, s32 priority, void* initData);
|
||||||
|
void EffectSS_UpdateAllParticles(struct PlayState* play);
|
||||||
|
void EffectSS_DrawAllParticles(struct PlayState* play);
|
||||||
|
s16 func_800B096C(s16 arg0, s16 arg1, s32 arg2);
|
||||||
|
s16 func_800B09D0(s16 arg0, s16 arg1, f32 arg2);
|
||||||
|
u8 func_800B0A24(u8 arg0, u8 arg1, f32 arg2);
|
||||||
|
void EffectSs_DrawGEffect(struct PlayState* play, EffectSs* this, void* texture);
|
||||||
|
void EffectSsDust_Spawn(struct PlayState* play, u16 drawFlags, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life, u8 updateMode);
|
||||||
|
void func_800B0DE0(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep);
|
||||||
|
void func_800B0E48(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep);
|
||||||
|
void func_800B0EB0(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life);
|
||||||
|
void func_800B0F18(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life);
|
||||||
|
void func_800B0F80(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life);
|
||||||
|
void func_800B0FE8(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep);
|
||||||
|
void func_800B1054(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep);
|
||||||
|
void func_800B10C0(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
|
||||||
|
void func_800B1130(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
|
||||||
|
void func_800B11A0(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep);
|
||||||
|
void func_800B1210(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep);
|
||||||
|
void func_800B1280(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep, s16 life);
|
||||||
|
void func_800B12F0(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep, s16 life);
|
||||||
|
void func_800B1360(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor);
|
||||||
|
void func_800B139C(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor);
|
||||||
|
void func_800B14D4(struct PlayState* play, f32 randScale, Vec3f* srcPos);
|
||||||
|
void func_800B1598(struct PlayState* play, f32 randScale, Vec3f* srcPos);
|
||||||
|
void EffectSsKirakira_SpawnSmallYellow(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
|
||||||
|
void EffectSsKirakira_SpawnSmall(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor);
|
||||||
|
void EffectSsKirakira_SpawnDispersed(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s32 life);
|
||||||
|
void EffectSsKirakira_SpawnFocused(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s32 life);
|
||||||
|
void EffectSsBomb2_SpawnFade(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
|
||||||
|
void EffectSsBomb2_SpawnLayered(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep);
|
||||||
|
void EffectSsBlast_Spawn(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 scaleStepDecay, s16 life);
|
||||||
|
void EffectSsBlast_SpawnWhiteCustomScale(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep, s16 life);
|
||||||
|
void EffectSsBlast_SpawnShockwave(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 life);
|
||||||
|
void EffectSsBlast_SpawnWhiteShockwave(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
|
||||||
|
void EffectSsGSpk_SpawnAccel(struct PlayState* play, struct Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep);
|
||||||
|
void EffectSsGSpk_SpawnNoAccel(struct PlayState* play, struct Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep);
|
||||||
|
void EffectSsGSpk_SpawnFuse(struct PlayState* play, struct Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
|
||||||
|
void EffectSsGSpk_SpawnRandColor(struct PlayState* play, struct Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep);
|
||||||
|
void EffectSsGSpk_SpawnSmall(struct PlayState* play, struct Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor);
|
||||||
|
void EffectSsDFire_Spawn(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep, s16 alpha, s16 alphaStep, s16 fadeDelay, s32 life);
|
||||||
|
void EffectSsBubble_Spawn(struct PlayState* play, Vec3f* pos, f32 yPosOffset, f32 yPosRandScale, f32 xzPosRandScale, f32 scale);
|
||||||
|
void EffectSsGRipple_Spawn(struct PlayState* play, Vec3f* pos, s16 radius, s16 radiusMax, s16 life);
|
||||||
|
void EffectSsGSplash_Spawn(struct PlayState* play, Vec3f* pos, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 type, s16 scale);
|
||||||
|
void EffectSsGFire_Spawn(struct PlayState* play, Vec3f* pos);
|
||||||
|
void EffectSsLightning_Spawn(struct PlayState* play, Vec3f* pos, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 yaw, s16 life, s16 numBolts);
|
||||||
|
void EffectSsDtBubble_SpawnColorProfile(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 life, s16 colorProfile, s16 randXZ);
|
||||||
|
void EffectSsDtBubble_SpawnCustomColor(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 life, s16 randXZ);
|
||||||
|
void EffectSsHahen_Spawn(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 flags, s16 scale, s16 objectId, s16 life, Gfx* dList);
|
||||||
|
void EffectSsHahen_SpawnBurst(struct PlayState* play, Vec3f* pos, f32 burstScale, s16 flags, s16 scale, s16 randScaleRange, s16 count, s16 objectId, s16 life, Gfx* dList);
|
||||||
|
void func_800B2364(struct PlayState* play, Vec3f* pos, Gfx* dList);
|
||||||
|
void EffectSsStick_Spawn(struct PlayState* play, Vec3f* pos, s16 yaw);
|
||||||
|
void EffectSsSibuki_Spawn(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 moveDelay, s16 direction, s16 scale);
|
||||||
|
void EffectSsSibuki_SpawnBurst(struct PlayState* play, Vec3f* pos);
|
||||||
|
void EffectSsStone1_Spawn(struct PlayState* play, Vec3f* pos, s32 reg0);
|
||||||
|
void EffectSsHitmark_SpawnFixedScale(struct PlayState* play, s32 type, Vec3f* pos);
|
||||||
|
void EffectSsHitmark_SpawnCustomScale(struct PlayState* play, s32 type, s16 scale, Vec3f* pos);
|
||||||
|
void EffectSsFhgFlash_SpawnShock(struct PlayState* play, struct Actor* actor, Vec3f* pos, s16 scale, u8 params);
|
||||||
|
void EffectSsKFire_Spawn(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scaleMax, u8 type);
|
||||||
|
void EffectSsSolderSrchBall_Spawn(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16* playerDetected, s16 flags);
|
||||||
|
void EffectSsKakera_Spawn(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* arg3, s16 gravity, s16 arg5, s16 arg6, s16 arg7, s16 arg8, s16 scale, s16 arg10, s16 arg11, s32 life, s16 colorIdx, s16 objectId, Gfx* dList);
|
||||||
|
void EffectSsIcePiece_Spawn(struct PlayState* play, Vec3f* pos, f32 scale, Vec3f* velocity, Vec3f* accel, s32 life);
|
||||||
|
void EffectSsIcePiece_SpawnBurst(struct PlayState* play, Vec3f* refPos, f32 scale);
|
||||||
|
void func_800B2B44(struct PlayState* play, struct Actor* actor, Vec3f* pos, f32 scale);
|
||||||
|
void func_800B2B7C(struct PlayState* play, struct Actor* actor, Vec3s* arg2, f32 scale);
|
||||||
|
void EffectSsEnIce_Spawn(struct PlayState* play, Vec3f* pos, f32 scale, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s32 life);
|
||||||
|
void EffectSsFireTail_Spawn(struct PlayState* play, struct Actor* actor, Vec3f* pos, f32 scale, Vec3f* arg4, s16 arg5, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 type, s16 bodyPart, s32 life);
|
||||||
|
void EffectSsFireTail_SpawnFlame(struct PlayState* play, struct Actor* actor, Vec3f* pos, f32 arg3, s16 bodyPart, f32 colorIntensity);
|
||||||
|
void EffectSsFireTail_SpawnFlameOnPlayer(struct PlayState* play, f32 scale, s16 bodyPart, f32 colorIntensity);
|
||||||
|
void EffectSsEnFire_SpawnVec3f(struct PlayState* play, struct Actor* actor, Vec3f* pos, s16 scale, s16 params, s16 flags, s16 bodyPart);
|
||||||
|
void EffectSsEnFire_SpawnVec3s(struct PlayState* play, struct Actor* actor, Vec3s* pos, s16 scale, s16 params, s16 flags, s16 bodyPart);
|
||||||
|
void EffectSsExtra_Spawn(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scoreIndex);
|
||||||
|
void EffectSsDeadDb_Spawn(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* prim, Color_RGBA8* env, s16 scale, s16 scaleStep, s32 life);
|
||||||
|
void func_800B3030(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep, s32 colorIndex);
|
||||||
|
void EffectSsDeadDd_Spawn(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* prim, Color_RGBA8* env, s16 scale, s16 scaleStep, s16 alphaStep, s32 life);
|
||||||
|
void EffectSsDeadDs_Spawn(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep, s16 alpha, s32 life);
|
||||||
|
void func_800B31BC(struct PlayState* play, Vec3f* pos, s16 scale, s16 scaleStep, s16 alpha, s32 life);
|
||||||
|
void EffectSsIceSmoke_Spawn(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale);
|
||||||
|
void EffectSsIceBlock_Spawn(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale);
|
||||||
|
|
||||||
|
|
||||||
|
extern EffectSsOverlay gParticleOverlayTable[EFFECT_SS_MAX];
|
||||||
|
|
||||||
|
#endif
|
@ -44,7 +44,6 @@
|
|||||||
#include "fault.h"
|
#include "fault.h"
|
||||||
|
|
||||||
#include "prevent_bss_reordering.h"
|
#include "prevent_bss_reordering.h"
|
||||||
#include "prevent_bss_reordering2.h"
|
|
||||||
#include "libc64/sprintf.h"
|
#include "libc64/sprintf.h"
|
||||||
#include "libc64/sleep.h"
|
#include "libc64/sleep.h"
|
||||||
#include "vt.h"
|
#include "vt.h"
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
#include "prevent_bss_reordering.h"
|
|
||||||
#include "global.h"
|
|
||||||
#include "fault.h"
|
#include "fault.h"
|
||||||
#include "libc64/fixed_point.h"
|
#include "libc64/fixed_point.h"
|
||||||
#include "libc64/sprintf.h"
|
#include "libc64/sprintf.h"
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
#include "prevent_bss_reordering.h"
|
#include "prevent_bss_reordering.h"
|
||||||
#include "z64collision_check.h"
|
#include "z64collision_check.h"
|
||||||
|
|
||||||
#include "global.h"
|
#include "z64actor.h"
|
||||||
|
#include "z64effect.h"
|
||||||
#include "z64malloc.h"
|
#include "z64malloc.h"
|
||||||
|
#include "global.h"
|
||||||
|
|
||||||
typedef s32 (*ColChkResetFunc)(struct PlayState*, Collider*);
|
typedef s32 (*ColChkResetFunc)(struct PlayState*, Collider*);
|
||||||
typedef void (*ColChkBloodFunc)(struct PlayState*, Collider*, Vec3f*);
|
typedef void (*ColChkBloodFunc)(struct PlayState*, Collider*, Vec3f*);
|
||||||
|
@ -1,10 +1,19 @@
|
|||||||
|
#include "z64eff_blure.h"
|
||||||
|
|
||||||
|
#include "libc/stdbool.h"
|
||||||
|
#include "gfx.h"
|
||||||
|
#include "macros.h"
|
||||||
|
#include "sys_matrix.h"
|
||||||
|
#include "z64effect_ss.h"
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
|
|
||||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||||
|
|
||||||
void EffectBlure_AddVertex(EffectBlure* this, Vec3f* p1, Vec3f* p2) {
|
void EffectBlure_AddVertex(EffectBlure* this, Vec3f* p1, Vec3f* p2) {
|
||||||
EffectBlureElement* elem;
|
EffectBlureElement* elem;
|
||||||
s32 numElements;
|
s32 pad;
|
||||||
|
|
||||||
|
//! FAKE
|
||||||
if (this) {}
|
if (this) {}
|
||||||
if (this) {}
|
if (this) {}
|
||||||
|
|
||||||
@ -16,7 +25,7 @@ void EffectBlure_AddVertex(EffectBlure* this, Vec3f* p1, Vec3f* p2) {
|
|||||||
elem = &this->elements[this->numElements];
|
elem = &this->elements[this->numElements];
|
||||||
elem->state = 1;
|
elem->state = 1;
|
||||||
|
|
||||||
if (!(this->flags & 2)) {
|
if (!(this->flags & EFFECT_BLURE_FLAG_2)) {
|
||||||
elem->p1.x = p1->x;
|
elem->p1.x = p1->x;
|
||||||
elem->p1.y = p1->y;
|
elem->p1.y = p1->y;
|
||||||
elem->p1.z = p1->z;
|
elem->p1.z = p1->z;
|
||||||
@ -35,16 +44,16 @@ void EffectBlure_AddVertex(EffectBlure* this, Vec3f* p1, Vec3f* p2) {
|
|||||||
Vec3f sp44;
|
Vec3f sp44;
|
||||||
Vec3f sp38;
|
Vec3f sp38;
|
||||||
|
|
||||||
sp16C.x = ((f32)(elem - 1)->p2.x + (f32)(elem - 1)->p1.x) * 0.5f;
|
sp16C.x = ((f32)(elem - 1)->p2.x + (f32)(elem - 1)->p1.x) / 2.0f;
|
||||||
sp16C.y = ((f32)(elem - 1)->p2.y + (f32)(elem - 1)->p1.y) * 0.5f;
|
sp16C.y = ((f32)(elem - 1)->p2.y + (f32)(elem - 1)->p1.y) / 2.0f;
|
||||||
sp16C.z = ((f32)(elem - 1)->p2.z + (f32)(elem - 1)->p1.z) * 0.5f;
|
sp16C.z = ((f32)(elem - 1)->p2.z + (f32)(elem - 1)->p1.z) / 2.0f;
|
||||||
sp160.x = (p1->x + p2->x) * 0.5f;
|
sp160.x = (p1->x + p2->x) / 2.0f;
|
||||||
sp160.y = (p1->y + p2->y) * 0.5f;
|
sp160.y = (p1->y + p2->y) / 2.0f;
|
||||||
sp160.z = (p1->z + p2->z) * 0.5f;
|
sp160.z = (p1->z + p2->z) / 2.0f;
|
||||||
|
|
||||||
Math_Vec3f_Diff(&sp160, &sp16C, &sp154);
|
Math_Vec3f_Diff(&sp160, &sp16C, &sp154);
|
||||||
scale = Math3D_Vec3fMagnitude(&sp154);
|
scale = Math3D_Vec3fMagnitude(&sp154);
|
||||||
if (!(fabsf(scale) < 0.008f)) {
|
if (!IS_ZERO(scale)) {
|
||||||
scale = 1.0f / scale;
|
scale = 1.0f / scale;
|
||||||
Math_Vec3f_Scale(&sp154, scale);
|
Math_Vec3f_Scale(&sp154, scale);
|
||||||
|
|
||||||
@ -72,15 +81,14 @@ void EffectBlure_AddVertex(EffectBlure* this, Vec3f* p1, Vec3f* p2) {
|
|||||||
|
|
||||||
void EffectBlure_AddSpace(EffectBlure* this) {
|
void EffectBlure_AddSpace(EffectBlure* this) {
|
||||||
EffectBlureElement* elem;
|
EffectBlureElement* elem;
|
||||||
s32 numElements;
|
s32 pad;
|
||||||
|
|
||||||
if (this != NULL) {
|
if (this != NULL) {
|
||||||
numElements = this->numElements;
|
if (this->numElements >= ARRAY_COUNT(this->elements)) {
|
||||||
if (numElements >= ARRAY_COUNT(this->elements)) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
elem = &this->elements[numElements];
|
elem = &this->elements[this->numElements];
|
||||||
elem->state = 0;
|
elem->state = 0;
|
||||||
elem->timer = 1;
|
elem->timer = 1;
|
||||||
|
|
||||||
@ -118,7 +126,7 @@ void EffectBlure_Init1(void* thisx, void* initParamsx) {
|
|||||||
|
|
||||||
EffectBlure_InitElements(this);
|
EffectBlure_InitElements(this);
|
||||||
|
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < EFFECT_BLURE_COLOR_COUNT; i++) {
|
||||||
this->p1StartColor[i] = initParams->p1StartColor[i];
|
this->p1StartColor[i] = initParams->p1StartColor[i];
|
||||||
this->p2StartColor[i] = initParams->p2StartColor[i];
|
this->p2StartColor[i] = initParams->p2StartColor[i];
|
||||||
this->p1EndColor[i] = initParams->p1EndColor[i];
|
this->p1EndColor[i] = initParams->p1EndColor[i];
|
||||||
@ -131,7 +139,7 @@ void EffectBlure_Init1(void* thisx, void* initParamsx) {
|
|||||||
this->flags = 0;
|
this->flags = 0;
|
||||||
this->addAngleChange = 0;
|
this->addAngleChange = 0;
|
||||||
this->addAngle = 0;
|
this->addAngle = 0;
|
||||||
this->drawMode = 0;
|
this->drawMode = EFF_BLURE_DRAW_MODE_SIMPLE;
|
||||||
this->altPrimColor.r = 0;
|
this->altPrimColor.r = 0;
|
||||||
this->altPrimColor.g = 0;
|
this->altPrimColor.g = 0;
|
||||||
this->altPrimColor.b = 0;
|
this->altPrimColor.b = 0;
|
||||||
@ -153,7 +161,7 @@ void EffectBlure_Init2(void* thisx, void* initParamsx) {
|
|||||||
|
|
||||||
EffectBlure_InitElements(this);
|
EffectBlure_InitElements(this);
|
||||||
|
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < EFFECT_BLURE_COLOR_COUNT; i++) {
|
||||||
this->p1StartColor[i] = initParams->p1StartColor[i];
|
this->p1StartColor[i] = initParams->p1StartColor[i];
|
||||||
this->p2StartColor[i] = initParams->p2StartColor[i];
|
this->p2StartColor[i] = initParams->p2StartColor[i];
|
||||||
this->p1EndColor[i] = initParams->p1EndColor[i];
|
this->p1EndColor[i] = initParams->p1EndColor[i];
|
||||||
@ -270,8 +278,8 @@ void EffectBlure_UpdateFlags(EffectBlureElement* elem) {
|
|||||||
f32 sp2C;
|
f32 sp2C;
|
||||||
|
|
||||||
if (((elem - 1)->state == 0) || ((elem + 1)->state == 0)) {
|
if (((elem - 1)->state == 0) || ((elem + 1)->state == 0)) {
|
||||||
elem->flags &= ~3;
|
elem->flags &= ~(EFFECT_BLURE_ELEMENT_FLAG_1 | EFFECT_BLURE_ELEMENT_FLAG_2);
|
||||||
elem->flags |= 2;
|
elem->flags |= EFFECT_BLURE_ELEMENT_FLAG_2;
|
||||||
} else {
|
} else {
|
||||||
Math_Vec3s_DiffToVec3f(&sp64, &elem->p1, &prev->p1);
|
Math_Vec3s_DiffToVec3f(&sp64, &elem->p1, &prev->p1);
|
||||||
Math_Vec3s_DiffToVec3f(&sp58, &elem->p2, &prev->p2);
|
Math_Vec3s_DiffToVec3f(&sp58, &elem->p2, &prev->p2);
|
||||||
@ -280,14 +288,14 @@ void EffectBlure_UpdateFlags(EffectBlureElement* elem) {
|
|||||||
|
|
||||||
if (Math3D_AngleBetweenVectors(&sp64, &sp4C, &sp34) || Math3D_AngleBetweenVectors(&sp58, &sp40, &sp30) ||
|
if (Math3D_AngleBetweenVectors(&sp64, &sp4C, &sp34) || Math3D_AngleBetweenVectors(&sp58, &sp40, &sp30) ||
|
||||||
Math3D_AngleBetweenVectors(&sp4C, &sp40, &sp2C)) {
|
Math3D_AngleBetweenVectors(&sp4C, &sp40, &sp2C)) {
|
||||||
elem->flags &= ~3;
|
elem->flags &= ~(EFFECT_BLURE_ELEMENT_FLAG_1 | EFFECT_BLURE_ELEMENT_FLAG_2);
|
||||||
elem->flags |= 0;
|
elem->flags |= 0;
|
||||||
} else if ((sp34 <= -0.5f) || (sp30 <= -0.5f) || (sp2C <= 0.7071f)) {
|
} else if ((sp34 <= -0.5f) || (sp30 <= -0.5f) || (sp2C <= 0.7071f)) {
|
||||||
elem->flags &= ~3;
|
elem->flags &= ~(EFFECT_BLURE_ELEMENT_FLAG_1 | EFFECT_BLURE_ELEMENT_FLAG_2);
|
||||||
elem->flags |= 0;
|
elem->flags |= 0;
|
||||||
} else {
|
} else {
|
||||||
elem->flags &= ~3;
|
elem->flags &= ~(EFFECT_BLURE_ELEMENT_FLAG_1 | EFFECT_BLURE_ELEMENT_FLAG_2);
|
||||||
elem->flags |= 1;
|
elem->flags |= EFFECT_BLURE_ELEMENT_FLAG_1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -337,7 +345,8 @@ void EffectBlure_GetComputedValues(EffectBlure* this, s32 index, f32 ratio, Vec3
|
|||||||
|
|
||||||
vec1->x = (sp30.x * 0.5f * mode4Param * ratio) + elem->p1.x;
|
vec1->x = (sp30.x * 0.5f * mode4Param * ratio) + elem->p1.x;
|
||||||
vec1->y = (sp30.y * 0.5f * mode4Param * ratio) + elem->p1.y;
|
vec1->y = (sp30.y * 0.5f * mode4Param * ratio) + elem->p1.y;
|
||||||
if (1) {} // Necessary to match
|
//! FAKE
|
||||||
|
if (1) {}
|
||||||
vec1->z = (sp30.z * 0.5f * mode4Param * ratio) + elem->p1.z;
|
vec1->z = (sp30.z * 0.5f * mode4Param * ratio) + elem->p1.z;
|
||||||
|
|
||||||
vec2->x = -(sp30.x * 0.5f * mode4Param * ratio) + elem->p2.x;
|
vec2->x = -(sp30.x * 0.5f * mode4Param * ratio) + elem->p2.x;
|
||||||
@ -356,7 +365,7 @@ void EffectBlure_GetComputedValues(EffectBlure* this, s32 index, f32 ratio, Vec3
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->flags & 0x10) {
|
if (this->flags & EFFECT_BLURE_FLAG_10) {
|
||||||
color1->r = color1->g = color1->b = color1->a = 255;
|
color1->r = color1->g = color1->b = color1->a = 255;
|
||||||
color2->r = color2->g = color2->b = color2->a = 255;
|
color2->r = color2->g = color2->b = color2->a = 255;
|
||||||
} else {
|
} else {
|
||||||
@ -511,7 +520,7 @@ void EffectBlure_DrawElemHermiteInterpolation(EffectBlure* this, EffectBlureElem
|
|||||||
Math_Vec3s_ToVec3f(&sp18C, &sp1EC);
|
Math_Vec3s_ToVec3f(&sp18C, &sp1EC);
|
||||||
Math_Vec3s_ToVec3f(&sp180, &sp1E4);
|
Math_Vec3s_ToVec3f(&sp180, &sp1E4);
|
||||||
|
|
||||||
if ((elem->flags & 3) == 2) {
|
if ((elem->flags & (EFFECT_BLURE_ELEMENT_FLAG_1 | EFFECT_BLURE_ELEMENT_FLAG_2)) == EFFECT_BLURE_ELEMENT_FLAG_2) {
|
||||||
Math_Vec3f_Diff(&sp18C, &sp1CC, &sp1B4);
|
Math_Vec3f_Diff(&sp18C, &sp1CC, &sp1B4);
|
||||||
Math_Vec3f_Diff(&sp180, &sp1C0, &sp1A8);
|
Math_Vec3f_Diff(&sp180, &sp1C0, &sp1A8);
|
||||||
} else {
|
} else {
|
||||||
@ -529,7 +538,8 @@ void EffectBlure_DrawElemHermiteInterpolation(EffectBlure* this, EffectBlureElem
|
|||||||
Math_Vec3f_Scale(&sp1B4, 0.5f);
|
Math_Vec3f_Scale(&sp1B4, 0.5f);
|
||||||
Math_Vec3f_Scale(&sp1A8, 0.5f);
|
Math_Vec3f_Scale(&sp1A8, 0.5f);
|
||||||
|
|
||||||
if (((elem + 1)->flags & 3) == 2) {
|
if (((elem + 1)->flags & (EFFECT_BLURE_ELEMENT_FLAG_1 | EFFECT_BLURE_ELEMENT_FLAG_2)) ==
|
||||||
|
EFFECT_BLURE_ELEMENT_FLAG_2) {
|
||||||
Math_Vec3f_Diff(&sp18C, &sp1CC, &sp174);
|
Math_Vec3f_Diff(&sp18C, &sp1CC, &sp174);
|
||||||
Math_Vec3f_Diff(&sp180, &sp1C0, &sp168);
|
Math_Vec3f_Diff(&sp180, &sp1C0, &sp168);
|
||||||
} else {
|
} else {
|
||||||
@ -651,15 +661,15 @@ void EffectBlure_DrawSmooth(EffectBlure* this2, GraphicsContext* gfxCtx) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this->elements[0].flags &= ~3;
|
this->elements[0].flags &= ~(EFFECT_BLURE_ELEMENT_FLAG_1 | EFFECT_BLURE_ELEMENT_FLAG_2);
|
||||||
this->elements[0].flags |= 2;
|
this->elements[0].flags |= EFFECT_BLURE_ELEMENT_FLAG_2;
|
||||||
|
|
||||||
for (elem = &this->elements[1]; elem < this->elements + this->numElements - 1; elem++) {
|
for (elem = &this->elements[1]; elem < this->elements + this->numElements - 1; elem++) {
|
||||||
EffectBlure_UpdateFlags(elem);
|
EffectBlure_UpdateFlags(elem);
|
||||||
}
|
}
|
||||||
|
|
||||||
this->elements[this->numElements - 1].flags &= ~3;
|
this->elements[this->numElements - 1].flags &= ~(EFFECT_BLURE_ELEMENT_FLAG_1 | EFFECT_BLURE_ELEMENT_FLAG_2);
|
||||||
this->elements[this->numElements - 1].flags |= 2;
|
this->elements[this->numElements - 1].flags |= EFFECT_BLURE_ELEMENT_FLAG_2;
|
||||||
|
|
||||||
EffectBlure_SetupSmooth(this, gfxCtx);
|
EffectBlure_SetupSmooth(this, gfxCtx);
|
||||||
SkinMatrix_SetTranslate(&spDC, this->elements[0].p2.x, this->elements[0].p2.y, this->elements[0].p2.z);
|
SkinMatrix_SetTranslate(&spDC, this->elements[0].p2.x, this->elements[0].p2.y, this->elements[0].p2.z);
|
||||||
@ -677,10 +687,18 @@ void EffectBlure_DrawSmooth(EffectBlure* this2, GraphicsContext* gfxCtx) {
|
|||||||
if ((elem->state == 0) || ((elem + 1)->state == 0)) {
|
if ((elem->state == 0) || ((elem + 1)->state == 0)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ((((elem->flags & 3) == 0) && (((elem + 1)->flags & 3) == 0)) ||
|
if ((((elem->flags & (EFFECT_BLURE_ELEMENT_FLAG_1 | EFFECT_BLURE_ELEMENT_FLAG_2)) == 0) &&
|
||||||
(((elem->flags & 3) == 2) && (((elem + 1)->flags & 3) == 0)) ||
|
(((elem + 1)->flags & (EFFECT_BLURE_ELEMENT_FLAG_1 | EFFECT_BLURE_ELEMENT_FLAG_2)) == 0)) ||
|
||||||
(((elem->flags & 3) == 0) && (((elem + 1)->flags & 3) == 2)) ||
|
(((elem->flags & (EFFECT_BLURE_ELEMENT_FLAG_1 | EFFECT_BLURE_ELEMENT_FLAG_2)) ==
|
||||||
(((elem->flags & 3) == 2) && (((elem + 1)->flags & 3) == 2))) {
|
EFFECT_BLURE_ELEMENT_FLAG_2) &&
|
||||||
|
(((elem + 1)->flags & (EFFECT_BLURE_ELEMENT_FLAG_1 | EFFECT_BLURE_ELEMENT_FLAG_2)) == 0)) ||
|
||||||
|
(((elem->flags & (EFFECT_BLURE_ELEMENT_FLAG_1 | EFFECT_BLURE_ELEMENT_FLAG_2)) == 0) &&
|
||||||
|
(((elem + 1)->flags & (EFFECT_BLURE_ELEMENT_FLAG_1 | EFFECT_BLURE_ELEMENT_FLAG_2)) ==
|
||||||
|
EFFECT_BLURE_ELEMENT_FLAG_2)) ||
|
||||||
|
(((elem->flags & (EFFECT_BLURE_ELEMENT_FLAG_1 | EFFECT_BLURE_ELEMENT_FLAG_2)) ==
|
||||||
|
EFFECT_BLURE_ELEMENT_FLAG_2) &&
|
||||||
|
(((elem + 1)->flags & (EFFECT_BLURE_ELEMENT_FLAG_1 | EFFECT_BLURE_ELEMENT_FLAG_2)) ==
|
||||||
|
EFFECT_BLURE_ELEMENT_FLAG_2))) {
|
||||||
EffectBlure_DrawElemNoInterpolation(this, elem, i, gfxCtx);
|
EffectBlure_DrawElemNoInterpolation(this, elem, i, gfxCtx);
|
||||||
} else {
|
} else {
|
||||||
EffectBlure_DrawElemHermiteInterpolation(this, elem, i, gfxCtx);
|
EffectBlure_DrawElemHermiteInterpolation(this, elem, i, gfxCtx);
|
||||||
@ -723,12 +741,13 @@ void EffectBlure_SetupSimpleAlt(GraphicsContext* gfxCtx, EffectBlure* this, Vtx*
|
|||||||
CLOSE_DISPS(gfxCtx);
|
CLOSE_DISPS(gfxCtx);
|
||||||
}
|
}
|
||||||
|
|
||||||
void (*sSetupHandlers[])(GraphicsContext* gfxCtx, EffectBlure* this, Vtx* vtx) = {
|
typedef void (*SetupHandler)(GraphicsContext* gfxCtx, EffectBlure* this, Vtx* vtx);
|
||||||
EffectBlure_SetupSimple,
|
|
||||||
EffectBlure_SetupSimpleAlt,
|
|
||||||
};
|
|
||||||
|
|
||||||
s32 D_801AE268 = 0; // unused
|
SetupHandler sSetupHandlers[EFF_BLURE_DRAW_MODE_MAX] = {
|
||||||
|
EffectBlure_SetupSimple, // EFF_BLURE_DRAW_MODE_SIMPLE
|
||||||
|
EffectBlure_SetupSimpleAlt, // EFF_BLURE_DRAW_MODE_SIMPLE_ALT_COLORS
|
||||||
|
NULL, // EFF_BLURE_DRAW_MODE_SMOOTH
|
||||||
|
};
|
||||||
|
|
||||||
void EffectBlure_DrawSimpleVertices(GraphicsContext* gfxCtx, EffectBlure* this, Vtx* vtx) {
|
void EffectBlure_DrawSimpleVertices(GraphicsContext* gfxCtx, EffectBlure* this, Vtx* vtx) {
|
||||||
Mtx* mtx;
|
Mtx* mtx;
|
||||||
@ -754,7 +773,7 @@ void EffectBlure_DrawSimpleVertices(GraphicsContext* gfxCtx, EffectBlure* this,
|
|||||||
j = 0;
|
j = 0;
|
||||||
|
|
||||||
for (i = 0; i < this->numElements - 1; i++, j += 4) {
|
for (i = 0; i < this->numElements - 1; i++, j += 4) {
|
||||||
if (this->drawMode == 1) {
|
if (this->drawMode == EFF_BLURE_DRAW_MODE_SIMPLE_ALT_COLORS) {
|
||||||
alphaRatio = (f32)this->elements[i].timer / (f32)this->elemDuration;
|
alphaRatio = (f32)this->elements[i].timer / (f32)this->elemDuration;
|
||||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x00, 0x80, this->altPrimColor.r, this->altPrimColor.g,
|
gDPSetPrimColor(POLY_XLU_DISP++, 0x00, 0x80, this->altPrimColor.r, this->altPrimColor.g,
|
||||||
this->altPrimColor.b, this->altPrimColor.a * (1.0f - alphaRatio));
|
this->altPrimColor.b, this->altPrimColor.a * (1.0f - alphaRatio));
|
||||||
@ -764,7 +783,7 @@ void EffectBlure_DrawSimpleVertices(GraphicsContext* gfxCtx, EffectBlure* this,
|
|||||||
gSPVertex(POLY_XLU_DISP++, &vtx[j], 4, 0);
|
gSPVertex(POLY_XLU_DISP++, &vtx[j], 4, 0);
|
||||||
gSP2Triangles(POLY_XLU_DISP++, 0, 1, 3, 0, 0, 3, 2, 0);
|
gSP2Triangles(POLY_XLU_DISP++, 0, 1, 3, 0, 0, 3, 2, 0);
|
||||||
|
|
||||||
if (!(this->flags & 4)) {
|
if (!(this->flags & EFFECT_BLURE_FLAG_4)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -833,7 +852,7 @@ void EffectBlure_DrawSimple(EffectBlure* this2, GraphicsContext* gfxCtx) {
|
|||||||
Color_RGBA8 sp60;
|
Color_RGBA8 sp60;
|
||||||
|
|
||||||
if (this->numElements >= 2) {
|
if (this->numElements >= 2) {
|
||||||
vtxCount = this->numElements * 4;
|
vtxCount = this->numElements * ARRAY_COUNT(D_801AE26C);
|
||||||
|
|
||||||
vtx = GRAPH_ALLOC(gfxCtx, vtxCount * sizeof(Vtx));
|
vtx = GRAPH_ALLOC(gfxCtx, vtxCount * sizeof(Vtx));
|
||||||
if (vtx == NULL) {
|
if (vtx == NULL) {
|
||||||
@ -841,14 +860,14 @@ void EffectBlure_DrawSimple(EffectBlure* this2, GraphicsContext* gfxCtx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
vtxIter = vtx;
|
vtxIter = vtx;
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < ARRAY_COUNT(D_801AE26C); i++) {
|
||||||
vtxIter->v = D_801AE26C[i];
|
vtxIter->v = D_801AE26C[i];
|
||||||
vtxIter++;
|
vtxIter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->numElements >= 2) {
|
if (this->numElements >= 2) {
|
||||||
for (elem = this->elements; elem < this->elements + this->numElements - 2; elem++) {
|
for (elem = this->elements; elem < this->elements + this->numElements - 2; elem++) {
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < ARRAY_COUNT(D_801AE2AC); i++) {
|
||||||
vtxIter->v = D_801AE2AC[i];
|
vtxIter->v = D_801AE2AC[i];
|
||||||
vtxIter++;
|
vtxIter++;
|
||||||
}
|
}
|
||||||
@ -1019,7 +1038,7 @@ void EffectBlure_Draw(void* thisx, GraphicsContext* gfxCtx) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (this->drawMode < 2) {
|
} else if (this->drawMode <= EFF_BLURE_DRAW_MODE_SIMPLE_ALT_COLORS) {
|
||||||
EffectBlure_DrawSimple(this, gfxCtx);
|
EffectBlure_DrawSimple(this, gfxCtx);
|
||||||
} else {
|
} else {
|
||||||
EffectBlure_DrawSmooth(this, gfxCtx);
|
EffectBlure_DrawSmooth(this, gfxCtx);
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
#include "z64eff_shield_particle.h"
|
||||||
|
#include "z64effect.h"
|
||||||
|
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "vt.h"
|
#include "vt.h"
|
||||||
|
|
||||||
@ -175,7 +178,7 @@ void EffectShieldParticle_Draw(void* thisx, GraphicsContext* gfxCtx) {
|
|||||||
MtxF sp104;
|
MtxF sp104;
|
||||||
MtxF spC4;
|
MtxF spC4;
|
||||||
MtxF sp84;
|
MtxF sp84;
|
||||||
f32 temp1 = (elem->endX + elem->startX) * 0.5f;
|
f32 temp1 = (elem->endX + elem->startX) / 2.0f;
|
||||||
f32 temp2 = elem->endX - elem->startX;
|
f32 temp2 = elem->endX - elem->startX;
|
||||||
f32 temp3 = (temp2 * (1.0f / 64.0f)) / 0.02f;
|
f32 temp3 = (temp2 * (1.0f / 64.0f)) / 0.02f;
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "z64eff_spark.h"
|
||||||
|
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "z64eff_ss_dead.h"
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
|
|
||||||
void func_800AE2A0(PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3) {
|
void func_800AE2A0(PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3) {
|
||||||
@ -19,7 +20,7 @@ void func_800AE2A0(PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3) {
|
|||||||
gDPSetFogColor(displayListHead++, color->r, color->g, color->b, color->a);
|
gDPSetFogColor(displayListHead++, color->r, color->g, color->b, color->a);
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPFogPosition(displayListHead++, 0, (s16)(absCos * 3000.0f) + 1500);
|
gSPFogPosition(displayListHead++, 0, TRUNCF_BINANG(absCos * 3000.0f) + 1500);
|
||||||
|
|
||||||
POLY_OPA_DISP = displayListHead;
|
POLY_OPA_DISP = displayListHead;
|
||||||
|
|
||||||
@ -37,7 +38,7 @@ void func_800AE434(PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3) {
|
|||||||
|
|
||||||
gDPPipeSync(displayListHead++);
|
gDPPipeSync(displayListHead++);
|
||||||
gDPSetFogColor(displayListHead++, color->r, color->g, color->b, color->a);
|
gDPSetFogColor(displayListHead++, color->r, color->g, color->b, color->a);
|
||||||
gSPFogPosition(displayListHead++, 0, (s16)(2800.0f * fabsf(cos)) + 1700);
|
gSPFogPosition(displayListHead++, 0, TRUNCF_BINANG(2800.0f * fabsf(cos)) + 1700);
|
||||||
|
|
||||||
POLY_OPA_DISP = displayListHead;
|
POLY_OPA_DISP = displayListHead;
|
||||||
|
|
||||||
@ -74,7 +75,7 @@ void func_800AE5E4(PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3) {
|
|||||||
gDPSetFogColor(displayListHead++, color->r, color->g, color->b, color->a);
|
gDPSetFogColor(displayListHead++, color->r, color->g, color->b, color->a);
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPFogPosition(displayListHead++, 0, (s16)(absCos * 3000.0f) + 1500);
|
gSPFogPosition(displayListHead++, 0, TRUNCF_BINANG(absCos * 3000.0f) + 1500);
|
||||||
|
|
||||||
POLY_XLU_DISP = displayListHead;
|
POLY_XLU_DISP = displayListHead;
|
||||||
|
|
||||||
@ -92,7 +93,7 @@ void func_800AE778(PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3) {
|
|||||||
|
|
||||||
gDPPipeSync(displayListHead++);
|
gDPPipeSync(displayListHead++);
|
||||||
gDPSetFogColor(displayListHead++, color->r, color->g, color->b, color->a);
|
gDPSetFogColor(displayListHead++, color->r, color->g, color->b, color->a);
|
||||||
gSPFogPosition(displayListHead++, 0, (s16)(2800.0f * fabsf(cos)) + 1700);
|
gSPFogPosition(displayListHead++, 0, TRUNCF_BINANG(2800.0f * fabsf(cos)) + 1700);
|
||||||
|
|
||||||
POLY_XLU_DISP = displayListHead;
|
POLY_XLU_DISP = displayListHead;
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "z64eff_tire_mark.h"
|
||||||
|
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||||
|
|
||||||
@ -59,8 +61,8 @@ void func_800AE930(CollisionContext* colCtx, EffectTireMark* this, Vec3f* pos, f
|
|||||||
|
|
||||||
if ((func_80179798(&sp84, &sp90, &sp54, &sp60, &sp6C, &sp30) != 0) &&
|
if ((func_80179798(&sp84, &sp90, &sp54, &sp60, &sp6C, &sp30) != 0) &&
|
||||||
(func_80179798(&sp84, &sp90, &sp3C, &sp48, &sp78, &sp30) != 0)) {
|
(func_80179798(&sp84, &sp90, &sp3C, &sp48, &sp78, &sp30) != 0)) {
|
||||||
if (!(spAC->flags & 2)) {
|
if (!(spAC->flags & EFFECT_TIRE_MARK_ELEMENT_FLAG_2)) {
|
||||||
spAC->flags |= 1;
|
spAC->flags |= EFFECT_TIRE_MARK_ELEMENT_FLAG_1;
|
||||||
}
|
}
|
||||||
|
|
||||||
spA8 = &this->elements[this->numElements];
|
spA8 = &this->elements[this->numElements];
|
||||||
@ -76,8 +78,8 @@ void func_800AE930(CollisionContext* colCtx, EffectTireMark* this, Vec3f* pos, f
|
|||||||
this->numElements++;
|
this->numElements++;
|
||||||
|
|
||||||
spAC = &this->elements[this->numElements - 1];
|
spAC = &this->elements[this->numElements - 1];
|
||||||
if (!(spAC->flags & 2)) {
|
if (!(spAC->flags & EFFECT_TIRE_MARK_ELEMENT_FLAG_2)) {
|
||||||
spAC->flags |= 1;
|
spAC->flags |= EFFECT_TIRE_MARK_ELEMENT_FLAG_1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! FAKE:
|
//! FAKE:
|
||||||
@ -93,8 +95,8 @@ void func_800AE930(CollisionContext* colCtx, EffectTireMark* this, Vec3f* pos, f
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(spAC->flags & 2)) {
|
if (!(spAC->flags & EFFECT_TIRE_MARK_ELEMENT_FLAG_2)) {
|
||||||
spAC->flags |= 1;
|
spAC->flags |= EFFECT_TIRE_MARK_ELEMENT_FLAG_1;
|
||||||
}
|
}
|
||||||
|
|
||||||
spA8 = &this->elements[this->numElements];
|
spA8 = &this->elements[this->numElements];
|
||||||
@ -108,8 +110,8 @@ void func_800AE930(CollisionContext* colCtx, EffectTireMark* this, Vec3f* pos, f
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(spAC->flags & 2)) {
|
if (!(spAC->flags & EFFECT_TIRE_MARK_ELEMENT_FLAG_2)) {
|
||||||
spAC->flags |= 1;
|
spAC->flags |= EFFECT_TIRE_MARK_ELEMENT_FLAG_1;
|
||||||
}
|
}
|
||||||
|
|
||||||
spA8 = &this->elements[this->numElements];
|
spA8 = &this->elements[this->numElements];
|
||||||
@ -125,7 +127,7 @@ void func_800AE930(CollisionContext* colCtx, EffectTireMark* this, Vec3f* pos, f
|
|||||||
void func_800AEF44(EffectTireMark* this) {
|
void func_800AEF44(EffectTireMark* this) {
|
||||||
EffectTireMarkElement* elem = &this->elements[this->numElements - 1];
|
EffectTireMarkElement* elem = &this->elements[this->numElements - 1];
|
||||||
|
|
||||||
elem->flags |= 2;
|
elem->flags |= EFFECT_TIRE_MARK_ELEMENT_FLAG_2;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectTireMark_InitElement(EffectTireMarkElement* elem) {
|
void EffectTireMark_InitElement(EffectTireMarkElement* elem) {
|
||||||
@ -255,15 +257,15 @@ void EffectTireMark_Draw(void* thisx, GraphicsContext* gfxCtx) {
|
|||||||
|
|
||||||
EffectTireMark_SetVertices(vtx, elem, i, 255);
|
EffectTireMark_SetVertices(vtx, elem, i, 255);
|
||||||
|
|
||||||
if ((elem - 1)->flags & 1) {
|
if ((elem - 1)->flags & EFFECT_TIRE_MARK_ELEMENT_FLAG_1) {
|
||||||
if (!(elem->flags & 1)) {
|
if (!(elem->flags & EFFECT_TIRE_MARK_ELEMENT_FLAG_1)) {
|
||||||
s32 requiredScopeTemp;
|
s32 requiredScopeTemp;
|
||||||
|
|
||||||
vtx[i * 2 + 0].v.tc[0] = 0;
|
vtx[i * 2 + 0].v.tc[0] = 0;
|
||||||
vtx[i * 2 + 0].v.tc[1] = 0;
|
vtx[i * 2 + 0].v.tc[1] = 0;
|
||||||
vtx[i * 2 + 1].v.tc[0] = 0;
|
vtx[i * 2 + 1].v.tc[0] = 0;
|
||||||
vtx[i * 2 + 1].v.tc[1] = 1024;
|
vtx[i * 2 + 1].v.tc[1] = 1024;
|
||||||
} else if ((i >= 2) && !((elem - 2)->flags & 1)) {
|
} else if ((i >= 2) && !((elem - 2)->flags & EFFECT_TIRE_MARK_ELEMENT_FLAG_1)) {
|
||||||
vtx[i * 2 - 2].v.tc[0] = 0;
|
vtx[i * 2 - 2].v.tc[0] = 0;
|
||||||
vtx[i * 2 - 2].v.tc[1] = 0;
|
vtx[i * 2 - 2].v.tc[1] = 0;
|
||||||
vtx[i * 2 - 1].v.tc[0] = 0;
|
vtx[i * 2 - 1].v.tc[0] = 0;
|
||||||
|
@ -1,8 +1,50 @@
|
|||||||
|
#include "z64effect.h"
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
|
|
||||||
|
#define SPARK_COUNT 3
|
||||||
|
#define BLURE_COUNT 25
|
||||||
|
#define SHIELD_PARTICLE_COUNT 3
|
||||||
|
#define TIRE_MARK_COUNT 15
|
||||||
|
|
||||||
|
#define TOTAL_EFFECT_COUNT SPARK_COUNT + BLURE_COUNT + SHIELD_PARTICLE_COUNT + TIRE_MARK_COUNT
|
||||||
|
|
||||||
|
typedef struct EffectStatus {
|
||||||
|
/* 0x0 */ u8 active;
|
||||||
|
/* 0x1 */ u8 unk1;
|
||||||
|
/* 0x2 */ u8 unk2;
|
||||||
|
} EffectStatus; // size = 0x3
|
||||||
|
|
||||||
|
typedef struct EffectContext {
|
||||||
|
/* 0x0000 */ struct PlayState* play;
|
||||||
|
struct {
|
||||||
|
EffectStatus status;
|
||||||
|
EffectSpark effect;
|
||||||
|
} /* 0x0004 */ sparks[SPARK_COUNT];
|
||||||
|
struct {
|
||||||
|
EffectStatus status;
|
||||||
|
EffectBlure effect;
|
||||||
|
} /* 0x0E5C */ blures[BLURE_COUNT];
|
||||||
|
struct {
|
||||||
|
EffectStatus status;
|
||||||
|
EffectShieldParticle effect;
|
||||||
|
} /* 0x388C */ shieldParticles[SHIELD_PARTICLE_COUNT];
|
||||||
|
struct {
|
||||||
|
EffectStatus status;
|
||||||
|
EffectTireMark effect;
|
||||||
|
} /* 0x3DF0 */ tireMarks[TIRE_MARK_COUNT];
|
||||||
|
} EffectContext; // size = 0x98E0
|
||||||
|
|
||||||
EffectContext sEffectContext;
|
EffectContext sEffectContext;
|
||||||
|
|
||||||
EffectInfo sEffectInfoTable[] = {
|
typedef struct EffectInfo {
|
||||||
|
/* 0x00 */ u32 size;
|
||||||
|
/* 0x04 */ void (*init)(void* effect, void* initParams);
|
||||||
|
/* 0x08 */ void (*destroy)(void* effect);
|
||||||
|
/* 0x0C */ s32 (*update)(void* effect);
|
||||||
|
/* 0x10 */ void (*draw)(void* effect, struct GraphicsContext* gfxCtx);
|
||||||
|
} EffectInfo; // size = 0x14
|
||||||
|
|
||||||
|
EffectInfo sEffectInfoTable[EFFECT_MAX] = {
|
||||||
{
|
{
|
||||||
sizeof(EffectSpark),
|
sizeof(EffectSpark),
|
||||||
EffectSpark_Init,
|
EffectSpark_Init,
|
||||||
@ -116,7 +158,7 @@ void Effect_Init(PlayState* play) {
|
|||||||
sEffectContext.play = play;
|
sEffectContext.play = play;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Effect_Add(PlayState* play, s32* pIndex, s32 type, u8 arg3, u8 arg4, void* initParams) {
|
void Effect_Add(PlayState* play, s32* pIndex, EffectType type, u8 arg3, u8 arg4, void* initParams) {
|
||||||
u32 slotFound;
|
u32 slotFound;
|
||||||
s32 i;
|
s32 i;
|
||||||
void* effect = NULL;
|
void* effect = NULL;
|
||||||
@ -138,6 +180,7 @@ void Effect_Add(PlayState* play, s32* pIndex, s32 type, u8 arg3, u8 arg4, void*
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EFFECT_BLURE1:
|
case EFFECT_BLURE1:
|
||||||
case EFFECT_BLURE2:
|
case EFFECT_BLURE2:
|
||||||
for (i = 0; i < BLURE_COUNT; i++) {
|
for (i = 0; i < BLURE_COUNT; i++) {
|
||||||
@ -150,6 +193,7 @@ void Effect_Add(PlayState* play, s32* pIndex, s32 type, u8 arg3, u8 arg4, void*
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EFFECT_SHIELD_PARTICLE:
|
case EFFECT_SHIELD_PARTICLE:
|
||||||
for (i = 0; i < SHIELD_PARTICLE_COUNT; i++) {
|
for (i = 0; i < SHIELD_PARTICLE_COUNT; i++) {
|
||||||
if (sEffectContext.shieldParticles[i].status.active == false) {
|
if (sEffectContext.shieldParticles[i].status.active == false) {
|
||||||
@ -161,6 +205,7 @@ void Effect_Add(PlayState* play, s32* pIndex, s32 type, u8 arg3, u8 arg4, void*
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EFFECT_TIRE_MARK:
|
case EFFECT_TIRE_MARK:
|
||||||
for (i = 0; i < TIRE_MARK_COUNT; i++) {
|
for (i = 0; i < TIRE_MARK_COUNT; i++) {
|
||||||
if (sEffectContext.tireMarks[i].status.active == false) {
|
if (sEffectContext.tireMarks[i].status.active == false) {
|
||||||
@ -172,6 +217,9 @@ void Effect_Add(PlayState* play, s32* pIndex, s32 type, u8 arg3, u8 arg4, void*
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (slotFound) {
|
if (slotFound) {
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
#include "global.h"
|
#include "z64effect_ss.h"
|
||||||
|
|
||||||
|
#include "tha.h"
|
||||||
#include "loadfragment.h"
|
#include "loadfragment.h"
|
||||||
#include "z64malloc.h"
|
#include "z64malloc.h"
|
||||||
|
#include "global.h"
|
||||||
|
|
||||||
|
void EffectSS_ResetEntry(EffectSs* particle);
|
||||||
|
|
||||||
EffectSsInfo sEffectSsInfo = { NULL, 0, 0 };
|
EffectSsInfo sEffectSsInfo = { NULL, 0, 0 };
|
||||||
|
|
||||||
@ -9,11 +14,11 @@ void EffectSS_Init(PlayState* play, s32 numEntries) {
|
|||||||
EffectSs* effectsSs;
|
EffectSs* effectsSs;
|
||||||
EffectSsOverlay* overlay;
|
EffectSsOverlay* overlay;
|
||||||
|
|
||||||
sEffectSsInfo.data_table = (EffectSs*)THA_AllocTailAlign16(&play->state.tha, numEntries * sizeof(EffectSs));
|
sEffectSsInfo.dataTable = (EffectSs*)THA_AllocTailAlign16(&play->state.tha, numEntries * sizeof(EffectSs));
|
||||||
sEffectSsInfo.searchIndex = 0;
|
sEffectSsInfo.searchIndex = 0;
|
||||||
sEffectSsInfo.size = numEntries;
|
sEffectSsInfo.size = numEntries;
|
||||||
|
|
||||||
for (effectsSs = &sEffectSsInfo.data_table[0]; effectsSs < &sEffectSsInfo.data_table[sEffectSsInfo.size];
|
for (effectsSs = &sEffectSsInfo.dataTable[0]; effectsSs < &sEffectSsInfo.dataTable[sEffectSsInfo.size];
|
||||||
effectsSs++) {
|
effectsSs++) {
|
||||||
EffectSS_ResetEntry(effectsSs);
|
EffectSS_ResetEntry(effectsSs);
|
||||||
}
|
}
|
||||||
@ -31,12 +36,12 @@ void EffectSS_Clear(PlayState* play) {
|
|||||||
EffectSsOverlay* overlay;
|
EffectSsOverlay* overlay;
|
||||||
void* addr;
|
void* addr;
|
||||||
|
|
||||||
sEffectSsInfo.data_table = NULL;
|
sEffectSsInfo.dataTable = NULL;
|
||||||
sEffectSsInfo.searchIndex = 0;
|
sEffectSsInfo.searchIndex = 0;
|
||||||
sEffectSsInfo.size = 0;
|
sEffectSsInfo.size = 0;
|
||||||
|
|
||||||
//! @bug: Effects left in the table are not properly deleted, as data_table was just set to NULL and size to 0
|
//! @bug: Effects left in the table are not properly deleted, as dataTable was just set to NULL and size to 0
|
||||||
for (effectsSs = &sEffectSsInfo.data_table[0]; effectsSs < &sEffectSsInfo.data_table[sEffectSsInfo.size];
|
for (effectsSs = &sEffectSsInfo.dataTable[0]; effectsSs < &sEffectSsInfo.dataTable[sEffectSsInfo.size];
|
||||||
effectsSs++) {
|
effectsSs++) {
|
||||||
EffectSS_Delete(effectsSs);
|
EffectSS_Delete(effectsSs);
|
||||||
}
|
}
|
||||||
@ -55,7 +60,7 @@ void EffectSS_Clear(PlayState* play) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
EffectSs* EffectSS_GetTable() {
|
EffectSs* EffectSS_GetTable() {
|
||||||
return sEffectSsInfo.data_table;
|
return sEffectSsInfo.dataTable;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectSS_Delete(EffectSs* effectSs) {
|
void EffectSS_Delete(EffectSs* effectSs) {
|
||||||
@ -103,7 +108,7 @@ s32 EffectSS_FindFreeSpace(s32 priority, s32* tableEntry) {
|
|||||||
i = sEffectSsInfo.searchIndex;
|
i = sEffectSsInfo.searchIndex;
|
||||||
foundFree = false;
|
foundFree = false;
|
||||||
while (true) {
|
while (true) {
|
||||||
if (sEffectSsInfo.data_table[i].life == -1) {
|
if (sEffectSsInfo.dataTable[i].life == -1) {
|
||||||
foundFree = true;
|
foundFree = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -130,8 +135,8 @@ s32 EffectSS_FindFreeSpace(s32 priority, s32* tableEntry) {
|
|||||||
i = sEffectSsInfo.searchIndex;
|
i = sEffectSsInfo.searchIndex;
|
||||||
while (true) {
|
while (true) {
|
||||||
// Equal priority should only be considered "lower" if flag 0 is set
|
// Equal priority should only be considered "lower" if flag 0 is set
|
||||||
if ((priority <= sEffectSsInfo.data_table[i].priority) &&
|
if ((priority <= sEffectSsInfo.dataTable[i].priority) &&
|
||||||
!((priority == sEffectSsInfo.data_table[i].priority) && (sEffectSsInfo.data_table[i].flags & 1))) {
|
!((priority == sEffectSsInfo.dataTable[i].priority) && (sEffectSsInfo.dataTable[i].flags & 1))) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -157,7 +162,7 @@ void EffectSS_Copy(PlayState* play, EffectSs* effectsSs) {
|
|||||||
if (FrameAdvance_IsEnabled(&play->state) != true) {
|
if (FrameAdvance_IsEnabled(&play->state) != true) {
|
||||||
if (EffectSS_FindFreeSpace(effectsSs->priority, &index) == 0) {
|
if (EffectSS_FindFreeSpace(effectsSs->priority, &index) == 0) {
|
||||||
sEffectSsInfo.searchIndex = index + 1;
|
sEffectSsInfo.searchIndex = index + 1;
|
||||||
sEffectSsInfo.data_table[index] = *effectsSs;
|
sEffectSsInfo.dataTable[index] = *effectsSs;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -199,19 +204,19 @@ void EffectSs_Spawn(PlayState* play, s32 type, s32 priority, void* initData) {
|
|||||||
|
|
||||||
if (initInfo->init != NULL) {
|
if (initInfo->init != NULL) {
|
||||||
// Delete the previous effect in the slot, in case the slot wasn't free
|
// Delete the previous effect in the slot, in case the slot wasn't free
|
||||||
EffectSS_Delete(&sEffectSsInfo.data_table[index]);
|
EffectSS_Delete(&sEffectSsInfo.dataTable[index]);
|
||||||
|
|
||||||
sEffectSsInfo.data_table[index].type = type;
|
sEffectSsInfo.dataTable[index].type = type;
|
||||||
sEffectSsInfo.data_table[index].priority = priority;
|
sEffectSsInfo.dataTable[index].priority = priority;
|
||||||
|
|
||||||
if (initInfo->init(play, index, &sEffectSsInfo.data_table[index], initData) == 0) {
|
if (initInfo->init(play, index, &sEffectSsInfo.dataTable[index], initData) == 0) {
|
||||||
EffectSS_ResetEntry(&sEffectSsInfo.data_table[index]);
|
EffectSS_ResetEntry(&sEffectSsInfo.dataTable[index]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectSS_UpdateParticle(PlayState* play, s32 index) {
|
void EffectSS_UpdateParticle(PlayState* play, s32 index) {
|
||||||
EffectSs* particle = &sEffectSsInfo.data_table[index];
|
EffectSs* particle = &sEffectSsInfo.dataTable[index];
|
||||||
|
|
||||||
if (particle->update != NULL) {
|
if (particle->update != NULL) {
|
||||||
particle->velocity.x += particle->accel.x;
|
particle->velocity.x += particle->accel.x;
|
||||||
@ -230,22 +235,22 @@ void EffectSS_UpdateAllParticles(PlayState* play) {
|
|||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
for (i = 0; i < sEffectSsInfo.size; i++) {
|
for (i = 0; i < sEffectSsInfo.size; i++) {
|
||||||
if (sEffectSsInfo.data_table[i].life > -1) {
|
if (sEffectSsInfo.dataTable[i].life > -1) {
|
||||||
sEffectSsInfo.data_table[i].life--;
|
sEffectSsInfo.dataTable[i].life--;
|
||||||
|
|
||||||
if (sEffectSsInfo.data_table[i].life < 0) {
|
if (sEffectSsInfo.dataTable[i].life < 0) {
|
||||||
EffectSS_Delete(&sEffectSsInfo.data_table[i]);
|
EffectSS_Delete(&sEffectSsInfo.dataTable[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sEffectSsInfo.data_table[i].life > -1) {
|
if (sEffectSsInfo.dataTable[i].life > -1) {
|
||||||
EffectSS_UpdateParticle(play, i);
|
EffectSS_UpdateParticle(play, i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectSS_DrawParticle(PlayState* play, s32 index) {
|
void EffectSS_DrawParticle(PlayState* play, s32 index) {
|
||||||
EffectSs* entry = &sEffectSsInfo.data_table[index];
|
EffectSs* entry = &sEffectSsInfo.dataTable[index];
|
||||||
|
|
||||||
if (entry->draw != NULL) {
|
if (entry->draw != NULL) {
|
||||||
entry->draw(play, index, entry);
|
entry->draw(play, index, entry);
|
||||||
@ -260,14 +265,14 @@ void EffectSS_DrawAllParticles(PlayState* play) {
|
|||||||
Lights_Draw(lights, play->state.gfxCtx);
|
Lights_Draw(lights, play->state.gfxCtx);
|
||||||
|
|
||||||
for (i = 0; i < sEffectSsInfo.size; i++) {
|
for (i = 0; i < sEffectSsInfo.size; i++) {
|
||||||
if (sEffectSsInfo.data_table[i].life > -1) {
|
if (sEffectSsInfo.dataTable[i].life > -1) {
|
||||||
if ((sEffectSsInfo.data_table[i].pos.x > BGCHECK_Y_MAX) ||
|
if ((sEffectSsInfo.dataTable[i].pos.x > BGCHECK_Y_MAX) ||
|
||||||
(sEffectSsInfo.data_table[i].pos.x < BGCHECK_Y_MIN) ||
|
(sEffectSsInfo.dataTable[i].pos.x < BGCHECK_Y_MIN) ||
|
||||||
(sEffectSsInfo.data_table[i].pos.y > BGCHECK_Y_MAX) ||
|
(sEffectSsInfo.dataTable[i].pos.y > BGCHECK_Y_MAX) ||
|
||||||
(sEffectSsInfo.data_table[i].pos.y < BGCHECK_Y_MIN) ||
|
(sEffectSsInfo.dataTable[i].pos.y < BGCHECK_Y_MIN) ||
|
||||||
(sEffectSsInfo.data_table[i].pos.z > BGCHECK_Y_MAX) ||
|
(sEffectSsInfo.dataTable[i].pos.z > BGCHECK_Y_MAX) ||
|
||||||
(sEffectSsInfo.data_table[i].pos.z < BGCHECK_Y_MIN)) {
|
(sEffectSsInfo.dataTable[i].pos.z < BGCHECK_Y_MIN)) {
|
||||||
EffectSS_Delete(&sEffectSsInfo.data_table[i]);
|
EffectSS_Delete(&sEffectSsInfo.dataTable[i]);
|
||||||
} else {
|
} else {
|
||||||
EffectSS_DrawParticle(play, i);
|
EffectSS_DrawParticle(play, i);
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include "z64effect.h"
|
#include "z64effect_ss.h"
|
||||||
#include "segment_symbols.h"
|
#include "segment_symbols.h"
|
||||||
|
|
||||||
// Init Vars and linker symbol declarations (used in the table below)
|
// Init Vars and linker symbol declarations (used in the table below)
|
||||||
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
#define DEFINE_EFFECT_SS_UNSET(_enumValue) { 0 },
|
#define DEFINE_EFFECT_SS_UNSET(_enumValue) { 0 },
|
||||||
|
|
||||||
EffectSsOverlay gParticleOverlayTable[] = {
|
EffectSsOverlay gParticleOverlayTable[EFFECT_SS_MAX] = {
|
||||||
#include "tables/effect_ss_table.h"
|
#include "tables/effect_ss_table.h"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
|
#include "z64effect_ss.h"
|
||||||
|
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
|
|
||||||
#include "overlays/effects/ovl_Effect_En_Ice_Block/z_eff_en_ice_block.h"
|
#include "overlays/effects/ovl_Effect_En_Ice_Block/z_eff_en_ice_block.h"
|
||||||
#include "overlays/effects/ovl_Effect_Ss_Blast/z_eff_ss_blast.h"
|
#include "overlays/effects/ovl_Effect_Ss_Blast/z_eff_ss_blast.h"
|
||||||
#include "overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.h"
|
#include "overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.h"
|
||||||
@ -177,7 +180,7 @@ void func_800B13D8(Vec3f* srcPos, f32 randScale, Vec3f* newPos, Vec3f* velocity,
|
|||||||
s16 randAngle;
|
s16 randAngle;
|
||||||
f32 rand = Rand_ZeroOne() * randScale;
|
f32 rand = Rand_ZeroOne() * randScale;
|
||||||
|
|
||||||
randAngle = (Rand_ZeroOne() * 65536.0f);
|
randAngle = Rand_ZeroOne() * 0x10000;
|
||||||
|
|
||||||
*newPos = *srcPos;
|
*newPos = *srcPos;
|
||||||
|
|
||||||
@ -235,13 +238,13 @@ void EffectSsKirakira_SpawnDispersed(PlayState* play, Vec3f* pos, Vec3f* velocit
|
|||||||
|
|
||||||
Math_Vec3f_Copy(&initParams.pos, pos);
|
Math_Vec3f_Copy(&initParams.pos, pos);
|
||||||
Math_Vec3f_Copy(&initParams.velocity, velocity);
|
Math_Vec3f_Copy(&initParams.velocity, velocity);
|
||||||
initParams.velocity.y = ((Rand_ZeroOne() * initParams.velocity.y) + initParams.velocity.y) * 0.5f;
|
initParams.velocity.y = ((Rand_ZeroOne() * initParams.velocity.y) + initParams.velocity.y) / 2.0f;
|
||||||
Math_Vec3f_Copy(&initParams.accel, accel);
|
Math_Vec3f_Copy(&initParams.accel, accel);
|
||||||
initParams.accel.y = ((Rand_ZeroOne() * initParams.accel.y) + initParams.accel.y) * 0.5f;
|
initParams.accel.y = ((Rand_ZeroOne() * initParams.accel.y) + initParams.accel.y) / 2.0f;
|
||||||
initParams.life = life;
|
initParams.life = life;
|
||||||
initParams.updateMode = 0;
|
initParams.updateMode = 0;
|
||||||
initParams.rotSpeed = 0x1518;
|
initParams.rotSpeed = 0x1518;
|
||||||
initParams.yaw = Rand_ZeroOne() * 16384.0f;
|
initParams.yaw = Rand_ZeroOne() * 0x4000;
|
||||||
initParams.scale = scale;
|
initParams.scale = scale;
|
||||||
initParams.primColor = *primColor;
|
initParams.primColor = *primColor;
|
||||||
initParams.envColor = *envColor;
|
initParams.envColor = *envColor;
|
||||||
@ -260,7 +263,7 @@ void EffectSsKirakira_SpawnFocused(PlayState* play, Vec3f* pos, Vec3f* velocity,
|
|||||||
initParams.life = life;
|
initParams.life = life;
|
||||||
initParams.updateMode = 1;
|
initParams.updateMode = 1;
|
||||||
initParams.rotSpeed = 0x1518;
|
initParams.rotSpeed = 0x1518;
|
||||||
initParams.yaw = Rand_ZeroOne() * 16384.0f;
|
initParams.yaw = Rand_ZeroOne() * 0x4000;
|
||||||
initParams.scale = scale;
|
initParams.scale = scale;
|
||||||
Color_RGBA8_Copy(&initParams.primColor, primColor);
|
Color_RGBA8_Copy(&initParams.primColor, primColor);
|
||||||
Color_RGBA8_Copy(&initParams.envColor, envColor);
|
Color_RGBA8_Copy(&initParams.envColor, envColor);
|
||||||
|
@ -60,20 +60,64 @@ static InitChainEntry sInitChain[] = {
|
|||||||
|
|
||||||
void EnArrow_Init(Actor* thisx, PlayState* play) {
|
void EnArrow_Init(Actor* thisx, PlayState* play) {
|
||||||
static EffectBlureInit2 D_8088C234 = {
|
static EffectBlureInit2 D_8088C234 = {
|
||||||
0, 4, 0, { 0, 255, 200, 255 }, { 0, 255, 255, 255 }, { 0, 255, 200, 0 }, { 0, 255, 255, 0 }, 16,
|
0,
|
||||||
0, 1, 0, { 255, 255, 170, 255 }, { 0, 150, 0, 0 },
|
EFFECT_BLURE_ELEMENT_FLAG_4,
|
||||||
|
0,
|
||||||
|
{ 0, 255, 200, 255 },
|
||||||
|
{ 0, 255, 255, 255 },
|
||||||
|
{ 0, 255, 200, 0 },
|
||||||
|
{ 0, 255, 255, 0 },
|
||||||
|
16,
|
||||||
|
0,
|
||||||
|
EFF_BLURE_DRAW_MODE_SIMPLE_ALT_COLORS,
|
||||||
|
0,
|
||||||
|
{ 255, 255, 170, 255 },
|
||||||
|
{ 0, 150, 0, 0 },
|
||||||
};
|
};
|
||||||
static EffectBlureInit2 D_8088C258 = {
|
static EffectBlureInit2 D_8088C258 = {
|
||||||
0, 4, 0, { 0, 255, 200, 255 }, { 0, 255, 255, 255 }, { 0, 255, 200, 0 }, { 0, 255, 255, 0 }, 16,
|
0,
|
||||||
0, 1, 0, { 255, 200, 0, 255 }, { 255, 0, 0, 0 },
|
EFFECT_BLURE_ELEMENT_FLAG_4,
|
||||||
|
0,
|
||||||
|
{ 0, 255, 200, 255 },
|
||||||
|
{ 0, 255, 255, 255 },
|
||||||
|
{ 0, 255, 200, 0 },
|
||||||
|
{ 0, 255, 255, 0 },
|
||||||
|
16,
|
||||||
|
0,
|
||||||
|
EFF_BLURE_DRAW_MODE_SIMPLE_ALT_COLORS,
|
||||||
|
0,
|
||||||
|
{ 255, 200, 0, 255 },
|
||||||
|
{ 255, 0, 0, 0 },
|
||||||
};
|
};
|
||||||
static EffectBlureInit2 D_8088C27C = {
|
static EffectBlureInit2 D_8088C27C = {
|
||||||
0, 4, 0, { 0, 255, 200, 255 }, { 0, 255, 255, 255 }, { 0, 255, 200, 0 }, { 0, 255, 255, 0 }, 16,
|
0,
|
||||||
0, 1, 0, { 170, 255, 255, 255 }, { 0, 0x64, 255, 0 },
|
EFFECT_BLURE_ELEMENT_FLAG_4,
|
||||||
|
0,
|
||||||
|
{ 0, 255, 200, 255 },
|
||||||
|
{ 0, 255, 255, 255 },
|
||||||
|
{ 0, 255, 200, 0 },
|
||||||
|
{ 0, 255, 255, 0 },
|
||||||
|
16,
|
||||||
|
0,
|
||||||
|
EFF_BLURE_DRAW_MODE_SIMPLE_ALT_COLORS,
|
||||||
|
0,
|
||||||
|
{ 170, 255, 255, 255 },
|
||||||
|
{ 0, 0x64, 255, 0 },
|
||||||
};
|
};
|
||||||
static EffectBlureInit2 D_8088C2A0 = {
|
static EffectBlureInit2 D_8088C2A0 = {
|
||||||
0, 4, 0, { 0, 255, 200, 255 }, { 0, 255, 255, 255 }, { 0, 255, 200, 0 }, { 0, 255, 255, 0 }, 16,
|
0,
|
||||||
0, 1, 0, { 255, 255, 170, 255 }, { 255, 255, 0, 0 },
|
EFFECT_BLURE_ELEMENT_FLAG_4,
|
||||||
|
0,
|
||||||
|
{ 0, 255, 200, 255 },
|
||||||
|
{ 0, 255, 255, 255 },
|
||||||
|
{ 0, 255, 200, 0 },
|
||||||
|
{ 0, 255, 255, 0 },
|
||||||
|
16,
|
||||||
|
0,
|
||||||
|
EFF_BLURE_DRAW_MODE_SIMPLE_ALT_COLORS,
|
||||||
|
0,
|
||||||
|
{ 255, 255, 170, 255 },
|
||||||
|
{ 255, 255, 0, 0 },
|
||||||
};
|
};
|
||||||
EnArrow* this = THIS;
|
EnArrow* this = THIS;
|
||||||
|
|
||||||
|
@ -63,8 +63,19 @@ static InitChainEntry sInitChain[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static EffectBlureInit2 sBlureInit = {
|
static EffectBlureInit2 sBlureInit = {
|
||||||
0, 0, 0, { 250, 0, 0, 250 }, { 200, 0, 0, 130 }, { 150, 0, 0, 100 }, { 100, 0, 0, 50 }, 16,
|
0,
|
||||||
0, 0, 0, { 0, 0, 0, 0 }, { 0, 0, 0, 0 },
|
0,
|
||||||
|
0,
|
||||||
|
{ 250, 0, 0, 250 },
|
||||||
|
{ 200, 0, 0, 130 },
|
||||||
|
{ 150, 0, 0, 100 },
|
||||||
|
{ 100, 0, 0, 50 },
|
||||||
|
16,
|
||||||
|
0,
|
||||||
|
EFF_BLURE_DRAW_MODE_SIMPLE,
|
||||||
|
0,
|
||||||
|
{ 0, 0, 0, 0 },
|
||||||
|
{ 0, 0, 0, 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
void EnBomChu_Init(Actor* thisx, PlayState* play) {
|
void EnBomChu_Init(Actor* thisx, PlayState* play) {
|
||||||
|
@ -130,7 +130,7 @@ void EnBoom_Init(Actor* thisx, PlayState* play) {
|
|||||||
sp30.unkFlag = 0;
|
sp30.unkFlag = 0;
|
||||||
sp30.calcMode = 0;
|
sp30.calcMode = 0;
|
||||||
|
|
||||||
Effect_Add(play, &this->effectIndex, 1, 0, 0, &sp30);
|
Effect_Add(play, &this->effectIndex, EFFECT_BLURE1, 0, 0, &sp30);
|
||||||
|
|
||||||
Collider_InitQuad(play, &this->collider);
|
Collider_InitQuad(play, &this->collider);
|
||||||
Collider_SetQuad(play, &this->collider, &this->actor, &sQuadInit);
|
Collider_SetQuad(play, &this->collider, &this->actor, &sQuadInit);
|
||||||
|
@ -261,8 +261,19 @@ static InitChainEntry sInitChain[] = {
|
|||||||
void EnDinofos_Init(Actor* thisx, PlayState* play) {
|
void EnDinofos_Init(Actor* thisx, PlayState* play) {
|
||||||
static s32 sTexturesDesegmented = false;
|
static s32 sTexturesDesegmented = false;
|
||||||
static EffectBlureInit2 D_8089E368 = {
|
static EffectBlureInit2 D_8089E368 = {
|
||||||
0, 8, 0, { 255, 255, 255, 255 }, { 255, 255, 255, 64 }, { 255, 255, 255, 0 }, { 255, 255, 255, 0 }, 8,
|
0,
|
||||||
0, 2, 0, { 0, 0, 0, 0 }, { 0, 0, 0, 0 },
|
EFFECT_BLURE_ELEMENT_FLAG_8,
|
||||||
|
0,
|
||||||
|
{ 255, 255, 255, 255 },
|
||||||
|
{ 255, 255, 255, 64 },
|
||||||
|
{ 255, 255, 255, 0 },
|
||||||
|
{ 255, 255, 255, 0 },
|
||||||
|
8,
|
||||||
|
0,
|
||||||
|
EFF_BLURE_DRAW_MODE_SMOOTH,
|
||||||
|
0,
|
||||||
|
{ 0, 0, 0, 0 },
|
||||||
|
{ 0, 0, 0, 0 },
|
||||||
};
|
};
|
||||||
EnDinofos* this = THIS;
|
EnDinofos* this = THIS;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
@ -280,8 +280,19 @@ static InitChainEntry sInitChain[] = {
|
|||||||
|
|
||||||
void EnDodongo_Init(Actor* thisx, PlayState* play) {
|
void EnDodongo_Init(Actor* thisx, PlayState* play) {
|
||||||
static EffectBlureInit2 D_80879308 = {
|
static EffectBlureInit2 D_80879308 = {
|
||||||
2, 8, 0, { 255, 255, 255, 255 }, { 255, 255, 255, 64 }, { 255, 255, 255, 0 }, { 255, 255, 255, 0 }, 8,
|
2,
|
||||||
0, 0, 0, { 0, 0, 0, 0 }, { 0, 0, 0, 0 },
|
EFFECT_BLURE_ELEMENT_FLAG_8,
|
||||||
|
0,
|
||||||
|
{ 255, 255, 255, 255 },
|
||||||
|
{ 255, 255, 255, 64 },
|
||||||
|
{ 255, 255, 255, 0 },
|
||||||
|
{ 255, 255, 255, 0 },
|
||||||
|
8,
|
||||||
|
0,
|
||||||
|
EFF_BLURE_DRAW_MODE_SIMPLE,
|
||||||
|
0,
|
||||||
|
{ 0, 0, 0, 0 },
|
||||||
|
{ 0, 0, 0, 0 },
|
||||||
};
|
};
|
||||||
EnDodongo* this = THIS;
|
EnDodongo* this = THIS;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
@ -932,7 +932,7 @@ void EnGeg_Init(Actor* thisx, PlayState* play) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Effect_Add(play, &this->unk_4DC, 4, 0, 0, &sp34);
|
Effect_Add(play, &this->unk_4DC, EFFECT_TIRE_MARK, 0, 0, &sp34);
|
||||||
thisx->draw = NULL;
|
thisx->draw = NULL;
|
||||||
this->unk_4E0 = 100;
|
this->unk_4E0 = 100;
|
||||||
this->actor.draw = EnGeg_Draw;
|
this->actor.draw = EnGeg_Draw;
|
||||||
|
@ -1007,7 +1007,7 @@ void EnGoroiwa_Init(Actor* thisx, PlayState* play) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Effect_Add(play, &this->unk_248, 4, 0, 0, &D_80942E8C);
|
Effect_Add(play, &this->unk_248, EFFECT_TIRE_MARK, 0, 0, &D_80942E8C);
|
||||||
func_809419D0(this);
|
func_809419D0(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,8 +252,19 @@ static InitChainEntry sInitChain[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static EffectBlureInit2 sBlureInit = {
|
static EffectBlureInit2 sBlureInit = {
|
||||||
0, 8, 0, { 255, 255, 150, 200 }, { 255, 255, 255, 64 }, { 255, 255, 150, 0 }, { 255, 255, 255, 0 }, 8,
|
0,
|
||||||
0, 2, 0, { 0, 0, 0, 0 }, { 0, 0, 0, 0 },
|
EFFECT_BLURE_ELEMENT_FLAG_8,
|
||||||
|
0,
|
||||||
|
{ 255, 255, 150, 200 },
|
||||||
|
{ 255, 255, 255, 64 },
|
||||||
|
{ 255, 255, 150, 0 },
|
||||||
|
{ 255, 255, 255, 0 },
|
||||||
|
8,
|
||||||
|
0,
|
||||||
|
EFF_BLURE_DRAW_MODE_SMOOTH,
|
||||||
|
0,
|
||||||
|
{ 0, 0, 0, 0 },
|
||||||
|
{ 0, 0, 0, 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
void EnIk_Init(Actor* thisx, PlayState* play) {
|
void EnIk_Init(Actor* thisx, PlayState* play) {
|
||||||
|
@ -124,8 +124,19 @@ static InitChainEntry sInitChain[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static EffectBlureInit2 sBlureInit = {
|
static EffectBlureInit2 sBlureInit = {
|
||||||
0, 0, 0, { 250, 0, 0, 250 }, { 200, 0, 0, 130 }, { 150, 0, 0, 100 }, { 100, 0, 0, 50 }, 16,
|
0,
|
||||||
0, 0, 0, { 0, 0, 0, 0 }, { 0, 0, 0, 0 },
|
0,
|
||||||
|
0,
|
||||||
|
{ 250, 0, 0, 250 },
|
||||||
|
{ 200, 0, 0, 130 },
|
||||||
|
{ 150, 0, 0, 100 },
|
||||||
|
{ 100, 0, 0, 50 },
|
||||||
|
16,
|
||||||
|
0,
|
||||||
|
EFF_BLURE_DRAW_MODE_SIMPLE,
|
||||||
|
0,
|
||||||
|
{ 0, 0, 0, 0 },
|
||||||
|
{ 0, 0, 0, 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
static s32 sTexturesDesegmented = false;
|
static s32 sTexturesDesegmented = false;
|
||||||
|
@ -130,7 +130,7 @@ s32 EnSsh_CreateBlureEffect(PlayState* play) {
|
|||||||
s32 i;
|
s32 i;
|
||||||
s32 blureIdx;
|
s32 blureIdx;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(blureInit.p1StartColor); i++) {
|
for (i = 0; i < EFFECT_BLURE_COLOR_COUNT; i++) {
|
||||||
blureInit.p1StartColor[i] = sP1StartColor[i];
|
blureInit.p1StartColor[i] = sP1StartColor[i];
|
||||||
blureInit.p2StartColor[i] = sP2StartColor[i];
|
blureInit.p2StartColor[i] = sP2StartColor[i];
|
||||||
blureInit.p1EndColor[i] = sP1EndColor[i];
|
blureInit.p1EndColor[i] = sP1EndColor[i];
|
||||||
@ -140,7 +140,7 @@ s32 EnSsh_CreateBlureEffect(PlayState* play) {
|
|||||||
blureInit.unkFlag = false;
|
blureInit.unkFlag = false;
|
||||||
blureInit.calcMode = 3;
|
blureInit.calcMode = 3;
|
||||||
|
|
||||||
Effect_Add(play, &blureIdx, 1, 0, 0, &blureInit);
|
Effect_Add(play, &blureIdx, EFFECT_BLURE1, 0, 0, &blureInit);
|
||||||
return blureIdx;
|
return blureIdx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -237,8 +237,19 @@ static PlayerAgeProperties sAgeProperties = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static EffectBlureInit2 sBlureInit = {
|
static EffectBlureInit2 sBlureInit = {
|
||||||
0, 8, 0, { 255, 255, 255, 255 }, { 255, 255, 255, 64 }, { 255, 255, 255, 0 }, { 255, 255, 255, 0 }, 4,
|
0,
|
||||||
0, 2, 0, { 0, 0, 0, 0 }, { 0, 0, 0, 0 },
|
EFFECT_BLURE_ELEMENT_FLAG_8,
|
||||||
|
0,
|
||||||
|
{ 255, 255, 255, 255 },
|
||||||
|
{ 255, 255, 255, 64 },
|
||||||
|
{ 255, 255, 255, 0 },
|
||||||
|
{ 255, 255, 255, 0 },
|
||||||
|
4,
|
||||||
|
0,
|
||||||
|
EFF_BLURE_DRAW_MODE_SMOOTH,
|
||||||
|
0,
|
||||||
|
{ 0, 0, 0, 0 },
|
||||||
|
{ 0, 0, 0, 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
static EffectTireMarkInit sTireMarkInit = {
|
static EffectTireMarkInit sTireMarkInit = {
|
||||||
|
@ -10633,8 +10633,19 @@ PlayerInitModeFunc sPlayerInitModeFuncs[PLAYER_INITMODE_MAX] = {
|
|||||||
|
|
||||||
// sBlureInit
|
// sBlureInit
|
||||||
EffectBlureInit2 D_8085D30C = {
|
EffectBlureInit2 D_8085D30C = {
|
||||||
0, 8, 0, { 255, 255, 255, 255 }, { 255, 255, 255, 64 }, { 255, 255, 255, 0 }, { 255, 255, 255, 0 }, 4,
|
0,
|
||||||
0, 2, 0, { 0, 0, 0, 0 }, { 0, 0, 0, 0 },
|
EFFECT_BLURE_ELEMENT_FLAG_8,
|
||||||
|
0,
|
||||||
|
{ 255, 255, 255, 255 },
|
||||||
|
{ 255, 255, 255, 64 },
|
||||||
|
{ 255, 255, 255, 0 },
|
||||||
|
{ 255, 255, 255, 0 },
|
||||||
|
4,
|
||||||
|
0,
|
||||||
|
EFF_BLURE_DRAW_MODE_SMOOTH,
|
||||||
|
0,
|
||||||
|
{ 0, 0, 0, 0 },
|
||||||
|
{ 0, 0, 0, 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
// sTireMarkInit ?
|
// sTireMarkInit ?
|
||||||
|
@ -385,18 +385,12 @@
|
|||||||
0x801AE214:("D_801AE214","u8","[32]",0x20),
|
0x801AE214:("D_801AE214","u8","[32]",0x20),
|
||||||
0x801AE240:("D_801AE240","UNK_TYPE4","",0x4),
|
0x801AE240:("D_801AE240","UNK_TYPE4","",0x4),
|
||||||
0x801AE250:("D_801AE250","UNK_TYPE4","",0x4),
|
0x801AE250:("D_801AE250","UNK_TYPE4","",0x4),
|
||||||
0x801AE260:("D_801AE260","UNK_PTR","[3]",0xc),
|
0x801AE260:("sSetupHandlers","UNK_PTR","[3]",0xC),
|
||||||
0x801AE26C:("D_801AE26C","UNK_TYPE4","",0x4),
|
0x801AE26C:("D_801AE26C","Vtx","",0x40),
|
||||||
0x801AE27C:("D_801AE27C","UNK_TYPE4","",0x4),
|
0x801AE2AC:("D_801AE2AC","Vtx","",0x40),
|
||||||
0x801AE28C:("D_801AE28C","UNK_TYPE4","",0x4),
|
|
||||||
0x801AE29C:("D_801AE29C","UNK_TYPE4","",0x4),
|
|
||||||
0x801AE2AC:("D_801AE2AC","UNK_TYPE4","",0x4),
|
|
||||||
0x801AE2BC:("D_801AE2BC","UNK_TYPE4","",0x4),
|
|
||||||
0x801AE2CC:("D_801AE2CC","UNK_TYPE4","",0x4),
|
|
||||||
0x801AE2DC:("D_801AE2DC","UNK_TYPE4","",0x4),
|
|
||||||
0x801AE2F0:("sEffShieldParticleVtx","Vtx","[4]",0x40),
|
0x801AE2F0:("sEffShieldParticleVtx","Vtx","[4]",0x40),
|
||||||
0x801AE330:("sEffectInfoTable","EffectInfo","[5]",0x64),
|
0x801AE330:("sEffectInfoTable","EffectInfo","[5]",0x64),
|
||||||
0x801AE3A0:("sEffectSsInfo","EffectSsInfo","",0xc),
|
0x801AE3A0:("sEffectSsInfo","EffectSsInfo","",0xC),
|
||||||
0x801AE3B0:("D_801AE3B0","Color_RGBA8","",0x4),
|
0x801AE3B0:("D_801AE3B0","Color_RGBA8","",0x4),
|
||||||
0x801AE3B4:("D_801AE3B4","Color_RGBA8","",0x4),
|
0x801AE3B4:("D_801AE3B4","Color_RGBA8","",0x4),
|
||||||
0x801AE3B8:("D_801AE3B8","Color_RGBA8","",0x4),
|
0x801AE3B8:("D_801AE3B8","Color_RGBA8","",0x4),
|
||||||
|
Loading…
Reference in New Issue
Block a user