diff --git a/src/Font.cc b/src/Font.cc index 7d79b62..76e3734 100644 --- a/src/Font.cc +++ b/src/Font.cc @@ -2,7 +2,10 @@ // SPDX-License-Identifier: MIT #include "zenkit-capi/Font.h" +#include "Internal.hh" + ZkFont* ZkFont_load(ZkRead* buf) { + ZKC_TRACE_FN(); if (buf == nullptr) { ZKC_LOG_WARN_NULL("ZkFont_load"); return nullptr; @@ -19,6 +22,7 @@ ZkFont* ZkFont_load(ZkRead* buf) { } ZkFont* ZkFont_loadPath(ZkString path) { + ZKC_TRACE_FN(); if (path == nullptr) { ZKC_LOG_WARN_NULL("ZkFont_loadPath"); return nullptr; @@ -37,6 +41,7 @@ ZkFont* ZkFont_loadPath(ZkString path) { } ZkFont* ZkFont_loadVfs(ZkVfs* vfs, ZkString name) { + ZKC_TRACE_FN(); if (vfs == nullptr || name == nullptr) { ZKC_LOG_WARN_NULL("ZkFont_loadVfs"); return nullptr; @@ -50,10 +55,12 @@ ZkFont* ZkFont_loadVfs(ZkVfs* vfs, ZkString name) { } void ZkFont_del(ZkFont* slf) { + ZKC_TRACE_FN(); delete slf; } ZkString ZkFont_getName(ZkFont const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkFont_getName"); return nullptr; @@ -63,6 +70,7 @@ ZkString ZkFont_getName(ZkFont const* slf) { } uint32_t ZkFont_getHeight(ZkFont const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkFont_getHeight"); return 0; @@ -72,6 +80,7 @@ uint32_t ZkFont_getHeight(ZkFont const* slf) { } ZkSize ZkFont_getGlyphCount(ZkFont const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkFont_getGlyphCount"); return 0; @@ -81,6 +90,7 @@ ZkSize ZkFont_getGlyphCount(ZkFont const* slf) { } ZkFontGlyph ZkFont_getGlyph(ZkFont const* slf, ZkSize i) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkFont_getGlyph"); return {0, ZkVec2f {0, 0}, ZkVec2f {0, 0}}; @@ -96,6 +106,7 @@ ZkFontGlyph ZkFont_getGlyph(ZkFont const* slf, ZkSize i) { } void ZkFont_enumerateGlyphs(ZkFont const* slf, ZkFontGlyphEnumerator cb, void* ctx) { + ZKC_TRACE_FN(); if (slf == nullptr || cb == nullptr) { ZKC_LOG_WARN_NULL("ZkFont_enumerateGlyphs"); return; diff --git a/src/Internal.hh b/src/Internal.hh index b49326f..9406efc 100644 --- a/src/Internal.hh +++ b/src/Internal.hh @@ -55,6 +55,7 @@ #define ZKC_DELETER(cls) \ void cls##_del(cls* slf) { \ + ZKC_TRACE_FN(); \ delete slf; \ } @@ -80,6 +81,7 @@ #define ZKC_VOB_LOADER(cls) \ cls* cls##_load(ZkRead* buf, ZkGameVersion version) { \ + ZKC_TRACE_FN(); \ if (buf == nullptr) { \ ZKC_LOG_WARN_NULL(#cls "_load"); \ return nullptr; \ @@ -102,6 +104,7 @@ #define ZKC_VOB_PATH_LOADER(cls) \ cls* cls##_loadPath(ZkString path, ZkGameVersion version) { \ + ZKC_TRACE_FN(); \ if (path == nullptr) { \ ZKC_LOG_WARN_NULL(#cls "_loadPath"); \ return nullptr; \ diff --git a/src/ModelHierarchy.cc b/src/ModelHierarchy.cc index ccd3b3f..e908150 100644 --- a/src/ModelHierarchy.cc +++ b/src/ModelHierarchy.cc @@ -2,7 +2,10 @@ // SPDX-License-Identifier: MIT #include "zenkit-capi/ModelHierarchy.h" +#include "Internal.hh" + ZkModelHierarchy* ZkModelHierarchy_load(ZkRead* buf) { + ZKC_TRACE_FN(); if (buf == nullptr) { ZKC_LOG_WARN_NULL("ZkModelHierarchy_load"); return nullptr; @@ -19,6 +22,7 @@ ZkModelHierarchy* ZkModelHierarchy_load(ZkRead* buf) { } ZkModelHierarchy* ZkModelHierarchy_loadPath(ZkString path) { + ZKC_TRACE_FN(); if (path == nullptr) { ZKC_LOG_WARN_NULL("ZkModelHierarchy_loadPath"); return nullptr; @@ -37,6 +41,7 @@ ZkModelHierarchy* ZkModelHierarchy_loadPath(ZkString path) { } ZkModelHierarchy* ZkModelHierarchy_loadVfs(ZkVfs* vfs, ZkString name) { + ZKC_TRACE_FN(); if (vfs == nullptr || name == nullptr) { ZKC_LOG_WARN_NULL("ZkModelHierarchy_loadVfs"); return nullptr; @@ -50,10 +55,12 @@ ZkModelHierarchy* ZkModelHierarchy_loadVfs(ZkVfs* vfs, ZkString name) { } void ZkModelHierarchy_del(ZkModelHierarchy* slf) { + ZKC_TRACE_FN(); delete slf; } ZkSize ZkModelHierarchy_getNodeCount(ZkModelHierarchy const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkModelHierarchy_getNodeCount"); return 0; @@ -63,6 +70,7 @@ ZkSize ZkModelHierarchy_getNodeCount(ZkModelHierarchy const* slf) { } ZkModelHierarchyNode ZkModelHierarchy_getNode(ZkModelHierarchy const* slf, ZkSize i) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkModelHierarchy_getNode"); return {}; @@ -81,6 +89,7 @@ ZkModelHierarchyNode ZkModelHierarchy_getNode(ZkModelHierarchy const* slf, ZkSiz } ZkAxisAlignedBoundingBox ZkModelHierarchy_getBbox(ZkModelHierarchy const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkModelHierarchy_getBbox"); return {}; @@ -90,6 +99,7 @@ ZkAxisAlignedBoundingBox ZkModelHierarchy_getBbox(ZkModelHierarchy const* slf) { } ZkAxisAlignedBoundingBox ZkModelHierarchy_getCollisionBbox(ZkModelHierarchy const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkModelHierarchy_getCollisionBbox"); return {}; @@ -99,6 +109,7 @@ ZkAxisAlignedBoundingBox ZkModelHierarchy_getCollisionBbox(ZkModelHierarchy cons } ZkVec3f ZkModelHierarchy_getRootTranslation(ZkModelHierarchy const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkModelHierarchy_getRootTranslation"); return {}; @@ -108,6 +119,7 @@ ZkVec3f ZkModelHierarchy_getRootTranslation(ZkModelHierarchy const* slf) { } uint32_t ZkModelHierarchy_getChecksum(ZkModelHierarchy const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkModelHierarchy_getChecksum"); return {}; @@ -117,6 +129,7 @@ uint32_t ZkModelHierarchy_getChecksum(ZkModelHierarchy const* slf) { } ZkDate ZkModelHierarchy_getSourceDate(ZkModelHierarchy const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkModelHierarchy_getSourceDate"); return {}; @@ -126,6 +139,7 @@ ZkDate ZkModelHierarchy_getSourceDate(ZkModelHierarchy const* slf) { } ZkString ZkModelHierarchy_getSourcePath(ZkModelHierarchy const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkModelHierarchy_getSourcePath"); return {}; @@ -135,6 +149,7 @@ ZkString ZkModelHierarchy_getSourcePath(ZkModelHierarchy const* slf) { } void ZkModelHierarchy_enumerateNodes(ZkModelHierarchy const* slf, ZkModelHierarchyNodeEnumerator cb, void* ctx) { + ZKC_TRACE_FN(); if (slf == nullptr || cb == nullptr) { ZKC_LOG_WARN_NULL("ZkModelHierarchy_enumerateNodes"); return; diff --git a/src/ModelMesh.cc b/src/ModelMesh.cc index 594f495..9658470 100644 --- a/src/ModelMesh.cc +++ b/src/ModelMesh.cc @@ -2,7 +2,10 @@ // SPDX-License-Identifier: MIT #include "zenkit-capi/ModelMesh.h" +#include "Internal.hh" + ZkModelMesh* ZkModelMesh_load(ZkRead* buf) { + ZKC_TRACE_FN(); if (buf == nullptr) { ZKC_LOG_WARN_NULL("ZkModelMesh_load"); return nullptr; @@ -19,6 +22,7 @@ ZkModelMesh* ZkModelMesh_load(ZkRead* buf) { } ZkModelMesh* ZkModelMesh_loadPath(ZkString path) { + ZKC_TRACE_FN(); if (path == nullptr) { ZKC_LOG_WARN_NULL("ZkModelMesh_loadPath"); return nullptr; @@ -37,6 +41,7 @@ ZkModelMesh* ZkModelMesh_loadPath(ZkString path) { } ZkModelMesh* ZkModelMesh_loadVfs(ZkVfs* vfs, ZkString name) { + ZKC_TRACE_FN(); if (vfs == nullptr || name == nullptr) { ZKC_LOG_WARN_NULL("ZkModelMesh_loadVfs"); return nullptr; @@ -50,10 +55,12 @@ ZkModelMesh* ZkModelMesh_loadVfs(ZkVfs* vfs, ZkString name) { } void ZkModelMesh_del(ZkModelMesh* slf) { + ZKC_TRACE_FN(); delete slf; } ZkSize ZkModelMesh_getMeshCount(ZkModelMesh const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkModelMesh_getMeshCount"); return 0; @@ -63,6 +70,7 @@ ZkSize ZkModelMesh_getMeshCount(ZkModelMesh const* slf) { } ZkSoftSkinMesh const* ZkModelMesh_getMesh(ZkModelMesh const* slf, ZkSize i) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkModelMesh_getMesh"); return nullptr; @@ -77,6 +85,7 @@ ZkSoftSkinMesh const* ZkModelMesh_getMesh(ZkModelMesh const* slf, ZkSize i) { } void ZkModelMesh_enumerateMeshes(ZkModelMesh const* slf, ZkSoftSkinMeshEnumerator cb, void* ctx) { + ZKC_TRACE_FN(); if (slf == nullptr || cb == nullptr) { ZKC_LOG_WARN_NULL("ZkModelMesh_enumerateMeshes"); return; @@ -88,6 +97,7 @@ void ZkModelMesh_enumerateMeshes(ZkModelMesh const* slf, ZkSoftSkinMeshEnumerato } ZkSize ZkModelMesh_getAttachmentCount(ZkModelMesh const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkModelMesh_getAttachmentCount"); return 0; @@ -97,6 +107,7 @@ ZkSize ZkModelMesh_getAttachmentCount(ZkModelMesh const* slf) { } ZkMultiResolutionMesh const* ZkModelMesh_getAttachment(ZkModelMesh const* slf, ZkString name) { + ZKC_TRACE_FN(); if (slf == nullptr || name == nullptr) { ZKC_LOG_WARN_NULL("ZkModelMesh_getAttachment"); return nullptr; @@ -108,6 +119,7 @@ ZkMultiResolutionMesh const* ZkModelMesh_getAttachment(ZkModelMesh const* slf, Z } void ZkModelMesh_enumerateAttachments(ZkModelMesh const* slf, ZkAttachmentEnumerator cb, void* ctx) { + ZKC_TRACE_FN(); if (slf == nullptr || cb == nullptr) { ZKC_LOG_WARN_NULL("ZkModelMesh_enumerateAttachments"); return; @@ -119,6 +131,7 @@ void ZkModelMesh_enumerateAttachments(ZkModelMesh const* slf, ZkAttachmentEnumer } uint32_t ZkModelMesh_getChecksum(ZkModelMesh const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkModelMesh_getChecksum"); return 0; diff --git a/src/MorphMesh.cc b/src/MorphMesh.cc index 567867a..b0b4100 100644 --- a/src/MorphMesh.cc +++ b/src/MorphMesh.cc @@ -2,7 +2,10 @@ // SPDX-License-Identifier: MIT #include "zenkit-capi/MorphMesh.h" +#include "Internal.hh" + ZkMorphMesh* ZkMorphMesh_load(ZkRead* buf) { + ZKC_TRACE_FN(); if (buf == nullptr) { ZKC_LOG_WARN_NULL("ZkMorphMesh_load"); return nullptr; @@ -19,6 +22,7 @@ ZkMorphMesh* ZkMorphMesh_load(ZkRead* buf) { } ZkMorphMesh* ZkMorphMesh_loadPath(ZkString path) { + ZKC_TRACE_FN(); if (path == nullptr) { ZKC_LOG_WARN_NULL("ZkMorphMesh_loadPath"); return nullptr; @@ -37,6 +41,7 @@ ZkMorphMesh* ZkMorphMesh_loadPath(ZkString path) { } ZkMorphMesh* ZkMorphMesh_loadVfs(ZkVfs* vfs, ZkString name) { + ZKC_TRACE_FN(); if (vfs == nullptr || name == nullptr) { ZKC_LOG_WARN_NULL("ZkMorphMesh_loadVfs"); return nullptr; @@ -50,10 +55,12 @@ ZkMorphMesh* ZkMorphMesh_loadVfs(ZkVfs* vfs, ZkString name) { } void ZkMorphMesh_del(ZkMorphMesh* slf) { + ZKC_TRACE_FN(); delete slf; } ZkString ZkMorphMesh_getName(ZkMorphMesh const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkMorphMesh_getName"); return nullptr; @@ -63,6 +70,7 @@ ZkString ZkMorphMesh_getName(ZkMorphMesh const* slf) { } ZkMultiResolutionMesh const* ZkMorphMesh_getMesh(ZkMorphMesh const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkMorphMesh_getMesh"); return nullptr; @@ -72,6 +80,7 @@ ZkMultiResolutionMesh const* ZkMorphMesh_getMesh(ZkMorphMesh const* slf) { } ZkVec3f const* ZkMorphMesh_getMorphPositions(ZkMorphMesh const* slf, ZkSize* count) { + ZKC_TRACE_FN(); if (slf == nullptr || count == nullptr) { ZKC_LOG_WARN_NULL("ZkMorphMesh_getMorphPositions"); return nullptr; @@ -82,6 +91,7 @@ ZkVec3f const* ZkMorphMesh_getMorphPositions(ZkMorphMesh const* slf, ZkSize* cou } ZkSize ZkMorphMesh_getAnimationCount(ZkMorphMesh const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkMorphMesh_getAnimationCount"); return 0; @@ -91,6 +101,7 @@ ZkSize ZkMorphMesh_getAnimationCount(ZkMorphMesh const* slf) { } ZkMorphAnimation const* ZkMorphMesh_getAnimation(ZkMorphMesh const* slf, ZkSize i) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkMorphMesh_getAnimation"); return nullptr; @@ -105,6 +116,7 @@ ZkMorphAnimation const* ZkMorphMesh_getAnimation(ZkMorphMesh const* slf, ZkSize } void ZkMorphMesh_enumerateAnimations(ZkMorphMesh const* slf, ZkMorphAnimationEnumerator cb, void* ctx) { + ZKC_TRACE_FN(); if (slf == nullptr || cb == nullptr) { ZKC_LOG_WARN_NULL("ZkMorphMesh_enumerateAnimations"); return; @@ -116,6 +128,7 @@ void ZkMorphMesh_enumerateAnimations(ZkMorphMesh const* slf, ZkMorphAnimationEnu } ZkSize ZkMorphMesh_getSourceCount(ZkMorphMesh const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkMorphMesh_getSourceCount"); return 0; @@ -125,6 +138,7 @@ ZkSize ZkMorphMesh_getSourceCount(ZkMorphMesh const* slf) { } ZkMorphSource const* ZkMorphMesh_getSource(ZkMorphMesh const* slf, ZkSize i) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkMorphMesh_getSource"); return nullptr; @@ -139,6 +153,7 @@ ZkMorphSource const* ZkMorphMesh_getSource(ZkMorphMesh const* slf, ZkSize i) { } void ZkMorphMesh_enumerateSources(ZkMorphMesh const* slf, ZkMorphSourceEnumerator cb, void* ctx) { + ZKC_TRACE_FN(); if (slf == nullptr || cb == nullptr) { ZKC_LOG_WARN_NULL("ZkMorphMesh_enumerateSources"); return; @@ -150,6 +165,7 @@ void ZkMorphMesh_enumerateSources(ZkMorphMesh const* slf, ZkMorphSourceEnumerato } ZkString ZkMorphAnimation_getName(ZkMorphAnimation const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkMorphAnimation_getName"); return nullptr; @@ -159,6 +175,7 @@ ZkString ZkMorphAnimation_getName(ZkMorphAnimation const* slf) { } int32_t ZkMorphAnimation_getLayer(ZkMorphAnimation const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkMorphAnimation_getLayer"); return 0; @@ -168,6 +185,7 @@ int32_t ZkMorphAnimation_getLayer(ZkMorphAnimation const* slf) { } float ZkMorphAnimation_getBlendIn(ZkMorphAnimation const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkMorphAnimation_getBlendIn"); return 0; @@ -177,6 +195,7 @@ float ZkMorphAnimation_getBlendIn(ZkMorphAnimation const* slf) { } float ZkMorphAnimation_getBlendOut(ZkMorphAnimation const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkMorphAnimation_getBlendOut"); return 0; @@ -186,6 +205,7 @@ float ZkMorphAnimation_getBlendOut(ZkMorphAnimation const* slf) { } float ZkMorphAnimation_getDuration(ZkMorphAnimation const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkMorphAnimation_getDuration"); return 0; @@ -195,6 +215,7 @@ float ZkMorphAnimation_getDuration(ZkMorphAnimation const* slf) { } float ZkMorphAnimation_getSpeed(ZkMorphAnimation const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkMorphAnimation_getSpeed"); return 0; @@ -204,6 +225,7 @@ float ZkMorphAnimation_getSpeed(ZkMorphAnimation const* slf) { } uint8_t ZkMorphAnimation_getFlags(ZkMorphAnimation const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkMorphAnimation_getFlags"); return 0; @@ -213,6 +235,7 @@ uint8_t ZkMorphAnimation_getFlags(ZkMorphAnimation const* slf) { } uint32_t ZkMorphAnimation_getFrameCount(ZkMorphAnimation const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkMorphAnimation_getFrameCount"); return 0; @@ -222,6 +245,7 @@ uint32_t ZkMorphAnimation_getFrameCount(ZkMorphAnimation const* slf) { } uint32_t const* ZkMorphAnimation_getVertices(ZkMorphAnimation const* slf, ZkSize* count) { + ZKC_TRACE_FN(); if (slf == nullptr || count == nullptr) { ZKC_LOG_WARN_NULL("ZkMorphAnimation_getVertices"); return nullptr; @@ -232,6 +256,7 @@ uint32_t const* ZkMorphAnimation_getVertices(ZkMorphAnimation const* slf, ZkSize } ZkVec3f const* ZkMorphAnimation_getSamples(ZkMorphAnimation const* slf, ZkSize* count) { + ZKC_TRACE_FN(); if (slf == nullptr || count == nullptr) { ZKC_LOG_WARN_NULL("ZkMorphAnimation_getSamples"); return nullptr; @@ -242,6 +267,7 @@ ZkVec3f const* ZkMorphAnimation_getSamples(ZkMorphAnimation const* slf, ZkSize* } ZkDate ZkMorphSource_getFileDate(ZkMorphSource const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkMorphSource_getFileDate"); return {}; @@ -251,6 +277,7 @@ ZkDate ZkMorphSource_getFileDate(ZkMorphSource const* slf) { } ZkString ZkMorphSource_getFileName(ZkMorphSource const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkMorphSource_getFileName"); return nullptr; diff --git a/src/MultiResolutionMesh.cc b/src/MultiResolutionMesh.cc index 41a1766..3ef0968 100644 --- a/src/MultiResolutionMesh.cc +++ b/src/MultiResolutionMesh.cc @@ -2,7 +2,10 @@ // SPDX-License-Identifier: MIT #include "zenkit-capi/MultiResolutionMesh.h" +#include "Internal.hh" + ZkMultiResolutionMesh* ZkMultiResolutionMesh_load(ZkRead* buf) { + ZKC_TRACE_FN(); if (buf == nullptr) { ZKC_LOG_WARN_NULL("ZkMultiResolutionMesh_load"); return nullptr; @@ -19,6 +22,7 @@ ZkMultiResolutionMesh* ZkMultiResolutionMesh_load(ZkRead* buf) { } ZkMultiResolutionMesh* ZkMultiResolutionMesh_loadPath(ZkString path) { + ZKC_TRACE_FN(); if (path == nullptr) { ZKC_LOG_WARN_NULL("ZkMultiResolutionMesh_loadPath"); return nullptr; @@ -37,6 +41,7 @@ ZkMultiResolutionMesh* ZkMultiResolutionMesh_loadPath(ZkString path) { } ZkMultiResolutionMesh* ZkMultiResolutionMesh_loadVfs(ZkVfs* vfs, ZkString name) { + ZKC_TRACE_FN(); if (vfs == nullptr || name == nullptr) { ZKC_LOG_WARN_NULL("ZkMultiResolutionMesh_loadVfs"); return nullptr; @@ -50,10 +55,12 @@ ZkMultiResolutionMesh* ZkMultiResolutionMesh_loadVfs(ZkVfs* vfs, ZkString name) } void ZkMultiResolutionMesh_del(ZkMultiResolutionMesh* slf) { + ZKC_TRACE_FN(); delete slf; } ZkVec3f const* ZkMultiResolutionMesh_getPositions(ZkMultiResolutionMesh const* slf, ZkSize* count) { + ZKC_TRACE_FN(); if (slf == nullptr || count == nullptr) { ZKC_LOG_WARN_NULL("ZkMultiResolutionMesh_getPositions"); return nullptr; @@ -64,6 +71,7 @@ ZkVec3f const* ZkMultiResolutionMesh_getPositions(ZkMultiResolutionMesh const* s } ZkVec3f const* ZkMultiResolutionMesh_getNormals(ZkMultiResolutionMesh const* slf, ZkSize* count) { + ZKC_TRACE_FN(); if (slf == nullptr || count == nullptr) { ZKC_LOG_WARN_NULL("ZkMultiResolutionMesh_getNormals"); return nullptr; @@ -74,6 +82,7 @@ ZkVec3f const* ZkMultiResolutionMesh_getNormals(ZkMultiResolutionMesh const* slf } ZkSize ZkMultiResolutionMesh_getSubMeshCount(ZkMultiResolutionMesh const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkMultiResolutionMesh_getSubMeshCount"); return 0; @@ -83,6 +92,7 @@ ZkSize ZkMultiResolutionMesh_getSubMeshCount(ZkMultiResolutionMesh const* slf) { } ZkSubMesh const* ZkMultiResolutionMesh_getSubMesh(ZkMultiResolutionMesh const* slf, ZkSize i) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkMultiResolutionMesh_getSubMesh"); return nullptr; @@ -97,6 +107,7 @@ ZkSubMesh const* ZkMultiResolutionMesh_getSubMesh(ZkMultiResolutionMesh const* s } void ZkMultiResolutionMesh_enumerateSubMeshes(ZkMultiResolutionMesh const* slf, ZkSubMeshEnumerator cb, void* ctx) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkMultiResolutionMesh_enumerateSubMeshes"); return; @@ -108,6 +119,7 @@ void ZkMultiResolutionMesh_enumerateSubMeshes(ZkMultiResolutionMesh const* slf, } ZkSize ZkMultiResolutionMesh_getMaterialCount(ZkMultiResolutionMesh const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkMultiResolutionMesh_getMaterialCount"); return 0; @@ -117,6 +129,7 @@ ZkSize ZkMultiResolutionMesh_getMaterialCount(ZkMultiResolutionMesh const* slf) } ZkMaterial const* ZkMultiResolutionMesh_getMaterial(ZkMultiResolutionMesh const* slf, ZkSize i) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkMultiResolutionMesh_getMaterial"); return nullptr; @@ -131,6 +144,7 @@ ZkMaterial const* ZkMultiResolutionMesh_getMaterial(ZkMultiResolutionMesh const* } void ZkMultiResolutionMesh_enumerateMaterials(ZkMultiResolutionMesh const* slf, ZkMaterialEnumerator cb, void* ctx) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkMultiResolutionMesh_enumerateMaterials"); return; @@ -142,6 +156,7 @@ void ZkMultiResolutionMesh_enumerateMaterials(ZkMultiResolutionMesh const* slf, } ZkBool ZkMultiResolutionMesh_getAlphaTest(ZkMultiResolutionMesh const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkMultiResolutionMesh_getAlphaTest"); return false; @@ -151,6 +166,7 @@ ZkBool ZkMultiResolutionMesh_getAlphaTest(ZkMultiResolutionMesh const* slf) { } ZkAxisAlignedBoundingBox ZkMultiResolutionMesh_getBbox(ZkMultiResolutionMesh const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkMultiResolutionMesh_getBbox"); return {}; @@ -160,6 +176,7 @@ ZkAxisAlignedBoundingBox ZkMultiResolutionMesh_getBbox(ZkMultiResolutionMesh con } ZkOrientedBoundingBox const* ZkMultiResolutionMesh_getOrientedBbox(ZkMultiResolutionMesh const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkMultiResolutionMesh_getOrientedBbox"); return nullptr; @@ -169,6 +186,7 @@ ZkOrientedBoundingBox const* ZkMultiResolutionMesh_getOrientedBbox(ZkMultiResolu } ZkMaterial const* ZkSubMesh_getMaterial(ZkSubMesh const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkSubMesh_getMaterial"); return nullptr; @@ -178,6 +196,7 @@ ZkMaterial const* ZkSubMesh_getMaterial(ZkSubMesh const* slf) { } ZkMeshTriangle const* ZkSubMesh_getTriangles(ZkSubMesh const* slf, ZkSize* count) { + ZKC_TRACE_FN(); if (slf == nullptr || count == nullptr) { ZKC_LOG_WARN_NULL("ZkSubMesh_getTriangles"); return nullptr; @@ -188,6 +207,7 @@ ZkMeshTriangle const* ZkSubMesh_getTriangles(ZkSubMesh const* slf, ZkSize* count } ZkMeshWedge const* ZkSubMesh_getWedges(ZkSubMesh const* slf, ZkSize* count) { + ZKC_TRACE_FN(); if (slf == nullptr || count == nullptr) { ZKC_LOG_WARN_NULL("ZkSubMesh_getWedges"); return nullptr; @@ -198,6 +218,7 @@ ZkMeshWedge const* ZkSubMesh_getWedges(ZkSubMesh const* slf, ZkSize* count) { } float const* ZkSubMesh_getColors(ZkSubMesh const* slf, ZkSize* count) { + ZKC_TRACE_FN(); if (slf == nullptr || count == nullptr) { ZKC_LOG_WARN_NULL("ZkSubMesh_getColors"); return nullptr; @@ -208,6 +229,7 @@ float const* ZkSubMesh_getColors(ZkSubMesh const* slf, ZkSize* count) { } uint16_t const* ZkSubMesh_getTrianglePlaneIndices(ZkSubMesh const* slf, ZkSize* count) { + ZKC_TRACE_FN(); if (slf == nullptr || count == nullptr) { ZKC_LOG_WARN_NULL("ZkSubMesh_getTrianglePlaneIndices"); return nullptr; @@ -218,6 +240,7 @@ uint16_t const* ZkSubMesh_getTrianglePlaneIndices(ZkSubMesh const* slf, ZkSize* } ZkMeshPlane const* ZkSubMesh_getTrianglePlanes(ZkSubMesh const* slf, ZkSize* count) { + ZKC_TRACE_FN(); if (slf == nullptr || count == nullptr) { ZKC_LOG_WARN_NULL("ZkSubMesh_getTrianglePlanes"); return nullptr; @@ -228,6 +251,7 @@ ZkMeshPlane const* ZkSubMesh_getTrianglePlanes(ZkSubMesh const* slf, ZkSize* cou } ZkMeshTriangleEdge const* ZkSubMesh_getTriangleEdges(ZkSubMesh const* slf, ZkSize* count) { + ZKC_TRACE_FN(); if (slf == nullptr || count == nullptr) { ZKC_LOG_WARN_NULL("ZkSubMesh_getTriangleEdges"); return nullptr; @@ -238,6 +262,7 @@ ZkMeshTriangleEdge const* ZkSubMesh_getTriangleEdges(ZkSubMesh const* slf, ZkSiz } ZkMeshEdge const* ZkSubMesh_getEdges(ZkSubMesh const* slf, ZkSize* count) { + ZKC_TRACE_FN(); if (slf == nullptr || count == nullptr) { ZKC_LOG_WARN_NULL("ZkSubMesh_getEdges"); return nullptr; @@ -248,6 +273,7 @@ ZkMeshEdge const* ZkSubMesh_getEdges(ZkSubMesh const* slf, ZkSize* count) { } float const* ZkSubMesh_getEdgeScores(ZkSubMesh const* slf, ZkSize* count) { + ZKC_TRACE_FN(); if (slf == nullptr || count == nullptr) { ZKC_LOG_WARN_NULL("ZkSubMesh_getEdgeScores"); return nullptr; @@ -258,6 +284,7 @@ float const* ZkSubMesh_getEdgeScores(ZkSubMesh const* slf, ZkSize* count) { } uint16_t const* ZkSubMesh_getWedgeMap(ZkSubMesh const* slf, ZkSize* count) { + ZKC_TRACE_FN(); if (slf == nullptr || count == nullptr) { ZKC_LOG_WARN_NULL("ZkSubMesh_getWedgeMap"); return nullptr; diff --git a/src/SoftSkinMesh.cc b/src/SoftSkinMesh.cc index 718de96..69e78eb 100644 --- a/src/SoftSkinMesh.cc +++ b/src/SoftSkinMesh.cc @@ -2,7 +2,10 @@ // SPDX-License-Identifier: MIT #include "zenkit-capi/SoftSkinMesh.h" +#include "Internal.hh" + ZkSize ZkSoftSkinMesh_getNodeCount(ZkSoftSkinMesh const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkSoftSkinMesh_getNodeCount"); return 0; @@ -12,6 +15,7 @@ ZkSize ZkSoftSkinMesh_getNodeCount(ZkSoftSkinMesh const* slf) { } ZkMultiResolutionMesh const* ZkSoftSkinMesh_getMesh(ZkSoftSkinMesh const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkSoftSkinMesh_getMesh"); return nullptr; @@ -21,6 +25,7 @@ ZkMultiResolutionMesh const* ZkSoftSkinMesh_getMesh(ZkSoftSkinMesh const* slf) { } ZkOrientedBoundingBox const* ZkSoftSkinMesh_getBbox(ZkSoftSkinMesh const* slf, ZkSize node) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkSoftSkinMesh_getBbox"); return nullptr; @@ -35,6 +40,7 @@ ZkOrientedBoundingBox const* ZkSoftSkinMesh_getBbox(ZkSoftSkinMesh const* slf, Z } void ZkSoftSkinMesh_enumerateBoundingBoxes(ZkSoftSkinMesh const* slf, ZkOrientedBoundingBoxEnumerator cb, void* ctx) { + ZKC_TRACE_FN(); if (slf == nullptr || cb == nullptr) { ZKC_LOG_WARN_NULL("ZkSoftSkinMesh_enumerateBoundingBoxes"); return; @@ -46,6 +52,7 @@ void ZkSoftSkinMesh_enumerateBoundingBoxes(ZkSoftSkinMesh const* slf, ZkOriented } ZkSoftSkinWeightEntry const* ZkSoftSkinMesh_getWeights(ZkSoftSkinMesh const* slf, ZkSize node, ZkSize* count) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkSoftSkinMesh_getWeights"); return nullptr; @@ -61,6 +68,7 @@ ZkSoftSkinWeightEntry const* ZkSoftSkinMesh_getWeights(ZkSoftSkinMesh const* slf } void ZkSoftSkinMesh_enumerateWeights(ZkSoftSkinMesh const* slf, ZkSoftSkinWeightEnumerator cb, void* ctx) { + ZKC_TRACE_FN(); if (slf == nullptr || cb == nullptr) { ZKC_LOG_WARN_NULL("ZkSoftSkinMesh_enumerateWeights"); return; @@ -72,6 +80,7 @@ void ZkSoftSkinMesh_enumerateWeights(ZkSoftSkinMesh const* slf, ZkSoftSkinWeight } ZkSoftSkinWedgeNormal const* ZkSoftSkinMesh_getWedgeNormals(ZkSoftSkinMesh const* slf, ZkSize* count) { + ZKC_TRACE_FN(); if (slf == nullptr || count == nullptr) { ZKC_LOG_WARN_NULL("ZkSoftSkinMesh_getWedgeNormals"); return nullptr; @@ -82,6 +91,7 @@ ZkSoftSkinWedgeNormal const* ZkSoftSkinMesh_getWedgeNormals(ZkSoftSkinMesh const } int32_t const* ZkSoftSkinMesh_getNodes(ZkSoftSkinMesh const* slf, ZkSize* count) { + ZKC_TRACE_FN(); if (slf == nullptr || count == nullptr) { ZKC_LOG_WARN_NULL("ZkSoftSkinMesh_getNodes"); return nullptr; diff --git a/src/vobs/Camera.cc b/src/vobs/Camera.cc index fefcd66..352e625 100644 --- a/src/vobs/Camera.cc +++ b/src/vobs/Camera.cc @@ -11,167 +11,200 @@ ZKC_VOB_PATH_LOADER(ZkCutsceneCamera); ZKC_DELETER(ZkCutsceneCamera); ZkCameraTrajectory ZkCutsceneCamera_getTrajectoryFOR(ZkCutsceneCamera const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return static_cast(slf->trajectory_for); } void ZkCutsceneCamera_setTrajectoryFOR(ZkCutsceneCamera* slf, ZkCameraTrajectory trajectoryFOR) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->trajectory_for = static_cast(trajectoryFOR); } ZkCameraTrajectory ZkCutsceneCamera_getTargetTrajectoryFOR(ZkCutsceneCamera const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return static_cast(slf->target_trajectory_for); } void ZkCutsceneCamera_setTargetTrajectoryFOR(ZkCutsceneCamera* slf, ZkCameraTrajectory targetTrajectoryFOR) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->target_trajectory_for = static_cast(targetTrajectoryFOR); } ZkCameraLoopType ZkCutsceneCamera_getLoopMode(ZkCutsceneCamera const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return static_cast(slf->loop_mode); } void ZkCutsceneCamera_setLoopMode(ZkCutsceneCamera* slf, ZkCameraLoopType loopMode) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->loop_mode = static_cast(loopMode); } ZkCameraLerpType ZkCutsceneCamera_getLerpMode(ZkCutsceneCamera const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return static_cast(slf->lerp_mode); } void ZkCutsceneCamera_setLerpMode(ZkCutsceneCamera* slf, ZkCameraLerpType lerpMode) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->lerp_mode = static_cast(lerpMode); } ZkBool ZkCutsceneCamera_getIgnoreFORVobRotation(ZkCutsceneCamera const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->ignore_for_vob_rotation; } void ZkCutsceneCamera_setIgnoreFORVobRotation(ZkCutsceneCamera* slf, ZkBool ignoreFORVobRotation) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->ignore_for_vob_rotation = ignoreFORVobRotation; } ZkBool ZkCutsceneCamera_getIgnoreFORVobRotationTarget(ZkCutsceneCamera const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->ignore_for_vob_rotation_target; } void ZkCutsceneCamera_setIgnoreFORVobRotationTarget(ZkCutsceneCamera* slf, ZkBool ignoreFORVobRotationTarget) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->ignore_for_vob_rotation_target = ignoreFORVobRotationTarget; } ZkBool ZkCutsceneCamera_getAdapt(ZkCutsceneCamera const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->adapt; } void ZkCutsceneCamera_setAdapt(ZkCutsceneCamera* slf, ZkBool adapt) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->adapt = adapt; } ZkBool ZkCutsceneCamera_getEaseFirst(ZkCutsceneCamera const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->ease_first; } void ZkCutsceneCamera_setEaseFirst(ZkCutsceneCamera* slf, ZkBool easeFirst) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->ease_first = easeFirst; } ZkBool ZkCutsceneCamera_getEaseLast(ZkCutsceneCamera const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->ease_last; } void ZkCutsceneCamera_setEaseLast(ZkCutsceneCamera* slf, ZkBool easeLast) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->ease_last = easeLast; } float ZkCutsceneCamera_getTotalDuration(ZkCutsceneCamera const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->total_duration; } void ZkCutsceneCamera_setTotalDuration(ZkCutsceneCamera* slf, float totalDuration) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->total_duration = totalDuration; } ZkString ZkCutsceneCamera_getAutoFocusVob(ZkCutsceneCamera const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->auto_focus_vob.c_str(); } void ZkCutsceneCamera_setAutoFocusVob(ZkCutsceneCamera* slf, ZkString autoFocusVob) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->auto_focus_vob = autoFocusVob; } ZkBool ZkCutsceneCamera_getAutoPlayerMovable(ZkCutsceneCamera const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->auto_player_movable; } void ZkCutsceneCamera_setAutoPlayerMovable(ZkCutsceneCamera* slf, ZkBool autoPlayerMovable) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->auto_player_movable = autoPlayerMovable; } ZkBool ZkCutsceneCamera_getAutoUntriggerLast(ZkCutsceneCamera const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->auto_untrigger_last; } void ZkCutsceneCamera_setAutoUntriggerLast(ZkCutsceneCamera* slf, ZkBool autoUntriggerLast) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->auto_untrigger_last = autoUntriggerLast; } float ZkCutsceneCamera_getAutoUntriggerLastDelay(ZkCutsceneCamera const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->auto_untrigger_last_delay; } void ZkCutsceneCamera_setAutoUntriggerLastDelay(ZkCutsceneCamera* slf, float autoUntriggerLastDelay) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->auto_untrigger_last_delay = autoUntriggerLastDelay; } int32_t ZkCutsceneCamera_getPositionCount(ZkCutsceneCamera const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->position_count; } int32_t ZkCutsceneCamera_getTargetCount(ZkCutsceneCamera const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->target_count; } ZkSize ZkCutsceneCamera_getFrameCount(ZkCutsceneCamera const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->frames.size(); } ZkCameraTrajectoryFrame* ZkCutsceneCamera_getFrame(ZkCutsceneCamera const* slf, ZkSize i) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); ZKC_CHECK_LEN(slf->frames, i); return slf->frames[i].get(); } void ZkCutsceneCamera_enumerateFrames(ZkCutsceneCamera const* slf, ZkCameraTrajectoryFrameEnumerator cb, void* ctx) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf, cb); for (auto& frame : slf->frames) { @@ -180,131 +213,157 @@ void ZkCutsceneCamera_enumerateFrames(ZkCutsceneCamera const* slf, ZkCameraTraje } float ZkCameraTrajectoryFrame_getTime(ZkCameraTrajectoryFrame const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->time; } void ZkCameraTrajectoryFrame_setTime(ZkCameraTrajectoryFrame* slf, float time) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->time = time; } float ZkCameraTrajectoryFrame_getRollAngle(ZkCameraTrajectoryFrame const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->roll_angle; } void ZkCameraTrajectoryFrame_setRollAngle(ZkCameraTrajectoryFrame* slf, float rollAngle) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->roll_angle = rollAngle; } float ZkCameraTrajectoryFrame_getFovScale(ZkCameraTrajectoryFrame const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->fov_scale; } void ZkCameraTrajectoryFrame_setFovScale(ZkCameraTrajectoryFrame* slf, float fovScale) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->fov_scale = fovScale; } ZkCameraMotion ZkCameraTrajectoryFrame_getMotionType(ZkCameraTrajectoryFrame const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return static_cast(slf->motion_type); } void ZkCameraTrajectoryFrame_setMotionType(ZkCameraTrajectoryFrame* slf, ZkCameraMotion motionType) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->motion_type = static_cast(motionType); } ZkCameraMotion ZkCameraTrajectoryFrame_getMotionTypeFov(ZkCameraTrajectoryFrame const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return static_cast(slf->motion_type_fov); } void ZkCameraTrajectoryFrame_setMotionTypeFov(ZkCameraTrajectoryFrame* slf, ZkCameraMotion motionTypeFov) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->motion_type_fov = static_cast(motionTypeFov); } ZkCameraMotion ZkCameraTrajectoryFrame_getMotionTypeRoll(ZkCameraTrajectoryFrame const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return static_cast(slf->motion_type_roll); } void ZkCameraTrajectoryFrame_setMotionTypeRoll(ZkCameraTrajectoryFrame* slf, ZkCameraMotion motionTypeRoll) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->motion_type_roll = static_cast(motionTypeRoll); } ZkCameraMotion ZkCameraTrajectoryFrame_getMotionTypeTimeScale(ZkCameraTrajectoryFrame const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return static_cast(slf->motion_type_time_scale); } void ZkCameraTrajectoryFrame_setMotionTypeTimeScale(ZkCameraTrajectoryFrame* slf, ZkCameraMotion motionTypeTimeScale) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->motion_type_time_scale = static_cast(motionTypeTimeScale); } float ZkCameraTrajectoryFrame_getTension(ZkCameraTrajectoryFrame const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->tension; } void ZkCameraTrajectoryFrame_setTension(ZkCameraTrajectoryFrame* slf, float tension) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->tension = tension; } float ZkCameraTrajectoryFrame_getCamBias(ZkCameraTrajectoryFrame const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->cam_bias; } void ZkCameraTrajectoryFrame_setCamBias(ZkCameraTrajectoryFrame* slf, float camBias) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->cam_bias = camBias; } float ZkCameraTrajectoryFrame_getContinuity(ZkCameraTrajectoryFrame const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->continuity; } void ZkCameraTrajectoryFrame_setContinuity(ZkCameraTrajectoryFrame* slf, float continuity) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->continuity = continuity; } float ZkCameraTrajectoryFrame_getTimeScale(ZkCameraTrajectoryFrame const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->time_scale; } void ZkCameraTrajectoryFrame_setTimeScale(ZkCameraTrajectoryFrame* slf, float timeScale) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->time_scale = timeScale; } ZkBool ZkCameraTrajectoryFrame_getTimeFixed(ZkCameraTrajectoryFrame const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->time_fixed; } void ZkCameraTrajectoryFrame_setTimeFixed(ZkCameraTrajectoryFrame* slf, ZkBool timeFixed) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->time_fixed = timeFixed; } ZkMat4x4 ZkCameraTrajectoryFrame_getOriginalPose(ZkCameraTrajectoryFrame const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->original_pose; } void ZkCameraTrajectoryFrame_setOriginalPose(ZkCameraTrajectoryFrame* slf, ZkMat4x4 originalPose) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->original_pose = originalPose; } diff --git a/src/vobs/Light.cc b/src/vobs/Light.cc index 08ee4cd..e1fd7be 100644 --- a/src/vobs/Light.cc +++ b/src/vobs/Light.cc @@ -15,325 +15,389 @@ ZKC_VOB_PATH_LOADER(ZkLight); ZKC_DELETER(ZkLight); ZkString ZkLightPreset_getPreset(ZkLightPreset const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->preset.c_str(); } void ZkLightPreset_setPreset(ZkLightPreset* slf, ZkString preset) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->preset = preset; } ZkLightType ZkLightPreset_getLightType(ZkLightPreset const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return static_cast(slf->light_type); } void ZkLightPreset_setLightType(ZkLightPreset* slf, ZkLightType lightType) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->light_type = static_cast(lightType); } float ZkLightPreset_getRange(ZkLightPreset const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->range; } void ZkLightPreset_setRange(ZkLightPreset* slf, float range) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->range = range; } ZkColor ZkLightPreset_getColor(ZkLightPreset const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->color; } void ZkLightPreset_setColor(ZkLightPreset* slf, ZkColor color) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->color = color; } float ZkLightPreset_getConeAngle(ZkLightPreset const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->cone_angle; } void ZkLightPreset_setConeAngle(ZkLightPreset* slf, float coneAngle) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->cone_angle = coneAngle; } ZkBool ZkLightPreset_getIsStatic(ZkLightPreset const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->is_static; } void ZkLightPreset_setIsStatic(ZkLightPreset* slf, ZkBool isStatic) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->is_static = isStatic; } ZkLightQuality ZkLightPreset_getQuality(ZkLightPreset const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return static_cast(slf->quality); } void ZkLightPreset_setQuality(ZkLightPreset* slf, ZkLightQuality quality) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->quality = static_cast(quality); } ZkString ZkLightPreset_getLensflareFx(ZkLightPreset const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->lensflare_fx.c_str(); } void ZkLightPreset_setLensflareFx(ZkLightPreset* slf, ZkString lensflareFx) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->lensflare_fx = lensflareFx; } ZkBool ZkLightPreset_getOn(ZkLightPreset const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->on; } void ZkLightPreset_setOn(ZkLightPreset* slf, ZkBool on) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->on = on; } float const* ZkLightPreset_getRangeAnimationScale(ZkLightPreset const* slf, ZkSize* count) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf, count); *count = slf->range_animation_scale.size(); return slf->range_animation_scale.data(); } void ZkLightPreset_setRangeAnimationScale(ZkLightPreset* slf, float const* scale, ZkSize count) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf, scale); slf->range_animation_scale.assign(scale, scale + count); } float ZkLightPreset_getRangeAnimationFps(ZkLightPreset const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->range_animation_fps; } void ZkLightPreset_setRangeAnimationFps(ZkLightPreset* slf, float rangeAnimationFps) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->range_animation_fps = rangeAnimationFps; } ZkBool ZkLightPreset_getRangeAnimationSmooth(ZkLightPreset const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->range_animation_smooth; } void ZkLightPreset_setRangeAnimationSmooth(ZkLightPreset* slf, ZkBool rangeAnimationSmooth) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->range_animation_smooth = rangeAnimationSmooth; } ZkColor const* ZkLightPreset_getColorAnimationList(ZkLightPreset const* slf, ZkSize* count) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf, count); *count = slf->color_animation_list.size(); return slf->color_animation_list.data(); } void ZkLightPreset_setColorAnimationList(ZkLightPreset* slf, ZkColor const* list, ZkSize count) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf, list); slf->color_animation_list.assign(list, list + count); } float ZkLightPreset_getColorAnimationFps(ZkLightPreset const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->color_animation_fps; } void ZkLightPreset_setColorAnimationFps(ZkLightPreset* slf, float colorAnimationFps) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->color_animation_fps = colorAnimationFps; } ZkBool ZkLightPreset_getColorAnimationSmooth(ZkLightPreset const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->color_animation_smooth; } void ZkLightPreset_setColorAnimationSmooth(ZkLightPreset* slf, ZkBool colorAnimationSmooth) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->color_animation_smooth = colorAnimationSmooth; } ZkBool ZkLightPreset_getCanMove(ZkLightPreset const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->can_move; } void ZkLightPreset_setCanMove(ZkLightPreset* slf, ZkBool canMove) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->can_move = canMove; } ZkString ZkLight_getPreset(ZkLight const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->preset.c_str(); } void ZkLight_setPreset(ZkLight* slf, ZkString preset) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->preset = preset; } ZkLightType ZkLight_getLightType(ZkLight const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return static_cast(slf->light_type); } void ZkLight_setLightType(ZkLight* slf, ZkLightType lightType) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->light_type = static_cast(lightType); } float ZkLight_getRange(ZkLight const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->range; } void ZkLight_setRange(ZkLight* slf, float range) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->range = range; } ZkColor ZkLight_getColor(ZkLight const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->color; } void ZkLight_setColor(ZkLight* slf, ZkColor color) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->color = color; } float ZkLight_getConeAngle(ZkLight const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->cone_angle; } void ZkLight_setConeAngle(ZkLight* slf, float coneAngle) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->cone_angle = coneAngle; } ZkBool ZkLight_getIsStatic(ZkLight const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->is_static; } void ZkLight_setIsStatic(ZkLight* slf, ZkBool isStatic) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->is_static = isStatic; } ZkLightQuality ZkLight_getQuality(ZkLight const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return static_cast(slf->quality); } void ZkLight_setQuality(ZkLight* slf, ZkLightQuality quality) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->quality = static_cast(quality); } ZkString ZkLight_getLensflareFx(ZkLight const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->lensflare_fx.c_str(); } void ZkLight_setLensflareFx(ZkLight* slf, ZkString lensflareFx) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->lensflare_fx = lensflareFx; } ZkBool ZkLight_getOn(ZkLight const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->on; } void ZkLight_setOn(ZkLight* slf, ZkBool on) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->on = on; } float const* ZkLight_getRangeAnimationScale(ZkLight const* slf, ZkSize* count) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf, count); *count = slf->range_animation_scale.size(); return slf->range_animation_scale.data(); } void ZkLight_setRangeAnimationScale(ZkLight* slf, float const* scale, ZkSize count) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf, scale); slf->range_animation_scale.assign(scale, scale + count); } float ZkLight_getRangeAnimationFps(ZkLight const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->range_animation_fps; } void ZkLight_setRangeAnimationFps(ZkLight* slf, float rangeAnimationFps) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->range_animation_fps = rangeAnimationFps; } ZkBool ZkLight_getRangeAnimationSmooth(ZkLight const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->range_animation_smooth; } void ZkLight_setRangeAnimationSmooth(ZkLight* slf, ZkBool rangeAnimationSmooth) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->range_animation_smooth = rangeAnimationSmooth; } ZkColor const* ZkLight_getColorAnimationList(ZkLight const* slf, ZkSize* count) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf, count); *count = slf->color_animation_list.size(); return slf->color_animation_list.data(); } void ZkLight_setColorAnimationList(ZkLight* slf, ZkColor const* list, ZkSize count) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf, list); slf->color_animation_list.assign(list, list + count); } float ZkLight_getColorAnimationFps(ZkLight const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->color_animation_fps; } void ZkLight_setColorAnimationFps(ZkLight* slf, float colorAnimationFps) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->color_animation_fps = colorAnimationFps; } ZkBool ZkLight_getColorAnimationSmooth(ZkLight const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->color_animation_smooth; } void ZkLight_setColorAnimationSmooth(ZkLight* slf, ZkBool colorAnimationSmooth) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->color_animation_smooth = colorAnimationSmooth; } ZkBool ZkLight_getCanMove(ZkLight const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->can_move; } void ZkLight_setCanMove(ZkLight* slf, ZkBool canMove) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->can_move = canMove; } diff --git a/src/vobs/Misc.cc b/src/vobs/Misc.cc index 509676f..249e677 100644 --- a/src/vobs/Misc.cc +++ b/src/vobs/Misc.cc @@ -11,11 +11,13 @@ ZKC_VOB_PATH_LOADER(ZkAnimate) ZKC_DELETER(ZkAnimate) ZkBool ZkAnimate_getStartOn(ZkAnimate const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->start_on; } void ZkAnimate_setStartOn(ZkAnimate* slf, ZkBool startOn) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->start_on = startOn; } @@ -25,11 +27,13 @@ ZKC_VOB_PATH_LOADER(ZkItem) ZKC_DELETER(ZkItem) ZkString ZkItem_getInstance(ZkItem const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->instance.c_str(); } void ZkItem_setInstance(ZkItem* slf, ZkString instance) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->instance = instance; } @@ -39,11 +43,13 @@ ZKC_VOB_PATH_LOADER(ZkLensFlare) ZKC_DELETER(ZkLensFlare) ZkString ZkLensFlare_getEffect(ZkLensFlare const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->fx.c_str(); } void ZkLensFlare_setEffect(ZkLensFlare* slf, ZkString effect) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->fx = effect; } @@ -53,31 +59,37 @@ ZKC_VOB_PATH_LOADER(ZkParticleEffectController) ZKC_DELETER(ZkParticleEffectController) ZkString ZkParticleEffectController_getEffectName(ZkParticleEffectController const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->pfx_name.c_str(); } void ZkParticleEffectController_setEffectName(ZkParticleEffectController* slf, ZkString effectName) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->pfx_name = effectName; } ZkBool ZkParticleEffectController_getKillWhenDone(ZkParticleEffectController const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->kill_when_done; } void ZkParticleEffectController_setKillWhenDone(ZkParticleEffectController* slf, ZkBool killWhenDone) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->kill_when_done = killWhenDone; } ZkBool ZkParticleEffectController_getInitiallyRunning(ZkParticleEffectController const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->initially_running; } void ZkParticleEffectController_setInitiallyRunning(ZkParticleEffectController* slf, ZkBool initiallyRunning) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->initially_running = initiallyRunning; } @@ -87,31 +99,37 @@ ZKC_VOB_PATH_LOADER(ZkMessageFilter) ZKC_DELETER(ZkMessageFilter) ZkString ZkMessageFilter_getTarget(ZkMessageFilter const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->target.c_str(); } void ZkMessageFilter_setTarget(ZkMessageFilter* slf, ZkString target) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->target = target; } ZkMessageFilterAction ZkMessageFilter_getOnTrigger(ZkMessageFilter const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return static_cast(slf->on_trigger); } void ZkMessageFilter_setOnTrigger(ZkMessageFilter* slf, ZkMessageFilterAction onTrigger) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->on_trigger = static_cast(onTrigger); } ZkMessageFilterAction ZkMessageFilter_getOnUntrigger(ZkMessageFilter const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return static_cast(slf->on_untrigger); } void ZkMessageFilter_setOnUntrigger(ZkMessageFilter* slf, ZkMessageFilterAction onUntrigger) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->on_untrigger = static_cast(onUntrigger); } @@ -121,67 +139,80 @@ ZKC_VOB_PATH_LOADER(ZkCodeMaster) ZKC_DELETER(ZkCodeMaster) ZkString ZkCodeMaster_getTarget(ZkCodeMaster const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->target.c_str(); } void ZkCodeMaster_setTarget(ZkCodeMaster* slf, ZkString target) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->target = target; } ZkBool ZkCodeMaster_getOrdered(ZkCodeMaster const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->ordered; } void ZkCodeMaster_setOrdered(ZkCodeMaster* slf, ZkBool ordered) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->ordered = ordered; } ZkBool ZkCodeMaster_getFirstFalseIsFailure(ZkCodeMaster const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->first_false_is_failure; } void ZkCodeMaster_setFirstFalseIsFailure(ZkCodeMaster* slf, ZkBool firstFalseIsFailure) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->first_false_is_failure = firstFalseIsFailure; } ZkString ZkCodeMaster_getFailureTarget(ZkCodeMaster const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->failure_target.c_str(); } void ZkCodeMaster_setFailureTarget(ZkCodeMaster* slf, ZkString failureTarget) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->failure_target = failureTarget; } ZkBool ZkCodeMaster_getUntriggeredCancels(ZkCodeMaster const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->untriggered_cancels; } void ZkCodeMaster_setUntriggeredCancels(ZkCodeMaster* slf, ZkBool untriggeredCancels) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->untriggered_cancels = untriggeredCancels; } ZkSize ZkCodeMaster_getSlaveCount(ZkCodeMaster const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->slaves.size(); } ZkString ZkCodeMaster_getSlave(ZkCodeMaster const* slf, ZkSize i) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); ZKC_CHECK_LEN(slf->slaves, i); return slf->slaves[i].c_str(); } void ZkCodeMaster_enumerateSlaves(ZkCodeMaster const* slf, ZkStringEnumerator cb, void* ctx) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf, cb); for (auto& it : slf->slaves) { @@ -190,17 +221,20 @@ void ZkCodeMaster_enumerateSlaves(ZkCodeMaster const* slf, ZkStringEnumerator cb } void ZkCodeMaster_addSlave(ZkCodeMaster* slf, ZkString slave) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf, slave); slf->slaves.push_back(slave); } void ZkCodeMaster_removeSlave(ZkCodeMaster* slf, ZkSize i) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); ZKC_CHECK_LENV(slf->slaves, i); slf->slaves.erase(slf->slaves.begin() + static_cast(i)); } void ZkCodeMaster_removeSlaves(ZkCodeMaster* slf, ZkStringEnumerator pred, void* ctx) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf, pred); for (auto it = slf->slaves.begin(); it != slf->slaves.end();) { @@ -217,31 +251,37 @@ ZKC_VOB_PATH_LOADER(ZkMoverController) ZKC_DELETER(ZkMoverController) ZkString ZkMoverController_getTarget(ZkMoverController const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->target.c_str(); } void ZkMoverController_setTarget(ZkMoverController* slf, ZkString target) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->target = target; } ZkMoverMessageType ZkMoverController_getMessage(ZkMoverController const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return static_cast(slf->message); } void ZkMoverController_setMessage(ZkMoverController* slf, ZkMoverMessageType message) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->message = static_cast(message); } int32_t ZkMoverController_getKey(ZkMoverController const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->key; } void ZkMoverController_setKey(ZkMoverController* slf, int32_t key) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->key = key; } @@ -251,121 +291,145 @@ ZKC_VOB_PATH_LOADER(ZkTouchDamage) ZKC_DELETER(ZkTouchDamage) float ZkTouchDamage_getDamage(ZkTouchDamage const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->damage; } void ZkTouchDamage_setDamage(ZkTouchDamage* slf, float damage) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->damage = damage; } ZkBool ZkTouchDamage_getIsBarrier(ZkTouchDamage const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->barrier; } void ZkTouchDamage_setIsBarrier(ZkTouchDamage* slf, ZkBool isBarrier) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->barrier = isBarrier; } ZkBool ZkTouchDamage_getIsBlunt(ZkTouchDamage const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->blunt; } void ZkTouchDamage_setIsBlunt(ZkTouchDamage* slf, ZkBool isBlunt) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->blunt = isBlunt; } ZkBool ZkTouchDamage_getIsEdge(ZkTouchDamage const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->edge; } void ZkTouchDamage_setIsEdge(ZkTouchDamage* slf, ZkBool isEdge) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->edge = isEdge; } ZkBool ZkTouchDamage_getIsFire(ZkTouchDamage const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->fire; } void ZkTouchDamage_setIsFire(ZkTouchDamage* slf, ZkBool isFire) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->fire = isFire; } ZkBool ZkTouchDamage_getIsFly(ZkTouchDamage const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->fly; } void ZkTouchDamage_setIsFly(ZkTouchDamage* slf, ZkBool isFly) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->fly = isFly; } ZkBool ZkTouchDamage_getIsMagic(ZkTouchDamage const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->magic; } void ZkTouchDamage_setIsMagic(ZkTouchDamage* slf, ZkBool isMagic) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->magic = isMagic; } ZkBool ZkTouchDamage_getIsPoint(ZkTouchDamage const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->point; } void ZkTouchDamage_setIsPoint(ZkTouchDamage* slf, ZkBool isPoint) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->point = isPoint; } ZkBool ZkTouchDamage_getIsFall(ZkTouchDamage const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->fall; } void ZkTouchDamage_setIsFall(ZkTouchDamage* slf, ZkBool isFall) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->fall = isFall; } float ZkTouchDamage_getRepeatDelaySeconds(ZkTouchDamage const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->repeat_delay_sec; } void ZkTouchDamage_setRepeatDelaySeconds(ZkTouchDamage* slf, float repeatDelaySeconds) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->repeat_delay_sec = repeatDelaySeconds; } float ZkTouchDamage_getVolumeScale(ZkTouchDamage const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->volume_scale; } void ZkTouchDamage_setVolumeScale(ZkTouchDamage* slf, float volumeScale) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->volume_scale = volumeScale; } ZkTouchCollisionType ZkTouchDamage_getCollisionType(ZkTouchDamage const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return static_cast(slf->collision); } void ZkTouchDamage_setCollisionType(ZkTouchDamage* slf, ZkTouchCollisionType collisionType) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->collision = static_cast(collisionType); } @@ -375,31 +439,37 @@ ZKC_VOB_PATH_LOADER(ZkEarthquake) ZKC_DELETER(ZkEarthquake) float ZkEarthquake_getRadius(ZkEarthquake const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->radius; } void ZkEarthquake_setRadius(ZkEarthquake* slf, float radius) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->radius = radius; } float ZkEarthquake_getDuration(ZkEarthquake const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->duration; } void ZkEarthquake_setDuration(ZkEarthquake* slf, float duration) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->duration = duration; } ZkVec3f ZkEarthquake_getAmplitude(ZkEarthquake const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->amplitude; } void ZkEarthquake_setAmplitude(ZkEarthquake* slf, ZkVec3f amplitude) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->amplitude = amplitude; } diff --git a/src/vobs/MovableObject.cc b/src/vobs/MovableObject.cc index 12661df..3754080 100644 --- a/src/vobs/MovableObject.cc +++ b/src/vobs/MovableObject.cc @@ -9,111 +9,133 @@ ZKC_VOB_PATH_LOADER(ZkMovableObject) ZKC_DELETER(ZkMovableObject) ZkString ZkMovableObject_getName(ZkMovableObject const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->name.c_str(); } void ZkMovableObject_setName(ZkMovableObject* slf, ZkString name) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->name = name; } int32_t ZkMovableObject_getHp(ZkMovableObject const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->hp; } void ZkMovableObject_setHp(ZkMovableObject* slf, int32_t hp) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->hp = hp; } int32_t ZkMovableObject_getDamage(ZkMovableObject const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->damage; } void ZkMovableObject_setDamage(ZkMovableObject* slf, int32_t damage) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->damage = damage; } ZkBool ZkMovableObject_getMovable(ZkMovableObject const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->movable; } void ZkMovableObject_setMovable(ZkMovableObject* slf, ZkBool movable) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->movable = movable; } ZkBool ZkMovableObject_getTakable(ZkMovableObject const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->takable; } void ZkMovableObject_setTakable(ZkMovableObject* slf, ZkBool takable) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->takable = takable; } ZkBool ZkMovableObject_getFocusOverride(ZkMovableObject const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->focus_override; } void ZkMovableObject_setFocusOverride(ZkMovableObject* slf, ZkBool focusOverride) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->focus_override = focusOverride; } ZkSoundMaterialType ZkMovableObject_getMaterial(ZkMovableObject const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return static_cast(slf->material); } void ZkMovableObject_setMaterial(ZkMovableObject* slf, ZkSoundMaterialType material) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->material = static_cast(material); } ZkString ZkMovableObject_getVisualDestroyed(ZkMovableObject const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->visual_destroyed.c_str(); } void ZkMovableObject_setVisualDestroyed(ZkMovableObject* slf, ZkString visualDestroyed) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->visual_destroyed = visualDestroyed; } ZkString ZkMovableObject_getOwner(ZkMovableObject const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->owner.c_str(); } void ZkMovableObject_setOwner(ZkMovableObject* slf, ZkString owner) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->owner = owner; } ZkString ZkMovableObject_getOwnerGuild(ZkMovableObject const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->owner_guild.c_str(); } void ZkMovableObject_setOwnerGuild(ZkMovableObject* slf, ZkString ownerGuild) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->owner_guild = ownerGuild; } ZkBool ZkMovableObject_getDestroyed(ZkMovableObject const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->destroyed; } void ZkMovableObject_setDestroyed(ZkMovableObject* slf, ZkBool destroyed) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->destroyed = destroyed; } @@ -123,61 +145,73 @@ ZKC_VOB_PATH_LOADER(ZkInteractiveObject) ZKC_DELETER(ZkInteractiveObject) int32_t ZkInteractiveObject_getState(ZkInteractiveObject const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->state; } void ZkInteractiveObject_setState(ZkInteractiveObject* slf, int32_t state) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->state = state; } ZkString ZkInteractiveObject_getTarget(ZkInteractiveObject const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->target.c_str(); } void ZkInteractiveObject_setTarget(ZkInteractiveObject* slf, ZkString target) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->target = target; } ZkString ZkInteractiveObject_getItem(ZkInteractiveObject const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->item.c_str(); } void ZkInteractiveObject_setItem(ZkInteractiveObject* slf, ZkString item) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->item = item; } ZkString ZkInteractiveObject_getConditionFunction(ZkInteractiveObject const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->condition_function.c_str(); } void ZkInteractiveObject_setConditionFunction(ZkInteractiveObject* slf, ZkString conditionFunction) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->condition_function = conditionFunction; } ZkString ZkInteractiveObject_getOnStateChangeFunction(ZkInteractiveObject const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->on_state_change_function.c_str(); } void ZkInteractiveObject_setOnStateChangeFunction(ZkInteractiveObject* slf, ZkString onStateChangeFunction) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->on_state_change_function = onStateChangeFunction; } ZkBool ZkInteractiveObject_getRewind(ZkInteractiveObject const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->rewind; } void ZkInteractiveObject_setRewind(ZkInteractiveObject* slf, ZkBool rewind) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->rewind = rewind; } @@ -187,21 +221,25 @@ ZKC_VOB_PATH_LOADER(ZkFire) ZKC_DELETER(ZkFire) ZkString ZkFire_getSlot(ZkFire const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->slot.c_str(); } void ZkFire_setSlot(ZkFire* slf, ZkString slot) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->slot = slot; } ZkString ZkFire_getVobTree(ZkFire const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->vob_tree.c_str(); } void ZkFire_setVobTree(ZkFire* slf, ZkString vobTree) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->vob_tree = vobTree; } @@ -211,41 +249,49 @@ ZKC_VOB_PATH_LOADER(ZkContainer) ZKC_DELETER(ZkContainer) ZkBool ZkContainer_getIsLocked(ZkContainer const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->locked; } void ZkContainer_setIsLocked(ZkContainer* slf, ZkBool isLocked) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->locked = isLocked; } ZkString ZkContainer_getKey(ZkContainer const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->key.c_str(); } void ZkContainer_setKey(ZkContainer* slf, ZkString key) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->key = key; } ZkString ZkContainer_getPickString(ZkContainer const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->pick_string.c_str(); } void ZkContainer_setPickString(ZkContainer* slf, ZkString pickString) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->pick_string = pickString; } ZkString ZkContainer_getContents(ZkContainer const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->contents.c_str(); } void ZkContainer_setContents(ZkContainer* slf, ZkString contents) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->contents = contents; } @@ -255,31 +301,37 @@ ZKC_VOB_PATH_LOADER(ZkDoor) ZKC_DELETER(ZkDoor) ZkBool ZkDoor_getIsLocked(ZkDoor const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->locked; } void ZkDoor_setIsLocked(ZkDoor* slf, ZkBool isLocked) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->locked = isLocked; } ZkString ZkDoor_getKey(ZkDoor const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->key.c_str(); } void ZkDoor_setKey(ZkDoor* slf, ZkString key) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->key = key; } ZkString ZkDoor_getPickString(ZkDoor const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->pick_string.c_str(); } void ZkDoor_setPickString(ZkDoor* slf, ZkString pickString) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->pick_string = pickString; } diff --git a/src/vobs/Sound.cc b/src/vobs/Sound.cc index 222841f..3699940 100644 --- a/src/vobs/Sound.cc +++ b/src/vobs/Sound.cc @@ -9,111 +9,133 @@ ZKC_VOB_PATH_LOADER(ZkSound); ZKC_DELETER(ZkSound); float ZkSound_getVolume(ZkSound const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->volume; } void ZkSound_setVolume(ZkSound* slf, float volume) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->volume = volume; } ZkSoundMode ZkSound_getMode(ZkSound const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return static_cast(slf->mode); } void ZkSound_setMode(ZkSound* slf, ZkSoundMode mode) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->mode = static_cast(mode); } float ZkSound_getRandomDelay(ZkSound const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->random_delay; } void ZkSound_setRandomDelay(ZkSound* slf, float randomDelay) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->random_delay = randomDelay; } float ZkSound_getRandomDelayVar(ZkSound const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->random_delay_var; } void ZkSound_setRandomDelayVar(ZkSound* slf, float randomDelayVar) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->random_delay_var = randomDelayVar; } ZkBool ZkSound_getInitiallyPlaying(ZkSound const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->initially_playing; } void ZkSound_setInitiallyPlaying(ZkSound* slf, ZkBool initiallyPlaying) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->initially_playing = initiallyPlaying; } ZkBool ZkSound_getAmbient3d(ZkSound const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->ambient3d; } void ZkSound_setAmbient3d(ZkSound* slf, ZkBool ambient3d) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->ambient3d = ambient3d; } ZkBool ZkSound_getObstruction(ZkSound const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->obstruction; } void ZkSound_setObstruction(ZkSound* slf, ZkBool obstruction) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->obstruction = obstruction; } float ZkSound_getConeAngle(ZkSound const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->cone_angle; } void ZkSound_setConeAngle(ZkSound* slf, float coneAngle) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->cone_angle = coneAngle; } ZkSoundTriggerVolumeType ZkSound_getVolumeType(ZkSound const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return static_cast(slf->volume_type); } void ZkSound_setVolumeType(ZkSound* slf, ZkSoundTriggerVolumeType volumeType) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->volume_type = static_cast(volumeType); } float ZkSound_getRadius(ZkSound const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->radius; } void ZkSound_setRadius(ZkSound* slf, float radius) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->radius = radius; } ZkString ZkSound_getSoundName(ZkSound const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->sound_name.c_str(); } void ZkSound_setSoundName(ZkSound* slf, ZkString soundName) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->sound_name = soundName; } @@ -123,31 +145,37 @@ ZKC_VOB_PATH_LOADER(ZkSoundDaytime); ZKC_DELETER(ZkSoundDaytime); float ZkSoundDaytime_getStartTime(ZkSoundDaytime const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->start_time; } void ZkSoundDaytime_setStartTime(ZkSoundDaytime* slf, float startTime) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->start_time = startTime; } float ZkSoundDaytime_getEndTime(ZkSoundDaytime const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->end_time; } void ZkSoundDaytime_setEndTime(ZkSoundDaytime* slf, float endTime) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->end_time = endTime; } ZkString ZkSoundDaytime_getSoundNameDaytime(ZkSoundDaytime const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->sound_name2.c_str(); } void ZkSoundDaytime_setSoundNameDaytime(ZkSoundDaytime* slf, ZkString soundNameDaytime) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->sound_name2 = soundNameDaytime; } diff --git a/src/vobs/Trigger.cc b/src/vobs/Trigger.cc index 2bee2b9..5f29f01 100644 --- a/src/vobs/Trigger.cc +++ b/src/vobs/Trigger.cc @@ -9,51 +9,61 @@ ZKC_VOB_PATH_LOADER(ZkTrigger) ZKC_DELETER(ZkTrigger) ZkString ZkTrigger_getTarget(ZkTrigger const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->target.c_str(); } void ZkTrigger_setTarget(ZkTrigger* slf, ZkString target) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->target = target; } uint8_t ZkTrigger_getFlags(ZkTrigger const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->flags; } void ZkTrigger_setFlags(ZkTrigger* slf, uint8_t flags) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->flags = flags; } uint8_t ZkTrigger_getFilterFlags(ZkTrigger const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->filter_flags; } void ZkTrigger_setFilterFlags(ZkTrigger* slf, uint8_t filterFlags) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->filter_flags = filterFlags; } ZkString ZkTrigger_getVobTarget(ZkTrigger const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->vob_target.c_str(); } void ZkTrigger_setVobTarget(ZkTrigger* slf, ZkString vobTarget) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->vob_target = vobTarget; } int32_t ZkTrigger_getMaxActivationCount(ZkTrigger const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->max_activation_count; } void ZkTrigger_setMaxActivationCount(ZkTrigger* slf, int32_t maxActivationCount) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->max_activation_count = maxActivationCount; } @@ -64,26 +74,31 @@ float ZkTrigger_getRetriggerDelaySeconds(ZkTrigger const* slf) { } void ZkTrigger_setRetriggerDelaySeconds(ZkTrigger* slf, float retriggerDelaySeconds) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->retrigger_delay_sec = retriggerDelaySeconds; } float ZkTrigger_getDamageThreshold(ZkTrigger const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->damage_threshold; } void ZkTrigger_setDamageThreshold(ZkTrigger* slf, float damageThreshold) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->damage_threshold = damageThreshold; } float ZkTrigger_getFireDelaySeconds(ZkTrigger const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->fire_delay_sec; } void ZkTrigger_setFireDelaySeconds(ZkTrigger* slf, float fireDelaySeconds) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->fire_delay_sec = fireDelaySeconds; } @@ -93,96 +108,115 @@ ZKC_VOB_PATH_LOADER(ZkMover) ZKC_DELETER(ZkMover) ZkMoverBehavior ZkMover_getBehavior(ZkMover const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return static_cast(slf->behavior); } void ZkMover_setBehavior(ZkMover* slf, ZkMoverBehavior behavior) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->behavior = static_cast(behavior); } float ZkMover_getTouchBlockerDamage(ZkMover const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->touch_blocker_damage; } void ZkMover_setTouchBlockerDamage(ZkMover* slf, float touchBlockerDamage) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->touch_blocker_damage = touchBlockerDamage; } float ZkMover_getStayOpenTimeSeconds(ZkMover const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->stay_open_time_sec; } void ZkMover_setStayOpenTimeSeconds(ZkMover* slf, float stayOpenTimeSeconds) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->stay_open_time_sec = stayOpenTimeSeconds; } ZkBool ZkMover_getIsLocked(ZkMover const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->locked; } void ZkMover_setIsLocked(ZkMover* slf, ZkBool isLocked) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->locked = isLocked; } ZkBool ZkMover_getAutoLink(ZkMover const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->auto_link; } void ZkMover_setAutoLink(ZkMover* slf, ZkBool autoLink) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->auto_link = autoLink; } ZkBool ZkMover_getAutoRotate(ZkMover const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->auto_rotate; } void ZkMover_setAutoRotate(ZkMover* slf, ZkBool autoRotate) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->auto_rotate = autoRotate; } float ZkMover_getSpeed(ZkMover const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->speed; } void ZkMover_setSpeed(ZkMover* slf, float speed) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->speed = speed; } ZkMoverLerpType ZkMover_getLerpType(ZkMover const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return static_cast(slf->lerp_mode); } void ZkMover_setLerpType(ZkMover* slf, ZkMoverLerpType lerpType) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->lerp_mode = static_cast(lerpType); } ZkMoverSpeedType ZkMover_getSpeedType(ZkMover const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return static_cast(slf->speed_mode); } void ZkMover_setSpeedType(ZkMover* slf, ZkMoverSpeedType speedType) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->speed_mode = static_cast(speedType); } ZkAnimationSample const* ZkMover_getKeyframes(ZkMover const* slf, ZkSize* count) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf, count); *count = slf->keyframes.size(); @@ -190,81 +224,97 @@ ZkAnimationSample const* ZkMover_getKeyframes(ZkMover const* slf, ZkSize* count) } ZkString ZkMover_getSfxOpenStart(ZkMover const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->sfx_open_start.c_str(); } void ZkMover_setSfxOpenStart(ZkMover* slf, ZkString sfxOpenStart) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->sfx_open_start = sfxOpenStart; } ZkString ZkMover_getSfxOpenEnd(ZkMover const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->sfx_open_end.c_str(); } void ZkMover_setSfxOpenEnd(ZkMover* slf, ZkString sfxOpenEnd) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->sfx_open_end = sfxOpenEnd; } ZkString ZkMover_getSfxTransitioning(ZkMover const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->sfx_transitioning.c_str(); } void ZkMover_setSfxTransitioning(ZkMover* slf, ZkString sfxTransitioning) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->sfx_transitioning = sfxTransitioning; } ZkString ZkMover_getSfxCloseStart(ZkMover const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->sfx_close_start.c_str(); } void ZkMover_setSfxCloseStart(ZkMover* slf, ZkString sfxCloseStart) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->sfx_close_start = sfxCloseStart; } ZkString ZkMover_getSfxCloseEnd(ZkMover const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->sfx_close_end.c_str(); } void ZkMover_setSfxCloseEnd(ZkMover* slf, ZkString sfxCloseEnd) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->sfx_close_end = sfxCloseEnd; } ZkString ZkMover_getSfxLock(ZkMover const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->sfx_lock.c_str(); } void ZkMover_setSfxLock(ZkMover* slf, ZkString sfxLock) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->sfx_lock = sfxLock; } ZkString ZkMover_getSfxUnlock(ZkMover const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->sfx_unlock.c_str(); } void ZkMover_setSfxUnlock(ZkMover* slf, ZkString sfxUnlock) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->sfx_unlock = sfxUnlock; } ZkString ZkMover_getSfxUseLocked(ZkMover const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->sfx_use_locked.c_str(); } void ZkMover_setSfxUseLocked(ZkMover* slf, ZkString sfxUseLocked) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->sfx_use_locked = sfxUseLocked; } @@ -274,27 +324,32 @@ ZKC_VOB_PATH_LOADER(ZkTriggerList) ZKC_DELETER(ZkTriggerList) ZkTriggerBatchMode ZkTriggerList_getMode(ZkTriggerList const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return static_cast(slf->mode); } void ZkTriggerList_setMode(ZkTriggerList* slf, ZkTriggerBatchMode mode) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->mode = static_cast(mode); } ZkSize ZkTriggerList_getTargetCount(ZkTriggerList const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->targets.size(); } ZkTriggerListTarget* ZkTriggerList_getTarget(ZkTriggerList* slf, ZkSize i) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); ZKC_CHECK_LEN(slf->targets, i); return &slf->targets[i]; } void ZkTriggerList_enumerateTargets(ZkTriggerList const* slf, ZkTriggerListTargetEnumerator cb, void* ctx) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf, cb); for (auto& target : slf->targets) { @@ -303,17 +358,20 @@ void ZkTriggerList_enumerateTargets(ZkTriggerList const* slf, ZkTriggerListTarge } ZkTriggerListTarget* ZkTriggerList_addTarget(ZkTriggerList* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return &slf->targets.emplace_back(); } void ZkTriggerList_removeTarget(ZkTriggerList* slf, ZkSize i) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); ZKC_CHECK_LENV(slf->targets, i); slf->targets.erase(slf->targets.begin() + static_cast(i)); } void ZkTriggerList_removeTargets(ZkTriggerList* slf, ZkTriggerListTargetEnumerator pred, void* ctx) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf, pred); for (auto it = slf->targets.begin(); it != slf->targets.end();) { if (pred(ctx, &*it)) { @@ -325,21 +383,25 @@ void ZkTriggerList_removeTargets(ZkTriggerList* slf, ZkTriggerListTargetEnumerat } ZkString ZkTriggerListTarget_getName(ZkTriggerListTarget const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->name.c_str(); } void ZkTriggerListTarget_setName(ZkTriggerListTarget* slf, ZkString name) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->name = name; } float ZkTriggerListTarget_getDelaySeconds(ZkTriggerListTarget const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->delay; } void ZkTriggerListTarget_setDelaySeconds(ZkTriggerListTarget* slf, float delaySeconds) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->delay = delaySeconds; } @@ -349,11 +411,13 @@ ZKC_VOB_PATH_LOADER(ZkTriggerScript) ZKC_DELETER(ZkTriggerScript) ZkString ZkTriggerScript_getFunction(ZkTriggerScript const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->function.c_str(); } void ZkTriggerScript_setFunction(ZkTriggerScript* slf, ZkString function) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->function = function; } @@ -363,21 +427,25 @@ ZKC_VOB_PATH_LOADER(ZkTriggerChangeLevel) ZKC_DELETER(ZkTriggerChangeLevel) ZkString ZkTriggerChangeLevel_getLevelName(ZkTriggerChangeLevel const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->level_name.c_str(); } void ZkTriggerChangeLevel_setLevelName(ZkTriggerChangeLevel* slf, ZkString levelName) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->level_name = levelName; } ZkString ZkTriggerChangeLevel_getStartVob(ZkTriggerChangeLevel const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->start_vob.c_str(); } void ZkTriggerChangeLevel_setStartVob(ZkTriggerChangeLevel* slf, ZkString startVob) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->start_vob = startVob; } @@ -387,21 +455,25 @@ ZKC_VOB_PATH_LOADER(ZkTriggerWorldStart) ZKC_DELETER(ZkTriggerWorldStart) ZkString ZkTriggerWorldStart_getTarget(ZkTriggerWorldStart const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->target.c_str(); } void ZkTriggerWorldStart_setTarget(ZkTriggerWorldStart* slf, ZkString target) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->target = target; } ZkBool ZkTriggerWorldStart_getFireOnce(ZkTriggerWorldStart const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->fire_once; } void ZkTriggerWorldStart_setFireOnce(ZkTriggerWorldStart* slf, ZkBool fireOnce) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->fire_once = fireOnce; } @@ -411,11 +483,13 @@ ZKC_VOB_PATH_LOADER(ZkTriggerUntouch) ZKC_DELETER(ZkTriggerUntouch) ZkString ZkTriggerUntouch_getTarget(ZkTriggerUntouch const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->target.c_str(); } void ZkTriggerUntouch_setTarget(ZkTriggerUntouch* slf, ZkString target) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->target = target; } diff --git a/src/vobs/VirtualObject.cc b/src/vobs/VirtualObject.cc index d5242ea..bb2d391 100644 --- a/src/vobs/VirtualObject.cc +++ b/src/vobs/VirtualObject.cc @@ -18,191 +18,229 @@ ZKC_VOB_PATH_LOADER(ZkVirtualObject); ZKC_DELETER(ZkVirtualObject); ZkVobType ZkVirtualObject_getType(ZkVirtualObject const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return static_cast(slf->type); } uint32_t ZkVirtualObject_getId(ZkVirtualObject const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->id; } ZkAxisAlignedBoundingBox ZkVirtualObject_getBbox(ZkVirtualObject const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->bbox; } void ZkVirtualObject_setBbox(ZkVirtualObject* slf, ZkAxisAlignedBoundingBox bbox) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->bbox = bbox; } ZkVec3f ZkVirtualObject_getPosition(ZkVirtualObject const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->position; } void ZkVirtualObject_setPosition(ZkVirtualObject* slf, ZkVec3f position) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->position = position; } ZkMat3x3 ZkVirtualObject_getRotation(ZkVirtualObject const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->rotation; } void ZkVirtualObject_setRotation(ZkVirtualObject* slf, ZkMat3x3 rotation) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->rotation = rotation; } ZkBool ZkVirtualObject_getShowVisual(ZkVirtualObject const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->show_visual; } void ZkVirtualObject_setShowVisual(ZkVirtualObject* slf, ZkBool showVisual) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->show_visual = showVisual; } ZkSpriteAlignment ZkVirtualObject_getSpriteCameraFacingMode(ZkVirtualObject const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return static_cast(slf->sprite_camera_facing_mode); } void ZkVirtualObject_setSpriteCameraFacingMode(ZkVirtualObject* slf, ZkSpriteAlignment spriteCameraFacingMode) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->sprite_camera_facing_mode = static_cast(spriteCameraFacingMode); } ZkBool ZkVirtualObject_getCdStatic(ZkVirtualObject const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->cd_static; } void ZkVirtualObject_setCdStatic(ZkVirtualObject* slf, ZkBool cdStatic) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->cd_static = cdStatic; } ZkBool ZkVirtualObject_getCdDynamic(ZkVirtualObject const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->cd_dynamic; } void ZkVirtualObject_setCdDynamic(ZkVirtualObject* slf, ZkBool cdDynamic) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->cd_dynamic = cdDynamic; } ZkBool ZkVirtualObject_getVobStatic(ZkVirtualObject const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->vob_static; } void ZkVirtualObject_setVobStatic(ZkVirtualObject* slf, ZkBool vobStatic) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->vob_static = vobStatic; } ZkShadowType ZkVirtualObject_getDynamicShadows(ZkVirtualObject const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return static_cast(slf->dynamic_shadows); } void ZkVirtualObject_setDynamicShadows(ZkVirtualObject* slf, ZkShadowType dynamicShadows) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->dynamic_shadows = static_cast(dynamicShadows); } ZkBool ZkVirtualObject_getPhysicsEnabled(ZkVirtualObject const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->physics_enabled; } void ZkVirtualObject_setPhysicsEnabled(ZkVirtualObject* slf, ZkBool physicsEnabled) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->physics_enabled = physicsEnabled; } ZkAnimationType ZkVirtualObject_getAnimMode(ZkVirtualObject const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return static_cast(slf->anim_mode); } void ZkVirtualObject_setAnimMode(ZkVirtualObject* slf, ZkAnimationType animMode) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->anim_mode = static_cast(animMode); } int32_t ZkVirtualObject_getBias(ZkVirtualObject const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->bias; } void ZkVirtualObject_setBias(ZkVirtualObject* slf, int32_t bias) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->bias = bias; } ZkBool ZkVirtualObject_getAmbient(ZkVirtualObject const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->ambient; } void ZkVirtualObject_setAmbient(ZkVirtualObject* slf, ZkBool ambient) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->ambient = ambient; } float ZkVirtualObject_getAnimStrength(ZkVirtualObject const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->anim_strength; } void ZkVirtualObject_setAnimStrength(ZkVirtualObject* slf, float animStrength) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->anim_strength = animStrength; } float ZkVirtualObject_getFarClipScale(ZkVirtualObject const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->far_clip_scale; } void ZkVirtualObject_setFarClipScale(ZkVirtualObject* slf, float farClipScale) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->far_clip_scale = farClipScale; } ZkString ZkVirtualObject_getPresetName(ZkVirtualObject const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->preset_name.c_str(); } void ZkVirtualObject_setPresetName(ZkVirtualObject* slf, ZkString presetName) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->preset_name = presetName; } ZkString ZkVirtualObject_getName(ZkVirtualObject const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->vob_name.c_str(); } void ZkVirtualObject_setName(ZkVirtualObject* slf, ZkString name) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->vob_name = name; } ZkVisual* ZkVirtualObject_getVisual(ZkVirtualObject const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->visual ? slf->visual.get() : nullptr; } ZkVisual* ZkVirtualObject_setVisual(ZkVirtualObject* slf, ZkVisualType visual) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); std::shared_ptr obj; @@ -240,17 +278,20 @@ ZkVisual* ZkVirtualObject_setVisual(ZkVirtualObject* slf, ZkVisualType visual) { } ZkSize ZkVirtualObject_getChildCount(ZkVirtualObject const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->children.size(); } ZkVirtualObject* ZkVirtualObject_getChild(ZkVirtualObject const* slf, ZkSize i) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); ZKC_CHECK_LEN(slf->children, i); return slf->children[i].get(); } void ZkVirtualObject_enumerateChildren(ZkVirtualObject const* slf, ZkVirtualObjectEnumerator cb, void* ctx) { + ZKC_TRACE_FN(); if (slf == nullptr || cb == nullptr) { ZKC_LOG_WARN_NULL("ZkVirtualObject_enumerateChildren"); return; @@ -262,6 +303,7 @@ void ZkVirtualObject_enumerateChildren(ZkVirtualObject const* slf, ZkVirtualObje } ZkVirtualObject* ZkVirtualObject_addChild(ZkVirtualObject* slf, ZkVobType type) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); std::shared_ptr obj; @@ -412,12 +454,14 @@ ZkVirtualObject* ZkVirtualObject_addChild(ZkVirtualObject* slf, ZkVobType type) } void ZkVirtualObject_removeChild(ZkVirtualObject* slf, ZkSize i) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); ZKC_CHECK_LENV(slf->children, i); slf->children.erase(slf->children.begin() + static_cast(i)); } void ZkVirtualObject_removeChildren(ZkVirtualObject* slf, ZkVirtualObjectEnumerator pred, void* ctx) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf, pred); for (auto it = slf->children.begin(); it != slf->children.end();) { @@ -430,96 +474,115 @@ void ZkVirtualObject_removeChildren(ZkVirtualObject* slf, ZkVirtualObjectEnumera } ZkString ZkVisual_getName(ZkVisual const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->name.c_str(); } void ZkVisual_setName(ZkVisual* slf, ZkString name) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->name = name; } ZkVisualType ZkVisual_getType(ZkVisual const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return static_cast(slf->type); } ZkString ZkVisualDecal_getName(ZkVisualDecal const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->name.c_str(); } void ZkVisualDecal_setName(ZkVisualDecal* slf, ZkString name) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->name = name; } ZkVec2f ZkVisualDecal_getDimension(ZkVisualDecal const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->dimension; } void ZkVisualDecal_setDimension(ZkVisualDecal* slf, ZkVec2f dimension) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->dimension = dimension; } ZkVec2f ZkVisualDecal_getOffset(ZkVisualDecal const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->offset; } void ZkVisualDecal_setOffset(ZkVisualDecal* slf, ZkVec2f offset) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->offset = offset; } ZkBool ZkVisualDecal_getTwoSided(ZkVisualDecal const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->two_sided; } void ZkVisualDecal_setTwoSided(ZkVisualDecal* slf, ZkBool twoSided) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->two_sided = twoSided; } ZkAlphaFunction ZkVisualDecal_getAlphaFunc(ZkVisualDecal const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return static_cast(slf->alpha_func); } void ZkVisualDecal_setAlphaFunc(ZkVisualDecal* slf, ZkAlphaFunction alphaFunc) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->alpha_func = static_cast(alphaFunc); } float ZkVisualDecal_getTextureAnimFps(ZkVisualDecal const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->texture_anim_fps; } void ZkVisualDecal_setTextureAnimFps(ZkVisualDecal* slf, float textureAnimFps) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->texture_anim_fps = textureAnimFps; } uint8_t ZkVisualDecal_getAlphaWeight(ZkVisualDecal const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->alpha_weight; } void ZkVisualDecal_setAlphaWeight(ZkVisualDecal* slf, uint8_t alphaWeight) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->alpha_weight = alphaWeight; } ZkBool ZkVisualDecal_getIgnoreDaylight(ZkVisualDecal const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->ignore_daylight; } void ZkVisualDecal_setIgnoreDaylight(ZkVisualDecal* slf, ZkBool ignoreDaylight) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->ignore_daylight = ignoreDaylight; } diff --git a/src/vobs/Zone.cc b/src/vobs/Zone.cc index 6ae3740..3ca01b7 100644 --- a/src/vobs/Zone.cc +++ b/src/vobs/Zone.cc @@ -9,61 +9,73 @@ ZKC_VOB_PATH_LOADER(ZkZoneMusic) ZKC_DELETER(ZkZoneMusic) ZkBool ZkZoneMusic_getIsEnabled(ZkZoneMusic const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->enabled; } void ZkZoneMusic_setIsEnabled(ZkZoneMusic* slf, ZkBool isEnabled) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->enabled = isEnabled; } int32_t ZkZoneMusic_getPriority(ZkZoneMusic const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->priority; } void ZkZoneMusic_setPriority(ZkZoneMusic* slf, int32_t priority) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->priority = priority; } ZkBool ZkZoneMusic_getIsEllipsoid(ZkZoneMusic const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->ellipsoid; } void ZkZoneMusic_setIsEllipsoid(ZkZoneMusic* slf, ZkBool isEllipsoid) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->ellipsoid = isEllipsoid; } float ZkZoneMusic_getReverb(ZkZoneMusic const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->reverb; } void ZkZoneMusic_setReverb(ZkZoneMusic* slf, float reverb) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->reverb = reverb; } float ZkZoneMusic_getVolume(ZkZoneMusic const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->volume; } void ZkZoneMusic_setVolume(ZkZoneMusic* slf, float volume) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->volume = volume; } ZkBool ZkZoneMusic_getIsLoop(ZkZoneMusic const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->loop; } void ZkZoneMusic_setIsLoop(ZkZoneMusic* slf, ZkBool isLoop) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->loop = isLoop; } @@ -73,21 +85,25 @@ ZKC_VOB_PATH_LOADER(ZkZoneFarPlane) ZKC_DELETER(ZkZoneFarPlane) float ZkZoneFarPlane_getVobFarPlaneZ(ZkZoneFarPlane const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->vob_far_plane_z; } void ZkZoneFarPlane_setVobFarPlaneZ(ZkZoneFarPlane* slf, float vobFarPlaneZ) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->vob_far_plane_z = vobFarPlaneZ; } float ZkZoneFarPlane_getInnerRangePercentage(ZkZoneFarPlane const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->inner_range_percentage; } void ZkZoneFarPlane_setInnerRangePercentage(ZkZoneFarPlane* slf, float innerRangePercentage) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->inner_range_percentage = innerRangePercentage; } @@ -97,51 +113,61 @@ ZKC_VOB_PATH_LOADER(ZkZoneFog) ZKC_DELETER(ZkZoneFog) float ZkZoneFog_getRangeCenter(ZkZoneFog const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->range_center; } void ZkZoneFog_setRangeCenter(ZkZoneFog* slf, float rangeCenter) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->range_center = rangeCenter; } float ZkZoneFog_getInnerRangePercentage(ZkZoneFog const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->inner_range_percentage; } void ZkZoneFog_setInnerRangePercentage(ZkZoneFog* slf, float innerRangePercentage) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->inner_range_percentage = innerRangePercentage; } ZkColor ZkZoneFog_getColor(ZkZoneFog const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->color; } void ZkZoneFog_setColor(ZkZoneFog* slf, ZkColor color) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->color = color; } ZkBool ZkZoneFog_getFadeOutSky(ZkZoneFog const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->fade_out_sky; } void ZkZoneFog_setFadeOutSky(ZkZoneFog* slf, ZkBool fadeOutSky) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->fade_out_sky = fadeOutSky; } ZkBool ZkZoneFog_getOverrideColor(ZkZoneFog const* slf) { + ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return slf->override_color; } void ZkZoneFog_setOverrideColor(ZkZoneFog* slf, ZkBool overrideColor) { + ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); slf->override_color = overrideColor; } diff --git a/src/world/BspTree.cc b/src/world/BspTree.cc index 52ce7c3..9033c65 100644 --- a/src/world/BspTree.cc +++ b/src/world/BspTree.cc @@ -2,7 +2,10 @@ // SPDX-License-Identifier: MIT #include "zenkit-capi/world/BspTree.h" +#include "../Internal.hh" + ZkBspTreeType ZkBspTree_getType(ZkBspTree const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkBspTree_getMode"); return ZkBspTreeType_INDOOR; @@ -12,6 +15,7 @@ ZkBspTreeType ZkBspTree_getType(ZkBspTree const* slf) { } uint32_t const* ZkBspTree_getPolygonIndices(ZkBspTree const* slf, ZkSize* count) { + ZKC_TRACE_FN(); if (slf == nullptr || count == nullptr) { ZKC_LOG_WARN_NULL("ZkBspTree_getPolygonIndices"); return nullptr; @@ -22,6 +26,7 @@ uint32_t const* ZkBspTree_getPolygonIndices(ZkBspTree const* slf, ZkSize* count) } uint32_t const* ZkBspTree_getLeafPolygonIndices(ZkBspTree const* slf, ZkSize* count) { + ZKC_TRACE_FN(); if (slf == nullptr || count == nullptr) { ZKC_LOG_WARN_NULL("ZkBspTree_getLeafPolygonIndices"); return nullptr; @@ -32,6 +37,7 @@ uint32_t const* ZkBspTree_getLeafPolygonIndices(ZkBspTree const* slf, ZkSize* co } uint32_t const* ZkBspTree_getPortalPolygonIndices(ZkBspTree const* slf, ZkSize* count) { + ZKC_TRACE_FN(); if (slf == nullptr || count == nullptr) { ZKC_LOG_WARN_NULL("ZkBspTree_getPortalPolygonIndices"); return nullptr; @@ -42,6 +48,7 @@ uint32_t const* ZkBspTree_getPortalPolygonIndices(ZkBspTree const* slf, ZkSize* } ZkVec3f const* ZkBspTree_getLightPoints(ZkBspTree const* slf, ZkSize* count) { + ZKC_TRACE_FN(); if (slf == nullptr || count == nullptr) { ZKC_LOG_WARN_NULL("ZkBspTree_getLightPoints"); return nullptr; @@ -52,6 +59,7 @@ ZkVec3f const* ZkBspTree_getLightPoints(ZkBspTree const* slf, ZkSize* count) { } uint64_t const* ZkBspTree_getLeafNodeIndices(ZkBspTree const* slf, ZkSize* count) { + ZKC_TRACE_FN(); if (slf == nullptr || count == nullptr) { ZKC_LOG_WARN_NULL("ZkBspTree_getLeafNodeIndices"); return nullptr; @@ -62,6 +70,7 @@ uint64_t const* ZkBspTree_getLeafNodeIndices(ZkBspTree const* slf, ZkSize* count } ZkBspNode const* ZkBspTree_getNodes(ZkBspTree const* slf, ZkSize* count) { + ZKC_TRACE_FN(); if (slf == nullptr || count == nullptr) { ZKC_LOG_WARN_NULL("ZkBspTree_getNodes"); return nullptr; @@ -72,6 +81,7 @@ ZkBspNode const* ZkBspTree_getNodes(ZkBspTree const* slf, ZkSize* count) { } ZkSize ZkBspTree_getSectorCount(ZkBspTree const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkBspTree_getSectorCount"); return 0; @@ -81,6 +91,7 @@ ZkSize ZkBspTree_getSectorCount(ZkBspTree const* slf) { } ZkBspSector const* ZkBspTree_getSector(ZkBspTree const* slf, ZkSize i) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkBspTree_getSector"); return nullptr; @@ -95,6 +106,7 @@ ZkBspSector const* ZkBspTree_getSector(ZkBspTree const* slf, ZkSize i) { } void ZkBspTree_enumerateSectors(ZkBspTree const* slf, ZkBspSectorEnumerator cb, void* ctx) { + ZKC_TRACE_FN(); if (slf == nullptr || cb == nullptr) { ZKC_LOG_WARN_NULL("ZkBspTree_enumerateSectors"); return; @@ -106,6 +118,7 @@ void ZkBspTree_enumerateSectors(ZkBspTree const* slf, ZkBspSectorEnumerator cb, } ZkString ZkBspSector_getName(ZkBspSector const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkBspSector_getName"); return nullptr; @@ -115,6 +128,7 @@ ZkString ZkBspSector_getName(ZkBspSector const* slf) { } uint32_t const* ZkBspSector_getNodeIndices(ZkBspSector const* slf, ZkSize* count) { + ZKC_TRACE_FN(); if (slf == nullptr || count == nullptr) { ZKC_LOG_WARN_NULL("ZkBspSector_getNodeIndices"); return nullptr; @@ -125,6 +139,7 @@ uint32_t const* ZkBspSector_getNodeIndices(ZkBspSector const* slf, ZkSize* count } uint32_t const* ZkBspSector_getPortalPolygonIndices(ZkBspSector const* slf, ZkSize* count) { + ZKC_TRACE_FN(); if (slf == nullptr || count == nullptr) { ZKC_LOG_WARN_NULL("ZkBspSector_getPortalPolygonIndices"); return nullptr; diff --git a/src/world/WayNet.cc b/src/world/WayNet.cc index 2e51c43..3e425ef 100644 --- a/src/world/WayNet.cc +++ b/src/world/WayNet.cc @@ -2,7 +2,10 @@ // SPDX-License-Identifier: MIT #include "zenkit-capi/world/WayNet.h" +#include "../Internal.hh" + ZkWayEdge const* ZkWayNet_getEdges(ZkWayNet const* slf, ZkSize* count) { + ZKC_TRACE_FN(); if (slf == nullptr || count == nullptr) { ZKC_LOG_WARN_NULL("ZkWayNet_getEdges"); return nullptr; @@ -13,6 +16,7 @@ ZkWayEdge const* ZkWayNet_getEdges(ZkWayNet const* slf, ZkSize* count) { } ZkSize ZkWayNet_getPointCount(ZkWayNet const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkWayNet_getPointCount"); return 0; @@ -22,6 +26,7 @@ ZkSize ZkWayNet_getPointCount(ZkWayNet const* slf) { } ZkWayPoint const* ZkWayNet_getPoint(ZkWayNet const* slf, ZkSize i) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkWayNet_getPoint"); return nullptr; @@ -36,6 +41,7 @@ ZkWayPoint const* ZkWayNet_getPoint(ZkWayNet const* slf, ZkSize i) { } void ZkWayNet_enumeratePoints(ZkWayNet const* slf, ZkWayPointEnumerator cb, void* ctx) { + ZKC_TRACE_FN(); if (slf == nullptr || cb == nullptr) { ZKC_LOG_WARN_NULL("ZkWayNet_enumeratePoints"); return; @@ -47,6 +53,7 @@ void ZkWayNet_enumeratePoints(ZkWayNet const* slf, ZkWayPointEnumerator cb, void } ZkString ZkWayPoint_getName(ZkWayPoint const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkWayPoint_getName"); return nullptr; @@ -56,6 +63,7 @@ ZkString ZkWayPoint_getName(ZkWayPoint const* slf) { } int32_t ZkWayPoint_getWaterDepth(ZkWayPoint const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkWayPoint_getWaterDepth"); return 0; @@ -65,6 +73,7 @@ int32_t ZkWayPoint_getWaterDepth(ZkWayPoint const* slf) { } ZkBool ZkWayPoint_getUnderWater(ZkWayPoint const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkWayPoint_getUnderWater"); return 0; @@ -74,6 +83,7 @@ ZkBool ZkWayPoint_getUnderWater(ZkWayPoint const* slf) { } ZkVec3f ZkWayPoint_getPosition(ZkWayPoint const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkWayPoint_getPosition"); return {}; @@ -83,6 +93,7 @@ ZkVec3f ZkWayPoint_getPosition(ZkWayPoint const* slf) { } ZkVec3f ZkWayPoint_getDirection(ZkWayPoint const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkWayPoint_getDirection"); return {}; @@ -92,6 +103,7 @@ ZkVec3f ZkWayPoint_getDirection(ZkWayPoint const* slf) { } ZkBool ZkWayPoint_getFreePoint(ZkWayPoint const* slf) { + ZKC_TRACE_FN(); if (slf == nullptr) { ZKC_LOG_WARN_NULL("ZkWayPoint_getFreePoint"); return {};