Skip to content

Commit

Permalink
wzmaplib: Add MapPackage::updateLevelDetails()
Browse files Browse the repository at this point in the history
  • Loading branch information
past-due committed Aug 8, 2023
1 parent 6e5c9cf commit cb24a5a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/wzmaplib/include/wzmaplib/map_package.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ class MapPackage
// Obtain the LevelDetails
const LevelDetails& levelDetails() const;

// Update the LevelDetails
void updateLevelDetails(const LevelDetails& newLevelDetails);

// Get the loaded level details format
// Note: Returns a value only if the MapPackage was loaded (i.e. via loadPackage)
optional<LevelFormat> loadedLevelDetailsFormat() const;
Expand Down
5 changes: 5 additions & 0 deletions lib/wzmaplib/src/map_package.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1548,6 +1548,11 @@ const LevelDetails& MapPackage::levelDetails() const
return m_levelDetails;
}

void MapPackage::updateLevelDetails(const LevelDetails& newLevelDetails)
{
m_levelDetails = newLevelDetails;
}

// Get the loaded level details format
// Note: Returns a value only if the MapPackage was loaded (i.e. via loadPackage)
optional<LevelFormat> MapPackage::loadedLevelDetailsFormat() const
Expand Down

0 comments on commit cb24a5a

Please sign in to comment.