Fixed up DynOS collision files
This commit is contained in:
parent
710bd87fb6
commit
7e677d4596
|
@ -26,7 +26,10 @@ DataNode<Collision>* DynOS_Col_LoadFromBinary(const SysPath &aPackFolder, const
|
|||
SysPath _Filename = fstring("%s/%s.col", aPackFolder.begin(), aCollisionName);
|
||||
FILE *_File = fopen(_Filename.c_str(), "rb");
|
||||
if (_File) {
|
||||
collisionNode = LoadCollisionData(_File);
|
||||
u8 type = ReadBytes<u8>(_File);
|
||||
if (type == DATA_TYPE_COLLISION) {
|
||||
collisionNode = LoadCollisionData(_File);
|
||||
}
|
||||
fclose(_File);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ static void WriteCollisionData(FILE* aFile, GfxData* aGfxData, DataNode<Collisio
|
|||
if (!aNode->mData) return;
|
||||
|
||||
// Name
|
||||
WriteBytes<u8>(aFile, DATA_TYPE_COLLISION);
|
||||
aNode->mName.Write(aFile);
|
||||
|
||||
// Data
|
||||
|
|
|
@ -313,6 +313,10 @@ void DynOS_Gfx_Free(GfxData* aGfxData) {
|
|||
Delete(_Node->mData);
|
||||
Delete(_Node);
|
||||
}
|
||||
for (auto& _Node : aGfxData->mCollisions) {
|
||||
Delete(_Node->mData);
|
||||
Delete(_Node);
|
||||
}
|
||||
Delete(aGfxData);
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue