mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-26 02:20:54 +00:00
Changed: #1301 Added flag "modified" in ZoneRegionObject.
This commit is contained in:
parent
423d6ae8b3
commit
777c00f270
2 changed files with 35 additions and 7 deletions
|
@ -196,12 +196,12 @@ void ZoneRegionObject::setLigoData(const LigoData &data, const sint32 x, const s
|
|||
m_zoneRegion.setSharingCutEdges(x, y, 3, data.sharingCutEdges[3]);
|
||||
}
|
||||
|
||||
NLLIGO::CZoneRegion &ZoneRegionObject::zoneRegion()
|
||||
NLLIGO::CZoneRegion &ZoneRegionObject::ligoZoneRegion()
|
||||
{
|
||||
return m_zoneRegion;
|
||||
}
|
||||
|
||||
void ZoneRegionObject::setZoneRegion(const NLLIGO::CZoneRegion &zoneRegion)
|
||||
void ZoneRegionObject::setLigoZoneRegion(const NLLIGO::CZoneRegion &zoneRegion)
|
||||
{
|
||||
m_zoneRegion = zoneRegion;
|
||||
}
|
||||
|
@ -214,4 +214,14 @@ bool ZoneRegionObject::checkPos(const sint32 x, const sint32 y)
|
|||
(y <= m_zoneRegion.getMaxY()));
|
||||
}
|
||||
|
||||
bool ZoneRegionObject::isModified() const
|
||||
{
|
||||
return m_modified;
|
||||
}
|
||||
|
||||
void ZoneRegionObject::setModified(bool modified)
|
||||
{
|
||||
m_modified = modified;
|
||||
}
|
||||
|
||||
} /* namespace LandscapeEditor */
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
namespace LandscapeEditor
|
||||
{
|
||||
|
||||
// Data
|
||||
struct LigoData
|
||||
{
|
||||
uint8 posX;
|
||||
|
@ -47,33 +48,50 @@ struct LigoData
|
|||
bool operator!= (const LigoData& other) const;
|
||||
};
|
||||
|
||||
/**
|
||||
@class ZoneRegionObject
|
||||
@brief
|
||||
@details
|
||||
*/
|
||||
class ZoneRegionObject
|
||||
{
|
||||
public:
|
||||
ZoneRegionObject();
|
||||
~ZoneRegionObject();
|
||||
|
||||
// Load landscape data from file
|
||||
/// Load landscape data from file
|
||||
bool load(const std::string &fileName);
|
||||
|
||||
// Save landscape data to file
|
||||
/// Save landscape data to file (before save, should set file name).
|
||||
bool save();
|
||||
|
||||
/// Get ligo data
|
||||
void ligoData(LigoData &data, const sint32 x, const sint32 y);
|
||||
|
||||
/// Set ligo data
|
||||
void setLigoData(const LigoData &data, const sint32 x, const sint32 y);
|
||||
|
||||
/// Get file name
|
||||
std::string fileName() const;
|
||||
|
||||
// Set file name
|
||||
/// Set file name, use for saving data in file
|
||||
void setFileName(const std::string &fileName);
|
||||
|
||||
NLLIGO::CZoneRegion &zoneRegion();
|
||||
/// Accessor to LIGO CZoneRegion
|
||||
NLLIGO::CZoneRegion &ligoZoneRegion();
|
||||
|
||||
void setZoneRegion(const NLLIGO::CZoneRegion &zoneRegion);
|
||||
void setLigoZoneRegion(const NLLIGO::CZoneRegion &zoneRegion);
|
||||
|
||||
/// Check position, it belongs to the landscape
|
||||
bool checkPos(const sint32 x, const sint32 y);
|
||||
|
||||
/// Helper flag to know if a ps has been modified
|
||||
/// @{
|
||||
bool isModified() const;
|
||||
|
||||
void setModified(bool modified);
|
||||
/// @}
|
||||
|
||||
private:
|
||||
|
||||
bool m_modified;
|
||||
|
|
Loading…
Reference in a new issue