mirror of
https://github.com/PrimeDecomp/prime.git
synced 2025-08-06 04:55:35 +00:00
Don't access SObjectTag::mId directly, remove hack new in TOneStatic
This commit is contained in:
parent
44b98baeae
commit
1ec5a25fa6
@ -18,7 +18,7 @@ public:
|
||||
const FourCC GetType() const { return mType; }
|
||||
static const char* Type2Text(FourCC type);
|
||||
|
||||
public:
|
||||
private:
|
||||
FourCC mType;
|
||||
CAssetId mId;
|
||||
};
|
||||
|
@ -8,7 +8,6 @@ template < typename T >
|
||||
class TOneStatic {
|
||||
public:
|
||||
void* operator new(size_t sz, const char*, const char*);
|
||||
void* operator new(size_t sz) { return operator new(sz, "\?\?(\?\?)", nullptr); }
|
||||
void operator delete(void* ptr);
|
||||
|
||||
private:
|
||||
|
@ -58,7 +58,7 @@ CIOWin::EMessageReturn CCredits::Update(float dt, CArchitectureQueue& queue) {
|
||||
for (int i = 0; i < x18_creditsTable->GetStringCount(); ++i) {
|
||||
x30_text.push_back(rstl::pair< rstl::single_ptr< CGuiTextSupport >, CVector2i >(
|
||||
rs_new CGuiTextSupport(
|
||||
gpResourceFactory->GetResourceIdByName(gpTweakGui->GetCreditsFont().data())->mId,
|
||||
gpResourceFactory->GetResourceIdByName(gpTweakGui->GetCreditsFont().data())->GetId(),
|
||||
CGuiTextProperties(true, true, kJustification_Center, kVerticalJustification_Top),
|
||||
gpTweakGui->GetCreditsTextFontColor(), gpTweakGui->GetCreditsTextBorderColor(),
|
||||
CColor::White(), CGraphics::GetViewport().mWidth - 64, 0, gpSimplePool,
|
||||
|
@ -238,6 +238,6 @@ const CVector3f& CMapArea::GetAreaPostTranslate(const IWorld& world, TAreaId aid
|
||||
|
||||
CFactoryFnReturn FMapAreaFactory(const SObjectTag& objTag, CInputStream& in,
|
||||
const CVParamTransfer&) {
|
||||
gHackAssetId = objTag.mId;
|
||||
gHackAssetId = objTag.GetId();
|
||||
return CFactoryFnReturn(rs_new CMapArea(in, gpResourceFactory->ResourceSize(objTag)));
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ static const CTransform4f skFaceModelViewAdjust =
|
||||
CTransform4f::Scale(0.3f) * CTransform4f::Translate(CVector3f(0.f, 0.5f, 0.f));
|
||||
|
||||
CSamusFaceReflection::CSamusFaceReflection(const CStateManager& mgr)
|
||||
: x0_modelData(CModelData(CAnimRes(gpResourceFactory->GetResourceIdByName(skFaceAssetIdName)->mId,
|
||||
: x0_modelData(CModelData(CAnimRes(gpResourceFactory->GetResourceIdByName(skFaceAssetIdName)->GetId(),
|
||||
CAnimRes::kDefaultCharIdx, CVector3f(1.f, 1.f, 1.f), 0, true)))
|
||||
, x4c_lights(rs_new CActorLights(8, CVector3f::Zero(), 4, 4))
|
||||
, x50_lookRot(CQuaternion::NoRotation())
|
||||
|
@ -545,7 +545,7 @@ void CScriptSpecialFunction::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId
|
||||
if (msg == kSM_Increment) {
|
||||
const SObjectTag* objectTag =
|
||||
gpResourceFactory->GetResourceIdByName(xec_locatorName.data());
|
||||
const CAssetId assetId = objectTag ? objectTag->mId : kInvalidAssetId;
|
||||
const CAssetId assetId = objectTag ? objectTag->GetId() : kInvalidAssetId;
|
||||
|
||||
mgr.SetPendingOnScreenTex(assetId, CVector2i(int(x104_float3), int(x108_float4)),
|
||||
CVector2i(int(xfc_float1), int(x100_float2)));
|
||||
|
@ -38,7 +38,7 @@ CTweakPlayerRes* gpTweakPlayerRes = nullptr;
|
||||
CTweakSlideShow* gpTweakSlideShow = nullptr;
|
||||
|
||||
CAssetId IDFromFactory(CResFactory& factory, const char* filename) {
|
||||
return factory.GetResourceIdByName(filename)->mId;
|
||||
return factory.GetResourceIdByName(filename)->GetId();
|
||||
}
|
||||
|
||||
CTweaks::CTweaks() { mTweakObjects.resize(14, rstl::auto_ptr< ITweakObject >()); }
|
||||
|
@ -23,7 +23,7 @@ CAssetId get_asset_id_from_name(const char* name) {
|
||||
if (!tag) {
|
||||
return kInvalidAssetId;
|
||||
}
|
||||
return tag->mId;
|
||||
return tag->GetId();
|
||||
}
|
||||
|
||||
void get_token_vector(CAnimData& animData, int animIdx, rstl::vector< CToken >& tokensOut,
|
||||
|
Loading…
x
Reference in New Issue
Block a user