mirror of https://github.com/AxioDL/metaforce.git
CStateManager: Silence sign conversion and truncation warnings in LoadScriptObjects()
This commit is contained in:
parent
f8670a2bdb
commit
439a55ed98
Runtime
|
@ -1308,18 +1308,24 @@ CStateManager::GetIdListForScript(TEditorId id) const {
|
||||||
|
|
||||||
void CStateManager::LoadScriptObjects(TAreaId aid, CInputStream& in, std::vector<TEditorId>& idsOut) {
|
void CStateManager::LoadScriptObjects(TAreaId aid, CInputStream& in, std::vector<TEditorId>& idsOut) {
|
||||||
in.readUByte();
|
in.readUByte();
|
||||||
int objCount = in.readUint32Big();
|
|
||||||
|
const u32 objCount = in.readUint32Big();
|
||||||
idsOut.reserve(idsOut.size() + objCount);
|
idsOut.reserve(idsOut.size() + objCount);
|
||||||
for (int i = 0; i < objCount; ++i) {
|
|
||||||
EScriptObjectType objType = EScriptObjectType(in.readUByte());
|
for (u32 i = 0; i < objCount; ++i) {
|
||||||
u32 objSize = in.readUint32Big();
|
const auto objType = static_cast<EScriptObjectType>(in.readUByte());
|
||||||
u32 pos = in.position();
|
const u32 objSize = in.readUint32Big();
|
||||||
auto id = LoadScriptObject(aid, objType, objSize, in);
|
const u32 pos = static_cast<u32>(in.position());
|
||||||
if (id.first == kInvalidEditorId)
|
const auto id = LoadScriptObject(aid, objType, objSize, in);
|
||||||
|
if (id.first == kInvalidEditorId) {
|
||||||
continue;
|
continue;
|
||||||
auto build = GetBuildForScript(id.first);
|
}
|
||||||
if (build.first)
|
|
||||||
|
const auto build = GetBuildForScript(id.first);
|
||||||
|
if (build.first) {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
x8a4_loadedScriptObjects[id.first] = SScriptObjectStream{objType, pos, objSize};
|
x8a4_loadedScriptObjects[id.first] = SScriptObjectStream{objType, pos, objSize};
|
||||||
idsOut.push_back(id.first);
|
idsOut.push_back(id.first);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue