#include "dynos.cpp.h" // // Collisions // static void WriteCollisionData(FILE* aFile, GfxData* aGfxData, DataNode *aNode) { if (!aNode->mData) return; // Name WriteBytes(aFile, DATA_TYPE_COLLISION); aNode->mName.Write(aFile); // Data WriteBytes(aFile, aNode->mSize); for (u32 i = 0; i != aNode->mSize; ++i) { WriteBytes(aFile, aNode->mData[i]); } } bool DynOS_Col_WriteBinary(const SysPath &aOutputFilename, GfxData *aGfxData, DataNode* _Node) { FILE *_File = fopen(aOutputFilename.c_str(), "wb"); if (!_File) { PrintError(" ERROR: Unable to create file \"%s\"", aOutputFilename.c_str()); return false; } WriteCollisionData(_File, aGfxData, _Node); fclose(_File); return true; }