diff options
| author | Jonathan Bradley <jcb@pikum.xyz> | 2025-07-17 14:50:05 -0400 |
|---|---|---|
| committer | Jonathan Bradley <jcb@pikum.xyz> | 2025-07-17 14:50:05 -0400 |
| commit | 8fbeadda53243b701957a26dba1113d84ad5c7c4 (patch) | |
| tree | d37007379260bd8e6ec2a9c24ff269a8b5875dff /src/serialization-component.cpp | |
| parent | f50804900157af65da50166325163444a78aaaec (diff) | |
pke: handle pk.h breaking changes
Diffstat (limited to 'src/serialization-component.cpp')
| -rw-r--r-- | src/serialization-component.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/serialization-component.cpp b/src/serialization-component.cpp index df6d633..266eb2d 100644 --- a/src/serialization-component.cpp +++ b/src/serialization-component.cpp @@ -26,7 +26,7 @@ pk_handle pke_serialize_inst_pos(srlztn_serialize_helper *h, const glm::vec3 pos if (pos != glm::vec3(0)) { kve.key = SRLZTN_POSROT_POS; len = snprintf(NULL, 0, "%f%s%f%s%f", pos[0], SRLZTN_NUM_SEPARATOR, pos[1], SRLZTN_NUM_SEPARATOR, pos[2]); - s = pk_new<char>(len+1, h->bkt); + s = pk_new_arr<char>(len+1, h->bkt); sprintf(s, "%f%s%f%s%f", pos[0], SRLZTN_NUM_SEPARATOR, pos[1], SRLZTN_NUM_SEPARATOR, pos[2]); kve.val = s; kve.end = SRLZTN_KVE_END; @@ -35,7 +35,7 @@ pk_handle pke_serialize_inst_pos(srlztn_serialize_helper *h, const glm::vec3 pos if (quat_rot != glm::quat{}) { kve.key = SRLZTN_POSROT_ROT; len = snprintf(NULL, 0, "%f%s%f%s%f%s%f", quat_rot[0], SRLZTN_NUM_SEPARATOR, quat_rot[1], SRLZTN_NUM_SEPARATOR, quat_rot[2], SRLZTN_NUM_SEPARATOR, quat_rot[3]); - s = pk_new<char>(len+1, h->bkt); + s = pk_new_arr<char>(len+1, h->bkt); sprintf(s, "%f%s%f%s%f%s%f", quat_rot[0], SRLZTN_NUM_SEPARATOR, quat_rot[1], SRLZTN_NUM_SEPARATOR, quat_rot[2], SRLZTN_NUM_SEPARATOR, quat_rot[3]); kve.val = s; kve.end = SRLZTN_KVE_END; @@ -44,7 +44,7 @@ pk_handle pke_serialize_inst_pos(srlztn_serialize_helper *h, const glm::vec3 pos if (scale != glm::vec3(1)) { kve.key = SRLZTN_POSROT_SCALE; len = snprintf(NULL, 0, "%f%s%f%s%f", scale[0], SRLZTN_NUM_SEPARATOR, scale[1], SRLZTN_NUM_SEPARATOR, scale[2]); - s = pk_new<char>(len+1, h->bkt); + s = pk_new_arr<char>(len+1, h->bkt); sprintf(s, "%f%s%f%s%f", scale[0], SRLZTN_NUM_SEPARATOR, scale[1], SRLZTN_NUM_SEPARATOR, scale[2]); kve.val = s; kve.end = SRLZTN_KVE_END; @@ -173,7 +173,7 @@ pk_handle pke_serialize_instance(srlztn_serialize_helper *h, const CompInstance compt_a<128==sizeof(CompInstance)>(); if (comp->uuid != pk_uuid_zed && comp->uuid != pk_uuid_max) { kve.key = SRLZTN_INSTANCE_COMPONENT_UUID; - s = pk_new<char>(37, h->bkt); + s = pk_new_arr<char>(37, h->bkt); sprintf(s, pk_uuid_printf_format, pk_uuid_printf_var(comp->uuid)); kve.val = s; kve.end = SRLZTN_KVE_END; @@ -182,7 +182,7 @@ pk_handle pke_serialize_instance(srlztn_serialize_helper *h, const CompInstance if (et != nullptr) { kve.key = SRLZTN_INSTANCE_COMPONENT_ENTITY_TYPE_CODE; len = strlen(et->entityTypeCode.val); - s = pk_new<char>(len+1, h->bkt); + s = pk_new_arr<char>(len+1, h->bkt); sprintf(s, "%s", et->entityTypeCode.val); kve.val = s; kve.end = SRLZTN_KVE_END; @@ -191,7 +191,7 @@ pk_handle pke_serialize_instance(srlztn_serialize_helper *h, const CompInstance { kve.key = SRLZTN_INSTANCE_COMPONENT_MASS; len = snprintf(NULL, 0, "%f", mass); - s = pk_new<char>(len+1, h->bkt); + s = pk_new_arr<char>(len+1, h->bkt); sprintf(s, "%f", mass); kve.val = s; kve.end = SRLZTN_KVE_END; @@ -200,7 +200,7 @@ pk_handle pke_serialize_instance(srlztn_serialize_helper *h, const CompInstance { kve.key = SRLZTN_INSTANCE_COMPONENT_COLLISION_LAYER; len = snprintf(NULL, 0, "0x%.016lX", static_cast<PhysicsCollision_T>(collisionLayer)); - s = pk_new<char>(len+1, h->bkt); + s = pk_new_arr<char>(len+1, h->bkt); sprintf(s, "0x%.016lX", static_cast<PhysicsCollision_T>(collisionLayer)); kve.val = s; kve.end = SRLZTN_KVE_END; @@ -209,7 +209,7 @@ pk_handle pke_serialize_instance(srlztn_serialize_helper *h, const CompInstance { kve.key = SRLZTN_INSTANCE_COMPONENT_COLLISION_MASK; len = snprintf(NULL, 0, "0x%.016lX", static_cast<PhysicsCollision_T>(collisionMask)); - s = pk_new<char>(len+1, h->bkt); + s = pk_new_arr<char>(len+1, h->bkt); sprintf(s, "0x%.016lX", static_cast<PhysicsCollision_T>(collisionMask)); kve.val = s; kve.end = SRLZTN_KVE_END; @@ -217,7 +217,7 @@ pk_handle pke_serialize_instance(srlztn_serialize_helper *h, const CompInstance } if (comp->collisionCallback.name[0] != '\0') { kve.key = SRLZTN_INSTANCE_COMPONENT_COLLISION_CB_SIGNATURE; - s = pk_new<char>(CallbackSignatureLength + 1, h->bkt); + s = pk_new_arr<char>(CallbackSignatureLength + 1, h->bkt); sprintf(s, "%s", comp->collisionCallback.name); kve.val = s; kve.end = SRLZTN_KVE_END; |
