cleanup infrastructure doc

This commit is contained in:
scawful
2024-08-07 14:50:59 -04:00
parent 7432eeb630
commit fbed06bf6c

View File

@@ -19,11 +19,12 @@ For developers to reference.
- [Getting Started](./getting-started.md) - [Getting Started](./getting-started.md)
- [LC_LZ2 Compression](./compression.md) - [LC_LZ2 Compression](./compression.md)
- **src**: Contains source files. - **src**: Contains source files.
- **app**: Contains the GUI editor `yaze` - **app**: Contains the GUI editor `yaze`
- **cli**: Contains the command line interface `z3ed` - **base**: Contains the base data headers for `yaze_c`
- **ext**: Contains the extensions library `yaze_ext` - **cli**: Contains the command line interface `z3ed`
- **py**: Contains the Python module `yaze_py` - **ext**: Contains the extensions library `yaze_ext`
- **lib**: Contains git submodule dependencies. - **py**: Contains the Python module `yaze_py`
- **lib**: Contains git submodule dependencies.
- Abseil-cpp - Abseil-cpp
- Asar - Asar
- ImGui - ImGui
@@ -48,13 +49,12 @@ For developers to reference.
- [app/editor/master_editor.cc](../src/app/editor/master_editor.cc) - [app/editor/master_editor.cc](../src/app/editor/master_editor.cc)
- Handles the main menu bar. - Handles the main menu bar.
- File - File
- Open - [app::ROM::LoadFromFile](../src/app/rom.cc#l=90) - Open
- Save - [app::ROM::SaveToFile](../src/app/rom.cc#l=301) - Save
- Edit - Edit
- View - View
- Emulator - Emulator
- HEX Editor - HEX Editor
- ASM Editor
- Palette Editor - Palette Editor
- Memory Viewer - Memory Viewer
- ImGui Demo - ImGui Demo
@@ -79,25 +79,6 @@ For developers to reference.
This `ROM` class provides methods to manipulate and access data from a ROM. This `ROM` class provides methods to manipulate and access data from a ROM.
- **Key Methods**:
- `Load2BppGraphics()`: Loads 2BPP graphics data from specified sheets.
- `LoadAllGraphicsData()`: Loads all graphics data, both compressed and uncompressed, converting where necessary.
- `LoadFromFile(const absl::string_view& filename, bool z3_load)`: Loads ROM data from a file. It also handles headers and Zelda 3 specific data if requested.
- `LoadFromPointer(uchar* data, size_t length)`: Loads ROM data from a provided pointer.
- `LoadFromBytes(const Bytes& data)`: Loads ROM data from bytes.
- `LoadAllPalettes()`: Loads all color palettes used in the ROM. This includes palettes for various elements like sprites, shields, swords, etc.
- `UpdatePaletteColor(...)`: Updates a specific color within a named palette group.
- **Internal Data Structures**:
- `rom_data_`: A container that holds the ROM data.
- `graphics_bin_`: Holds the graphics data.
- `palette_groups_`: A map containing various palette groups, each having its own set of color palettes.
- **Special Notes**:
- The class interacts with various external functionalities, such as decompression algorithms (`gfx::DecompressV2`) and color conversion (`gfx::SnesTo8bppSheet`).
- Headers in the ROM data, if present, are identified and removed.
- Specific Zelda 3 data can be loaded if specified.
- Palettes are categorized into multiple groups (e.g., `ow_main`, `ow_aux`, `hud`, etc.) and loaded accordingly.
## Bitmap ## Bitmap
@@ -107,27 +88,6 @@ This `ROM` class provides methods to manipulate and access data from a ROM.
This class is responsible for creating, managing, and manipulating bitmap data, which can be displayed on the screen using the ImGui library. This class is responsible for creating, managing, and manipulating bitmap data, which can be displayed on the screen using the ImGui library.
### Key Attributes:
1. **Width, Height, Depth, and Data Size**: These represent the dimensions and data size of the bitmap.
2. **Pixel Data**: Points to the raw data of the bitmap.
3. **Texture and Surface**: Use SDL to manage the graphical representation of the bitmap data. Both these attributes have custom deleters, ensuring proper resource management.
### Main Functions:
1. **Constructors**: Multiple constructors allow for different ways to create a Bitmap instance, like specifying width, height, depth, and data.
2. **Create**: This set of overloaded functions provides ways to create a bitmap from different data sources.
3. **CreateFromSurface**: Allows for the creation of a bitmap from an SDL_Surface.
4. **Apply**: Changes the bitmap's data to a new set of Bytes.
5. **Texture Operations**:
- **CreateTexture**: Creates an SDL_Texture from the bitmap's data for rendering.
- **UpdateTexture**: Updates the SDL_Texture with the latest bitmap data.
6. **SaveSurfaceToFile**: Saves the SDL_Surface to a file.
7. **SetSurface**: Assigns a new SDL_Surface to the bitmap.
8. **Palette Functions**:
- **ApplyPalette (Overloaded)**: This allows for the application of a SNESPalette or a standard SDL_Color palette to the bitmap.
9. **WriteToPixel**: Directly writes a value to a specified position in the pixel data.
## Z3ED cli ## Z3ED cli
| Command | Arg | Params | Status | | Command | Arg | Params | Status |