Merge branch 'master' of ssh+git://git.axiodl.com:6431/AxioDL/urde

This commit is contained in:
Phillip Stephens 2020-04-05 05:13:14 -07:00
commit 786634e181
Signed by: Antidote
GPG Key ID: F8BEE4C83DACA60D
2 changed files with 5 additions and 6 deletions

View File

@ -76,17 +76,16 @@ std::unique_ptr<u8[]> CCharacterFactory::CDummyFactory::LoadNewResourcePartSync(
std::unique_ptr<CAnimData> CCharacterFactory::CreateCharacter(int charIdx, bool loop,
const TLockedToken<CCharacterFactory>& factory,
int defaultAnim, int drawInsts) const {
int defaultAnim, int drawInsts) {
const CCharacterInfo& charInfo = x4_charInfoDB[charIdx];
const CVParamTransfer charParm(new TObjOwnerParam<const CCharacterInfo*>(&charInfo));
TToken<CSkinnedModel> skinnedModel = const_cast<CCharacterFactory*>(this)->x70_cacheResPool.GetObj(
{FourCC(drawInsts << 16), charInfo.GetModelId()}, charParm);
TToken<CSkinnedModel> skinnedModel =
x70_cacheResPool.GetObj({FourCC(drawInsts << 16), charInfo.GetModelId()}, charParm);
std::optional<TToken<CMorphableSkinnedModel>> iceModel;
if (charInfo.GetIceModelId().IsValid() && charInfo.GetIceSkinRulesId().IsValid()) {
iceModel.emplace(const_cast<CCharacterFactory*>(this)->x70_cacheResPool.GetObj(
{FourCC((drawInsts << 16) | 1), charInfo.GetIceModelId()}, charParm));
iceModel.emplace(x70_cacheResPool.GetObj({FourCC((drawInsts << 16) | 1), charInfo.GetIceModelId()}, charParm));
}
return std::make_unique<CAnimData>(x68_selfId, charInfo, defaultAnim, charIdx, loop, x14_charLayoutInfoDB[charIdx],

View File

@ -68,7 +68,7 @@ public:
CCharacterFactory(CSimplePool& store, const CAnimCharacterSet& ancs, CAssetId);
std::unique_ptr<CAnimData> CreateCharacter(int charIdx, bool loop, const TLockedToken<CCharacterFactory>& factory,
int defaultAnim, int drawInsts) const;
int defaultAnim, int drawInsts);
CAssetId GetEventResourceIdForAnimResourceId(CAssetId animId) const;
const CCharacterInfo& GetCharInfo(int charIdx) const { return x4_charInfoDB[charIdx]; }