Rename SharedROM to SharedRom
This commit is contained in:
@@ -195,7 +195,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)openFileAction:(id)sender {
|
- (void)openFileAction:(id)sender {
|
||||||
yaze::app::SharedROM::shared_rom_->LoadFromFile(FileDialogWrapper::ShowOpenFileDialog());
|
yaze::app::SharedRom::shared_rom_->LoadFromFile(FileDialogWrapper::ShowOpenFileDialog());
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)cutAction:(id)sender {
|
- (void)cutAction:(id)sender {
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ constexpr ImGuiTableFlags kDungeonTableFlags =
|
|||||||
* entrances, calculating usage statistics, and rendering set usage.
|
* entrances, calculating usage statistics, and rendering set usage.
|
||||||
*/
|
*/
|
||||||
class DungeonEditor : public Editor,
|
class DungeonEditor : public Editor,
|
||||||
public SharedROM,
|
public SharedRom,
|
||||||
public core::ExperimentFlags {
|
public core::ExperimentFlags {
|
||||||
public:
|
public:
|
||||||
absl::Status Update() override;
|
absl::Status Update() override;
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ constexpr ImGuiTableFlags kGfxEditFlags = ImGuiTableFlags_Reorderable |
|
|||||||
* drawing toolsets, palette controls, clipboard imports, experimental features,
|
* drawing toolsets, palette controls, clipboard imports, experimental features,
|
||||||
* and memory editor.
|
* and memory editor.
|
||||||
*/
|
*/
|
||||||
class GraphicsEditor : public SharedROM {
|
class GraphicsEditor : public SharedRom {
|
||||||
public:
|
public:
|
||||||
absl::Status Update();
|
absl::Status Update();
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ namespace editor {
|
|||||||
* @brief The MasterEditor class represents the main editor for a ROM in the
|
* @brief The MasterEditor class represents the main editor for a ROM in the
|
||||||
* Yaze application.
|
* 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
|
* provides functionality for setting up the screen, updating the editor, and
|
||||||
* shutting down the editor. It also includes methods for drawing various menus
|
* shutting down the editor. It also includes methods for drawing various menus
|
||||||
* and popups, saving the ROM, and managing editor-specific flags.
|
* 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
|
* @note This class assumes the presence of an SDL_Renderer object for rendering
|
||||||
* graphics.
|
* graphics.
|
||||||
*/
|
*/
|
||||||
class MasterEditor : public SharedROM,
|
class MasterEditor : public SharedRom,
|
||||||
public context::GfxContext,
|
public context::GfxContext,
|
||||||
public core::ExperimentFlags {
|
public core::ExperimentFlags {
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ namespace editor {
|
|||||||
* @class GfxGroupEditor
|
* @class GfxGroupEditor
|
||||||
* @brief Manage graphics group configurations in a ROM.
|
* @brief Manage graphics group configurations in a ROM.
|
||||||
*/
|
*/
|
||||||
class GfxGroupEditor : public SharedROM {
|
class GfxGroupEditor : public SharedRom {
|
||||||
public:
|
public:
|
||||||
absl::Status Update();
|
absl::Status Update();
|
||||||
|
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ static constexpr absl::string_view kSongNotes[] = {
|
|||||||
* @class MusicEditor
|
* @class MusicEditor
|
||||||
* @brief A class for editing music data in a ROM.
|
* @brief A class for editing music data in a ROM.
|
||||||
*/
|
*/
|
||||||
class MusicEditor : public SharedROM {
|
class MusicEditor : public SharedRom {
|
||||||
public:
|
public:
|
||||||
void Update();
|
void Update();
|
||||||
|
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ class PaletteEditorHistory {
|
|||||||
* @class PaletteEditor
|
* @class PaletteEditor
|
||||||
* @brief Allows the user to view and edit in game palettes.
|
* @brief Allows the user to view and edit in game palettes.
|
||||||
*/
|
*/
|
||||||
class PaletteEditor : public SharedROM {
|
class PaletteEditor : public SharedRom {
|
||||||
public:
|
public:
|
||||||
absl::Status Update();
|
absl::Status Update();
|
||||||
absl::Status DrawPaletteGroups();
|
absl::Status DrawPaletteGroups();
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ namespace editor {
|
|||||||
/**
|
/**
|
||||||
* @brief Popup window to edit Tile16 data
|
* @brief Popup window to edit Tile16 data
|
||||||
*/
|
*/
|
||||||
class Tile16Editor : public context::GfxContext, public SharedROM {
|
class Tile16Editor : public context::GfxContext, public SharedRom {
|
||||||
public:
|
public:
|
||||||
absl::Status Update();
|
absl::Status Update();
|
||||||
absl::Status DrawMenu();
|
absl::Status DrawMenu();
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ constexpr absl::string_view kOWMapTable = "#MapSettingsTable";
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class OverworldEditor : public Editor,
|
class OverworldEditor : public Editor,
|
||||||
public SharedROM,
|
public SharedRom,
|
||||||
public context::GfxContext,
|
public context::GfxContext,
|
||||||
public context::EntranceContext,
|
public context::EntranceContext,
|
||||||
public core::ExperimentFlags {
|
public core::ExperimentFlags {
|
||||||
|
|||||||
@@ -34,9 +34,9 @@ namespace editor {
|
|||||||
* The screens that can be edited include the title screen, naming screen,
|
* The screens that can be edited include the title screen, naming screen,
|
||||||
* overworld map, inventory menu, and more.
|
* 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:
|
public:
|
||||||
ScreenEditor();
|
ScreenEditor();
|
||||||
void Update();
|
void Update();
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace editor {
|
|||||||
* This class provides functionality for updating the sprite editor, drawing the
|
* This class provides functionality for updating the sprite editor, drawing the
|
||||||
* editor table, drawing the sprite canvas, and drawing the current sheets.
|
* editor table, drawing the sprite canvas, and drawing the current sheets.
|
||||||
*/
|
*/
|
||||||
class SpriteEditor : public SharedROM {
|
class SpriteEditor : public SharedRom {
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* @brief Updates the sprite editor.
|
* @brief Updates the sprite editor.
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ namespace emu {
|
|||||||
* @class Emulator
|
* @class Emulator
|
||||||
* @brief A class for emulating and debugging SNES ROMs.
|
* @brief A class for emulating and debugging SNES ROMs.
|
||||||
*/
|
*/
|
||||||
class Emulator : public SharedROM {
|
class Emulator : public SharedRom {
|
||||||
public:
|
public:
|
||||||
void Run();
|
void Run();
|
||||||
|
|
||||||
|
|||||||
@@ -265,7 +265,7 @@ struct BackgroundLayer {
|
|||||||
|
|
||||||
const int kPpuClockSpeed = 5369318; // 5.369318 MHz
|
const int kPpuClockSpeed = 5369318; // 5.369318 MHz
|
||||||
|
|
||||||
class Ppu : public Observer, public SharedROM {
|
class Ppu : public Observer, public SharedRom {
|
||||||
public:
|
public:
|
||||||
// Initializes the PPU with the necessary resources and dependencies
|
// Initializes the PPU with the necessary resources and dependencies
|
||||||
Ppu(memory::Memory& memory, Clock& clock) : memory_(memory), clock_(clock) {}
|
Ppu(memory::Memory& memory, Clock& clock) : memory_(memory), clock_(clock) {}
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ namespace app {
|
|||||||
*/
|
*/
|
||||||
namespace gfx {
|
namespace gfx {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Convert SDL_Surface to PNG image data.
|
* @brief Convert SDL_Surface to PNG image data.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -516,7 +516,7 @@ absl::Status Rom::SaveAllPalettes() {
|
|||||||
return absl::OkStatus();
|
return absl::OkStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<Rom> SharedROM::shared_rom_ = nullptr;
|
std::shared_ptr<Rom> SharedRom::shared_rom_ = nullptr;
|
||||||
|
|
||||||
} // namespace app
|
} // namespace app
|
||||||
} // namespace yaze
|
} // namespace yaze
|
||||||
@@ -678,10 +678,10 @@ class Rom : public core::ExperimentFlags {
|
|||||||
/**
|
/**
|
||||||
* @brief A class to hold a shared pointer to a ROM object.
|
* @brief A class to hold a shared pointer to a ROM object.
|
||||||
*/
|
*/
|
||||||
class SharedROM {
|
class SharedRom {
|
||||||
public:
|
public:
|
||||||
SharedROM() = default;
|
SharedRom() = default;
|
||||||
virtual ~SharedROM() = default;
|
virtual ~SharedRom() = default;
|
||||||
|
|
||||||
std::shared_ptr<Rom> shared_rom() {
|
std::shared_ptr<Rom> shared_rom() {
|
||||||
if (!shared_rom_) {
|
if (!shared_rom_) {
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ struct SubtypeInfo {
|
|||||||
uint32_t routine_ptr;
|
uint32_t routine_ptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DungeonObjectRenderer : public SharedROM {
|
class DungeonObjectRenderer : public SharedRom {
|
||||||
public:
|
public:
|
||||||
DungeonObjectRenderer() = default;
|
DungeonObjectRenderer() = default;
|
||||||
|
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ struct ChestData {
|
|||||||
|
|
||||||
struct StaircaseRooms {};
|
struct StaircaseRooms {};
|
||||||
|
|
||||||
class Room : public SharedROM, public core::ExperimentFlags {
|
class Room : public SharedRom, public core::ExperimentFlags {
|
||||||
public:
|
public:
|
||||||
Room() = default;
|
Room() = default;
|
||||||
Room(int room_id) : room_id_(room_id) {}
|
Room(int room_id) : room_id_(room_id) {}
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ enum ObjectOption {
|
|||||||
Stairs = 32
|
Stairs = 32
|
||||||
};
|
};
|
||||||
|
|
||||||
class RoomObject : public SharedROM {
|
class RoomObject : public SharedRom {
|
||||||
public:
|
public:
|
||||||
enum LayerType { BG1 = 0, BG2 = 1, BG3 = 2 };
|
enum LayerType { BG1 = 0, BG2 = 1, BG3 = 2 };
|
||||||
|
|
||||||
|
|||||||
@@ -480,7 +480,7 @@ struct MapData {
|
|||||||
* This class is responsible for loading and saving the overworld data,
|
* This class is responsible for loading and saving the overworld data,
|
||||||
* as well as creating the tilesets and tilemaps for the overworld.
|
* 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:
|
public:
|
||||||
OWBlockset &GetMapTiles(int world_type);
|
OWBlockset &GetMapTiles(int world_type);
|
||||||
absl::Status Load(Rom &rom);
|
absl::Status Load(Rom &rom);
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ namespace screen {
|
|||||||
constexpr int kInventoryStart = 0x6564A;
|
constexpr int kInventoryStart = 0x6564A;
|
||||||
constexpr int kBowItemPos = 0x6F631;
|
constexpr int kBowItemPos = 0x6F631;
|
||||||
|
|
||||||
class Inventory : public SharedROM {
|
class Inventory : public SharedRom {
|
||||||
public:
|
public:
|
||||||
auto Bitmap() const { return bitmap_; }
|
auto Bitmap() const { return bitmap_; }
|
||||||
auto Tilesheet() const { return tilesheets_bmp_; }
|
auto Tilesheet() const { return tilesheets_bmp_; }
|
||||||
|
|||||||
Reference in New Issue
Block a user