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

#include <crumble_floor_model.h>

Public Types

using Words = std::array<uint16_t, kCellCount>
 

Public Member Functions

void Reset (const Words &words)
 
absl::Status Step (int x, int y)
 
void Back ()
 
CrumbleFloorCell cell (int index) const
 
const std::vector< int > & route () const
 
std::optional< int > current () const
 

Static Public Attributes

static constexpr int kWidth = 32
 
static constexpr int kCellCount = kWidth * kWidth
 
static constexpr int kMaxSteps = 512
 

Private Member Functions

void Rebuild ()
 

Private Attributes

Words words_ {}
 
std::array< CrumbleFloorCell, kCellCount > cells_ {}
 
std::vector< int > route_
 

Detailed Description

Definition at line 20 of file crumble_floor_model.h.

Member Typedef Documentation

◆ Words

using yaze::editor::CrumbleFloorModel::Words = std::array<uint16_t, kCellCount>

Definition at line 25 of file crumble_floor_model.h.

Member Function Documentation

◆ Reset()

void yaze::editor::CrumbleFloorModel::Reset ( const Words & words)

Definition at line 31 of file crumble_floor_model.cc.

References Rebuild(), route_, and words_.

Referenced by yaze::editor::CrumbleFloorView::DrawControls(), and yaze::editor::CrumbleFloorView::Sync().

Here is the call graph for this function:

◆ Step()

absl::Status yaze::editor::CrumbleFloorModel::Step ( int x,
int y )

Definition at line 37 of file crumble_floor_model.cc.

References cells_, current(), kMaxSteps, yaze::editor::kOther, yaze::editor::kPit, kWidth, and route_.

Referenced by yaze::editor::CrumbleFloorView::DrawCanvas().

Here is the call graph for this function:

◆ Back()

void yaze::editor::CrumbleFloorModel::Back ( )

Definition at line 70 of file crumble_floor_model.cc.

References Rebuild(), and route_.

Referenced by yaze::editor::CrumbleFloorView::DrawControls().

Here is the call graph for this function:

◆ cell()

CrumbleFloorCell yaze::editor::CrumbleFloorModel::cell ( int index) const
inline

Definition at line 30 of file crumble_floor_model.h.

References cells_.

Referenced by yaze::editor::CrumbleFloorView::DrawCanvas().

◆ route()

const std::vector< int > & yaze::editor::CrumbleFloorModel::route ( ) const
inline

◆ current()

std::optional< int > yaze::editor::CrumbleFloorModel::current ( ) const
inline

Definition at line 32 of file crumble_floor_model.h.

References route_.

Referenced by yaze::editor::CrumbleFloorView::DrawCanvas(), and Step().

◆ Rebuild()

void yaze::editor::CrumbleFloorModel::Rebuild ( )
private

Definition at line 77 of file crumble_floor_model.cc.

References cells_, yaze::editor::ClassifyCrumbleFloorWord(), kCellCount, route_, and words_.

Referenced by Back(), and Reset().

Here is the call graph for this function:

Member Data Documentation

◆ kWidth

constexpr int yaze::editor::CrumbleFloorModel::kWidth = 32
staticconstexpr

Definition at line 22 of file crumble_floor_model.h.

Referenced by Step().

◆ kCellCount

constexpr int yaze::editor::CrumbleFloorModel::kCellCount = kWidth * kWidth
staticconstexpr

Definition at line 23 of file crumble_floor_model.h.

Referenced by yaze::editor::CrumbleFloorView::DrawCanvas(), and Rebuild().

◆ kMaxSteps

constexpr int yaze::editor::CrumbleFloorModel::kMaxSteps = 512
staticconstexpr

Definition at line 24 of file crumble_floor_model.h.

Referenced by Step().

◆ words_

Words yaze::editor::CrumbleFloorModel::words_ {}
private

Definition at line 38 of file crumble_floor_model.h.

Referenced by Rebuild(), and Reset().

◆ cells_

std::array<CrumbleFloorCell, kCellCount> yaze::editor::CrumbleFloorModel::cells_ {}
private

Definition at line 39 of file crumble_floor_model.h.

Referenced by cell(), Rebuild(), and Step().

◆ route_

std::vector<int> yaze::editor::CrumbleFloorModel::route_
private

Definition at line 40 of file crumble_floor_model.h.

Referenced by Back(), current(), Rebuild(), Reset(), route(), and Step().


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