diff --git a/src/app/core/controller.cc b/src/app/core/controller.cc index 22b802b4..cfe41dd5 100644 --- a/src/app/core/controller.cc +++ b/src/app/core/controller.cc @@ -9,7 +9,7 @@ #include "app/core/window.h" #include "app/editor/editor_manager.h" #include "app/gui/background_renderer.h" -#include "app/gfx/arena.h" // Add include for Arena +#include "app/gfx/resource/arena.h" // Add include for Arena #include "app/gfx/backend/sdl2_renderer.h" // Add include for new renderer #include "app/gui/theme_manager.h" #include "app/gui/widgets/widget_id_registry.h" diff --git a/src/app/core/features.h b/src/app/core/features.h index 0b65a8b0..0c4ec020 100644 --- a/src/app/core/features.h +++ b/src/app/core/features.h @@ -40,6 +40,9 @@ class FeatureFlags { // Enable performance monitoring and timing. bool kEnablePerformanceMonitoring = true; + // Enable the new tiered graphics architecture. + bool kEnableTieredGfxArchitecture = true; + // Use NFD (Native File Dialog) instead of bespoke file dialog implementation. #if defined(YAZE_ENABLE_NFD) && YAZE_ENABLE_NFD bool kUseNativeFileDialog = true; @@ -111,6 +114,8 @@ class FeatureFlags { std::to_string(get().overworld.kApplyZSCustomOverworldASM) + "\n"; result += "kUseNativeFileDialog: " + std::to_string(get().kUseNativeFileDialog) + "\n"; + result += "kEnableTieredGfxArchitecture: " + + std::to_string(get().kEnableTieredGfxArchitecture) + "\n"; return result; } }; diff --git a/src/app/core/window.cc b/src/app/core/window.cc index 2c4f5489..81598397 100644 --- a/src/app/core/window.cc +++ b/src/app/core/window.cc @@ -7,7 +7,7 @@ #include "app/platform/font_loader.h" #include "util/sdl_deleter.h" #include "util/log.h" -#include "app/gfx/arena.h" +#include "app/gfx/resource/arena.h" #include "app/gui/style.h" #include "imgui/backends/imgui_impl_sdl2.h" #include "imgui/backends/imgui_impl_sdlrenderer2.h" diff --git a/src/app/core/window.h b/src/app/core/window.h index 75207800..8aafa52c 100644 --- a/src/app/core/window.h +++ b/src/app/core/window.h @@ -8,7 +8,7 @@ #include "absl/status/status.h" #include "absl/strings/str_format.h" #include "util/sdl_deleter.h" -#include "app/gfx/bitmap.h" +#include "app/gfx/core/bitmap.h" #include "app/gfx/backend/irenderer.h" namespace yaze { diff --git a/src/app/editor/dungeon/dungeon_canvas_viewer.cc b/src/app/editor/dungeon/dungeon_canvas_viewer.cc index 1a634da7..afb85e19 100644 --- a/src/app/editor/dungeon/dungeon_canvas_viewer.cc +++ b/src/app/editor/dungeon/dungeon_canvas_viewer.cc @@ -1,8 +1,8 @@ #include "dungeon_canvas_viewer.h" #include "absl/strings/str_format.h" -#include "app/gfx/arena.h" -#include "app/gfx/snes_palette.h" +#include "app/gfx/resource/arena.h" +#include "app/gfx/types/snes_palette.h" #include "app/gui/input.h" #include "app/rom.h" #include "zelda3/dungeon/room.h" diff --git a/src/app/editor/dungeon/dungeon_canvas_viewer.h b/src/app/editor/dungeon/dungeon_canvas_viewer.h index 966885b6..104b2733 100644 --- a/src/app/editor/dungeon/dungeon_canvas_viewer.h +++ b/src/app/editor/dungeon/dungeon_canvas_viewer.h @@ -6,7 +6,7 @@ #include "app/gui/canvas.h" #include "app/rom.h" #include "zelda3/dungeon/room.h" -#include "app/gfx/snes_palette.h" +#include "app/gfx/types/snes_palette.h" #include "dungeon_object_interaction.h" #include "imgui/imgui.h" diff --git a/src/app/editor/dungeon/dungeon_editor_v2.cc b/src/app/editor/dungeon/dungeon_editor_v2.cc index 7dd7cab4..a5310f59 100644 --- a/src/app/editor/dungeon/dungeon_editor_v2.cc +++ b/src/app/editor/dungeon/dungeon_editor_v2.cc @@ -4,9 +4,9 @@ #include #include "absl/strings/str_format.h" -#include "app/gfx/arena.h" -#include "app/gfx/palette_manager.h" -#include "app/gfx/snes_palette.h" +#include "app/gfx/resource/arena.h" +#include "app/gfx/util/palette_manager.h" +#include "app/gfx/types/snes_palette.h" #include "zelda3/dungeon/room.h" #include "app/gui/icons.h" #include "app/gui/input.h" diff --git a/src/app/editor/dungeon/dungeon_editor_v2.h b/src/app/editor/dungeon/dungeon_editor_v2.h index 53263691..fdf5fd12 100644 --- a/src/app/editor/dungeon/dungeon_editor_v2.h +++ b/src/app/editor/dungeon/dungeon_editor_v2.h @@ -7,7 +7,7 @@ #include "absl/status/status.h" #include "absl/strings/str_format.h" #include "app/editor/editor.h" -#include "app/gfx/snes_palette.h" +#include "app/gfx/types/snes_palette.h" #include "app/rom.h" #include "dungeon_room_selector.h" #include "dungeon_canvas_viewer.h" diff --git a/src/app/editor/dungeon/dungeon_object_selector.cc b/src/app/editor/dungeon/dungeon_object_selector.cc index 2af5b1f0..df90acca 100644 --- a/src/app/editor/dungeon/dungeon_object_selector.cc +++ b/src/app/editor/dungeon/dungeon_object_selector.cc @@ -5,8 +5,8 @@ #include #include "app/core/window.h" -#include "app/gfx/arena.h" -#include "app/gfx/snes_palette.h" +#include "app/gfx/resource/arena.h" +#include "app/gfx/types/snes_palette.h" #include "app/gui/canvas.h" #include "app/gui/modules/asset_browser.h" #include "app/rom.h" diff --git a/src/app/editor/dungeon/dungeon_object_selector.h b/src/app/editor/dungeon/dungeon_object_selector.h index 6d9a5a9f..b86f5e01 100644 --- a/src/app/editor/dungeon/dungeon_object_selector.h +++ b/src/app/editor/dungeon/dungeon_object_selector.h @@ -6,7 +6,7 @@ // object_renderer.h removed - using ObjectDrawer for production rendering #include "zelda3/dungeon/dungeon_object_editor.h" #include "zelda3/dungeon/dungeon_editor_system.h" -#include "app/gfx/snes_palette.h" +#include "app/gfx/types/snes_palette.h" #include "imgui/imgui.h" namespace yaze { diff --git a/src/app/editor/dungeon/dungeon_room_loader.cc b/src/app/editor/dungeon/dungeon_room_loader.cc index 8007bdcc..059d243b 100644 --- a/src/app/editor/dungeon/dungeon_room_loader.cc +++ b/src/app/editor/dungeon/dungeon_room_loader.cc @@ -6,8 +6,8 @@ #include #include -#include "app/gfx/performance/performance_profiler.h" -#include "app/gfx/snes_palette.h" +#include "app/gfx/debug/performance/performance_profiler.h" +#include "app/gfx/types/snes_palette.h" #include "zelda3/dungeon/room.h" #include "util/log.h" diff --git a/src/app/editor/editor_manager.cc b/src/app/editor/editor_manager.cc index 08c63554..c66ed31b 100644 --- a/src/app/editor/editor_manager.cc +++ b/src/app/editor/editor_manager.cc @@ -28,8 +28,8 @@ #include "app/editor/sprite/sprite_editor.h" #include "app/editor/ui/editor_selection_dialog.h" #include "app/emu/emulator.h" -#include "app/gfx/arena.h" -#include "app/gfx/performance/performance_profiler.h" +#include "app/gfx/resource/arena.h" +#include "app/gfx/debug/performance/performance_profiler.h" #include "app/gui/background_renderer.h" #include "app/gui/icons.h" #include "app/gui/input.h" @@ -51,7 +51,7 @@ #include "app/editor/system/settings_editor.h" #include "app/editor/system/toast_manager.h" #include "app/emu/emulator.h" -#include "app/gfx/performance/performance_dashboard.h" +#include "app/gfx/debug/performance/performance_dashboard.h" #include "app/editor/editor.h" #ifdef YAZE_WITH_GRPC diff --git a/src/app/editor/editor_manager.h b/src/app/editor/editor_manager.h index 9fd24f8e..8268dc18 100644 --- a/src/app/editor/editor_manager.h +++ b/src/app/editor/editor_manager.h @@ -38,7 +38,7 @@ #include "app/editor/ui/editor_selection_dialog.h" #include "app/editor/ui/welcome_screen.h" #include "app/emu/emulator.h" -#include "app/gfx/performance/performance_dashboard.h" +#include "app/gfx/debug/performance/performance_dashboard.h" #include "app/rom.h" #include "yaze_config.h" diff --git a/src/app/editor/graphics/gfx_group_editor.cc b/src/app/editor/graphics/gfx_group_editor.cc index 0210bf02..a5300f18 100644 --- a/src/app/editor/graphics/gfx_group_editor.cc +++ b/src/app/editor/graphics/gfx_group_editor.cc @@ -2,8 +2,8 @@ #include "absl/status/status.h" #include "absl/strings/str_cat.h" -#include "app/gfx/arena.h" -#include "app/gfx/snes_palette.h" +#include "app/gfx/resource/arena.h" +#include "app/gfx/types/snes_palette.h" #include "app/gui/canvas.h" #include "app/gui/color.h" #include "app/gui/input.h" diff --git a/src/app/editor/graphics/gfx_group_editor.h b/src/app/editor/graphics/gfx_group_editor.h index f10f5061..26223d35 100644 --- a/src/app/editor/graphics/gfx_group_editor.h +++ b/src/app/editor/graphics/gfx_group_editor.h @@ -2,7 +2,7 @@ #define YAZE_APP_EDITOR_GFX_GROUP_EDITOR_H #include "absl/status/status.h" -#include "app/gfx/snes_palette.h" +#include "app/gfx/types/snes_palette.h" #include "app/gui/canvas.h" #include "app/rom.h" diff --git a/src/app/editor/graphics/graphics_editor.cc b/src/app/editor/graphics/graphics_editor.cc index 218cd66c..ef571cb3 100644 --- a/src/app/editor/graphics/graphics_editor.cc +++ b/src/app/editor/graphics/graphics_editor.cc @@ -8,12 +8,12 @@ #include "app/gui/ui_helpers.h" #include "util/file_util.h" #include "app/core/window.h" -#include "app/gfx/arena.h" -#include "app/gfx/bitmap.h" -#include "app/gfx/compression.h" -#include "app/gfx/scad_format.h" -#include "app/gfx/snes_palette.h" -#include "app/gfx/snes_tile.h" +#include "app/gfx/resource/arena.h" +#include "app/gfx/core/bitmap.h" +#include "app/gfx/util/compression.h" +#include "app/gfx/util/scad_format.h" +#include "app/gfx/types/snes_palette.h" +#include "app/gfx/types/snes_tile.h" #include "app/gui/canvas.h" #include "app/gui/color.h" #include "app/gui/icons.h" @@ -21,7 +21,7 @@ #include "app/gui/modules/asset_browser.h" #include "app/gui/style.h" #include "app/rom.h" -#include "app/gfx/performance/performance_profiler.h" +#include "app/gfx/debug/performance/performance_profiler.h" #include "imgui/imgui.h" #include "imgui/misc/cpp/imgui_stdlib.h" #include "imgui_memory_editor.h" diff --git a/src/app/editor/graphics/graphics_editor.h b/src/app/editor/graphics/graphics_editor.h index 10e20efb..4b45984c 100644 --- a/src/app/editor/graphics/graphics_editor.h +++ b/src/app/editor/graphics/graphics_editor.h @@ -6,9 +6,9 @@ #include "absl/status/status.h" #include "app/editor/editor.h" #include "app/editor/palette/palette_editor.h" -#include "app/gfx/bitmap.h" +#include "app/gfx/core/bitmap.h" #include "app/gui/editor_card_manager.h" -#include "app/gfx/snes_tile.h" +#include "app/gfx/types/snes_tile.h" #include "app/gui/canvas.h" #include "app/gui/editor_layout.h" #include "app/gui/modules/asset_browser.h" diff --git a/src/app/editor/graphics/screen_editor.cc b/src/app/editor/graphics/screen_editor.cc index 6e5e024a..380ec3de 100644 --- a/src/app/editor/graphics/screen_editor.cc +++ b/src/app/editor/graphics/screen_editor.cc @@ -5,15 +5,14 @@ #include #include "absl/strings/str_format.h" -#include "absl/strings/string_view.h" -#include "app/gfx/performance/performance_profiler.h" +#include "app/gfx/debug/performance/performance_profiler.h" #include "util/file_util.h" #include "app/core/window.h" -#include "app/gfx/arena.h" -#include "app/gfx/atlas_renderer.h" -#include "app/gfx/bitmap.h" -#include "app/gfx/performance/performance_profiler.h" -#include "app/gfx/snes_tile.h" +#include "app/gfx/resource/arena.h" +#include "app/gfx/render/atlas_renderer.h" +#include "app/gfx/core/bitmap.h" +#include "app/gfx/debug/performance/performance_profiler.h" +#include "app/gfx/types/snes_tile.h" #include "app/gui/canvas.h" #include "app/gui/color.h" #include "app/gui/icons.h" diff --git a/src/app/editor/graphics/screen_editor.h b/src/app/editor/graphics/screen_editor.h index a5d9cf19..2d0db707 100644 --- a/src/app/editor/graphics/screen_editor.h +++ b/src/app/editor/graphics/screen_editor.h @@ -5,10 +5,10 @@ #include "absl/status/status.h" #include "app/editor/editor.h" -#include "app/gfx/bitmap.h" -#include "app/gfx/snes_palette.h" +#include "app/gfx/core/bitmap.h" +#include "app/gfx/types/snes_palette.h" #include "app/gui/editor_card_manager.h" -#include "app/gfx/tilemap.h" +#include "app/gfx/render/tilemap.h" #include "app/gui/canvas.h" #include "app/rom.h" #include "zelda3/screen/dungeon_map.h" diff --git a/src/app/editor/message/message_editor.cc b/src/app/editor/message/message_editor.cc index 025bd553..6d846557 100644 --- a/src/app/editor/message/message_editor.cc +++ b/src/app/editor/message/message_editor.cc @@ -6,12 +6,12 @@ #include "absl/status/status.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" -#include "app/gfx/arena.h" -#include "app/gfx/performance/performance_profiler.h" +#include "app/gfx/resource/arena.h" +#include "app/gfx/debug/performance/performance_profiler.h" #include "util/file_util.h" -#include "app/gfx/bitmap.h" -#include "app/gfx/snes_palette.h" -#include "app/gfx/snes_tile.h" +#include "app/gfx/core/bitmap.h" +#include "app/gfx/types/snes_palette.h" +#include "app/gfx/types/snes_tile.h" #include "app/gui/canvas.h" #include "app/gui/style.h" #include "app/gui/icons.h" diff --git a/src/app/editor/message/message_editor.h b/src/app/editor/message/message_editor.h index 25bdaec4..01355b32 100644 --- a/src/app/editor/message/message_editor.h +++ b/src/app/editor/message/message_editor.h @@ -11,7 +11,7 @@ #include "app/editor/message/message_preview.h" #include "app/gui/editor_card_manager.h" #include "app/gui/editor_layout.h" -#include "app/gfx/bitmap.h" +#include "app/gfx/core/bitmap.h" #include "app/gui/canvas.h" #include "app/gui/style.h" #include "app/rom.h" diff --git a/src/app/editor/music/music_editor.cc b/src/app/editor/music/music_editor.cc index ef5bab86..da3124d9 100644 --- a/src/app/editor/music/music_editor.cc +++ b/src/app/editor/music/music_editor.cc @@ -1,7 +1,7 @@ #include "music_editor.h" #include "absl/strings/str_format.h" -#include "app/gfx/performance/performance_profiler.h" +#include "app/gfx/debug/performance/performance_profiler.h" #include "app/editor/code/assembly_editor.h" #include "app/emu/emulator.h" #include "app/gui/icons.h" diff --git a/src/app/editor/overworld/map_properties.cc b/src/app/editor/overworld/map_properties.cc index 24f8285c..c5770f15 100644 --- a/src/app/editor/overworld/map_properties.cc +++ b/src/app/editor/overworld/map_properties.cc @@ -1,6 +1,6 @@ #include "app/editor/overworld/map_properties.h" -#include "app/gfx/performance/performance_profiler.h" +#include "app/gfx/debug/performance/performance_profiler.h" #include "app/editor/overworld/overworld_editor.h" #include "app/editor/overworld/ui_constants.h" #include "app/gui/canvas.h" diff --git a/src/app/editor/overworld/overworld_editor.cc b/src/app/editor/overworld/overworld_editor.cc index 2c825130..d42e22f3 100644 --- a/src/app/editor/overworld/overworld_editor.cc +++ b/src/app/editor/overworld/overworld_editor.cc @@ -18,12 +18,12 @@ #include "app/editor/overworld/map_properties.h" #include "app/editor/overworld/entity.h" #include "app/editor/overworld/tile16_editor.h" -#include "app/gfx/arena.h" -#include "app/gfx/bitmap.h" +#include "app/gfx/resource/arena.h" +#include "app/gfx/core/bitmap.h" #include "app/gui/widgets/tile_selector_widget.h" -#include "app/gfx/performance/performance_profiler.h" -#include "app/gfx/snes_palette.h" -#include "app/gfx/tilemap.h" +#include "app/gfx/debug/performance/performance_profiler.h" +#include "app/gfx/types/snes_palette.h" +#include "app/gfx/render/tilemap.h" #include "app/gui/canvas.h" #include "app/gui/canvas/canvas_automation_api.h" #include "app/gui/editor_layout.h" diff --git a/src/app/editor/overworld/overworld_editor.h b/src/app/editor/overworld/overworld_editor.h index 7e97be81..dbb8f423 100644 --- a/src/app/editor/overworld/overworld_editor.h +++ b/src/app/editor/overworld/overworld_editor.h @@ -9,9 +9,9 @@ #include "app/editor/overworld/tile16_editor.h" #include "app/editor/overworld/map_properties.h" #include "app/editor/overworld/overworld_entity_renderer.h" -#include "app/gfx/bitmap.h" -#include "app/gfx/snes_palette.h" -#include "app/gfx/tilemap.h" +#include "app/gfx/core/bitmap.h" +#include "app/gfx/types/snes_palette.h" +#include "app/gfx/render/tilemap.h" #include "app/gui/canvas.h" #include "app/gui/widgets/tile_selector_widget.h" #include "app/gui/input.h" diff --git a/src/app/editor/overworld/overworld_entity_renderer.h b/src/app/editor/overworld/overworld_entity_renderer.h index e9caf22f..8db44d1b 100644 --- a/src/app/editor/overworld/overworld_entity_renderer.h +++ b/src/app/editor/overworld/overworld_entity_renderer.h @@ -3,7 +3,7 @@ #include -#include "app/gfx/bitmap.h" +#include "app/gfx/core/bitmap.h" #include "app/gui/canvas.h" #include "zelda3/common.h" #include "zelda3/overworld/overworld.h" diff --git a/src/app/editor/overworld/scratch_space.cc b/src/app/editor/overworld/scratch_space.cc index ba6e3f19..50bc4644 100644 --- a/src/app/editor/overworld/scratch_space.cc +++ b/src/app/editor/overworld/scratch_space.cc @@ -11,17 +11,16 @@ #include "absl/status/status.h" #include "absl/strings/str_format.h" #include "app/core/asar_wrapper.h" -#include "app/core/features.h" -#include "app/gfx/performance/performance_profiler.h" +#include "app/gfx/debug/performance/performance_profiler.h" #include "app/core/window.h" #include "app/editor/overworld/entity.h" #include "app/editor/overworld/map_properties.h" #include "app/editor/overworld/tile16_editor.h" -#include "app/gfx/arena.h" -#include "app/gfx/bitmap.h" -#include "app/gfx/performance/performance_profiler.h" -#include "app/gfx/snes_palette.h" -#include "app/gfx/tilemap.h" +#include "app/gfx/resource/arena.h" +#include "app/gfx/core/bitmap.h" +#include "app/gfx/debug/performance/performance_profiler.h" +#include "app/gfx/types/snes_palette.h" +#include "app/gfx/render/tilemap.h" #include "app/gui/canvas.h" #include "app/gui/icons.h" #include "app/gui/input.h" diff --git a/src/app/editor/overworld/tile16_editor.cc b/src/app/editor/overworld/tile16_editor.cc index 6ae97dce..f7fe038b 100644 --- a/src/app/editor/overworld/tile16_editor.cc +++ b/src/app/editor/overworld/tile16_editor.cc @@ -3,11 +3,11 @@ #include #include "absl/status/status.h" -#include "app/gfx/arena.h" -#include "app/gfx/bitmap.h" +#include "app/gfx/resource/arena.h" +#include "app/gfx/core/bitmap.h" #include "app/gfx/backend/irenderer.h" -#include "app/gfx/performance/performance_profiler.h" -#include "app/gfx/snes_palette.h" +#include "app/gfx/debug/performance/performance_profiler.h" +#include "app/gfx/types/snes_palette.h" #include "app/gui/canvas.h" #include "app/gui/input.h" #include "app/gui/style.h" diff --git a/src/app/editor/overworld/tile16_editor.h b/src/app/editor/overworld/tile16_editor.h index c9c242bd..2f1c8045 100644 --- a/src/app/editor/overworld/tile16_editor.h +++ b/src/app/editor/overworld/tile16_editor.h @@ -8,9 +8,9 @@ #include "absl/status/status.h" #include "app/editor/palette/palette_editor.h" -#include "app/gfx/bitmap.h" -#include "app/gfx/snes_palette.h" -#include "app/gfx/snes_tile.h" +#include "app/gfx/core/bitmap.h" +#include "app/gfx/types/snes_palette.h" +#include "app/gfx/types/snes_tile.h" #include "app/gui/canvas.h" #include "app/gui/input.h" #include "util/log.h" diff --git a/src/app/editor/palette/palette_editor.cc b/src/app/editor/palette/palette_editor.cc index b01e8793..3b5d17b1 100644 --- a/src/app/editor/palette/palette_editor.cc +++ b/src/app/editor/palette/palette_editor.cc @@ -2,9 +2,9 @@ #include "absl/status/status.h" #include "absl/strings/str_cat.h" -#include "app/gfx/palette_manager.h" -#include "app/gfx/performance/performance_profiler.h" -#include "app/gfx/snes_palette.h" +#include "app/gfx/util/palette_manager.h" +#include "app/gfx/debug/performance/performance_profiler.h" +#include "app/gfx/types/snes_palette.h" #include "app/gui/color.h" #include "app/gui/editor_card_manager.h" #include "app/gui/editor_layout.h" diff --git a/src/app/editor/palette/palette_editor.h b/src/app/editor/palette/palette_editor.h index b56c2eb0..2c497515 100644 --- a/src/app/editor/palette/palette_editor.h +++ b/src/app/editor/palette/palette_editor.h @@ -9,8 +9,8 @@ #include "app/editor/editor.h" #include "app/editor/graphics/gfx_group_editor.h" #include "app/editor/palette/palette_group_card.h" -#include "app/gfx/snes_color.h" -#include "app/gfx/snes_palette.h" +#include "app/gfx/types/snes_color.h" +#include "app/gfx/types/snes_palette.h" #include "app/rom.h" #include "imgui/imgui.h" diff --git a/src/app/editor/palette/palette_group_card.cc b/src/app/editor/palette/palette_group_card.cc index 90e5d19f..d0fbb673 100644 --- a/src/app/editor/palette/palette_group_card.cc +++ b/src/app/editor/palette/palette_group_card.cc @@ -3,8 +3,8 @@ #include #include "absl/strings/str_format.h" -#include "app/gfx/palette_manager.h" -#include "app/gfx/snes_palette.h" +#include "app/gfx/util/palette_manager.h" +#include "app/gfx/types/snes_palette.h" #include "app/gui/color.h" #include "app/gui/icons.h" #include "app/gui/layout_helpers.h" diff --git a/src/app/editor/palette/palette_group_card.h b/src/app/editor/palette/palette_group_card.h index e64639a1..10db2acf 100644 --- a/src/app/editor/palette/palette_group_card.h +++ b/src/app/editor/palette/palette_group_card.h @@ -9,8 +9,8 @@ #include #include "absl/status/status.h" -#include "app/gfx/snes_color.h" -#include "app/gfx/snes_palette.h" +#include "app/gfx/types/snes_color.h" +#include "app/gfx/types/snes_palette.h" #include "app/gui/editor_card_manager.h" #include "app/rom.h" #include "imgui/imgui.h" diff --git a/src/app/editor/sprite/sprite_editor.cc b/src/app/editor/sprite/sprite_editor.cc index 133d2fa3..fb225880 100644 --- a/src/app/editor/sprite/sprite_editor.cc +++ b/src/app/editor/sprite/sprite_editor.cc @@ -1,10 +1,10 @@ #include "sprite_editor.h" -#include "app/gfx/performance/performance_profiler.h" +#include "app/gfx/debug/performance/performance_profiler.h" #include "app/gui/ui_helpers.h" #include "util/file_util.h" #include "app/editor/sprite/zsprite.h" -#include "app/gfx/arena.h" +#include "app/gfx/resource/arena.h" #include "app/gui/icons.h" #include "app/gui/input.h" #include "zelda3/sprite/sprite.h" diff --git a/src/app/editor/system/settings_editor.cc b/src/app/editor/system/settings_editor.cc index 21853c05..2c3e57af 100644 --- a/src/app/editor/system/settings_editor.cc +++ b/src/app/editor/system/settings_editor.cc @@ -3,7 +3,7 @@ #include "absl/status/status.h" #include "app/gui/feature_flags_menu.h" -#include "app/gfx/performance/performance_profiler.h" +#include "app/gfx/debug/performance/performance_profiler.h" #include "app/gui/style.h" #include "app/gui/icons.h" #include "app/gui/theme_manager.h" diff --git a/src/app/emu/debug/disassembly_viewer.h b/src/app/emu/debug/disassembly_viewer.h index b567442a..10aff6d7 100644 --- a/src/app/emu/debug/disassembly_viewer.h +++ b/src/app/emu/debug/disassembly_viewer.h @@ -7,7 +7,7 @@ #include #include "app/emu/cpu/cpu.h" -#include "app/gfx/bitmap.h" +#include "app/gfx/core/bitmap.h" #include "app/gui/icons.h" #include "imgui/imgui.h" diff --git a/src/app/emu/snes.cc b/src/app/emu/snes.cc index e9b0ec89..c6de768b 100644 --- a/src/app/emu/snes.cc +++ b/src/app/emu/snes.cc @@ -151,13 +151,24 @@ void Snes::HandleInput() { input_latch(&input2, true); input_latch(&input1, false); input_latch(&input2, false); + // Read 16 bits serially for both controllers, LSB-first, packing bits as BYSTudlr + port_auto_read_[0] = 0; // input1 low 8 bits (B, Y, Select, Start, Up, Down, Left, Right) + port_auto_read_[2] = 0; // input1 high 8 bits (A, X, L, R, unused, unused, unused, unused) + port_auto_read_[1] = 0; // input2 low 8 bits + port_auto_read_[3] = 0; // input2 high 8 bits + for (int i = 0; i < 16; i++) { - uint8_t val = input_read(&input1); - port_auto_read_[0] |= ((val & 1) << (15 - i)); // Bits are read LSB first, stored MSB first - port_auto_read_[2] |= (((val >> 1) & 1) << (15 - i)); - val = input_read(&input2); - port_auto_read_[1] |= ((val & 1) << (15 - i)); - port_auto_read_[3] |= (((val >> 1) & 1) << (15 - i)); + uint8_t val1 = input_read(&input1); + uint8_t val2 = input_read(&input2); + + if (i < 8) { + port_auto_read_[0] |= ((val1 & 1) << i); // input1 low (BYSTudlr pattern) + port_auto_read_[1] |= ((val2 & 1) << i); // input2 low + port_auto_read_[2] |= (((val1 >> 1) & 1) << i); // input1 high (A, X, L, R...) + port_auto_read_[3] |= (((val2 >> 1) & 1) << i); // input2 high + } + // Optional: for i >= 8, you can skip; 16-bits are clocked out, but SNES only expects the first 16 + // If needed for other pads or 4 player, adapt here } // Debug: Log auto-read result when A button was active diff --git a/src/app/gfx/backend/sdl2_renderer.cc b/src/app/gfx/backend/sdl2_renderer.cc index ce9cf039..9faecb32 100644 --- a/src/app/gfx/backend/sdl2_renderer.cc +++ b/src/app/gfx/backend/sdl2_renderer.cc @@ -1,6 +1,6 @@ #include "app/gfx/backend/sdl2_renderer.h" #include "absl/strings/str_format.h" -#include "app/gfx/bitmap.h" +#include "app/gfx/core/bitmap.h" namespace yaze { namespace gfx { diff --git a/src/app/gfx/bitmap.cc b/src/app/gfx/core/bitmap.cc similarity index 96% rename from src/app/gfx/bitmap.cc rename to src/app/gfx/core/bitmap.cc index 9389124c..56bf2e5f 100644 --- a/src/app/gfx/bitmap.cc +++ b/src/app/gfx/core/bitmap.cc @@ -7,9 +7,9 @@ #include #include -#include "app/gfx/arena.h" -#include "app/gfx/performance/performance_profiler.h" -#include "app/gfx/snes_palette.h" +#include "app/gfx/resource/arena.h" +#include "app/gfx/debug/performance/performance_profiler.h" +#include "app/gfx/types/snes_palette.h" #include "util/log.h" namespace yaze { diff --git a/src/app/gfx/bitmap.h b/src/app/gfx/core/bitmap.h similarity index 96% rename from src/app/gfx/bitmap.h rename to src/app/gfx/core/bitmap.h index 28f7bf81..d7a00e39 100644 --- a/src/app/gfx/bitmap.h +++ b/src/app/gfx/core/bitmap.h @@ -9,7 +9,7 @@ #include #include "app/gfx/backend/irenderer.h" -#include "app/gfx/snes_palette.h" +#include "app/gfx/types/snes_palette.h" namespace yaze { diff --git a/src/app/gfx/graphics_optimizer.cc b/src/app/gfx/debug/graphics_optimizer.cc similarity index 99% rename from src/app/gfx/graphics_optimizer.cc rename to src/app/gfx/debug/graphics_optimizer.cc index 847591e1..71585d36 100644 --- a/src/app/gfx/graphics_optimizer.cc +++ b/src/app/gfx/debug/graphics_optimizer.cc @@ -1,11 +1,11 @@ -#include "app/gfx/graphics_optimizer.h" +#include "app/gfx/debug/graphics_optimizer.h" #include #include #include #include -#include "app/gfx/bpp_format_manager.h" +#include "app/gfx/util/bpp_format_manager.h" namespace yaze { namespace gfx { diff --git a/src/app/gfx/graphics_optimizer.h b/src/app/gfx/debug/graphics_optimizer.h similarity index 98% rename from src/app/gfx/graphics_optimizer.h rename to src/app/gfx/debug/graphics_optimizer.h index 4c8fc9d0..b8baaef8 100644 --- a/src/app/gfx/graphics_optimizer.h +++ b/src/app/gfx/debug/graphics_optimizer.h @@ -5,8 +5,8 @@ #include #include -#include "app/gfx/bpp_format_manager.h" -#include "app/gfx/performance/performance_profiler.h" +#include "app/gfx/util/bpp_format_manager.h" +#include "app/gfx/debug/performance/performance_profiler.h" namespace yaze { namespace gfx { diff --git a/src/app/gfx/performance/performance_dashboard.cc b/src/app/gfx/debug/performance/performance_dashboard.cc similarity index 98% rename from src/app/gfx/performance/performance_dashboard.cc rename to src/app/gfx/debug/performance/performance_dashboard.cc index aae82a58..d244dea1 100644 --- a/src/app/gfx/performance/performance_dashboard.cc +++ b/src/app/gfx/debug/performance/performance_dashboard.cc @@ -1,12 +1,12 @@ -#include "app/gfx/performance/performance_dashboard.h" +#include "app/gfx/debug/performance/performance_dashboard.h" #include #include #include -#include "app/gfx/atlas_renderer.h" -#include "app/gfx/memory_pool.h" -#include "app/gfx/performance/performance_profiler.h" +#include "app/gfx/render/atlas_renderer.h" +#include "app/gfx/resource/memory_pool.h" +#include "app/gfx/debug/performance/performance_profiler.h" #include "imgui/imgui.h" namespace yaze { diff --git a/src/app/gfx/performance/performance_dashboard.h b/src/app/gfx/debug/performance/performance_dashboard.h similarity index 96% rename from src/app/gfx/performance/performance_dashboard.h rename to src/app/gfx/debug/performance/performance_dashboard.h index b7908ed3..8c885fba 100644 --- a/src/app/gfx/performance/performance_dashboard.h +++ b/src/app/gfx/debug/performance/performance_dashboard.h @@ -6,9 +6,9 @@ #include #include -#include "app/gfx/performance/performance_profiler.h" -#include "app/gfx/memory_pool.h" -#include "app/gfx/atlas_renderer.h" +#include "app/gfx/debug/performance/performance_profiler.h" +#include "app/gfx/resource/memory_pool.h" +#include "app/gfx/render/atlas_renderer.h" namespace yaze { namespace gfx { diff --git a/src/app/gfx/performance/performance_profiler.cc b/src/app/gfx/debug/performance/performance_profiler.cc similarity index 98% rename from src/app/gfx/performance/performance_profiler.cc rename to src/app/gfx/debug/performance/performance_profiler.cc index 2655e78f..79744d09 100644 --- a/src/app/gfx/performance/performance_profiler.cc +++ b/src/app/gfx/debug/performance/performance_profiler.cc @@ -1,4 +1,4 @@ -#include "app/gfx/performance/performance_profiler.h" +#include "app/gfx/debug/performance/performance_profiler.h" #include #include @@ -6,7 +6,7 @@ #include #include -#include "app/gfx/memory_pool.h" +#include "app/gfx/resource/memory_pool.h" #include "util/log.h" namespace yaze { diff --git a/src/app/gfx/performance/performance_profiler.h b/src/app/gfx/debug/performance/performance_profiler.h similarity index 100% rename from src/app/gfx/performance/performance_profiler.h rename to src/app/gfx/debug/performance/performance_profiler.h diff --git a/src/app/gfx/gfx_library.cmake b/src/app/gfx/gfx_library.cmake index d6a3eccc..c05a622e 100644 --- a/src/app/gfx/gfx_library.cmake +++ b/src/app/gfx/gfx_library.cmake @@ -1,79 +1,177 @@ -set( - YAZE_APP_GFX_SRC - app/gfx/arena.cc - app/gfx/atlas_renderer.cc - app/gfx/background_buffer.cc - app/gfx/bitmap.cc - app/gfx/compression.cc - app/gfx/memory_pool.cc - app/gfx/performance/performance_dashboard.cc - app/gfx/performance/performance_profiler.cc - app/gfx/scad_format.cc - app/gfx/snes_palette.cc - app/gfx/snes_tile.cc - app/gfx/snes_color.cc - app/gfx/texture_atlas.cc - app/gfx/tilemap.cc - app/gfx/graphics_optimizer.cc - app/gfx/bpp_format_manager.cc - app/gfx/palette_manager.cc +# ============================================================================== +# YAZE GFX Library Refactoring: Tiered Graphics Architecture +# +# This file implements the tiered graphics architecture as proposed in +# docs/gfx-refactor.md. The monolithic yaze_gfx library is decomposed +# into smaller, layered static libraries to improve build times and clarify +# dependencies. +# ============================================================================== + +# ============================================================================== +# Helper Macro to Configure a GFX Library +# ============================================================================== +macro(configure_gfx_library name) + target_precompile_headers(${name} PRIVATE + "$<$:${CMAKE_SOURCE_DIR}/src/yaze_pch.h>" + ) + target_include_directories(${name} PUBLIC + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_SOURCE_DIR}/src/lib + ${CMAKE_SOURCE_DIR}/incl + ${SDL2_INCLUDE_DIR} + ${PROJECT_BINARY_DIR} + ) + target_link_libraries(${name} PUBLIC + yaze_util + yaze_common + ${ABSL_TARGETS} + ) + set_target_properties(${name} PROPERTIES + POSITION_INDEPENDENT_CODE ON + ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" + LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" + ) + if(UNIX AND NOT APPLE) + target_compile_definitions(${name} PRIVATE linux stricmp=strcasecmp) + elseif(APPLE) + target_compile_definitions(${name} PRIVATE MACOS) + elseif(WIN32) + target_compile_definitions(${name} PRIVATE WINDOWS) + endif() +endmacro() + +# ============================================================================== +# 3.1. gfx_types (Foundation) +# Responsibility: Pure data structures for SNES graphics primitives. +# Dependencies: None +# ============================================================================== +set(GFX_TYPES_SRC + app/gfx/types/snes_color.cc + app/gfx/types/snes_palette.cc + app/gfx/types/snes_tile.cc +) +add_library(yaze_gfx_types STATIC ${GFX_TYPES_SRC}) +configure_gfx_library(yaze_gfx_types) +message(STATUS " - GFX Tier: gfx_types configured") + +# ============================================================================== +# 3.2. gfx_backend (Rendering Abstraction) +# Responsibility: Low-level rendering interface and SDL2 implementation. +# Dependencies: SDL2 +# ============================================================================== +set(GFX_BACKEND_SRC app/gfx/backend/sdl2_renderer.cc ) +add_library(yaze_gfx_backend STATIC ${GFX_BACKEND_SRC}) +configure_gfx_library(yaze_gfx_backend) +target_link_libraries(yaze_gfx_backend PUBLIC ${SDL_TARGETS}) +message(STATUS " - GFX Tier: gfx_backend configured") # ============================================================================== -# Yaze Graphics Library +# 3.3. gfx_resource (Resource Management) +# Responsibility: Manages memory and GPU resources. +# Dependencies: gfx_backend # ============================================================================== -# This library contains all graphics-related functionality: -# - Bitmap manipulation -# - SNES tile/palette handling -# - Compression/decompression -# - Arena memory management -# - Atlas rendering -# - Performance profiling -# -# Dependencies: yaze_util, SDL2, Abseil -# ============================================================================== - -add_library(yaze_gfx STATIC ${YAZE_APP_GFX_SRC}) - -target_precompile_headers(yaze_gfx PRIVATE - "$<$:${CMAKE_SOURCE_DIR}/src/yaze_pch.h>" +set(GFX_RESOURCE_SRC + app/gfx/resource/arena.cc + app/gfx/resource/memory_pool.cc ) +add_library(yaze_gfx_resource STATIC ${GFX_RESOURCE_SRC}) +configure_gfx_library(yaze_gfx_resource) +target_link_libraries(yaze_gfx_resource PUBLIC yaze_gfx_backend) +message(STATUS " - GFX Tier: gfx_resource configured") -target_include_directories(yaze_gfx PUBLIC - ${CMAKE_SOURCE_DIR}/src - ${CMAKE_SOURCE_DIR}/src/lib - ${CMAKE_SOURCE_DIR}/incl - ${SDL2_INCLUDE_DIR} - ${PROJECT_BINARY_DIR} +# ============================================================================== +# 3.4. gfx_core (Core Graphics Object) +# Responsibility: The central Bitmap class. +# Dependencies: gfx_types, gfx_resource +# ============================================================================== +set(GFX_CORE_SRC + app/gfx/core/bitmap.cc ) +add_library(yaze_gfx_core STATIC ${GFX_CORE_SRC}) +configure_gfx_library(yaze_gfx_core) +target_link_libraries(yaze_gfx_core PUBLIC + yaze_gfx_types + yaze_gfx_resource +) +message(STATUS " - GFX Tier: gfx_core configured") -target_link_libraries(yaze_gfx PUBLIC +# ============================================================================== +# 3.5. gfx_util (Utilities) +# Responsibility: Standalone graphics data conversion and compression. +# Dependencies: gfx_core +# ============================================================================== +set(GFX_UTIL_SRC + app/gfx/util/bpp_format_manager.cc + app/gfx/util/compression.cc + app/gfx/util/scad_format.cc + app/gfx/util/palette_manager.cc +) +add_library(yaze_gfx_util STATIC ${GFX_UTIL_SRC}) +configure_gfx_library(yaze_gfx_util) +target_link_libraries(yaze_gfx_util PUBLIC yaze_gfx_core) +message(STATUS " - GFX Tier: gfx_util configured") + +# ============================================================================== +# 3.6. gfx_render (High-Level Rendering) +# Responsibility: Advanced rendering strategies. +# Dependencies: gfx_core, gfx_backend +# ============================================================================== +set(GFX_RENDER_SRC + app/gfx/render/atlas_renderer.cc + app/gfx/render/texture_atlas.cc + app/gfx/render/tilemap.cc + app/gfx/render/background_buffer.cc +) +add_library(yaze_gfx_render STATIC ${GFX_RENDER_SRC}) +configure_gfx_library(yaze_gfx_render) +target_link_libraries(yaze_gfx_render PUBLIC + yaze_gfx_core + yaze_gfx_backend +) +message(STATUS " - GFX Tier: gfx_render configured") + +# ============================================================================== +# 3.7. gfx_debug (Performance & Analysis) +# Responsibility: Profiling, debugging, and optimization tools. +# Dependencies: gfx_util, gfx_render +# ============================================================================== +set(GFX_DEBUG_SRC + app/gfx/debug/performance/performance_dashboard.cc + app/gfx/debug/performance/performance_profiler.cc + app/gfx/debug/graphics_optimizer.cc +) +add_library(yaze_gfx_debug STATIC ${GFX_DEBUG_SRC}) +configure_gfx_library(yaze_gfx_debug) +target_link_libraries(yaze_gfx_debug PUBLIC + yaze_gfx_util + yaze_gfx_render +) +message(STATUS " - GFX Tier: gfx_debug configured") + +# ============================================================================== +# Aggregate INTERFACE Library (yaze_gfx) +# Provides a single link target for external consumers (e.g., yaze_gui). +# ============================================================================== +add_library(yaze_gfx INTERFACE) +target_link_libraries(yaze_gfx INTERFACE + yaze_gfx_types + yaze_gfx_backend + yaze_gfx_resource + yaze_gfx_core + yaze_gfx_util + yaze_gfx_render + yaze_gfx_debug yaze_util yaze_common ${ABSL_TARGETS} - ${SDL_TARGETS} ) # Conditionally add PNG support if(PNG_FOUND) - target_include_directories(yaze_gfx PUBLIC ${PNG_INCLUDE_DIRS}) - target_link_libraries(yaze_gfx PUBLIC ${PNG_LIBRARIES}) + target_include_directories(yaze_gfx INTERFACE ${PNG_INCLUDE_DIRS}) + target_link_libraries(yaze_gfx INTERFACE ${PNG_LIBRARIES}) endif() -set_target_properties(yaze_gfx PROPERTIES - POSITION_INDEPENDENT_CODE ON - ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" - LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" -) - -# Platform-specific compile definitions -if(UNIX AND NOT APPLE) - target_compile_definitions(yaze_gfx PRIVATE linux stricmp=strcasecmp) -elseif(APPLE) - target_compile_definitions(yaze_gfx PRIVATE MACOS) -elseif(WIN32) - target_compile_definitions(yaze_gfx PRIVATE WINDOWS) -endif() - -message(STATUS "✓ yaze_gfx library configured") +message(STATUS "✓ yaze_gfx library configured with tiered architecture") \ No newline at end of file diff --git a/src/app/gfx/atlas_renderer.cc b/src/app/gfx/render/atlas_renderer.cc similarity index 99% rename from src/app/gfx/atlas_renderer.cc rename to src/app/gfx/render/atlas_renderer.cc index aa68fbb0..e6d6abad 100644 --- a/src/app/gfx/atlas_renderer.cc +++ b/src/app/gfx/render/atlas_renderer.cc @@ -1,8 +1,8 @@ -#include "app/gfx/atlas_renderer.h" +#include "app/gfx/render/atlas_renderer.h" #include #include -#include "app/gfx/bpp_format_manager.h" +#include "app/gfx/util/bpp_format_manager.h" namespace yaze { namespace gfx { diff --git a/src/app/gfx/atlas_renderer.h b/src/app/gfx/render/atlas_renderer.h similarity index 97% rename from src/app/gfx/atlas_renderer.h rename to src/app/gfx/render/atlas_renderer.h index b78d2aad..23df871f 100644 --- a/src/app/gfx/atlas_renderer.h +++ b/src/app/gfx/render/atlas_renderer.h @@ -6,9 +6,9 @@ #include #include -#include "app/gfx/bitmap.h" -#include "app/gfx/performance/performance_profiler.h" -#include "app/gfx/bpp_format_manager.h" +#include "app/gfx/core/bitmap.h" +#include "app/gfx/debug/performance/performance_profiler.h" +#include "app/gfx/util/bpp_format_manager.h" namespace yaze { namespace gfx { diff --git a/src/app/gfx/background_buffer.cc b/src/app/gfx/render/background_buffer.cc similarity index 98% rename from src/app/gfx/background_buffer.cc rename to src/app/gfx/render/background_buffer.cc index af70e522..2fa32071 100644 --- a/src/app/gfx/background_buffer.cc +++ b/src/app/gfx/render/background_buffer.cc @@ -1,11 +1,11 @@ -#include "app/gfx/background_buffer.h" +#include "app/gfx/render/background_buffer.h" #include #include #include -#include "app/gfx/bitmap.h" -#include "app/gfx/snes_tile.h" +#include "app/gfx/core/bitmap.h" +#include "app/gfx/types/snes_tile.h" #include "util/log.h" namespace yaze::gfx { diff --git a/src/app/gfx/background_buffer.h b/src/app/gfx/render/background_buffer.h similarity index 93% rename from src/app/gfx/background_buffer.h rename to src/app/gfx/render/background_buffer.h index f08442f1..7147d519 100644 --- a/src/app/gfx/background_buffer.h +++ b/src/app/gfx/render/background_buffer.h @@ -4,8 +4,8 @@ #include #include -#include "app/gfx/bitmap.h" -#include "app/gfx/snes_tile.h" +#include "app/gfx/core/bitmap.h" +#include "app/gfx/types/snes_tile.h" namespace yaze { namespace gfx { diff --git a/src/app/gfx/texture_atlas.cc b/src/app/gfx/render/texture_atlas.cc similarity index 100% rename from src/app/gfx/texture_atlas.cc rename to src/app/gfx/render/texture_atlas.cc diff --git a/src/app/gfx/texture_atlas.h b/src/app/gfx/render/texture_atlas.h similarity index 99% rename from src/app/gfx/texture_atlas.h rename to src/app/gfx/render/texture_atlas.h index bfcc0235..d3dba0ab 100644 --- a/src/app/gfx/texture_atlas.h +++ b/src/app/gfx/render/texture_atlas.h @@ -5,7 +5,7 @@ #include #include -#include "app/gfx/bitmap.h" +#include "app/gfx/core/bitmap.h" #include "absl/status/status.h" namespace yaze { diff --git a/src/app/gfx/tilemap.cc b/src/app/gfx/render/tilemap.cc similarity index 98% rename from src/app/gfx/tilemap.cc rename to src/app/gfx/render/tilemap.cc index 854c679b..2026ab38 100644 --- a/src/app/gfx/tilemap.cc +++ b/src/app/gfx/render/tilemap.cc @@ -1,12 +1,12 @@ -#include "app/gfx/tilemap.h" +#include "app/gfx/render/tilemap.h" #include -#include "app/gfx/arena.h" -#include "app/gfx/atlas_renderer.h" -#include "app/gfx/bitmap.h" -#include "app/gfx/performance/performance_profiler.h" -#include "app/gfx/snes_tile.h" +#include "app/gfx/resource/arena.h" +#include "app/gfx/render/atlas_renderer.h" +#include "app/gfx/core/bitmap.h" +#include "app/gfx/debug/performance/performance_profiler.h" +#include "app/gfx/types/snes_tile.h" namespace yaze { namespace gfx { diff --git a/src/app/gfx/tilemap.h b/src/app/gfx/render/tilemap.h similarity index 98% rename from src/app/gfx/tilemap.h rename to src/app/gfx/render/tilemap.h index 2cff4a3e..64941b1e 100644 --- a/src/app/gfx/tilemap.h +++ b/src/app/gfx/render/tilemap.h @@ -3,8 +3,8 @@ #include "absl/container/flat_hash_map.h" #include "app/gfx/backend/irenderer.h" -#include "app/gfx/bitmap.h" -#include "app/gfx/snes_tile.h" +#include "app/gfx/core/bitmap.h" +#include "app/gfx/types/snes_tile.h" #include #include diff --git a/src/app/gfx/arena.cc b/src/app/gfx/resource/arena.cc similarity index 99% rename from src/app/gfx/arena.cc rename to src/app/gfx/resource/arena.cc index 6e988e2b..2a213404 100644 --- a/src/app/gfx/arena.cc +++ b/src/app/gfx/resource/arena.cc @@ -1,4 +1,4 @@ -#include "app/gfx/arena.h" +#include "app/gfx/resource/arena.h" #include #include diff --git a/src/app/gfx/arena.h b/src/app/gfx/resource/arena.h similarity index 98% rename from src/app/gfx/arena.h rename to src/app/gfx/resource/arena.h index 3124ff54..394f4ed7 100644 --- a/src/app/gfx/arena.h +++ b/src/app/gfx/resource/arena.h @@ -10,8 +10,8 @@ #include #include "util/sdl_deleter.h" -#include "app/gfx/background_buffer.h" -#include "app/gfx/bitmap.h" +#include "app/gfx/render/background_buffer.h" +#include "app/gfx/core/bitmap.h" namespace yaze { namespace gfx { diff --git a/src/app/gfx/memory_pool.cc b/src/app/gfx/resource/memory_pool.cc similarity index 99% rename from src/app/gfx/memory_pool.cc rename to src/app/gfx/resource/memory_pool.cc index 3a210b10..697d44f2 100644 --- a/src/app/gfx/memory_pool.cc +++ b/src/app/gfx/resource/memory_pool.cc @@ -1,4 +1,4 @@ -#include "app/gfx/memory_pool.h" +#include "app/gfx/resource/memory_pool.h" #include #include diff --git a/src/app/gfx/memory_pool.h b/src/app/gfx/resource/memory_pool.h similarity index 100% rename from src/app/gfx/memory_pool.h rename to src/app/gfx/resource/memory_pool.h diff --git a/src/app/gfx/snes_color.cc b/src/app/gfx/types/snes_color.cc similarity index 99% rename from src/app/gfx/snes_color.cc rename to src/app/gfx/types/snes_color.cc index 664303d4..cdb5ff8e 100644 --- a/src/app/gfx/snes_color.cc +++ b/src/app/gfx/types/snes_color.cc @@ -1,5 +1,5 @@ -#include "app/gfx/snes_color.h" +#include "app/gfx/types/snes_color.h" #include #include diff --git a/src/app/gfx/snes_color.h b/src/app/gfx/types/snes_color.h similarity index 100% rename from src/app/gfx/snes_color.h rename to src/app/gfx/types/snes_color.h diff --git a/src/app/gfx/snes_palette.cc b/src/app/gfx/types/snes_palette.cc similarity index 96% rename from src/app/gfx/snes_palette.cc rename to src/app/gfx/types/snes_palette.cc index cad10270..a577f499 100644 --- a/src/app/gfx/snes_palette.cc +++ b/src/app/gfx/types/snes_palette.cc @@ -1,4 +1,4 @@ -#include "snes_palette.h" +#include "app/gfx/types/snes_palette.h" #include @@ -10,7 +10,7 @@ #include "absl/container/flat_hash_map.h" #include "absl/status/status.h" #include "absl/status/statusor.h" -#include "app/gfx/snes_color.h" +#include "app/gfx/types/snes_color.h" #include "imgui/imgui.h" #include "util/macro.h" diff --git a/src/app/gfx/snes_palette.h b/src/app/gfx/types/snes_palette.h similarity index 96% rename from src/app/gfx/snes_palette.h rename to src/app/gfx/types/snes_palette.h index 9e48e6db..f4338b41 100644 --- a/src/app/gfx/snes_palette.h +++ b/src/app/gfx/types/snes_palette.h @@ -11,7 +11,7 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" -#include "app/gfx/snes_color.h" +#include "app/gfx/types/snes_color.h" #include "imgui/imgui.h" #include "snes_color.h" #include "util/macro.h" diff --git a/src/app/gfx/snes_tile.cc b/src/app/gfx/types/snes_tile.cc similarity index 100% rename from src/app/gfx/snes_tile.cc rename to src/app/gfx/types/snes_tile.cc diff --git a/src/app/gfx/snes_tile.h b/src/app/gfx/types/snes_tile.h similarity index 100% rename from src/app/gfx/snes_tile.h rename to src/app/gfx/types/snes_tile.h diff --git a/src/app/gfx/bpp_format_manager.cc b/src/app/gfx/util/bpp_format_manager.cc similarity index 99% rename from src/app/gfx/bpp_format_manager.cc rename to src/app/gfx/util/bpp_format_manager.cc index c2021851..70989c0b 100644 --- a/src/app/gfx/bpp_format_manager.cc +++ b/src/app/gfx/util/bpp_format_manager.cc @@ -1,11 +1,11 @@ -#include "app/gfx/bpp_format_manager.h" +#include "app/gfx/util/bpp_format_manager.h" #include #include #include #include -#include "app/gfx/memory_pool.h" +#include "app/gfx/resource/memory_pool.h" #include "util/log.h" namespace yaze { diff --git a/src/app/gfx/bpp_format_manager.h b/src/app/gfx/util/bpp_format_manager.h similarity index 98% rename from src/app/gfx/bpp_format_manager.h rename to src/app/gfx/util/bpp_format_manager.h index 084269fc..9bc2ccd1 100644 --- a/src/app/gfx/bpp_format_manager.h +++ b/src/app/gfx/util/bpp_format_manager.h @@ -7,9 +7,9 @@ #include #include -#include "app/gfx/bitmap.h" -#include "app/gfx/snes_palette.h" -#include "app/gfx/performance/performance_profiler.h" +#include "app/gfx/core/bitmap.h" +#include "app/gfx/types/snes_palette.h" +#include "app/gfx/debug/performance/performance_profiler.h" namespace yaze { namespace gfx { diff --git a/src/app/gfx/compression.cc b/src/app/gfx/util/compression.cc similarity index 100% rename from src/app/gfx/compression.cc rename to src/app/gfx/util/compression.cc diff --git a/src/app/gfx/compression.h b/src/app/gfx/util/compression.h similarity index 100% rename from src/app/gfx/compression.h rename to src/app/gfx/util/compression.h diff --git a/src/app/gfx/palette_manager.cc b/src/app/gfx/util/palette_manager.cc similarity index 99% rename from src/app/gfx/palette_manager.cc rename to src/app/gfx/util/palette_manager.cc index 34a0154e..0656ce52 100644 --- a/src/app/gfx/palette_manager.cc +++ b/src/app/gfx/util/palette_manager.cc @@ -3,7 +3,7 @@ #include #include "absl/strings/str_format.h" -#include "app/gfx/snes_palette.h" +#include "app/gfx/types/snes_palette.h" #include "util/macro.h" namespace yaze { diff --git a/src/app/gfx/palette_manager.h b/src/app/gfx/util/palette_manager.h similarity index 99% rename from src/app/gfx/palette_manager.h rename to src/app/gfx/util/palette_manager.h index 6d27434d..42cf08b9 100644 --- a/src/app/gfx/palette_manager.h +++ b/src/app/gfx/util/palette_manager.h @@ -11,8 +11,8 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" -#include "app/gfx/snes_color.h" -#include "app/gfx/snes_palette.h" +#include "app/gfx/types/snes_color.h" +#include "app/gfx/types/snes_palette.h" #include "app/rom.h" namespace yaze { diff --git a/src/app/gfx/scad_format.cc b/src/app/gfx/util/scad_format.cc similarity index 99% rename from src/app/gfx/scad_format.cc rename to src/app/gfx/util/scad_format.cc index cb024fb3..e8f3a713 100644 --- a/src/app/gfx/scad_format.cc +++ b/src/app/gfx/util/scad_format.cc @@ -8,7 +8,7 @@ #include #include "absl/status/status.h" -#include "app/gfx/snes_tile.h" +#include "app/gfx/types/snes_tile.h" #include "util/macro.h" namespace yaze { diff --git a/src/app/gfx/scad_format.h b/src/app/gfx/util/scad_format.h similarity index 100% rename from src/app/gfx/scad_format.h rename to src/app/gfx/util/scad_format.h diff --git a/src/app/gui/canvas.cc b/src/app/gui/canvas.cc index 591c7d72..60afeed6 100644 --- a/src/app/gui/canvas.cc +++ b/src/app/gui/canvas.cc @@ -2,9 +2,9 @@ #include #include -#include "app/gfx/bpp_format_manager.h" -#include "app/gfx/bitmap.h" -#include "app/gfx/performance/performance_profiler.h" +#include "app/gfx/util/bpp_format_manager.h" +#include "app/gfx/core/bitmap.h" +#include "app/gfx/debug/performance/performance_profiler.h" #include "app/gui/style.h" #include "canvas/canvas_utils.h" #include "canvas/canvas_automation_api.h" diff --git a/src/app/gui/canvas.h b/src/app/gui/canvas.h index 1b9304f3..b941f5ad 100644 --- a/src/app/gui/canvas.h +++ b/src/app/gui/canvas.h @@ -1,7 +1,7 @@ #ifndef YAZE_GUI_CANVAS_H #define YAZE_GUI_CANVAS_H -#include "app/gfx/tilemap.h" +#include "app/gfx/render/tilemap.h" #define IMGUI_DEFINE_MATH_OPERATORS #include @@ -9,11 +9,11 @@ #include #include -#include "app/gfx/bitmap.h" +#include "app/gfx/core/bitmap.h" #include "app/rom.h" #include "canvas/canvas_utils.h" #include "app/gui/widgets/palette_widget.h" -#include "app/gfx/bpp_format_manager.h" +#include "app/gfx/util/bpp_format_manager.h" #include "canvas/bpp_format_ui.h" #include "app/gui/canvas/canvas_modals.h" #include "app/gui/canvas/canvas_context_menu.h" diff --git a/src/app/gui/canvas/bpp_format_ui.cc b/src/app/gui/canvas/bpp_format_ui.cc index 963cf816..4b04ac6c 100644 --- a/src/app/gui/canvas/bpp_format_ui.cc +++ b/src/app/gui/canvas/bpp_format_ui.cc @@ -3,8 +3,8 @@ #include #include -#include "app/gfx/bpp_format_manager.h" -#include "app/gfx/bitmap.h" +#include "app/gfx/util/bpp_format_manager.h" +#include "app/gfx/core/bitmap.h" #include "app/gui/ui_helpers.h" #include "imgui/imgui.h" diff --git a/src/app/gui/canvas/bpp_format_ui.h b/src/app/gui/canvas/bpp_format_ui.h index c4d8b08b..4a4406eb 100644 --- a/src/app/gui/canvas/bpp_format_ui.h +++ b/src/app/gui/canvas/bpp_format_ui.h @@ -5,9 +5,9 @@ #include #include -#include "app/gfx/bpp_format_manager.h" -#include "app/gfx/bitmap.h" -#include "app/gfx/snes_palette.h" +#include "app/gfx/util/bpp_format_manager.h" +#include "app/gfx/core/bitmap.h" +#include "app/gfx/types/snes_palette.h" namespace yaze { namespace gui { diff --git a/src/app/gui/canvas/canvas_context_menu.cc b/src/app/gui/canvas/canvas_context_menu.cc index 3fefb120..58540be3 100644 --- a/src/app/gui/canvas/canvas_context_menu.cc +++ b/src/app/gui/canvas/canvas_context_menu.cc @@ -1,8 +1,8 @@ #include "canvas_context_menu.h" -#include "app/gfx/arena.h" -#include "app/gfx/performance/performance_profiler.h" -#include "app/gfx/performance/performance_dashboard.h" +#include "app/gfx/resource/arena.h" +#include "app/gfx/debug/performance/performance_profiler.h" +#include "app/gfx/debug/performance/performance_dashboard.h" #include "app/gui/widgets/palette_widget.h" #include "app/gui/icons.h" #include "app/gui/color.h" diff --git a/src/app/gui/canvas/canvas_context_menu.h b/src/app/gui/canvas/canvas_context_menu.h index 4a7edef8..523bb1d6 100644 --- a/src/app/gui/canvas/canvas_context_menu.h +++ b/src/app/gui/canvas/canvas_context_menu.h @@ -6,8 +6,8 @@ #include #include -#include "app/gfx/bitmap.h" -#include "app/gfx/snes_palette.h" +#include "app/gfx/core/bitmap.h" +#include "app/gfx/types/snes_palette.h" #include "app/gui/icons.h" #include "app/gui/canvas/canvas_modals.h" #include "canvas_usage_tracker.h" diff --git a/src/app/gui/canvas/canvas_interaction_handler.h b/src/app/gui/canvas/canvas_interaction_handler.h index 138b5378..584d19d3 100644 --- a/src/app/gui/canvas/canvas_interaction_handler.h +++ b/src/app/gui/canvas/canvas_interaction_handler.h @@ -2,8 +2,8 @@ #define YAZE_APP_GUI_CANVAS_CANVAS_INTERACTION_HANDLER_H #include -#include "app/gfx/bitmap.h" -#include "app/gfx/tilemap.h" +#include "app/gfx/core/bitmap.h" +#include "app/gfx/render/tilemap.h" #include "imgui/imgui.h" namespace yaze { diff --git a/src/app/gui/canvas/canvas_modals.cc b/src/app/gui/canvas/canvas_modals.cc index 2387c09c..6191d0e5 100644 --- a/src/app/gui/canvas/canvas_modals.cc +++ b/src/app/gui/canvas/canvas_modals.cc @@ -4,8 +4,8 @@ #include #include -#include "app/gfx/performance/performance_profiler.h" -#include "app/gfx/performance/performance_dashboard.h" +#include "app/gfx/debug/performance/performance_profiler.h" +#include "app/gfx/debug/performance/performance_dashboard.h" #include "app/gui/widgets/palette_widget.h" #include "app/gui/canvas/bpp_format_ui.h" #include "app/gui/icons.h" diff --git a/src/app/gui/canvas/canvas_modals.h b/src/app/gui/canvas/canvas_modals.h index affd0b6b..c5ac15c6 100644 --- a/src/app/gui/canvas/canvas_modals.h +++ b/src/app/gui/canvas/canvas_modals.h @@ -4,9 +4,9 @@ #include #include #include -#include "app/gfx/bitmap.h" -#include "app/gfx/snes_palette.h" -#include "app/gfx/bpp_format_manager.h" +#include "app/gfx/core/bitmap.h" +#include "app/gfx/types/snes_palette.h" +#include "app/gfx/util/bpp_format_manager.h" #include "app/gui/canvas/canvas_utils.h" #include "imgui/imgui.h" diff --git a/src/app/gui/canvas/canvas_performance_integration.cc b/src/app/gui/canvas/canvas_performance_integration.cc index f9840347..c76aee11 100644 --- a/src/app/gui/canvas/canvas_performance_integration.cc +++ b/src/app/gui/canvas/canvas_performance_integration.cc @@ -5,8 +5,8 @@ #include #include -#include "app/gfx/performance/performance_profiler.h" -#include "app/gfx/performance/performance_dashboard.h" +#include "app/gfx/debug/performance/performance_profiler.h" +#include "app/gfx/debug/performance/performance_dashboard.h" #include "util/log.h" #include "imgui/imgui.h" diff --git a/src/app/gui/canvas/canvas_performance_integration.h b/src/app/gui/canvas/canvas_performance_integration.h index 905f5f17..2aa1b876 100644 --- a/src/app/gui/canvas/canvas_performance_integration.h +++ b/src/app/gui/canvas/canvas_performance_integration.h @@ -6,8 +6,8 @@ #include #include #include -#include "app/gfx/performance/performance_profiler.h" -#include "app/gfx/performance/performance_dashboard.h" +#include "app/gfx/debug/performance/performance_profiler.h" +#include "app/gfx/debug/performance/performance_dashboard.h" #include "canvas_usage_tracker.h" #include "imgui/imgui.h" diff --git a/src/app/gui/canvas/canvas_utils.cc b/src/app/gui/canvas/canvas_utils.cc index db2793db..9459dca8 100644 --- a/src/app/gui/canvas/canvas_utils.cc +++ b/src/app/gui/canvas/canvas_utils.cc @@ -1,8 +1,8 @@ #include "canvas_utils.h" #include -#include "app/gfx/arena.h" -#include "app/gfx/snes_palette.h" +#include "app/gfx/resource/arena.h" +#include "app/gfx/types/snes_palette.h" #include "util/log.h" namespace yaze { diff --git a/src/app/gui/canvas/canvas_utils.h b/src/app/gui/canvas/canvas_utils.h index 3a048726..73aa8e35 100644 --- a/src/app/gui/canvas/canvas_utils.h +++ b/src/app/gui/canvas/canvas_utils.h @@ -3,7 +3,7 @@ #include #include -#include "app/gfx/snes_palette.h" +#include "app/gfx/types/snes_palette.h" #include "app/rom.h" #include "imgui/imgui.h" diff --git a/src/app/gui/color.cc b/src/app/gui/color.cc index c65c65f4..c8ed62ec 100644 --- a/src/app/gui/color.cc +++ b/src/app/gui/color.cc @@ -1,7 +1,7 @@ #include "color.h" -#include "app/gfx/snes_color.h" -#include "app/gfx/snes_palette.h" +#include "app/gfx/types/snes_color.h" +#include "app/gfx/types/snes_palette.h" #include "imgui/imgui.h" namespace yaze { diff --git a/src/app/gui/color.h b/src/app/gui/color.h index db2a2837..bc542ba7 100644 --- a/src/app/gui/color.h +++ b/src/app/gui/color.h @@ -5,7 +5,7 @@ #include #include "absl/status/status.h" -#include "app/gfx/snes_palette.h" +#include "app/gfx/types/snes_palette.h" #include "imgui/imgui.h" namespace yaze { diff --git a/src/app/gui/feature_flags_menu.h b/src/app/gui/feature_flags_menu.h index 0ae14f1a..d2359046 100644 --- a/src/app/gui/feature_flags_menu.h +++ b/src/app/gui/feature_flags_menu.h @@ -59,6 +59,8 @@ struct FlagsMenu { Checkbox("Enable Console Logging", &core::FeatureFlags::get().kLogToConsole); Checkbox("Enable Performance Monitoring", &core::FeatureFlags::get().kEnablePerformanceMonitoring); + Checkbox("Enable Tiered GFX Architecture", + &core::FeatureFlags::get().kEnableTieredGfxArchitecture); // REMOVED: "Log Instructions" - DisassemblyViewer is always active // Use the viewer's UI controls to enable/disable recording if needed Checkbox("Use Native File Dialog (NFD)", diff --git a/src/app/gui/input.cc b/src/app/gui/input.cc index 78dc51f2..8ff6a7a1 100644 --- a/src/app/gui/input.cc +++ b/src/app/gui/input.cc @@ -5,7 +5,7 @@ #include #include "absl/strings/string_view.h" -#include "app/gfx/snes_tile.h" +#include "app/gfx/types/snes_tile.h" #include "imgui/imgui.h" #include "imgui/imgui_internal.h" #include "imgui_memory_editor.h" diff --git a/src/app/gui/input.h b/src/app/gui/input.h index 4dc74c20..d4818ae1 100644 --- a/src/app/gui/input.h +++ b/src/app/gui/input.h @@ -12,7 +12,7 @@ #include #include "absl/strings/string_view.h" -#include "app/gfx/snes_tile.h" +#include "app/gfx/types/snes_tile.h" #include "imgui/imgui.h" namespace yaze { diff --git a/src/app/gui/modules/asset_browser.h b/src/app/gui/modules/asset_browser.h index 432e896d..79553b9c 100644 --- a/src/app/gui/modules/asset_browser.h +++ b/src/app/gui/modules/asset_browser.h @@ -4,7 +4,7 @@ #include #include -#include "app/gfx/bitmap.h" +#include "app/gfx/core/bitmap.h" #include "app/rom.h" #include "imgui/imgui.h" diff --git a/src/app/gui/style.h b/src/app/gui/style.h index 0e174fd0..f502c746 100644 --- a/src/app/gui/style.h +++ b/src/app/gui/style.h @@ -6,7 +6,7 @@ #include #include "absl/strings/string_view.h" -#include "app/gfx/bitmap.h" +#include "app/gfx/core/bitmap.h" #include "app/gui/color.h" #include "app/gui/modules/text_editor.h" #include "imgui/imgui.h" diff --git a/src/app/gui/themed_widgets.cc b/src/app/gui/themed_widgets.cc index 9ed10868..f81b8563 100644 --- a/src/app/gui/themed_widgets.cc +++ b/src/app/gui/themed_widgets.cc @@ -1,7 +1,7 @@ #include "app/gui/themed_widgets.h" #include "app/gui/color.h" -#include "app/gfx/snes_color.h" +#include "app/gfx/types/snes_color.h" namespace yaze { namespace gui { diff --git a/src/app/gui/widgets/palette_editor_widget.h b/src/app/gui/widgets/palette_editor_widget.h index cf733302..bb87799b 100644 --- a/src/app/gui/widgets/palette_editor_widget.h +++ b/src/app/gui/widgets/palette_editor_widget.h @@ -4,7 +4,7 @@ #include #include -#include "app/gfx/snes_palette.h" +#include "app/gfx/types/snes_palette.h" #include "app/rom.h" #include "imgui/imgui.h" diff --git a/src/app/gui/widgets/palette_widget.cc b/src/app/gui/widgets/palette_widget.cc index 16d99361..d297027b 100644 --- a/src/app/gui/widgets/palette_widget.cc +++ b/src/app/gui/widgets/palette_widget.cc @@ -2,7 +2,7 @@ #include #include -#include "app/gfx/arena.h" +#include "app/gfx/resource/arena.h" #include "app/gui/color.h" #include "util/log.h" diff --git a/src/app/gui/widgets/palette_widget.h b/src/app/gui/widgets/palette_widget.h index 23a2bd12..4fbbfdca 100644 --- a/src/app/gui/widgets/palette_widget.h +++ b/src/app/gui/widgets/palette_widget.h @@ -3,8 +3,8 @@ #include #include -#include "app/gfx/snes_palette.h" -#include "app/gfx/bitmap.h" +#include "app/gfx/types/snes_palette.h" +#include "app/gfx/core/bitmap.h" #include "app/rom.h" #include "imgui/imgui.h" diff --git a/src/app/gui/widgets/tile_selector_widget.h b/src/app/gui/widgets/tile_selector_widget.h index 965270a4..e5be59c8 100644 --- a/src/app/gui/widgets/tile_selector_widget.h +++ b/src/app/gui/widgets/tile_selector_widget.h @@ -3,7 +3,7 @@ #include -#include "app/gfx/bitmap.h" +#include "app/gfx/core/bitmap.h" #include "app/gui/canvas.h" #include "imgui/imgui.h" diff --git a/src/app/rom.cc b/src/app/rom.cc index ab7f891e..2ff4eb28 100644 --- a/src/app/rom.cc +++ b/src/app/rom.cc @@ -18,10 +18,10 @@ #include "absl/strings/string_view.h" #include "app/core/features.h" #include "app/core/window.h" -#include "app/gfx/compression.h" -#include "app/gfx/snes_color.h" -#include "app/gfx/snes_palette.h" -#include "app/gfx/snes_tile.h" +#include "app/gfx/util/compression.h" +#include "app/gfx/types/snes_color.h" +#include "app/gfx/types/snes_palette.h" +#include "app/gfx/types/snes_tile.h" #include "app/snes.h" #include "util/log.h" #include "util/hex.h" diff --git a/src/app/rom.h b/src/app/rom.h index 093f8798..c5a2dfc8 100644 --- a/src/app/rom.h +++ b/src/app/rom.h @@ -18,9 +18,9 @@ #include "absl/strings/str_format.h" #include "absl/strings/string_view.h" #include "app/core/project.h" -#include "app/gfx/bitmap.h" -#include "app/gfx/snes_palette.h" -#include "app/gfx/snes_tile.h" +#include "app/gfx/core/bitmap.h" +#include "app/gfx/types/snes_palette.h" +#include "app/gfx/types/snes_tile.h" #include "util/macro.h" namespace yaze { diff --git a/src/app/test/test_manager.cc b/src/app/test/test_manager.cc index b54f92b3..934b6354 100644 --- a/src/app/test/test_manager.cc +++ b/src/app/test/test_manager.cc @@ -17,7 +17,7 @@ #include "app/gui/widgets/widget_state_capture.h" #include "app/core/features.h" #include "util/file_util.h" -#include "app/gfx/arena.h" +#include "app/gfx/resource/arena.h" #include "app/gui/icons.h" #if defined(YAZE_ENABLE_IMGUI_TEST_ENGINE) && YAZE_ENABLE_IMGUI_TEST_ENGINE #include "imgui.h" diff --git a/src/app/transaction.h b/src/app/transaction.h index a1f5a927..ea452e5a 100644 --- a/src/app/transaction.h +++ b/src/app/transaction.h @@ -13,7 +13,7 @@ #include #include "absl/status/status.h" -#include "app/gfx/snes_color.h" +#include "app/gfx/types/snes_color.h" #include "app/rom.h" namespace yaze { diff --git a/src/cli/service/planning/tile16_proposal_generator.h b/src/cli/service/planning/tile16_proposal_generator.h index 3602951d..2617a72a 100644 --- a/src/cli/service/planning/tile16_proposal_generator.h +++ b/src/cli/service/planning/tile16_proposal_generator.h @@ -7,7 +7,7 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" -#include "app/gfx/bitmap.h" +#include "app/gfx/core/bitmap.h" #include "app/rom.h" namespace yaze { diff --git a/src/zelda3/dungeon/dungeon_editor_system.h b/src/zelda3/dungeon/dungeon_editor_system.h index 87a7bc0b..334cd848 100644 --- a/src/zelda3/dungeon/dungeon_editor_system.h +++ b/src/zelda3/dungeon/dungeon_editor_system.h @@ -10,8 +10,8 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" #include "app/core/window.h" -#include "app/gfx/bitmap.h" -#include "app/gfx/snes_palette.h" +#include "app/gfx/core/bitmap.h" +#include "app/gfx/types/snes_palette.h" #include "app/rom.h" #include "zelda3/dungeon/room_object.h" #include "zelda3/dungeon/room.h" diff --git a/src/zelda3/dungeon/dungeon_object_editor.cc b/src/zelda3/dungeon/dungeon_object_editor.cc index 904b3576..cb9c7237 100644 --- a/src/zelda3/dungeon/dungeon_object_editor.cc +++ b/src/zelda3/dungeon/dungeon_object_editor.cc @@ -6,8 +6,8 @@ #include "absl/strings/str_format.h" #include "app/core/window.h" -#include "app/gfx/arena.h" -#include "app/gfx/snes_palette.h" +#include "app/gfx/resource/arena.h" +#include "app/gfx/types/snes_palette.h" #include "imgui/imgui.h" namespace yaze { diff --git a/src/zelda3/dungeon/dungeon_object_editor.h b/src/zelda3/dungeon/dungeon_object_editor.h index 28d2da22..1e08e18d 100644 --- a/src/zelda3/dungeon/dungeon_object_editor.h +++ b/src/zelda3/dungeon/dungeon_object_editor.h @@ -10,8 +10,8 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" #include "app/core/window.h" -#include "app/gfx/bitmap.h" -#include "app/gfx/snes_palette.h" +#include "app/gfx/core/bitmap.h" +#include "app/gfx/types/snes_palette.h" #include "app/rom.h" #include "zelda3/dungeon/room.h" #include "zelda3/dungeon/room_object.h" diff --git a/src/zelda3/dungeon/object_drawer.cc b/src/zelda3/dungeon/object_drawer.cc index 01a0b5aa..26732db6 100644 --- a/src/zelda3/dungeon/object_drawer.cc +++ b/src/zelda3/dungeon/object_drawer.cc @@ -3,7 +3,7 @@ #include #include "absl/strings/str_format.h" -#include "app/gfx/snes_tile.h" +#include "app/gfx/types/snes_tile.h" #include "util/log.h" namespace yaze { diff --git a/src/zelda3/dungeon/object_drawer.h b/src/zelda3/dungeon/object_drawer.h index aca6ba8e..1702f4d9 100644 --- a/src/zelda3/dungeon/object_drawer.h +++ b/src/zelda3/dungeon/object_drawer.h @@ -6,9 +6,9 @@ #include #include "absl/status/status.h" -#include "app/gfx/background_buffer.h" -#include "app/gfx/snes_tile.h" -#include "app/gfx/snes_palette.h" +#include "app/gfx/render/background_buffer.h" +#include "app/gfx/types/snes_tile.h" +#include "app/gfx/types/snes_palette.h" #include "app/rom.h" #include "zelda3/dungeon/room_object.h" diff --git a/src/zelda3/dungeon/object_parser.h b/src/zelda3/dungeon/object_parser.h index 7259f1ec..2002e780 100644 --- a/src/zelda3/dungeon/object_parser.h +++ b/src/zelda3/dungeon/object_parser.h @@ -6,7 +6,7 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" -#include "app/gfx/snes_tile.h" +#include "app/gfx/types/snes_tile.h" #include "app/rom.h" namespace yaze { diff --git a/src/zelda3/dungeon/room.cc b/src/zelda3/dungeon/room.cc index f9990ddb..dd179a90 100644 --- a/src/zelda3/dungeon/room.cc +++ b/src/zelda3/dungeon/room.cc @@ -6,8 +6,8 @@ #include #include "absl/strings/str_cat.h" -#include "app/gfx/arena.h" -#include "app/gfx/snes_palette.h" +#include "app/gfx/resource/arena.h" +#include "app/gfx/types/snes_palette.h" #include "app/rom.h" #include "app/snes.h" #include "zelda3/dungeon/object_drawer.h" diff --git a/src/zelda3/dungeon/room.h b/src/zelda3/dungeon/room.h index 5e044e0d..4e295ec4 100644 --- a/src/zelda3/dungeon/room.h +++ b/src/zelda3/dungeon/room.h @@ -8,7 +8,7 @@ #include #include "app/rom.h" -#include "app/gfx/background_buffer.h" +#include "app/gfx/render/background_buffer.h" #include "zelda3/dungeon/dungeon_rom_addresses.h" #include "zelda3/dungeon/room_object.h" #include "zelda3/dungeon/room_layout.h" diff --git a/src/zelda3/dungeon/room_object.h b/src/zelda3/dungeon/room_object.h index f7c2af18..012f5657 100644 --- a/src/zelda3/dungeon/room_object.h +++ b/src/zelda3/dungeon/room_object.h @@ -5,7 +5,7 @@ #include #include -#include "app/gfx/snes_tile.h" +#include "app/gfx/types/snes_tile.h" #include "app/rom.h" #include "zelda3/dungeon/object_parser.h" diff --git a/src/zelda3/overworld/overworld.cc b/src/zelda3/overworld/overworld.cc index d9dbd823..0b75ecad 100644 --- a/src/zelda3/overworld/overworld.cc +++ b/src/zelda3/overworld/overworld.cc @@ -10,9 +10,9 @@ #include "absl/status/status.h" #include "app/core/features.h" -#include "app/gfx/performance/performance_profiler.h" -#include "app/gfx/compression.h" -#include "app/gfx/snes_tile.h" +#include "app/gfx/debug/performance/performance_profiler.h" +#include "app/gfx/util/compression.h" +#include "app/gfx/types/snes_tile.h" #include "app/rom.h" #include "app/snes.h" #include "zelda3/overworld/overworld_entrance.h" diff --git a/src/zelda3/overworld/overworld.h b/src/zelda3/overworld/overworld.h index 6eb72aac..328daa38 100644 --- a/src/zelda3/overworld/overworld.h +++ b/src/zelda3/overworld/overworld.h @@ -6,7 +6,7 @@ #include #include "absl/status/status.h" -#include "app/gfx/snes_tile.h" +#include "app/gfx/types/snes_tile.h" #include "app/rom.h" #include "zelda3/overworld/overworld_entrance.h" #include "zelda3/overworld/overworld_exit.h" diff --git a/src/zelda3/overworld/overworld_map.cc b/src/zelda3/overworld/overworld_map.cc index 378027d4..2173171e 100644 --- a/src/zelda3/overworld/overworld_map.cc +++ b/src/zelda3/overworld/overworld_map.cc @@ -6,8 +6,8 @@ #include #include "app/core/features.h" -#include "app/gfx/snes_color.h" -#include "app/gfx/snes_tile.h" +#include "app/gfx/types/snes_color.h" +#include "app/gfx/types/snes_tile.h" #include "app/rom.h" #include "zelda3/overworld/overworld.h" diff --git a/src/zelda3/overworld/overworld_map.h b/src/zelda3/overworld/overworld_map.h index e2a4f4da..d1ed448f 100644 --- a/src/zelda3/overworld/overworld_map.h +++ b/src/zelda3/overworld/overworld_map.h @@ -7,8 +7,8 @@ #include #include "absl/status/status.h" -#include "app/gfx/snes_palette.h" -#include "app/gfx/snes_tile.h" +#include "app/gfx/types/snes_palette.h" +#include "app/gfx/types/snes_tile.h" #include "app/rom.h" namespace yaze { diff --git a/src/zelda3/screen/dungeon_map.cc b/src/zelda3/screen/dungeon_map.cc index 98a1db2a..450a1cbc 100644 --- a/src/zelda3/screen/dungeon_map.cc +++ b/src/zelda3/screen/dungeon_map.cc @@ -5,9 +5,9 @@ #include "util/file_util.h" #include "app/core/window.h" -#include "app/gfx/bitmap.h" -#include "app/gfx/snes_tile.h" -#include "app/gfx/tilemap.h" +#include "app/gfx/core/bitmap.h" +#include "app/gfx/types/snes_tile.h" +#include "app/gfx/render/tilemap.h" #include "app/gfx/backend/irenderer.h" #include "app/snes.h" #include "util/hex.h" diff --git a/src/zelda3/screen/dungeon_map.h b/src/zelda3/screen/dungeon_map.h index eac268d2..2900aabe 100644 --- a/src/zelda3/screen/dungeon_map.h +++ b/src/zelda3/screen/dungeon_map.h @@ -5,8 +5,8 @@ #include #include "absl/status/status.h" -#include "app/gfx/bitmap.h" -#include "app/gfx/tilemap.h" +#include "app/gfx/core/bitmap.h" +#include "app/gfx/render/tilemap.h" #include "app/rom.h" namespace yaze::zelda3 { diff --git a/src/zelda3/screen/inventory.cc b/src/zelda3/screen/inventory.cc index ce7ae39b..96aebc1f 100644 --- a/src/zelda3/screen/inventory.cc +++ b/src/zelda3/screen/inventory.cc @@ -2,8 +2,8 @@ #include "app/gfx/backend/irenderer.h" #include "app/core/window.h" -#include "app/gfx/bitmap.h" -#include "app/gfx/snes_tile.h" +#include "app/gfx/core/bitmap.h" +#include "app/gfx/types/snes_tile.h" #include "app/rom.h" namespace yaze { diff --git a/src/zelda3/screen/inventory.h b/src/zelda3/screen/inventory.h index b0fce3c2..c78260d6 100644 --- a/src/zelda3/screen/inventory.h +++ b/src/zelda3/screen/inventory.h @@ -1,9 +1,9 @@ #ifndef YAZE_APP_ZELDA3_INVENTORY_H #define YAZE_APP_ZELDA3_INVENTORY_H -#include "app/gfx/bitmap.h" -#include "app/gfx/snes_palette.h" -#include "app/gfx/snes_tile.h" +#include "app/gfx/core/bitmap.h" +#include "app/gfx/types/snes_palette.h" +#include "app/gfx/types/snes_tile.h" #include "app/gui/canvas.h" #include "app/rom.h" diff --git a/src/zelda3/screen/title_screen.cc b/src/zelda3/screen/title_screen.cc index 6da96d07..69b247a0 100644 --- a/src/zelda3/screen/title_screen.cc +++ b/src/zelda3/screen/title_screen.cc @@ -2,7 +2,7 @@ #include -#include "app/gfx/bitmap.h" +#include "app/gfx/core/bitmap.h" #include "app/rom.h" #include "app/snes.h" diff --git a/src/zelda3/screen/title_screen.h b/src/zelda3/screen/title_screen.h index ad753e96..feee5ab1 100644 --- a/src/zelda3/screen/title_screen.h +++ b/src/zelda3/screen/title_screen.h @@ -1,8 +1,8 @@ #ifndef YAZE_APP_ZELDA3_SCREEN_H #define YAZE_APP_ZELDA3_SCREEN_H -#include "app/gfx/bitmap.h" -#include "app/gfx/snes_tile.h" +#include "app/gfx/core/bitmap.h" +#include "app/gfx/types/snes_tile.h" #include "app/rom.h" namespace yaze { diff --git a/test/benchmarks/gfx_optimization_benchmarks.cc b/test/benchmarks/gfx_optimization_benchmarks.cc index 944f4b41..bf4f213e 100644 --- a/test/benchmarks/gfx_optimization_benchmarks.cc +++ b/test/benchmarks/gfx_optimization_benchmarks.cc @@ -3,12 +3,12 @@ #include #include -#include "app/gfx/bitmap.h" -#include "app/gfx/arena.h" -#include "app/gfx/memory_pool.h" -#include "app/gfx/atlas_renderer.h" -#include "app/gfx/performance/performance_profiler.h" -#include "app/gfx/performance/performance_dashboard.h" +#include "app/gfx/core/bitmap.h" +#include "app/gfx/resource/arena.h" +#include "app/gfx/resource/memory_pool.h" +#include "app/gfx/render/atlas_renderer.h" +#include "app/gfx/debug/performance/performance_profiler.h" +#include "app/gfx/debug/performance/performance_dashboard.h" namespace yaze { namespace gfx { diff --git a/test/integration/editor/tile16_editor_test.cc b/test/integration/editor/tile16_editor_test.cc index f7294413..8e3e810a 100644 --- a/test/integration/editor/tile16_editor_test.cc +++ b/test/integration/editor/tile16_editor_test.cc @@ -6,10 +6,10 @@ #include #include "app/rom.h" -#include "app/gfx/arena.h" +#include "app/gfx/resource/arena.h" #include "app/gfx/backend/sdl2_renderer.h" -#include "app/gfx/bitmap.h" -#include "app/gfx/tilemap.h" +#include "app/gfx/core/bitmap.h" +#include "app/gfx/render/tilemap.h" #include "zelda3/overworld/overworld.h" #include "app/core/window.h" diff --git a/test/integration/palette_manager_test.cc b/test/integration/palette_manager_test.cc index 1c044f2d..0e0eaea8 100644 --- a/test/integration/palette_manager_test.cc +++ b/test/integration/palette_manager_test.cc @@ -1,9 +1,9 @@ -#include "app/gfx/palette_manager.h" +#include "app/gfx/util/palette_manager.h" #include -#include "app/gfx/snes_color.h" -#include "app/gfx/snes_palette.h" +#include "app/gfx/types/snes_color.h" +#include "app/gfx/types/snes_palette.h" #include "app/rom.h" namespace yaze { diff --git a/test/integration/zelda3/dungeon_object_rendering_tests.cc b/test/integration/zelda3/dungeon_object_rendering_tests.cc index c5d8d8a3..a8738d0f 100644 --- a/test/integration/zelda3/dungeon_object_rendering_tests.cc +++ b/test/integration/zelda3/dungeon_object_rendering_tests.cc @@ -16,8 +16,8 @@ #include #include "app/rom.h" -#include "app/gfx/snes_palette.h" -#include "app/gfx/background_buffer.h" +#include "app/gfx/types/snes_palette.h" +#include "app/gfx/render/background_buffer.h" #include "testing.h" #include "test_utils.h" diff --git a/test/unit/gfx/compression_test.cc b/test/unit/gfx/compression_test.cc index 44e9b652..dfa2d640 100644 --- a/test/unit/gfx/compression_test.cc +++ b/test/unit/gfx/compression_test.cc @@ -1,4 +1,4 @@ -#include "app/gfx/compression.h" +#include "app/gfx/util/compression.h" #include #include diff --git a/test/unit/gfx/snes_palette_test.cc b/test/unit/gfx/snes_palette_test.cc index 01caab28..4be1f64e 100644 --- a/test/unit/gfx/snes_palette_test.cc +++ b/test/unit/gfx/snes_palette_test.cc @@ -1,9 +1,9 @@ -#include "app/gfx/snes_palette.h" +#include "app/gfx/types/snes_palette.h" #include #include -#include "app/gfx/snes_color.h" +#include "app/gfx/types/snes_color.h" namespace yaze { namespace test { diff --git a/test/unit/gfx/snes_tile_test.cc b/test/unit/gfx/snes_tile_test.cc index f18fab42..38fc26c4 100644 --- a/test/unit/gfx/snes_tile_test.cc +++ b/test/unit/gfx/snes_tile_test.cc @@ -1,4 +1,4 @@ -#include "app/gfx/snes_tile.h" +#include "app/gfx/types/snes_tile.h" #include #include diff --git a/test/unit/gui/tile_selector_widget_test.cc b/test/unit/gui/tile_selector_widget_test.cc index 760edb48..26038e5e 100644 --- a/test/unit/gui/tile_selector_widget_test.cc +++ b/test/unit/gui/tile_selector_widget_test.cc @@ -3,7 +3,7 @@ #include #include -#include "app/gfx/bitmap.h" +#include "app/gfx/core/bitmap.h" #include "app/gui/canvas.h" #include "testing.h" diff --git a/test/unit/snes_color_test.cc b/test/unit/snes_color_test.cc index 8dd3d16b..d06445eb 100644 --- a/test/unit/snes_color_test.cc +++ b/test/unit/snes_color_test.cc @@ -1,4 +1,4 @@ -#include "app/gfx/snes_color.h" +#include "app/gfx/types/snes_color.h" #include