Commit Graph

292 Commits

Author SHA1 Message Date
scawful
12dc71c444 feat: Enhance PerformanceProfiler to handle shutdown state and prevent crashes during destruction 2025-10-01 19:50:44 -04:00
scawful
ba50d89e7d Update z3ed CLI tool and project build configuration
- Updated `.clang-tidy` and `.clangd` configurations for improved code quality checks and diagnostics.
- Added new submodules for JSON and HTTP libraries to support future features.
- Refined README and documentation files to standardize naming conventions and improve clarity.
- Introduced a new command palette in the CLI for easier command access and execution.
- Implemented various CLI handlers for managing ROM, sprites, palettes, and dungeon functionalities.
- Enhanced the TUI components for better user interaction and command execution.
- Added AI service integration for generating commands based on user prompts, expanding the CLI's capabilities.
2025-10-01 08:57:10 -04:00
scawful
9e0f614ce8 Add BPP format management and optimization features
- Introduced BPPFormatManager for handling various bitmap formats (2BPP, 3BPP, 4BPP, 8BPP) with conversion capabilities.
- Enhanced AtlasRenderer to support bitmap addition with BPP format optimization and added methods for optimized rendering.
- Implemented GraphicsOptimizer for analyzing and optimizing graphics sheets based on BPP formats, including memory and performance considerations.
- Developed BppFormatUI for user interface interactions related to BPP format selection and conversion previews.
- Integrated BPP format management into the canvas system, allowing for format selection and conversion within the GUI.
- Updated CMake configuration to include new source files related to BPP management and optimization.
2025-09-29 21:21:49 -04:00
scawful
bac03ee08e Refactor Performance Monitoring System for Unified Functionality
- Merged the old PerformanceMonitor interface into gfx::PerformanceProfiler, providing a unified performance monitoring system.
- Updated header files to maintain backward compatibility with aliases for PerformanceMonitor and ScopedTimer.
- Removed legacy timer methods and integrated memory pool for efficient data handling in performance profiling.
- Enhanced PerformanceDashboard to utilize the new profiler, including controls for enabling monitoring and clearing data.
- Improved performance reporting with detailed statistics and memory usage insights.
2025-09-29 19:21:31 -04:00
scawful
7a14612f0e Refactor Tile16Editor and Bitmap palette handling for improved accuracy and stability
- Updated Tile16Editor to utilize a fixed height for the scrollable child window, enhancing user interface consistency.
- Simplified pixel data handling by removing unnecessary remapping for the display tile, ensuring accurate palette representation.
- Enhanced Bitmap palette application logic to directly use the specified index for 8-color palettes, preventing errors in color mapping.
- Improved error handling for palette length validation and ensured the complete palette is retained for compatibility with other editors.
2025-09-29 15:32:37 -04:00
scawful
690f77eea0 Implement critical fixes for tile cache issues and optimize resource management
- Updated Tile16Editor to regenerate blockset atlas directly from ROM data, bypassing problematic tile cache.
- Enhanced clipboard functionality to extract tile data directly from the atlas, improving reliability.
- Refactored Arena class shutdown process to ensure safe cleanup of resources, preventing double-free issues.
- Optimized Canvas rendering logic to utilize pre-calculated values for improved performance with large selections.
2025-09-29 09:42:06 -04:00
scawful
4bf4a13dae Enhance graphics editor performance with batch processing and profiling
- Integrated performance profiling using ScopedTimer in GraphicsEditor and ScreenEditor for better timing insights.
- Implemented batch texture updates in GraphicsEditor and ScreenEditor to reduce individual texture update calls, improving rendering efficiency.
- Enhanced tile rendering in ScreenEditor with pre-allocated vectors for batch operations, optimizing drawing performance.
- Added safety checks and validation in various components to prevent crashes and ensure data integrity during rendering operations.
- Updated Bitmap and Arena classes to support improved texture management and synchronization, enhancing overall graphics performance.
2025-09-29 09:04:10 -04:00
scawful
a49c31c84b Implement atlas rendering features and performance enhancements
- Added RenderBitmap and GetUVCoordinates methods to AtlasRenderer for improved bitmap rendering capabilities.
- Introduced RenderTilesBatch function in Tilemap for batch rendering of tiles using atlas, reducing draw calls and enhancing performance.
- Updated Clear method in AtlasRenderer to properly clean up SDL textures.
- Enhanced performance monitoring in PerformanceDashboard to include atlas renderer statistics.
- Added unit tests to benchmark atlas rendering performance, confirming efficiency improvements over individual rendering.
2025-09-28 23:40:04 -04:00
scawful
2d10437888 Remove clipboard functionality and enhance performance monitoring features
- Deleted clipboard-related files (clipboard.cc, clipboard.h, clipboard.mm) to streamline the codebase.
- Added a performance dashboard in the EditorManager to monitor performance metrics and improve user experience.
- Integrated performance monitoring capabilities across various editors, allowing for detailed timing of critical operations.
- Updated the graphics system with batch processing for texture updates, significantly improving rendering performance.
- Introduced a memory pool allocator for efficient memory management during graphics operations.
2025-09-28 23:30:32 -04:00
scawful
ce31906c93 Enhance performance profiling and tile caching mechanisms
- Introduced a new PerformanceProfiler class for detailed timing and performance measurement across graphics operations.
- Implemented a smart tile cache with LRU eviction in the TileCache structure to optimize memory usage and improve tile rendering efficiency.
- Updated various graphics components to utilize the new caching system, reducing redundant texture updates and enhancing overall performance.
- Added dirty region tracking in Bitmap for efficient texture updates, minimizing the area that needs to be refreshed during rendering.
- Enhanced existing methods to leverage performance monitoring, providing insights into operation durations and potential bottlenecks.
2025-09-28 23:13:12 -04:00
scawful
5915391467 add comments for gfx classes and editors 2025-09-28 23:00:32 -04:00
scawful
cb107ae69c Remove PNG and ZLIB support from the project
- Eliminated all references to PNG and ZLIB dependencies in CMake configuration and project files.
- Updated documentation to reflect the removal of PNG support and related functionalities.
- Adjusted build scripts and source files to remove unused code related to PNG handling, ensuring a cleaner codebase.
2025-09-28 12:03:29 -04:00
scawful
41adb1b70e Enhance testing framework and UI integration for YAZE
- Added a comprehensive testing framework with support for unit, integration, and UI tests, improving overall test coverage and reliability.
- Integrated ImGui Test Engine for UI testing, allowing for real-time feedback and visualization of test results.
- Updated CMake configuration to conditionally include testing components based on build options, enhancing flexibility for developers.
- Introduced a new command in the CLI for running asset loading tests on ROMs, providing a straightforward way to validate functionality.
- Enhanced error handling and resource management during testing, ensuring stability and clarity in test execution.
- Improved user interface with a dedicated test dashboard for monitoring test progress and results, enhancing developer experience.
2025-09-25 13:26:56 -04:00
scawful
4c6342cb73 Refactor UnpackBppTile and PackBppTile functions for clarity and correctness
- Initialized the snes_tile8 structure to zero in UnpackBppTile for safety.
- Reordered loops in UnpackBppTile to process rows before columns, improving readability.
- Corrected bit manipulation logic in both UnpackBppTile and PackBppTile to ensure accurate color value handling.
- Enhanced test cases for 2bpp and 4bpp tile unpacking to validate expected results, improving test coverage.
2025-09-25 11:16:13 -04:00
scawful
8bc896265f Refactor BackgroundBuffer tile access methods for improved validation and performance
- Updated SetTileAt and GetTileAt methods to enhance boundary checks, ensuring valid tile coordinates are used.
- Simplified buffer resizing logic in DrawBackground to accurately reflect the number of tiles based on width and height.
- Improved tile drawing logic to prevent unnecessary operations when the tile value is 0xFFFF, enhancing rendering efficiency.
2025-09-23 22:01:43 -04:00
scawful
223544fa01 Add copy and move constructors to Bitmap class for better resource management
- Implemented a copy constructor and copy assignment operator to enable deep copying of Bitmap objects.
- Added move constructor and move assignment operator to optimize resource handling and prevent unnecessary data duplication.
- Introduced SetPixel method for modifying individual pixels in the bitmap.
- Added Resize method to adjust bitmap dimensions while preserving existing pixel data, enhancing flexibility in bitmap manipulation.
2025-09-23 22:01:06 -04:00
scawful
c9921c91bf Refactor editor manager and dungeon editor for improved clarity and performance
- Removed unused functions and streamlined shortcut registration in EditorManager for better readability.
- Updated lambda captures to use 'this' pointer for consistency and clarity.
- Refactored DungeonEditor to utilize ranges for sorting and filling operations, enhancing performance and readability.
- Simplified table setup in DungeonEditor by using a static array for tool names, improving maintainability.
2025-08-03 17:53:34 -04:00
scawful
fdda77c172 Refactor ROM handling and remove SharedRom singleton for improved architecture
- Eliminated the SharedRom class to enhance modularity and reduce global state management.
- Updated various classes to directly manage ROM instances, improving clarity and encapsulation.
- Added new functions for loading messages and colors from ROM, enhancing functionality.
- Refactored Canvas and Editor classes to utilize direct ROM references, streamlining interactions.
- Improved documentation and comments for better code understanding and maintainability.
2025-08-03 17:52:02 -04:00
scawful
e05e59fb14 Refactor color conversion logic for improved accuracy and consistency
- Updated color channel assignments in ConvertRgbToSnes and SnesColor constructor to remove unnecessary static_cast, enhancing clarity and ensuring correct value usage.
- Simplified namespace declaration in snes_palette.cc for better readability.
- Changed Paletteset constructor parameters to use const references, improving performance and consistency in object handling.
2025-05-26 13:55:38 -04:00
scawful
095b3df27e Refactor graphics loading and decompression for consistency
- Updated various graphics loading functions to ensure consistent use of semicolons in ASSIGN_OR_RETURN statements.
- Changed set_filename method in Rom class to accept std::string_view for improved efficiency.
- Enhanced code readability and maintainability across multiple files by standardizing syntax.
2025-05-19 17:15:15 -04:00
scawful
a682ea9553 Port ScreenEditor to use Tilemap, remove Tilesheet class 2025-05-18 16:46:04 -04:00
scawful
7cc808918d Enhance Bitmap class with error handling and code improvements
- Introduced BitmapError class for more specific error handling in the Bitmap class.
- Updated data checks to use `empty()` for clarity and consistency.
- Improved pixel data handling by ensuring proper type usage and modifying loop constructs for better performance.
- Refactored constructor and method implementations for improved readability and maintainability.
2025-05-18 16:44:15 -04:00
scawful
f632650568 Update SnesColor constructor and add SnesTile tests
- Changed SnesColor constructor to remove constexpr, improving compatibility with non-constant expressions.
- Added new tests for SnesTile functionality, including unpacking, packing, and conversion between different bit depths.
- Enhanced TileInfo and Tile32 tests to verify construction, operations, and bit manipulation for better coverage.
2025-05-15 23:05:25 -04:00
scawful
ceab496226 Refactor Bitmap class for improved data handling
- Removed unused data_size_ member and updated size() method to return the size of data_ directly.
- Simplified data size checks in Create method to enhance clarity.
- Updated UpdateTexture method to use memcpy for pixel data assignment, improving performance.
- Ensured WriteToPixel method updates both pixel_data_ and data_ for consistency in modifications.
2025-05-15 23:01:03 -04:00
scawful
ab729fc198 Fix color conversion to ensure proper type casting in SNES color functions
- Updated ConvertRgbToSnes function to use static_cast for color channel values, ensuring correct conversion to uint8_t.
- Modified SnesColor constructor to apply static_cast for color channel values during initialization, improving accuracy in color representation.
2025-05-15 22:59:17 -04:00
scawful
120eb544bf Add 16x16 tile rendering and modification functions
- Introduced RenderTile16 and UpdateTile16 functions for rendering and updating 16x16 tiles in the Tilemap.
- Added ModifyTile16 function to facilitate the composition and placement of tile parts within the Tilemap.
- Updated Tilemap structure to include a vector for storing tile information.
- Refactored related functions to enhance tile handling and rendering capabilities.
2025-05-15 22:40:54 -04:00
scawful
a393303d41 Refactor tile handling functions to use std::span for improved performance and safety
- Updated UnpackBppTile and ConvertBpp functions to accept std::span instead of std::vector, enhancing flexibility and reducing unnecessary copies.
- Refactored LoadSNES4bppGFXToIndexedColorMatrix to return a std::vector instead of modifying a destination span, improving usability.
- Cleaned up variable names for consistency and readability throughout the affected functions.
2025-05-10 11:00:38 -04:00
scawful
68c1ab2f02 Enhance tilemap functionality and improve bitmap handling
- Replaced instances of Renderer::GetInstance() with Renderer::Get() for consistency in tilemap rendering.
- Introduced new functions for fetching and mirroring tile data, enhancing tile manipulation capabilities.
- Added ComposeTile16 function to facilitate the composition of 16x16 tile graphics from individual tile parts.
- Updated RenderTile to handle bitmap updates more efficiently and ensure proper rendering of tiles.
- Included necessary header for SNES tile handling to support new functionalities.
2025-05-08 22:34:39 -04:00
scawful
5167bb7206 Refactor bitmap handling and remove unused functions for improved clarity
- Simplified pixel format handling by removing the 2BPP format and adjusting related cases.
- Eliminated unused texture tracking variables from the Bitmap class.
- Removed the ExtractTile8Bitmaps function to streamline bitmap processing and reduce complexity.
2025-05-08 19:42:20 -04:00
scawful
fb015523dc Refactor SNES tile handling and introduce new graphics loading functionality
- Removed unused conversion functions for 3bpp to 4bpp and vice versa to streamline code.
- Updated SnesTo8bppSheet function to use std::span for improved performance and flexibility.
- Added LoadSNES4bppGFXToIndexedColorMatrix function to handle loading graphics data into an indexed color matrix, enhancing graphics management capabilities.
2025-05-08 11:44:22 -04:00
scawful
c08386801e Add BackgroundBuffer class for managing SNES background graphics
Introduce the BackgroundBuffer class to handle tile management and rendering for SNES backgrounds. This includes methods for setting and getting tile values, clearing the buffer, and drawing tiles and backgrounds using provided graphics data. The class is designed to facilitate efficient graphics rendering in the application.
2025-05-03 23:40:41 -04:00
scawful
1710430c2e Remove unused methods and comments from Bitmap class for improved clarity and maintainability. This includes the removal of surface saving, initialization, cleanup, and palette management functions that are no longer needed. 2025-05-02 12:14:04 -04:00
scawful
d6551f84d2 Refactor graphics handling to utilize Arena for graphics sheets management
Update various editors to replace instances of GraphicsSheetManager with gfx::Arena for accessing graphics sheets. This change enhances memory management and performance by centralizing graphics data handling within the Arena class. Clean up related code for improved clarity and maintainability.
2025-05-02 12:06:46 -04:00
scawful
4f8d765c48 Refactor Bitmap class to utilize Arena for surface and texture management
Replace custom surface and texture allocation methods with Arena's allocation, improving memory management. Update related methods to work with raw pointers instead of smart pointers, enhancing performance and reducing overhead. Clean up unused code and comments for better clarity.
2025-04-30 18:00:44 -04:00
scawful
d92f9b7b04 Add Arena class for texture and surface management in graphics module
Introduce the Arena class to manage a collection of SDL textures and surfaces, providing methods for allocation, deallocation, and updating textures.
2025-04-30 17:59:34 -04:00
scawful
3bd05f6beb Enhance Renderer class with Clear and Present methods for improved rendering control; remove unnecessary comments and streamline SDL_Surface and SDL_Texture deleters by eliminating memory tracking logic. Additionally, remove unused TexturePool class to simplify the codebase. 2025-04-30 00:44:12 -04:00
scawful
ad60cd3fd3 Remove snes.h header file and migrate SNES-related structures to yaze.h for better organization; update includes in snes_color.h and snes_tile.h accordingly. 2025-04-29 13:38:20 -04:00
scawful
0b9002e455 Refactor TexturePool class for improved readability and maintainability; reorganize method definitions and formatting for consistency. 2025-04-29 08:20:59 -04:00
scawful
3dc8a1f0ee Add Tile class and constructor overloads for tile data initialization 2025-04-29 00:09:58 -04:00
scawful
102f7b95e0 Add Tilemap functionality with creation, updating, and rendering capabilities; implement data retrieval for individual tiles, enhancing graphics management in the application. 2025-04-29 00:09:32 -04:00
scawful
8c207dc292 Implement SnesColor and SnesPalette constructors for enhanced color initialization; add methods for setting RGB and SNES values in SnesColor, improving color management and conversion capabilities. 2025-04-18 19:04:59 -04:00
scawful
9ad41f9f8b Refactor SnesColor class to use constexpr for constructors and methods, improving compile-time evaluation and performance; include <array> for better type handling. 2025-04-17 21:49:55 -04:00
scawful
44e13cf4bb Refactor bitmap palette management across various components to streamline palette setting and improve error handling; remove unnecessary status checks and enhance consistency in palette application methods. 2025-04-17 21:49:47 -04:00
scawful
a267e18f46 Refactor Bitmap class to improve texture management and memory tracking; implement custom allocators for SDL_Surface and SDL_Texture, enhance bitmap constructors, and add utility functions for tile extraction and pixel manipulation. 2025-04-16 22:35:47 -04:00
scawful
875d3d2bcf Introduce TexturePool for efficient texture reuse. 2025-04-16 22:35:42 -04:00
scawful
5637c20cb5 Add palette constants 2025-04-12 13:24:56 -04:00
scawful
95df0b5d8b Refactor Bitmap class: remove deprecated constructor and update Initialize method signature 2025-03-20 18:17:45 -04:00
scawful
c99a4b0bc4 rename ApplyPalette with SetPalette 2025-03-02 17:06:46 -05:00
scawful
4dc09ad5fc Refactor graphics loading: simplify function calls by removing namespace prefixes and improve header organization in scad_format 2025-02-28 00:46:39 -05:00
scawful
26cda69d44 Refactor common functionality into zelda3 namespace; remove references to core::common 2025-01-22 13:53:01 -05:00