yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
room_layout.h
Go to the documentation of this file.
1#ifndef YAZE_APP_ZELDA3_DUNGEON_ROOM_LAYOUT_H
2#define YAZE_APP_ZELDA3_DUNGEON_ROOM_LAYOUT_H
3
4#include <vector>
5
6#include "absl/status/status.h"
7#include "absl/status/statusor.h"
10#include "rom/rom.h"
13
14namespace yaze::zelda3 {
15
17 public:
18 RoomLayout() = default;
19 explicit RoomLayout(Rom* rom) : rom_(rom) {}
20
21 void SetRom(Rom* rom) { rom_ = rom; }
22
23 absl::Status LoadLayout(int layout_id);
24
25 // Render the layout objects into the provided buffers
26 absl::Status Draw(int room_id, const uint8_t* gfx_data,
28 const gfx::PaletteGroup& palette_group,
29 DungeonState* state) const;
30
31 const std::vector<RoomObject>& GetObjects() const { return objects_; }
32
33 private:
34 absl::StatusOr<int> GetLayoutAddress(int layout_id) const;
35
36 Rom* rom_ = nullptr;
37 std::vector<RoomObject> objects_;
38};
39
40} // namespace yaze::zelda3
41
42#endif // YAZE_APP_ZELDA3_DUNGEON_ROOM_LAYOUT_H
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Definition rom.h:24
Interface for accessing dungeon game state.
void SetRom(Rom *rom)
Definition room_layout.h:21
std::vector< RoomObject > objects_
Definition room_layout.h:37
const std::vector< RoomObject > & GetObjects() const
Definition room_layout.h:31
absl::Status Draw(int room_id, const uint8_t *gfx_data, gfx::BackgroundBuffer &bg1, gfx::BackgroundBuffer &bg2, const gfx::PaletteGroup &palette_group, DungeonState *state) const
absl::StatusOr< int > GetLayoutAddress(int layout_id) const
absl::Status LoadLayout(int layout_id)
Zelda 3 specific classes and functions.
Definition editor.h:35
Represents a group of palettes.