mirror of https://github.com/PrimeDecomp/prime.git
DolphinCAudioGroupSet progress
Former-commit-id: 4d0a1f68e8740e0af510d3f0819c36e1b1c70c02
This commit is contained in:
parent
5402539211
commit
efc1831ed7
|
@ -2054,7 +2054,7 @@ GetItemCapacity__12CPlayerStateCFQ212CPlayerState9EItemType = .text:0x80091AF4;
|
||||||
GetItemAmount__12CPlayerStateCFQ212CPlayerState9EItemType = .text:0x80091B1C; // type:function size:0x78 scope:global
|
GetItemAmount__12CPlayerStateCFQ212CPlayerState9EItemType = .text:0x80091B1C; // type:function size:0x78 scope:global
|
||||||
DecrPickUp__12CPlayerStateFQ212CPlayerState9EItemTypei = .text:0x80091B94; // type:function size:0x5C scope:global
|
DecrPickUp__12CPlayerStateFQ212CPlayerState9EItemTypei = .text:0x80091B94; // type:function size:0x5C scope:global
|
||||||
IncrPickUp__12CPlayerStateFQ212CPlayerState9EItemTypei = .text:0x80091BF0; // type:function size:0x110 scope:global
|
IncrPickUp__12CPlayerStateFQ212CPlayerState9EItemTypei = .text:0x80091BF0; // type:function size:0x110 scope:global
|
||||||
ResetAndIncrPickUp__12CPlayerStateFQ212CPlayerState9EItemTypei = .text:0x80091D00; // type:function size:0x30 scope:global
|
SetPickup__12CPlayerStateFQ212CPlayerState9EItemTypei = .text:0x80091D00; // type:function size:0x30 scope:global
|
||||||
CalculateHealth__12CPlayerStateFv = .text:0x80091D30; // type:function size:0x38 scope:global
|
CalculateHealth__12CPlayerStateFv = .text:0x80091D30; // type:function size:0x38 scope:global
|
||||||
InitializePowerUp__12CPlayerStateFQ212CPlayerState9EItemTypei = .text:0x80091D68; // type:function size:0x124 scope:global
|
InitializePowerUp__12CPlayerStateFQ212CPlayerState9EItemTypei = .text:0x80091D68; // type:function size:0x124 scope:global
|
||||||
SetPowerUp__12CPlayerStateFQ212CPlayerState9EItemTypei = .text:0x80091E8C; // type:function size:0x30 scope:global
|
SetPowerUp__12CPlayerStateFQ212CPlayerState9EItemTypei = .text:0x80091E8C; // type:function size:0x30 scope:global
|
||||||
|
@ -11477,9 +11477,9 @@ fn_80296D30 = .text:0x80296D30; // type:function size:0x7C
|
||||||
fn_80296DAC = .text:0x80296DAC; // type:function size:0x78
|
fn_80296DAC = .text:0x80296DAC; // type:function size:0x78
|
||||||
Reset__Q27CPlayer12CInputFilterFv = .text:0x80296E24; // type:function size:0x148 scope:global
|
Reset__Q27CPlayer12CInputFilterFv = .text:0x80296E24; // type:function size:0x148 scope:global
|
||||||
Passes__Q27CPlayer12CInputFilterFv = .text:0x80296F6C; // type:function size:0x480 scope:global
|
Passes__Q27CPlayer12CInputFilterFv = .text:0x80296F6C; // type:function size:0x480 scope:global
|
||||||
_getElementBoundsCheck<Q24rstl18reserved_vector<i>>__FRCQ24rstl18reserved_vector<i>i = .text:0x802973EC; // type:function size:0x3C scope:global
|
_getElementBoundsCheck<i,20>__FRCQ24rstl21reserved_vector<i,20>i = .text:0x802973EC; // type:function size:0x3C scope:global
|
||||||
_getElementBoundsCheck<Q24rstl27reserved_vector<9CVector2f>>__FRCQ24rstl27reserved_vector<9CVector2f>i = .text:0x80297428; // type:function size:0x44 scope:global
|
_getElementBoundsCheck<9CVector2f,20>__FRCQ24rstl30reserved_vector<9CVector2f,20>i = .text:0x80297428; // type:function size:0x44 scope:global
|
||||||
_getElementBoundsCheck<Q24rstl27reserved_vector<9CVector3f>>__FRCQ24rstl27reserved_vector<9CVector3f>i = .text:0x8029746C; // type:function size:0x4C scope:global
|
_getElementBoundsCheck<9CVector3f,20>__FRCQ24rstl30reserved_vector<9CVector3f,20>i = .text:0x8029746C; // type:function size:0x4C scope:global
|
||||||
AddSample__Q27CPlayer12CInputFilterFiRC9CVector3fRC9CVector3fRC9CVector2f = .text:0x802974B8; // type:function size:0x514 scope:global
|
AddSample__Q27CPlayer12CInputFilterFiRC9CVector3fRC9CVector3fRC9CVector2f = .text:0x802974B8; // type:function size:0x514 scope:global
|
||||||
__ct__Q27CPlayer12CInputFilterFv = .text:0x802979CC; // type:function size:0x18 scope:global
|
__ct__Q27CPlayer12CInputFilterFv = .text:0x802979CC; // type:function size:0x18 scope:global
|
||||||
GetIsContinueDraw__10CSlideShowFv = .text:0x802979E4; // type:function size:0x8 scope:global
|
GetIsContinueDraw__10CSlideShowFv = .text:0x802979E4; // type:function size:0x8 scope:global
|
||||||
|
|
|
@ -2054,7 +2054,7 @@ GetItemCapacity__12CPlayerStateCFQ212CPlayerState9EItemType = .text:0x80091B70;
|
||||||
GetItemAmount__12CPlayerStateCFQ212CPlayerState9EItemType = .text:0x80091B98; // type:function size:0x78 scope:global
|
GetItemAmount__12CPlayerStateCFQ212CPlayerState9EItemType = .text:0x80091B98; // type:function size:0x78 scope:global
|
||||||
DecrPickUp__12CPlayerStateFQ212CPlayerState9EItemTypei = .text:0x80091C10; // type:function size:0x5C scope:global
|
DecrPickUp__12CPlayerStateFQ212CPlayerState9EItemTypei = .text:0x80091C10; // type:function size:0x5C scope:global
|
||||||
IncrPickUp__12CPlayerStateFQ212CPlayerState9EItemTypei = .text:0x80091C6C; // type:function size:0x110 scope:global
|
IncrPickUp__12CPlayerStateFQ212CPlayerState9EItemTypei = .text:0x80091C6C; // type:function size:0x110 scope:global
|
||||||
ResetAndIncrPickUp__12CPlayerStateFQ212CPlayerState9EItemTypei = .text:0x80091D7C; // type:function size:0x30 scope:global
|
SetPickup__12CPlayerStateFQ212CPlayerState9EItemTypei = .text:0x80091D7C; // type:function size:0x30 scope:global
|
||||||
CalculateHealth__12CPlayerStateFv = .text:0x80091DAC; // type:function size:0x38 scope:global
|
CalculateHealth__12CPlayerStateFv = .text:0x80091DAC; // type:function size:0x38 scope:global
|
||||||
InitializePowerUp__12CPlayerStateFQ212CPlayerState9EItemTypei = .text:0x80091DE4; // type:function size:0x124 scope:global
|
InitializePowerUp__12CPlayerStateFQ212CPlayerState9EItemTypei = .text:0x80091DE4; // type:function size:0x124 scope:global
|
||||||
SetPowerUp__12CPlayerStateFQ212CPlayerState9EItemTypei = .text:0x80091F08; // type:function size:0x30 scope:global
|
SetPowerUp__12CPlayerStateFQ212CPlayerState9EItemTypei = .text:0x80091F08; // type:function size:0x30 scope:global
|
||||||
|
@ -11490,9 +11490,9 @@ fn_80296D30 = .text:0x80296DDC; // type:function size:0x7C scope:global
|
||||||
fn_80296DAC = .text:0x80296E58; // type:function size:0x78 scope:global
|
fn_80296DAC = .text:0x80296E58; // type:function size:0x78 scope:global
|
||||||
Reset__Q27CPlayer12CInputFilterFv = .text:0x80296ED0; // type:function size:0x148 scope:global
|
Reset__Q27CPlayer12CInputFilterFv = .text:0x80296ED0; // type:function size:0x148 scope:global
|
||||||
Passes__Q27CPlayer12CInputFilterFv = .text:0x80297018; // type:function size:0x480 scope:global
|
Passes__Q27CPlayer12CInputFilterFv = .text:0x80297018; // type:function size:0x480 scope:global
|
||||||
_getElementBoundsCheck<Q24rstl18reserved_vector<i>>__FRCQ24rstl18reserved_vector<i>i = .text:0x80297498; // type:function size:0x3C scope:global
|
_getElementBoundsCheck<i,20>__FRCQ24rstl21reserved_vector<i,20>i = .text:0x80297498; // type:function size:0x3C scope:global
|
||||||
_getElementBoundsCheck<Q24rstl27reserved_vector<9CVector2f>>__FRCQ24rstl27reserved_vector<9CVector2f>i = .text:0x802974D4; // type:function size:0x44 scope:global
|
_getElementBoundsCheck<9CVector2f,20>__FRCQ24rstl30reserved_vector<9CVector2f,20>i = .text:0x802974D4; // type:function size:0x44 scope:global
|
||||||
_getElementBoundsCheck<Q24rstl27reserved_vector<9CVector3f>>__FRCQ24rstl27reserved_vector<9CVector3f>i = .text:0x80297518; // type:function size:0x4C scope:global
|
_getElementBoundsCheck<9CVector2f,20>__FRCQ24rstl30reserved_vector<9CVector2f,20>i = .text:0x80297518; // type:function size:0x4C scope:global
|
||||||
AddSample__Q27CPlayer12CInputFilterFiRC9CVector3fRC9CVector3fRC9CVector2f = .text:0x80297564; // type:function size:0x514 scope:global
|
AddSample__Q27CPlayer12CInputFilterFiRC9CVector3fRC9CVector3fRC9CVector2f = .text:0x80297564; // type:function size:0x514 scope:global
|
||||||
__ct__Q27CPlayer12CInputFilterFv = .text:0x80297A78; // type:function size:0x18 scope:global
|
__ct__Q27CPlayer12CInputFilterFv = .text:0x80297A78; // type:function size:0x18 scope:global
|
||||||
GetIsContinueDraw__10CSlideShowFv = .text:0x80297A90; // type:function size:0x8 scope:global
|
GetIsContinueDraw__10CSlideShowFv = .text:0x80297A90; // type:function size:0x8 scope:global
|
||||||
|
|
|
@ -16,6 +16,7 @@ public:
|
||||||
CAudioGrpSetLoc(const rstl::auto_ptr< uchar >& data, int length);
|
CAudioGrpSetLoc(const rstl::auto_ptr< uchar >& data, int length);
|
||||||
const rstl::string& GetBaseDirName() const { return x10_baseDirName; }
|
const rstl::string& GetBaseDirName() const { return x10_baseDirName; }
|
||||||
const rstl::string& GetGroupSetName() const { return x20_groupSetName; }
|
const rstl::string& GetGroupSetName() const { return x20_groupSetName; }
|
||||||
|
void FreeSampleBuffer();
|
||||||
uint AramUsage() const;
|
uint AramUsage() const;
|
||||||
const void* GetPool() const;
|
const void* GetPool() const;
|
||||||
const void* GetProject() const;
|
const void* GetProject() const;
|
||||||
|
@ -45,7 +46,7 @@ public:
|
||||||
private:
|
private:
|
||||||
rstl::string x0_baseDir;
|
rstl::string x0_baseDir;
|
||||||
rstl::string x10_groupSetName;
|
rstl::string x10_groupSetName;
|
||||||
rstl::optional_object< TLockedToken< CAudioGrpSetLoc > > x10_groupSetTok;
|
rstl::optional_object< TLockedToken< CAudioGrpSetLoc > > x20_groupSetTok;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _CAUDIOGROUPSET
|
#endif // _CAUDIOGROUPSET
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#ifndef _CPLAYER
|
#ifndef _CPLAYER
|
||||||
#define _CPLAYER
|
#define _CPLAYER
|
||||||
|
|
||||||
|
#include "rstl/reserved_vector.hpp"
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
#include "MetroidPrime/CAnimRes.hpp"
|
#include "MetroidPrime/CAnimRes.hpp"
|
||||||
|
@ -72,6 +73,19 @@ class CPlayer : public CPhysicsActor {
|
||||||
bool AffectsThermal() const { return x28_affectsThermal; }
|
bool AffectsThermal() const { return x28_affectsThermal; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class CInputFilter {
|
||||||
|
public:
|
||||||
|
CInputFilter();
|
||||||
|
void AddSample(int, const CVector3f&, const CVector3f&, const CVector2f&);
|
||||||
|
bool Passes();
|
||||||
|
void Reset();
|
||||||
|
private:
|
||||||
|
rstl::reserved_vector<int, 20> x0_;
|
||||||
|
rstl::reserved_vector<CVector3f, 20> x54_;
|
||||||
|
rstl::reserved_vector<CVector3f, 20> x148_;
|
||||||
|
rstl::reserved_vector<CVector2f, 20> x23c_;
|
||||||
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum EPlayerOrbitState {
|
enum EPlayerOrbitState {
|
||||||
kOS_NoOrbit,
|
kOS_NoOrbit,
|
||||||
|
|
|
@ -4,17 +4,20 @@
|
||||||
#include "Kyoto/Streams/CMemoryInStream.hpp"
|
#include "Kyoto/Streams/CMemoryInStream.hpp"
|
||||||
|
|
||||||
#include "Kyoto/CFactoryMgr.hpp"
|
#include "Kyoto/CFactoryMgr.hpp"
|
||||||
|
#include "rstl/auto_ptr.hpp"
|
||||||
|
|
||||||
CAudioGroupSet::CAudioGroupSet(const TLockedToken< CAudioGrpSetLoc >& group)
|
CAudioGroupSet::CAudioGroupSet(const TLockedToken< CAudioGrpSetLoc >& group)
|
||||||
: x0_baseDir(group->GetBaseDirName())
|
: x0_baseDir(group->GetBaseDirName())
|
||||||
, x10_groupSetName(group->GetGroupSetName())
|
, x10_groupSetName(group->GetGroupSetName())
|
||||||
, x10_groupSetTok(group) {}
|
, x20_groupSetTok(group) {}
|
||||||
|
|
||||||
CAudioGroupSet::~CAudioGroupSet() {}
|
CAudioGroupSet::~CAudioGroupSet() {}
|
||||||
|
|
||||||
void CAudioGroupSet::Reload() {}
|
void CAudioGroupSet::Reload() {}
|
||||||
|
|
||||||
void CAudioGroupSet::FreeSampleBuffer() {}
|
void CAudioGroupSet::FreeSampleBuffer() {
|
||||||
|
x20_groupSetTok.data()->FreeSampleBuffer();
|
||||||
|
}
|
||||||
|
|
||||||
CAudioGrpSetLoc::CAudioGrpSetLoc(const rstl::auto_ptr< uchar >& data, int length)
|
CAudioGrpSetLoc::CAudioGrpSetLoc(const rstl::auto_ptr< uchar >& data, int length)
|
||||||
: x0_data(data.get()), x30_(0), x34_(0), x38_(0), x3c_(0), x40_(0) {
|
: x0_data(data.get()), x30_(0), x34_(0), x38_(0), x3c_(0), x40_(0) {
|
||||||
|
@ -28,6 +31,11 @@ CAudioGrpSetLoc::CAudioGrpSetLoc(const rstl::auto_ptr< uchar >& data, int length
|
||||||
CAudioSys::GetVerbose();
|
CAudioSys::GetVerbose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CAudioGrpSetLoc::FreeSampleBuffer() {
|
||||||
|
x0_data = nullptr;
|
||||||
|
x40_ = 0;
|
||||||
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
CFactoryFnReturn::CFactoryFnReturn(CAudioGrpSetLoc* ptr)
|
CFactoryFnReturn::CFactoryFnReturn(CAudioGrpSetLoc* ptr)
|
||||||
: obj(TToken< CAudioGrpSetLoc >::GetIObjObjectFor(rstl::auto_ptr< CAudioGrpSetLoc >(ptr))
|
: obj(TToken< CAudioGrpSetLoc >::GetIObjObjectFor(rstl::auto_ptr< CAudioGrpSetLoc >(ptr))
|
||||||
|
|
|
@ -0,0 +1,64 @@
|
||||||
|
#include "Kyoto/Math/CVector3f.hpp"
|
||||||
|
#include "MetroidPrime/Player/CPlayer.hpp"
|
||||||
|
#include "dolphin/hw_regs.h"
|
||||||
|
#include "rstl/optional_object.hpp"
|
||||||
|
#include "rstl/reserved_vector.hpp"
|
||||||
|
|
||||||
|
CPlayer::CInputFilter::CInputFilter() {}
|
||||||
|
|
||||||
|
void CPlayer::CInputFilter::AddSample(int a, const CVector3f& b, const CVector3f& c,
|
||||||
|
const CVector2f& d) {
|
||||||
|
x0_.push_back(a);
|
||||||
|
x54_.push_back(b);
|
||||||
|
x148_.push_back(c);
|
||||||
|
x23c_.push_back(d);
|
||||||
|
}
|
||||||
|
|
||||||
|
template < typename T, int N >
|
||||||
|
rstl::optional_object< T > _getElementBoundsCheck(const rstl::reserved_vector< T, N >& v, int idx);
|
||||||
|
|
||||||
|
template <>
|
||||||
|
rstl::optional_object< CVector3f >
|
||||||
|
_getElementBoundsCheck(const rstl::reserved_vector< CVector3f, 20 >& v, int idx) {
|
||||||
|
if (idx >= v.size()) {
|
||||||
|
return rstl::optional_object_null();
|
||||||
|
}
|
||||||
|
|
||||||
|
return v[idx];
|
||||||
|
}
|
||||||
|
template <>
|
||||||
|
rstl::optional_object< CVector2f >
|
||||||
|
_getElementBoundsCheck(const rstl::reserved_vector< CVector2f, 20 >& v, int idx) {
|
||||||
|
if (idx >= v.size()) {
|
||||||
|
return rstl::optional_object_null();
|
||||||
|
}
|
||||||
|
|
||||||
|
return v[idx];
|
||||||
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
rstl::optional_object< int > _getElementBoundsCheck(const rstl::reserved_vector< int, 20 >& v,
|
||||||
|
int idx) {
|
||||||
|
if (idx >= v.size()) {
|
||||||
|
return rstl::optional_object_null();
|
||||||
|
}
|
||||||
|
|
||||||
|
return v[idx];
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CPlayer::CInputFilter::Passes() {
|
||||||
|
if (x0_.size() != 14) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
CVector3f min1, max1;
|
||||||
|
min1 = *_getElementBoundsCheck(x148_, 0);
|
||||||
|
max1 = *_getElementBoundsCheck(x148_, 0);
|
||||||
|
CAABox box1(min1, max1);
|
||||||
|
CAABox box(*_getElementBoundsCheck(x148_, 0), *_getElementBoundsCheck(x148_, 0));
|
||||||
|
}
|
||||||
|
void CPlayer::CInputFilter::Reset() {
|
||||||
|
x0_.clear();
|
||||||
|
x54_.clear();
|
||||||
|
x148_.clear();
|
||||||
|
x23c_.clear();
|
||||||
|
}
|
Loading…
Reference in New Issue