mirror of
https://github.com/zeldaret/tp
synced 2026-08-21 22:41:04 -04:00
Import JASCmdStack, std-vector work, Z2StatusMgr OK (#2029)
* Import JASCmdStack * Work on std-vector * Z2StatusMgr OK
This commit is contained in:
@@ -1,135 +1,42 @@
|
||||
//
|
||||
// Generated By: dol2asm
|
||||
// Translation Unit: JASCmdStack
|
||||
// JASCmdStack
|
||||
//
|
||||
|
||||
#include "JSystem/JAudio2/JASCmdStack.h"
|
||||
#include "dol2asm.h"
|
||||
|
||||
//
|
||||
// Types:
|
||||
//
|
||||
|
||||
struct JSUPtrLink {};
|
||||
|
||||
struct JSUPtrList {
|
||||
/* 802DBEAC */ ~JSUPtrList();
|
||||
/* 802DBF14 */ void initiate();
|
||||
/* 802DC15C */ void remove(JSUPtrLink*);
|
||||
};
|
||||
|
||||
struct JASPortCmd {
|
||||
struct TPortHead {
|
||||
/* 80291094 */ void execCommandOnce();
|
||||
/* 8029110C */ void execCommandStay();
|
||||
/* 802911D0 */ ~TPortHead();
|
||||
};
|
||||
|
||||
/* 80291060 */ void execAllCommand();
|
||||
|
||||
static u8 sCommandListOnce[12];
|
||||
static u8 sCommandListStay[12];
|
||||
};
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
extern "C" void execAllCommand__10JASPortCmdFv();
|
||||
extern "C" void execCommandOnce__Q210JASPortCmd9TPortHeadFv();
|
||||
extern "C" void execCommandStay__Q210JASPortCmd9TPortHeadFv();
|
||||
extern "C" void __sinit_JASCmdStack_cpp();
|
||||
extern "C" void __dt__Q210JASPortCmd9TPortHeadFv();
|
||||
extern "C" u8 sCommandListOnce__10JASPortCmd[12];
|
||||
extern "C" u8 sCommandListStay__10JASPortCmd[12];
|
||||
|
||||
//
|
||||
// External References:
|
||||
//
|
||||
|
||||
extern "C" void __dl__FPv();
|
||||
extern "C" void __dt__10JSUPtrListFv();
|
||||
extern "C" void initiate__10JSUPtrListFv();
|
||||
extern "C" void remove__10JSUPtrListFP10JSUPtrLink();
|
||||
extern "C" void OSDisableInterrupts();
|
||||
extern "C" void OSRestoreInterrupts();
|
||||
extern "C" void __register_global_object();
|
||||
extern "C" void _savegpr_29();
|
||||
extern "C" void _restgpr_29();
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
//
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80431678-80431684 05E398 000C+00 1/1 0/0 0/0 .bss @80 */
|
||||
static u8 lit_80[12];
|
||||
#include "dolphin/os/OS.h"
|
||||
|
||||
/* 80431684-80431690 05E3A4 000C+00 1/2 0/0 0/0 .bss sCommandListOnce__10JASPortCmd */
|
||||
u8 JASPortCmd::sCommandListOnce[12];
|
||||
|
||||
/* 80431690-8043169C 05E3B0 000C+00 0/1 0/0 0/0 .bss @82 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
static u8 lit_82[12];
|
||||
#pragma pop
|
||||
JASPortCmd::TPortHead JASPortCmd::sCommandListOnce;
|
||||
|
||||
/* 8043169C-804316A8 05E3BC 000C+00 1/2 0/0 0/0 .bss sCommandListStay__10JASPortCmd */
|
||||
u8 JASPortCmd::sCommandListStay[12];
|
||||
JASPortCmd::TPortHead JASPortCmd::sCommandListStay;
|
||||
|
||||
/* 80291060-80291094 28B9A0 0034+00 0/0 1/1 0/0 .text execAllCommand__10JASPortCmdFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void JASPortCmd::execAllCommand() {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JAudio2/JASCmdStack/execAllCommand__10JASPortCmdFv.s"
|
||||
void JASPortCmd::execAllCommand() {
|
||||
sCommandListOnce.execCommandOnce();
|
||||
sCommandListStay.execCommandStay();
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 80291094-8029110C 28B9D4 0078+00 1/1 0/0 0/0 .text execCommandOnce__Q210JASPortCmd9TPortHeadFv
|
||||
*/
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void JASPortCmd::TPortHead::execCommandOnce() {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JAudio2/JASCmdStack/execCommandOnce__Q210JASPortCmd9TPortHeadFv.s"
|
||||
void JASPortCmd::TPortHead::execCommandOnce() {
|
||||
volatile BOOL interrupts = OSDisableInterrupts();
|
||||
JSULink<JASPortCmd>* next;
|
||||
for (JSULink<JASPortCmd>* link = getFirst(); link != NULL; link = next) {
|
||||
next = link->getNext();
|
||||
link->getObject()->_10(link->getObject()->_14);
|
||||
remove(link);
|
||||
}
|
||||
OSRestoreInterrupts(interrupts);
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8029110C-8029116C 28BA4C 0060+00 1/1 0/0 0/0 .text execCommandStay__Q210JASPortCmd9TPortHeadFv
|
||||
*/
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void JASPortCmd::TPortHead::execCommandStay() {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JAudio2/JASCmdStack/execCommandStay__Q210JASPortCmd9TPortHeadFv.s"
|
||||
void JASPortCmd::TPortHead::execCommandStay() {
|
||||
volatile int interrupts = OSDisableInterrupts();
|
||||
for (JSULink<JASPortCmd>* link = getFirst(); link != NULL; link = link->getNext()) {
|
||||
link->getObject()->_10(link->getObject()->_14);
|
||||
}
|
||||
OSRestoreInterrupts(interrupts);
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8029116C-802911D0 28BAAC 0064+00 0/0 1/0 0/0 .text __sinit_JASCmdStack_cpp */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void __sinit_JASCmdStack_cpp() {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JAudio2/JASCmdStack/__sinit_JASCmdStack_cpp.s"
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
REGISTER_CTORS(0x8029116C, __sinit_JASCmdStack_cpp);
|
||||
#pragma pop
|
||||
|
||||
/* 802911D0-80291228 28BB10 0058+00 1/1 0/0 0/0 .text __dt__Q210JASPortCmd9TPortHeadFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm JASPortCmd::TPortHead::~TPortHead() {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JAudio2/JASCmdStack/__dt__Q210JASPortCmd9TPortHeadFv.s"
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
|
||||
#include "JSystem/JGadget/std-vector.h"
|
||||
#include "dolphin/types.h"
|
||||
#include "algorithm.h"
|
||||
#include "msl_memory.h"
|
||||
|
||||
//
|
||||
// Types:
|
||||
@@ -12,23 +14,170 @@
|
||||
|
||||
namespace JGadget {
|
||||
struct vector {
|
||||
/* 802DCCC8 */ void extend_default(u32, u32, u32);
|
||||
/* 802DCCC8 */ static u32 extend_default(u32, u32, u32);
|
||||
};
|
||||
|
||||
template <typename A1>
|
||||
struct TAllocator {};
|
||||
template <typename T>
|
||||
struct TAllocator {
|
||||
void destroy(T* item) {}
|
||||
void deallocate(T* mem, u32 size) {
|
||||
DeallocateRaw(mem);
|
||||
}
|
||||
void DeallocateRaw(T* mem) {
|
||||
delete mem;
|
||||
}
|
||||
T* allocate(u32 count, void *param_2) {
|
||||
return AllocateRaw(count * sizeof(T));
|
||||
}
|
||||
T* AllocateRaw(u32 size) {
|
||||
return (T*)new char[size];
|
||||
}
|
||||
|
||||
u8 field_0x0;
|
||||
};
|
||||
/* TAllocator<void*> */
|
||||
struct TAllocator__template0 {};
|
||||
|
||||
struct TVector_pointer_void {
|
||||
/* 802DCCD0 */ TVector_pointer_void(JGadget::TAllocator<void*> const&);
|
||||
/* 802DCCFC */ ~TVector_pointer_void();
|
||||
/* 802DCDA4 */ void insert(void**, void* const&);
|
||||
/* 802DCDC4 */ void erase(void**, void**);
|
||||
};
|
||||
typedef u32 (*extendFunc)(u32, u32, u32);
|
||||
|
||||
template <typename A1, typename B1>
|
||||
struct TVector {};
|
||||
template <typename T, typename Allocator = JGadget::TAllocator<T> >
|
||||
struct TVector {
|
||||
struct TDestructed_deallocate_ {
|
||||
TDestructed_deallocate_(Allocator* allocator, T* addr) {
|
||||
mAllocator = allocator;
|
||||
mAddr = addr;
|
||||
}
|
||||
void set(T* addr) {
|
||||
mAddr = addr;
|
||||
}
|
||||
inline ~TDestructed_deallocate_() {
|
||||
mAllocator->deallocate(mAddr, 0);
|
||||
}
|
||||
Allocator* mAllocator;
|
||||
T* mAddr;
|
||||
};
|
||||
|
||||
TVector(Allocator const& param_0) {
|
||||
field_0x0 = param_0;
|
||||
pBegin_ = NULL;
|
||||
pEnd_ = pBegin_;
|
||||
mCapacity = 0;
|
||||
pfnExtend_ = JGadget::vector::extend_default;
|
||||
}
|
||||
|
||||
~TVector() {
|
||||
clear();
|
||||
field_0x0.deallocate(pBegin_, 0);
|
||||
}
|
||||
|
||||
T* insert(T* pos, const T& val) {
|
||||
u32 diff = (u32)pos - (u32)begin();
|
||||
insert(pos, 1, val);
|
||||
return pBegin_ + diff;
|
||||
}
|
||||
|
||||
void insert(T* pos, u32 count, const T& val) {
|
||||
if (count != 0) {
|
||||
T* this_00 = Insert_raw(pos, count);
|
||||
if (this_00 != end()) {
|
||||
std::uninitialized_fill_n(this_00, count, val);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
T* Insert_raw(T* pos, u32 count) {
|
||||
if (count == 0) {
|
||||
return pos;
|
||||
}
|
||||
if (mCapacity < count + size()) {
|
||||
u32 uVar4 = GetSize_extend_(count);
|
||||
T* ppvVar5 = field_0x0.allocate(uVar4, NULL);
|
||||
if (ppvVar5 == NULL) {
|
||||
pos = end();
|
||||
} else {
|
||||
TDestructed_deallocate_ aTStack_30(&field_0x0, ppvVar5);
|
||||
T* ppvVar6 = std::uninitialized_copy(pBegin_, pos, ppvVar5);
|
||||
std::uninitialized_copy(pos, pEnd_, ppvVar6 + count);
|
||||
DestroyElement_all_();
|
||||
aTStack_30.set(pBegin_);
|
||||
u32 uVar2 = (u32)pEnd_ - (u32)pBegin_;
|
||||
pEnd_ = ppvVar5 + count + (uVar2 / 4);
|
||||
pBegin_ = ppvVar5;
|
||||
mCapacity = uVar4;
|
||||
pos = ppvVar6;
|
||||
}
|
||||
} else {
|
||||
T* ppvVar5 = pos + count;
|
||||
if (ppvVar5 < pEnd_) {
|
||||
T* ppvVar6 = pEnd_ - count;
|
||||
std::uninitialized_copy(ppvVar6, pEnd_, pEnd_);
|
||||
std::copy_backward(pos, ppvVar6, pEnd_);
|
||||
DestroyElement_(pos, ppvVar5);
|
||||
pEnd_ += count;
|
||||
} else {
|
||||
std::uninitialized_copy(pos, pEnd_, ppvVar5);
|
||||
DestroyElement_(pos, pEnd_);
|
||||
pEnd_ += count;
|
||||
}
|
||||
}
|
||||
return pos;
|
||||
}
|
||||
|
||||
T* begin() {
|
||||
return pBegin_;
|
||||
}
|
||||
|
||||
T* end() {
|
||||
return pEnd_;
|
||||
}
|
||||
|
||||
u32 size() {
|
||||
if (pBegin_ == 0) {
|
||||
return 0;
|
||||
}
|
||||
return ((u32)pEnd_ - (u32)pBegin_) / 4;
|
||||
}
|
||||
|
||||
u32 capacity() { return mCapacity; }
|
||||
|
||||
u32 GetSize_extend_(u32 count) {
|
||||
u32 iVar2 = size();
|
||||
u32 uVar3 = capacity();
|
||||
u32 uVar4 = pfnExtend_(uVar3, iVar2, count);
|
||||
if (uVar4 < iVar2 + count) {
|
||||
uVar4 = iVar2 + count;
|
||||
}
|
||||
return uVar4;
|
||||
}
|
||||
|
||||
void DestroyElement_(T* start, T* end) {
|
||||
for (; start != end; start++) {
|
||||
field_0x0.destroy(start);
|
||||
}
|
||||
}
|
||||
|
||||
void DestroyElement_all_() {
|
||||
DestroyElement_(pBegin_, pEnd_);
|
||||
}
|
||||
|
||||
T* erase(T* start, T* end) {
|
||||
T* vectorEnd = pEnd_;
|
||||
T* ppvVar3 = std::copy(end, vectorEnd, start);
|
||||
DestroyElement_(ppvVar3, pEnd_);
|
||||
pEnd_ = ppvVar3;
|
||||
return start;
|
||||
}
|
||||
|
||||
void clear() {
|
||||
erase(begin(), end());
|
||||
}
|
||||
|
||||
Allocator field_0x0;
|
||||
T* pBegin_;
|
||||
T* pEnd_;
|
||||
u32 mCapacity;
|
||||
extendFunc pfnExtend_;
|
||||
};
|
||||
/* TVector<void*, JGadget::TAllocator<void*>> */
|
||||
struct TVector__template0 {
|
||||
/* 802DD130 */ void func_802DD130(void* _this, void**, void* const&);
|
||||
@@ -36,6 +185,13 @@ struct TVector__template0 {
|
||||
/* 802DCE8C */ void func_802DCE8C(void* _this, void**, u32);
|
||||
};
|
||||
|
||||
struct TVector_pointer_void : public TVector<void*> {
|
||||
/* 802DCCD0 */ TVector_pointer_void(JGadget::TAllocator<void*> const&);
|
||||
/* 802DCCFC */ ~TVector_pointer_void();
|
||||
/* 802DCDA4 */ void insert(void**, void* const&);
|
||||
/* 802DCDC4 */ void** erase(void**, void**);
|
||||
};
|
||||
|
||||
}; // namespace JGadget
|
||||
|
||||
//
|
||||
@@ -67,38 +223,27 @@ extern "C" void _restgpr_29();
|
||||
//
|
||||
|
||||
/* 802DCCC8-802DCCD0 2D7608 0008+00 1/1 0/0 0/0 .text extend_default__Q27JGadget6vectorFUlUlUl */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void JGadget::vector::extend_default(u32 param_0, u32 param_1, u32 param_2) {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JGadget/std-vector/extend_default__Q27JGadget6vectorFUlUlUl.s"
|
||||
u32 JGadget::vector::extend_default(u32 param_0, u32 param_1, u32 param_2) {
|
||||
return param_1 << 1;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 802DCCD0-802DCCFC 2D7610 002C+00 0/0 1/1 0/0 .text
|
||||
* __ct__Q27JGadget20TVector_pointer_voidFRCQ27JGadget14TAllocator<Pv> */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm JGadget::TVector_pointer_void::TVector_pointer_void(JGadget::TAllocator<void*> const& param_0) {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JGadget/std-vector/func_802DCCD0.s"
|
||||
JGadget::TVector_pointer_void::TVector_pointer_void(JGadget::TAllocator<void*> const& param_0) : TVector<void*>(param_0) {
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 802DCCFC-802DCDA4 2D763C 00A8+00 0/0 2/2 0/0 .text __dt__Q27JGadget20TVector_pointer_voidFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm JGadget::TVector_pointer_void::~TVector_pointer_void() {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JGadget/std-vector/__dt__Q27JGadget20TVector_pointer_voidFv.s"
|
||||
JGadget::TVector_pointer_void::~TVector_pointer_void() {
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 802DCDA4-802DCDC4 2D76E4 0020+00 0/0 1/1 0/0 .text
|
||||
* insert__Q27JGadget20TVector_pointer_voidFPPvRCPv */
|
||||
// the entire function chain needs work
|
||||
#ifdef NONMATCHING
|
||||
void JGadget::TVector_pointer_void::insert(void** param_0, void* const& param_1) {
|
||||
TVector<void*>::insert(param_0, param_1);
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
@@ -107,17 +252,13 @@ asm void JGadget::TVector_pointer_void::insert(void** param_0, void* const& para
|
||||
#include "asm/JSystem/JGadget/std-vector/insert__Q27JGadget20TVector_pointer_voidFPPvRCPv.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 802DCDC4-802DCE1C 2D7704 0058+00 0/0 1/1 0/0 .text
|
||||
* erase__Q27JGadget20TVector_pointer_voidFPPvPPv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void JGadget::TVector_pointer_void::erase(void** param_0, void** param_1) {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JGadget/std-vector/erase__Q27JGadget20TVector_pointer_voidFPPvPPv.s"
|
||||
void** JGadget::TVector_pointer_void::erase(void** param_0, void** param_1) {
|
||||
return TVector<void*>::erase(param_0, param_1);
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 802DCE1C-802DCE8C 2D775C 0070+00 1/1 0/0 0/0 .text
|
||||
* insert__Q27JGadget38TVector<Pv,Q27JGadget14TAllocator<Pv>>FPPvUlRCPv */
|
||||
|
||||
@@ -43,6 +43,24 @@ void fill(ForwardIt first, ForwardIt last, const T& value) {
|
||||
*first = value;
|
||||
}
|
||||
}
|
||||
|
||||
template<class InputIt, class OutputIt>
|
||||
inline OutputIt copy(InputIt first, InputIt last,
|
||||
OutputIt d_first) {
|
||||
for (; first < last; ++first, ++d_first) {
|
||||
*d_first = *first;
|
||||
}
|
||||
return d_first;
|
||||
}
|
||||
|
||||
template<class BidirIt1, class BidirIt2>
|
||||
inline BidirIt2 copy_backward(BidirIt1 first, BidirIt1 last, BidirIt2 d_last) {
|
||||
while (first != last) {
|
||||
*(--d_last) = *(--last);
|
||||
}
|
||||
return d_last;
|
||||
}
|
||||
|
||||
} // namespace std
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
#ifndef MSL_MEMORY_H_
|
||||
#define MSL_MEMORY_H_
|
||||
|
||||
namespace std {
|
||||
|
||||
template<class ForwardIt, class Size, class T>
|
||||
inline ForwardIt uninitialized_fill_n(ForwardIt first, Size count, const T& value) {
|
||||
for (; count > 0; ++first, (void) --count) {
|
||||
*first = value;
|
||||
}
|
||||
return first;
|
||||
}
|
||||
|
||||
template<class InputIt, class NoThrowForwardIt>
|
||||
inline NoThrowForwardIt uninitialized_copy(InputIt first, InputIt last, NoThrowForwardIt d_first) {
|
||||
for (; first != last; ++first, ++d_first) {
|
||||
*d_first = *first;
|
||||
}
|
||||
return d_first;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -123,17 +123,10 @@ f32 Z2Param::VOL_SE_OBJECT_PAUSING = 72.0f / 127.0f;
|
||||
f32 Z2Param::VOL_SE_ATMOSPHERE_PAUSING = 72.0f / 127.0f;
|
||||
|
||||
/* 80450860-80450864 -00001 0004+00 0/0 15/15 0/0 .sdata None */
|
||||
extern u8 struct_80450860[4];
|
||||
u8 struct_80450860[4] = {
|
||||
/* 80450860 0001+00 data_80450860 None */
|
||||
0x21,
|
||||
/* 80450861 0001+00 data_80450861 None */
|
||||
0x3C,
|
||||
/* 80450862 0001+00 data_80450862 None */
|
||||
0x3C,
|
||||
/* 80450863 0001+00 data_80450863 None */
|
||||
0x1E,
|
||||
};
|
||||
u8 struct_80450860 = 0x21;
|
||||
u8 struct_80450861 = 0x3C;
|
||||
u8 struct_80450862 = 0x3C;
|
||||
u8 struct_80450863 = 0x1E;
|
||||
|
||||
/* 80450864-80450868 -00001 0004+00 0/0 2/2 0/0 .sdata None */
|
||||
extern u8 struct_80450864[4];
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "Z2AudioLib/Z2SoundMgr.h"
|
||||
#include "Z2AudioLib/Z2SeqMgr.h"
|
||||
#include "Z2AudioLib/Z2SeMgr.h"
|
||||
#include "Z2AudioLib/Z2Param.h"
|
||||
#include "dol2asm.h"
|
||||
#include "global.h"
|
||||
|
||||
@@ -141,7 +142,6 @@ extern "C" void _restgpr_16();
|
||||
extern "C" void _restgpr_29();
|
||||
extern "C" u8 saveBitLabels__16dSv_event_flag_c[1644 + 4 /* padding */];
|
||||
extern "C" extern u8 g_dComIfG_gameInfo[122384];
|
||||
extern "C" extern u8 struct_80450860[4];
|
||||
extern "C" extern u8 data_80450B3C[4];
|
||||
extern "C" extern u8 data_80450B40[4];
|
||||
extern "C" extern u8 data_80450B48[4];
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
//
|
||||
|
||||
#include "Z2AudioLib/Z2SeqMgr.h"
|
||||
#include "Z2AudioLib/Z2Param.h"
|
||||
#include "dol2asm.h"
|
||||
|
||||
//
|
||||
@@ -32,13 +33,6 @@ struct Z2SceneMgr {
|
||||
/* 802B68E0 */ void setSceneExist(bool);
|
||||
};
|
||||
|
||||
struct Z2Param {
|
||||
static f32 VOL_BGM_DEFAULT;
|
||||
static f32 VOL_BGM_TALKING;
|
||||
static f32 VOL_BGM_PAUSING;
|
||||
static f32 ENEMY_LASTHIT_MUTE_VOLUME;
|
||||
};
|
||||
|
||||
struct Z2CreatureLink {
|
||||
static u8 mLinkPtr[4 + 4 /* padding */];
|
||||
};
|
||||
@@ -151,7 +145,6 @@ extern "C" void _restgpr_29();
|
||||
extern "C" f32 VOL_BGM_DEFAULT__7Z2Param;
|
||||
extern "C" f32 VOL_BGM_TALKING__7Z2Param;
|
||||
extern "C" f32 VOL_BGM_PAUSING__7Z2Param;
|
||||
extern "C" extern u8 struct_80450860[4];
|
||||
extern "C" extern u8 struct_80450864[4];
|
||||
extern "C" extern u8 struct_80450868[4];
|
||||
extern "C" extern u32 data_8045086C;
|
||||
|
||||
+150
-189
@@ -1,84 +1,14 @@
|
||||
//
|
||||
// Generated By: dol2asm
|
||||
// Translation Unit: Z2StatusMgr
|
||||
// Z2StatusMgr
|
||||
//
|
||||
|
||||
#include "Z2AudioLib/Z2StatusMgr.h"
|
||||
#include "Z2AudioLib/Z2Creature.h"
|
||||
#include "Z2AudioLib/Z2Param.h"
|
||||
#include "d/com/d_com_inf_game.h"
|
||||
#include "d/s/d_s_play.h"
|
||||
#include "dol2asm.h"
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
extern "C" void __ct__11Z2StatusMgrFv();
|
||||
extern "C" void heartGaugeOn__11Z2StatusMgrFv();
|
||||
extern "C" void processHeartGaugeSound__11Z2StatusMgrFv();
|
||||
extern "C" void talkIn__11Z2StatusMgrFv();
|
||||
extern "C" void talkOut__11Z2StatusMgrFv();
|
||||
extern "C" void menuIn__11Z2StatusMgrFv();
|
||||
extern "C" void menuOut__11Z2StatusMgrFv();
|
||||
extern "C" bool isMovieDemo__11Z2StatusMgrFv();
|
||||
extern "C" void setDemoName__11Z2StatusMgrFPc();
|
||||
extern "C" void processTime__11Z2StatusMgrFv();
|
||||
extern "C" bool checkDayTime__11Z2StatusMgrFv();
|
||||
extern "C" void setEventBit__11Z2StatusMgrFPv();
|
||||
extern "C" void setCameraPolygonPos__11Z2StatusMgrFP3Vec();
|
||||
extern "C" void setCameraGroupInfo__11Z2StatusMgrFUc();
|
||||
extern "C" void setCameraInWaterDepth__11Z2StatusMgrFf();
|
||||
extern "C" extern char const* const Z2StatusMgr__stringBase0;
|
||||
|
||||
//
|
||||
// External References:
|
||||
//
|
||||
|
||||
extern "C" void moveVolume__18JAISoundParamsMoveFfUl();
|
||||
extern "C" void getParamByExp__6Z2CalcFffffffQ26Z2Calc9CurveSign();
|
||||
extern "C" void seStartLevel__7Z2SeMgrF10JAISoundIDPC3VecUlScffffUc();
|
||||
extern "C" void seMoveVolumeAll__7Z2SeMgrFfUl();
|
||||
extern "C" void talkInSe__7Z2SeMgrFv();
|
||||
extern "C" void talkOutSe__7Z2SeMgrFv();
|
||||
extern "C" void menuInSe__7Z2SeMgrFv();
|
||||
extern "C" void subBgmStart__8Z2SeqMgrFUl();
|
||||
extern "C" void subBgmStop__8Z2SeqMgrFv();
|
||||
extern "C" void bgmStreamPrepare__8Z2SeqMgrFUl();
|
||||
extern "C" void bgmStreamPlay__8Z2SeqMgrFv();
|
||||
extern "C" void bgmStreamStop__8Z2SeqMgrFUl();
|
||||
extern "C" void talkInBgm__8Z2SeqMgrFv();
|
||||
extern "C" void talkOutBgm__8Z2SeqMgrFv();
|
||||
extern "C" void menuInBgm__8Z2SeqMgrFv();
|
||||
extern "C" void menuOutBgm__8Z2SeqMgrFv();
|
||||
extern "C" void setBattleBgmOff__8Z2SeqMgrFb();
|
||||
extern "C" void sceneBgmStart__10Z2SceneMgrFv();
|
||||
extern "C" void setUnderWaterFx__11Z2FxLineMgrFb();
|
||||
extern "C" void _savegpr_29();
|
||||
extern "C" void _restgpr_29();
|
||||
extern "C" extern u8 struct_80450860[4];
|
||||
extern "C" extern u8 data_80450B40[4];
|
||||
extern "C" extern u8 data_80450B60[4];
|
||||
extern "C" extern u8 data_80450B80[4];
|
||||
extern "C" extern Z2SeqMgr* data_80450B84;
|
||||
extern "C" extern Z2SeMgr* data_80450B88;
|
||||
extern "C" extern u8 pauseTimer__9dScnPly_c[4];
|
||||
extern "C" u8 mLinkPtr__14Z2CreatureLink[4 + 4 /* padding */];
|
||||
extern "C" extern u8 __OSReport_disable;
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
//
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80455A18-80455A1C 004018 0004+00 1/1 0/0 0/0 .sdata2 @3395 */
|
||||
SECTION_SDATA2 static f32 lit_3395 = 10000000.0f;
|
||||
|
||||
/* 80455A1C-80455A20 00401C 0004+00 3/3 0/0 0/0 .sdata2 @3396 */
|
||||
SECTION_SDATA2 static u8 lit_3396[4] = {
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* 802B5F1C-802B5F70 2B085C 0054+00 0/0 1/1 0/0 .text __ct__11Z2StatusMgrFv */
|
||||
Z2StatusMgr::Z2StatusMgr() : JASGlobalInstance(this) {
|
||||
mHour = 0;
|
||||
@@ -90,14 +20,12 @@ Z2StatusMgr::Z2StatusMgr() : JASGlobalInstance(this) {
|
||||
mIsMenuIn = false;
|
||||
mCameraMapInfo = 0;
|
||||
|
||||
f32 temp_f0 = lit_3395;
|
||||
mPolygonPosition.x = temp_f0;
|
||||
mPolygonPosition.y = temp_f0;
|
||||
mPolygonPosition.z = temp_f0;
|
||||
mPolygonPosition.x = 10000000.0f;
|
||||
mPolygonPosition.y = 10000000.0f;
|
||||
mPolygonPosition.z = 10000000.0f;
|
||||
|
||||
f32 temp_f0_2 = FLOAT_LABEL(lit_3396);
|
||||
mUnderwaterDepth = temp_f0_2;
|
||||
mCameraInWaterDepthRatio = temp_f0_2;
|
||||
mUnderwaterDepth = 0.0f;
|
||||
mCameraInWaterDepthRatio = 0.0f;
|
||||
|
||||
mDemoStatus = 0;
|
||||
mHeartGaugeOn = 0;
|
||||
@@ -108,22 +36,32 @@ void Z2StatusMgr::heartGaugeOn() {
|
||||
mHeartGaugeOn = 2;
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80455A20-80455A24 004020 0004+00 3/3 0/0 0/0 .sdata2 @3467 */
|
||||
SECTION_SDATA2 static f32 lit_3467 = 1.0f;
|
||||
|
||||
/* 80455A24-80455A28 004024 0004+00 1/1 0/0 0/0 .sdata2 @3468 */
|
||||
SECTION_SDATA2 static f32 lit_3468 = -1.0f;
|
||||
|
||||
/* 802B5F7C-802B60CC 2B08BC 0150+00 0/0 1/1 0/0 .text processHeartGaugeSound__11Z2StatusMgrFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void Z2StatusMgr::processHeartGaugeSound() {
|
||||
nofralloc
|
||||
#include "asm/Z2AudioLib/Z2StatusMgr/processHeartGaugeSound__11Z2StatusMgrFv.s"
|
||||
void Z2StatusMgr::processHeartGaugeSound() {
|
||||
if (!i_dComIfGp_event_runCheck() && mHeartGaugeOn != 0) {
|
||||
if (dScnPly_c::isPause()) {
|
||||
mHeartGaugeOn--;
|
||||
}
|
||||
|
||||
if (Z2GetLink() == NULL) {
|
||||
return;
|
||||
}
|
||||
u32 linkHp = Z2GetLink()->getLinkHp();
|
||||
if (linkHp == 0) {
|
||||
return;
|
||||
}
|
||||
if (Z2GetSeqMgr()->isItemGetDemo()) {
|
||||
return;
|
||||
}
|
||||
if (linkHp <= 2) {
|
||||
Z2GetSeMgr()->seStartLevel(Z2SE_ALMOST_DIE_ALERM_3, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
|
||||
} else if (linkHp <= 4) {
|
||||
Z2GetSeMgr()->seStartLevel(Z2SE_ALMOST_DIE_ALERM_2, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
|
||||
} else if (linkHp <= 6) {
|
||||
Z2GetSeMgr()->seStartLevel(Z2SE_ALMOST_DIE_ALERM_1, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 802B60CC-802B6104 2B0A0C 0038+00 0/0 1/1 0/0 .text talkIn__11Z2StatusMgrFv */
|
||||
void Z2StatusMgr::talkIn() {
|
||||
@@ -247,90 +185,109 @@ SECTION_DEAD static char const* const stringBase_8039BED6 = "D_SB07";
|
||||
SECTION_DEAD static char const* const stringBase_8039BEDD = "D_SB08";
|
||||
SECTION_DEAD static char const* const stringBase_8039BEE4 = "D_SB09";
|
||||
SECTION_DEAD static char const* const stringBase_8039BEEB = "D_SB10";
|
||||
SECTION_DEAD static char const* const stringBase_8039BEF2 = "force_end";
|
||||
SECTION_DEAD static char const* const stringBase_8039BEFC = "SAVEREQ";
|
||||
SECTION_DEAD static char const* const stringBase_8039BF04 = "SAVEGID";
|
||||
SECTION_DEAD static char const* const stringBase_8039BF0C = "demo36_01";
|
||||
SECTION_DEAD static char const* const stringBase_8039BF16 = "demo36_02";
|
||||
SECTION_DEAD static char const* const stringBase_8039BF20 = "demo37_01";
|
||||
SECTION_DEAD static char const* const stringBase_8039BF2A = "demo31";
|
||||
SECTION_DEAD static char const* const stringBase_8039BF31 = "demo";
|
||||
SECTION_DEAD static char const* const stringBase_8039BF36 = "force_start";
|
||||
SECTION_DEAD static char const* const stringBase_8039BF42 = "KAGO_HIKARI";
|
||||
SECTION_DEAD static char const* const stringBase_8039BF4E = "KAGO_YAMI";
|
||||
SECTION_DEAD static char const* const stringBase_8039BF58 = "HYRULEOP";
|
||||
SECTION_DEAD static char const* const stringBase_8039BF61 = "R00_start";
|
||||
SECTION_DEAD static char const* const stringBase_8039BF6B = "B_W_START";
|
||||
SECTION_DEAD static char const* const stringBase_8039BF75 = "L0_rampart01";
|
||||
SECTION_DEAD static char const* const stringBase_8039BF82 = "R22-opening";
|
||||
SECTION_DEAD static char const* const stringBase_8039BF8E = "R01-start";
|
||||
SECTION_DEAD static char const* const stringBase_8039BF98 = "LV3R00OP";
|
||||
/* @stringBase0 padding */
|
||||
SECTION_DEAD static char const* const pad_8039BFA1 = "\0\0\0\0\0\0";
|
||||
|
||||
#pragma pop
|
||||
|
||||
/* 803CA508-803CA5C0 -00001 00B8+00 1/1 0/0 0/0 .data @3732 */
|
||||
SECTION_DATA static void* lit_3732[46] = {
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x438),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x3F8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x3C0),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x45C),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x480),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4A4),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4E8),
|
||||
(void*)(((char*)setDemoName__11Z2StatusMgrFPc) + 0x4C8),
|
||||
};
|
||||
|
||||
/* 80455A28-80455A30 004028 0008+00 1/1 0/0 0/0 .sdata2 @3731 */
|
||||
SECTION_SDATA2 static f64 lit_3731 = 4503599627370496.0 /* cast u32 to float */;
|
||||
|
||||
/* 802B61E8-802B671C 2B0B28 0534+00 1/0 7/7 11/11 .text setDemoName__11Z2StatusMgrFPc */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void Z2StatusMgr::setDemoName(char* param_0) {
|
||||
nofralloc
|
||||
#include "asm/Z2AudioLib/Z2StatusMgr/setDemoName__11Z2StatusMgrFPc.s"
|
||||
void Z2StatusMgr::setDemoName(char* demoName) {
|
||||
if (mDemoStatus == 11) {
|
||||
mDemoStatus = 0;
|
||||
if (Z2GetSceneMgr()->isInGame()) {
|
||||
Z2GetSceneMgr()->sceneBgmStart();
|
||||
}
|
||||
}
|
||||
if (demoName == NULL) {
|
||||
if (mDemoStatus == 3) {
|
||||
Z2GetSeqMgr()->setBattleBgmOff(false);
|
||||
} else if (mDemoStatus == 4) {
|
||||
Z2GetSeqMgr()->i_unMuteSceneBgm(struct_80450861);
|
||||
} else if (mDemoStatus == 5) {
|
||||
Z2GetSeqMgr()->subBgmStop();
|
||||
} else if (mDemoStatus == 9) {
|
||||
Z2GetSeqMgr()->bgmStreamStop(0x3c);
|
||||
}
|
||||
if (mDemoStatus != 8) {
|
||||
mDemoStatus = 0;
|
||||
}
|
||||
} else {
|
||||
bool bVar1 = false;
|
||||
if (mDemoStatus == 8) {
|
||||
if (strcmp(demoName, "force_end") == 0) {
|
||||
mDemoStatus = 0;
|
||||
}
|
||||
} else if (strcmp(demoName, "SAVEREQ") == 0 || strcmp(demoName, "SAVEGID") == 0) {
|
||||
mDemoStatus = 11;
|
||||
} else if (strcmp(demoName, "demo36_01") == 0 || strcmp(demoName, "demo36_02") == 0) {
|
||||
mDemoStatus = 4;
|
||||
Z2GetSeqMgr()->i_muteSceneBgm(0x1e, 0.0f);
|
||||
} else if (strcmp(demoName, "demo37_01") == 0) {
|
||||
mDemoStatus = 12;
|
||||
Z2GetSoundMgr()->getSeMgr()->getCategory(9)->getParams()->moveVolume(0.0f, 0);
|
||||
} else if (strncmp(demoName, "demo31", 6) == 0) {
|
||||
mDemoStatus = 13;
|
||||
Z2GetSeMgr()->seMoveVolumeAll(0.0f, 0);
|
||||
} else if (strncmp(demoName, "demo", 4) == 0) {
|
||||
mDemoStatus = 2;
|
||||
} else if (strcmp(demoName, "force_start") == 0) {
|
||||
mDemoStatus = 8;
|
||||
} else if (strcmp(demoName, "force_end") == 0) {
|
||||
mDemoStatus = 0;
|
||||
} else if (strcmp(demoName, "KAGO_HIKARI") == 0) {
|
||||
mDemoStatus = 6;
|
||||
} else if (strcmp(demoName, "KAGO_YAMI") == 0) {
|
||||
mDemoStatus = 7;
|
||||
} else if (strcmp(demoName, "HYRULEOP") == 0) {
|
||||
mDemoStatus = 10;
|
||||
} else {
|
||||
switch (Z2GetSceneMgr()->getCurrentSceneNum()) {
|
||||
case 0xe:
|
||||
if (strcmp(demoName, "R00_start") == 0) {
|
||||
mDemoStatus = 5;
|
||||
Z2GetSeqMgr()->subBgmStart(Z2BGM_HIDDEN_VIL_D1);
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (strcmp(demoName, "B_W_START") == 0) {
|
||||
Z2GetSeqMgr()->bgmStreamPrepare(0x200005f);
|
||||
Z2GetSeqMgr()->bgmStreamPlay();
|
||||
mDemoStatus = 9;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (strcmp(demoName, "L0_rampart01") == 0) {
|
||||
bVar1 = true;
|
||||
}
|
||||
break;
|
||||
case 0x28:
|
||||
if (strcmp(demoName, "R22-opening") == 0) {
|
||||
bVar1 = true;
|
||||
}
|
||||
break;
|
||||
case 0x2b:
|
||||
if (strcmp(demoName, "R01-start") == 0) {
|
||||
bVar1 = true;
|
||||
}
|
||||
break;
|
||||
case 0x2e:
|
||||
if (strcmp(demoName, "LV3R00OP") == 0) {
|
||||
bVar1 = true;
|
||||
}
|
||||
break;
|
||||
case 0x31:
|
||||
if (strcmp(demoName, "R00_start") == 0) {
|
||||
bVar1 = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (bVar1) {
|
||||
Z2GetSeqMgr()->setBattleBgmOff(true);
|
||||
mDemoStatus = 3;
|
||||
} else if (mDemoStatus == 0) {
|
||||
mDemoStatus = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 802B671C-802B6734 2B105C 0018+00 0/0 1/1 0/0 .text processTime__11Z2StatusMgrFv */
|
||||
void Z2StatusMgr::processTime() {
|
||||
@@ -362,21 +319,25 @@ void Z2StatusMgr::setCameraPolygonPos(Vec* i_polygonPos) {
|
||||
/* 802B6784-802B6788 2B10C4 0004+00 0/0 1/1 0/0 .text setCameraGroupInfo__11Z2StatusMgrFUc */
|
||||
void Z2StatusMgr::setCameraGroupInfo(u8) {}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80455A30-80455A34 004030 0004+00 1/1 0/0 0/0 .sdata2 @3798 */
|
||||
SECTION_SDATA2 static f32 lit_3798 = 2000.0f;
|
||||
|
||||
/* 80455A34-80455A38 004034 0004+00 1/1 0/0 0/0 .sdata2 @3799 */
|
||||
SECTION_SDATA2 static f32 lit_3799 = 1.0f / 5.0f;
|
||||
|
||||
/* 802B6788-802B6840 2B10C8 00B8+00 0/0 2/2 0/0 .text setCameraInWaterDepth__11Z2StatusMgrFf */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void Z2StatusMgr::setCameraInWaterDepth(f32 param_0) {
|
||||
nofralloc
|
||||
#include "asm/Z2AudioLib/Z2StatusMgr/setCameraInWaterDepth__11Z2StatusMgrFf.s"
|
||||
void Z2StatusMgr::setCameraInWaterDepth(f32 depth) {
|
||||
if (0.0f == depth) {
|
||||
mCameraInWaterDepthRatio = 0.0f;
|
||||
Z2GetFxLineMgr()->setUnderWaterFx(false);
|
||||
} else {
|
||||
if (Z2GetLink() != NULL) {
|
||||
if (Z2GetLink()->isInWater()) {
|
||||
if (depth >= 2000.0f) {
|
||||
mCameraInWaterDepthRatio = 1.0f;
|
||||
} else {
|
||||
mCameraInWaterDepthRatio =
|
||||
Z2Calc::getParamByExp(depth, 0.0f, 2000.0f, 0.2f, 0.0f, 1.0f, Z2Calc::CURVE_SIGN_0);
|
||||
}
|
||||
Z2GetFxLineMgr()->setUnderWaterFx(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
mUnderwaterDepth = depth;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8039BC88-8039BC88 0282E8 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
//
|
||||
// Generated By: dol2asm
|
||||
// Translation Unit: Z2WolfHowlMgr
|
||||
// Z2WolfHowlMgr
|
||||
//
|
||||
|
||||
#include "Z2AudioLib/Z2WolfHowlMgr.h"
|
||||
@@ -14,22 +13,6 @@
|
||||
#include "dolphin/os/OS.h"
|
||||
#include "d/d_demo.h"
|
||||
|
||||
//
|
||||
// Types:
|
||||
//
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
//
|
||||
// External References:
|
||||
//
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
//
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 804508A0-804508A8 000320 0008+00 1/0 0/0 0/0 .sdata sHowlTobikusa */
|
||||
extern SongNote sHowlTobikusa[4];
|
||||
|
||||
Reference in New Issue
Block a user