diff options
| author | jdflyer <jdflyer10@gmail.com> | 2022-12-29 15:22:26 -0700 |
|---|---|---|
| committer | jdflyer <jdflyer10@gmail.com> | 2022-12-29 15:22:26 -0700 |
| commit | 56764ac3bdefe04047693f8f004d0320256b8792 (patch) | |
| tree | cc472fac5434693b64975d67473aaf1e9a1b0a85 /include | |
| parent | ae040aa688d6937ded96ea46e5ab804019d1ee85 (diff) | |
Some Z2WolfHowlMgr progress
Diffstat (limited to 'include')
| -rw-r--r-- | include/JSystem/JAudio2/JAISoundHandles.h | 2 | ||||
| -rw-r--r-- | include/JSystem/JAudio2/JASGadget.h | 29 | ||||
| -rw-r--r-- | include/Z2AudioLib/Z2WolfHowlMgr.h | 45 |
3 files changed, 38 insertions, 38 deletions
diff --git a/include/JSystem/JAudio2/JAISoundHandles.h b/include/JSystem/JAudio2/JAISoundHandles.h index 850358facd..d79baaa2dc 100644 --- a/include/JSystem/JAudio2/JAISoundHandles.h +++ b/include/JSystem/JAudio2/JAISoundHandles.h @@ -10,7 +10,7 @@ class JAISoundID; class JAISoundHandle { public: - JAISoundHandle(); + JAISoundHandle() {sound_ = NULL;}; ~JAISoundHandle() {} bool isSoundAttached() const { return sound_ != NULL; } diff --git a/include/JSystem/JAudio2/JASGadget.h b/include/JSystem/JAudio2/JASGadget.h index 811aeacb3b..578ad9a5be 100644 --- a/include/JSystem/JAudio2/JASGadget.h +++ b/include/JSystem/JAudio2/JASGadget.h @@ -6,18 +6,35 @@ template <class T> class JASGlobalInstance { public: - T* getInstance() { return sInstance; } + inline T* getInstance() { return sInstance; } - JASGlobalInstance(bool param) { + inline JASGlobalInstance(bool param) { if (param) { ASSERT(sInstance == 0); - if (this!=NULL) { - sInstance = this - sizeof(T); - } + //if (this!=NULL) { + 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; }; +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 */ diff --git a/include/Z2AudioLib/Z2WolfHowlMgr.h b/include/Z2AudioLib/Z2WolfHowlMgr.h index ba41b0539e..224aa60485 100644 --- a/include/Z2AudioLib/Z2WolfHowlMgr.h +++ b/include/Z2AudioLib/Z2WolfHowlMgr.h @@ -1,8 +1,9 @@ #ifndef Z2WOLFHOWLMGR_H #define Z2WOLFHOWLMGR_H -#include "Z2AudioLib/Z2SoundObject.h" #include "dolphin/types.h" +#include "Z2AudioLib/Z2SoundObject.h" +#include "JSystem/JAudio2/JASGadget.h" /* * Z2WolfHowlData @@ -17,7 +18,7 @@ struct Z2WolfHowlData { u16* mSongData; }; -class Z2WolfHowlMgr { +class Z2WolfHowlMgr : public JASGlobalInstance<Z2WolfHowlMgr> { public: Z2WolfHowlMgr(); @@ -36,10 +37,11 @@ public: void startGuideMelody(bool); void skipCorrectDemo(); + private: - /* 0x00 */ JAISoundHandle* field_0x00; - /* 0x04 */ JAISoundHandle* field_0x04; - /* 0x08 */ JAISoundHandle* field_0x08; + /* 0x00 */ JAISoundHandle field_0x00; + /* 0x04 */ JAISoundHandle field_0x04; + /* 0x08 */ JAISoundHandle field_0x08; /* 0x0C */ Z2WolfHowlData* mpCurSong; /* 0x10 */ Z2WolfHowlData** mpSongList; /* 0x14 */ f32 mNowInputValue; @@ -51,37 +53,18 @@ private: /* 0x2C */ u8 field_0x2c[4]; /* 0x30 */ f32 field_0x30; /* 0x34 */ f32 field_0x34; - /* 0x38 */ f32 field_0x38; - /* 0x3C */ f32 field_0x3c; - /* 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; + /* 0x38 */ f32 field_0x38[10]; + /* 0x60 */ f32 field_0x60[10]; /* 0x88 */ void* mTimer; /* 0x8C */ u8 mReleaseTimer; /* 0x8D */ u8 field_0x8d; - /* 0x8E */ u8 mCorrectCurveID; + /* 0x8E */ s8 mCorrectCurveID; /* 0x8F */ u8 field_0x8f; /* 0x90 */ s16 field_0x90; - /* 0x92 */ u8 field_0x92[20]; - /* 0xA6 */ u8 field_0xa6[0x14]; - /* 0xBA */ u8 field_0xba; - /* 0xBB */ u8 field_0xbb; - /* 0xBC */ u8 field_0xbc; + /* 0x92 */ u16 field_0x92[20]; + /* 0xBA */ s8 field_0xba; + /* 0xBB */ s8 field_0xbb; + /* 0xBC */ s8 field_0xbc; }; #endif /* Z2WOLFHOWLMGR_H */ |
