General resource handling bug fixes

This commit is contained in:
Jack Andersen 2017-11-14 18:12:13 -10:00
parent 8cef6ce5e0
commit 2df95c01cf
34 changed files with 114 additions and 61 deletions

View File

@ -531,6 +531,21 @@ struct ANCS : BigYAML
trans->enumeratePrimitives(func);
}
void gatherDependencies(std::vector<hecl::ProjectPath>& pathsOut) const
{
for (const CharacterSet::CharacterInfo& ci : characterSet.characters)
{
for (const auto& id : ci.partResData.part)
g_curSpec->flattenDependencies(id, pathsOut);
for (const auto& id : ci.partResData.swhc)
g_curSpec->flattenDependencies(id, pathsOut);
for (const auto& id : ci.partResData.unk)
g_curSpec->flattenDependencies(id, pathsOut);
for (const auto& id : ci.partResData.elsc)
g_curSpec->flattenDependencies(id, pathsOut);
}
}
static bool Extract(const SpecBase& dataSpec,
PAKEntryReadStream& rs,
const hecl::ProjectPath& outPath,

View File

@ -400,6 +400,14 @@ void SpecBase::flattenDependencies(const hecl::ProjectPath& path,
if (evntPath.isFile())
pathsOut.push_back(evntPath);
}
ds.close();
hecl::ProjectPath yamlPath = asGlob.getWithExtension(_S(".yaml"), true);
if (yamlPath.isFile())
{
athena::io::FileReader reader(yamlPath.getAbsolutePath());
flattenDependenciesANCSYAML(reader, pathsOut);
}
pathsOut.push_back(asGlob);
return;

View File

@ -106,6 +106,7 @@ struct SpecBase : hecl::Database::IDataSpec
void flattenDependencies(const class UniqueID32& id, std::vector<hecl::ProjectPath>& pathsOut);
void flattenDependencies(const class UniqueID64& id, std::vector<hecl::ProjectPath>& pathsOut);
virtual void flattenDependenciesYAML(athena::io::IStreamReader& fin, std::vector<hecl::ProjectPath>& pathsOut)=0;
virtual void flattenDependenciesANCSYAML(athena::io::IStreamReader& fin, std::vector<hecl::ProjectPath>& pathsOut)=0;
virtual void buildWorldPakList(const hecl::ProjectPath& worldPath,
const hecl::ProjectPath& worldPathCooked,

View File

@ -1132,6 +1132,21 @@ struct SpecMP1 : SpecBase
}
}
void flattenDependenciesANCSYAML(athena::io::IStreamReader& fin, std::vector<hecl::ProjectPath>& pathsOut)
{
athena::io::YAMLDocReader reader;
if (reader.parse(&fin))
{
std::string classStr = reader.readString("DNAType");
if (!classStr.compare(DNAMP1::ANCS::DNAType()))
{
DNAMP1::ANCS ancs;
ancs.read(reader);
ancs.gatherDependencies(pathsOut);
}
}
}
void buildWorldPakList(const hecl::ProjectPath& worldPath,
const hecl::ProjectPath& worldPathCooked,
hecl::BlenderToken& btok,
@ -1168,8 +1183,13 @@ struct SpecMP1 : SpecBase
nameEnt.write(w);
for (const auto& area : mlvl.areas)
{
urde::SObjectTag nameTag(FOURCC('STRG'), area.areaNameId.toUint32());
if (nameTag)
listOut.push_back(nameTag);
for (const auto& dep : area.deps)
listOut.push_back({dep.type, dep.id.toUint32()});
}
urde::SObjectTag nameTag(FOURCC('STRG'), mlvl.worldNameId.toUint32());
if (nameTag)

View File

@ -370,6 +370,10 @@ struct SpecMP2 : SpecBase
{
}
void flattenDependenciesANCSYAML(athena::io::IStreamReader& fin, std::vector<hecl::ProjectPath>& pathsOut)
{
}
void cookAudioGroup(const hecl::ProjectPath& out, const hecl::ProjectPath& in,
FCookProgress progress)
{

View File

@ -564,6 +564,10 @@ struct SpecMP3 : SpecBase
{
}
void flattenDependenciesANCSYAML(athena::io::IStreamReader& fin, std::vector<hecl::ProjectPath>& pathsOut)
{
}
void cookAudioGroup(const hecl::ProjectPath& out, const hecl::ProjectPath& in,
FCookProgress progress)
{

View File

@ -1339,13 +1339,13 @@ void CAutoMapper::Update(float dt, const CStateManager& mgr)
if (mwInfo.IsMapped(xa0_curAreaId) || mwInfo.IsAreaVisted(xa0_curAreaId))
stringId = area->IGetStringTableAssetId();
else
stringId = -1;
stringId = {};
}
if (x88_mapAreaStringId != stringId)
{
x88_mapAreaStringId = stringId;
if (x88_mapAreaStringId != -1)
if (x88_mapAreaStringId.IsValid())
x8c_mapAreaString = g_SimplePool->GetObj(SObjectTag{FOURCC('STRG'), x88_mapAreaStringId});
else
x8c_mapAreaString = TLockedToken<CStringTable>();
@ -1370,7 +1370,7 @@ void CAutoMapper::Update(float dt, const CStateManager& mgr)
if (hintDesc != x74_areaHintDescId)
{
x74_areaHintDescId = hintDesc;
if (x74_areaHintDescId != -1)
if (x74_areaHintDescId.IsValid())
x78_areaHintDesc = g_SimplePool->GetObj(SObjectTag{FOURCC('STRG'), x74_areaHintDescId});
else
x78_areaHintDesc = TLockedToken<CStringTable>();

View File

@ -149,10 +149,10 @@ private:
TLockedToken<CTexture> x3c_hintBeacon;
std::vector<CTexturedQuadFilter> m_hintBeaconFilters;
rstl::reserved_vector<TLockedToken<CTexture>, 5> x48_mapIcons;
CAssetId x74_areaHintDescId = -1;
CAssetId x74_areaHintDescId;
TLockedToken<CStringTable> x78_areaHintDesc;
u32 x84_ = 0;
CAssetId x88_mapAreaStringId = -1;
CAssetId x88_mapAreaStringId;
TLockedToken<CStringTable> x8c_mapAreaString; // Used to be optional
u32 x9c_worldIdx = 0;
TAreaId xa0_curAreaId;

View File

@ -11,10 +11,10 @@ class CGameHintInfo
public:
struct SHintLocation
{
CAssetId x0_mlvlId = -1;
CAssetId x4_mreaId = -1;
CAssetId x0_mlvlId;
CAssetId x4_mreaId;
TAreaId x8_areaId = kInvalidAreaId;
CAssetId xc_stringId = -1;
CAssetId xc_stringId;
SHintLocation(CInputStream&, s32);
};

View File

@ -80,7 +80,7 @@ CWorldState::CWorldState(CAssetId id)
{
x8_relayTracker = std::make_shared<CRelayTracker>();
xc_mapWorldInfo = std::make_shared<CMapWorldInfo>();
x10_desiredAreaAssetId = -1;
x10_desiredAreaAssetId = {};
x14_layerState = std::make_shared<CWorldLayerState>();
}

View File

@ -18,7 +18,7 @@ static kabufuda::ECardResult g_OpResults[2] = {};
CSaveWorldIntermediate::CSaveWorldIntermediate(CAssetId mlvl, CAssetId savw)
: x0_mlvlId(mlvl), x8_savwId(savw)
{
if (savw == -1)
if (!savw.IsValid())
x2c_dummyWorld = std::make_unique<CDummyWorld>(mlvl, false);
else
x34_saveWorld = g_SimplePool->GetObj(SObjectTag{FOURCC('SAVW'), savw});
@ -198,7 +198,7 @@ void CMemoryCardSys::CCardFileInfo::LockIconToken(CAssetId iconTxtr, kabufuda::E
u32 CMemoryCardSys::CCardFileInfo::CalculateBannerDataSize() const
{
u32 ret = 68;
if (x3c_bannerTex != -1)
if (x3c_bannerTex.IsValid())
{
if ((*x40_bannerTok)->GetMemoryCardTexelFormat() == ETexelFormat::RGB5A3)
ret = 6212;
@ -250,7 +250,7 @@ void CMemoryCardSys::CCardFileInfo::BuildCardBuffer()
void CMemoryCardSys::CCardFileInfo::WriteBannerData(CMemoryOutStream& out) const
{
if (x3c_bannerTex != -1)
if (x3c_bannerTex.IsValid())
{
const TLockedToken<CTexture>& tex = *x40_bannerTok;
u32 bufSz;
@ -326,7 +326,7 @@ ECardResult CMemoryCardSys::CCardFileInfo::GetStatus(kabufuda::CardStat& stat) c
stat.SetIconAddr(68);
kabufuda::EImageFormat bannerFmt;
if (x3c_bannerTex != -1)
if (x3c_bannerTex.IsValid())
{
if ((*x40_bannerTok)->GetMemoryCardTexelFormat() == ETexelFormat::RGB5A3)
bannerFmt = kabufuda::EImageFormat::RGB5A3;

View File

@ -18,8 +18,8 @@ class CSimplePool;
class CSaveWorldMemory
{
friend class CMemoryCardSys;
CAssetId x0_strgId = -1;
CAssetId x4_savwId = -1;
CAssetId x0_strgId;
CAssetId x4_savwId;
u32 x8_areaCount;
std::vector<CAssetId> xc_areaIds;
std::vector<CWorldLayers::Area> x1c_defaultLayerStates;
@ -129,7 +129,7 @@ public:
CardFileHandle m_handle;
std::string x18_fileName;
std::string x28_comment;
CAssetId x3c_bannerTex = -1;
CAssetId x3c_bannerTex;
std::experimental::optional<TLockedToken<CTexture>> x40_bannerTok;
rstl::reserved_vector<Icon, 8> x50_iconToks;
std::vector<u8> xf4_saveBuffer;

View File

@ -164,7 +164,7 @@ bool CResLoader::ResourceExists(const SObjectTag& tag)
FourCC CResLoader::GetResourceTypeById(CAssetId id) const
{
if (FindResource(id))
if (id.IsValid() && FindResource(id))
return x50_cachedResInfo->GetType();
return {};
}

View File

@ -17,7 +17,7 @@ public:
struct SBucket
{
CAssetId x0_texture = -1;
CAssetId x0_texture;
float x4_appearanceRange = 0.f;
u32 x8_imagePos = 0;
zeus::CVector2i xc_size;
@ -29,7 +29,7 @@ public:
private:
void Load(CInputStream&, u32);
CAssetId x0_scannableObjectId;
u32 x4_stringId = -1;
CAssetId x4_stringId;
float x8_totalDownloadTime = 0.f;
u32 xc_category = 0;
bool x10_important = false;

View File

@ -1821,7 +1821,7 @@ void CStateManager::Update(float dt)
if (xf14_curTimeMod900 > 900.f)
xf14_curTimeMod900 -= 900.f;
xf08_pauseHudMessage = -1;
xf08_pauseHudMessage = {};
CScriptEffect::ResetParticleCounts();
UpdateThermalVisor();

View File

@ -62,7 +62,7 @@ struct SScriptObjectStream
struct SOnScreenTex
{
CAssetId x0_id = -1;
CAssetId x0_id;
zeus::CVector2i x4_origin;
zeus::CVector2i xc_extent;
};

View File

@ -28,7 +28,7 @@ void CCameraFilterPass<S>::Update(float dt)
if (x0_curType == EFilterType::Passthru)
{
x24_texObj = TLockedToken<CTexture>();
x20_nextTxtr = -1;
x20_nextTxtr = {};
}
}
@ -47,11 +47,11 @@ void CCameraFilterPass<S>::SetFilter(EFilterType type, EFilterShape shape,
xc_duration = 0.f;
x10_remTime = 0.f;
if (txtr != -1)
if (txtr.IsValid())
x24_texObj = g_SimplePool->GetObj({FOURCC('TXTR'), txtr});
if (type == EFilterType::Passthru)
m_shader = std::experimental::nullopt;
else if (x0_curType != type || (x20_nextTxtr != txtr && txtr != -1))
else if (x0_curType != type || (x20_nextTxtr != txtr && txtr.IsValid()))
m_shader.emplace(type, x24_texObj);
x4_nextType = type;
@ -71,7 +71,7 @@ void CCameraFilterPass<S>::SetFilter(EFilterType type, EFilterShape shape,
x14_prevColor = x18_curColor;
x8_shape = shape;
x20_nextTxtr = txtr;
if (txtr != -1)
if (txtr.IsValid())
x24_texObj = g_SimplePool->GetObj({FOURCC('TXTR'), txtr});
x10_remTime = time;
xc_duration = time;
@ -104,7 +104,7 @@ void CCameraFilterPass<S>::SetFilter(EFilterType type, EFilterShape shape,
if (x0_curType == EFilterType::Passthru)
m_shader = std::experimental::nullopt;
else if (x0_curType != origType || (x20_nextTxtr != origTxtr && x20_nextTxtr != -1))
else if (x0_curType != origType || (x20_nextTxtr != origTxtr && x20_nextTxtr.IsValid()))
m_shader.emplace(x0_curType, x24_texObj);
}
}
@ -147,7 +147,7 @@ void CCameraFilterPassPoly::SetFilter(EFilterType type, EFilterShape shape,
case EFilterShape::FullscreenHalvesLeftRight:
case EFilterShape::FullscreenHalvesTopBottom:
case EFilterShape::FullscreenQuarters:
if (txtr != -1)
if (txtr.IsValid())
m_filter = std::make_unique<CCameraFilterPass<CTexturedQuadFilterAlpha>>();
else
m_filter = std::make_unique<CCameraFilterPass<CColoredQuadFilter>>();

View File

@ -46,7 +46,7 @@ protected:
zeus::CColor x14_prevColor;
zeus::CColor x18_curColor;
zeus::CColor x1c_nextColor;
CAssetId x20_nextTxtr = -1;
CAssetId x20_nextTxtr;
TLockedToken<CTexture> x24_texObj; // Used to be auto_ptr
float GetT(bool invert) const;
public:

View File

@ -32,11 +32,12 @@ BOO_GLSL_BINDING_HEAD
"SBINDING(0) out VertToFrag vtf;\n"
"void main()\n"
"{\n"
" vec3 pos = posIn[gl_VertexID].xyz;\n"
" vtf.uv = uvIn[gl_VertexID].xyz;\n"
" vtf.fontColor = color * fontColorIn;\n"
" vtf.outlineColor = color * outlineColorIn;\n"
" vtf.mulColor = mulColorIn;\n"
" vtf.uv = uvIn[gl_VertexID].xyz;\n"
" gl_Position = mtx * vec4(posIn[gl_VertexID].xyz, 1.0);\n"
" gl_Position = mtx * vec4(pos, 1.0);\n"
"}\n";
static const char* TextFS =

View File

@ -249,7 +249,7 @@ void CScanDisplay::StartScan(TUniqueId id, const CScannableObjectInfo& scanInfo,
}
CAssetId strId = x14_scannableInfo->GetStringTableId();
if (strId != -1)
if (strId.IsValid())
x194_scanStr = g_SimplePool->GetObj({FOURCC('STRG'), strId});
for (int i=0 ; i<4 ; ++i)

View File

@ -113,7 +113,7 @@ void CArtifactDoll::Draw(float alpha, const CStateManager& mgr,
zeus::CColor color = ArtifactPreColor;
if (playerState.HasPowerUp(CPlayerState::EItemType(i + 29)))
{
if (ArtifactHeadScans[i] != -1)
if (ArtifactHeadScans[i].IsValid())
{
CAssetId newId = g_ResFactory->TranslateOriginalToNew(ArtifactHeadScans[i]);
float interp = (playerState.GetScanTime(newId) - 0.5f) * 2.f;

View File

@ -15,7 +15,7 @@ CFaceplateDecoration::CFaceplateDecoration(CStateManager& stateMgr) {}
void CFaceplateDecoration::Update(float dt, CStateManager& stateMgr)
{
CAssetId txtrId = stateMgr.GetPlayer().GetVisorSteam().GetTextureId();
if (txtrId == -1)
if (!txtrId.IsValid())
{
if (xc_ready)
{
@ -26,7 +26,7 @@ void CFaceplateDecoration::Update(float dt, CStateManager& stateMgr)
}
}
if (x0_id != txtrId && txtrId != -1)
if (x0_id != txtrId && txtrId.IsValid())
{
if (m_texFilter)
m_texFilter = std::experimental::nullopt;

View File

@ -391,7 +391,7 @@ void CInGameGuiManager::Update(CStateManager& stateMgr, float dt, CArchitectureQ
if (!x1dc_onScreenTexTok)
{
x1c4_onScreenTex = stateMgr.GetPendingScreenTex();
if (x1c4_onScreenTex.x0_id != -1)
if (x1c4_onScreenTex.x0_id.IsValid())
{
x1dc_onScreenTexTok = g_SimplePool->GetObj({FOURCC('TXTR'), x1c4_onScreenTex.x0_id});
x1d8_onScreenTexAlpha = FLT_EPSILON;
@ -399,11 +399,11 @@ void CInGameGuiManager::Update(CStateManager& stateMgr, float dt, CArchitectureQ
}
else
{
if (stateMgr.GetPendingScreenTex().x0_id == -1 &&
if (!stateMgr.GetPendingScreenTex().x0_id.IsValid() &&
stateMgr.GetPendingScreenTex().x4_origin == zeus::CVector2i(0, 0))
{
x1c4_onScreenTex.x4_origin = stateMgr.GetPendingScreenTex().x4_origin;
x1c4_onScreenTex.x0_id = -1;
x1c4_onScreenTex.x0_id = {};
x1d8_onScreenTexAlpha = 0.f;
}
else
@ -412,7 +412,7 @@ void CInGameGuiManager::Update(CStateManager& stateMgr, float dt, CArchitectureQ
}
}
}
else if (x1c4_onScreenTex.x0_id != -1 && x1dc_onScreenTexTok.IsLoaded())
else if (x1c4_onScreenTex.x0_id.IsValid() && x1dc_onScreenTexTok.IsLoaded())
{
x1d8_onScreenTexAlpha = std::min(x1d8_onScreenTexAlpha + dt, 1.f);
}

View File

@ -73,7 +73,7 @@ private:
std::vector<u32> xd8_;
std::vector<CToken> xe8_pauseResources;
CCameraFilterPass<CColoredQuadFilter> xf8_camFilter;
CAssetId x124_pauseGameHudMessage = -1;
CAssetId x124_pauseGameHudMessage;
float x128_pauseGameHudTime = 0.f;
std::list<CToken> x12c_;
u32 x140_ = 0;

View File

@ -91,7 +91,7 @@ CIOWin::EMessageReturn CMFGame::OnMessage(const CArchitectureMessage& msg, CArch
{
x14_stateManager->SetInSaveUI(x18_guiManager->IsInSaveUI());
UnpauseGame();
if (x14_stateManager->GetPauseHUDMessage() != -1)
if (x14_stateManager->GetPauseHUDMessage().IsValid())
x14_stateManager->IncrementHUDMessageFrameCounter();
}
break;
@ -287,7 +287,7 @@ CMFGameLoader::CMFGameLoader() : CMFGameLoaderBase("CMFGameLoader")
if (g_MemoryCardSys->HasSaveWorldMemory(mlvlId))
{
const CSaveWorldMemory& savwMem = g_MemoryCardSys->GetSaveWorldMemory(mlvlId);
if (savwMem.GetWorldNameId() != -1)
if (savwMem.GetWorldNameId().IsValid())
{
CAssetId wtMgrFont = g_ResFactory->TranslateOriginalToNew(0xB7BBD0B4);
g_GameState->GetWorldTransitionManager()->EnableTransition(wtMgrFont,

View File

@ -8,7 +8,7 @@ namespace urde
class CAnimationParameters
{
CAssetId x0_ancs = -1;
CAssetId x0_ancs;
u32 x4_charIdx = -1;
u32 x8_defaultAnim = -1;
public:

View File

@ -1235,7 +1235,7 @@ void CPlayer::FinishNewScan(CStateManager& mgr)
auto scanCompletion = mgr.CalculateScanCompletionRate();
CAssetId message = UpdatePersistentScanPercent(mgr.GetPlayerState()->GetLogScans(),
scanCompletion.first, scanCompletion.second);
if (message != -1)
if (message.IsValid())
mgr.ShowPausedHUDMemo(message, 0.f);
mgr.GetPlayerState()->SetScanCompletionRate(scanCompletion);
}

View File

@ -8,7 +8,7 @@ namespace urde
class CScannableParameters
{
CAssetId x0_scanId = -1;
CAssetId x0_scanId;
public:
CScannableParameters() = default;

View File

@ -11,11 +11,11 @@ std::experimental::optional<CVisorFlare::CFlareDef> CVisorFlare::LoadFlareDef(CI
if (propCount != 4)
return {};
u32 txtrId = in.readUint32Big();
CAssetId txtrId = in.readUint32Big();
float f1 = in.readFloatBig();
float f2 = in.readFloatBig();
zeus::CColor color = zeus::CColor::ReadRGBABig(in);
if (txtrId == -1)
if (!txtrId.IsValid())
return {};
TToken<CTexture> tex = g_SimplePool->GetObj(SObjectTag{FOURCC('TXTR'), txtrId});

View File

@ -39,7 +39,7 @@ TAreaId CDummyWorld::IGetCurrentAreaId() const { return x3c_curAreaId; }
TAreaId CDummyWorld::IGetAreaId(CAssetId id) const
{
int ret = 0;
if (id == -1)
if (!id.IsValid())
return kInvalidAreaId;
for (const CDummyGameArea& area : x18_areas)
{
@ -213,7 +213,7 @@ TAreaId CWorld::IGetCurrentAreaId() const { return x68_curAreaId; }
TAreaId CWorld::IGetAreaId(CAssetId id) const
{
int ret = 0;
if (id == -1)
if (!id.IsValid())
return kInvalidAreaId;
for (const std::unique_ptr<CGameArea>& area : x18_areas)
{
@ -248,7 +248,7 @@ void CWorld::LoadSoundGroups() {}
bool CWorld::CheckWorldComplete(CStateManager* mgr, TAreaId id, CAssetId mreaId)
{
if (mreaId != -1)
if (mreaId.IsValid())
{
x68_curAreaId = 0;
TAreaId aid = 0;
@ -281,7 +281,7 @@ bool CWorld::CheckWorldComplete(CStateManager* mgr, TAreaId id, CAssetId mreaId)
if (version >= 12)
{
CAssetId skyboxId = r.readUint32Big();
if (skyboxId != -1 && mgr)
if (skyboxId.IsValid() && mgr)
x94_skyboxWorld = g_SimplePool->GetObj(SObjectTag{FOURCC('CMDL'), skyboxId});
}
if (version >= 17)

View File

@ -46,9 +46,9 @@ class CDummyWorld : public IWorld
} x8_phase = Phase::Loading;
CAssetId xc_mlvlId;
CAssetId x10_strgId;
CAssetId x14_savwId = -1;
CAssetId x14_savwId;
std::vector<CDummyGameArea> x18_areas;
CAssetId x28_mapWorldId = -1;
CAssetId x28_mapWorldId;
TLockedToken<CMapWorld> x2c_mapWorld;
std::shared_ptr<IDvdRequest> x30_loadToken;
std::unique_ptr<uint8_t[]> x34_loadBuf;
@ -113,11 +113,11 @@ private:
LoadingSoundGroups,
Done,
} x4_phase = Phase::Loading;
CAssetId x8_mlvlId = -1;
CAssetId xc_strgId = -1;
CAssetId x10_savwId = -1;
CAssetId x8_mlvlId;
CAssetId xc_strgId;
CAssetId x10_savwId;
std::vector<std::unique_ptr<CGameArea>> x18_areas;
CAssetId x24_mapwId = -1;
CAssetId x24_mapwId;
TLockedToken<CMapWorld> x28_mapWorld;
std::vector<CRelay> x2c_relays;
//AsyncTask x3c_loadToken;

View File

@ -403,13 +403,13 @@ void CWorldTransManager::EnableTransition(const CAnimRes& samusRes,
x4_modelData->x158_suitModel = g_SimplePool->GetObj(SObjectTag{FOURCC('CMDL'), info.GetModelId()});
x4_modelData->x164_suitSkin = g_SimplePool->GetObj(SObjectTag{FOURCC('CSKR'), info.GetSkinRulesId()});
if (platRes != -1)
if (platRes.IsValid())
{
x4_modelData->xb4_platformModelData = {CStaticRes(platRes, platScale), 2};
x4_modelData->xb4_platformModelData.Touch(CModelData::EWhichModel::Normal, 0);
}
if (bgRes != -1)
if (bgRes.IsValid())
{
CStaticRes bg(bgRes, bgScale);
x4_modelData->x100_bgModelData[0] = bg;

View File

@ -1283,11 +1283,11 @@ CEntity* ScriptLoader::LoadWater(CStateManager& mgr, CInputStream& in, int propC
zeus::CAABox box(-extent * 0.5f, extent * 0.5f);
CAssetId envBumpMap;
if (bumpMap == -1)
if (!bumpMap.IsValid())
envBumpMap = _envBumpMap;
CAssetId envMap;
if (bumpMap == -1)
if (!bumpMap.IsValid())
envMap = _envMap;
return new CScriptWater(mgr, mgr.AllocateUniqueId(), name, info, position, box, dInfo, orientedForce, triggerFlags,

2
hecl

@ -1 +1 @@
Subproject commit 5d4a2ce1bd2545a59f28e889b1819477dd7f4d58
Subproject commit 17b0a91e2911d9a88c1128f83f745dd6f88c1db6