Large refactoring, using the Entity-Component model.
This commit is contained in:
44
src/assets/Ground.h
Normal file
44
src/assets/Ground.h
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Ground.h
|
||||
*
|
||||
* Created on: Nov 30, 2016
|
||||
* Author: tibi
|
||||
*/
|
||||
|
||||
#ifndef ASSETS_GROUND_H_
|
||||
#define ASSETS_GROUND_H_
|
||||
|
||||
namespace farmlands {
|
||||
namespace assets {
|
||||
|
||||
/**
|
||||
* Maps tiles to ground name
|
||||
*/
|
||||
enum class Ground
|
||||
{
|
||||
Dirt = 0,
|
||||
DirtVariation0 = 1,
|
||||
DirtVariation1 = 2,
|
||||
DirtVariation2 = 3,
|
||||
DirtVariation3 = 4,
|
||||
DirtVariation4 = 5,
|
||||
DirtVariation5 = 6,
|
||||
DirtVariation6 = 7,
|
||||
DirtVariation7 = 8,
|
||||
DirtVariation8 = 9,
|
||||
|
||||
SoilCenter = 30,
|
||||
|
||||
SoilWet = 36
|
||||
};
|
||||
|
||||
inline bool groundIsDirt(int cell) { return cell >= Ground::Dirt && cell <= Ground::DirtVariation8; }
|
||||
inline bool groundIsDrySoil(int cell) { return cell == Ground::SoilCenter; }
|
||||
inline bool groundIsWetSoil(int cell) { return cell == Ground::SoilWet; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif /* ASSETS_GROUND_H_ */
|
Reference in New Issue
Block a user