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"
8
#include "
app/gfx/render/background_buffer.h
"
9
#include "
app/gfx/types/snes_palette.h
"
10
#include "
rom/rom.h
"
11
#include "
zelda3/dungeon/editor_dungeon_state.h
"
12
#include "
zelda3/dungeon/room_object.h
"
13
14
namespace
yaze::zelda3
{
15
16
class
RoomLayout
{
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,
27
gfx::BackgroundBuffer
& bg1,
gfx::BackgroundBuffer
& bg2,
28
const
gfx::PaletteGroup
& palette_group,
DungeonState
* state,
29
uint8_t floor1_graphics, uint8_t floor2_graphics)
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
background_buffer.h
yaze::Rom
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Definition
rom.h:28
yaze::gfx::BackgroundBuffer
Definition
background_buffer.h:27
yaze::zelda3::DungeonState
Interface for accessing dungeon game state.
Definition
dungeon_state.h:16
yaze::zelda3::RoomLayout
Definition
room_layout.h:16
yaze::zelda3::RoomLayout::RoomLayout
RoomLayout(Rom *rom)
Definition
room_layout.h:19
yaze::zelda3::RoomLayout::SetRom
void SetRom(Rom *rom)
Definition
room_layout.h:21
yaze::zelda3::RoomLayout::objects_
std::vector< RoomObject > objects_
Definition
room_layout.h:37
yaze::zelda3::RoomLayout::rom_
Rom * rom_
Definition
room_layout.h:36
yaze::zelda3::RoomLayout::Draw
absl::Status Draw(int room_id, const uint8_t *gfx_data, gfx::BackgroundBuffer &bg1, gfx::BackgroundBuffer &bg2, const gfx::PaletteGroup &palette_group, DungeonState *state, uint8_t floor1_graphics, uint8_t floor2_graphics) const
Definition
room_layout.cc:87
yaze::zelda3::RoomLayout::GetObjects
const std::vector< RoomObject > & GetObjects() const
Definition
room_layout.h:31
yaze::zelda3::RoomLayout::GetLayoutAddress
absl::StatusOr< int > GetLayoutAddress(int layout_id) const
Definition
room_layout.cc:11
yaze::zelda3::RoomLayout::LoadLayout
absl::Status LoadLayout(int layout_id)
Definition
room_layout.cc:31
yaze::zelda3::RoomLayout::RoomLayout
RoomLayout()=default
editor_dungeon_state.h
yaze::zelda3
Zelda 3 specific classes and functions.
Definition
dungeon_rendering_helpers.h:14
rom.h
room_object.h
snes_palette.h
yaze::gfx::PaletteGroup
Represents a group of palettes.
Definition
snes_palette.h:210
src
zelda3
dungeon
room_layout.h
Generated by
1.10.0