mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-21 02:39:17 +00:00
Added functionality to generate asset names
This commit is contained in:
@@ -129,6 +129,12 @@ public:
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void GetUniquePrimitives(std::set<CAnimPrimitive>& rPrimSet) const
|
||||
{
|
||||
for (u32 iAnim = 0; iAnim < mAnimPrimitives.size(); iAnim++)
|
||||
rPrimSet.insert(mAnimPrimitives[iAnim]);
|
||||
}
|
||||
|
||||
// Accessors
|
||||
inline u32 NumCharacters() const { return mCharacters.size(); }
|
||||
inline u32 NumAnimations() const { return mAnimations.size(); }
|
||||
|
||||
@@ -84,6 +84,7 @@ public:
|
||||
// Inline Accessors
|
||||
inline u32 WorldIndex() const { return mWorldIndex; }
|
||||
inline CTransform4f Transform() const { return mTransform; }
|
||||
inline CMaterialSet* Materials() const { return mpMaterialSet; }
|
||||
inline u32 NumWorldModels() const { return mWorldModels.size(); }
|
||||
inline u32 NumStaticModels() const { return mStaticWorldModels.size(); }
|
||||
inline CModel* TerrainModel(u32 iMdl) const { return mWorldModels[iMdl]; }
|
||||
@@ -94,7 +95,9 @@ public:
|
||||
inline u32 NumLightLayers() const { return mLightLayers.size(); }
|
||||
inline u32 NumLights(u32 LayerIndex) const { return (LayerIndex < mLightLayers.size() ? mLightLayers[LayerIndex].size() : 0); }
|
||||
inline CLight* Light(u32 LayerIndex, u32 LightIndex) const { return mLightLayers[LayerIndex][LightIndex]; }
|
||||
inline CAssetID PathID() const { return mPathID; }
|
||||
inline CPoiToWorld* PoiToWorldMap() const { return mpPoiToWorldMap; }
|
||||
inline CAssetID PortalAreaID() const { return mPortalAreaID; }
|
||||
inline CAABox AABox() const { return mAABox; }
|
||||
|
||||
inline void SetWorldIndex(u32 NewWorldIndex) { mWorldIndex = NewWorldIndex; }
|
||||
|
||||
@@ -65,6 +65,10 @@ public:
|
||||
CVector2f Position = CVector2f(0,0),
|
||||
CColor FillColor = CColor::skWhite, CColor StrokeColor = CColor::skBlack,
|
||||
u32 FontSize = CFONT_DEFAULT_SIZE);
|
||||
|
||||
// Accessors
|
||||
inline TString FontName() const { return mFontName; }
|
||||
inline CTexture* Texture() const { return mpFontTexture; }
|
||||
private:
|
||||
void InitBuffers();
|
||||
};
|
||||
|
||||
@@ -14,7 +14,7 @@ u32 GetGameTypeID(EGame Game, EResType ResType)
|
||||
// ************ STATIC ************
|
||||
EResType CResource::ResTypeForExtension(CFourCC Extension)
|
||||
{
|
||||
auto Find = gExtensionTypeMap.find(Extension.ToLong());
|
||||
auto Find = gExtensionTypeMap.find(Extension.ToUpper().ToLong());
|
||||
|
||||
if (Find == gExtensionTypeMap.end())
|
||||
{
|
||||
|
||||
@@ -98,10 +98,14 @@ public:
|
||||
return pTree;
|
||||
}
|
||||
|
||||
CStringTable* ScanText() const { return mpStringTable; }
|
||||
bool IsImportant() const { return mIsImportant; }
|
||||
bool IsSlow() const { return mIsSlow; }
|
||||
ELogbookCategory LogbookCategory() const { return mCategory; }
|
||||
// Accessors
|
||||
inline CStringTable* ScanText() const { return mpStringTable; }
|
||||
inline bool IsImportant() const { return mIsImportant; }
|
||||
inline bool IsSlow() const { return mIsSlow; }
|
||||
inline ELogbookCategory LogbookCategory() const { return mCategory; }
|
||||
inline CAssetID GuiFrame() const { return mFrameID; }
|
||||
inline CAssetID ScanImage(u32 ImgIndex) const { return mScanImageTextures[ImgIndex]; }
|
||||
inline CAssetID LogbookDisplayAssetID() const { return (mLogbookAnimParams.ID().IsValid() ? mLogbookAnimParams.ID() : mLogbookModel); }
|
||||
};
|
||||
|
||||
#endif // CSCAN_H
|
||||
|
||||
@@ -126,6 +126,39 @@ public:
|
||||
|
||||
return pTree;
|
||||
}
|
||||
|
||||
static TWideString StripFormatting(const TWideString& rkStr)
|
||||
{
|
||||
TWideString Out = rkStr;
|
||||
int TagStart = -1;
|
||||
|
||||
for (u32 iChr = 0; iChr < Out.Size(); iChr++)
|
||||
{
|
||||
if (Out[iChr] == L'&')
|
||||
{
|
||||
if (TagStart == -1)
|
||||
TagStart = iChr;
|
||||
|
||||
else
|
||||
{
|
||||
Out.Remove(TagStart, 1);
|
||||
TagStart = -1;
|
||||
iChr--;
|
||||
}
|
||||
}
|
||||
|
||||
else if (TagStart != -1 && Out[iChr] == L';')
|
||||
{
|
||||
int TagEnd = iChr + 1;
|
||||
int TagLen = TagEnd - TagStart;
|
||||
Out.Remove(TagStart, TagLen);
|
||||
iChr = TagStart - 1;
|
||||
TagStart = -1;
|
||||
}
|
||||
}
|
||||
|
||||
return Out;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // CSTRINGTABLE_H
|
||||
|
||||
Reference in New Issue
Block a user