feat: Enhance Dungeon Rendering with Size Adjustments and Testing Initialization
- Added InitializeForTesting method in Rom class to facilitate testing setup. - Updated DungeonCanvasViewer to adjust object and sprite sizes from 16x16 to 8x8, improving rendering accuracy. - Modified rendering logic for various dungeon objects (chests, doors, walls, pots) to reflect new size calculations. - Adjusted object position calculations in ObjectRenderer to align with the new size metrics, ensuring consistent rendering across the application. - Updated integration tests to verify the new initialization method for ROM objects.
This commit is contained in:
@@ -149,8 +149,6 @@ if(YAZE_BUILD_TESTS AND NOT YAZE_BUILD_TESTS STREQUAL "OFF")
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
# Configure test executable only when tests are enabled
|
||||
target_include_directories(
|
||||
yaze_test PUBLIC
|
||||
@@ -248,4 +246,4 @@ if(YAZE_BUILD_TESTS AND NOT YAZE_BUILD_TESTS STREQUAL "OFF")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(test.cmake)
|
||||
include(test.cmake)
|
||||
|
||||
@@ -28,6 +28,7 @@ class DungeonEditorIntegrationTest : public ::testing::Test {
|
||||
status = rom_->LoadFromFile("zelda3.sfc");
|
||||
}
|
||||
ASSERT_TRUE(status.ok()) << "Could not load zelda3.sfc from any location";
|
||||
ASSERT_TRUE(rom_->InitializeForTesting().ok());
|
||||
|
||||
// Pass ROM to constructor so all components are initialized with it
|
||||
dungeon_editor_ = std::make_unique<editor::DungeonEditor>(rom_.get());
|
||||
|
||||
Reference in New Issue
Block a user