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 "
util/stop_token.h
"
12
#include "
zelda3/dungeon/editor_dungeon_state.h
"
13
#include "
zelda3/dungeon/room_object.h
"
14
15
namespace
yaze::zelda3
{
16
17
class
RoomLayout
{
18
public
:
19
RoomLayout
() =
default
;
20
explicit
RoomLayout
(
Rom
* rom) :
rom_
(rom) {}
21
22
void
SetRom
(
Rom
* rom) {
rom_
= rom; }
23
24
// Reject unterminated/truncated fixed-layout streams. Failed or cancelled
25
// loads leave no decoded objects, including after a prior successful load.
26
absl::Status
LoadLayout
(
int
layout_id,
util::StopToken
stop_token = {});
27
28
// Render the layout objects into the provided buffers
29
absl::Status
Draw
(
int
room_id,
const
uint8_t* gfx_data,
30
gfx::BackgroundBuffer
& bg1,
gfx::BackgroundBuffer
& bg2,
31
const
gfx::PaletteGroup
& palette_group, DungeonState* state,
32
uint8_t floor1_graphics, uint8_t floor2_graphics)
const
;
33
34
const
std::vector<RoomObject>&
GetObjects
()
const
{
return
objects_
; }
35
36
private
:
37
absl::StatusOr<int>
GetLayoutAddress
(
int
layout_id)
const
;
38
39
Rom
*
rom_
=
nullptr
;
40
std::vector<RoomObject>
objects_
;
41
};
42
43
}
// namespace yaze::zelda3
44
45
#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:49
yaze::gfx::BackgroundBuffer
Definition
background_buffer.h:27
yaze::util::StopToken
Definition
stop_token.h:15
yaze::zelda3::RoomLayout
Definition
room_layout.h:17
yaze::zelda3::RoomLayout::RoomLayout
RoomLayout(Rom *rom)
Definition
room_layout.h:20
yaze::zelda3::RoomLayout::SetRom
void SetRom(Rom *rom)
Definition
room_layout.h:22
yaze::zelda3::RoomLayout::objects_
std::vector< RoomObject > objects_
Definition
room_layout.h:40
yaze::zelda3::RoomLayout::rom_
Rom * rom_
Definition
room_layout.h:39
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:109
yaze::zelda3::RoomLayout::GetObjects
const std::vector< RoomObject > & GetObjects() const
Definition
room_layout.h:34
yaze::zelda3::RoomLayout::GetLayoutAddress
absl::StatusOr< int > GetLayoutAddress(int layout_id) const
Definition
room_layout.cc:14
yaze::zelda3::RoomLayout::RoomLayout
RoomLayout()=default
yaze::zelda3::RoomLayout::LoadLayout
absl::Status LoadLayout(int layout_id, util::StopToken stop_token={})
Definition
room_layout.cc:34
editor_dungeon_state.h
yaze::zelda3
Zelda 3 specific classes and functions.
Definition
dungeon_entrance_camera.h:9
rom.h
room_object.h
snes_palette.h
stop_token.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