yaze 0.2.0
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
screen_editor.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_SCREEN_EDITOR_H
2#define YAZE_APP_EDITOR_SCREEN_EDITOR_H
3
4#include <array>
5
6#include "absl/status/status.h"
9#include "app/gfx/bitmap.h"
11#include "app/gfx/snes_tile.h"
12#include "app/gfx/tilesheet.h"
13#include "app/gui/canvas.h"
14#include "app/gui/color.h"
15#include "app/gui/icons.h"
16#include "app/rom.h"
19#include "imgui/imgui.h"
20
21namespace yaze {
22namespace app {
23namespace editor {
24
39class ScreenEditor : public SharedRom, public Editor {
40 public:
45
46 absl::Status Update() override;
47
48 absl::Status Undo() override { return absl::UnimplementedError("Undo"); }
49 absl::Status Redo() override { return absl::UnimplementedError("Redo"); }
50 absl::Status Cut() override { return absl::UnimplementedError("Cut"); }
51 absl::Status Copy() override { return absl::UnimplementedError("Copy"); }
52 absl::Status Paste() override { return absl::UnimplementedError("Paste"); }
53 absl::Status Find() override { return absl::UnimplementedError("Find"); }
54
55 absl::Status SaveDungeonMaps();
56
57 private:
61
63 void DrawToolset();
65
66 absl::Status LoadDungeonMaps();
67 absl::Status LoadDungeonMapTile16();
70
72
73 uint8_t selected_room = 0;
74 uint8_t boss_room = 0;
75
78 int floor_number = 1;
79
80 bool copy_button_pressed = false;
82
83 std::vector<uint8_t> all_gfx_;
84 std::unordered_map<int, gfx::Bitmap> tile16_individual_;
85 std::vector<zelda3::screen::DungeonMap> dungeon_maps_;
86 std::vector<std::vector<std::array<std::string, 25>>> dungeon_map_labels_;
87
88 absl::Status status_;
89
93
97
99};
100
101} // namespace editor
102} // namespace app
103} // namespace yaze
104
105#endif
A class to hold a shared pointer to a Rom object.
Definition rom.h:585
Interface for editor classes.
Definition editor.h:39
The ScreenEditor class allows the user to edit a variety of screens in the game or create a custom me...
std::vector< std::vector< std::array< std::string, 25 > > > dungeon_map_labels_
absl::Status Update() override
absl::Status Cut() override
absl::Status Redo() override
zelda3::screen::Inventory inventory_
absl::Status Paste() override
absl::Status Undo() override
absl::Status Copy() override
std::vector< zelda3::screen::DungeonMap > dungeon_maps_
std::vector< uint8_t > all_gfx_
std::unordered_map< int, gfx::Bitmap > tile16_individual_
absl::Status Find() override
Represents a palette of colors for the Super Nintendo Entertainment System (SNES).
Represents a tilesheet, which is a collection of tiles stored in a bitmap.
Definition tilesheet.h:26
Represents a canvas for drawing and manipulating graphics.
Definition canvas.h:36
void SetCanvasSize(ImVec2 canvas_size)
Definition canvas.h:134
std::unordered_map< int, gfx::Bitmap > BitmapTable
Definition bitmap.h:221
Definition common.cc:21