mirror of
https://github.com/zeldaret/ss
synced 2026-07-08 13:56:15 -04:00
checkpoint
This commit is contained in:
@@ -91,6 +91,10 @@ toBeSorted/blur_and_palette_manager.cpp:
|
||||
toBeSorted/d_effects_1.cpp:
|
||||
.text start:0x800268B0 end:0x8002B99C align:16
|
||||
.ctors start:0x804DB660 end:0x804DB664
|
||||
.data start:0x80500E98 end:0x80501500
|
||||
.sdata start:0x805718A8 end:0x80571920
|
||||
.sdata2 start:0x80576C18 end:0x80576C68
|
||||
.bss start:0x80594FA0 end:0x80597020
|
||||
|
||||
toBeSorted/d_effects_2.cpp:
|
||||
.text start:0x8002B9A0 end:0x8002C128 align:16
|
||||
|
||||
+98
-98
@@ -693,19 +693,19 @@ fn_8001D950 = .text:0x8001D950; // type:function size:0x22C
|
||||
fn_8001DB80 = .text:0x8001DB80; // type:function size:0x74
|
||||
fn_8001DC00 = .text:0x8001DC00; // type:function size:0x764
|
||||
fn_8001E370 = .text:0x8001E370; // type:function size:0xD4
|
||||
fn_8001E450 = .text:0x8001E450; // type:function size:0xE0
|
||||
fn_8001E530 = .text:0x8001E530; // type:function size:0xA0
|
||||
fn_8001E5D0 = .text:0x8001E5D0; // type:function size:0x110
|
||||
fn_8001E6E0 = .text:0x8001E6E0; // type:function size:0xC
|
||||
fn_8001E6F0 = .text:0x8001E6F0; // type:function size:0x2C
|
||||
fn_8001E720 = .text:0x8001E720; // type:function size:0x14
|
||||
init__14dShpProcBase_cFQ34nw4r3g3d6ResMatQ34nw4r3g3d6ResShplbPUl = .text:0x8001E450; // type:function size:0xE0
|
||||
setupLight__14dShpProcBase_cFv = .text:0x8001E530; // type:function size:0xA0
|
||||
draw__14dShpProcBase_cFP7mVec3_c = .text:0x8001E5D0; // type:function size:0x110
|
||||
setResMat__14dShpProcBase_cFQ34nw4r3g3d6ResMat = .text:0x8001E6E0; // type:function size:0xC
|
||||
setAllFlags__14dShpProcBase_cFv = .text:0x8001E6F0; // type:function size:0x2C
|
||||
doEntry__14dShpProcBase_cFl = .text:0x8001E720; // type:function size:0x14
|
||||
fn_8001E740 = .text:0x8001E740; // type:function size:0x54
|
||||
fn_8001E7A0 = .text:0x8001E7A0; // type:function size:0x2C8
|
||||
fn_8001EA70 = .text:0x8001EA70; // type:function size:0x4
|
||||
fn_8001EA80 = .text:0x8001EA80; // type:function size:0x1DC
|
||||
fn_8001EC60 = .text:0x8001EC60; // type:function size:0x4
|
||||
fn_8001EC70 = .text:0x8001EC70; // type:function size:0x118
|
||||
fn_8001ED90 = .text:0x8001ED90; // type:function size:0x1F0
|
||||
__ct__6mMtx_cFv = .text:0x8001EC60; // type:function size:0x4
|
||||
create__11dShpProc1_cFQ34nw4r3g3d6ResMatQ34nw4r3g3d6ResShplP16mHeapAllocator_cbPUl = .text:0x8001EC70; // type:function size:0x118
|
||||
draw__11dShpProc1_cFv = .text:0x8001ED90; // type:function size:0x1F0
|
||||
fn_8001EF80 = .text:0x8001EF80; // type:function size:0x124
|
||||
fn_8001F0B0 = .text:0x8001F0B0; // type:function size:0x88
|
||||
fn_8001F140 = .text:0x8001F140; // type:function size:0x1C4
|
||||
@@ -886,78 +886,78 @@ fn_80026540 = .text:0x80026540; // type:function size:0x40
|
||||
fn_80026580 = .text:0x80026580; // type:function size:0x188
|
||||
fn_80026710 = .text:0x80026710; // type:function size:0x4C
|
||||
fn_80026760 = .text:0x80026760; // type:function size:0x4C
|
||||
fn_800267B0 = .text:0x800267B0; // type:function size:0x4C
|
||||
fn_80026800 = .text:0x80026800; // type:function size:0x4C
|
||||
getLightColor1__21BlurAndPaletteManagerFv = .text:0x800267B0; // type:function size:0x4C
|
||||
getLightColor2__21BlurAndPaletteManagerFv = .text:0x80026800; // type:function size:0x4C
|
||||
__sinit_\blur_and_palette_manager_cpp = .text:0x80026850; // type:function size:0x5C scope:local
|
||||
fn_800268B0 = .text:0x800268B0; // type:function size:0xB4
|
||||
fn_80026970 = .text:0x80026970; // type:function size:0x88
|
||||
fn_80026A00 = .text:0x80026A00; // type:function size:0xB4
|
||||
fn_80026AC0 = .text:0x80026AC0; // type:function size:0x88
|
||||
fn_80026B50 = .text:0x80026B50; // type:function size:0x98
|
||||
fn_80026BF0 = .text:0x80026BF0; // type:function size:0x8
|
||||
fn_80026C00 = .text:0x80026C00; // type:function size:0x144
|
||||
fn_80026D50 = .text:0x80026D50; // type:function size:0x4
|
||||
fn_80026D60 = .text:0x80026D60; // type:function size:0x4
|
||||
fn_80026D70 = .text:0x80026D70; // type:function size:0x3C
|
||||
fn_80026DB0 = .text:0x80026DB0; // type:function size:0xA0
|
||||
fn_80026E50 = .text:0x80026E50; // type:function size:0x3C
|
||||
fn_80026E90 = .text:0x80026E90; // type:function size:0x3C
|
||||
fn_80026ED0__13EffectsStructFv = .text:0x80026ED0; // type:function size:0x3C
|
||||
fn_80026F10__13EffectsStructFv = .text:0x80026F10; // type:function size:0x3C
|
||||
fn_80026F50 = .text:0x80026F50; // type:function size:0xD8
|
||||
fn_80027030 = .text:0x80027030; // type:function size:0xD8
|
||||
fn_80027110 = .text:0x80027110; // type:function size:0xC8
|
||||
fn_800271E0__13EffectsStructFP7mVec3_cP7mAng3_cP7mVec3_c = .text:0x800271E0; // type:function size:0x44
|
||||
setMtx__13EffectsStructFRC6mMtx_c = .text:0x80027230; // type:function size:0x78
|
||||
fn_800272B0 = .text:0x800272B0; // type:function size:0x70
|
||||
fn_80027320__13EffectsStructFUc = .text:0x80027320; // type:function size:0x40
|
||||
fn_80027360 = .text:0x80027360; // type:function size:0x40
|
||||
fn_800273A0 = .text:0x800273A0; // type:function size:0x54
|
||||
fn_80027400 = .text:0x80027400; // type:function size:0x4C
|
||||
fn_80027450 = .text:0x80027450; // type:function size:0x40
|
||||
fn_80027490 = .text:0x80027490; // type:function size:0x40
|
||||
fn_800274D0 = .text:0x800274D0; // type:function size:0x40
|
||||
fn_80027510 = .text:0x80027510; // type:function size:0x4C
|
||||
fn_80027560 = .text:0x80027560; // type:function size:0x5C
|
||||
__dt__18dEmitterCallback_cFv = .text:0x800268B0; // type:function size:0xB4
|
||||
remove__18dEmitterCallback_cFP14dEmitterBase_c = .text:0x80026970; // type:function size:0x88
|
||||
__dt__19dParticleCallback_cFv = .text:0x80026A00; // type:function size:0xB4
|
||||
remove__19dParticleCallback_cFP14dEmitterBase_c = .text:0x80026AC0; // type:function size:0x88
|
||||
__dt__14dEmitterBase_cFv = .text:0x80026B50; // type:function size:0x98
|
||||
GetNextEmitter__14dEmitterBase_cFP14JPABaseEmitter = .text:0x80026BF0; // type:function size:0x8
|
||||
createEmitters__14dEmitterBase_cFUsRC7mVec3_cPC7mAng3_cPC7mVec3_cPC8_GXColorPC8_GXColorll = .text:0x80026C00; // type:function size:0x144
|
||||
create__18dEmitterCallback_cFP14JPABaseEmitter = .text:0x80026D50; // type:function size:0x4
|
||||
create__19dParticleCallback_cFP14JPABaseEmitter = .text:0x80026D60; // type:function size:0x4
|
||||
setImmortal__14dEmitterBase_cFv = .text:0x80026D70; // type:function size:0x3C
|
||||
deactivateEmitters__14dEmitterBase_cFv = .text:0x80026DB0; // type:function size:0xA0
|
||||
stopCalcEmitters__14dEmitterBase_cFv = .text:0x80026E50; // type:function size:0x3C
|
||||
playCalcEmitters__14dEmitterBase_cFv = .text:0x80026E90; // type:function size:0x3C
|
||||
stopDrawParticles__14dEmitterBase_cFv = .text:0x80026ED0; // type:function size:0x3C
|
||||
playDrawParticles__14dEmitterBase_cFv = .text:0x80026F10; // type:function size:0x3C
|
||||
setEmitterCallback__14dEmitterBase_cFP18dEmitterCallback_c = .text:0x80026F50; // type:function size:0xD8
|
||||
setParticleCallback__14dEmitterBase_cFP19dParticleCallback_c = .text:0x80027030; // type:function size:0xD8
|
||||
setPosRotScale__14dEmitterBase_cFRC7mVec3_cPC7mAng3_cPC7mVec3_c = .text:0x80027110; // type:function size:0xC8
|
||||
setPosRotScaleWithScreenScale__14dEmitterBase_cFRC7mVec3_cPC7mAng3_cPC7mVec3_c = .text:0x800271E0; // type:function size:0x44
|
||||
setTransform__14dEmitterBase_cFRC6mMtx_c = .text:0x80027230; // type:function size:0x78
|
||||
loadColors__14dEmitterBase_cFPC8_GXColorPC8_GXColorll = .text:0x800272B0; // type:function size:0x70
|
||||
setGlobalAlpha__14dEmitterBase_cFUc = .text:0x80027320; // type:function size:0x40
|
||||
setRate__14dEmitterBase_cFf = .text:0x80027360; // type:function size:0x40
|
||||
setDynamicsScale__14dEmitterBase_cFRC7mVec3_c = .text:0x800273A0; // type:function size:0x54
|
||||
setParticleScale__14dEmitterBase_cFRC7mVec3_c = .text:0x80027400; // type:function size:0x4C
|
||||
setAwayFromCenterSpeed__14dEmitterBase_cFf = .text:0x80027450; // type:function size:0x40
|
||||
setVolumeSize__14dEmitterBase_cFUs = .text:0x80027490; // type:function size:0x40
|
||||
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
|
||||
fn_80027770 = .text:0x80027770; // type:function size:0xE8
|
||||
fn_80027860 = .text:0x80027860; // type:function size:0xC8
|
||||
addToActiveEmittersList__13EffectsStructFUsb = .text:0x80027770; // type:function size:0xE8
|
||||
areAllEmittersDone__13EffectsStructFv = .text:0x80027860; // type:function size:0xC8
|
||||
fn_80027930 = .text:0x80027930; // type:function size:0x130
|
||||
fn_80027A60 = .text:0x80027A60; // type:function size:0x44
|
||||
fn_80027AB0 = .text:0x80027AB0; // type:function size:0x6C
|
||||
fn_80027B20 = .text:0x80027B20; // type:function size:0x24
|
||||
fn_80027B50 = .text:0x80027B50; // type:function size:0x80
|
||||
fn_80027BD0 = .text:0x80027BD0; // type:function size:0xD8
|
||||
fn_80027CB0 = .text:0x80027CB0; // type:function size:0x100
|
||||
fn_80027DB0 = .text:0x80027DB0; // type:function size:0xC
|
||||
fn_80027DC0 = .text:0x80027DC0; // type:function size:0x250
|
||||
fn_80028010 = .text:0x80028010; // type:function size:0x6C
|
||||
fn_80028080 = .text:0x80028080; // type:function size:0x100
|
||||
fn_80028180 = .text:0x80028180; // type:function size:0x10
|
||||
fn_80028190 = .text:0x80028190; // type:function size:0x270
|
||||
create__18dParticleFogProc_cFlllP16mHeapAllocator_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
|
||||
create__11dEffect2D_cFlUc = .text:0x80027DB0; // type:function size:0xC
|
||||
doDraw__15dShpEmitterProcFv = .text:0x80027DC0; // type:function size:0x250
|
||||
create__13dShpEmitter_cFP16mHeapAllocator_c = .text:0x80028010; // type:function size:0x6C
|
||||
init__13dShpEmitter_cFPCcPCcb = .text:0x80028080; // type:function size:0x100
|
||||
clear__13dShpEmitter_cFv = .text:0x80028180; // type:function size:0x10
|
||||
draw__13dShpEmitter_cFP14JPABaseEmitterP15JPABaseParticle = .text:0x80028190; // type:function size:0x270
|
||||
fn_80028400 = .text:0x80028400; // type:function size:0x18
|
||||
fn_80028420 = .text:0x80028420; // type:function size:0x58
|
||||
fn_80028480 = .text:0x80028480; // type:function size:0x170
|
||||
executeAfter__22dJEffEmitterCallback_cFP15JPABaseParticle = .text:0x80028480; // type:function size:0x170
|
||||
fn_800285F0 = .text:0x800285F0; // type:function size:0x19C
|
||||
fn_80028790 = .text:0x80028790; // type:function size:0x88
|
||||
fn_80028820 = .text:0x80028820; // type:function size:0x9C
|
||||
fn_800288C0 = .text:0x800288C0; // type:function size:0x38
|
||||
create__14dJEffManager_cFUs = .text:0x80028820; // type:function size:0x9C
|
||||
remove__14dJEffManager_cFv = .text:0x800288C0; // type:function size:0x38
|
||||
fn_80028900 = .text:0x80028900; // type:function size:0x180
|
||||
fn_80028A80 = .text:0x80028A80; // type:function size:0x434
|
||||
fn_80028EC0 = .text:0x80028EC0; // type:function size:0xCC
|
||||
setupEffects__14dJEffManager_cFv = .text:0x80028A80; // type:function size:0x434
|
||||
removeEffManagers__14dJEffManager_cFv = .text:0x80028EC0; // type:function size:0xCC
|
||||
fn_80028F90 = .text:0x80028F90; // type:function size:0xE0
|
||||
fn_80029070 = .text:0x80029070; // type:function size:0x4
|
||||
playEffects = .text:0x80029080; // type:function size:0x1A8
|
||||
fn_80029230 = .text:0x80029230; // type:function size:0xB0
|
||||
fn_800292E0 = .text:0x800292E0; // type:function size:0x18
|
||||
draw__14dJEffManager_cFPC11JPADrawInfoUl = .text:0x800292E0; // type:function size:0x18
|
||||
fn_80029300 = .text:0x80029300; // type:function size:0x94
|
||||
fn_800293A0 = .text:0x800293A0; // type:function size:0x1EC
|
||||
EffectManager__ctor = .text:0x80029590; // type:function size:0xC8
|
||||
fn_80029660 = .text:0x80029660; // type:function size:0x90
|
||||
EffectManager__dtor = .text:0x800296F0; // type:function size:0xBC
|
||||
createEffManagers__14dJEffManager_cFv = .text:0x800293A0; // type:function size:0x1EC
|
||||
__ct__14dJEffManager_cFv = .text:0x80029590; // type:function size:0xC8
|
||||
__dt__22dJEffEmitterCallback_cFv = .text:0x80029660; // type:function size:0x90
|
||||
__dt__14dJEffManager_cFv = .text:0x800296F0; // type:function size:0xBC
|
||||
fn_800297B0 = .text:0x800297B0; // type:function size:0x90
|
||||
fn_80029840 = .text:0x80029840; // type:function size:0x6C
|
||||
fn_800298B0 = .text:0x800298B0; // type:function size:0x4
|
||||
@@ -970,8 +970,8 @@ fn_80029A10__13EffectsStructFUsP7mVec3_cP7mAng3_cP7mVec3_cPvPv = .text:0x80029A1
|
||||
fn_80029A70__13EffectsStructFUsP7mVec3_cP7mAng3_cP7mVec3_cPvPv = .text:0x80029A70; // type:function size:0x64
|
||||
fn_80029AE0 = .text:0x80029AE0; // type:function size:0x20
|
||||
fn_80029B00 = .text:0x80029B00; // type:function size:0xD8
|
||||
fn_80029BE0 = .text:0x80029BE0; // type:function size:0x43C
|
||||
fn_8002A020 = .text:0x8002A020; // type:function size:0xA4
|
||||
loadColors__14dEmitterBase_cFP14JPABaseEmitterPC8_GXColorPC8_GXColorll = .text:0x80029BE0; // type:function size:0x43C
|
||||
removeFromActiveEmittersList__13EffectsStructFv = .text:0x8002A020; // type:function size:0xA4
|
||||
fn_8002A0D0 = .text:0x8002A0D0; // type:function size:0x15C
|
||||
fn_8002A230 = .text:0x8002A230; // type:function size:0x150
|
||||
fn_8002A380 = .text:0x8002A380; // type:function size:0xCC
|
||||
@@ -985,30 +985,30 @@ fn_8002B320 = .text:0x8002B320; // type:function size:0x4
|
||||
fn_8002B330 = .text:0x8002B330; // type:function size:0x4
|
||||
fn_8002B340 = .text:0x8002B340; // type:function size:0x4
|
||||
fn_8002B350 = .text:0x8002B350; // type:function size:0x4
|
||||
fn_8002B360 = .text:0x8002B360; // type:function size:0x58
|
||||
__dt__21CommonEmitterCallbackFv = .text:0x8002B360; // type:function size:0x58
|
||||
fn_8002B3C0 = .text:0x8002B3C0; // type:function size:0x4
|
||||
fn_8002B3D0 = .text:0x8002B3D0; // type:function size:0x7C
|
||||
fn_8002B450 = .text:0x8002B450; // type:function size:0x68
|
||||
__dt__13dShpEmitter_cFv = .text:0x8002B3D0; // type:function size:0x7C
|
||||
__dt__15dShpEmitterProcFv = .text:0x8002B450; // type:function size:0x68
|
||||
fn_8002B4C0 = .text:0x8002B4C0; // type:function size:0x5C
|
||||
fn_8002B520 = .text:0x8002B520; // type:function size:0x58
|
||||
fn_8002B580 = .text:0x8002B580; // type:function size:0x4
|
||||
fn_8002B590 = .text:0x8002B590; // type:function size:0x4
|
||||
fn_8002B5A0 = .text:0x8002B5A0; // type:function size:0x58
|
||||
fn_8002B600 = .text:0x8002B600; // type:function size:0x5C
|
||||
fn_8002B660 = .text:0x8002B660; // type:function size:0x4
|
||||
fn_8002B670 = .text:0x8002B670; // type:function size:0x4
|
||||
drawXlu__15dShpEmitterProcFv = .text:0x8002B580; // type:function size:0x4
|
||||
drawOpa__15dShpEmitterProcFv = .text:0x8002B590; // type:function size:0x4
|
||||
__dt__11dEffect2D_cFv = .text:0x8002B5A0; // type:function size:0x58
|
||||
__dt__18dParticleFogProc_cFv = .text:0x8002B600; // type:function size:0x5C
|
||||
drawXlu__18dParticleFogProc_cFv = .text:0x8002B660; // type:function size:0x4
|
||||
drawOpa__18dParticleFogProc_cFv = .text:0x8002B670; // type:function size:0x4
|
||||
fn_8002B680 = .text:0x8002B680; // type:function size:0x4
|
||||
fn_8002B690 = .text:0x8002B690; // type:function size:0x4
|
||||
fn_8002B6A0 = .text:0x8002B6A0; // type:function size:0x4
|
||||
initEffectsThingsMaybe = .text:0x8002B6B0; // type:function size:0x158
|
||||
fn_8002B810 = .text:0x8002B810; // type:function size:0x18
|
||||
fn_8002B830 = .text:0x8002B830; // type:function size:0x1C
|
||||
fn_8002B850 = .text:0x8002B850; // type:function size:0x78
|
||||
fn_8002B8D0 = .text:0x8002B8D0; // type:function size:0x1C
|
||||
fn_8002B8F0 = .text:0x8002B8F0; // type:function size:0x44
|
||||
fn_8002B940 = .text:0x8002B940; // type:function size:0x1C
|
||||
fn_8002B960 = .text:0x8002B960; // type:function size:0x18
|
||||
fn_8002B980 = .text:0x8002B980; // type:function size:0x1C
|
||||
__sinit_\d_effects_1_cpp = .text:0x8002B6B0; // type:function size:0x158
|
||||
__ct__21CommonEmitterCallbackFv = .text:0x8002B810; // type:function size:0x18
|
||||
__arraydtor$9497 = .text:0x8002B830; // type:function size:0x1C
|
||||
__ct__13dShpEmitter_cFv = .text:0x8002B850; // type:function size:0x78
|
||||
__arraydtor$9499 = .text:0x8002B8D0; // type:function size:0x1C
|
||||
__ct__18dParticleFogProc_cFv = .text:0x8002B8F0; // type:function size:0x44
|
||||
__arraydtor$9502 = .text:0x8002B940; // type:function size:0x1C
|
||||
__ct__11dEffect2D_cFv = .text:0x8002B960; // type:function size:0x18
|
||||
__arraydtor$9504 = .text:0x8002B980; // type:function size:0x1C
|
||||
fn_8002B9A0 = .text:0x8002B9A0; // type:function size:0x30
|
||||
fn_8002B9D0 = .text:0x8002B9D0; // type:function size:0x10C
|
||||
fn_8002BAE0 = .text:0x8002BAE0; // type:function size:0x228
|
||||
@@ -17850,7 +17850,7 @@ ZXYrotM__6mMtx_cFRC4mAngRC4mAngRC4mAng = .text:0x802F1A40; // type:function size
|
||||
mMtx__XYZrotS = .text:0x802F1AA0; // type:function size:0x60
|
||||
mMtx__ZYXrotM = .text:0x802F1B00; // type:function size:0x60
|
||||
toRot__6mMtx_cCFR7mAng3_c = .text:0x802F1B60; // type:function size:0xDC
|
||||
fn_802F1C40 = .text:0x802F1C40; // type:function size:0x220
|
||||
fn_802F1C40__6mMtx_cFll = .text:0x802F1C40; // type:function size:0x220
|
||||
mMtx_c__makeRotationFromVecs = .text:0x802F1E60; // type:function size:0x58
|
||||
__sinit_\m_mtx_cpp = .text:0x802F1EC0; // type:function size:0x58 scope:local
|
||||
create__4mPadFv = .text:0x802F1F20; // type:function size:0x30
|
||||
@@ -28364,7 +28364,7 @@ GET_POTION_BOTTLE_DEFS = .rodata:0x804E9610; // type:object size:0x40
|
||||
ITEM_MODEL_INDEX = .rodata:0x804E9650; // type:object size:0xA8
|
||||
ITEM_MODEL_DEFS = .rodata:0x804E96F8; // type:object size:0x350
|
||||
RUPEE_ITEM_TO_TEX_FRAME = .rodata:0x804E9A48; // type:object size:0x38 data:2byte
|
||||
lbl_804E9A80 = .rodata:0x804E9A80; // type:object size:0x18 data:2byte
|
||||
sEffectResourceIds = .rodata:0x804E9A80; // type:object size:0x18 data:2byte
|
||||
lbl_804E9A98 = .rodata:0x804E9A98; // type:object size:0x10
|
||||
lbl_804E9AA8 = .rodata:0x804E9AA8; // type:object size:0x10
|
||||
blanMap = .rodata:0x804E9AB8; // type:object size:0x18 scope:local data:4byte
|
||||
@@ -29904,17 +29904,17 @@ __vt__21BlurAndPaletteManager = .data:0x80500E80; // type:object size:0xC
|
||||
lbl_80500E8C = .data:0x80500E8C; // type:object size:0xC
|
||||
lbl_80500E98 = .data:0x80500E98; // type:object size:0x10 data:string
|
||||
lbl_80500EA8 = .data:0x80500EA8; // type:object size:0x444
|
||||
lbl_805012EC = .data:0x805012EC; // type:object size:0xC
|
||||
lbl_805012F8 = .data:0x805012F8; // type:object size:0x24
|
||||
lbl_8050131C = .data:0x8050131C; // type:object size:0x1C
|
||||
lbl_80501338 = .data:0x80501338; // type:object size:0x14
|
||||
lbl_8050134C = .data:0x8050134C; // type:object size:0x2C
|
||||
lbl_80501378 = .data:0x80501378; // type:object size:0x10
|
||||
lbl_80501388 = .data:0x80501388; // type:object size:0x30
|
||||
lbl_805013B8 = .data:0x805013B8; // type:object size:0x18
|
||||
lbl_805013D0 = .data:0x805013D0; // type:object size:0x24
|
||||
lbl_805013F4 = .data:0x805013F4; // type:object size:0xC
|
||||
lbl_80501400 = .data:0x80501400; // type:object size:0xC0
|
||||
__vt__14dJEffManager_c = .data:0x805012EC; // type:object size:0xC
|
||||
__vt__22dJEffEmitterCallback_c = .data:0x805012F8; // type:object size:0x24
|
||||
__vt__21CommonEmitterCallback = .data:0x8050131C; // type:object size:0x1C
|
||||
__vt__13dShpEmitter_c = .data:0x80501338; // type:object size:0x14
|
||||
__vt__15dShpEmitterProc = .data:0x8050134C; // type:object size:0x2C
|
||||
__vt__11dEffect2D_c = .data:0x80501378; // type:object size:0x10
|
||||
__vt__18dParticleFogProc_c = .data:0x80501388; // type:object size:0x30
|
||||
__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__14dEmitterBase_c = .data:0x80501400; // type:object size:0xC
|
||||
lbl_805014C0 = .data:0x805014C0; // type:object size:0x28
|
||||
lbl_805014E8 = .data:0x805014E8; // type:object size:0x18
|
||||
lbl_80501500 = .data:0x80501500; // type:object size:0x28
|
||||
@@ -39892,9 +39892,9 @@ lbl_80575058 = .sbss:0x80575058; // type:object size:0x8 data:byte
|
||||
lbl_80575060 = .sbss:0x80575060; // type:object size:0x1 data:byte
|
||||
lbl_80575064 = .sbss:0x80575064; // type:object size:0x4 data:4byte
|
||||
sPInstance__21BlurAndPaletteManager = .sbss:0x80575068; // type:object size:0x8 data:4byte
|
||||
lbl_80575070 = .sbss:0x80575070; // type:object size:0x4 data:4byte
|
||||
sManagers__14dJEffManager_c = .sbss:0x80575070; // type:object size:0x4 data:4byte
|
||||
CURRENT_EFFECT_MANAGER_INIT = .sbss:0x80575074; // type:object size:0x4 data:4byte
|
||||
lbl_80575078 = .sbss:0x80575078; // type:object size:0x4 data:4byte
|
||||
ms_allocator__14dJEffManager_c = .sbss:0x80575078; // type:object size:0x4 data:4byte
|
||||
lbl_8057507C = .sbss:0x8057507C; // type:object size:0x1 data:byte
|
||||
lbl_8057507D = .sbss:0x8057507D; // type:object size:0x1 data:byte
|
||||
s_Create_Position__9dAcBase_c = .sbss:0x80575080; // type:object size:0x4 data:4byte
|
||||
@@ -44209,7 +44209,7 @@ PARTICLE_RESOURCE_ID_MAPPING_991_ = .sdata2:0x8057AB6E; // type:object size:0x2
|
||||
PARTICLE_RESOURCE_ID_MAPPING_992_ = .sdata2:0x8057AB70; // type:object size:0x2 data:2byte
|
||||
lbl_8057AB72 = .sdata2:0x8057AB72; // type:object size:0x2 data:2byte
|
||||
lbl_8057AB74 = .sdata2:0x8057AB74; // type:object size:0x2 data:2byte
|
||||
EffectManager__NumberOfManagers = .sdata2:0x8057AB78; // type:object size:0x8 data:4byte
|
||||
sNumberOfMgrs = .sdata2:0x8057AB78; // type:object size:0x8 data:4byte
|
||||
lbl_8057AB80 = .sdata2:0x8057AB80; // type:object size:0x8 data:byte
|
||||
lbl_8057AB88 = .sdata2:0x8057AB88; // type:object size:0x4 data:float
|
||||
lbl_8057AB8C = .sdata2:0x8057AB8C; // type:object size:0x4 data:float
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
*/
|
||||
class JPADrawInfo {
|
||||
public:
|
||||
JPADrawInfo() {}
|
||||
JPADrawInfo(Mtx param_0, f32 fovY, f32 aspect) {
|
||||
MTXCopy(param_0, mCamMtx);
|
||||
C_MTXLightPerspective(mPrjMtx, fovY, aspect, 0.5f, -0.5f, 0.5f, 0.5f);
|
||||
|
||||
@@ -120,6 +120,7 @@ public:
|
||||
void clearStatus(u32 status) { mStatus &= ~status; }
|
||||
u32 checkStatus(u32 status) const { return (mStatus & status); }
|
||||
bool checkFlag(u32 flag) const { return !!(mpRes->getDyn()->getFlag() & flag); }
|
||||
u32 getDynResUserWork() const { return mpRes->getDyn()->getResUserWork(); }
|
||||
u8 getResourceManagerID() const { return mResMgrID; }
|
||||
u8 getGroupID() const { return mGroupID; }
|
||||
u8 getDrawTimes() const { return mDrawTimes; }
|
||||
@@ -131,9 +132,8 @@ public:
|
||||
void setGlobalSRTMatrix(const Mtx m) {
|
||||
JPASetRMtxSTVecfromMtx(m, mGlobalRot, &mGlobalScl, &mGlobalTrs);
|
||||
|
||||
// set is actually used here in debug
|
||||
mGlobalPScl.x = mGlobalScl.x;
|
||||
mGlobalPScl.y = mGlobalScl.y;
|
||||
// "set is used in TP debug"
|
||||
mGlobalPScl.set(mGlobalScl.x, mGlobalScl.y);
|
||||
}
|
||||
void setGlobalTranslation(f32 x, f32 y, f32 z) { mGlobalTrs.set(x, y, z); }
|
||||
void setGlobalTranslation(const EGG::Vector3f& trs) { mGlobalTrs.set(trs); }
|
||||
@@ -185,6 +185,14 @@ public:
|
||||
mLocalScl.set(scale);
|
||||
}
|
||||
|
||||
f32 getGlobalParticleScaleX() const {
|
||||
return mGlobalPScl.x;
|
||||
}
|
||||
|
||||
f32 getGlobalParticleScaleY() const {
|
||||
return mGlobalPScl.y;
|
||||
}
|
||||
|
||||
f32 get_r_f() { return mRndm.get_rndm_f(); }
|
||||
f32 get_r_zp() { return mRndm.get_rndm_zp(); }
|
||||
f32 get_r_zh() { return mRndm.get_rndm_zh(); }
|
||||
|
||||
@@ -291,7 +291,7 @@ private:
|
||||
/* 0x5778 */ f32 mArrowRotation;
|
||||
/* 0x577C */ f32 mArrowLength;
|
||||
/* 0x5780 */ f32 field_0x5780;
|
||||
/* 0x5784 */ f32 field_0x5784;
|
||||
/* 0x5784 */ f32 mEffectScale;
|
||||
/* 0x5788 */ s32 field_0x5788;
|
||||
/* 0x578C */ s32 field_0x578C;
|
||||
/* 0x5790 */ s32 field_0x5790;
|
||||
@@ -302,7 +302,7 @@ private:
|
||||
/* 0x5798 */ u8 field_0x5798;
|
||||
/* 0x5799 */ u8 field_0x5799;
|
||||
/* 0x579A */ u8 field_0x579A;
|
||||
/* 0x579B */ u8 field_0x579B;
|
||||
/* 0x579B */ u8 mEffectAlpha;
|
||||
/* 0x579C */ u8 mStoredBowVariant;
|
||||
/* 0x579C */ u8 mStoredSlingshotVariant;
|
||||
/* 0x579C */ u8 mStoredBeetleVariant;
|
||||
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
void transposeTo(Matrix34f &to) const;
|
||||
void copyFrom(const Matrix34f &other) {
|
||||
for (int i = 0; i < 12; i++) {
|
||||
(*this)(i) = other(i);
|
||||
arr[i] = other.arr[i];
|
||||
}
|
||||
}
|
||||
void setBase(int idx, const Vector3f &b) {
|
||||
|
||||
@@ -8,12 +8,12 @@ namespace m3d {
|
||||
|
||||
class proc_c : public scnLeaf_c {
|
||||
public:
|
||||
virtual ~proc_c();
|
||||
virtual int getType() const override;
|
||||
/* vt 0x08 */ virtual ~proc_c();
|
||||
/* vt 0x0C */ virtual int getType() const override;
|
||||
bool create(mAllocator_c *, u32 *);
|
||||
|
||||
virtual void drawOpa();
|
||||
virtual void drawXlu();
|
||||
/* vt 0x18 */ virtual void drawOpa();
|
||||
/* vt 0x1C */ virtual void drawXlu();
|
||||
};
|
||||
|
||||
} // namespace m3d
|
||||
|
||||
@@ -18,13 +18,14 @@ public:
|
||||
UnkClass() {}
|
||||
};
|
||||
|
||||
// Note: Due to multiple inheritance, vtable offsets are shifted by 8
|
||||
class scnLeaf_c : UnkClass, EGG::Disposer {
|
||||
public:
|
||||
scnLeaf_c();
|
||||
virtual ~scnLeaf_c();
|
||||
virtual int getType() const = 0;
|
||||
virtual void remove();
|
||||
virtual int entry();
|
||||
/* vt 0x08 */ virtual ~scnLeaf_c();
|
||||
/* vt 0x0C */ virtual int getType() const = 0;
|
||||
/* vt 0x10 */ virtual void remove();
|
||||
/* vt 0x14 */ virtual int entry();
|
||||
|
||||
void setOption(u32 flag, u32 set);
|
||||
void setScale(f32, f32, f32);
|
||||
|
||||
@@ -87,6 +87,8 @@ public:
|
||||
PSMTXMultVec(m, quat.v, quat.v);
|
||||
}
|
||||
|
||||
void fn_802F1C40(s32, s32);
|
||||
|
||||
public:
|
||||
static mMtx_c Identity;
|
||||
};
|
||||
|
||||
@@ -176,6 +176,15 @@ struct _MTX33 {
|
||||
|
||||
struct MTX33 : _MTX33 {
|
||||
MTX33() {}
|
||||
// clang-format off
|
||||
MTX33(f32 f00, f32 f01, f32 f02,
|
||||
f32 f10, f32 f11, f32 f12,
|
||||
f32 f20, f32 f21, f32 f22) {
|
||||
_00 = f00; _01 = f01; _02 = f02;
|
||||
_10 = f10; _11 = f11; _12 = f12;
|
||||
_20 = f20; _21 = f21; _22 = f22;
|
||||
}
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
/******************************************************************************
|
||||
|
||||
@@ -152,6 +152,9 @@ struct Bpm1 {
|
||||
struct Bpm2 {
|
||||
Bpm2() {}
|
||||
~Bpm2() {}
|
||||
|
||||
// maybe
|
||||
u8 _0x00[0x14 - 0x00];
|
||||
};
|
||||
|
||||
struct PaletteEAF_smol_entry {
|
||||
@@ -184,6 +187,7 @@ struct PaletteEAF_big {
|
||||
PaletteEAF_big_entry field_0x00[8];
|
||||
};
|
||||
|
||||
// Apparently particle color related
|
||||
struct Bpm3 {
|
||||
Bpm3() {}
|
||||
~Bpm3() {}
|
||||
@@ -201,16 +205,22 @@ struct Bpm4 {
|
||||
struct Bpm7 {
|
||||
Bpm7() {}
|
||||
~Bpm7() {}
|
||||
|
||||
u8 _0x00[0x14 - 0x00];
|
||||
};
|
||||
|
||||
struct Bpm8 {
|
||||
Bpm8() {}
|
||||
~Bpm8() {}
|
||||
|
||||
u8 _0x00[0x14 - 0x00];
|
||||
};
|
||||
|
||||
struct Bpm9 {
|
||||
Bpm9() {}
|
||||
~Bpm9() {}
|
||||
|
||||
u8 _0x00[0x14 - 0x00];
|
||||
};
|
||||
|
||||
class BlurAndPaletteManager {
|
||||
@@ -224,6 +234,10 @@ public:
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
static BlurAndPaletteManager *GetPInstance() {
|
||||
return sPInstance;
|
||||
}
|
||||
|
||||
void fn_800247D0(mVec3_c, f32);
|
||||
void fn_80022AF0(f32);
|
||||
void setField_0x2F20(f32 arg) {
|
||||
@@ -242,6 +256,29 @@ public:
|
||||
return field_0x5CE4;
|
||||
}
|
||||
|
||||
const Spf &GetCurrentSph() const {
|
||||
return currentSpf;
|
||||
}
|
||||
|
||||
const PaletteEAF_smol_entry& getSmallEAF(s32 idx1, s32 idx2) {
|
||||
return field_0x38E4.field_0x00[idx1].field_0x00[idx2];
|
||||
}
|
||||
|
||||
f32 getfield_0x2F14() const {
|
||||
return field_0x2F14;
|
||||
}
|
||||
|
||||
f32 getfield_0x2F18() const {
|
||||
return field_0x2F18;
|
||||
}
|
||||
|
||||
f32 getfield_0x2F1C() const {
|
||||
return field_0x2F1C;
|
||||
}
|
||||
|
||||
static mColor &getLightColor1();
|
||||
static mColor &getLightColor2();
|
||||
|
||||
private:
|
||||
mColor combineColors(const mColor &c1, const mColor &c2, f32 ratio);
|
||||
|
||||
@@ -267,15 +304,22 @@ private:
|
||||
/* 0x2F0C */ s16 field_0x2F0C;
|
||||
/* 0x2F0E */ s16 field_0x2F0E;
|
||||
/* 0x2F10 */ u8 field_0x2F10;
|
||||
/* 0x2F11 */ u8 field_0x2F11[0x2F20 - 0x2F11];
|
||||
/* 0x2F14 */ f32 field_0x2F14;
|
||||
/* 0x2F18 */ f32 field_0x2F18;
|
||||
/* 0x2F1C */ f32 field_0x2F1C;
|
||||
/* 0x2F20 */ f32 field_0x2F20;
|
||||
/* 0x2F24 */ u8 _0x2F24[0x357C - 0x2F24];
|
||||
/* 0x357C */ Bpm1 field_0x357C;
|
||||
/* 0x3594 */ u8 _0x3594[0x35A0 - 0x3594];
|
||||
/* 0x35A0 */ Bpm2 field_0x35A0;
|
||||
/* 0x35B4 */ Bpm7 field_0x35B4[8];
|
||||
/* 0x3654 */ Bpm8 field_0x3654[10];
|
||||
/* 0x371C */ Bpm9 field_0x371C[20];
|
||||
/* 0x38AC */ u8 _0x38AC[0x38B4 - 0x38AC];
|
||||
/* 0x38B4 */ mVec3_c field_0x38B4;
|
||||
/* 0x38C0 */ u8 _0x38C0[0x38C8 - 0x38C0];
|
||||
/* 0x38C8 */ mVec3_c field_0x38C8;
|
||||
/* 0x38D4 */ u8 _0x38D4[0x38E4 - 0x38D4];
|
||||
/* 0x38E4 */ Bpm3 field_0x38E4;
|
||||
/* 0x48E4 */ Bpm4 field_0x48E4;
|
||||
/* 0x5CE4 */ PaletteDefaultMCF field_0x5CE4;
|
||||
|
||||
@@ -73,8 +73,8 @@ public:
|
||||
|
||||
void createResource(EGG::Heap *heap, s32 mgrIndex, void *jpc, void *jpn);
|
||||
void disposeResource(s32 mgrIndex);
|
||||
s32 getResUserWork(u16 handle) const;
|
||||
u16 getJpnData(u16 handle) const;
|
||||
s32 getResUserWork(u16 particleResId) const;
|
||||
u16 getJpnData(u16 particleResId) const;
|
||||
// Invokes the JParticle 11 extension
|
||||
void doCustomSkywardSwordThing(u8 groupId, f32 x, f32 y);
|
||||
void calc(u8 groupId);
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
#ifndef D_UNK_MDL_STUFF_2_H
|
||||
#define D_UNK_MDL_STUFF_2_H
|
||||
|
||||
#include "m/m3d/m_proc.h"
|
||||
#include "m/m_allocator.h"
|
||||
#include "m/m_mtx.h"
|
||||
#include "m/m_vec.h"
|
||||
#include "nw4r/g3d/res/g3d_resmat.h"
|
||||
#include "nw4r/g3d/res/g3d_resshp.h"
|
||||
|
||||
/** a process for drawing shapes directly */
|
||||
class dShpProcBase_c : public m3d::proc_c {
|
||||
public:
|
||||
virtual ~dShpProcBase_c() {}
|
||||
|
||||
void setResMat(nw4r::g3d::ResMat mat);
|
||||
void setResShp(nw4r::g3d::ResShp shp) {
|
||||
mShp = shp;
|
||||
}
|
||||
|
||||
void setupLight();
|
||||
void draw(mVec3_c *pos);
|
||||
void setAllFlags();
|
||||
void doEntry(s32 lightSetId);
|
||||
|
||||
bool init(nw4r::g3d::ResMat mat, nw4r::g3d::ResShp shp, s32 count, bool xlu, u32 *pSize);
|
||||
|
||||
bool isDrawDisabled(s32 idx) const {
|
||||
return mpFlags[idx];
|
||||
}
|
||||
|
||||
void setDrawDisabled(s32 idx, bool val) {
|
||||
mpFlags[idx] = val;
|
||||
}
|
||||
|
||||
protected:
|
||||
/* 0x18 */ nw4r::g3d::ResMat mMat;
|
||||
/* 0x1C */ nw4r::g3d::ResShp mShp;
|
||||
/* 0x20 */ bool *mpFlags;
|
||||
/* 0x24 */ s32 mCount;
|
||||
/* 0x28 */ s32 mLightSetId;
|
||||
/* 0x2C */ u8 field_0x2C;
|
||||
};
|
||||
|
||||
class dShpProc1_c : public dShpProcBase_c {
|
||||
public:
|
||||
virtual ~dShpProc1_c() {}
|
||||
|
||||
void clearTransforms() {
|
||||
mpTransforms = nullptr;
|
||||
}
|
||||
|
||||
bool create(nw4r::g3d::ResMat mat, nw4r::g3d::ResShp shp, s32 count, mHeapAllocator_c *alloc, bool xlu, u32 *pSize);
|
||||
void draw();
|
||||
|
||||
void setTransform(s32 idx, const mMtx_c &transform) {
|
||||
mpTransforms[idx].copyFrom(transform);
|
||||
}
|
||||
|
||||
protected:
|
||||
/* 0x30 */ mMtx_c *mpTransforms;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,17 +1,79 @@
|
||||
#ifndef EFFECTS_STRUCT_H
|
||||
#define EFFECTS_STRUCT_H
|
||||
|
||||
#include "JSystem/JParticle/JPADrawInfo.h"
|
||||
#include "JSystem/JParticle/JPAEmitter.h"
|
||||
#include "JSystem/JParticle/JPAParticle.h"
|
||||
#include "common.h"
|
||||
#include "d/d_base.h"
|
||||
#include "m/m2d.h"
|
||||
#include "m/m3d/m_proc.h"
|
||||
#include "m/m_allocator.h"
|
||||
#include "m/m_angle.h"
|
||||
#include "m/m_mtx.h"
|
||||
#include "m/m_vec.h"
|
||||
#include "toBeSorted/d_d3d.h"
|
||||
#include "toBeSorted/d_unk_mdl_stuff_2.h"
|
||||
#include "toBeSorted/tlist.h"
|
||||
|
||||
class EffectsStruct {
|
||||
private:
|
||||
s32 field_0x00;
|
||||
u8 field_0x04[0x1C - 0x04];
|
||||
#include <cstddef>
|
||||
|
||||
class dEmitterBase_c;
|
||||
class dEmitterCallback_c;
|
||||
class dParticleCallback_c;
|
||||
|
||||
class dEmitterBase_c {
|
||||
friend class dEmitterCallback_c;
|
||||
friend class dParticleCallback_c;
|
||||
|
||||
public:
|
||||
dEmitterBase_c() : mpEmitterHead(nullptr), mpEmitterCallback(nullptr), mpParticleCallback(nullptr) {}
|
||||
|
||||
protected:
|
||||
void deactivateEmitters();
|
||||
void stopCalcEmitters();
|
||||
void playCalcEmitters();
|
||||
bool createEmitters(
|
||||
u16 effectResourceId, const mVec3_c &position, const mAng3_c *rot, const mVec3_c *scale, const GXColor *c1, const GXColor *c2, s32 idx1, s32 idx2
|
||||
);
|
||||
static u16 fn_80028900(u16);
|
||||
static void loadColors(JPABaseEmitter *emitter, const GXColor *c1, const GXColor *c2, s32 idx1, s32 idx2);
|
||||
|
||||
void setEmitterCallback(dEmitterCallback_c *cb);
|
||||
void setParticleCallback(dParticleCallback_c *cb);
|
||||
|
||||
void setImmortal();
|
||||
|
||||
static JPABaseEmitter *GetNextEmitter(JPABaseEmitter *head);
|
||||
|
||||
/* 0x00 */ JPABaseEmitter *mpEmitterHead;
|
||||
/* 0x04 */ dEmitterCallback_c *mpEmitterCallback;
|
||||
/* 0x08 */ dParticleCallback_c *mpParticleCallback;
|
||||
/* 0x0C */ TListNode<dEmitterBase_c> mEmitterCallbackNode;
|
||||
/* 0x14 */ TListNode<dEmitterBase_c> mParticleCallbackNode;
|
||||
|
||||
public:
|
||||
virtual ~dEmitterBase_c();
|
||||
|
||||
void stopDrawParticles();
|
||||
void playDrawParticles();
|
||||
void setPosRotScale(const mVec3_c &position, const mAng3_c *rot, const mVec3_c *scale);
|
||||
void setPosRotScaleWithScreenScale(const mVec3_c &position, const mAng3_c *rot, const mVec3_c *scale);
|
||||
void setTransform(const mMtx_c &mtx);
|
||||
void loadColors(const GXColor *c1, const GXColor *c2, s32 idx1, s32 idx2);
|
||||
void setGlobalAlpha(u8 alpha);
|
||||
void setRate(f32 rate);
|
||||
void setDynamicsScale(const mVec3_c &scale);
|
||||
void setParticleScale(const mVec3_c &scale);
|
||||
void setAwayFromCenterSpeed(f32 speed);
|
||||
void setVolumeSize(u16 size);
|
||||
void setLifeTime(s16 lifetime);
|
||||
void attachEmitterCallbackId(s32 id); // corresponds to setup at 80028a80
|
||||
void bindShpEmitter(s32 id, bool unused); // corresponds to setup at 8002b6b0
|
||||
};
|
||||
|
||||
// Suggested name: dEmitter_c
|
||||
class EffectsStruct : public dEmitterBase_c {
|
||||
public:
|
||||
// vt at 0x1C
|
||||
EffectsStruct();
|
||||
@@ -22,29 +84,34 @@ public:
|
||||
mpOwner = owner;
|
||||
}
|
||||
|
||||
void remove(bool);
|
||||
void fn_80027320(u8);
|
||||
void fn_800271E0(mVec3_c *pos, mAng3_c *rot, mVec3_c *scale);
|
||||
void addToActiveEmittersList(u16 resourceId, bool bFlags);
|
||||
void removeFromActiveEmittersList();
|
||||
|
||||
void remove(bool bForceDeleteEmitters);
|
||||
void fn_80029920(u16 effect, mVec3_c *pos, mAng3_c *rot, mVec3_c *scale, void *, void *);
|
||||
void fn_80029980(u16 effect, mVec3_c *pos, mAng3_c *rot, mVec3_c *scale, void *, void *);
|
||||
void fn_800299F0(u16 effect, mMtx_c *mtx, void *, void *);
|
||||
void fn_80029A10(u16 effect, mVec3_c *pos, mAng3_c *rot, mVec3_c *scale, void *, void *);
|
||||
void fn_80029A70(u16 effect, mVec3_c *pos, mAng3_c *rot, mVec3_c *scale, void *, void *);
|
||||
void setMtx(const mMtx_c &);
|
||||
|
||||
static void fn_800298C0(u16 effect, mVec3_c *pos, void*, void*, void*, void*);
|
||||
static void fn_800298C0(u16 effect, mVec3_c *pos, void *, void *, void *, void *);
|
||||
|
||||
void fn_80026ED0();
|
||||
void fn_80026F10();
|
||||
|
||||
bool checkField0x00() const {
|
||||
return field_0x00 != 0;
|
||||
bool hasEmitters() const {
|
||||
return mpEmitterHead != 0;
|
||||
}
|
||||
|
||||
private:
|
||||
u8 field_0x20[0x28 - 0x20];
|
||||
protected:
|
||||
bool areAllEmittersDone();
|
||||
|
||||
public:
|
||||
/* 0x24 */ TListNode<EffectsStruct> mNode;
|
||||
|
||||
protected:
|
||||
/* 0x28 */ dBase_c *mpOwner;
|
||||
u8 field_0x2C[0x34 - 0x2C];
|
||||
/* 0x2C */ u8 field_0x2C;
|
||||
/* 0x2D */ u8 _0x2D[0x30 - 0x2D];
|
||||
/* 0x30 */ u16 mFlags;
|
||||
/* 0x32 */ u16 mEffect;
|
||||
};
|
||||
|
||||
// Not sure if these belongs here, but it uses EffectsStruct
|
||||
@@ -73,4 +140,210 @@ public:
|
||||
virtual ~EffectsStruct_Ext() {}
|
||||
};
|
||||
|
||||
/** An emitter callback can be part of multiple emitters. */
|
||||
class dEmitterCallback_c : public JPAEmitterCallBack {
|
||||
friend class dEmitterBase_c;
|
||||
|
||||
typedef TList<dEmitterBase_c, offsetof(dEmitterBase_c, mEmitterCallbackNode)> EmitterCallbackList;
|
||||
|
||||
public:
|
||||
virtual ~dEmitterCallback_c();
|
||||
virtual void create(JPABaseEmitter *) {}
|
||||
virtual void vt_0x20(JPABaseEmitter *) {}
|
||||
|
||||
void remove(dEmitterBase_c *emitter);
|
||||
|
||||
/* 0x04 */ EmitterCallbackList mEmitterList;
|
||||
};
|
||||
|
||||
/** A particle callback can be part of multiple emitters. */
|
||||
class dParticleCallback_c : public JPAParticleCallBack {
|
||||
friend class dEmitterBase_c;
|
||||
|
||||
typedef TList<dEmitterBase_c, offsetof(dEmitterBase_c, mParticleCallbackNode)> ParticleCallbackList;
|
||||
|
||||
public:
|
||||
virtual ~dParticleCallback_c();
|
||||
virtual void create(JPABaseEmitter *) {}
|
||||
|
||||
void remove(dEmitterBase_c *emitter);
|
||||
|
||||
/* 0x04 */ ParticleCallbackList mEmitterList;
|
||||
};
|
||||
|
||||
class dParticleFogProc_c : public d3d::EggTextureProc {
|
||||
public:
|
||||
virtual ~dParticleFogProc_c() {}
|
||||
virtual void drawOpa() override {
|
||||
doDraw();
|
||||
}
|
||||
virtual void drawXlu() override {
|
||||
doDraw();
|
||||
}
|
||||
|
||||
void create(s32 idx, s32 unk, s32 unk2, mHeapAllocator_c *alloc);
|
||||
|
||||
private:
|
||||
void doDraw();
|
||||
/* 0x18 */ u8 _0x18[0x1C - 0x18];
|
||||
/* 0x1C */ bool field_0x1C;
|
||||
};
|
||||
|
||||
class dEffect2D_c : m2d::Base_c {
|
||||
public:
|
||||
dEffect2D_c() : m2d::Base_c(0x80) {}
|
||||
/* vt 0x08 */ virtual ~dEffect2D_c() {}
|
||||
/* vt 0x0C */ virtual void draw() override;
|
||||
|
||||
void create(u32 groupId, u8);
|
||||
|
||||
private:
|
||||
/* 0x10 */ u32 mGroupId;
|
||||
};
|
||||
|
||||
class dJEffEmitterCallback_c : public dEmitterCallback_c {
|
||||
public:
|
||||
virtual ~dJEffEmitterCallback_c() {}
|
||||
virtual void executeAfter(JPABaseParticle *);
|
||||
|
||||
/* 0x010 */ mVec3_c field_0x010[0x32];
|
||||
/* 0x268 */ mVec3_c field_0x268[0x32];
|
||||
/* 0x4C0 */ u8 _0x4C0[0x650 - 0x4C0];
|
||||
// TODO unclear structure boundary
|
||||
};
|
||||
|
||||
class CommonEmitterCallback : public JPAEmitterCallBack {
|
||||
public:
|
||||
CommonEmitterCallback() : field_0x04(0) {}
|
||||
virtual ~CommonEmitterCallback() {}
|
||||
virtual void executeAfter(JPABaseEmitter *) override;
|
||||
void init(s32 v) {
|
||||
field_0x04 = v;
|
||||
}
|
||||
|
||||
private:
|
||||
/* 0x04 */ s32 field_0x04;
|
||||
};
|
||||
|
||||
class dShpEmitter_c;
|
||||
|
||||
class dShpEmitterProc : public dShpProc1_c {
|
||||
public:
|
||||
virtual ~dShpEmitterProc() {
|
||||
mpTransforms = nullptr;
|
||||
}
|
||||
virtual void drawOpa() override {
|
||||
doDraw();
|
||||
}
|
||||
virtual void drawXlu() override {
|
||||
doDraw();
|
||||
}
|
||||
|
||||
void setOwner(dShpEmitter_c *cb) {
|
||||
mpOwner = cb;
|
||||
}
|
||||
|
||||
void setAlpha(s32 idx, u8 val) {
|
||||
mAlpha[idx] = val;
|
||||
}
|
||||
|
||||
private:
|
||||
void doDraw();
|
||||
/* 0x34 */ dShpEmitter_c *mpOwner;
|
||||
// TODO: This is read from JParticle as alpha, but used as the nw4r::g3d lightSetId.
|
||||
// Is this a creative use of the particle color value, given that particles themselves
|
||||
// are never drawn?
|
||||
/* 0x3C */ u8 mAlpha[100];
|
||||
};
|
||||
|
||||
class dShpEmitter_c : public JPAParticleCallBack {
|
||||
public:
|
||||
virtual ~dShpEmitter_c() {}
|
||||
virtual void draw(JPABaseEmitter *, JPABaseParticle *) override;
|
||||
|
||||
bool create(mHeapAllocator_c *alloc);
|
||||
void init(const char *mdlName, const char *arcName, bool priority);
|
||||
void clear();
|
||||
void remove();
|
||||
|
||||
private:
|
||||
/* 0x04 */ dShpEmitterProc mProc;
|
||||
/* 0xA0 */ s32 field_0xA0;
|
||||
};
|
||||
|
||||
class dJEffManager_c : public dEmitterBase_c {
|
||||
public:
|
||||
dJEffManager_c() : field_0x670(-1), field_0x67C(-1) {}
|
||||
virtual ~dJEffManager_c() {
|
||||
remove();
|
||||
}
|
||||
|
||||
static bool createEffManagers();
|
||||
static void removeEffManagers();
|
||||
static void draw(const JPADrawInfo *info, u32 groupId);
|
||||
static void setupEffects();
|
||||
|
||||
enum Fx_e {
|
||||
TsuboA,
|
||||
TsuboB,
|
||||
BRockA,
|
||||
FruitA,
|
||||
GrassCoil,
|
||||
BRockB,
|
||||
Beehive,
|
||||
VeraRock,
|
||||
Pumpkin,
|
||||
BRockC,
|
||||
F300BrokenRockWall_00,
|
||||
F300BrokenRockWall_01,
|
||||
F300BrokenRockWall_01T,
|
||||
LotusSeed,
|
||||
Beamoss,
|
||||
Cakram,
|
||||
Dodai,
|
||||
LegParts,
|
||||
AsuraFloorBrk,
|
||||
BreakPillar,
|
||||
Barrel,
|
||||
BarrelBomb,
|
||||
RockMiddle,
|
||||
BocoBone,
|
||||
BRockStopA,
|
||||
BWallD201,
|
||||
Gunho,
|
||||
TuboBig,
|
||||
Amos,
|
||||
HidokariBoneA,
|
||||
HidokariBoneB,
|
||||
Hydra,
|
||||
Captain,
|
||||
KibakoHang,
|
||||
IslTreIRock,
|
||||
BirdraceTarget,
|
||||
FlowerA00F,
|
||||
FlowerA00L,
|
||||
FlowerB00,
|
||||
FlowerB01,
|
||||
GirahimClaymore,
|
||||
BirdKobunAEgg,
|
||||
BirdKobunBEgg,
|
||||
BirdRivalEgg,
|
||||
BWallAF200,
|
||||
BWallBF200,
|
||||
BWallF210,
|
||||
};
|
||||
|
||||
private:
|
||||
void create(u16 resourceId);
|
||||
void remove();
|
||||
|
||||
static mHeapAllocator_c *ms_allocator;
|
||||
static dJEffManager_c *sManagers;
|
||||
|
||||
/* 0x01C */ dJEffEmitterCallback_c mCallback;
|
||||
/* 0x670 */ s32 field_0x670;
|
||||
/* 0x674 */ u8 _0x674[0x67C - 0x674];
|
||||
/* 0x674 */ s32 field_0x67C;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -18,6 +18,11 @@ inline s32 get_8057511C() {
|
||||
return lbl_8057511C;
|
||||
}
|
||||
|
||||
extern "C" f32 lbl_80575150;
|
||||
inline f32 get_80575150() {
|
||||
return lbl_80575150;
|
||||
}
|
||||
|
||||
extern "C" f32 lbl_8057515C;
|
||||
inline f32 get_8057515C() {
|
||||
return lbl_8057515C;
|
||||
@@ -38,4 +43,9 @@ inline f32 get_80575190() {
|
||||
return lbl_80575190;
|
||||
}
|
||||
|
||||
extern "C" s32 lbl_80575184;
|
||||
inline s32 get_80575184() {
|
||||
return lbl_80575184;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -9,6 +9,12 @@
|
||||
// * Entirely in headers
|
||||
// * Swapped node and count members
|
||||
// Used in DowsingTarget, maybe also in dAcBase_c.soundStuff
|
||||
//
|
||||
// The current implementation has various unexplained behaviors
|
||||
// * Constructor doesn't match if offset != 0 https://decomp.me/scratch/YqOCh
|
||||
// * Many loops based on these iterators don't match in general, but probably not worth
|
||||
// messing with until the ctor is fixed
|
||||
// * -ipa file optimizes things that shouldn't be optimized https://decomp.me/scratch/lqM6i
|
||||
template <typename T>
|
||||
class TListNode {
|
||||
public:
|
||||
|
||||
@@ -202,8 +202,8 @@ int dAcODungeonShip_c::actorExecute() {
|
||||
if (field_0x8D9) {
|
||||
mMtx_c tmpMtx;
|
||||
mMdl.getNodeWorldMtx(0, tmpMtx);
|
||||
if (mEffects[1].checkField0x00()) {
|
||||
mEffects[1].setMtx(tmpMtx);
|
||||
if (mEffects[1].hasEmitters()) {
|
||||
mEffects[1].setTransform(tmpMtx);
|
||||
} else if (field_0x8DA == 0) {
|
||||
mEffects[1].fn_800299F0(PARTICLE_RESOURCE_ID_MAPPING_683_, &tmpMtx, nullptr, nullptr);
|
||||
field_0x8DA = 1;
|
||||
|
||||
@@ -232,7 +232,7 @@ void dAcOSeatSword_c::actorExecuteCommon() {
|
||||
mEffPos.y = position.y;
|
||||
|
||||
mEff.fn_80029A10(PARTICLE_RESOURCE_ID_MAPPING_76_, &mEffPos, &rotation, &mScale, nullptr, nullptr);
|
||||
mEff.fn_80027320(mField_0x7E4);
|
||||
mEff.setGlobalAlpha(mField_0x7E4);
|
||||
}
|
||||
|
||||
void dAcOSeatSword_c::updateSwordMdl() {
|
||||
|
||||
@@ -248,11 +248,11 @@ int dAcOTowerHandD101_c::actorExecute() {
|
||||
PSMTXConcat(tmpMtx3, tmpMtx4, tmpMtx3);
|
||||
mLoc2Mtx.copyFrom(tmpMtx3);
|
||||
|
||||
if (mEffects.checkField0x00()) {
|
||||
if (mEffects.hasEmitters()) {
|
||||
if (direction == 1) {
|
||||
tmpMtx3.YrotM(-0x8000);
|
||||
}
|
||||
mEffects.setMtx(tmpMtx3);
|
||||
mEffects.setTransform(tmpMtx3);
|
||||
}
|
||||
for (int i = 0; i <= 2; i++) {
|
||||
dBgW *bgW = nullptr;
|
||||
@@ -300,11 +300,11 @@ int dAcOTowerHandD101_c::actorExecuteInEvent() {
|
||||
PSMTXConcat(tmpMtx3, tmpMtx4, tmpMtx3);
|
||||
mLoc2Mtx.copyFrom(tmpMtx3);
|
||||
|
||||
if (mEffects.checkField0x00()) {
|
||||
if (mEffects.hasEmitters()) {
|
||||
if (direction == 1) {
|
||||
tmpMtx3.YrotM(-0x8000);
|
||||
}
|
||||
mEffects.setMtx(tmpMtx3);
|
||||
mEffects.setTransform(tmpMtx3);
|
||||
}
|
||||
for (int i = 0; i <= 2; i++) {
|
||||
dBgW *bgW = nullptr;
|
||||
|
||||
@@ -30,7 +30,10 @@
|
||||
#include "rvl/MTX/mtxvec.h"
|
||||
#include "s/s_Math.h"
|
||||
#include "toBeSorted/attention.h"
|
||||
#include "toBeSorted/blur_and_palette_manager.h"
|
||||
#include "toBeSorted/effects_struct.h"
|
||||
#include "toBeSorted/event_manager.h"
|
||||
#include "toBeSorted/small_sound_mgr.h"
|
||||
#include "toBeSorted/special_item_drop_mgr.h"
|
||||
|
||||
void float_ordering() {
|
||||
@@ -220,14 +223,14 @@ void dAcOtubo_c::executeState_Wait() {
|
||||
fn_8002A450(position, polyAttr0, polyAttr1, mField_0x1B4, 0, 1.0f, mField_0x1B0);
|
||||
}
|
||||
if (mbField_0x9F3) {
|
||||
playSound(0xA46);
|
||||
playSound(SE_Tubo_PUT);
|
||||
mbField_0x9F3 = false;
|
||||
}
|
||||
if (checkOnLava()) {
|
||||
if (mField_0x9F6 != 2) {
|
||||
fn_8002A450(position, polyAttr0, polyAttr1, mField_0x1B4, 0, 1.0f, mField_0x1B0);
|
||||
}
|
||||
playSound(0x9A3);
|
||||
playSound(SE_O_FALL_LAVA_S);
|
||||
}
|
||||
}
|
||||
} else if (mObjAcch.ChkGndHit()) {
|
||||
@@ -446,11 +449,8 @@ void dAcOtubo_c::finalizeState_Rebirth() {
|
||||
setActorProperty(0x1);
|
||||
}
|
||||
|
||||
extern "C" void fn_80027510(void *, bool);
|
||||
extern "C" void fn_80027560(void *, bool, int);
|
||||
extern "C" void *fn_800298B0(u16, mVec3_c *, mVec3_c *, u32, u32, u32, u32, u32);
|
||||
extern "C" dEmitterBase_c *fn_800298B0(u16, mVec3_c *, mVec3_c *, u32, u32, u32, u32, u32);
|
||||
extern "C" const u16 PARTICLE_RESOURCE_ID_MAPPING_109_, PARTICLE_RESOURCE_ID_MAPPING_209_;
|
||||
extern "C" void *ENVIRONMENT;
|
||||
extern "C" void fn_80022BE0(void *, const mVec3_c &);
|
||||
|
||||
void dAcOtubo_c::destroy() {
|
||||
@@ -462,19 +462,19 @@ void dAcOtubo_c::destroy() {
|
||||
if (!boolParam) {
|
||||
return;
|
||||
}
|
||||
fn_80022BE0(ENVIRONMENT, position);
|
||||
fn_80022BE0(BlurAndPaletteManager::GetPInstance(), position);
|
||||
mActorCarryInfo.fn_80050EA0(this);
|
||||
|
||||
void *fx_thing = fn_800298B0(PARTICLE_RESOURCE_ID_MAPPING_209_, &poscopy2, nullptr, 0, 0, 0, 0, 0);
|
||||
dEmitterBase_c *fx_thing = fn_800298B0(PARTICLE_RESOURCE_ID_MAPPING_209_, &poscopy2, nullptr, 0, 0, 0, 0, 0);
|
||||
if (fx_thing) {
|
||||
fn_80027510(fx_thing, mSubtype != 0);
|
||||
fx_thing->attachEmitterCallbackId(mSubtype != 0 ? dJEffManager_c::TsuboB : dJEffManager_c::TsuboA);
|
||||
}
|
||||
fx_thing = fn_800298B0(PARTICLE_RESOURCE_ID_MAPPING_109_, &position, nullptr, 0, 0, 0, 0, 0);
|
||||
if (fx_thing) {
|
||||
fn_80027560(fx_thing, mSubtype != 0, 0);
|
||||
fx_thing->bindShpEmitter(mSubtype != 0 ? dJEffManager_c::TsuboB : dJEffManager_c::TsuboA, false);
|
||||
}
|
||||
|
||||
playSound(0xA47); // TODO (Sound ID)
|
||||
playSound(SE_Tubo_BREAK);
|
||||
|
||||
if (mSceneflag < 0xFF && !checkSceneflag()) {
|
||||
SceneflagManager::sInstance->setFlag(roomid, mSceneflag);
|
||||
@@ -614,7 +614,7 @@ void dAcOtubo_c::fn_272_2670() {
|
||||
cLib::addCalcPosXZ(&velocity, mVec3_c::Zero, 0.05f, 1.0f, 0.2f);
|
||||
forwardSpeed = EGG::Math<f32>::sqrt(velocity.x * velocity.x + velocity.z * velocity.z);
|
||||
if (!noSound) {
|
||||
playSound(0x9A0); // TODO (Sound ID) - Fall Water S
|
||||
playSound(SE_O_FALL_WATER_S);
|
||||
}
|
||||
mbSubmerged = true;
|
||||
} else {
|
||||
@@ -860,7 +860,7 @@ void dAcOtubo_c::playRollSound() {
|
||||
return;
|
||||
}
|
||||
|
||||
FUN_8002d770(0xA48, forwardSpeed);
|
||||
FUN_8002d770(SE_Tubo_ROLL_LV, forwardSpeed);
|
||||
}
|
||||
|
||||
void float_order() {
|
||||
|
||||
@@ -702,8 +702,8 @@ void dLytMeterItemSelect_c::initializeState_SelectIn() {
|
||||
if (dAcPy_c::GetLink()->checkFlags0x340(0x400)) {
|
||||
field_0x57BD = 1;
|
||||
field_0x5788 = 0;
|
||||
field_0x579B = 0;
|
||||
mEffects.fn_80027320(0);
|
||||
mEffectAlpha = 0;
|
||||
mEffects.setGlobalAlpha(0);
|
||||
mpPanes[ITEM_SELECT_PANE_ICON_OFFSET + 2]->SetInfluencedAlpha(true);
|
||||
mpPanes[ITEM_SELECT_PANE_ICON_OFFSET + 2]->SetAlpha(64);
|
||||
}
|
||||
@@ -759,16 +759,16 @@ void dLytMeterItemSelect_c::executeState_SelectIn() {
|
||||
bAllAnimsSettled = false;
|
||||
} else {
|
||||
field_0x57BE = 1;
|
||||
bool settled0x57BE = true;
|
||||
bool settled0x5784 = true;
|
||||
if (field_0x579B != 0xFF) {
|
||||
settled0x57BE = sLib::chaseUC(&field_0x579B, 0xFF, 0x55);
|
||||
bool settledAnimAlpha = true;
|
||||
bool settledAnimScale = true;
|
||||
if (mEffectAlpha != 0xFF) {
|
||||
settledAnimAlpha = sLib::chaseUC(&mEffectAlpha, 0xFF, 0x55);
|
||||
}
|
||||
if (field_0x5784 != 1.0f) {
|
||||
settled0x5784 = sLib::chase(&field_0x5784, 1.0f, 0.06666666f);
|
||||
if (mEffectScale != 1.0f) {
|
||||
settledAnimScale = sLib::chase(&mEffectScale, 1.0f, 0.06666666f);
|
||||
}
|
||||
mEffects.fn_80027320(field_0x579B);
|
||||
if (!settled0x57BE || !settled0x5784) {
|
||||
mEffects.setGlobalAlpha(mEffectAlpha);
|
||||
if (!settledAnimAlpha || !settledAnimScale) {
|
||||
bAllAnimsSettled = false;
|
||||
}
|
||||
}
|
||||
@@ -840,13 +840,13 @@ void dLytMeterItemSelect_c::executeState_SetIn() {
|
||||
} else {
|
||||
bool settled0x57BE = true;
|
||||
bool settled0x5784 = true;
|
||||
if (field_0x579B != 0) {
|
||||
settled0x57BE = sLib::chaseUC(&field_0x579B, 0, 0x55);
|
||||
if (mEffectAlpha != 0) {
|
||||
settled0x57BE = sLib::chaseUC(&mEffectAlpha, 0, 0x55);
|
||||
}
|
||||
if (field_0x5784 != 0.8f) {
|
||||
settled0x5784 = sLib::chase(&field_0x5784, 0.8f, 0.06666666f);
|
||||
if (mEffectScale != 0.8f) {
|
||||
settled0x5784 = sLib::chase(&mEffectScale, 0.8f, 0.06666666f);
|
||||
}
|
||||
mEffects.fn_80027320(field_0x579B);
|
||||
mEffects.setGlobalAlpha(mEffectAlpha);
|
||||
if (settled0x57BE && settled0x5784) {
|
||||
field_0x57BD = 0;
|
||||
field_0x57BE = 0;
|
||||
@@ -1058,13 +1058,13 @@ void dLytMeterItemSelect_c::executeState_SelectOut() {
|
||||
} else {
|
||||
bool settled0x57BE = true;
|
||||
bool settled0x5784 = true;
|
||||
if (field_0x579B != 0) {
|
||||
settled0x57BE = sLib::chaseUC(&field_0x579B, 0, 0x55);
|
||||
if (mEffectAlpha != 0) {
|
||||
settled0x57BE = sLib::chaseUC(&mEffectAlpha, 0, 0x55);
|
||||
}
|
||||
if (field_0x5784 != 0.8f) {
|
||||
settled0x5784 = sLib::chase(&field_0x5784, 0.8f, 0.06666666f);
|
||||
if (mEffectScale != 0.8f) {
|
||||
settled0x5784 = sLib::chase(&mEffectScale, 0.8f, 0.06666666f);
|
||||
}
|
||||
mEffects.fn_80027320(field_0x579B);
|
||||
mEffects.setGlobalAlpha(mEffectAlpha);
|
||||
if (settled0x57BE && settled0x5784) {
|
||||
field_0x57BD = 0;
|
||||
field_0x57BE = 0;
|
||||
@@ -1674,9 +1674,9 @@ bool dLytMeterItemSelect_c::build(d2d::ResAccIf_c *resAcc) {
|
||||
|
||||
field_0x578C = 0;
|
||||
field_0x5790 = 0;
|
||||
field_0x5784 = 0.8f;
|
||||
mEffectScale = 0.8f;
|
||||
field_0x5788 = 0;
|
||||
field_0x579B = 0;
|
||||
mEffectAlpha = 0;
|
||||
field_0x57BD = 0;
|
||||
field_0x57BE = 0;
|
||||
field_0x57BF = 0;
|
||||
@@ -1922,9 +1922,9 @@ bool dLytMeterItemSelect_c::execute() {
|
||||
}
|
||||
|
||||
if (field_0x57BD != 0) {
|
||||
field_0x579B = 0;
|
||||
field_0x5784 = 0.8f;
|
||||
mEffects.fn_80027320(0);
|
||||
mEffectAlpha = 0;
|
||||
mEffectScale = 0.8f;
|
||||
mEffects.setGlobalAlpha(0);
|
||||
field_0x57BD = 0;
|
||||
field_0x57BE = 0;
|
||||
mpPanes[ITEM_SELECT_PANE_ICON_OFFSET + 2]->SetAlpha(0xFF);
|
||||
@@ -2241,18 +2241,18 @@ extern "C" const u16 PARTICLE_RESOURCE_ID_MAPPING_717_;
|
||||
void dLytMeterItemSelect_c::fn_800EF580() {
|
||||
nw4r::math::MTX34 mtx = mpPanes[11]->GetGlobalMtx();
|
||||
mVec3_c pos(mtx._03, mtx._13, 0.0f);
|
||||
mVec3_c scale(field_0x5784, field_0x5784, field_0x5784);
|
||||
mVec3_c scale(mEffectScale, mEffectScale, mEffectScale);
|
||||
mEffects.fn_80029A70(PARTICLE_RESOURCE_ID_MAPPING_717_, &pos, nullptr, &scale, nullptr, nullptr);
|
||||
|
||||
if (field_0x57C0 != 0) {
|
||||
mEffects.fn_80026ED0();
|
||||
mEffects.stopDrawParticles();
|
||||
field_0x57C0 = 0;
|
||||
} else {
|
||||
if (field_0x57BE != field_0x57BF) {
|
||||
if (field_0x57BE != 0) {
|
||||
mEffects.fn_80026F10();
|
||||
mEffects.playDrawParticles();
|
||||
} else {
|
||||
mEffects.fn_80026ED0();
|
||||
mEffects.stopDrawParticles();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -676,7 +676,7 @@ void dLytMeterMinusBtn_c::executeState_DemoMove() {
|
||||
mEffectsRot[i].z += demoRotIncrement;
|
||||
nw4r::math::MTX34 mtx = getPaneByIndex(slot + MINUS_BTN_PANE_ITEM_OFFSET)->GetGlobalMtx();
|
||||
mVec3_c pos(mtx._03, mtx._13, 0.0f);
|
||||
mEffects[i].fn_800271E0(&pos, &mEffectsRot[i], nullptr);
|
||||
mEffects[i].setPosRotScaleWithScreenScale(pos, &mEffectsRot[i], nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
BlurAndPaletteManager BlurAndPaletteManager::sInstance;
|
||||
BlurAndPaletteManager *BlurAndPaletteManager::sPInstance;
|
||||
|
||||
TList<UnkBlurPaletteListNode, offsetof(UnkBlurPaletteListNode, mNode)> sList;
|
||||
TList<UnkBlurPaletteListNode, offsetof(UnkBlurPaletteListNode, mNode)> sPlayingEffectsList;
|
||||
|
||||
mColor BlurAndPaletteManager::combineColors(const mColor &c1, const mColor &c2, f32 ratio) {
|
||||
mColor result;
|
||||
@@ -178,7 +178,7 @@ BlurAndPaletteManager::BlurAndPaletteManager() {
|
||||
}
|
||||
|
||||
|
||||
field_0x5CE4.MA06_kColor3 = mColor(0xff, 0xff, 0xff, 0xff);
|
||||
field_0x5CE4.MA00_kColor3 = mColor(0xff, 0xff, 0xff, 0xff);
|
||||
field_0x5CE4.MA01_tevReg1 = mColor(0xff, 0xff, 0xff, 0xff);
|
||||
field_0x5CE4.MA01_kColor2 = mColor(0xff, 0xff, 0xff, 0xff);
|
||||
field_0x5CE4.MA02_tevReg1 = mColor(0xff, 0xff, 0xff, 0xff);
|
||||
|
||||
@@ -0,0 +1,713 @@
|
||||
#include "JSystem/JParticle/JPADrawInfo.h"
|
||||
#include "JSystem/JParticle/JPAEmitter.h"
|
||||
#include "c/c_math.h"
|
||||
#include "common.h"
|
||||
#include "d/d_base.h"
|
||||
#include "d/d_heap.h"
|
||||
#include "d/d_stage.h"
|
||||
#include "egg/core/eggHeap.h"
|
||||
#include "m/m_allocator.h"
|
||||
#include "m/m_color.h"
|
||||
#include "m/m_mtx.h"
|
||||
#include "m/m_vec.h"
|
||||
#include "nw4r/g3d/res/g3d_resfile.h"
|
||||
#include "nw4r/g3d/res/g3d_resmat.h"
|
||||
#include "nw4r/g3d/res/g3d_resmdl.h"
|
||||
#include "nw4r/g3d/res/g3d_resshp.h"
|
||||
#include "rvl/MTX/mtx.h"
|
||||
#include "rvl/MTX/mtxvec.h"
|
||||
#include "sized_string.h"
|
||||
#include "toBeSorted/arc_managers/oarc_manager.h"
|
||||
#include "toBeSorted/blur_and_palette_manager.h"
|
||||
#include "toBeSorted/d_particle.h"
|
||||
#include "toBeSorted/effects_struct.h"
|
||||
#include "toBeSorted/lyt_related_floats.h"
|
||||
|
||||
#include "rvl/GX.h"
|
||||
#include "rvl/MTX.h"
|
||||
|
||||
typedef TList<EffectsStruct, offsetof(EffectsStruct, mNode)> EffectsList;
|
||||
EffectsList sPlayingEffectsList;
|
||||
CommonEmitterCallback sCommonEmitterCallbacks[2];
|
||||
dShpEmitter_c sShpEmitters[47];
|
||||
dEmitterBase_c sEmitter;
|
||||
dParticleFogProc_c sFogProcs[12];
|
||||
dEffect2D_c s2DEffects[3];
|
||||
|
||||
// broken by -ipa file - reconsider splits?
|
||||
dEmitterCallback_c::~dEmitterCallback_c() {
|
||||
for (EmitterCallbackList::Iterator it = mEmitterList.GetBeginIter(); it != mEmitterList.GetEndIter();) {
|
||||
EmitterCallbackList::Iterator itCopy = it;
|
||||
++itCopy;
|
||||
it->setEmitterCallback(nullptr);
|
||||
it = itCopy;
|
||||
}
|
||||
}
|
||||
|
||||
void dEmitterCallback_c::remove(dEmitterBase_c *emitter) {
|
||||
if (mEmitterList.GetPosition(emitter) == mEmitterList.GetEndIter()) {
|
||||
return;
|
||||
}
|
||||
mEmitterList.remove(emitter);
|
||||
}
|
||||
|
||||
// broken by -ipa file - reconsider splits?
|
||||
dParticleCallback_c::~dParticleCallback_c() {
|
||||
for (ParticleCallbackList::Iterator it = mEmitterList.GetBeginIter(); it != mEmitterList.GetEndIter();) {
|
||||
ParticleCallbackList::Iterator itCopy = it;
|
||||
++itCopy;
|
||||
it->setParticleCallback(nullptr);
|
||||
it = itCopy;
|
||||
}
|
||||
}
|
||||
|
||||
void dParticleCallback_c::remove(dEmitterBase_c *emitter) {
|
||||
if (mEmitterList.GetPosition(emitter) == mEmitterList.GetEndIter()) {
|
||||
return;
|
||||
}
|
||||
mEmitterList.remove(emitter);
|
||||
}
|
||||
|
||||
dEmitterBase_c::~dEmitterBase_c() {
|
||||
deactivateEmitters();
|
||||
if (mpEmitterCallback != nullptr) {
|
||||
mpEmitterCallback->remove(this);
|
||||
mpEmitterCallback = nullptr;
|
||||
}
|
||||
|
||||
if (mpParticleCallback != nullptr) {
|
||||
mpParticleCallback->remove(this);
|
||||
mpParticleCallback = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
JPABaseEmitter *dEmitterBase_c::GetNextEmitter(JPABaseEmitter *head) {
|
||||
return reinterpret_cast<JPABaseEmitter *>(head->getUserWork());
|
||||
}
|
||||
|
||||
bool dEmitterBase_c::createEmitters(
|
||||
u16 effectResourceId, const mVec3_c &position, const mAng3_c *rot, const mVec3_c *scale, const GXColor *c1, const GXColor *c2, s32 idx1, s32 idx2
|
||||
) {
|
||||
u16 iter = effectResourceId;
|
||||
JPABaseEmitter *head = nullptr;
|
||||
JPABaseEmitter *last;
|
||||
for (; iter != 0xFFFF; iter = dParticle::mgr_c::GetInstance()->getJpnData(iter)) {
|
||||
last = dParticle::mgr_c::GetInstance()->createEmitter(iter, fn_80028900(iter), position, rot, scale);
|
||||
if (last != nullptr) {
|
||||
if (head != nullptr) {
|
||||
head->setUserWork(reinterpret_cast<u32>(last));
|
||||
} else {
|
||||
mpEmitterHead = last;
|
||||
}
|
||||
head = last;
|
||||
last->setEmitterCallBackPtr(mpEmitterCallback);
|
||||
last->setParticleCallBackPtr(mpParticleCallback);
|
||||
loadColors(last, c1, c2, idx1, idx2);
|
||||
}
|
||||
}
|
||||
|
||||
if (mpEmitterHead != nullptr) {
|
||||
if (mpEmitterCallback != nullptr) {
|
||||
// why last and not head?
|
||||
mpEmitterCallback->create(last);
|
||||
}
|
||||
if (mpParticleCallback != nullptr) {
|
||||
// why last and not head?
|
||||
mpParticleCallback->create(last);
|
||||
}
|
||||
}
|
||||
return mpEmitterHead != nullptr;
|
||||
}
|
||||
|
||||
void dEmitterBase_c::setEmitterCallback(dEmitterCallback_c *cb) {
|
||||
if (mpEmitterCallback != cb) {
|
||||
if (mpEmitterCallback != nullptr) {
|
||||
mpEmitterCallback->remove(this);
|
||||
for (JPABaseEmitter *emitter = mpEmitterHead; emitter != nullptr; emitter = GetNextEmitter(emitter)) {
|
||||
emitter->setEmitterCallBackPtr(nullptr);
|
||||
}
|
||||
}
|
||||
mpEmitterCallback = cb;
|
||||
if (cb != nullptr) {
|
||||
cb->mEmitterList.append(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void dEmitterBase_c::setParticleCallback(dParticleCallback_c *cb) {
|
||||
if (mpParticleCallback != cb) {
|
||||
if (mpParticleCallback != nullptr) {
|
||||
mpParticleCallback->remove(this);
|
||||
for (JPABaseEmitter *emitter = mpEmitterHead; emitter != nullptr; emitter = GetNextEmitter(emitter)) {
|
||||
emitter->setParticleCallBackPtr(nullptr);
|
||||
}
|
||||
}
|
||||
mpParticleCallback = cb;
|
||||
if (cb != nullptr) {
|
||||
cb->mEmitterList.append(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void dEmitterBase_c::setImmortal() {
|
||||
for (JPABaseEmitter *emitter = mpEmitterHead; emitter != nullptr; emitter = GetNextEmitter(emitter)) {
|
||||
emitter->becomeImmortalEmitter();
|
||||
}
|
||||
}
|
||||
|
||||
void dEmitterBase_c::deactivateEmitters() {
|
||||
for (JPABaseEmitter *emitter = mpEmitterHead; emitter != nullptr; emitter = GetNextEmitter(emitter)) {
|
||||
emitter->setEmitterCallBackPtr(nullptr);
|
||||
emitter->setParticleCallBackPtr(nullptr);
|
||||
emitter->quitImmortalEmitter();
|
||||
if (emitter->mMaxFrame == 0) {
|
||||
emitter->becomeInvalidEmitter();
|
||||
}
|
||||
emitter->playCalcEmitter();
|
||||
}
|
||||
mpEmitterHead = nullptr;
|
||||
}
|
||||
|
||||
void dEmitterBase_c::stopCalcEmitters() {
|
||||
for (JPABaseEmitter *emitter = mpEmitterHead; emitter != nullptr; emitter = GetNextEmitter(emitter)) {
|
||||
emitter->stopCalcEmitter();
|
||||
}
|
||||
}
|
||||
|
||||
void dEmitterBase_c::playCalcEmitters() {
|
||||
for (JPABaseEmitter *emitter = mpEmitterHead; emitter != nullptr; emitter = GetNextEmitter(emitter)) {
|
||||
emitter->playCalcEmitter();
|
||||
}
|
||||
}
|
||||
|
||||
void dEmitterBase_c::stopDrawParticles() {
|
||||
for (JPABaseEmitter *emitter = mpEmitterHead; emitter != nullptr; emitter = GetNextEmitter(emitter)) {
|
||||
emitter->stopDrawParticle();
|
||||
}
|
||||
}
|
||||
|
||||
void dEmitterBase_c::playDrawParticles() {
|
||||
for (JPABaseEmitter *emitter = mpEmitterHead; emitter != nullptr; emitter = GetNextEmitter(emitter)) {
|
||||
emitter->playDrawParticle();
|
||||
}
|
||||
}
|
||||
|
||||
void dEmitterBase_c::setPosRotScale(const mVec3_c &position, const mAng3_c *rot, const mVec3_c *scale) {
|
||||
for (JPABaseEmitter *emitter = mpEmitterHead; emitter != nullptr; emitter = GetNextEmitter(emitter)) {
|
||||
emitter->setGlobalTranslation(position);
|
||||
if (rot != nullptr) {
|
||||
emitter->setGlobalRotation(*rot);
|
||||
}
|
||||
if (scale != nullptr) {
|
||||
emitter->setGlobalScale(*scale);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" f32 lbl_80571C50;
|
||||
inline f32 getlbl_80571C50() {
|
||||
return lbl_80571C50;
|
||||
}
|
||||
void dEmitterBase_c::setPosRotScaleWithScreenScale(const mVec3_c &position, const mAng3_c *rot, const mVec3_c *scale) {
|
||||
mVec3_c adjustedPosition(position.x * getlbl_80571C50(), position.y, position.z);
|
||||
setPosRotScale(adjustedPosition, rot, scale);
|
||||
}
|
||||
|
||||
void dEmitterBase_c::setTransform(const mMtx_c &mtx) {
|
||||
for (JPABaseEmitter *emitter = mpEmitterHead; emitter != nullptr; emitter = GetNextEmitter(emitter)) {
|
||||
emitter->setGlobalSRTMatrix(mtx);
|
||||
}
|
||||
}
|
||||
|
||||
void dEmitterBase_c::loadColors(const GXColor *c1, const GXColor *c2, s32 idx1, s32 idx2) {
|
||||
for (JPABaseEmitter *emitter = mpEmitterHead; emitter != nullptr; emitter = GetNextEmitter(emitter)) {
|
||||
loadColors(emitter, c1, c2, idx1, idx2);
|
||||
}
|
||||
}
|
||||
|
||||
void dEmitterBase_c::setGlobalAlpha(u8 alpha) {
|
||||
for (JPABaseEmitter *emitter = mpEmitterHead; emitter != nullptr; emitter = GetNextEmitter(emitter)) {
|
||||
emitter->setGlobalAlpha(alpha);
|
||||
}
|
||||
}
|
||||
|
||||
void dEmitterBase_c::setRate(f32 rate) {
|
||||
for (JPABaseEmitter *emitter = mpEmitterHead; emitter != nullptr; emitter = GetNextEmitter(emitter)) {
|
||||
emitter->setRate(rate);
|
||||
}
|
||||
}
|
||||
|
||||
void dEmitterBase_c::setDynamicsScale(const mVec3_c &scale) {
|
||||
for (JPABaseEmitter *emitter = mpEmitterHead; emitter != nullptr; emitter = GetNextEmitter(emitter)) {
|
||||
emitter->setGlobalDynamicsScale(scale);
|
||||
}
|
||||
}
|
||||
|
||||
void dEmitterBase_c::setParticleScale(const mVec3_c &scale) {
|
||||
for (JPABaseEmitter *emitter = mpEmitterHead; emitter != nullptr; emitter = GetNextEmitter(emitter)) {
|
||||
emitter->setGlobalParticleScale(scale);
|
||||
}
|
||||
}
|
||||
|
||||
void dEmitterBase_c::setAwayFromCenterSpeed(f32 speed) {
|
||||
for (JPABaseEmitter *emitter = mpEmitterHead; emitter != nullptr; emitter = GetNextEmitter(emitter)) {
|
||||
emitter->setAwayFromCenterSpeed(speed);
|
||||
}
|
||||
}
|
||||
|
||||
void dEmitterBase_c::setVolumeSize(u16 size) {
|
||||
for (JPABaseEmitter *emitter = mpEmitterHead; emitter != nullptr; emitter = GetNextEmitter(emitter)) {
|
||||
emitter->setVolumeSize(size);
|
||||
}
|
||||
}
|
||||
|
||||
void dEmitterBase_c::setLifeTime(s16 lifetime) {
|
||||
for (JPABaseEmitter *emitter = mpEmitterHead; emitter != nullptr; emitter = GetNextEmitter(emitter)) {
|
||||
emitter->setLifeTime(lifetime);
|
||||
}
|
||||
}
|
||||
|
||||
void dEmitterBase_c::attachEmitterCallbackId(s32 id) {
|
||||
for (JPABaseEmitter *emitter = mpEmitterHead; emitter != nullptr; emitter = GetNextEmitter(emitter)) {
|
||||
emitter->setEmitterCallBackPtr(&sCommonEmitterCallbacks[id]);
|
||||
}
|
||||
}
|
||||
|
||||
void dEmitterBase_c::bindShpEmitter(s32 id, bool unused) {
|
||||
for (JPABaseEmitter *emitter = mpEmitterHead; emitter != nullptr; emitter = GetNextEmitter(emitter)) {
|
||||
emitter->setParticleCallBackPtr(&sShpEmitters[id]);
|
||||
emitter->setGlobalAlpha(0);
|
||||
}
|
||||
}
|
||||
|
||||
EffectsStruct::EffectsStruct() : mpOwner(nullptr), mFlags(0), mEffect(0) {}
|
||||
|
||||
EffectsStruct::EffectsStruct(dBase_c *base) : mpOwner(base), mFlags(0), mEffect(0) {}
|
||||
|
||||
EffectsStruct::~EffectsStruct() {
|
||||
mpOwner = nullptr;
|
||||
remove(false);
|
||||
}
|
||||
|
||||
void EffectsStruct::remove(bool bForceDeleteEmitters) {
|
||||
mFlags &= ~0x1;
|
||||
JPABaseEmitter *emitter = bForceDeleteEmitters ? mpEmitterHead : nullptr;
|
||||
deactivateEmitters();
|
||||
for (; emitter != nullptr; emitter = GetNextEmitter(emitter)) {
|
||||
dParticle::mgr_c::GetInstance()->forceDeleteEmitter(emitter);
|
||||
}
|
||||
removeFromActiveEmittersList();
|
||||
}
|
||||
|
||||
void EffectsStruct::addToActiveEmittersList(u16 resourceId, bool bFlags) {
|
||||
mEffect = resourceId;
|
||||
mFlags = 0;
|
||||
setImmortal();
|
||||
sPlayingEffectsList.append(this);
|
||||
mFlags |= 1;
|
||||
if (bFlags) {
|
||||
mFlags |= 4;
|
||||
}
|
||||
if (dParticle::mgr_c::GetInstance()->getResUserWork(resourceId) & 0x4000) {
|
||||
mFlags |= 0x10;
|
||||
}
|
||||
}
|
||||
|
||||
bool EffectsStruct::areAllEmittersDone() {
|
||||
bool allDone = true;
|
||||
|
||||
if (mpEmitterHead != nullptr) {
|
||||
if ((mFlags & 0x8) != 0 && field_0x2C != 0) {
|
||||
return false;
|
||||
}
|
||||
for (JPABaseEmitter *emitter = mpEmitterHead; emitter != nullptr; emitter = GetNextEmitter(emitter)) {
|
||||
bool canDelete = emitter->isEnableDeleteEmitter();
|
||||
if (!canDelete) {
|
||||
if (emitter->mMaxFrame == 0) {
|
||||
emitter->becomeInvalidEmitter();
|
||||
}
|
||||
allDone = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return allDone;
|
||||
}
|
||||
|
||||
extern "C" bool fn_80054AD0();
|
||||
void dEffect2D_c::draw() {
|
||||
f32 proj[GX_PROJECTION_SZ];
|
||||
GXGetProjectionv(proj);
|
||||
f32 base = proj[1];
|
||||
proj[1] = base / get_805751A4();
|
||||
GXSetProjectionv(proj);
|
||||
f32 f = get_80575184() / 2;
|
||||
mMtx_c mtx1, mtx2;
|
||||
JPADrawInfo info;
|
||||
|
||||
C_MTXLightOrtho(mtx1, -get_80575150(), get_80575150(), -f, f, 0.5f, 0.5f, 0.5f, 0.5f);
|
||||
|
||||
MTXScale(mtx2, fn_80054AD0() ? get_805751A4() : 1.0f, 1.0f, 1.0f);
|
||||
MTXCopy(mtx2, info.mCamMtx);
|
||||
MTXCopy(mtx1, info.mPrjMtx);
|
||||
dJEffManager_c::draw(&info, mGroupId);
|
||||
proj[1] = base;
|
||||
GXSetProjectionv(proj);
|
||||
}
|
||||
|
||||
void dEffect2D_c::create(u32 groupId, u8 prio) {
|
||||
mGroupId = groupId;
|
||||
setPriority(prio);
|
||||
}
|
||||
|
||||
void dJEffEmitterCallback_c::executeAfter(JPABaseParticle *) {}
|
||||
|
||||
void dShpEmitterProc::doDraw() {
|
||||
mMtx_c viewMtx;
|
||||
getViewMtx(viewMtx);
|
||||
s32 ctrl = 0;
|
||||
mLightSetId = mAlpha[0];
|
||||
mMtx_c *pTransforms = mpTransforms;
|
||||
bool *pFlags = mpFlags;
|
||||
for (s32 idx = 0; idx < mCount;) {
|
||||
if (*pFlags == false) {
|
||||
mMtx_c mtx;
|
||||
mtx.copyFrom(*pTransforms);
|
||||
MTXConcat(viewMtx, mtx, mtx);
|
||||
mMtx_c mtx2;
|
||||
mtx2.copyFrom(mtx);
|
||||
mtx2.fn_802F1C40(0, 1);
|
||||
nw4r::math::MTX33 mtx3;
|
||||
for (int a = 0; a < 3; a++) {
|
||||
for (int b = 0; b < 3; b++) {
|
||||
mtx3.m[a][b] = mtx2.m[a][b];
|
||||
}
|
||||
}
|
||||
if (mLightSetId != mAlpha[idx]) {
|
||||
mLightSetId = mAlpha[idx];
|
||||
setupLight();
|
||||
}
|
||||
mVec3_c v;
|
||||
mVec3_c zero(0.0f, 0.0f, 0.0f);
|
||||
MTXMultVec(*pTransforms, zero, v);
|
||||
dShpProcBase_c::draw(&v);
|
||||
nw4r::g3d::G3DState::SetViewPosNrmMtxArray(mtx, &mtx3, nullptr);
|
||||
nw4r::g3d::Draw1Mat1ShpDirectly(nw4r::g3d::ResMat(nullptr), mShp, mtx, mtx2, ctrl, nullptr, nullptr);
|
||||
if (ctrl == 0) {
|
||||
ctrl = 2;
|
||||
}
|
||||
}
|
||||
idx++;
|
||||
pTransforms++;
|
||||
pFlags++;
|
||||
}
|
||||
mpOwner->clear();
|
||||
}
|
||||
|
||||
bool dShpEmitter_c::create(mHeapAllocator_c *alloc) {
|
||||
if (!mProc.create(nw4r::g3d::ResMat(nullptr), nw4r::g3d::ResShp(nullptr), 100, alloc, false, nullptr)) {
|
||||
return false;
|
||||
}
|
||||
mProc.setOwner(this);
|
||||
return true;
|
||||
}
|
||||
|
||||
void dShpEmitter_c::init(const char *mdlName, const char *arcName, bool priority) {
|
||||
clear();
|
||||
void *ptr = OarcManager::GetInstance()->getSubEntryData(arcName, "g3d/model.brres");
|
||||
if (ptr == nullptr) {
|
||||
mProc.setResMat(nw4r::g3d::ResMat(nullptr));
|
||||
mProc.setResShp(nw4r::g3d::ResShp(nullptr));
|
||||
return;
|
||||
}
|
||||
|
||||
nw4r::g3d::ResFile f(ptr);
|
||||
|
||||
if (strequals(arcName, "F300BrokenRockWall")) {
|
||||
dStage_c::bindStageResToFile(&f);
|
||||
}
|
||||
|
||||
nw4r::g3d::ResMdl mdl = f.GetResMdl(mdlName);
|
||||
nw4r::g3d::ResMat mat = mdl.GetResMat(0);
|
||||
mProc.setResMat(mat);
|
||||
mProc.setResShp(mdl.GetResShp(0));
|
||||
if (priority) {
|
||||
mProc.setPriorityDraw(0x1C, 4);
|
||||
}
|
||||
}
|
||||
|
||||
void dShpEmitter_c::clear() {
|
||||
field_0xA0 = 0;
|
||||
mProc.setAllFlags();
|
||||
}
|
||||
|
||||
void dShpEmitter_c::draw(JPABaseEmitter *emitter, JPABaseParticle *particle) {
|
||||
// TODO
|
||||
for (s32 i = 0; i < 100; i++) {
|
||||
if (mProc.isDrawDisabled(i)) {
|
||||
mProc.setDrawDisabled(i, false);
|
||||
mVec3_c pos;
|
||||
mVec3_c velocity;
|
||||
particle->getGlobalPosition(pos);
|
||||
particle->getVelVec(velocity);
|
||||
mVec3_c v;
|
||||
if (cM::isZero(velocity.squareMagXZ())) {
|
||||
v = mVec3_c::Ex;
|
||||
} else {
|
||||
v = mVec3_c::Ey.cross(velocity);
|
||||
v.normalize();
|
||||
}
|
||||
mMtx_c m;
|
||||
m.setAxisRotation(v, mAng((u16)particle->mRotateAngle).radian2());
|
||||
m.setBase(3, pos);
|
||||
mMtx_c mtx2;
|
||||
mVec3_c scale(
|
||||
particle->getParticleScaleX() * emitter->getGlobalParticleScaleX(),
|
||||
particle->getParticleScaleY() * emitter->getGlobalParticleScaleY(),
|
||||
particle->getParticleScaleX() * emitter->getGlobalParticleScaleX()
|
||||
);
|
||||
MTXScale(mtx2, scale.x, scale.y, scale.z);
|
||||
MTXConcat(m, mtx2, m);
|
||||
mProc.setTransform(i, m);
|
||||
mProc.setAlpha(i, emitter->getGlobalAlpha());
|
||||
field_0xA0++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// Hide the particle - we're doing all the drawing ourselves
|
||||
particle->setInvisibleParticleFlag();
|
||||
}
|
||||
|
||||
void dJEffManager_c::remove() {
|
||||
setEmitterCallback(nullptr);
|
||||
mpEmitterHead = nullptr;
|
||||
}
|
||||
|
||||
extern "C" u32 sNumberOfMgrs; // should be const?
|
||||
extern "C" const u16 PARTICLE_RESOURCE_ID_MAPPING_119_;
|
||||
extern "C" dJEffManager_c *CURRENT_EFFECT_MANAGER_INIT;
|
||||
|
||||
// various grasses being cut
|
||||
extern const u16 sEffectResourceIds[];
|
||||
|
||||
void dJEffManager_c::setupEffects() {
|
||||
for (s32 idx = 0; idx < sNumberOfMgrs; idx++) {
|
||||
sManagers[idx].create(sEffectResourceIds[idx]);
|
||||
}
|
||||
|
||||
sShpEmitters[TsuboA].init("FX_TsuboA", "Tubo", false);
|
||||
sShpEmitters[TsuboB].init("FX_TsuboB", "Tubo", false);
|
||||
sShpEmitters[BRockA].init("FX_BRockA", "FXBRockA", false);
|
||||
sShpEmitters[FruitA].init("FX_FruitA", "FruitA", true);
|
||||
sShpEmitters[GrassCoil].init("FX_GrassCoil", "GrassCoilPiece", false);
|
||||
sShpEmitters[BRockB].init("FX_BRockB", "RockFace", true);
|
||||
sShpEmitters[Beehive].init("FX_Beehive", "Bee", false);
|
||||
sShpEmitters[VeraRock].init("FX_VeraRock", "Bvd", false);
|
||||
sShpEmitters[Pumpkin].init("FX_Pumpkin", "Pumpkin", false);
|
||||
sShpEmitters[BRockC].init("FX_BRockC", "FX_BRockC", true);
|
||||
sShpEmitters[F300BrokenRockWall_00].init("FX_F300BrokenRockWall_00", "F300BrokenRockWall", true);
|
||||
sShpEmitters[F300BrokenRockWall_01].init("FX_F300BrokenRockWall_01", "F300BrokenRockWall", true);
|
||||
sShpEmitters[F300BrokenRockWall_01T].init("FX_F300BrokenRockWall_01T", "F300BrokenRockWall", true);
|
||||
sShpEmitters[LotusSeed].init("FX_LotusSeed", "LotusSeed", false);
|
||||
sShpEmitters[Beamoss].init("FX_Beamoss", "Beamos", false);
|
||||
sShpEmitters[Cakram].init("FX_Cakram", "Asura", false);
|
||||
sShpEmitters[Dodai].init("FX_Dodai", "Asura", false);
|
||||
sShpEmitters[LegParts].init("FX_LegParts", "Asura", false);
|
||||
sShpEmitters[AsuraFloorBrk].init("FX_AsuraFloorBrk", "Asura", false);
|
||||
sShpEmitters[BreakPillar].init("FX_BreakPillar", "BreakPillar", false);
|
||||
sShpEmitters[Barrel].init("FX_Barrel", "Barrel", false);
|
||||
sShpEmitters[BarrelBomb].init("FX_BarrelBomb", "BarrelBomb", false);
|
||||
sShpEmitters[RockMiddle].init("FX_RockMiddle", "RockCarryMiddle", false);
|
||||
sShpEmitters[BocoBone].init("FX_BocoBone", "Skull", false);
|
||||
sShpEmitters[BRockStopA].init("FX_BRockStopA", "BRockStopA", true);
|
||||
sShpEmitters[BWallD201].init("FX_BWallD201", "BWallD201", true);
|
||||
sShpEmitters[Gunho].init("FX_Gunho", "Gunho", false);
|
||||
sShpEmitters[TuboBig].init("FX_TuboBig", "TuboBig", false);
|
||||
sShpEmitters[Amos].init("FX_Amos", "Amos", false);
|
||||
sShpEmitters[HidokariBoneA].init("FX_HidokariBoneA", "HidokariS", false);
|
||||
sShpEmitters[HidokariBoneB].init("FX_HidokariBoneB", "HidokariS", false);
|
||||
sShpEmitters[Hydra].init("FX_Hydra", "Hydra", false);
|
||||
sShpEmitters[Captain].init("FX_Captain", "Captain", false);
|
||||
sShpEmitters[KibakoHang].init("FX_KibakoHang", "KibakoHang", true);
|
||||
sShpEmitters[IslTreIRock].init("FX_IslTreIRock", "IslTreIRock", false);
|
||||
sShpEmitters[BirdraceTarget].init("FX_BirdraceTarget", "BirdraceTarget", false);
|
||||
sShpEmitters[FlowerA00F].init("FX_FlowerA00F", "FlowerA00", false);
|
||||
sShpEmitters[FlowerA00L].init("FX_FlowerA00L", "FlowerA00", false);
|
||||
sShpEmitters[FlowerB00].init("FX_FlowerB00", "FlowerB00", false);
|
||||
sShpEmitters[FlowerB01].init("FX_FlowerB01", "FlowerB01", false);
|
||||
sShpEmitters[GirahimClaymore].init("FX_GirahimClaymore", "GirahimBt03", false);
|
||||
sShpEmitters[BirdKobunAEgg].init("FX_BirdKobunAEgg", "BirdEgg", false);
|
||||
sShpEmitters[BirdKobunBEgg].init("FX_BirdKobunBEgg", "BirdEgg", false);
|
||||
sShpEmitters[BirdRivalEgg].init("FX_BirdRivalEgg", "BirdEgg", false);
|
||||
sShpEmitters[BWallAF200].init("FX_BWallAF200", "BWallAF200", true);
|
||||
sShpEmitters[BWallBF200].init("FX_BWallBF200", "BWallBF200", true);
|
||||
sShpEmitters[BWallF210].init("FX_BWallF210", "BWallF210", true);
|
||||
}
|
||||
|
||||
void dJEffManager_c::removeEffManagers() {
|
||||
for (s32 i = 0; i < sNumberOfMgrs; i++) {
|
||||
sManagers[i].remove();
|
||||
}
|
||||
|
||||
// TODO
|
||||
EffectsList::Iterator it = sPlayingEffectsList.GetBeginIter();
|
||||
while (it != sPlayingEffectsList.GetEndIter()) {
|
||||
EffectsList::Iterator itCopy;
|
||||
++itCopy;
|
||||
it->remove(true);
|
||||
it = itCopy;
|
||||
}
|
||||
|
||||
dParticle::mgr_c::GetInstance()->forceDeleteAllEmitter();
|
||||
for (s32 i = 0; i < 47; i++) {
|
||||
sShpEmitters[i].clear();
|
||||
}
|
||||
}
|
||||
|
||||
// TODO explain this
|
||||
static u32 sInts[] = {0x28, 0x29, 0x87, 0x88, 0x89, 0x8A, 0x8C, 0x8D, 0x91, 0x86, 0x1, 0x2};
|
||||
static u32 sInts2[] = {0x2, 0x87, 0x8B};
|
||||
|
||||
bool dJEffManager_c::createEffManagers() {
|
||||
EGG::Heap *heap = dHeap::work1Heap.heap;
|
||||
ms_allocator = new (heap, 4) mHeapAllocator_c();
|
||||
sManagers = new (heap, 4) dJEffManager_c[sNumberOfMgrs];
|
||||
|
||||
for (s32 idx = 0; idx < sNumberOfMgrs; idx++) {
|
||||
// TODO explain this
|
||||
if (sEffectResourceIds[idx] == PARTICLE_RESOURCE_ID_MAPPING_119_) {
|
||||
CURRENT_EFFECT_MANAGER_INIT = &sManagers[idx];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ms_allocator->createNewTempFrmHeap(-1, dHeap::work1Heap.heap, "dJEffManager_c::ms_allocator", 0x20, 0);
|
||||
for (s32 idx = 0; idx < 2; idx++) {
|
||||
sFogProcs[idx].create(idx, sInts[idx], -1, ms_allocator);
|
||||
}
|
||||
for (s32 idx = 2; idx < 12; idx++) {
|
||||
sFogProcs[idx].create(idx, -1, sInts[idx], ms_allocator);
|
||||
}
|
||||
|
||||
for (s32 idx = 0; idx < 3; idx++) {
|
||||
s2DEffects[idx].create(idx + 12, sInts2[idx]);
|
||||
}
|
||||
|
||||
for (s32 idx = 0; idx < 47; idx++) {
|
||||
sShpEmitters[idx].create(ms_allocator);
|
||||
}
|
||||
|
||||
ms_allocator->adjustFrmHeapRestoreCurrent();
|
||||
for (int i = 0; i < 2; i++) {
|
||||
sCommonEmitterCallbacks[i].init(i);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void dEmitterBase_c::loadColors(JPABaseEmitter *emitter, const GXColor *color1, const GXColor *color2, s32 plltIdx1, s32 plltIdx2) {
|
||||
BlurAndPaletteManager &mgr = BlurAndPaletteManager::GetInstance();
|
||||
u8 r1 = 0xFF;
|
||||
u8 g1 = 0xFF;
|
||||
u8 b1 = 0xFF;
|
||||
u8 r2 = 0xFF;
|
||||
u8 g2 = 0xFF;
|
||||
u8 b2 = 0xFF;
|
||||
u8 r, g, b;
|
||||
|
||||
mColor c1 = mgr.GetCurrentSph().black3_000000;
|
||||
mColor c2 = mgr.GetCurrentSph().black4_000000;
|
||||
|
||||
u32 flags = emitter->getDynResUserWork();
|
||||
u32 factor = flags >> 24;
|
||||
bool useBlack4 = false;
|
||||
if (factor > 100) {
|
||||
useBlack4 = true;
|
||||
factor = factor - 100;
|
||||
}
|
||||
f32 fFactor = factor / 100.0f;
|
||||
if (fFactor > 1.0f) {
|
||||
fFactor = 1.0f;
|
||||
}
|
||||
|
||||
f32 scaleR, scaleG, scaleB;
|
||||
if (!useBlack4) {
|
||||
scaleR = 1.0f - (1.0f - (c1.r / 255.0f)) * fFactor;
|
||||
scaleG = 1.0f - (1.0f - (c1.g / 255.0f)) * fFactor;
|
||||
scaleB = 1.0f - (1.0f - (c1.b / 255.0f)) * fFactor;
|
||||
} else {
|
||||
const mColor &c = mgr.GetCurrentSph().black4_000000;
|
||||
scaleR = 1.0f - (1.0f - (c2.r / 255.0f)) * fFactor;
|
||||
scaleG = 1.0f - (1.0f - (c2.g / 255.0f)) * fFactor;
|
||||
scaleB = 1.0f - (1.0f - (c2.b / 255.0f)) * fFactor;
|
||||
}
|
||||
|
||||
if (color1 != nullptr) {
|
||||
r1 = color1->r;
|
||||
g1 = color1->g;
|
||||
b1 = color1->b;
|
||||
}
|
||||
|
||||
if (plltIdx1 > 0) {
|
||||
if ((flags & 0x1000) != 0) {
|
||||
const PaletteEAF_smol_entry &entry = mgr.getSmallEAF(plltIdx1 - 1, plltIdx2);
|
||||
r1 = entry.field_0x00.r;
|
||||
g1 = entry.field_0x00.g;
|
||||
b1 = entry.field_0x00.b;
|
||||
} else if ((flags & 0x2000) != 0) {
|
||||
const PaletteEAF_smol_entry &entry = mgr.getSmallEAF(plltIdx1 - 1, plltIdx2);
|
||||
r1 = entry.field_0x08.r;
|
||||
g1 = entry.field_0x08.g;
|
||||
b1 = entry.field_0x08.b;
|
||||
}
|
||||
}
|
||||
|
||||
if (factor != 0) {
|
||||
r = mgr.getfield_0x2F14() * r1 * scaleR;
|
||||
g = mgr.getfield_0x2F18() * g1 * scaleG;
|
||||
b = mgr.getfield_0x2F1C() * b1 * scaleB;
|
||||
} else {
|
||||
r = r1 * scaleR;
|
||||
g = g1 * scaleG;
|
||||
b = b1 * scaleB;
|
||||
}
|
||||
|
||||
emitter->setGlobalPrmColor(r, g, b);
|
||||
|
||||
if (color2 != nullptr) {
|
||||
r2 = color2->r;
|
||||
g2 = color2->g;
|
||||
b2 = color2->b;
|
||||
}
|
||||
|
||||
if (plltIdx1 > 0) {
|
||||
if ((flags & 0x1000) != 0) {
|
||||
const PaletteEAF_smol_entry &entry = mgr.getSmallEAF(plltIdx1 - 1, plltIdx2);
|
||||
r2 = entry.field_0x04.r;
|
||||
g2 = entry.field_0x04.g;
|
||||
b2 = entry.field_0x04.b;
|
||||
} else if ((flags & 0x2000) != 0) {
|
||||
const PaletteEAF_smol_entry &entry = mgr.getSmallEAF(plltIdx1 - 1, plltIdx2);
|
||||
r2 = entry.field_0x0C.r;
|
||||
g2 = entry.field_0x0C.g;
|
||||
b2 = entry.field_0x0C.b;
|
||||
}
|
||||
}
|
||||
|
||||
if (factor != 0) {
|
||||
r = mgr.getfield_0x2F14() * r2 * scaleR;
|
||||
g = mgr.getfield_0x2F18() * g2 * scaleG;
|
||||
b = mgr.getfield_0x2F1C() * b2 * scaleB;
|
||||
} else {
|
||||
r = r2 * scaleR;
|
||||
g = g2 * scaleG;
|
||||
b = b2 * scaleB;
|
||||
}
|
||||
|
||||
emitter->setGlobalEnvColor(r, g, b);
|
||||
}
|
||||
|
||||
void EffectsStruct::removeFromActiveEmittersList() {
|
||||
if (sPlayingEffectsList.GetPosition(this) != sPlayingEffectsList.GetEndIter()) {
|
||||
sPlayingEffectsList.remove(this);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,148 @@
|
||||
|
||||
#include "toBeSorted/d_unk_mdl_stuff_2.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "d/col/bg/d_bg_s.h"
|
||||
#include "egg/gfx/eggLightManager.h"
|
||||
#include "m/m3d/m3d.h"
|
||||
#include "m/m3d/m_proc.h"
|
||||
#include "m/m_mtx.h"
|
||||
#include "nw4r/g3d/g3d_draw1mat1shp.h"
|
||||
#include "nw4r/g3d/g3d_scnobj.h"
|
||||
#include "nw4r/g3d/g3d_state.h"
|
||||
#include "nw4r/g3d/res/g3d_resmat.h"
|
||||
#include "nw4r/g3d/res/g3d_resshp.h"
|
||||
#include "nw4r/math/math_types.h"
|
||||
#include "rvl/GX/GXLight.h"
|
||||
#include "rvl/GX/GXTev.h"
|
||||
#include "rvl/GX/GXTypes.h"
|
||||
#include "rvl/MTX/mtx.h"
|
||||
#include "toBeSorted/blur_and_palette_manager.h"
|
||||
|
||||
bool dShpProcBase_c::init(nw4r::g3d::ResMat mat, nw4r::g3d::ResShp shp, s32 count, bool xlu, u32 *pSize) {
|
||||
mCount = count;
|
||||
mpFlags = new bool[count];
|
||||
if (mpFlags == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (pSize != nullptr) {
|
||||
*pSize += count * sizeof(bool);
|
||||
}
|
||||
for (s32 i = 0; i < mCount; i++) {
|
||||
mpFlags[i] = 0;
|
||||
}
|
||||
mMat = mat;
|
||||
mShp = shp;
|
||||
if (xlu) {
|
||||
setOption(nw4r::g3d::ScnObj::OPTION_DISABLE_DRAW_OPA, true);
|
||||
} else {
|
||||
setOption(nw4r::g3d::ScnObj::OPTION_DISABLE_DRAW_XLU, true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void dShpProcBase_c::setupLight() {
|
||||
u32 pDiffColorMask;
|
||||
u32 pDiffAlphaMask;
|
||||
u32 pSpecColorMask;
|
||||
u32 pSpecAlphaMask;
|
||||
GXColor pColor;
|
||||
m3d::getLightMgr(0)->LoadLightSet(
|
||||
mLightSetId, &pDiffColorMask, &pDiffAlphaMask, &pSpecColorMask, &pSpecAlphaMask, &pColor
|
||||
);
|
||||
GXSetChanCtrl(GX_COLOR0, GX_TRUE, GX_SRC_REG, GX_SRC_REG, (GXLightID)pDiffColorMask, GX_DF_CLAMP, GX_AF_SPOT);
|
||||
GXSetChanCtrl(GX_ALPHA0, GX_FALSE, GX_SRC_REG, GX_SRC_REG, GX_LIGHT_NULL, GX_DF_NONE, GX_AF_NONE);
|
||||
GXSetChanAmbColor(GX_COLOR0, pColor);
|
||||
}
|
||||
|
||||
void dShpProcBase_c::draw(mVec3_c *pos) {
|
||||
nw4r::g3d::Draw1Mat1ShpDirectly(
|
||||
mMat, nw4r::g3d::ResShp(nullptr), mMtx_c::Identity, mMtx_c::Identity, 0, nullptr, nullptr
|
||||
);
|
||||
setupLight();
|
||||
if (!field_0x2C) {
|
||||
BlurAndPaletteManager &mgr = BlurAndPaletteManager::GetInstance();
|
||||
u32 code = 0xFF;
|
||||
if (pos != nullptr) {
|
||||
pos->y += 100.0f;
|
||||
code = dBgS::GetInstance()->GetLightingCode(pos);
|
||||
}
|
||||
if (code != 0) {
|
||||
GXSetTevColor(GX_TEVREG0, BlurAndPaletteManager::getLightColor1());
|
||||
GXSetTevKColor(GX_KCOLOR0, BlurAndPaletteManager::getLightColor2());
|
||||
} else {
|
||||
GXSetTevColor(GX_TEVREG0, mgr.GetCurrentSph().white2_ffffff);
|
||||
GXSetTevKColor(GX_KCOLOR0, mgr.GetCurrentSph().grey2_aaaaaa);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void dShpProcBase_c::setResMat(nw4r::g3d::ResMat mat) {
|
||||
mMat = mat;
|
||||
}
|
||||
|
||||
void dShpProcBase_c::setAllFlags() {
|
||||
for (s32 idx = 0; idx < mCount; idx++) {
|
||||
mpFlags[idx] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void dShpProcBase_c::doEntry(s32 lightSetId) {
|
||||
mLightSetId = lightSetId;
|
||||
entry();
|
||||
}
|
||||
|
||||
|
||||
bool dShpProc1_c::create(nw4r::g3d::ResMat mat, nw4r::g3d::ResShp shp, s32 count, mHeapAllocator_c *alloc, bool xlu, u32 *pSize) {
|
||||
if (!m3d::proc_c::create(alloc, pSize)) {
|
||||
return false;
|
||||
}
|
||||
if (!init(mat, shp, count, xlu, pSize)) {
|
||||
return false;
|
||||
}
|
||||
mpTransforms = new mMtx_c[count];
|
||||
if (mpTransforms == nullptr) {
|
||||
return false;
|
||||
}
|
||||
if (pSize != nullptr) {
|
||||
*pSize += count * sizeof(mMtx_c);
|
||||
}
|
||||
for (s32 idx = 0; idx < count; idx++) {
|
||||
MTXIdentity(mpTransforms[idx]);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void dShpProc1_c::draw() {
|
||||
mMtx_c viewMtx;
|
||||
getViewMtx(viewMtx);
|
||||
s32 ctrl = 0;
|
||||
mMtx_c *pTransforms = mpTransforms;
|
||||
bool *pFlags = mpFlags;
|
||||
dShpProcBase_c::draw(nullptr);
|
||||
for (s32 idx = 0; idx < mCount;) {
|
||||
if (*pFlags == false) {
|
||||
mMtx_c mtx;
|
||||
mtx.copyFrom(*pTransforms);
|
||||
MTXConcat(viewMtx, mtx, mtx);
|
||||
mMtx_c mtx2;
|
||||
mtx2.copyFrom(mtx);
|
||||
mtx2.fn_802F1C40(0, 1);
|
||||
nw4r::math::MTX33 mtx3;
|
||||
for (int a = 0; a < 3; a++) {
|
||||
for (int b = 0; b < 3; b++) {
|
||||
mtx3.m[a][b] = mtx2.m[a][b];
|
||||
}
|
||||
}
|
||||
nw4r::g3d::G3DState::SetViewPosNrmMtxArray(mtx, &mtx3, nullptr);
|
||||
nw4r::g3d::Draw1Mat1ShpDirectly(nw4r::g3d::ResMat(nullptr), mShp, mtx, mtx2, ctrl, nullptr, nullptr);
|
||||
if (ctrl == 0) {
|
||||
ctrl = 2;
|
||||
}
|
||||
}
|
||||
idx++;
|
||||
pTransforms++;
|
||||
pFlags++;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user