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 ()=default
 
 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.
 
- 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_
 
uint8_t entrance_id_
 
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
 

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 83 of file overworld_entrance.h.

Constructor & Destructor Documentation

◆ OverworldEntrance() [1/2]

yaze::zelda3::OverworldEntrance::OverworldEntrance ( )
default

◆ 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 110 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_.

Member Data Documentation

◆ map_pos_

uint16_t yaze::zelda3::OverworldEntrance::map_pos_

Definition at line 85 of file overworld_entrance.h.

Referenced by UpdateMapProperties().

◆ entrance_id_

uint8_t yaze::zelda3::OverworldEntrance::entrance_id_

Definition at line 86 of file overworld_entrance.h.

Referenced by yaze::editor::DrawOverworldEntrancePopup().

◆ is_hole_

bool yaze::zelda3::OverworldEntrance::is_hole_ = false

Definition at line 87 of file overworld_entrance.h.

Referenced by yaze::editor::DrawOverworldEntrancePopup().

◆ deleted

bool yaze::zelda3::OverworldEntrance::deleted = false

Definition at line 88 of file overworld_entrance.h.

Referenced by yaze::editor::DrawOverworldEntrancePopup().


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