yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::zelda3::Inventory Class Reference

Inventory manages the inventory screen graphics and layout. More...

#include <inventory.h>

Collaboration diagram for yaze::zelda3::Inventory:

Public Member Functions

absl::Status Create (Rom *rom)
 Initialize and load inventory screen data from ROM.
 
auto & bitmap ()
 
auto & tilesheet ()
 
auto & palette ()
 
auto & item_icons ()
 

Private Member Functions

absl::Status BuildTileset (Rom *rom)
 Build the tileset from 2BPP graphics.
 
absl::Status LoadItemIcons (Rom *rom)
 Load individual item icons from ROM.
 

Private Attributes

std::vector< uint8_t > data_
 
gfx::Bitmap bitmap_
 
std::vector< uint8_t > tilesheets_
 
std::vector< uint8_t > test_
 
gfx::Bitmap tilesheets_bmp_
 
gfx::SnesPalette palette_
 
gui::Canvas canvas_
 
std::vector< gfx::TileInfotiles_
 
std::vector< ItemIconitem_icons_
 

Detailed Description

Inventory manages the inventory screen graphics and layout.

The inventory screen consists of a 256x256 bitmap displaying equipment, items, and UI elements using 2BPP graphics and HUD palette.

Definition at line 35 of file inventory.h.

Member Function Documentation

◆ Create()

absl::Status yaze::zelda3::Inventory::Create ( Rom rom)

◆ bitmap()

auto & yaze::zelda3::Inventory::bitmap ( )
inline

Definition at line 43 of file inventory.h.

References bitmap_.

Referenced by yaze::editor::ScreenEditor::DrawInventoryMenuEditor().

◆ tilesheet()

auto & yaze::zelda3::Inventory::tilesheet ( )
inline

Definition at line 44 of file inventory.h.

References tilesheets_bmp_.

Referenced by yaze::editor::ScreenEditor::DrawInventoryMenuEditor().

◆ palette()

auto & yaze::zelda3::Inventory::palette ( )
inline

Definition at line 45 of file inventory.h.

References palette_.

Referenced by yaze::editor::ScreenEditor::DrawInventoryMenuEditor().

◆ item_icons()

auto & yaze::zelda3::Inventory::item_icons ( )
inline

Definition at line 46 of file inventory.h.

References item_icons_.

Referenced by yaze::editor::ScreenEditor::DrawInventoryItemIcons().

◆ BuildTileset()

absl::Status yaze::zelda3::Inventory::BuildTileset ( Rom rom)
private

◆ LoadItemIcons()

absl::Status yaze::zelda3::Inventory::LoadItemIcons ( Rom rom)
private

Load individual item icons from ROM.

Parameters
romROM instance to read icon data from

Definition at line 65 of file inventory.cc.

References ASSIGN_OR_RETURN, item_icons_, yaze::zelda3::kItemIconsPtr, yaze::zelda3::ItemIcon::name, yaze::Rom::ReadWord(), RETURN_IF_ERROR, yaze::SnesToPc(), yaze::zelda3::ItemIcon::tile_bl, yaze::zelda3::ItemIcon::tile_br, yaze::zelda3::ItemIcon::tile_tl, and yaze::zelda3::ItemIcon::tile_tr.

Referenced by Create().

Here is the call graph for this function:

Member Data Documentation

◆ data_

std::vector<uint8_t> yaze::zelda3::Inventory::data_
private

Definition at line 61 of file inventory.h.

Referenced by Create().

◆ bitmap_

gfx::Bitmap yaze::zelda3::Inventory::bitmap_
private

Definition at line 62 of file inventory.h.

Referenced by bitmap(), and Create().

◆ tilesheets_

std::vector<uint8_t> yaze::zelda3::Inventory::tilesheets_
private

Definition at line 64 of file inventory.h.

Referenced by BuildTileset().

◆ test_

std::vector<uint8_t> yaze::zelda3::Inventory::test_
private

Definition at line 65 of file inventory.h.

Referenced by BuildTileset().

◆ tilesheets_bmp_

gfx::Bitmap yaze::zelda3::Inventory::tilesheets_bmp_
private

Definition at line 66 of file inventory.h.

Referenced by BuildTileset(), and tilesheet().

◆ palette_

gfx::SnesPalette yaze::zelda3::Inventory::palette_
private

Definition at line 67 of file inventory.h.

Referenced by BuildTileset(), Create(), and palette().

◆ canvas_

gui::Canvas yaze::zelda3::Inventory::canvas_
private

Definition at line 69 of file inventory.h.

◆ tiles_

std::vector<gfx::TileInfo> yaze::zelda3::Inventory::tiles_
private

Definition at line 70 of file inventory.h.

◆ item_icons_

std::vector<ItemIcon> yaze::zelda3::Inventory::item_icons_
private

Definition at line 71 of file inventory.h.

Referenced by item_icons(), and LoadItemIcons().


The documentation for this class was generated from the following files: