From 21f49f99463780c6f39da3b69ce2afa9b340e9fc Mon Sep 17 00:00:00 2001 From: scawful Date: Fri, 9 Aug 2024 02:18:49 -0400 Subject: [PATCH] add overworld_maps to yaze_load_overworld --- Doxyfile | 2 +- src/base/overworld.h | 3 +++ src/yaze.cc | 6 ++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Doxyfile b/Doxyfile index 28b3bfe5..b7548224 100644 --- a/Doxyfile +++ b/Doxyfile @@ -1190,7 +1190,7 @@ FORTRAN_COMMENT_AFTER = 72 # also VERBATIM_HEADERS is set to NO. # The default value is: NO. -SOURCE_BROWSER = NO +SOURCE_BROWSER = YES # Setting the INLINE_SOURCES tag to YES will include the body of functions, # multi-line macros, enums or list initialized variables directly into the diff --git a/src/base/overworld.h b/src/base/overworld.h index 8a48dd7b..f7f8df2d 100644 --- a/src/base/overworld.h +++ b/src/base/overworld.h @@ -17,6 +17,9 @@ struct z3_overworld_map { uint8_t* tile16_data; /**< Pointer to the 16x16 tile data. */ }; +/** + * @brief Primitive of the overworld. + */ struct z3_overworld { z3_overworld_map* maps; /**< Pointer to the overworld maps. */ void* impl; // yaze::app::Overworld* diff --git a/src/yaze.cc b/src/yaze.cc index fc0f237d..73c6fc8c 100644 --- a/src/yaze.cc +++ b/src/yaze.cc @@ -96,5 +96,11 @@ z3_overworld* yaze_load_overworld(const z3_rom* rom) { z3_overworld* overworld = new z3_overworld(); overworld->impl = internal_overworld; + int map_id = 0; + for (const auto& ow_map : internal_overworld->overworld_maps()) { + overworld->maps[map_id] = new z3_overworld_map(); + overworld->maps[map_id]->id = map_id; + map_id++; + } return overworld; } \ No newline at end of file