Store custom graphics classifications as symbols instead of integers

This commit is contained in:
2020-02-09 12:10:52 -05:00
parent b8492a29b0
commit 335fb87e51
6 changed files with 65 additions and 12 deletions

View File

@@ -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:

View File

@@ -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