6.1 KiB
6.1 KiB
YAZE Infrastructure Overview
For developers to reference.
Directory Structure
- .github/workflows: Contains
yaze_testworkflow config. - assets: Hosts assets like fonts.
- cmake: Contains CMake configurations.
- docs: Contains documentation for users and developers.
- src: Contains source files.
- app: Contains the GUI editor
yaze - cli: Contains the command line interface
z3ed - lib: Contains git submodule dependencies.
- Abseil-cpp
- Asar
- ImGui
- ImGuiFileDialog
- ImGuiColorTextEdit
- imgui_memory_editor
- SDL2
- app: Contains the GUI editor
- test: Contains testing interface
yaze_test
App Organization
- Core Namespace:
- Editor Namespace:
- Editors are responsible for representing the GUI view and handling user input.
- These classes are all controlled by MasterEditor
- Emu Namespace:
- Gfx Namespace:
- Handles graphics related tasks.
- Gui Namespace:
- Zelda3 Namespace:
Flow of Control
- app/yaze.cc
- Initializes
absl::FailureSignalHandlerfor stack tracing. - Runs the
core::Controllerloop.
- Initializes
- app/core/controller.cc
- Initializes SDLRenderer and SDLWindow
- Initializes ImGui, fonts, themes, and clipboard.
- Handles user input from keyboard and mouse.
- Updates
editor::MasterEditor - Renders the output to the screen.
- Handles the teardown of SDL and ImGui resources.
- app/editor/master_editor.cc
- Handles the main menu bar.
- File
- Open - app::ROM::LoadFromFile
- Save - app::ROM::SaveToFile
- Edit
- View
- Emulator
- HEX Editor
- ASM Editor
- Palette Editor
- Memory Viewer
- ImGui Demo
- GUI Tools
- Runtime Metrics
- Style Editor
- Help
- File
- Handles
absl::Statuserrors as popups delivered to the user. - Update all the editors in a tab view.
- Handles the main menu bar.
Overworld
- app/zelda3/overworld.cc
- app/zelda3/overworld.h
- app/zelda3/overworld_map.cc
- app/zelda3/overworld_map.h
- Construction of Tile16 and Tile32
- Save and Load Resources
- Sprites
- Entrances
- Tilemaps
Bitmap
- Initialization: Offers multiple constructors to create bitmaps using different data types.
- Palette Application: Provides grayscale palettes and can convert
SNESPalettetoSDL_Palette. - Texture Handling: Can create and update textures based on SDL surfaces.
- SDL Surface Management: Allows for the creation, modification, and saving of SDL surfaces.
- Memory Management: Uses smart pointers for efficient memory utilization and cleanup.
Z3ED cli
| Command | Arg | Params | Status |
|---|---|---|---|
| Apply BPS Patch | -a | rom_file bps_file | In progress |
| Create BPS Patch | -c | bps_file src_file modified_file | Not started |
| Open ROM | -o | rom_file | Complete |
| Backup ROM | -b | rom_file [new_file] | In progress |
| Expand ROM | -x | rom_file file_size | Not started |
| Transfer Tile16 | -t | src_rom dest_rom tile32_id_list(csv) | Complete |
| Export Graphics | -e | rom_file bin_file | In progress |
| Import Graphics | -i | bin_file rom_file | Not started |
| SNES to PC Address | -s | address | Complete |
| PC to SNES Address | -p | address | Complete |
Further Development Ideas
- Extend
zelda3namespace with additional functionalities. - Optimize program performance.
- Introduce new features in the GUI editor.