From a40928a46071e2e4cf6de7cc64899e48fe9d7780 Mon Sep 17 00:00:00 2001 From: scawful Date: Thu, 15 Aug 2024 23:27:53 -0400 Subject: [PATCH] update infrastructure doc --- docs/infrastructure.md | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/docs/infrastructure.md b/docs/infrastructure.md index 50cef478..0b09fc2c 100644 --- a/docs/infrastructure.md +++ b/docs/infrastructure.md @@ -41,39 +41,42 @@ See [build-instructions.md](docs/build-instructions.md) for more information. ## Flow of Control -- [app/yaze.cc](../src/app/yaze.cc) +- app/yaze.cc - Initializes `absl::FailureSignalHandler` for stack tracing. - Runs the `core::Controller` loop. -- [app/core/controller.cc](../src/app/core/controller.cc) +- 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/editor_manager.cc](../src/app/editor/editor_manager.cc) +- app/editor/editor_manager.cc - Handles the main menu bar - Handles `absl::Status` errors as popups delivered to the user. + - Dispatches messages to the various editors. - Update all the editors in a tab view. - - [app/editor/assembly_editor.cc](../src/app/editor/assembly_editor.cc) - - [app/editor/dungeon_editor.cc](../src/app/editor/dungeon_editor.cc) - - [app/editor/graphics_editor.cc](../src/app/editor/graphics_editor.cc) - - [app/editor/music_editor.cc](../src/app/editor/music_editor.cc) - - [app/editor/overworld/overworld_editor.cc](../src/app/editor/overworld/overworld_editor.cc) - - [app/editor/screen_editor.cc](../src/app/editor/screen_editor.cc) - - [app/editor/sprite_editor.cc](../src/app/editor/sprite_editor.cc) + - app/editor/code/assembly_editor.cc + - app/editor/dungeon/dungeon_editor.cc + - app/editor/graphics/graphics_editor.cc + - app/editor/music/music_editor.cc + - app/editor/overworld/overworld_editor.cc + - app/editor/graphics/screen_editor.cc + - app/editor/sprites/sprite_editor.cc + - app/editor/system/settings_editor.cc ## Rom -- [app/rom.cc](../src/app/rom.cc) -- [app/rom.h](../src/app/rom.h) +- app/rom.cc +- app/rom.h -The `Rom` class provides methods to manipulate and access data from a ROM. +The Rom class provides methods to manipulate and access data from a ROM. + +Currently implemented as a singleton with SharedRom which is not great but has helped with development velocity. Potential room for improvement is to refactor the editors to take the ROM as a parameter. ## Bitmap -- [app/gfx/bitmap.cc](../src/app/gfx/bitmap.cc) -- [app/gfx/bitmap.h](../src/app/gfx/bitmap.cc) +- app/gfx/bitmap.cc +- app/gfx/bitmap.h This class is responsible for creating, managing, and manipulating bitmap data, which can be displayed on the screen using SDL2 Textures and the ImGui draw list. It also provides functions for exporting these bitmaps to the clipboard in PNG format using libpng.