Commit Graph

222 Commits

Author SHA1 Message Date
scawful
c809738f8b feat(cmake): enable export of compile commands for LSP support
- Added option to export compile commands for clangd and other Language Server Protocol (LSP) tools by setting CMAKE_EXPORT_COMPILE_COMMANDS to ON in CMake.
- Updated yaze_test.cc to conditionally include ImGui test engine headers based on the YAZE_ENABLE_IMGUI_TEST_ENGINE flag, improving modularity and organization.

Benefits:
- Enhanced development experience with better integration of LSP tools.
- Improved code organization by managing includes based on feature flags.
2025-10-11 14:57:11 -04:00
scawful
ab73a09f47 refactor(editor): reorganize includes and enhance EditorManager initialization
- Moved the declaration of `AgentControlServer` to a forward declaration in the header file for better clarity and organization.
- Updated the `EditorManager` constructor to initialize the version string and popup manager context.
- Added conditional compilation for gRPC-related includes and commented out the agent control server initialization for future reference.
- Ensured consistent definition of `IMGUI_DEFINE_MATH_OPERATORS` across multiple files to prevent potential issues with ImGui usage.

Benefits:
- Improved code organization and readability.
- Enhanced maintainability by clarifying the initialization process and managing includes effectively.
2025-10-11 14:37:34 -04:00
scawful
65acd6a941 chore(cmake): add JSON include directory to test configuration
- Included the JSON library directory in the test CMake configuration to support JSON functionalities in tests.
- This addition enhances the testing environment by providing necessary dependencies for JSON handling.

Benefits:
- Improved testing capabilities by integrating JSON support.
- Streamlined CMake configuration for better modularity in test setups.
2025-10-11 12:39:47 -04:00
scawful
18986e3656 refactor(cmake): update include paths and defer test support linkage
- Updated include paths in several source files to reflect the new directory structure, ensuring consistency across the project.
- Deferred the linkage of the yaze_test_support library to the test.cmake file for better dependency management and ordering.

Benefits:
- Improved organization of include paths for better maintainability.
- Enhanced modularity by managing test dependencies separately.
2025-10-11 12:19:51 -04:00
scawful
1f56ff2fb8 chore(cmake): update test CMake configuration to include additional directories and libraries
- Added new include directories for ImGui and SDL to the test CMake configuration, enhancing the testing environment.
- Updated the linkage to include ImGui and SDL targets, ensuring proper integration for GUI tests.

Benefits:
- Improved support for GUI testing by integrating necessary libraries.
- Streamlined the CMake configuration for better modularity in test setups.
2025-10-11 12:06:28 -04:00
scawful
f54949bdd8 feat(build-system): enhance CMake configuration and introduce new utility files
- Refactored CMakeLists.txt to streamline project configuration and improve readability.
- Introduced new utility functions in `utils.cmake` for setting compiler flags and managing dependencies.
- Added `dependencies.cmake` to centralize third-party dependency management, enhancing modularity.
- Updated CI workflows to include new build options and improved logging for better feedback during configuration.
- Implemented precompiled headers in various libraries to speed up compilation times.

Benefits:
- Improved maintainability and clarity of the build system.
- Enhanced build performance through precompiled headers.
- Streamlined dependency management for easier integration of third-party libraries.
2025-10-11 02:44:17 -04:00
scawful
31d0337b11 feat(command-abstraction): refactor CLI command architecture and introduce new documentation
- Implemented a Command Abstraction Layer to eliminate ~1300 lines of duplicated code across tool commands, enhancing maintainability and consistency.
- Established a unified structure for argument parsing, ROM loading, and output formatting across all commands.
- Added comprehensive documentation, including a Command Abstraction Guide with migration checklists and testing strategies.
- Introduced better testing capabilities for command components, making them AI-friendly and easier to validate.
- Removed legacy command classes and integrated new command handlers for improved functionality.

Benefits:
- Streamlined command handling and improved code quality.
- Enhanced developer experience with clear documentation and testing strategies.
- Maintained backward compatibility with no breaking changes to existing command interfaces.
2025-10-10 22:24:20 -04:00
scawful
4c3cb2581d feat: Enhance object rendering and tile management in Zelda3
- Introduced a new method `set_dirty` in the `Rom` class to manage the dirty state of ROM data.
- Updated `DungeonCanvasViewer` to process texture queues before drawing, improving texture readiness and rendering performance.
- Refactored `ObjectDrawer` to utilize `TileInfo` instead of `Tile16`, enhancing tile data handling and consistency across the codebase.
- Improved the `ObjectParser` to read tile data as `TileInfo`, ensuring accurate parsing and memory management.
- Added performance optimizations in the `Room` class to track changes in properties and reduce unnecessary rendering.
- Enhanced logging for debugging purposes during tile drawing and object rendering processes.
2025-10-10 16:19:45 -04:00
scawful
5cc650053d fix: Correct canvas mouse position tracking and add regression tests 2025-10-10 13:37:08 -04:00
scawful
db517abbb3 refactor: Update Performance File Paths and Cleanup Integration
- Refactored file paths for performance-related headers to reflect the new directory structure under `app/gfx/performance/`.
- Updated references in the `Canvas` class to align with the new paths, ensuring proper integration of performance monitoring components.
- Cleaned up unnecessary prefixes in performance integration checks to enhance code readability and maintainability.
2025-10-10 10:12:44 -04:00
scawful
cbcf1e40be refactor: Update Performance Header Includes and Add Emulator Test Suite
- Refactored header includes for Performance Profiler and Dashboard to reflect new directory structure under `app/gfx/performance/`.
- Introduced a new `EmulatorTestSuite` class to validate core emulator components, including APU, SPC700, and debugging features.
- Enhanced test suite with detailed test cases for APU handshake, SPC700 cycle accuracy, breakpoint management, and audio backend functionality.
- Removed outdated `test_dungeon_objects.cc` file from the test suite to streamline testing focus.
2025-10-10 10:07:35 -04:00
scawful
51342b02e3 docs: Add APU Timing and Handshake Bug Analysis & Refactoring Plan
- Introduced a new document detailing the APU timing issue that prevents music playback due to handshake failures between the CPU and APU.
- Analyzed the CPU-APU handshake process, identifying points of failure and root causes related to cycle inaccuracies in SPC700 emulation.
- Proposed a comprehensive refactoring plan to implement cycle-accurate instruction execution, centralize the APU execution loop, and use integer-based cycle ratios to eliminate floating-point errors.
- This document serves as a critical resource for developers addressing audio emulation challenges.
2025-10-09 20:50:24 -04:00
scawful
c512dd7f35 refactor: Replace deprecated dungeon editor guide with updated documentation
- Deleted the old D1-dungeon-editor-guide.md and F1-dungeon-editor-guide.md files to streamline documentation.
- Introduced a new DUNGEON_EDITOR_GUIDE.md that consolidates features, architecture, and usage instructions for the Dungeon Editor.
- Updated the development guide to include new naming conventions and clarified rendering processes.
- Enhanced the overall structure and content of the documentation to reflect the current production-ready status of the Dungeon Editor.
2025-10-09 20:48:07 -04:00
scawful
418695188a refactor: Migrate DungeonEditor to V2 and update related components
- Replaced the deprecated DungeonEditor with DungeonEditorV2, implementing a card-based architecture for improved UI management.
- Updated CMakeLists.txt to reflect changes in source file organization, including renaming dungeon_editor files to their V2 counterparts.
- Refactored DungeonCanvasViewer to support per-room layer visibility settings and updated related methods for rendering and layer management.
- Enhanced testing framework to accommodate the new DungeonEditorV2 structure, including updates to smoke tests and integration tests.
- Removed legacy dungeon_editor files to streamline the codebase and prevent confusion with the new implementation.
2025-10-09 18:00:27 -04:00
scawful
9d0b6737cd refactor: Remove manual object renderer and dungeon renderer from the editor
- Deleted the ManualObjectRenderer and DungeonRenderer classes to streamline the codebase and reduce redundancy.
- Updated DungeonCanvasViewer and DungeonEditorV2 to remove references to the deleted renderers, ensuring proper functionality without them.
- Enhanced the rendering logic in DungeonCanvasViewer to directly handle object rendering and background layers, improving performance and maintainability.
- Added debug logging to track rendering processes and ensure proper graphics loading.
2025-10-09 15:47:15 -04:00
scawful
ba70176ee2 refactor: Improve message parsing and dictionary handling
- Changed the type of dictionary variable from int to int8_t for better type safety.
- Updated the handling of dictionary entries in message parsing to ensure correct formatting and prevent parsing errors with command arguments.
- Refactored message data parsing logic to use index-based loops, improving clarity and correctness in handling command arguments.
- Enhanced the documentation in message_data.h to provide a comprehensive overview of the message data system and its components.
- Added new tests to validate the correct parsing of messages with commands and arguments, ensuring robustness against previous bugs.
2025-10-08 21:17:09 -04:00
scawful
6c331f1fd0 epic: refactor SDL2_Renderer usage to IRenderer and queued texture rendering
- Updated the testing guide to clarify the testing framework's organization and execution methods, improving user understanding.
- Refactored CMakeLists to include new platform-specific files, ensuring proper integration of the rendering backend.
- Modified main application files to utilize the new IRenderer interface, enhancing flexibility in rendering operations.
- Implemented deferred texture management in various components, allowing for more efficient graphics handling and improved performance.
- Introduced new methods for texture creation and updates, streamlining the rendering process across the application.
- Enhanced logging and error handling in the rendering pipeline to facilitate better debugging and diagnostics.
2025-10-07 17:15:11 -04:00
scawful
a881c0f8e1 feat: Refactor Emulator to Accept ROM Parameter and Enhance Logging
- Updated Emulator::Run method to accept a Rom* parameter, improving flexibility in ROM handling.
- Refactored texture creation and ROM data initialization to utilize the new parameter.
- Enhanced logging in Snes class to provide detailed information during initialization, reset, and frame processing, aiding in debugging and performance monitoring.
- Introduced cycle tracking in Apu and Spc700 classes for accurate synchronization and debugging.
- Added unit tests for APU DSP functionality and IPL ROM handshake to ensure reliability and correctness of audio processing.
2025-10-06 11:41:33 -04:00
scawful
f6ad6e971f refactor: Update CMake Configuration and Implement Canvas Automation Tests
- Updated CMakeLists.txt to include additional proto files for canvas automation, enhancing the build process for gRPC services.
- Refactored file_util.cc to use the core namespace for feature flags, improving code clarity and consistency.
- Added new unit tests for CanvasAutomationAPI, covering various functionalities such as coordinate conversion, tile operations, and selection management, ensuring robust testing for canvas automation features.
2025-10-05 23:44:38 -04:00
scawful
af2b698dbd refactor: Enhance OverworldEditor with Dynamic Context Menu and Tile Selector Widget
- Replaced static context menu setup in OverworldEditor with dynamic configuration based on the current map state, improving usability and responsiveness.
- Introduced TileSelectorWidget for better tile selection management, allowing for a more intuitive user experience when selecting tiles.
- Updated canvas controls to include zoom in and zoom out functionalities, enhancing the editor's navigation capabilities.
- Cleaned up legacy context menu code and improved overall organization for better maintainability and clarity.
2025-10-05 22:53:33 -04:00
scawful
b21aeeb663 feat: Enhance Dungeon Rendering with Size Adjustments and Testing Initialization
- Added InitializeForTesting method in Rom class to facilitate testing setup.
- Updated DungeonCanvasViewer to adjust object and sprite sizes from 16x16 to 8x8, improving rendering accuracy.
- Modified rendering logic for various dungeon objects (chests, doors, walls, pots) to reflect new size calculations.
- Adjusted object position calculations in ObjectRenderer to align with the new size metrics, ensuring consistent rendering across the application.
- Updated integration tests to verify the new initialization method for ROM objects.
2025-10-05 17:27:32 -04:00
scawful
3b7a961884 feat: Implement Proposal Saving and GUI Automation Enhancements
- Added functionality to save AI agent plans to disk using ProposalRegistry, including directory creation and error handling for failed saves.
- Enhanced AIGUIController with new gRPC GUI automation actions, including click, type, wait, and verify actions, improving interaction capabilities.
- Introduced new command parsing for set-area and replace-tile commands in Tile16ProposalGenerator, allowing for more complex tile modifications.
- Added integration and unit tests for AIGUIController and Tile16ProposalGenerator to ensure robust functionality and error handling.
2025-10-05 13:07:03 -04:00
scawful
8d13c31df8 feat: Update AI Model References and Enhance Agent Chat Widget Functionality
- Updated AI model references from "gemini-2.0-flash-exp" to "gemini-2.5-flash" across various components, ensuring compatibility with the latest AI capabilities.
- Enhanced the AgentChatWidget to improve user experience with new features such as message copying, improved input handling, and session management.
- Introduced a chat session management system, allowing users to create and switch between multiple chat sessions seamlessly.
- Improved UI elements for better visibility and interaction, including styled buttons and tooltips for enhanced usability.
2025-10-05 04:55:18 -04:00
scawful
429506e503 feat: Integrate unified gRPC server for enhanced service management
- Added `UnifiedGRPCServer` class to host both ImGuiTestHarness and ROM service, allowing simultaneous access to GUI automation and ROM manipulation.
- Implemented necessary header and source files for the unified server, including initialization, start, and shutdown functionalities.
- Updated CMake configurations to include new source files and link required gRPC libraries for the unified server.
- Enhanced existing services with gRPC support, improving overall system capabilities and enabling real-time collaboration.
- Added integration tests for AI-controlled tile placement, validating command parsing and execution via gRPC.
2025-10-04 23:14:09 -04:00
scawful
13bbe8078a feat: Enhance GUI action generation and testing for AI tile placement
- Introduced `GuiActionGenerator` class to convert high-level AI actions into executable GUI test scripts, supporting JSON output for automated testing.
- Added comprehensive test suite for AI tile placement commands, validating command parsing and generated test scripts.
- Updated `README.md` to reflect recent enhancements and completed features in the project.
- Improved CMake configuration to include new source files for GUI action generation and related services.
2025-10-04 22:23:31 -04:00
scawful
61f1d6fbac feat: Update function schemas and system prompt for enhanced agent capabilities
- Revised function schemas in `function_schemas.json` to streamline resource listing and searching, including new parameters for dungeon and overworld queries.
- Introduced a new system prompt in `system_prompt_v3.txt` to improve the agent's proactive exploration and multi-tool chaining strategies.
- Updated `GeminiAIService` to support the new prompt version and enhanced function calling logic for better tool integration.
- Added tests for multimodal image analysis and error handling in `test_gemini_vision.cc` to ensure robust functionality.
2025-10-04 22:14:04 -04:00
scawful
2c74f08f4c feat: Add support for test discovery and organization in CMake configuration 2025-10-04 16:37:13 -04:00
scawful
867fa820ba feat: Add job configuration to build presets and link yaze_test_support in test CMakeLists 2025-10-04 16:30:12 -04:00
scawful
0176a66b7e feat: Enable Unity builds for faster compilation
- Added an option to enable Unity (Jumbo) builds in CMake.
- Updated CMakeLists.txt to conditionally set CMAKE_UNITY_BUILD and batch size.
- Removed outdated analysis documentation for overworld implementation.
- Deleted z3ed resources YAML file as it is no longer needed.
- Refactored CMake files to modularize the build system, separating core, editor, gfx, gui, and zelda3 components into library files.
- Added precompiled headers for various libraries to improve compilation times.
- Updated yaze_config.h.in to define IMGUI_DEFINE_MATH_OPERATORS for C++ compatibility.
- Enhanced editor integration tests with necessary includes for ImGui.
2025-10-04 16:23:57 -04:00
scawful
37e8e77376 feat: Introduce DungeonEditorV2 with component delegation for improved architecture
- Added DungeonEditorV2 to streamline dungeon editing by delegating tasks to specialized components.
- Implemented comprehensive integration tests to validate functionality and ensure proper ROM handling.
- Achieved 100% pass rate for all integration tests, enhancing reliability and performance of the editor.
- Updated test suite to include tests for the new editor, ensuring robust coverage and error handling.
2025-10-04 14:32:56 -04:00
scawful
78c6041877 feat: Initialize dungeon editor with ROM in setup for integration tests 2025-10-04 14:17:38 -04:00
scawful
e840d71add feat: Add End-to-End (E2E) testing documentation for improved test management
- Introduced a comprehensive README for the E2E tests using ImGui Test Engine, detailing active tests and their functionalities.
- Documented the process for running tests, creating new tests, and utilizing the ImGui Test Engine API.
- Included troubleshooting tips and future test ideas to enhance test development and execution.
- Organized the file structure and provided insights into test logging and infrastructure.
2025-10-04 14:10:37 -04:00
scawful
3ef157b991 feat: Add comprehensive test coverage documentation for dungeon editor
- Introduced detailed reports on unit, integration, and E2E test coverage for the dungeon editor.
- Documented test results, including pass rates and identified issues, to enhance visibility into testing outcomes.
- Implemented performance optimizations for the graphics system, significantly improving loading times and user experience.
- Updated the smoke test for the dungeon editor to cover complete UI workflows and interactions.
- Enhanced integration tests to utilize real ROM data, ensuring more reliable test execution.
2025-10-04 14:09:14 -04:00
scawful
c59a4592c3 feat: Add dungeon editor smoke test and register it in the test suite
- Introduced a new smoke test for the Dungeon Editor to verify UI elements and functionality.
- Registered the Dungeon Editor smoke test in the main test suite for automated execution.
- Updated the integration test setup to ensure proper ROM loading from multiple locations.
2025-10-04 14:01:30 -04:00
scawful
dc3a59f03b feat: Update README and z3ed documentation for AI-powered features and editor integration
refactor: Simplify dungeon editor integration tests by using real ROM data and removing mock implementations
2025-10-04 13:53:34 -04:00
scawful
20a406892c Refactor test structure and enhance object encoding tests
- Updated CMakeLists.txt to correct file paths for unit tests.
- Modified DungeonObjectRenderingE2ETests to inherit from BoundRomTest for better ROM management.
- Enhanced DungeonEditorIntegrationTest with improved mock ROM handling and added graphics data setup.
- Introduced a new MockRom class with methods for setting mock data and initializing memory layout.
- Added comprehensive unit tests for RoomObject encoding and decoding, covering all object types and edge cases.
- Refactored DungeonObjectRenderingTests to utilize BoundRomTest, ensuring consistent ROM loading and setup.
- Improved assertions in rendering tests for better clarity and reliability.
2025-10-04 13:37:52 -04:00
scawful
38ece34894 feat: Organize and enhance test structure with new tools and integration tests
- Added a new `tools` directory to house various utility tools, including the `overworld_golden_data_extractor`, `extract_vanilla_values`, and `rom_patch_utility`.
- Introduced comprehensive integration tests for dungeon and overworld functionalities, ensuring compatibility with existing ROM data.
- Refactored existing test files to improve organization and maintainability, moving deprecated tests to a dedicated directory.
- Updated CMake configuration to include new tools and tests, enhancing the build process for development and CI environments.
- Improved test coverage for dungeon object rendering and room integration, validating core functionalities against expected behaviors.
2025-10-04 12:21:18 -04:00
scawful
39e6379bc3 feat: Add embedded labels support in conversation tests and initialize in tool commands 2025-10-04 02:07:13 -04:00
scawful
3edc0c5b63 feat: Introduce automatic widget registration for ImGui with test engine integration 2025-10-04 01:43:13 -04:00
scawful
2ea811eeb2 feat: Enhance DungeonObjectEditor with visual feedback and object manipulation features, including drag-and-drop support and property panel integration 2025-10-04 00:42:48 -04:00
scawful
9bfc95de37 feat: Refactor RoomObject decoding logic to prioritize Type3 detection and update related unit tests 2025-10-04 00:15:21 -04:00
scawful
c2dd6498e2 feat: Implement object encoding/decoding for dungeon objects and add unit tests 2025-10-04 00:03:40 -04:00
scawful
5123b0ee5f feat: Update CMake presets and test discovery to enhance test categorization and labeling 2025-10-03 22:08:07 -04:00
scawful
2c45453dd0 Implement recording functionality in agent test commands
- Added RecordingState structure to manage recording session details.
- Implemented SaveRecordingState and LoadRecordingState functions to handle recording state persistence.
- Enhanced HandleTestRecordCommand to support starting and stopping recording sessions with various options.
- Integrated gRPC calls for starting and stopping recordings in GuiAutomationClient.
- Updated ProposalRegistry to include sandbox directory and ROM path in ProposalMetadata.
- Implemented JSON parsing for Tile16Proposal to handle proposal creation from JSON input.
- Updated CMakeLists.txt to ensure proper linking of emulator targets.
2025-10-03 21:16:08 -04:00
scawful
c3eaace72c feat: Implement modular build system for Yaze
- Added option to enable modular build with `YAZE_USE_MODULAR_BUILD`.
- Updated CMake configuration to support modular libraries for core, editor, graphics, GUI, and emulator functionalities.
- Refactored existing libraries to separate concerns and improve build times.
- Introduced new utility library `yaze_util` for low-level utilities.
- Adjusted CI and release workflows to accommodate the new build system.
- Updated various source files to reflect new include paths and modular structure.
- Enhanced YAML configuration handling in the agent component.
2025-10-03 18:32:51 -04:00
scawful
90ddc3d50c Refactor CLI Service Structure and Enhance AI Integration
- Restructured CLI service source files to improve organization, moving files into dedicated directories for better maintainability.
- Introduced new AI service components, including `AIService`, `MockAIService`, and `GeminiAIService`, to facilitate natural language command generation.
- Implemented `PolicyEvaluator` and `ProposalRegistry` for enhanced proposal management and policy enforcement in AI workflows.
- Updated CMake configurations to reflect new file paths and ensure proper linking of the restructured components.
- Enhanced test suite with new test workflow generation capabilities, improving the robustness of automated testing.

This commit significantly advances the architecture of the z3ed system, laying the groundwork for more sophisticated AI-driven features and streamlined development processes.
2025-10-03 09:54:27 -04:00
scawful
56c2132b78 fix: Increase stack size for Windows executables and improve test discovery settings 2025-10-02 20:58:44 -04:00
scawful
6b13c2ea0a Implement GUI Automation Test Commands and Refactor AsarWrapper Usage
- Added new test commands for GUI automation in `test_commands.cc`, including handling test runs, statuses, listings, and results.
- Refactored instances of `app::core::AsarWrapper` to `core::AsarWrapper` across multiple files for consistency.
- Updated CMake configuration to include new test command files.
- Modified integration and unit tests to reflect the changes in AsarWrapper usage.
- Ensured proper error handling and output formatting for test commands.
2025-10-02 19:33:05 -04:00
scawful
04a4d04f4e feat(cli): Enhance CLI with resource catalog and sandbox management
- Added resource catalog for introspecting CLI resources, including schemas for palettes, ROMs, patches, overworlds, dungeons, and agents.
- Implemented serialization methods for resource schemas in both JSON and YAML formats.
- Introduced RomSandboxManager to manage sandboxed ROM copies, allowing for safe experimentation with ROM modifications.
- Updated ModernCLI to include new commands for palette management and enhanced help output.
- Added unit tests for resource catalog serialization and schema validation.
2025-10-01 14:34:58 -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