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

#include <overworld_entrance.h>

Inheritance diagram for yaze::zelda3::OverworldEntrance:
Collaboration diagram for yaze::zelda3::OverworldEntrance:

Public Member Functions

 OverworldEntrance ()
 
 OverworldEntrance (int x, int y, uint8_t entrance_id, short map_id, uint16_t map_pos, bool hole)
 
void UpdateMapProperties (uint16_t map_id, const void *context=nullptr) override
 Update entity properties based on map position.
 
void RememberHoleSourceState (size_t row)
 
bool HasUnchangedHoleSourceState (size_t row) const
 
- Public Member Functions inherited from yaze::zelda3::GameEntity
auto set_x (int x)
 
auto set_y (int y)
 
 GameEntity ()=default
 
virtual ~GameEntity ()
 

Public Attributes

uint16_t map_pos_ = 0
 
uint8_t entrance_id_ = 0
 
bool is_hole_ = false
 
bool deleted = false
 
- Public Attributes inherited from yaze::zelda3::GameEntity
enum yaze::zelda3::GameEntity::EntityType entity_type_
 
int x_ = 0
 
int y_ = 0
 
int game_x_ = 0
 
int game_y_ = 0
 
int entity_id_ = 0
 
uint16_t map_id_ = 0
 

Private Member Functions

std::array< int, 9 > HoleState () const
 

Private Attributes

std::optional< std::array< int, 9 > > hole_source_state_
 
size_t hole_source_row_ = 0
 

Additional Inherited Members

- Public Types inherited from yaze::zelda3::GameEntity
enum  EntityType {
  kEntrance = 0 , kExit = 1 , kItem = 2 , kSprite = 3 ,
  kTransport = 4 , kMusic = 5 , kTilemap = 6 , kProperties = 7 ,
  kDungeonSprite = 8
}
 

Detailed Description

Definition at line 110 of file overworld_entrance.h.

Constructor & Destructor Documentation

◆ OverworldEntrance() [1/2]

yaze::zelda3::OverworldEntrance::OverworldEntrance ( )
inline

◆ OverworldEntrance() [2/2]

yaze::zelda3::OverworldEntrance::OverworldEntrance ( int x,
int y,
uint8_t entrance_id,
short map_id,
uint16_t map_pos,
bool hole )
inline

Member Function Documentation

◆ UpdateMapProperties()

void yaze::zelda3::OverworldEntrance::UpdateMapProperties ( uint16_t map_id,
const void * context = nullptr )
inlineoverridevirtual

Update entity properties based on map position.

Parameters
map_idParent map ID to update to
contextOptional context (typically const Overworld* for coordinate calculations)

ZScream equivalent: UpdateMapStuff() / UpdateMapProperties()

This method recalculates derived properties like:

  • game_x_/game_y_ from world x_/y_ coordinates
  • Scroll/camera values for exits (if is_automatic_ = true)
  • Map position encoding for saving

Implements yaze::zelda3::GameEntity.

Definition at line 137 of file overworld_entrance.h.

References yaze::zelda3::GameEntity::game_x_, yaze::zelda3::GameEntity::game_y_, yaze::zelda3::GameEntity::map_id_, map_pos_, yaze::zelda3::GameEntity::x_, and yaze::zelda3::GameEntity::y_.

◆ RememberHoleSourceState()

void yaze::zelda3::OverworldEntrance::RememberHoleSourceState ( size_t row)
inline

Definition at line 158 of file overworld_entrance.h.

References hole_source_row_, hole_source_state_, and HoleState().

Here is the call graph for this function:

◆ HasUnchangedHoleSourceState()

bool yaze::zelda3::OverworldEntrance::HasUnchangedHoleSourceState ( size_t row) const
inline

Definition at line 162 of file overworld_entrance.h.

References hole_source_row_, hole_source_state_, and HoleState().

Here is the call graph for this function:

◆ HoleState()

Member Data Documentation

◆ map_pos_

uint16_t yaze::zelda3::OverworldEntrance::map_pos_ = 0

◆ entrance_id_

uint8_t yaze::zelda3::OverworldEntrance::entrance_id_ = 0

◆ is_hole_

◆ deleted

◆ hole_source_state_

std::optional<std::array<int, 9> > yaze::zelda3::OverworldEntrance::hole_source_state_
private

Definition at line 172 of file overworld_entrance.h.

Referenced by HasUnchangedHoleSourceState(), and RememberHoleSourceState().

◆ hole_source_row_

size_t yaze::zelda3::OverworldEntrance::hole_source_row_ = 0
private

Definition at line 173 of file overworld_entrance.h.

Referenced by HasUnchangedHoleSourceState(), and RememberHoleSourceState().


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