From 08ad521b74ed83ba73e5a5c84032879f830798c8 Mon Sep 17 00:00:00 2001 From: scawful Date: Sun, 14 Apr 2024 10:33:18 -0500 Subject: [PATCH] Update OverworldEditor documentation and others --- src/app/editor/overworld_editor.h | 17 +++++++++++------ src/app/editor/sprite_editor.h | 4 ++-- src/app/gui/canvas.h | 5 +++++ src/app/zelda3/common.h | 6 +++++- src/app/zelda3/sprite/sprite.h | 4 ++++ 5 files changed, 27 insertions(+), 9 deletions(-) diff --git a/src/app/editor/overworld_editor.h b/src/app/editor/overworld_editor.h index c9e54a97..326affb1 100644 --- a/src/app/editor/overworld_editor.h +++ b/src/app/editor/overworld_editor.h @@ -12,12 +12,12 @@ #include "absl/status/statusor.h" #include "absl/strings/str_format.h" #include "app/core/common.h" -#include "app/editor/utils/editor.h" #include "app/editor/context/entrance_context.h" #include "app/editor/context/gfx_context.h" #include "app/editor/modules/gfx_group_editor.h" #include "app/editor/modules/palette_editor.h" #include "app/editor/modules/tile16_editor.h" +#include "app/editor/utils/editor.h" #include "app/gfx/bitmap.h" #include "app/gfx/snes_palette.h" #include "app/gfx/snes_tile.h" @@ -64,13 +64,18 @@ constexpr absl::string_view kOWMapTable = "#MapSettingsTable"; /** * @class OverworldEditor - * @brief Represents an editor for the overworld in a game. + * @brief Manipulates the Overworld and OverworldMap data in a ROM. * * 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. + * manipulation of the overworld in a game. The user can drag and drop tiles, + * modify OverworldEntrance, OverworldExit, Sprite, and OverworldItem + * as well as change the gfx and palettes used in each overworld map. + * + * The Overworld itself is a series of bitmap images which exist inside each + * OverworldMap object. The drawing of the overworld is done using the Canvas + * class in conjunction with these underlying Bitmap objects. + * + * Provides access to the GfxGroupEditor and Tile16Editor through popup windows. * */ class OverworldEditor : public Editor, diff --git a/src/app/editor/sprite_editor.h b/src/app/editor/sprite_editor.h index ca14aad3..e760e2e4 100644 --- a/src/app/editor/sprite_editor.h +++ b/src/app/editor/sprite_editor.h @@ -10,8 +10,8 @@ namespace app { namespace editor { /** - * @brief The SpriteEditor class represents a sprite editor that inherits from - * SharedROM. + * @class SpriteEditor + * @brief Allows the user to edit sprites. * * This class provides functionality for updating the sprite editor, drawing the * editor table, drawing the sprite canvas, and drawing the current sheets. diff --git a/src/app/gui/canvas.h b/src/app/gui/canvas.h index b24e4c8a..107f8154 100644 --- a/src/app/gui/canvas.h +++ b/src/app/gui/canvas.h @@ -11,6 +11,11 @@ namespace yaze { namespace app { + +/** + * @namespace yaze::app::gui + * @brief Graphical User Interface (GUI) components for the application. + */ namespace gui { using app::gfx::Bitmap; diff --git a/src/app/zelda3/common.h b/src/app/zelda3/common.h index 726fe376..7a680024 100644 --- a/src/app/zelda3/common.h +++ b/src/app/zelda3/common.h @@ -4,11 +4,15 @@ namespace yaze { namespace app { /** - * @namespace zelda3 + * @namespace yaze::app::zelda3 * @brief Zelda 3 specific classes and functions. */ namespace zelda3 { +/** + * @class OverworldEntity + * @brief Base class for all overworld entities. + */ class OverworldEntity { public: enum EntityType { diff --git a/src/app/zelda3/sprite/sprite.h b/src/app/zelda3/sprite/sprite.h index 761c2c17..67698f98 100644 --- a/src/app/zelda3/sprite/sprite.h +++ b/src/app/zelda3/sprite/sprite.h @@ -19,6 +19,10 @@ namespace yaze { namespace app { namespace zelda3 { +/** + * @class Sprite + * @brief A class for managing sprites in the overworld and underworld. + */ class Sprite : public OverworldEntity { public: Sprite() = default;