summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorJonathan Bradley <jcb@pikum.xyz>2025-05-20 21:08:19 -0400
committerJonathan Bradley <jcb@pikum.xyz>2025-05-20 21:08:19 -0400
commit40d69e7e40a18865a31af2f55efcde369d36dbbb (patch)
tree95a2cbbe40192183d13f846f3444b32d7e12b0e8 /src/game.cpp
parentead9e484db969a880470d625b1884aced296e722 (diff)
pke: serialization overhaul + embedded assets
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 5013c49..4ca5161 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -186,21 +186,19 @@ void Game_Main(PKEWindowProperties windowProps, const char *executablePath) {
// TODO remove me: temp stuff for testing
pke_ui_box *ui_box = pke_ui_box_new_root();
ui_box->flags |= PKE_UI_BOX_FLAG_POSITION_TYPE_DYNAMIC;
- ui_box->pos_top_left_x = 0.1;
- ui_box->pos_top_left_y = 0.1;
- ui_box->max_width = 0.8;
- ui_box->max_height = 0.8;
+ ui_box->pos_top_left.x = 0.1;
+ ui_box->pos_top_left.y = 0.1;
+ ui_box->max_size.x = 0.8;
+ ui_box->max_size.y = 0.8;
// TODO remove me: temp stuff for testing
pke_ui_box *c_ui_box = pke_ui_box_new_child(ui_box, PKE_UI_BOX_TYPE_TEXT);
c_ui_box->flags |= PKE_UI_BOX_FLAG_POSITION_TYPE_STATIC;
- c_ui_box->pos_top_left_x = 20;
- c_ui_box->pos_top_left_y = 20;
- c_ui_box->max_width = 3000;
- c_ui_box->max_height = 3000;
- pke_ui_box_type_data_text *box_text = reinterpret_cast<pke_ui_box_type_data_text*>(c_ui_box->type_data);
- box_text->font_render_handle = fr_1;
- box_text->font_render_settings = fr_set;
+ c_ui_box->pos_top_left.x = 20;
+ c_ui_box->pos_top_left.y = 20;
+ c_ui_box->max_size.x = 3000;
+ c_ui_box->max_size.y = 3000;
+ c_ui_box->type_data->text.font_render_handle = fr_1;
GameTimePoint lastTimePoint = pkeSettings.steadyClock.now();
double deltaTillNextRender = pkeSettings.deltaPerFrame;