mirror of
https://github.com/zeldaret/tp
synced 2026-06-15 14:31:46 -04:00
move d_a_alink and some related stuff (#130)
* clean up d_a_player * move some of daalink * more daalink / daplayer * setup some daalink members * rest of daalink members setup * remove comment * few more matches * remove asm * more matches * more matches + move e_wb_class * fix some d_save classes Co-authored-by: lepelog <lepelog@users.noreply.github.com>
This commit is contained in:
@@ -1,6 +1,109 @@
|
||||
#ifndef Z2CREATURE_H
|
||||
#define Z2CREATURE_H
|
||||
|
||||
#include "SSystem/SComponent/c_xyz.h"
|
||||
#include "Z2AudioLib/Z2SoundObject.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
class Z2Creature {
|
||||
public:
|
||||
Z2Creature();
|
||||
~Z2Creature();
|
||||
|
||||
void init(Vec*, Vec*, u8, u8);
|
||||
void init(Vec*, Vec*, Vec*, u8, u8, u8);
|
||||
void initAnime(void*, bool, f32, f32);
|
||||
void updateAnime(f32, f32);
|
||||
void stopAnime();
|
||||
|
||||
virtual void deleteObject();
|
||||
virtual void setSoundStarter(Z2SoundStarter*);
|
||||
virtual void framework(u32, s8);
|
||||
virtual void startCreatureSound(JAISoundID, u32, s8);
|
||||
virtual void startCreatureSoundLevel(JAISoundID, u32, s8);
|
||||
virtual void startCreatureVoice(JAISoundID, s8);
|
||||
virtual void startCreatureVoiceLevel(JAISoundID, s8);
|
||||
virtual void startCreatureExtraSound(JAISoundID, u32, s8);
|
||||
virtual void startCreatureExtraSoundLevel(JAISoundID, u32, s8);
|
||||
virtual void startCollisionSE(u32, u32);
|
||||
|
||||
private:
|
||||
/* 0x04 */ int field_0x04;
|
||||
/* 0x08 */ Z2SoundObjAnime mSoundObjAnime;
|
||||
/* 0x50 */ Z2SoundObjSimple mSoundObjSimple1;
|
||||
/* 0x70 */ Z2SoundObjSimple mSoundObjSimple2;
|
||||
};
|
||||
|
||||
struct Z2LinkSoundStarter : public Z2SoundStarter {
|
||||
Z2LinkSoundStarter(void);
|
||||
~Z2LinkSoundStarter();
|
||||
/* 802C4928 */ void startSound(JAISoundID, JAISoundHandle*, JGeometry::TVec3<f32> const*, u32,
|
||||
f32, f32, f32, f32, f32, u32);
|
||||
};
|
||||
|
||||
#pragma pack(push, 1)
|
||||
class Z2CreatureLink : public Z2Creature {
|
||||
public:
|
||||
Z2CreatureLink(void);
|
||||
~Z2CreatureLink();
|
||||
|
||||
void setLinkState(u8);
|
||||
void setLinkGroupInfo(u8);
|
||||
void setLinkHp(s32, s32);
|
||||
void setLinkSwordType(s32, s32);
|
||||
void setLinkShieldType(s32, s32);
|
||||
void setLinkBootsType(s32);
|
||||
void deleteObject();
|
||||
void init(Vec*, Vec*, Vec*);
|
||||
void initKantera(Vec*);
|
||||
void deleteKantera(void);
|
||||
void setKanteraState(u8);
|
||||
void framework(u32, s8);
|
||||
void setSinkDepth(s8);
|
||||
void setRiding(bool);
|
||||
void setMagnetized(bool);
|
||||
void setWolfEyeOpen(bool);
|
||||
void startLinkSound(JAISoundID, u32, s8);
|
||||
void startLinkSoundLevel(JAISoundID, u32, s8);
|
||||
void startLinkVoice(JAISoundID, s8);
|
||||
void startLinkVoiceLevel(JAISoundID, s8);
|
||||
void startLinkSwordSound(JAISoundID, u32, s8);
|
||||
void startCollisionSE(u32, u32);
|
||||
int startHitItemSE(u32, u32, Z2SoundObjBase*, float);
|
||||
void setResumeAttack(bool);
|
||||
|
||||
static Z2CreatureLink* mLinkPtr;
|
||||
|
||||
private:
|
||||
/* 0x90 */ Z2LinkSoundStarter mLinkSoundStarter;
|
||||
/* 0x94 */ Z2SoundObjSimple mSoundObjSimple;
|
||||
/* 0xB4 */ cXyz field_0xb4;
|
||||
/* 0xC0 */ u8 mLinkState;
|
||||
/* 0xC1 */ u8 unk193;
|
||||
/* 0xC2 */ u8 unk194;
|
||||
/* 0xC3 */ u8 mLinkHp;
|
||||
/* 0xC4 */ u8 mBootsType;
|
||||
/* 0xC5 */ u8 mLanternState;
|
||||
/* 0xC6 */ u8 unk198;
|
||||
/* 0xC7 */ u8 unk199;
|
||||
/* 0xC8 */ u8 unk200;
|
||||
/* 0xC9 */ u8 unk201;
|
||||
/* 0xCA */ u8 mSinkDepth;
|
||||
/* 0xCB */ u8 flags1;
|
||||
/* 0xCC */ u8 flags2;
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
class Z2CreatureRide {
|
||||
public:
|
||||
void setLinkRiding(bool);
|
||||
|
||||
private:
|
||||
/* 0x00 */ void* vtable;
|
||||
/* 0x04 */ u8 Z2Creature_members[140];
|
||||
/* 0x90 */ u8 Z2RideSoundStarter[8];
|
||||
/* 0x98 */ bool mLinkRiding;
|
||||
/* 0x99 */ u8 padding[3];
|
||||
};
|
||||
|
||||
#endif /* Z2CREATURE_H */
|
||||
|
||||
@@ -1,6 +1,35 @@
|
||||
#ifndef Z2SOUNDHANDLES_H
|
||||
#define Z2SOUNDHANDLES_H
|
||||
|
||||
#include "JSystem/JAudio2/JAISound.h"
|
||||
#include "JSystem/JSupport/JSUList.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
class Z2SoundHandlePool : public JAISoundHandle, JSULink<Z2SoundHandlePool> {};
|
||||
|
||||
class Z2SoundHandles : protected JSUList<Z2SoundHandlePool> {
|
||||
public:
|
||||
Z2SoundHandles();
|
||||
~Z2SoundHandles();
|
||||
|
||||
void initHandlesPool(u8 pNumHandles);
|
||||
void deleteHandlesPool();
|
||||
void getFreeHandle();
|
||||
void getLowPrioSound(JAISoundID);
|
||||
|
||||
bool isActive() const;
|
||||
|
||||
JAISoundHandle* getHandleSoundID(JAISoundID pSoundId);
|
||||
JAISoundHandle* getHandleUserData(u32 pUserData);
|
||||
|
||||
void stopAllSounds(u32 fadeout);
|
||||
|
||||
void setPos(const JGeometry::TVec3<f32>& pos);
|
||||
|
||||
u32 getNumHandles() const { return this->getNumLinks(); }
|
||||
|
||||
private:
|
||||
u8 mNumHandles;
|
||||
};
|
||||
|
||||
#endif /* Z2SOUNDHANDLES_H */
|
||||
|
||||
@@ -1,6 +1,87 @@
|
||||
#ifndef Z2SOUNDOBJECT_H
|
||||
#define Z2SOUNDOBJECT_H
|
||||
|
||||
#include "Z2AudioLib/Z2SoundHandles.h"
|
||||
#include "Z2AudioLib/Z2SoundStarter.h"
|
||||
#include "dolphin/mtx/mtxvec.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
struct JAUSoundAnimationSound {};
|
||||
|
||||
class Z2SoundObjBase : protected Z2SoundHandles {
|
||||
public:
|
||||
Z2SoundObjBase();
|
||||
~Z2SoundObjBase();
|
||||
|
||||
void deleteObject();
|
||||
void startCollisionSE(u32, u32, Z2SoundObjBase*);
|
||||
|
||||
bool isAlive() const { return mIsInitialized; }
|
||||
|
||||
virtual void temp(); // temp to build OK, remove later
|
||||
virtual void framework(u32, s8);
|
||||
virtual void dispose();
|
||||
virtual bool stopOK(Z2SoundHandlePool& pool);
|
||||
virtual void init(Vec* pSoundPos, u8 pNumHandles);
|
||||
virtual void startSound(JAISoundID, u32, s8);
|
||||
virtual void startLevelSound(JAISoundID, u32, s8);
|
||||
|
||||
// Z2SoundObjBase_vtable* vtable;
|
||||
/* 0x14 */ Z2SoundStarter* mSoundStarter;
|
||||
/* 0x18 */ Vec* mSoundPos;
|
||||
/* 0x1C */ u16 field_0x1c;
|
||||
/* 0x1E */ u8 field_0x1e;
|
||||
/* 0x1F */ bool mIsInitialized;
|
||||
};
|
||||
|
||||
class Z2SoundObjSimple : protected Z2SoundObjBase {
|
||||
public:
|
||||
Z2SoundObjSimple();
|
||||
|
||||
virtual void temp(); // temp to build OK, remove later
|
||||
virtual void init(Vec* pSoundPos, u8 pNumHandles);
|
||||
virtual void startSound(JAISoundID, u32, s8);
|
||||
virtual void startLevelSound(JAISoundID, u32, s8);
|
||||
};
|
||||
|
||||
class Z2SoundObjAnime : protected Z2SoundObjBase {
|
||||
public:
|
||||
/* 802BEB94 */ Z2SoundObjAnime();
|
||||
/* 802BEBFC */ void initAnime(void*, bool, f32, f32);
|
||||
/* 802BED68 */ void ageSounds_();
|
||||
/* 802BEED4 */ void updateAnime(f32, f32);
|
||||
/* 802BF304 */ void updateSoundLifeTime_(f32, f32);
|
||||
/* 802BF660 */ void startSoundInner(JGeometry::TVec3<f32> const&, f32, Z2SoundStarter*, u32,
|
||||
s8);
|
||||
/* 802BF890 */ void getSoundID(JAUSoundAnimationSound const*, JGeometry::TVec3<f32> const&,
|
||||
f32);
|
||||
/* 802BF898 */ void playsSound(JAUSoundAnimationSound const*, JGeometry::TVec3<f32> const&,
|
||||
f32);
|
||||
|
||||
virtual void temp(); // temp to build OK, remove later
|
||||
/* 802BEBDC */ virtual void init(Vec*, u8);
|
||||
|
||||
/* 0x20 */ void* field_0x20; // JAUSoundAnimation*
|
||||
/* 0x24 */ int field_0x24;
|
||||
/* 0x28 */ float field_0x28;
|
||||
/* 0x2C */ float field_0x2c;
|
||||
/* 0x30 */ float field_0x30;
|
||||
/* 0x34 */ int field_0x34;
|
||||
/* 0x38 */ int field_0x38;
|
||||
/* 0x3C */ int field_0x3c;
|
||||
/* 0x40 */ int field_0x40;
|
||||
/* 0x44 */ bool field_0x44;
|
||||
};
|
||||
|
||||
class Z2DopplerSoundObjBase : protected Z2SoundHandles {
|
||||
Z2DopplerSoundObjBase();
|
||||
~Z2DopplerSoundObjBase();
|
||||
|
||||
virtual void temp(); // temp to build OK, remove later
|
||||
virtual void framework(u32, s8);
|
||||
virtual void init(Vec*, u8);
|
||||
virtual void startSound(JAISoundID, u32, s8);
|
||||
virtual void startLevelSound(JAISoundID, u32, s8);
|
||||
};
|
||||
|
||||
#endif /* Z2SOUNDOBJECT_H */
|
||||
|
||||
@@ -1,6 +1,29 @@
|
||||
#ifndef Z2SOUNDSTARTER_H
|
||||
#define Z2SOUNDSTARTER_H
|
||||
|
||||
#include "JSystem/JAudio2/JAISound.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
struct Z2SoundStarter_vtable {
|
||||
void* field_0x0;
|
||||
void* field_0x4;
|
||||
void* dtor;
|
||||
void* startSound1;
|
||||
void* startSound2;
|
||||
};
|
||||
|
||||
struct Z2SoundStarter {
|
||||
// Z2SoundStarter_vtable* vtable;
|
||||
|
||||
Z2SoundStarter(bool);
|
||||
virtual ~Z2SoundStarter();
|
||||
|
||||
virtual void startSound(JAISoundID, JAISoundHandle*, JGeometry::TVec3<f32> const*);
|
||||
virtual void startSound(JAISoundID, JAISoundHandle*, JGeometry::TVec3<f32> const*, u32, float,
|
||||
float, float, float, float, u32);
|
||||
|
||||
void setPortData(JAISoundHandle*, u32, u16, s8);
|
||||
void getPortData(JAISoundHandle*, u32, s8);
|
||||
};
|
||||
|
||||
#endif /* Z2SOUNDSTARTER_H */
|
||||
|
||||
@@ -1,6 +1,76 @@
|
||||
#ifndef Z2WOLFHOWLMGR_H
|
||||
#define Z2WOLFHOWLMGR_H
|
||||
|
||||
#include "Z2AudioLib/Z2SoundObject.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
struct Z2WolfHowlData {};
|
||||
|
||||
class Z2WolfHowlMgr {
|
||||
public:
|
||||
Z2WolfHowlMgr();
|
||||
|
||||
void resetState();
|
||||
void calcVolumeMod(float);
|
||||
void getNowPitch();
|
||||
void getNowInputValue();
|
||||
void calcPitchMod(float, float);
|
||||
void startWolfHowlSound(float, float, bool, float);
|
||||
void setCorrectData(s8, Z2WolfHowlData*);
|
||||
void getCorrectLine(u8);
|
||||
void getCorrectLineNum();
|
||||
void checkLine();
|
||||
void getOnLineNum();
|
||||
void startWindStoneSound(s8, Vec*);
|
||||
void startGuideMelody(bool);
|
||||
void skipCorrectDemo();
|
||||
|
||||
private:
|
||||
/* 0x00 */ JAISoundHandle* field_0x00;
|
||||
/* 0x04 */ JAISoundHandle* field_0x04;
|
||||
/* 0x08 */ JAISoundHandle* field_0x08;
|
||||
/* 0x0C */ Z2WolfHowlData* field_0x0c;
|
||||
/* 0x10 */ void* field_0x10;
|
||||
/* 0x14 */ float mNowInputValue;
|
||||
/* 0x18 */ float field_0x18;
|
||||
/* 0x1C */ float field_0x1c;
|
||||
/* 0x20 */ float field_0x20;
|
||||
/* 0x24 */ float field_0x24;
|
||||
/* 0x28 */ float field_0x28;
|
||||
/* 0x2C */ u8 field_0x2c[4];
|
||||
/* 0x30 */ float field_0x30;
|
||||
/* 0x34 */ float field_0x34;
|
||||
/* 0x38 */ float field_0x38;
|
||||
/* 0x3C */ float field_0x3c;
|
||||
/* 0x40 */ float field_0x40;
|
||||
/* 0x44 */ float field_0x44;
|
||||
/* 0x48 */ float field_0x48;
|
||||
/* 0x4C */ float field_0x4c;
|
||||
/* 0x50 */ float field_0x50;
|
||||
/* 0x54 */ float field_0x54;
|
||||
/* 0x58 */ float field_0x58;
|
||||
/* 0x5C */ float field_0x5c;
|
||||
/* 0x60 */ float field_0x60;
|
||||
/* 0x64 */ float field_0x64;
|
||||
/* 0x68 */ float field_0x68;
|
||||
/* 0x6C */ float field_0x6c;
|
||||
/* 0x70 */ float field_0x70;
|
||||
/* 0x74 */ float field_0x74;
|
||||
/* 0x78 */ float field_0x78;
|
||||
/* 0x7C */ float field_0x7c;
|
||||
/* 0x80 */ float field_0x80;
|
||||
/* 0x84 */ float field_0x84;
|
||||
/* 0x88 */ void* mTimer;
|
||||
/* 0x8C */ u8 mReleaseTimer;
|
||||
/* 0x8D */ u8 field_0x8d;
|
||||
/* 0x8E */ u8 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;
|
||||
};
|
||||
|
||||
#endif /* Z2WOLFHOWLMGR_H */
|
||||
|
||||
Reference in New Issue
Block a user