diff options
Diffstat (limited to 'src/project.cpp')
| -rw-r--r-- | src/project.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/project.cpp b/src/project.cpp index 48c511b..ee8a0b1 100644 --- a/src/project.cpp +++ b/src/project.cpp @@ -7,7 +7,6 @@ #include <fstream> #include <ostream> -#include <iomanip> const long projReadLineLength = 128; char projReadLine[projReadLineLength]; @@ -64,10 +63,10 @@ void Proj_SerializeProjectSettings(std::ofstream &stream) { */ void Proj_SerializeEntityType(std::ofstream &stream, const EntityType &et) { - NULL_CHAR_ARR(handleStr, 19); + NULL_CHAR_ARR(handleStr, 23); NULL_CHAR_ARR(modelAssetKey, AssetKeyLength + 1); NULL_CHAR_ARR(textureAssetKey, AssetKeyLength + 1); - snprintf(handleStr, 19, "0x%08X 0x%08X", et.handle.bucketIndex, et.handle.itemIndex); + snprintf(handleStr, 22, "0x%08X 0x%08X", et.handle.bucketIndex, et.handle.itemIndex); snprintf(modelAssetKey, AssetKeyLength + 1, "%s", et.modelAssetKey); EntityType e{}; if (modelAssetKey[0] != '\0') @@ -79,7 +78,7 @@ void Proj_SerializeEntityType(std::ofstream &stream, const EntityType &et) { if (et.createInstanceCallback.name[0] != '\0') { stream << PKE_PROJ_FILE_ENTITY_TYPE_CREATE_INSTANCE_CALLBACK_SIGNATURE << et.createInstanceCallback.name << std::endl; } - for (size_t i = 0; i < et.detailsCount; ++i) { + for (int64_t i = 0; i < et.detailsCount; ++i) { const EntityTypeDetails &etd = et.details[i]; snprintf(textureAssetKey, AssetKeyLength + 1, "%s", etd.textureAssetKey); @@ -356,11 +355,11 @@ void PkeProject_Save(const char *filePath) { f << PKE_PROJ_FILE_OBJ_END << std::endl; */ - auto assetB = AM_GetBucketCount(); - for (long b = 0; b < assetB; ++b) { - uint64_t assetI = 0; + pk_handle_bucket_index_T assetB = AM_GetBucketCount(); + for (pk_handle_bucket_index_T b = 0; b < assetB; ++b) { + pk_handle_item_index_T assetI = 0; auto *assets = AM_GetAssets(b, assetI); - for (long i = 0; i < assetI; ++i) { + for (pk_handle_item_index_T i = 0; i < assetI; ++i) { bool isGlobalAsset = false; for (long k = 0; k < EngineDefinedAssetCount; ++k) { if (strncmp(EngineDefinedAssets[k], assets[i].key, AssetKeyLength) == 0) { |
