Large refactoring, using the Entity-Component model.

This commit is contained in:
2016-11-30 19:50:01 +02:00
parent bcd0a359fc
commit 9c8cbf8518
53 changed files with 1616 additions and 675 deletions

44
src/assets/Ground.h Normal file
View 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_ */