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-static-ui.cpp | |
| parent | f50804900157af65da50166325163444a78aaaec (diff) | |
pke: handle pk.h breaking changes
Diffstat (limited to 'src/serialization-static-ui.cpp')
| -rw-r--r-- | src/serialization-static-ui.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/serialization-static-ui.cpp b/src/serialization-static-ui.cpp index 49dceaa..1495c61 100644 --- a/src/serialization-static-ui.cpp +++ b/src/serialization-static-ui.cpp @@ -22,7 +22,7 @@ pk_handle pke_serialize_ui_box_internal(srlztn_serialize_helper *h, pke_ui_box_t compt_a<4==sizeof(pke_ui_box_type_data::pke_ui_box_type_data_text)>(); { kve.key = SRLZTN_UI_BOX_DATA_TEXT_FONT_RENDER_UUID; - s = pk_new<char>(37, h->bkt); + s = pk_new_arr<char>(37, h->bkt); FontRender *fr = FontType_GetFontRender(data->font_render_handle); sprintf(s, pk_uuid_printf_format, pk_uuid_printf_var(fr->uuid)); kve.val = s; @@ -78,7 +78,7 @@ pk_handle pke_serialize_ui_box(srlztn_serialize_helper *h, pke_ui_box *box) { compt_a<192==sizeof(pke_ui_box)>(); if (box->uuid != pk_uuid_zed && box->uuid != pk_uuid_max) { kve.key = SRLZTN_UI_BOX_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(box->uuid)); kve.val = s; kve.end = SRLZTN_KVE_END; @@ -87,7 +87,7 @@ pk_handle pke_serialize_ui_box(srlztn_serialize_helper *h, pke_ui_box *box) { if (box->parentHandle != EntityHandle_MAX) { Entity_Base *e = ECS_GetEntity(box->parentHandle); kve.key = SRLZTN_UI_BOX_PARENT_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(e->uuid)); kve.val = s; kve.end = SRLZTN_KVE_END; @@ -95,7 +95,7 @@ pk_handle pke_serialize_ui_box(srlztn_serialize_helper *h, pke_ui_box *box) { } if (box->flags != PKE_UI_BOX_FLAG_NONE) { kve.key = SRLZTN_UI_BOX_FLAGS; - s = pk_new<char>(19, h->bkt); + s = pk_new_arr<char>(19, h->bkt); sprintf(s, "0x%.2lX", static_cast<PKE_UI_BOX_FLAG_T>(box->flags)); kve.val = s; kve.end = SRLZTN_KVE_END; @@ -104,7 +104,7 @@ pk_handle pke_serialize_ui_box(srlztn_serialize_helper *h, pke_ui_box *box) { { kve.key = SRLZTN_UI_BOX_POS_TOP_LEFT; len = snprintf(NULL, 0, "%f;%f", box->pos_top_left.x, box->pos_top_left.y); - s = pk_new<char>(len+1, h->bkt); + s = pk_new_arr<char>(len+1, h->bkt); sprintf(s, "%f;%f", box->pos_top_left.x, box->pos_top_left.y); kve.val = s; kve.end = SRLZTN_KVE_END; @@ -113,7 +113,7 @@ pk_handle pke_serialize_ui_box(srlztn_serialize_helper *h, pke_ui_box *box) { if (box->min_size != glm::vec2(0,0)) { kve.key = SRLZTN_UI_BOX_MIN_SIZE; len = snprintf(NULL, 0, "%f;%f", box->min_size.x, box->min_size.y); - s = pk_new<char>(len+1, h->bkt); + s = pk_new_arr<char>(len+1, h->bkt); sprintf(s, "%f%f", box->min_size.x, box->min_size.y); kve.val = s; kve.end = SRLZTN_KVE_END; @@ -122,7 +122,7 @@ pk_handle pke_serialize_ui_box(srlztn_serialize_helper *h, pke_ui_box *box) { if (box->max_size != glm::vec2(0,0)) { kve.key = SRLZTN_UI_BOX_MAX_SIZE; len = snprintf(NULL, 0, "%f;%f", box->max_size[0], box->max_size[1]); - s = pk_new<char>(len+1, h->bkt); + s = pk_new_arr<char>(len+1, h->bkt); sprintf(s, "%f;%f", box->max_size[0], box->max_size[1]); kve.val = s; kve.end = SRLZTN_KVE_END; @@ -131,14 +131,14 @@ pk_handle pke_serialize_ui_box(srlztn_serialize_helper *h, pke_ui_box *box) { if (box->flex_weight != 0.f) { kve.key = SRLZTN_UI_BOX_FLEX_WEIGHT; len = snprintf(NULL, 0, "%f", box->flex_weight); - s = pk_new<char>(len+1, h->bkt); + s = pk_new_arr<char>(len+1, h->bkt); sprintf(s, "%f", box->flex_weight); kve.val = s; kve.end = SRLZTN_KVE_END; pk_arr_append_t(&kvec.arr, kve); // only serialize if we're using flex kve.key = SRLZTN_UI_BOX_FLEX_DIRECTION; - s = pk_new<char>(5, h->bkt); + s = pk_new_arr<char>(5, h->bkt); sprintf(s, "0x%.2X", box->flex_direction); kve.val = s; kve.end = SRLZTN_KVE_END; @@ -146,7 +146,7 @@ pk_handle pke_serialize_ui_box(srlztn_serialize_helper *h, pke_ui_box *box) { } { kve.key = SRLZTN_UI_BOX_TYPE; - s = pk_new<char>(5, h->bkt); + s = pk_new_arr<char>(5, h->bkt); sprintf(s, "0x%.2X", static_cast<PKE_UI_BOX_TYPE_T>(box->type)); kve.val = s; kve.end = SRLZTN_KVE_END; @@ -154,7 +154,7 @@ pk_handle pke_serialize_ui_box(srlztn_serialize_helper *h, pke_ui_box *box) { } { kve.key = SRLZTN_UI_BOX_LAYER; - s = pk_new<char>(5, h->bkt); + s = pk_new_arr<char>(5, h->bkt); sprintf(s, "0x%.2X", box->layer); kve.val = s; kve.end = SRLZTN_KVE_END; @@ -164,7 +164,7 @@ pk_handle pke_serialize_ui_box(srlztn_serialize_helper *h, pke_ui_box *box) { { kve.key = SRLZTN_UI_BOX_COLOR_BORDER; len = snprintf(NULL, 0, "%f%s%f%s%f%s%f", box->color_border[0], SRLZTN_NUM_SEPARATOR, box->color_border[1], SRLZTN_NUM_SEPARATOR, box->color_border[2], SRLZTN_NUM_SEPARATOR, box->color_border[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", box->color_border[0], SRLZTN_NUM_SEPARATOR, box->color_border[1], SRLZTN_NUM_SEPARATOR, box->color_border[2], SRLZTN_NUM_SEPARATOR, box->color_border[3]); kve.val = s; kve.end = SRLZTN_KVE_END; @@ -174,7 +174,7 @@ pk_handle pke_serialize_ui_box(srlztn_serialize_helper *h, pke_ui_box *box) { { kve.key = SRLZTN_UI_BOX_COLOR_BACKGROUND; len = snprintf(NULL, 0, "%f%s%f%s%f%s%f", box->color_background[0], SRLZTN_NUM_SEPARATOR, box->color_background[1], SRLZTN_NUM_SEPARATOR, box->color_background[2], SRLZTN_NUM_SEPARATOR, box->color_background[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", box->color_background[0], SRLZTN_NUM_SEPARATOR, box->color_background[1], SRLZTN_NUM_SEPARATOR, box->color_background[2], SRLZTN_NUM_SEPARATOR, box->color_background[3]); kve.val = s; kve.end = SRLZTN_KVE_END; |
