From: Randy McShandy Date: Mon, 11 Aug 2025 02:02:04 +0000 (-0500) Subject: Expand playtime data so map sizing is saved through save/load process. Probably a... X-Git-Url: http://git.mcshandy.xyz/gitweb.cgi?a=commitdiff_plain;h=7a048e7446664980ed838f36416cc46b11085463;p=barrow_crawler Expand playtime data so map sizing is saved through save/load process. Probably a better way to do this. --- diff --git a/bin/posix_BC b/bin/posix_BC index 1b7b423..c98b423 100755 Binary files a/bin/posix_BC and b/bin/posix_BC differ diff --git a/src/menufuncs.c b/src/menufuncs.c index 45885d9..e74a05c 100644 --- a/src/menufuncs.c +++ b/src/menufuncs.c @@ -21,6 +21,7 @@ bool internal_new_game() initialize_generation_info((IVec2){.x = barrow_size * density, .y = barrow_size * density}, 8); playtime.room_count = generation_info.room_count; + playtime.img_export_scale = generation_info.img_export_scale; pthread_create(&generation_info.generator_thread, NULL, generate_rd, NULL); pthread_detach(generation_info.generator_thread); diff --git a/src/render_raylib.c b/src/render_raylib.c index 8a2e842..fac7a55 100644 --- a/src/render_raylib.c +++ b/src/render_raylib.c @@ -223,8 +223,8 @@ void drawing_game_mode() DrawTextureEx(hand_01_texture, hand_position, hand_rotation, hand_scale, orb_color); Rectangle minimap_dest = { - .width = 64.0f*generation_info.img_export_scale.x, - .height = 64.0f*generation_info.img_export_scale.y, + .width = 64.0f* playtime.img_export_scale.x, + .height = 64.0f*playtime.img_export_scale.y, .x = 0.0f, .y = 0.0f }; diff --git a/src/structs.h b/src/structs.h index b20fc09..29999f8 100644 --- a/src/structs.h +++ b/src/structs.h @@ -83,6 +83,7 @@ typedef struct Vector3 room_positions[16]; Camera3D cam; + IVec2 img_export_scale; Vector3 player_velocity; Vector3 player_rotation;