Store custom graphics classifications as symbols instead of integers
This commit is contained in:
@@ -575,7 +575,7 @@ std::string cPict::parse(ticpp::Element& who, std::string fname) {
|
||||
void cPict::recalcRect() {
|
||||
rectangle bounds = getBounds();
|
||||
switch(picType) {
|
||||
case NUM_PIC_TYPES: break;
|
||||
case NUM_PIC_TYPES: case PIC_NONE: break;
|
||||
case PIC_TER: case PIC_CUSTOM_TER:
|
||||
case PIC_TER_ANIM: case PIC_CUSTOM_TER_ANIM:
|
||||
case PIC_MONST: case PIC_CUSTOM_MONST: case PIC_PARTY_MONST:
|
||||
|
@@ -14,6 +14,7 @@
|
||||
|
||||
/// Specifies an icon type.
|
||||
enum ePicType {
|
||||
PIC_NONE = 0, ///< Mostly unused, means just show a black square
|
||||
PIC_TER = 1, ///< 28x36 terrain graphic from the preset sheets
|
||||
PIC_TER_ANIM = 2, ///< 28x36 terrain graphic from the preset animated terrain sheet
|
||||
PIC_MONST = 3, ///< 28x36 monster graphic from the preset sheets
|
||||
@@ -137,4 +138,7 @@ ePicType&operator -=(ePicType&lhs, ePicTypeMod rhs);
|
||||
/// @return true if the modifier is present.
|
||||
bool operator& (ePicType lhs, ePicTypeMod rhs);
|
||||
|
||||
std::ostream& operator<< (std::ostream& out, ePicType pic);
|
||||
std::istream& operator>> (std::istream& in, ePicType& pic);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user