Rename SharedROM to SharedRom

This commit is contained in:
scawful
2024-04-14 14:51:53 -05:00
parent 7e46cf1c64
commit 5953e58bd4
21 changed files with 26 additions and 24 deletions

View File

@@ -195,7 +195,7 @@
}
- (void)openFileAction:(id)sender {
yaze::app::SharedROM::shared_rom_->LoadFromFile(FileDialogWrapper::ShowOpenFileDialog());
yaze::app::SharedRom::shared_rom_->LoadFromFile(FileDialogWrapper::ShowOpenFileDialog());
}
- (void)cutAction:(id)sender {

View File

@@ -43,7 +43,7 @@ constexpr ImGuiTableFlags kDungeonTableFlags =
* entrances, calculating usage statistics, and rendering set usage.
*/
class DungeonEditor : public Editor,
public SharedROM,
public SharedRom,
public core::ExperimentFlags {
public:
absl::Status Update() override;

View File

@@ -73,7 +73,7 @@ constexpr ImGuiTableFlags kGfxEditFlags = ImGuiTableFlags_Reorderable |
* drawing toolsets, palette controls, clipboard imports, experimental features,
* and memory editor.
*/
class GraphicsEditor : public SharedROM {
class GraphicsEditor : public SharedRom {
public:
absl::Status Update();

View File

@@ -39,7 +39,7 @@ namespace editor {
* @brief The MasterEditor class represents the main editor for a ROM in the
* Yaze application.
*
* This class inherits from SharedROM, GfxContext, and ExperimentFlags, and
* 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.
@@ -52,7 +52,7 @@ namespace editor {
* @note This class assumes the presence of an SDL_Renderer object for rendering
* graphics.
*/
class MasterEditor : public SharedROM,
class MasterEditor : public SharedRom,
public context::GfxContext,
public core::ExperimentFlags {
public:

View File

@@ -27,7 +27,7 @@ namespace editor {
* @class GfxGroupEditor
* @brief Manage graphics group configurations in a ROM.
*/
class GfxGroupEditor : public SharedROM {
class GfxGroupEditor : public SharedRom {
public:
absl::Status Update();

View File

@@ -59,7 +59,7 @@ static constexpr absl::string_view kSongNotes[] = {
* @class MusicEditor
* @brief A class for editing music data in a ROM.
*/
class MusicEditor : public SharedROM {
class MusicEditor : public SharedRom {
public:
void Update();

View File

@@ -81,7 +81,7 @@ class PaletteEditorHistory {
* @class PaletteEditor
* @brief Allows the user to view and edit in game palettes.
*/
class PaletteEditor : public SharedROM {
class PaletteEditor : public SharedRom {
public:
absl::Status Update();
absl::Status DrawPaletteGroups();

View File

@@ -27,7 +27,7 @@ namespace editor {
/**
* @brief Popup window to edit Tile16 data
*/
class Tile16Editor : public context::GfxContext, public SharedROM {
class Tile16Editor : public context::GfxContext, public SharedRom {
public:
absl::Status Update();
absl::Status DrawMenu();

View File

@@ -79,7 +79,7 @@ constexpr absl::string_view kOWMapTable = "#MapSettingsTable";
*
*/
class OverworldEditor : public Editor,
public SharedROM,
public SharedRom,
public context::GfxContext,
public context::EntranceContext,
public core::ExperimentFlags {

View File

@@ -34,9 +34,9 @@ namespace 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.
* The class inherits from the SharedRom class.
*/
class ScreenEditor : public SharedROM {
class ScreenEditor : public SharedRom {
public:
ScreenEditor();
void Update();

View File

@@ -16,7 +16,7 @@ namespace editor {
* 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 {
class SpriteEditor : public SharedRom {
public:
/**
* @brief Updates the sprite editor.

View File

@@ -22,7 +22,7 @@ namespace emu {
* @class Emulator
* @brief A class for emulating and debugging SNES ROMs.
*/
class Emulator : public SharedROM {
class Emulator : public SharedRom {
public:
void Run();

View File

@@ -265,7 +265,7 @@ struct BackgroundLayer {
const int kPpuClockSpeed = 5369318; // 5.369318 MHz
class Ppu : public Observer, public SharedROM {
class Ppu : public Observer, public SharedRom {
public:
// Initializes the PPU with the necessary resources and dependencies
Ppu(memory::Memory& memory, Clock& clock) : memory_(memory), clock_(clock) {}

View File

@@ -22,6 +22,8 @@ namespace app {
*/
namespace gfx {
/**
* @brief Convert SDL_Surface to PNG image data.
*/

View File

@@ -516,7 +516,7 @@ absl::Status Rom::SaveAllPalettes() {
return absl::OkStatus();
}
std::shared_ptr<Rom> SharedROM::shared_rom_ = nullptr;
std::shared_ptr<Rom> SharedRom::shared_rom_ = nullptr;
} // namespace app
} // namespace yaze

View File

@@ -678,10 +678,10 @@ class Rom : public core::ExperimentFlags {
/**
* @brief A class to hold a shared pointer to a ROM object.
*/
class SharedROM {
class SharedRom {
public:
SharedROM() = default;
virtual ~SharedROM() = default;
SharedRom() = default;
virtual ~SharedRom() = default;
std::shared_ptr<Rom> shared_rom() {
if (!shared_rom_) {

View File

@@ -28,7 +28,7 @@ struct SubtypeInfo {
uint32_t routine_ptr;
};
class DungeonObjectRenderer : public SharedROM {
class DungeonObjectRenderer : public SharedRom {
public:
DungeonObjectRenderer() = default;

View File

@@ -116,7 +116,7 @@ struct ChestData {
struct StaircaseRooms {};
class Room : public SharedROM, public core::ExperimentFlags {
class Room : public SharedRom, public core::ExperimentFlags {
public:
Room() = default;
Room(int room_id) : room_id_(room_id) {}

View File

@@ -58,7 +58,7 @@ enum ObjectOption {
Stairs = 32
};
class RoomObject : public SharedROM {
class RoomObject : public SharedRom {
public:
enum LayerType { BG1 = 0, BG2 = 1, BG3 = 2 };

View File

@@ -480,7 +480,7 @@ struct MapData {
* This class is responsible for loading and saving the overworld data,
* as well as creating the tilesets and tilemaps for the overworld.
*/
class Overworld : public SharedROM, public core::ExperimentFlags {
class Overworld : public SharedRom, public core::ExperimentFlags {
public:
OWBlockset &GetMapTiles(int world_type);
absl::Status Load(Rom &rom);

View File

@@ -15,7 +15,7 @@ namespace screen {
constexpr int kInventoryStart = 0x6564A;
constexpr int kBowItemPos = 0x6F631;
class Inventory : public SharedROM {
class Inventory : public SharedRom {
public:
auto Bitmap() const { return bitmap_; }
auto Tilesheet() const { return tilesheets_bmp_; }