mirror of
https://github.com/encounter/tp.git
synced 2026-07-11 06:18:46 -07:00
Some Z2WolfHowlMgr progress
This commit is contained in:
@@ -10,7 +10,7 @@ class JAISoundID;
|
|||||||
|
|
||||||
class JAISoundHandle {
|
class JAISoundHandle {
|
||||||
public:
|
public:
|
||||||
JAISoundHandle();
|
JAISoundHandle() {sound_ = NULL;};
|
||||||
~JAISoundHandle() {}
|
~JAISoundHandle() {}
|
||||||
|
|
||||||
bool isSoundAttached() const { return sound_ != NULL; }
|
bool isSoundAttached() const { return sound_ != NULL; }
|
||||||
|
|||||||
@@ -6,18 +6,35 @@
|
|||||||
template <class T>
|
template <class T>
|
||||||
class JASGlobalInstance {
|
class JASGlobalInstance {
|
||||||
public:
|
public:
|
||||||
T* getInstance() { return sInstance; }
|
inline T* getInstance() { return sInstance; }
|
||||||
|
|
||||||
JASGlobalInstance(bool param) {
|
inline JASGlobalInstance(bool param) {
|
||||||
if (param) {
|
if (param) {
|
||||||
ASSERT(sInstance == 0);
|
ASSERT(sInstance == 0);
|
||||||
if (this!=NULL) {
|
//if (this!=NULL) {
|
||||||
sInstance = this - sizeof(T);
|
sInstance = (T*)this;
|
||||||
}
|
//We need a better way to compute the location of sInstance
|
||||||
|
//sInstance = (T*)((char*)this-(char*)&(((T*)NULL)->JASGlobalInstance<T>));
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static T* sInstance;
|
static T* sInstance;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class Parent {
|
||||||
|
public:
|
||||||
|
int x;
|
||||||
|
};
|
||||||
|
|
||||||
|
class Parent2 {
|
||||||
|
public:
|
||||||
|
int y;
|
||||||
|
};
|
||||||
|
|
||||||
|
class Child : public Parent, public Parent2 {
|
||||||
|
public:
|
||||||
|
void func() {
|
||||||
|
Parent2::y = 5; // Access the member x of the Parent class
|
||||||
|
}
|
||||||
|
};
|
||||||
#endif /* JASGADGET_H */
|
#endif /* JASGADGET_H */
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
#ifndef Z2WOLFHOWLMGR_H
|
#ifndef Z2WOLFHOWLMGR_H
|
||||||
#define Z2WOLFHOWLMGR_H
|
#define Z2WOLFHOWLMGR_H
|
||||||
|
|
||||||
#include "Z2AudioLib/Z2SoundObject.h"
|
|
||||||
#include "dolphin/types.h"
|
#include "dolphin/types.h"
|
||||||
|
#include "Z2AudioLib/Z2SoundObject.h"
|
||||||
|
#include "JSystem/JAudio2/JASGadget.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Z2WolfHowlData
|
* Z2WolfHowlData
|
||||||
@@ -17,7 +18,7 @@ struct Z2WolfHowlData {
|
|||||||
u16* mSongData;
|
u16* mSongData;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Z2WolfHowlMgr {
|
class Z2WolfHowlMgr : public JASGlobalInstance<Z2WolfHowlMgr> {
|
||||||
public:
|
public:
|
||||||
Z2WolfHowlMgr();
|
Z2WolfHowlMgr();
|
||||||
|
|
||||||
@@ -36,10 +37,11 @@ public:
|
|||||||
void startGuideMelody(bool);
|
void startGuideMelody(bool);
|
||||||
void skipCorrectDemo();
|
void skipCorrectDemo();
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/* 0x00 */ JAISoundHandle* field_0x00;
|
/* 0x00 */ JAISoundHandle field_0x00;
|
||||||
/* 0x04 */ JAISoundHandle* field_0x04;
|
/* 0x04 */ JAISoundHandle field_0x04;
|
||||||
/* 0x08 */ JAISoundHandle* field_0x08;
|
/* 0x08 */ JAISoundHandle field_0x08;
|
||||||
/* 0x0C */ Z2WolfHowlData* mpCurSong;
|
/* 0x0C */ Z2WolfHowlData* mpCurSong;
|
||||||
/* 0x10 */ Z2WolfHowlData** mpSongList;
|
/* 0x10 */ Z2WolfHowlData** mpSongList;
|
||||||
/* 0x14 */ f32 mNowInputValue;
|
/* 0x14 */ f32 mNowInputValue;
|
||||||
@@ -51,37 +53,18 @@ private:
|
|||||||
/* 0x2C */ u8 field_0x2c[4];
|
/* 0x2C */ u8 field_0x2c[4];
|
||||||
/* 0x30 */ f32 field_0x30;
|
/* 0x30 */ f32 field_0x30;
|
||||||
/* 0x34 */ f32 field_0x34;
|
/* 0x34 */ f32 field_0x34;
|
||||||
/* 0x38 */ f32 field_0x38;
|
/* 0x38 */ f32 field_0x38[10];
|
||||||
/* 0x3C */ f32 field_0x3c;
|
/* 0x60 */ f32 field_0x60[10];
|
||||||
/* 0x40 */ f32 field_0x40;
|
|
||||||
/* 0x44 */ f32 field_0x44;
|
|
||||||
/* 0x48 */ f32 field_0x48;
|
|
||||||
/* 0x4C */ f32 field_0x4c;
|
|
||||||
/* 0x50 */ f32 field_0x50;
|
|
||||||
/* 0x54 */ f32 field_0x54;
|
|
||||||
/* 0x58 */ f32 field_0x58;
|
|
||||||
/* 0x5C */ f32 field_0x5c;
|
|
||||||
/* 0x60 */ f32 field_0x60;
|
|
||||||
/* 0x64 */ f32 field_0x64;
|
|
||||||
/* 0x68 */ f32 field_0x68;
|
|
||||||
/* 0x6C */ f32 field_0x6c;
|
|
||||||
/* 0x70 */ f32 field_0x70;
|
|
||||||
/* 0x74 */ f32 field_0x74;
|
|
||||||
/* 0x78 */ f32 field_0x78;
|
|
||||||
/* 0x7C */ f32 field_0x7c;
|
|
||||||
/* 0x80 */ f32 field_0x80;
|
|
||||||
/* 0x84 */ f32 field_0x84;
|
|
||||||
/* 0x88 */ void* mTimer;
|
/* 0x88 */ void* mTimer;
|
||||||
/* 0x8C */ u8 mReleaseTimer;
|
/* 0x8C */ u8 mReleaseTimer;
|
||||||
/* 0x8D */ u8 field_0x8d;
|
/* 0x8D */ u8 field_0x8d;
|
||||||
/* 0x8E */ u8 mCorrectCurveID;
|
/* 0x8E */ s8 mCorrectCurveID;
|
||||||
/* 0x8F */ u8 field_0x8f;
|
/* 0x8F */ u8 field_0x8f;
|
||||||
/* 0x90 */ s16 field_0x90;
|
/* 0x90 */ s16 field_0x90;
|
||||||
/* 0x92 */ u8 field_0x92[20];
|
/* 0x92 */ u16 field_0x92[20];
|
||||||
/* 0xA6 */ u8 field_0xa6[0x14];
|
/* 0xBA */ s8 field_0xba;
|
||||||
/* 0xBA */ u8 field_0xba;
|
/* 0xBB */ s8 field_0xbb;
|
||||||
/* 0xBB */ u8 field_0xbb;
|
/* 0xBC */ s8 field_0xbc;
|
||||||
/* 0xBC */ u8 field_0xbc;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* Z2WOLFHOWLMGR_H */
|
#endif /* Z2WOLFHOWLMGR_H */
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ extern "C" void _savegpr_29();
|
|||||||
extern "C" void _restgpr_28();
|
extern "C" void _restgpr_28();
|
||||||
extern "C" void _restgpr_29();
|
extern "C" void _restgpr_29();
|
||||||
extern "C" extern u32 __float_nan;
|
extern "C" extern u32 __float_nan;
|
||||||
extern "C" extern u8 data_80450B38[4];
|
extern "C" extern Z2WolfHowlMgr* data_80450B38;
|
||||||
extern "C" extern u8 data_80450B44[4];
|
extern "C" extern u8 data_80450B44[4];
|
||||||
extern "C" extern u8 data_80450B60[4];
|
extern "C" extern u8 data_80450B60[4];
|
||||||
extern "C" extern u8 data_80450B74[4];
|
extern "C" extern u8 data_80450B74[4];
|
||||||
@@ -194,6 +194,35 @@ SECTION_SDATA2 static u8 lit_3485[4] = {
|
|||||||
SECTION_SDATA2 static f32 lit_3486 = 1.0f;
|
SECTION_SDATA2 static f32 lit_3486 = 1.0f;
|
||||||
|
|
||||||
/* 802CAAC0-802CAB8C 2C5400 00CC+00 0/0 1/1 0/0 .text __ct__13Z2WolfHowlMgrFv */
|
/* 802CAAC0-802CAB8C 2C5400 00CC+00 0/0 1/1 0/0 .text __ct__13Z2WolfHowlMgrFv */
|
||||||
|
#ifdef NONMATCHING
|
||||||
|
Z2WolfHowlMgr* JASGlobalInstance<Z2WolfHowlMgr>::sInstance = reinterpret_cast<Z2WolfHowlMgr*>(data_80450B38);
|
||||||
|
Z2WolfHowlMgr::Z2WolfHowlMgr() : JASGlobalInstance<Z2WolfHowlMgr>(true) {
|
||||||
|
mpCurSong = NULL;
|
||||||
|
mNowInputValue = 0.0f;
|
||||||
|
field_0x18 = 1.0f;
|
||||||
|
field_0x1c = 1.0f;
|
||||||
|
field_0x20 = cPitchCenter;
|
||||||
|
field_0x24 = cPitchCenter;
|
||||||
|
field_0x28 = 1.0f;
|
||||||
|
mTimer = NULL;
|
||||||
|
mReleaseTimer = 0;
|
||||||
|
mCorrectCurveID = -1;
|
||||||
|
field_0x90 = -1;
|
||||||
|
field_0xba = 0;
|
||||||
|
field_0xbb = 0;
|
||||||
|
field_0xbc = 0;
|
||||||
|
for (u8 i = 0; i<20; i++) {
|
||||||
|
field_0x92[i] = 0;
|
||||||
|
}
|
||||||
|
for (u8 i = 0; i<10; i++) {
|
||||||
|
field_0x38[i] = 0.0f;
|
||||||
|
field_0x60[i] = 0.0f;
|
||||||
|
}
|
||||||
|
field_0x34 = 0.0f;
|
||||||
|
field_0x30 = 0.0f;
|
||||||
|
mpSongList = (Z2WolfHowlData**)&sGuideData;
|
||||||
|
}
|
||||||
|
#else
|
||||||
#pragma push
|
#pragma push
|
||||||
#pragma optimization_level 0
|
#pragma optimization_level 0
|
||||||
#pragma optimizewithasm off
|
#pragma optimizewithasm off
|
||||||
@@ -202,8 +231,25 @@ asm Z2WolfHowlMgr::Z2WolfHowlMgr() {
|
|||||||
#include "asm/Z2AudioLib/Z2WolfHowlMgr/__ct__13Z2WolfHowlMgrFv.s"
|
#include "asm/Z2AudioLib/Z2WolfHowlMgr/__ct__13Z2WolfHowlMgrFv.s"
|
||||||
}
|
}
|
||||||
#pragma pop
|
#pragma pop
|
||||||
|
#endif
|
||||||
|
|
||||||
/* 802CAB8C-802CABEC 2C54CC 0060+00 1/1 0/0 0/0 .text resetState__13Z2WolfHowlMgrFv */
|
/* 802CAB8C-802CABEC 2C54CC 0060+00 1/1 0/0 0/0 .text resetState__13Z2WolfHowlMgrFv */
|
||||||
|
#ifdef NONMATCHING
|
||||||
|
void Z2WolfHowlMgr::resetState() {
|
||||||
|
field_0x18 = 1.0f;
|
||||||
|
field_0x24 = cPitchCenter;
|
||||||
|
field_0x28 = 1.0f;
|
||||||
|
mTimer = NULL;
|
||||||
|
mReleaseTimer = 0;
|
||||||
|
field_0xba = 0;
|
||||||
|
for (u8 i = 0; i<10; i++) {
|
||||||
|
field_0x38[i] = 0.0f;
|
||||||
|
field_0x60[i] = 0.0f;
|
||||||
|
}
|
||||||
|
field_0x34 = 0.0f;
|
||||||
|
field_0x30 = 0.0f;
|
||||||
|
}
|
||||||
|
#else
|
||||||
#pragma push
|
#pragma push
|
||||||
#pragma optimization_level 0
|
#pragma optimization_level 0
|
||||||
#pragma optimizewithasm off
|
#pragma optimizewithasm off
|
||||||
@@ -212,6 +258,7 @@ asm void Z2WolfHowlMgr::resetState() {
|
|||||||
#include "asm/Z2AudioLib/Z2WolfHowlMgr/resetState__13Z2WolfHowlMgrFv.s"
|
#include "asm/Z2AudioLib/Z2WolfHowlMgr/resetState__13Z2WolfHowlMgrFv.s"
|
||||||
}
|
}
|
||||||
#pragma pop
|
#pragma pop
|
||||||
|
#endif
|
||||||
|
|
||||||
/* ############################################################################################## */
|
/* ############################################################################################## */
|
||||||
/* 80455E68-80455E6C 004468 0004+00 2/2 0/0 0/0 .sdata2 @3527 */
|
/* 80455E68-80455E6C 004468 0004+00 2/2 0/0 0/0 .sdata2 @3527 */
|
||||||
|
|||||||
Reference in New Issue
Block a user