mirror of
https://github.com/zeldaret/ss
synced 2026-06-12 05:27:23 -04:00
rename EffectsStruct -> dEmitter_c
This commit is contained in:
+21
-21
@@ -919,16 +919,16 @@ setVolumeSize__14dEmitterBase_cFUs = .text:0x80027490; // type:function size:0x4
|
||||
setLifeTime__14dEmitterBase_cFs = .text:0x800274D0; // type:function size:0x40
|
||||
attachEmitterCallbackId__14dEmitterBase_cFl = .text:0x80027510; // type:function size:0x4C
|
||||
bindShpEmitter__14dEmitterBase_cFlb = .text:0x80027560; // type:function size:0x5C
|
||||
__ct__13EffectsStructFv = .text:0x800275C0; // type:function size:0x44
|
||||
__ct__13EffectsStructFP7dBase_c = .text:0x80027610; // type:function size:0x44
|
||||
__dt__13EffectsStructFv = .text:0x80027660; // type:function size:0x78
|
||||
remove__13EffectsStructFb = .text:0x800276E0; // type:function size:0x84
|
||||
addToActiveEmittersList__13EffectsStructFUsb = .text:0x80027770; // type:function size:0xE8
|
||||
areAllEmittersDone__13EffectsStructFv = .text:0x80027860; // type:function size:0xC8
|
||||
execute__13EffectsStructFv = .text:0x80027930; // type:function size:0x130
|
||||
getOwnerPolyAttrs__13EffectsStructFPlPl = .text:0x80027A60; // type:function size:0x44
|
||||
realizeAlpha__13EffectsStructFv = .text:0x80027AB0; // type:function size:0x6C
|
||||
setFading__13EffectsStructFUc = .text:0x80027B20; // type:function size:0x24
|
||||
__ct__10dEmitter_cFv = .text:0x800275C0; // type:function size:0x44
|
||||
__ct__10dEmitter_cFP7dBase_c = .text:0x80027610; // type:function size:0x44
|
||||
__dt__10dEmitter_cFv = .text:0x80027660; // type:function size:0x78
|
||||
remove__10dEmitter_cFb = .text:0x800276E0; // type:function size:0x84
|
||||
addToActiveEmittersList__10dEmitter_cFUsb = .text:0x80027770; // type:function size:0xE8
|
||||
areAllEmittersDone__10dEmitter_cFv = .text:0x80027860; // type:function size:0xC8
|
||||
execute__10dEmitter_cFv = .text:0x80027930; // type:function size:0x130
|
||||
getOwnerPolyAttrs__10dEmitter_cFPlPl = .text:0x80027A60; // type:function size:0x44
|
||||
realizeAlpha__10dEmitter_cFv = .text:0x80027AB0; // type:function size:0x6C
|
||||
setFading__10dEmitter_cFUc = .text:0x80027B20; // type:function size:0x24
|
||||
create__18dParticleFogProc_cFUlllP16mHeapAllocator_c = .text:0x80027B50; // type:function size:0x80
|
||||
doDraw__18dParticleFogProc_cFv = .text:0x80027BD0; // type:function size:0xD8
|
||||
draw__11dEffect2D_cFv = .text:0x80027CB0; // type:function size:0x100
|
||||
@@ -963,17 +963,17 @@ spawnEffectInternal__14dJEffManager_cFUsRC6mMtx_cPC8_GXColorPC8_GXColorll = .tex
|
||||
spawnEffect__14dJEffManager_cFUsRC7mVec3_cPC7mAng3_cPC7mVec3_cPC8_GXColorPC8_GXColorll = .text:0x800298B0; // type:function size:0x4
|
||||
spawnUIEffect__14dJEffManager_cFUsRC7mVec3_cPC7mAng3_cPC7mVec3_cPC8_GXColorPC8_GXColor = .text:0x800298C0; // type:function size:0x4C
|
||||
spawnEffect__14dJEffManager_cFUsRC6mMtx_cPC8_GXColorPC8_GXColorll = .text:0x80029910; // type:function size:0x4
|
||||
createEffect__13EffectsStructFUsRC7mVec3_cPC7mAng3_cPC7mVec3_cPC8_GXColorPC8_GXColor = .text:0x80029920; // type:function size:0x54
|
||||
createUIEffect__13EffectsStructFUsRC7mVec3_cPC7mAng3_cPC7mVec3_cPC8_GXColorPC8_GXColor = .text:0x80029980; // type:function size:0x64
|
||||
createEffect__13EffectsStructFUsRC6mMtx_cPC8_GXColorPC8_GXColor = .text:0x800299F0; // type:function size:0x20
|
||||
createContinuousEffect__13EffectsStructFUsRC7mVec3_cPC7mAng3_cPC7mVec3_cPC8_GXColorPC8_GXColor = .text:0x80029A10; // type:function size:0x54
|
||||
createContinuousUIEffect__13EffectsStructFUsRC7mVec3_cPC7mAng3_cPC7mVec3_cPC8_GXColorPC8_GXColor = .text:0x80029A70; // type:function size:0x64
|
||||
createContinuousEffect__13EffectsStructFUsRC6mMtx_cPC8_GXColorPC8_GXColor = .text:0x80029AE0; // type:function size:0x20
|
||||
startEffect__10dEmitter_cFUsRC7mVec3_cPC7mAng3_cPC7mVec3_cPC8_GXColorPC8_GXColor = .text:0x80029920; // type:function size:0x54
|
||||
startUIEffect__10dEmitter_cFUsRC7mVec3_cPC7mAng3_cPC7mVec3_cPC8_GXColorPC8_GXColor = .text:0x80029980; // type:function size:0x64
|
||||
startEffect__10dEmitter_cFUsRC6mMtx_cPC8_GXColorPC8_GXColor = .text:0x800299F0; // type:function size:0x20
|
||||
holdEffect__10dEmitter_cFUsRC7mVec3_cPC7mAng3_cPC7mVec3_cPC8_GXColorPC8_GXColor = .text:0x80029A10; // type:function size:0x54
|
||||
holdUIEffect__10dEmitter_cFUsRC7mVec3_cPC7mAng3_cPC7mVec3_cPC8_GXColorPC8_GXColor = .text:0x80029A70; // type:function size:0x64
|
||||
holdEffect__10dEmitter_cFUsRC6mMtx_cPC8_GXColorPC8_GXColor = .text:0x80029AE0; // type:function size:0x20
|
||||
createMassObjEffect__14dJEffManager_cFUsRC7mVec3_cP12dAcObjBase_cPC6mColor = .text:0x80029B00; // type:function size:0xD8
|
||||
loadColors__14dEmitterBase_cFP14JPABaseEmitterPC8_GXColorPC8_GXColorll = .text:0x80029BE0; // type:function size:0x43C
|
||||
removeFromActiveEmittersList__13EffectsStructFv = .text:0x8002A020; // type:function size:0xA4
|
||||
createEffect__13EffectsStructFbUsRC7mVec3_cPC7mAng3_cPC7mVec3_cPC8_GXColorPC8_GXColor = .text:0x8002A0D0; // type:function size:0x15C
|
||||
createEffect__13EffectsStructFbUsRC6mMtx_cPC8_GXColorPC8_GXColor = .text:0x8002A230; // type:function size:0x150
|
||||
removeFromActiveEmittersList__10dEmitter_cFv = .text:0x8002A020; // type:function size:0xA4
|
||||
setupEffect__10dEmitter_cFbUsRC7mVec3_cPC7mAng3_cPC7mVec3_cPC8_GXColorPC8_GXColor = .text:0x8002A0D0; // type:function size:0x15C
|
||||
setupEffect__10dEmitter_cFbUsRC6mMtx_cPC8_GXColorPC8_GXColor = .text:0x8002A230; // type:function size:0x150
|
||||
polyAttrsToGroundEffectIdx__14dJEffManager_cFll = .text:0x8002A380; // type:function size:0xCC
|
||||
spawnGroundEffect__14dJEffManager_cFRC7mVec3_cUcUcRC7mVec3_clff = .text:0x8002A450; // type:function size:0x1C0
|
||||
fn_8002A610 = .text:0x8002A610; // type:function size:0x678
|
||||
@@ -6363,7 +6363,7 @@ isOutAnimFinished__20LytMeterTimerPart1_cFv = .text:0x80106A80; // type:function
|
||||
isAnyFruitAnimAtFrame__20LytMeterTimerPart1_cCFf = .text:0x80106AD0; // type:function size:0x60
|
||||
incrementTearCount__20LytMeterTimerPart1_cFv = .text:0x80106B30; // type:function size:0xF4
|
||||
initColors__20LytMeterTimerPart1_cFv = .text:0x80106C30; // type:function size:0x394
|
||||
createEffect__20LytMeterTimerPart1_cFl = .text:0x80106FD0; // type:function size:0x108
|
||||
startEffect__20LytMeterTimerPart1_cFl = .text:0x80106FD0; // type:function size:0x108
|
||||
updateDropLine__20LytMeterTimerPart1_cFPQ34nw4r3lyt4Pane = .text:0x801070E0; // type:function size:0x34
|
||||
build__20LytMeterTimerPart2_cFPQ23d2d10ResAccIf_c = .text:0x80107120; // type:function size:0xD8
|
||||
remove__20LytMeterTimerPart2_cFv = .text:0x80107200; // type:function size:0x58
|
||||
@@ -29997,7 +29997,7 @@ __vt__11dEffect2D_c = .data:0x80501378; // type:object size:0x10
|
||||
__vt__18dParticleFogProc_c = .data:0x80501388; // type:object size:0x2C
|
||||
__vt__19dParticleCallback_c = .data:0x805013B8; // type:object size:0x18
|
||||
__vt__18dEmitterCallback_c = .data:0x805013D0; // type:object size:0x24
|
||||
__vt__13EffectsStruct = .data:0x805013F4; // type:object size:0xC
|
||||
__vt__10dEmitter_c = .data:0x805013F4; // type:object size:0xC
|
||||
__vt__14dEmitterBase_c = .data:0x80501400; // type:object size:0xC
|
||||
lbl_8050140C = .data:0x8050140C; // type:object size:0xB4
|
||||
lbl_805014C0 = .data:0x805014C0; // type:object size:0x28
|
||||
|
||||
@@ -117,14 +117,14 @@ private:
|
||||
/* 0x3B8 */ dBgS_ObjAcch mObjAcch;
|
||||
/* 0x768 */ dCcD_Cyl mCyl;
|
||||
/* 0x8B8 */ STATE_MGR_DECLARE(dAcItem_c);
|
||||
/* 0x8F4 */ EffectsStruct mEff_0x8F4;
|
||||
/* 0x928 */ EffectsStruct mEff_0x928;
|
||||
/* 0x95C */ EffectsStruct mEff_0x95C;
|
||||
/* 0x990 */ EffectsStruct mEff_0x990;
|
||||
/* 0x9C4 */ EffectsStruct mEff_0x9C4;
|
||||
/* 0x9F8 */ EffectsStruct mEff_0x9F8;
|
||||
/* 0xA2C */ EffectsStruct mEff_0xA2C;
|
||||
/* 0xA60 */ EffectsStruct mEff_0xA60;
|
||||
/* 0x8F4 */ dEmitter_c mEff_0x8F4;
|
||||
/* 0x928 */ dEmitter_c mEff_0x928;
|
||||
/* 0x95C */ dEmitter_c mEff_0x95C;
|
||||
/* 0x990 */ dEmitter_c mEff_0x990;
|
||||
/* 0x9C4 */ dEmitter_c mEff_0x9C4;
|
||||
/* 0x9F8 */ dEmitter_c mEff_0x9F8;
|
||||
/* 0xA2C */ dEmitter_c mEff_0xA2C;
|
||||
/* 0xA60 */ dEmitter_c mEff_0xA60;
|
||||
/* 0xA94 */ dAcRef_c<dAcOScatterSand> mCoveredSand;
|
||||
/* 0xAA0 */ dAcRef_c<dAcObjBase_c> mUnkRef;
|
||||
/* 0xAAC */ mVec3_c posCopy;
|
||||
|
||||
@@ -140,7 +140,7 @@ private:
|
||||
/* 0x9B0 */ STATE_MGR_DECLARE(dAcEsm_c);
|
||||
/* 0x9EC */ dAcRef_c<dAcBomb_c> mBombRef;
|
||||
/* 0x9F8 */ dJntCol_c mJntCol;
|
||||
/* 0xA0C */ EffectsStruct mEffArr[2];
|
||||
/* 0xA0C */ dEmitter_c mEffArr[2];
|
||||
/* 0xA74 */ TimeAreaStruct mTimeArea;
|
||||
/* 0xA80 */ mVec3_c mPosCopy1;
|
||||
/* 0xA8C */ mVec3_c mScaleTarget;
|
||||
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
/* 0x35C */ dCcD_Cps mCcCps;
|
||||
/* 0x4CC */ dCcD_Sph mCcSph;
|
||||
/* 0x61C */ cBgS_PolyInfo mPolyInfo; // ??
|
||||
/* 0x648 */ EffectsStruct mEffects;
|
||||
/* 0x648 */ dEmitter_c mEffects;
|
||||
/* 0x67C */ u32 field_0x67C;
|
||||
/* 0x680 */ u8 mSubType;
|
||||
/* 0x681 */ u8 field_0x681;
|
||||
|
||||
@@ -66,8 +66,8 @@ public:
|
||||
/* 0x9B4 */ u8 _9B4[0x9B8 - 0x9B4];
|
||||
/* 0x9B8 */ dAcBomb_c *mSelfRef;
|
||||
/* 0x9BC */ u8 _9BC[0x9D4 - 0x9BC];
|
||||
/* 0x9D4 */ EffectsStruct mEffect1;
|
||||
/* 0xA08 */ EffectsStruct mEffect2;
|
||||
/* 0x9D4 */ dEmitter_c mEffect1;
|
||||
/* 0xA08 */ dEmitter_c mEffect2;
|
||||
/* 0xA3C */ u32 field_0xA3C;
|
||||
/* 0xA40 */ u32 field_0xA40;
|
||||
/* 0xA44 */ s16 field_0xA44;
|
||||
|
||||
@@ -223,10 +223,10 @@ private:
|
||||
/* 0x08F0 */ mVec3_c field_0x8F0;
|
||||
/* 0x08FC */ dCcD_Sph mSph0;
|
||||
/* 0x0A4C */ dCcD_Sph mSph1;
|
||||
/* 0x0B9C */ EffectsStruct mEff0;
|
||||
/* 0x0BD0 */ EffectsStruct mEff1;
|
||||
/* 0x0C04 */ EffectsStruct mEff2;
|
||||
/* 0x0C38 */ EffectsStruct mEff3;
|
||||
/* 0x0B9C */ dEmitter_c mEff0;
|
||||
/* 0x0BD0 */ dEmitter_c mEff1;
|
||||
/* 0x0C04 */ dEmitter_c mEff2;
|
||||
/* 0x0C38 */ dEmitter_c mEff3;
|
||||
/* 0x0C6C */ dLytFader_c mLytFader;
|
||||
/* 0x114C */ mFader_c mFader;
|
||||
/* 0x1150 */ u8 _0x1150[0x115C - 0x1150];
|
||||
|
||||
@@ -92,7 +92,7 @@ private:
|
||||
/* 0x865 */ u8 mIsDocked;
|
||||
/* 0x868 */ s32 field_0x868;
|
||||
/* 0x86C */ u32 field_0x86C;
|
||||
/* 0x870 */ EffectsStruct mEffects[2];
|
||||
/* 0x870 */ dEmitter_c mEffects[2];
|
||||
/* 0x8D8 */ u8 field_0x8D8;
|
||||
/* 0x8D9 */ u8 field_0x8D9;
|
||||
/* 0x8DA */ u8 field_0x8DA;
|
||||
|
||||
@@ -67,7 +67,7 @@ private:
|
||||
/* 0x7B0 */ dCcD_Sph mCcSph1;
|
||||
/* 0x900 */ dCcD_Sph mCcSph2;
|
||||
/* 0xA50 */ STATE_MGR_DECLARE(dAcOFairy_c);
|
||||
/* 0xA8C */ EffectsStruct mEffects[2];
|
||||
/* 0xA8C */ dEmitter_c mEffects[2];
|
||||
/* 0xAF4 */ mVec3_c mOrigPosition; ///< The original position of the actor around which it is moving
|
||||
/* 0xB00 */ mVec3_c mSpawnPosition; ///< The (slightly randomized) spawn position
|
||||
/* 0xB0C */ u8 _0xB0C[0xB18 - 0xB0C];
|
||||
|
||||
@@ -53,7 +53,7 @@ private:
|
||||
/* 0x3D8 */ dBgW mBgW;
|
||||
/* 0x5E8 */ dCcD_Cyl mCyl;
|
||||
/* 0x738 */ STATE_MGR_DECLARE(dAcOSeatSword_c);
|
||||
/* 0x774 */ EffectsStruct mEff;
|
||||
/* 0x774 */ dEmitter_c mEff;
|
||||
/* 0x7A8 */ mMtx_c mSwordMtx;
|
||||
/* 0x7D8 */ mVec3_c mEffPos;
|
||||
/* 0x7E4 */ f32 field_0x7E4;
|
||||
|
||||
@@ -62,7 +62,7 @@ private:
|
||||
/* 0x3C2 */ s16 mPreviousTurnSpeed;
|
||||
/* 0x3C4 */ mMtx_c field_0x3C4;
|
||||
/* 0x3F4 */ mVec3_c field_0x3F4;
|
||||
/* 0x400 */ EffectsStruct mEffects;
|
||||
/* 0x400 */ dEmitter_c mEffects;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -105,7 +105,7 @@ private:
|
||||
void getLinkOffset(mVec3_c &out) const;
|
||||
|
||||
/* 0x330 */ m3d::mdlAnmChr mMdl;
|
||||
/* 0x398 */ EffectsStruct mEffects;
|
||||
/* 0x398 */ dEmitter_c mEffects;
|
||||
/* 0x3CC */ dBgW mBgWs[3];
|
||||
/* 0x9FC */ STATE_MGR_DECLARE(dAcOTowerHandD101_c);
|
||||
/* 0xA38 */ ActorEventRelated mEvent;
|
||||
|
||||
@@ -35,7 +35,7 @@ private:
|
||||
nw4r::g3d::ResFile mResFile;
|
||||
m3d::smdl_c mMdl;
|
||||
dCcD_Sph mCollision;
|
||||
EffectsStruct mEffects;
|
||||
dEmitter_c mEffects;
|
||||
m3d::anmTexSrt_c mAnm;
|
||||
mAng mStartingOffset;
|
||||
};
|
||||
|
||||
@@ -21,7 +21,7 @@ public:
|
||||
|
||||
private:
|
||||
/* 0x330 */ dCcD_Cyl mCcCyl;
|
||||
/* 0x480 */ EffectsStruct mEff;
|
||||
/* 0x480 */ dEmitter_c mEff;
|
||||
/* 0x4B4 */ ActorEventRelated mEvent;
|
||||
/* 0x504 */ mVec3_c mLinkPos;
|
||||
/* 0x510 */ u8 mExitListIdx;
|
||||
|
||||
@@ -24,7 +24,7 @@ private:
|
||||
/* 0x9C4 */ m3d::smdl_c mMdl1;
|
||||
/* 0x9E0 */ m3d::smdl_c mMdl2;
|
||||
/* 0x9FC */ m3d::anmChr_c mAnm;
|
||||
/* 0xA34 */ EffectsStruct mEffect;
|
||||
/* 0xA34 */ dEmitter_c mEffect;
|
||||
/* 0xA68 */ u8 _0xA68[0xA6C - 0xA68];
|
||||
/* 0xA6C */ dCcD_Cyl mCcCyl;
|
||||
};
|
||||
|
||||
@@ -213,8 +213,8 @@ public:
|
||||
/* 0x04 */ UI_STATE_MGR_DECLARE(lytDowsingCsr_c);
|
||||
/* 0x40 */ d2d::AnmGroups mAnm;
|
||||
/* 0x4C */ d2d::LytBase_c *mpLyt;
|
||||
/* 0x50 */ EffectsStruct mEffects1;
|
||||
/* 0x84 */ EffectsStruct mEffects2;
|
||||
/* 0x50 */ dEmitter_c mEffects1;
|
||||
/* 0x84 */ dEmitter_c mEffects2;
|
||||
/* 0xB8 */ nw4r::lyt::Pane *mpRingAllPane;
|
||||
/* 0xBC */ nw4r::lyt::Pane *mpDowsingPane;
|
||||
/* 0xC0 */ f32 field_0xC0;
|
||||
@@ -385,7 +385,7 @@ public:
|
||||
Tmp<0x17> tmp;
|
||||
};
|
||||
|
||||
/* 0x048 */ EffectsStruct mEffects;
|
||||
/* 0x048 */ dEmitter_c mEffects;
|
||||
/* 0x07C */ dEmitterCallbackCursorTrail_c mTrailCb;
|
||||
/* 0x0B0 */ mVec3_c mPositionThisFrame;
|
||||
/* 0x0BC */ mVec3_c mPositionLastFrame;
|
||||
|
||||
@@ -33,7 +33,7 @@ public:
|
||||
|
||||
private:
|
||||
/* 0x068 */ mColor field_0x68[1][3];
|
||||
/* 0x074 */ EffectsStruct mEff;
|
||||
/* 0x074 */ dEmitter_c mEff;
|
||||
/* 0x0A8 */ u8 _0xA8[0xB4 - 0xA8];
|
||||
/* 0x0B4 */ mColor field_0xB4;
|
||||
/* 0x0B8 */ u8 _0xB8[0xD0 - 0xB8];
|
||||
|
||||
@@ -288,7 +288,7 @@ private:
|
||||
/* 0x0E34 */ dLytCommonIconItem_c mItemIcons[9];
|
||||
/* 0x567C */ d2d::SubPaneList mSubpaneList;
|
||||
/* 0x5688 */ d2d::SubPaneListNode mSubpanes[9];
|
||||
/* 0x5718 */ EffectsStruct mEffects;
|
||||
/* 0x5718 */ dEmitter_c mEffects;
|
||||
|
||||
/* 0x574C */ InternalItem_e field_0x574C;
|
||||
/* 0x5750 */ InternalItem_e field_0x5750;
|
||||
|
||||
@@ -178,7 +178,7 @@ private:
|
||||
/* 0x0CB0 */ dLytCommonIconItem_c mItemIcons[8];
|
||||
/* 0x4CF0 */ d2d::SubPaneList mSubpaneList;
|
||||
/* 0x4CFC */ d2d::SubPaneListNode mSubpanes[8];
|
||||
/* 0x4D7C */ EffectsStruct mEffects[4];
|
||||
/* 0x4D7C */ dEmitter_c mEffects[4];
|
||||
/* 0x4E4C */ mAng3_c mEffectsRot[4];
|
||||
/* 0x4E64 */ s32 mSlotForEffect[4];
|
||||
/* 0x4E74 */ f32 mArrowRotation;
|
||||
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
void resetBowlNuts();
|
||||
void updateDropLine(nw4r::lyt::Pane *pane);
|
||||
|
||||
void createEffect(s32 fruitIndex);
|
||||
void startEffect(s32 fruitIndex);
|
||||
bool incrementTearCount();
|
||||
bool isAnyFruitAnimAtFrame(f32 f) const;
|
||||
|
||||
|
||||
@@ -156,8 +156,8 @@ class AttentionManager {
|
||||
/* 0xB64 */ u8 mHasTarget;
|
||||
/* 0xB65 */ u8 field_0xB65[0xB68 - 0xB65];
|
||||
/* 0xB68 */ UNKWORD field_0xB68;
|
||||
/* 0xB6C */ EffectsStruct mEffect1;
|
||||
/* 0xBA0 */ EffectsStruct mEffect2;
|
||||
/* 0xB6C */ dEmitter_c mEffect1;
|
||||
/* 0xBA0 */ dEmitter_c mEffect2;
|
||||
/* 0xBD4 */ u8 field_0xBD4;
|
||||
/* 0xBD5 */ u8 field_0xBD5;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef EFFECTS_STRUCT_H
|
||||
#define EFFECTS_STRUCT_H
|
||||
#ifndef D_EMITTER_H
|
||||
#define D_EMITTER_H
|
||||
|
||||
#include "JSystem/JParticle/JPADrawInfo.h"
|
||||
#include "JSystem/JParticle/JPAEmitter.h"
|
||||
@@ -25,7 +25,7 @@ class dEmitterBase_c;
|
||||
class dEmitterCallback_c;
|
||||
class dParticleCallback_c;
|
||||
|
||||
#include "toBeSorted/d_emmitter_resource_map.inc"
|
||||
#include "toBeSorted/d_emitter_resource_map.inc"
|
||||
|
||||
class dEmitterBase_c {
|
||||
friend class dEmitterCallback_c;
|
||||
@@ -83,22 +83,25 @@ public:
|
||||
void bindShpEmitter(s32 id, bool unused); // corresponds to setup at 8002b6b0
|
||||
};
|
||||
|
||||
// Suggested name: dEmitter_c
|
||||
class EffectsStruct : public dEmitterBase_c {
|
||||
class dEmitter_c : public dEmitterBase_c {
|
||||
public:
|
||||
enum Flags_e {
|
||||
EMITTER_0x1 = 0x1,
|
||||
EMITTER_0x2 = 0x2,
|
||||
EMITTER_0x4 = 0x4,
|
||||
/** This emitter has been newly set up. */
|
||||
EMITTER_New = 0x1,
|
||||
/** This emitter actually does something. */
|
||||
EMITTER_Active = 0x2,
|
||||
/** This emitter will stop when it's done (not held). */
|
||||
EMITTER_OneShot = 0x4,
|
||||
/** This emitter has a changing alpha value */
|
||||
EMITTER_Fading = 0x8,
|
||||
EMITTER_0x10 = 0x10,
|
||||
EMITTER_0x20 = 0x20,
|
||||
};
|
||||
|
||||
// vt at 0x1C
|
||||
EffectsStruct();
|
||||
EffectsStruct(dBase_c *);
|
||||
virtual ~EffectsStruct();
|
||||
dEmitter_c();
|
||||
dEmitter_c(dBase_c *);
|
||||
virtual ~dEmitter_c();
|
||||
|
||||
inline void init(dBase_c *owner) {
|
||||
mpOwner = owner;
|
||||
@@ -115,27 +118,25 @@ public:
|
||||
|
||||
void remove(bool bForceDeleteEmitters);
|
||||
|
||||
// TODO maybe reconsider the naming here - the observation here is that a "continous" effect
|
||||
// is typically called every frame, while the others are one-shot calls
|
||||
bool createContinuousEffect(
|
||||
bool holdEffect(
|
||||
u16 resourceId, const mVec3_c &pos, const mAng3_c *rot, const mVec3_c *scale, const GXColor *c1,
|
||||
const GXColor *c2
|
||||
);
|
||||
bool createContinuousUIEffect(
|
||||
bool holdUIEffect(
|
||||
u16 resourceId, const mVec3_c &pos, const mAng3_c *rot, const mVec3_c *scale, const GXColor *c1,
|
||||
const GXColor *c2
|
||||
);
|
||||
bool createContinuousEffect(u16 resourceId, const mMtx_c &transform, const GXColor *c1, const GXColor *c2);
|
||||
bool holdEffect(u16 resourceId, const mMtx_c &transform, const GXColor *c1, const GXColor *c2);
|
||||
|
||||
bool createEffect(
|
||||
bool startEffect(
|
||||
u16 resourceId, const mVec3_c &pos, const mAng3_c *rot, const mVec3_c *scale, const GXColor *c1,
|
||||
const GXColor *c2
|
||||
);
|
||||
bool createUIEffect(
|
||||
bool startUIEffect(
|
||||
u16 resourceId, const mVec3_c &pos, const mAng3_c *rot, const mVec3_c *scale, const GXColor *c1,
|
||||
const GXColor *c2
|
||||
);
|
||||
bool createEffect(u16 resourceId, const mMtx_c &transform, const GXColor *c1, const GXColor *c2);
|
||||
bool startEffect(u16 resourceId, const mMtx_c &transform, const GXColor *c1, const GXColor *c2);
|
||||
|
||||
bool hasEmitters() const {
|
||||
return mpEmitterHead != 0;
|
||||
@@ -162,18 +163,18 @@ public:
|
||||
|
||||
protected:
|
||||
bool canReuse(u16 resourceId) const {
|
||||
return hasEmitters() && !checkFlag(EMITTER_0x2) && mEffect == resourceId;
|
||||
return hasEmitters() && !checkFlag(EMITTER_Active) && mEffect == resourceId;
|
||||
}
|
||||
|
||||
bool createEffect(
|
||||
bool bFlags, u16 resourceId, const mVec3_c &pos, const mAng3_c *rot, const mVec3_c *scale, const GXColor *c1,
|
||||
bool setupEffect(
|
||||
bool create, u16 resourceId, const mVec3_c &pos, const mAng3_c *rot, const mVec3_c *scale, const GXColor *c1,
|
||||
const GXColor *c2
|
||||
);
|
||||
bool createEffect(bool bFlags, u16 resourceId, const mMtx_c &transform, const GXColor *c1, const GXColor *c2);
|
||||
bool setupEffect(bool create, u16 resourceId, const mMtx_c &transform, const GXColor *c1, const GXColor *c2);
|
||||
bool getOwnerPolyAttrs(s32 *pOut1, s32 *pOut2);
|
||||
|
||||
public:
|
||||
/* 0x24 */ TListNode<EffectsStruct> mNode;
|
||||
/* 0x24 */ TListNode<dEmitter_c> mNode;
|
||||
|
||||
protected:
|
||||
/* 0x28 */ dBase_c *mpOwner;
|
||||
@@ -191,7 +192,7 @@ private:
|
||||
/* 0x04 */ f32 mHeight;
|
||||
/* 0x08 */ f32 mDepth;
|
||||
/* 0x0C */ f32 mScale;
|
||||
/* 0x10 */ EffectsStruct mEff;
|
||||
/* 0x10 */ dEmitter_c mEff;
|
||||
|
||||
dAcObjBase_c *getActor() const {
|
||||
return static_cast<dAcObjBase_c *>(mEff.getOwner());
|
||||
@@ -493,7 +494,7 @@ public:
|
||||
BWallF210,
|
||||
};
|
||||
|
||||
typedef TList<EffectsStruct, offsetof(EffectsStruct, mNode)> EffectsList;
|
||||
typedef TList<dEmitter_c, offsetof(dEmitter_c, mNode)> EffectsList;
|
||||
static EffectsList sPlayingEffectsList;
|
||||
static CommonEmitterCallback sCommonEmitterCallbacks[2];
|
||||
static dShpEmitter_c sShpEmitters[47];
|
||||
|
||||
@@ -1334,7 +1334,7 @@ void dAcEsm_c::fn_187_61B0(u8 param0) {
|
||||
MTXScale(mtx_scale, mScaleTarget.x, mScaleTarget.y, mScaleTarget.z);
|
||||
mtx_trans += mtx_scale;
|
||||
|
||||
if (mEffArr[0].createEffect(sEmitterResArr[3], mtx_trans, &clr1, &clr2)) {
|
||||
if (mEffArr[0].startEffect(sEmitterResArr[3], mtx_trans, &clr1, &clr2)) {
|
||||
if (checkSize(SM_LARGE)) {
|
||||
mEffArr[0].setRate(12.0f);
|
||||
scale.set(1.7f, 1.7f, 1.7f);
|
||||
|
||||
@@ -190,7 +190,7 @@ int dAcODungeonShip_c::actorExecute() {
|
||||
mAnmMatClr.play();
|
||||
mMdl.calc(false);
|
||||
if (field_0x8D8) {
|
||||
mEffects[0].createContinuousEffect(
|
||||
mEffects[0].holdEffect(
|
||||
PARTICLE_RESOURCE_ID_MAPPING_682_, mPosition, &mRotation, nullptr, nullptr, nullptr
|
||||
);
|
||||
}
|
||||
@@ -201,7 +201,7 @@ int dAcODungeonShip_c::actorExecute() {
|
||||
if (mEffects[1].hasEmitters()) {
|
||||
mEffects[1].setTransform(tmpMtx);
|
||||
} else if (field_0x8DA == 0) {
|
||||
mEffects[1].createEffect(PARTICLE_RESOURCE_ID_MAPPING_683_, tmpMtx, nullptr, nullptr);
|
||||
mEffects[1].startEffect(PARTICLE_RESOURCE_ID_MAPPING_683_, tmpMtx, nullptr, nullptr);
|
||||
field_0x8DA = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -228,7 +228,7 @@ void dAcOSeatSword_c::actorExecuteCommon() {
|
||||
mEffPos += player->mPosition;
|
||||
mEffPos.y = mPosition.y;
|
||||
|
||||
mEff.createContinuousEffect(PARTICLE_RESOURCE_ID_MAPPING_76_, mEffPos, &mRotation, &mScale, nullptr, nullptr);
|
||||
mEff.holdEffect(PARTICLE_RESOURCE_ID_MAPPING_76_, mEffPos, &mRotation, &mScale, nullptr, nullptr);
|
||||
mEff.setGlobalAlpha(field_0x7E4);
|
||||
}
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@ void dAcOTowerGearD101_c::initTransform() {
|
||||
}
|
||||
|
||||
void dAcOTowerGearD101_c::playVisualEffect() {
|
||||
mEffects.createContinuousEffect(
|
||||
mEffects.holdEffect(
|
||||
PARTICLE_RESOURCE_ID_MAPPING_572_, field_0x3F4, &mRotation, nullptr, nullptr, nullptr
|
||||
);
|
||||
}
|
||||
|
||||
@@ -597,7 +597,7 @@ void dAcOTowerHandD101_c::finalizeState_RemainOpen() {}
|
||||
void dAcOTowerHandD101_c::initializeState_Close() {
|
||||
mMdl.getAnm().setPlayState(m3d::PLAY_MODE_1);
|
||||
mMdl.setRate(getCloseRate());
|
||||
mEffects.createEffect(PARTICLE_RESOURCE_ID_MAPPING_573_, mPosition, nullptr, nullptr, nullptr, nullptr);
|
||||
mEffects.startEffect(PARTICLE_RESOURCE_ID_MAPPING_573_, mPosition, nullptr, nullptr, nullptr, nullptr);
|
||||
startSound(SE_TowerHa_CLENCH);
|
||||
}
|
||||
void dAcOTowerHandD101_c::executeState_Close() {
|
||||
|
||||
@@ -72,7 +72,7 @@ int dAcOtriforce_c::actorExecute() {
|
||||
PSMTXConcat(mWorldMtx.m, m, mWorldMtx.m);
|
||||
mMdl.setLocalMtx(mWorldMtx);
|
||||
mAnm.play();
|
||||
mEffects.createContinuousEffect(PARTICLE_RESOURCE_ID_MAPPING_967_, mWorldMtx, nullptr, nullptr);
|
||||
mEffects.holdEffect(PARTICLE_RESOURCE_ID_MAPPING_967_, mWorldMtx, nullptr, nullptr);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ int dAcOwarpHole_c::actorExecute() {
|
||||
|
||||
dCcS::GetInstance()->Set(&mCcCyl);
|
||||
updateMatrix();
|
||||
mEff.createContinuousEffect(PARTICLE_RESOURCE_ID_MAPPING_914_, mWorldMtx, nullptr, nullptr);
|
||||
mEff.holdEffect(PARTICLE_RESOURCE_ID_MAPPING_914_, mWorldMtx, nullptr, nullptr);
|
||||
holdSound(SE_WarpH_Wait);
|
||||
|
||||
return SUCCEEDED;
|
||||
@@ -70,7 +70,7 @@ inline static void vecCylCalc(mVec3_c &target, const mAng &rot, f32 factor) {
|
||||
}
|
||||
|
||||
int dAcOwarpHole_c::actorExecuteInEvent() {
|
||||
mEff.createContinuousEffect(PARTICLE_RESOURCE_ID_MAPPING_914_, mWorldMtx, nullptr, nullptr);
|
||||
mEff.holdEffect(PARTICLE_RESOURCE_ID_MAPPING_914_, mWorldMtx, nullptr, nullptr);
|
||||
holdSound(SE_WarpH_Wait);
|
||||
int retVal = NOT_READY;
|
||||
bool advance = mEvent.isAdvance();
|
||||
|
||||
@@ -532,7 +532,7 @@ int dAcBoomerang_c::actorExecute() {
|
||||
mPositionCopy3 = mPositionCopy2;
|
||||
|
||||
if (checkField_0x8CC(FLAG_WING_EFFECT_ACTIVE)) {
|
||||
mEff0.createContinuousEffect(PARTICLE_RESOURCE_ID_MAPPING_6_, mWorldMtx, nullptr, nullptr);
|
||||
mEff0.holdEffect(PARTICLE_RESOURCE_ID_MAPPING_6_, mWorldMtx, nullptr, nullptr);
|
||||
mEff1.setTransform(mWorldMtx);
|
||||
|
||||
f32 ang = field_0x8E4.angle(mVelocity);
|
||||
@@ -544,7 +544,7 @@ int dAcBoomerang_c::actorExecute() {
|
||||
}
|
||||
|
||||
if (field_0x8B1 == 0 && (mStateMgr.isState(StateID_Move) || mStateMgr.isState(StateID_MoveCancelWait))) {
|
||||
mEff2.createContinuousEffect(
|
||||
mEff2.holdEffect(
|
||||
PARTICLE_RESOURCE_ID_MAPPING_5_, player->getPosition(), nullptr, nullptr, nullptr, nullptr
|
||||
);
|
||||
} else {
|
||||
@@ -553,7 +553,7 @@ int dAcBoomerang_c::actorExecute() {
|
||||
|
||||
if (checkField_0x8CC(FLAG_0x20) && !checkField_0x8CC(FLAG_CANCEL)) {
|
||||
if (mStateMgr.isState(StateID_Move) || mStateMgr.isState(StateID_MoveCancelWait)) {
|
||||
mEff3.createContinuousEffect(PARTICLE_RESOURCE_ID_MAPPING_7_, mWorldMtx, nullptr, nullptr);
|
||||
mEff3.holdEffect(PARTICLE_RESOURCE_ID_MAPPING_7_, mWorldMtx, nullptr, nullptr);
|
||||
holdSound(SE_BE_HIT_LEAVES_LV);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -213,7 +213,7 @@ int dAcOFairy_c::actorExecute() {
|
||||
}
|
||||
|
||||
if (!field_0xB89) {
|
||||
mEffects[0].createContinuousEffect(
|
||||
mEffects[0].holdEffect(
|
||||
PARTICLE_RESOURCE_ID_MAPPING_331_, mPosition, nullptr, nullptr, nullptr, nullptr
|
||||
);
|
||||
if (!isCuring() && !dAcPy_c::GetLink()->checkActionFlagsCont(0x400000)) {
|
||||
@@ -240,7 +240,7 @@ int dAcOFairy_c::actorExecute() {
|
||||
}
|
||||
|
||||
if (isCuring() && !field_0xB89) {
|
||||
mEffects[1].createContinuousEffect(
|
||||
mEffects[1].holdEffect(
|
||||
PARTICLE_RESOURCE_ID_MAPPING_327_, mPosition, nullptr, nullptr, nullptr, nullptr
|
||||
);
|
||||
}
|
||||
|
||||
+3
-3
@@ -633,7 +633,7 @@ bool dCsGame_c::lytItemCursor_c::execute() {
|
||||
f32 sqDist = mPositionThisFrame.squareDistance(mPositionLastFrame);
|
||||
if (sqDist > sHio.field_0x34 * sHio.field_0x34 ||
|
||||
(mEffects.hasEmitters() && sqDist > sHio.field_0x38 * sHio.field_0x38)) {
|
||||
mEffects.createContinuousUIEffect(
|
||||
mEffects.holdUIEffect(
|
||||
PARTICLE_RESOURCE_ID_MAPPING_31_, mPositionThisFrame, nullptr, nullptr, nullptr, nullptr
|
||||
);
|
||||
}
|
||||
@@ -770,10 +770,10 @@ void dCsGame_c::lytItemCursor_c::lytDowsingCsr_c::updateEffects() {
|
||||
mVec2_c csPos = dPad::getDpdPosScreen();
|
||||
mVec3_c effectPos(csPos.x, csPos.y, 0.0f);
|
||||
mVec3_c effectScale(sHio.field_0x3C, sHio.field_0x3C, 1.0f);
|
||||
mEffects1.createContinuousUIEffect(
|
||||
mEffects1.holdUIEffect(
|
||||
PARTICLE_RESOURCE_ID_MAPPING_725_, mVec3_c::Zero, nullptr, nullptr, nullptr, nullptr
|
||||
);
|
||||
mEffects2.createContinuousUIEffect(
|
||||
mEffects2.holdUIEffect(
|
||||
PARTICLE_RESOURCE_ID_MAPPING_726_, effectPos, &mAng3_c::Zero, &effectScale, nullptr, nullptr
|
||||
);
|
||||
mEffects1.setGlobalAlpha(alpha);
|
||||
|
||||
@@ -2245,7 +2245,7 @@ void dLytMeterItemSelect_c::fn_800EF580() {
|
||||
nw4r::math::MTX34 mtx = mpPanes[11]->GetGlobalMtx();
|
||||
mVec3_c pos(mtx._03, mtx._13, 0.0f);
|
||||
mVec3_c scale(mEffectScale, mEffectScale, mEffectScale);
|
||||
mEffects.createContinuousUIEffect(PARTICLE_RESOURCE_ID_MAPPING_717_, pos, nullptr, &scale, nullptr, nullptr);
|
||||
mEffects.holdUIEffect(PARTICLE_RESOURCE_ID_MAPPING_717_, pos, nullptr, &scale, nullptr, nullptr);
|
||||
|
||||
if (field_0x57C0 != 0) {
|
||||
mEffects.stopDrawParticles();
|
||||
|
||||
@@ -627,7 +627,7 @@ void dLytMeterMinusBtn_c::initializeState_DemoMove() {
|
||||
nw4r::math::MTX34 mtx = mpPanes[i + MINUS_BTN_PANE_ITEM_OFFSET]->GetGlobalMtx();
|
||||
mVec3_c pos(mtx._03, mtx._13, 0.0f);
|
||||
mSlotForEffect[numPlayingEffects] = i;
|
||||
mEffects[numPlayingEffects].createUIEffect(
|
||||
mEffects[numPlayingEffects].startUIEffect(
|
||||
PARTICLE_RESOURCE_ID_MAPPING_971_, pos, &mEffectsRot[numPlayingEffects], nullptr, nullptr, nullptr
|
||||
);
|
||||
numPlayingEffects++;
|
||||
@@ -666,7 +666,7 @@ void dLytMeterMinusBtn_c::executeState_DemoMove() {
|
||||
nw4r::math::MTX34 mtx = getPaneByIndex(mSlotToDemo + MINUS_BTN_PANE_ITEM_OFFSET)->GetGlobalMtx();
|
||||
mVec3_c pos(mtx._03, mtx._13, 0.0f);
|
||||
mSlotForEffect[0] = mSlotToDemo;
|
||||
mEffects[0].createUIEffect(
|
||||
mEffects[0].startUIEffect(
|
||||
PARTICLE_RESOURCE_ID_MAPPING_971_, pos, &mEffectsRot[0], nullptr, nullptr, nullptr
|
||||
);
|
||||
}
|
||||
@@ -825,7 +825,7 @@ bool dLytMeterMinusBtn_c::remove() {
|
||||
mAnm[i].remove();
|
||||
}
|
||||
|
||||
// Not removing our EffectsStructs I guess?
|
||||
// Not removing our emitters I guess?
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -327,7 +327,7 @@ bool LytMeterTimerPart1_c::incrementTearCount() {
|
||||
if (mDisplayedTearCount < mActualTearCount && dLytDropLine_c::finishPartMaybe()) {
|
||||
startNextFruitAnim();
|
||||
if (!dLytMeter_c::getfn_800C9FE0()) {
|
||||
createEffect(mActualTearCount - 1);
|
||||
startEffect(mActualTearCount - 1);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_SIREN_SHIZUKU_GET_IN);
|
||||
}
|
||||
|
||||
@@ -382,7 +382,7 @@ void LytMeterTimerPart1_c::initColors() {
|
||||
}
|
||||
}
|
||||
|
||||
void LytMeterTimerPart1_c::createEffect(s32 fruitIndex) {
|
||||
void LytMeterTimerPart1_c::startEffect(s32 fruitIndex) {
|
||||
nw4r::math::MTX34 mtx = mpPanes[fruitIndex]->GetGlobalMtx();
|
||||
mVec3_c pos;
|
||||
pos.x = mtx._03;
|
||||
@@ -1243,7 +1243,7 @@ void dLytMeterTimer_c::executeState_ChangeFruits() {
|
||||
if (mpPart1->getField0x780() < TIMER_01_NUM_TEARS) {
|
||||
mpPart1->updateDropLine(mpPart2->i_getPane());
|
||||
mpPart1->startFruitAnim(fruit);
|
||||
mpPart1->createEffect(fruit);
|
||||
mpPart1->startEffect(fruit);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1458,7 +1458,7 @@ void dLytMeterTimer_c::gotoChangeFruits6() {
|
||||
mpPart1->resetBowlNuts();
|
||||
mpPart1->updateDropLine(mpPart2->i_getPane());
|
||||
mpPart1->startFruitAnim(mpPart1->getField0x780());
|
||||
mpPart1->createEffect(mpPart1->getField0x780());
|
||||
mpPart1->startEffect(mpPart1->getField0x780());
|
||||
field_0x54 = false;
|
||||
field_0x56 = 6;
|
||||
mStateMgr.changeState(StateID_ChangeFruits);
|
||||
@@ -1506,7 +1506,7 @@ void dLytMeterTimer_c::doPickup() {
|
||||
mpPart1->resetBowlNuts();
|
||||
mpPart1->updateDropLine(mpPart2->i_getPane());
|
||||
mpPart1->startFruitAnim(mpPart1->getField0x780());
|
||||
mpPart1->createEffect(mpPart1->getField0x780());
|
||||
mpPart1->startEffect(mpPart1->getField0x780());
|
||||
field_0x56 = 6;
|
||||
}
|
||||
|
||||
|
||||
@@ -316,17 +316,17 @@ void dEmitterBase_c::bindShpEmitter(s32 id, bool unused) {
|
||||
}
|
||||
}
|
||||
|
||||
EffectsStruct::EffectsStruct() : mpOwner(nullptr), mFlags(0), mEffect(0) {}
|
||||
dEmitter_c::dEmitter_c() : mpOwner(nullptr), mFlags(0), mEffect(0) {}
|
||||
|
||||
EffectsStruct::EffectsStruct(dBase_c *base) : mpOwner(base), mFlags(0), mEffect(0) {}
|
||||
dEmitter_c::dEmitter_c(dBase_c *base) : mpOwner(base), mFlags(0), mEffect(0) {}
|
||||
|
||||
EffectsStruct::~EffectsStruct() {
|
||||
dEmitter_c::~dEmitter_c() {
|
||||
mpOwner = nullptr;
|
||||
remove(false);
|
||||
}
|
||||
|
||||
void EffectsStruct::remove(bool bForceDeleteEmitters) {
|
||||
offFlag(EMITTER_0x1);
|
||||
void dEmitter_c::remove(bool bForceDeleteEmitters) {
|
||||
offFlag(EMITTER_New);
|
||||
JPABaseEmitter *emitter = bForceDeleteEmitters ? mpEmitterHead : nullptr;
|
||||
deactivateEmitters();
|
||||
for (; emitter != nullptr; emitter = GetNextEmitter(emitter)) {
|
||||
@@ -335,21 +335,21 @@ void EffectsStruct::remove(bool bForceDeleteEmitters) {
|
||||
removeFromActiveEmittersList();
|
||||
}
|
||||
|
||||
void EffectsStruct::addToActiveEmittersList(u16 resourceId, bool bFlags) {
|
||||
void dEmitter_c::addToActiveEmittersList(u16 resourceId, bool create) {
|
||||
mEffect = resourceId;
|
||||
mFlags = 0;
|
||||
setImmortal();
|
||||
dJEffManager_c::sPlayingEffectsList.append(this);
|
||||
onFlag(EMITTER_0x1);
|
||||
if (bFlags) {
|
||||
onFlag(EMITTER_0x4);
|
||||
onFlag(EMITTER_New);
|
||||
if (create) {
|
||||
onFlag(EMITTER_OneShot);
|
||||
}
|
||||
if (dParticle::mgr_c::GetInstance()->getResUserWork(resourceId) & 0x4000) {
|
||||
onFlag(EMITTER_0x10);
|
||||
}
|
||||
}
|
||||
|
||||
bool EffectsStruct::areAllEmittersDone() {
|
||||
bool dEmitter_c::areAllEmittersDone() {
|
||||
bool allDone = true;
|
||||
|
||||
if (mpEmitterHead != nullptr) {
|
||||
@@ -370,7 +370,7 @@ bool EffectsStruct::areAllEmittersDone() {
|
||||
return allDone;
|
||||
}
|
||||
|
||||
void EffectsStruct::execute() {
|
||||
void dEmitter_c::execute() {
|
||||
if (mpOwner != nullptr && (mpOwner->mDeleteRequest || mpOwner->mLifecycleState == fBase_c::TO_BE_DELETED)) {
|
||||
mpOwner = nullptr;
|
||||
}
|
||||
@@ -389,7 +389,7 @@ void EffectsStruct::execute() {
|
||||
}
|
||||
}
|
||||
}
|
||||
onFlag(EMITTER_0x1);
|
||||
onFlag(EMITTER_New);
|
||||
} else {
|
||||
playCalcEmitters();
|
||||
if (checkFlag(EMITTER_0x20)) {
|
||||
@@ -402,7 +402,7 @@ void EffectsStruct::execute() {
|
||||
}
|
||||
}
|
||||
|
||||
bool EffectsStruct::getOwnerPolyAttrs(s32 *pOut1, s32 *pOut2) {
|
||||
bool dEmitter_c::getOwnerPolyAttrs(s32 *pOut1, s32 *pOut2) {
|
||||
if (mpOwner != nullptr && mpOwner->mGroupType == fBase_c::ACTOR) {
|
||||
dAcBase_c *actor = static_cast<dAcBase_c *>(mpOwner);
|
||||
*pOut1 = actor->mPolyAttr0;
|
||||
@@ -415,11 +415,11 @@ bool EffectsStruct::getOwnerPolyAttrs(s32 *pOut1, s32 *pOut2) {
|
||||
}
|
||||
}
|
||||
|
||||
void EffectsStruct::realizeAlpha() {
|
||||
void dEmitter_c::realizeAlpha() {
|
||||
setGlobalAlpha(mFadeTimer * (255.0f / mFadeDuration));
|
||||
}
|
||||
|
||||
void EffectsStruct::setFading(u8 lifetime) {
|
||||
void dEmitter_c::setFading(u8 lifetime) {
|
||||
if (!checkFlag(EMITTER_Fading)) {
|
||||
mFadeTimer = lifetime;
|
||||
onFlag(EMITTER_Fading);
|
||||
@@ -456,7 +456,6 @@ void dParticleFogProc_c::doDraw() {
|
||||
dJEffManager_c::draw(&info, mIdx);
|
||||
}
|
||||
|
||||
extern "C" bool fn_80054AD0();
|
||||
void dEffect2D_c::draw() {
|
||||
f32 proj[GX_PROJECTION_SZ];
|
||||
GXGetProjectionv(proj);
|
||||
@@ -470,7 +469,7 @@ void dEffect2D_c::draw() {
|
||||
|
||||
C_MTXLightOrtho(mtx1, -h, h, -f, f, 0.5f, 0.5f, 0.5f, 0.5f);
|
||||
|
||||
MTXScale(mtx2, fn_80054AD0() ? dGfx_c::get16x9to4x3WidthScaleF() : 1.0f, 1.0f, 1.0f);
|
||||
MTXScale(mtx2, dGfx_c::isTvMode4To3() ? dGfx_c::get16x9to4x3WidthScaleF() : 1.0f, 1.0f, 1.0f);
|
||||
MTXCopy(mtx2, info.mCamMtx);
|
||||
MTXCopy(mtx1, info.mPrjMtx);
|
||||
dJEffManager_c::draw(&info, mGroupId);
|
||||
@@ -831,16 +830,18 @@ void dJEffManager_c::execute() {
|
||||
EffectsList::Iterator itNext = it;
|
||||
++itNext;
|
||||
it->execute();
|
||||
if (it->checkFlag(EffectsStruct::EMITTER_Fading)) {
|
||||
if (it->checkFlag(dEmitter_c::EMITTER_Fading)) {
|
||||
it->realizeAlpha();
|
||||
}
|
||||
if (it->checkFlag(EffectsStruct::EMITTER_0x1)) {
|
||||
it->offFlag(EffectsStruct::EMITTER_0x1);
|
||||
if (it->checkFlag(dEmitter_c::EMITTER_New)) {
|
||||
// Make sure we don't remove an emitter that didn't even
|
||||
// have a chance to spawn anything yet..
|
||||
it->offFlag(dEmitter_c::EMITTER_New);
|
||||
} else {
|
||||
if (it->areAllEmittersDone()) {
|
||||
it->remove(false);
|
||||
} else {
|
||||
it->onFlag(EffectsStruct::EMITTER_0x2);
|
||||
it->onFlag(dEmitter_c::EMITTER_Active);
|
||||
}
|
||||
}
|
||||
it = itNext;
|
||||
@@ -972,40 +973,40 @@ dEmitterBase_c *dJEffManager_c::spawnEffect(
|
||||
return spawnEffectInternal(effectResourceId, transform, c1, c2, idx1, idx2);
|
||||
}
|
||||
|
||||
bool EffectsStruct::createEffect(
|
||||
bool dEmitter_c::startEffect(
|
||||
u16 resourceId, const mVec3_c &pos, const mAng3_c *rot, const mVec3_c *scale, const GXColor *c1, const GXColor *c2
|
||||
) {
|
||||
return createEffect(true, resourceId, pos, rot, scale, c1, c2);
|
||||
return setupEffect(true, resourceId, pos, rot, scale, c1, c2);
|
||||
}
|
||||
|
||||
bool EffectsStruct::createUIEffect(
|
||||
bool dEmitter_c::startUIEffect(
|
||||
u16 resourceId, const mVec3_c &pos, const mAng3_c *rot, const mVec3_c *scale, const GXColor *c1, const GXColor *c2
|
||||
) {
|
||||
mVec3_c adjustedPosition(pos.x * dGfx_c::getCurrentScreenTo4x3WidthScaleF(), pos.y, pos.z);
|
||||
return createEffect(true, resourceId, adjustedPosition, rot, scale, c1, c2);
|
||||
return setupEffect(true, resourceId, adjustedPosition, rot, scale, c1, c2);
|
||||
}
|
||||
|
||||
bool EffectsStruct::createEffect(u16 resourceId, const mMtx_c &transform, const GXColor *c1, const GXColor *c2) {
|
||||
return createEffect(true, resourceId, transform, c1, c2);
|
||||
bool dEmitter_c::startEffect(u16 resourceId, const mMtx_c &transform, const GXColor *c1, const GXColor *c2) {
|
||||
return setupEffect(true, resourceId, transform, c1, c2);
|
||||
}
|
||||
|
||||
bool EffectsStruct::createContinuousEffect(
|
||||
bool dEmitter_c::holdEffect(
|
||||
u16 resourceId, const mVec3_c &pos, const mAng3_c *rot, const mVec3_c *scale, const GXColor *c1, const GXColor *c2
|
||||
) {
|
||||
return createEffect(false, resourceId, pos, rot, scale, c1, c2);
|
||||
return setupEffect(false, resourceId, pos, rot, scale, c1, c2);
|
||||
}
|
||||
|
||||
bool EffectsStruct::createContinuousUIEffect(
|
||||
bool dEmitter_c::holdUIEffect(
|
||||
u16 resourceId, const mVec3_c &pos, const mAng3_c *rot, const mVec3_c *scale, const GXColor *c1, const GXColor *c2
|
||||
) {
|
||||
mVec3_c adjustedPosition(pos.x * dGfx_c::getCurrentScreenTo4x3WidthScaleF(), pos.y, pos.z);
|
||||
return createEffect(false, resourceId, adjustedPosition, rot, scale, c1, c2);
|
||||
return setupEffect(false, resourceId, adjustedPosition, rot, scale, c1, c2);
|
||||
}
|
||||
|
||||
bool EffectsStruct::createContinuousEffect(
|
||||
bool dEmitter_c::holdEffect(
|
||||
u16 resourceId, const mMtx_c &transform, const GXColor *c1, const GXColor *c2
|
||||
) {
|
||||
return createEffect(false, resourceId, transform, c1, c2);
|
||||
return setupEffect(false, resourceId, transform, c1, c2);
|
||||
}
|
||||
|
||||
bool dJEffManager_c::createMassObjEffect(
|
||||
@@ -1128,52 +1129,52 @@ void dEmitterBase_c::loadColors(
|
||||
emitter->setGlobalEnvColor(r, g, b);
|
||||
}
|
||||
|
||||
void EffectsStruct::removeFromActiveEmittersList() {
|
||||
void dEmitter_c::removeFromActiveEmittersList() {
|
||||
if (dJEffManager_c::sPlayingEffectsList.GetPosition(this) != dJEffManager_c::sPlayingEffectsList.GetEndIter()) {
|
||||
dJEffManager_c::sPlayingEffectsList.remove(this);
|
||||
}
|
||||
}
|
||||
|
||||
bool EffectsStruct::createEffect(
|
||||
bool bFlags, u16 resourceId, const mVec3_c &pos, const mAng3_c *rot, const mVec3_c *scale, const GXColor *c1,
|
||||
bool dEmitter_c::setupEffect(
|
||||
bool create, u16 resourceId, const mVec3_c &pos, const mAng3_c *rot, const mVec3_c *scale, const GXColor *c1,
|
||||
const GXColor *c2
|
||||
) {
|
||||
if (!bFlags && canReuse(resourceId)) {
|
||||
if (!create && canReuse(resourceId)) {
|
||||
setPosRotScale(pos, rot, scale);
|
||||
s32 idx1 = 0;
|
||||
s32 idx2 = 0;
|
||||
getOwnerPolyAttrs(&idx1, &idx2);
|
||||
loadColors(c1, c2, idx1, idx2);
|
||||
onFlag(EMITTER_0x1);
|
||||
onFlag(EMITTER_New);
|
||||
} else {
|
||||
remove(false);
|
||||
s32 idx1 = 0;
|
||||
s32 idx2 = 0;
|
||||
getOwnerPolyAttrs(&idx1, &idx2);
|
||||
if (createEmitters(resourceId, pos, rot, scale, c1, c2, idx1, idx2)) {
|
||||
addToActiveEmittersList(resourceId, bFlags);
|
||||
addToActiveEmittersList(resourceId, create);
|
||||
}
|
||||
}
|
||||
|
||||
return hasEmitters();
|
||||
}
|
||||
|
||||
bool EffectsStruct::createEffect(
|
||||
bool bFlags, u16 resourceId, const mMtx_c &transform, const GXColor *c1, const GXColor *c2
|
||||
bool dEmitter_c::setupEffect(
|
||||
bool create, u16 resourceId, const mMtx_c &transform, const GXColor *c1, const GXColor *c2
|
||||
) {
|
||||
if (!bFlags && canReuse(resourceId)) {
|
||||
if (!create && canReuse(resourceId)) {
|
||||
s32 idx1 = 0;
|
||||
s32 idx2 = 0;
|
||||
getOwnerPolyAttrs(&idx1, &idx2);
|
||||
loadColors(c1, c2, idx1, idx2);
|
||||
onFlag(EMITTER_0x1);
|
||||
onFlag(EMITTER_New);
|
||||
} else {
|
||||
remove(false);
|
||||
s32 idx1 = 0;
|
||||
s32 idx2 = 0;
|
||||
getOwnerPolyAttrs(&idx1, &idx2);
|
||||
if (createEmitters(resourceId, mVec3_c::Zero, nullptr, nullptr, c1, c2, idx1, idx2)) {
|
||||
addToActiveEmittersList(resourceId, bFlags);
|
||||
addToActiveEmittersList(resourceId, create);
|
||||
}
|
||||
}
|
||||
setTransform(transform);
|
||||
@@ -1271,7 +1272,7 @@ void dWaterEffect_c::execute(f32 water, f32 ground) {
|
||||
// Spawn effect while in water
|
||||
mVec3_c pos(ac->mPosition.x, water, ac->mPosition.z);
|
||||
mVec3_c scale(mScale, mScale, mScale);
|
||||
mEff.createContinuousEffect(PARTICLE_RESOURCE_ID_MAPPING_127_, pos, nullptr, &scale, nullptr, nullptr);
|
||||
mEff.holdEffect(PARTICLE_RESOURCE_ID_MAPPING_127_, pos, nullptr, &scale, nullptr, nullptr);
|
||||
f32 rate = nw4r::math::FAbs(ac->mSpeed) * 0.02f;
|
||||
rate = rate > 0.95f ? 0.95f : rate;
|
||||
mEff.setRate(rate + 0.05f);
|
||||
|
||||
Reference in New Issue
Block a user