diff --git a/src/app/editor/dungeon_editor.h b/src/app/editor/dungeon_editor.h index a217dabd..127b58be 100644 --- a/src/app/editor/dungeon_editor.h +++ b/src/app/editor/dungeon_editor.h @@ -32,6 +32,16 @@ constexpr ImGuiTableFlags kDungeonTableFlags = ImGuiTableFlags_Hideable | ImGuiTableFlags_BordersOuter | ImGuiTableFlags_BordersV; +/** + * @brief DungeonEditor class for editing dungeons. + * + * This class is currently a work in progress and is used for editing dungeons. + * It provides various functions for updating, cutting, copying, pasting, + * undoing, and redoing. It also includes methods for drawing the toolset, room + * selector, entrance selector, dungeon tab view, dungeon canvas, room graphics, + * tile selector, and object renderer. Additionally, it handles loading room + * entrances, calculating usage statistics, and rendering set usage. + */ class DungeonEditor : public Editor, public SharedROM, public core::ExperimentFlags { diff --git a/src/app/editor/graphics_editor.h b/src/app/editor/graphics_editor.h index 87b59aee..e8a675b3 100644 --- a/src/app/editor/graphics_editor.h +++ b/src/app/editor/graphics_editor.h @@ -60,8 +60,19 @@ constexpr ImGuiTableFlags kGfxEditFlags = ImGuiTableFlags_Reorderable | ImGuiTableFlags_SizingStretchSame; /** - * @brief Manages the games graphical content. -*/ + * @class GraphicsEditor + * @brief Allows the user to edit graphics sheets from the game or view + * prototype graphics of Link to the Past from the CGX, SCR, and OBJ formats. + * + * The GraphicsEditor class is responsible for providing functionality to edit + * graphics sheets from the game or view prototype graphics of Link to the Past + * from the CGX, SCR, and OBJ formats. It provides various methods to update + * different components of the graphics editor, such as the graphics edit tab, + * link graphics view, and prototype graphics viewer. It also includes import + * functions for different file formats, as well as other utility functions for + * drawing toolsets, palette controls, clipboard imports, experimental features, + * and memory editor. + */ class GraphicsEditor : public SharedROM { public: absl::Status Update(); diff --git a/src/app/editor/master_editor.h b/src/app/editor/master_editor.h index 1b61d4e6..4dc516aa 100644 --- a/src/app/editor/master_editor.h +++ b/src/app/editor/master_editor.h @@ -12,7 +12,6 @@ #include "absl/status/status.h" #include "app/core/common.h" #include "app/core/constants.h" -#include "app/gui/pipeline.h" #include "app/editor/context/gfx_context.h" #include "app/editor/dungeon_editor.h" #include "app/editor/graphics_editor.h" @@ -28,12 +27,31 @@ #include "app/gui/canvas.h" #include "app/gui/icons.h" #include "app/gui/input.h" +#include "app/gui/pipeline.h" #include "app/rom.h" namespace yaze { namespace app { namespace editor { +/** + * @class MasterEditor + * @brief The MasterEditor class represents the main editor for a ROM in the + * Yaze application. + * + * This class inherits from SharedROM, GfxContext, and ExperimentFlags, and + * provides functionality for setting up the screen, updating the editor, and + * shutting down the editor. It also includes methods for drawing various menus + * and popups, saving the ROM, and managing editor-specific flags. + * + * The MasterEditor class contains instances of various editor classes such as + * AssemblyEditor, DungeonEditor, GraphicsEditor, MusicEditor, OverworldEditor, + * PaletteEditor, ScreenEditor, and SpriteEditor. The current_editor_ member + * variable points to the currently active editor in the tab view. + * + * @note This class assumes the presence of an SDL_Renderer object for rendering + * graphics. + */ class MasterEditor : public SharedROM, public context::GfxContext, public core::ExperimentFlags { diff --git a/src/app/editor/overworld_editor.h b/src/app/editor/overworld_editor.h index a87ab120..9cb190c5 100644 --- a/src/app/editor/overworld_editor.h +++ b/src/app/editor/overworld_editor.h @@ -62,6 +62,17 @@ constexpr absl::string_view kTileSelectorTab = "##TileSelectorTabBar"; constexpr absl::string_view kOWEditTable = "##OWEditTable"; constexpr absl::string_view kOWMapTable = "#MapSettingsTable"; +/** + * @class OverworldEditor + * @brief Represents an editor for the overworld in a game. + * + * The `OverworldEditor` class is responsible for managing the editing and + * manipulation of the overworld in a game. It inherits from various base + * classes and provides functionality for updating, drawing, and handling user + * interactions with the overworld. It also includes methods for loading + * graphics, refreshing map data, and performing various editing operations. + * + */ class OverworldEditor : public Editor, public SharedROM, public context::GfxContext, diff --git a/src/app/editor/screen_editor.h b/src/app/editor/screen_editor.h index c781c706..23dd92c9 100644 --- a/src/app/editor/screen_editor.h +++ b/src/app/editor/screen_editor.h @@ -22,6 +22,20 @@ namespace yaze { namespace app { namespace editor { +/** + * @brief The ScreenEditor class allows the user to edit a variety of screens in + * the game or create a custom menu. + * + * This class is currently a work in progress (WIP) and provides functionality + * for updating the screens, saving dungeon maps, drawing different types of + * screens, loading dungeon maps, and managing various properties related to the + * editor. + * + * The screens that can be edited include the title screen, naming screen, + * overworld map, inventory menu, and more. + * + * The class inherits from the SharedROM class. + */ class ScreenEditor : public SharedROM { public: ScreenEditor(); diff --git a/src/app/editor/sprite_editor.h b/src/app/editor/sprite_editor.h index ae5cb0c0..ca14aad3 100644 --- a/src/app/editor/sprite_editor.h +++ b/src/app/editor/sprite_editor.h @@ -9,17 +9,41 @@ namespace yaze { namespace app { namespace editor { +/** + * @brief The SpriteEditor class represents a sprite editor that inherits from + * SharedROM. + * + * This class provides functionality for updating the sprite editor, drawing the + * editor table, drawing the sprite canvas, and drawing the current sheets. + */ class SpriteEditor : public SharedROM { public: + /** + * @brief Updates the sprite editor. + * + * @return An absl::Status indicating the success or failure of the update. + */ absl::Status Update(); private: + /** + * @brief Draws the editor table. + */ void DrawEditorTable(); + + /** + * @brief Draws the sprite canvas. + */ void DrawSpriteCanvas(); + + /** + * @brief Draws the current sheets. + */ void DrawCurrentSheets(); - uint8_t current_sheets_[8]; - bool sheets_loaded_ = false; + uint8_t current_sheets_[8]; /**< Array to store the current sheets. */ + bool sheets_loaded_ = + false; /**< Flag indicating whether the sheets are loaded or not. */ }; } // namespace editor