2018-06-10 23:58:31 +00:00
|
|
|
namespace hr {
|
|
|
|
|
2018-09-04 17:53:42 +00:00
|
|
|
typedef unsigned color_t;
|
|
|
|
|
2018-11-30 14:26:50 +00:00
|
|
|
typedef unsigned long long flagtype;
|
|
|
|
#define Flag(i) (flagtype(1ull<<i))
|
|
|
|
|
|
|
|
static inline void set_flag(flagtype& f, flagtype which, bool b) {
|
|
|
|
if(b) f |= which;
|
|
|
|
else f &= ~which;
|
|
|
|
}
|
|
|
|
|
2018-02-12 11:48:31 +00:00
|
|
|
static const int motypes = 162;
|
2017-10-29 11:19:33 +00:00
|
|
|
|
|
|
|
struct monstertype {
|
|
|
|
char glyph;
|
2018-09-04 17:53:42 +00:00
|
|
|
color_t color;
|
2017-10-29 11:19:33 +00:00
|
|
|
const char *name;
|
|
|
|
const char *help;
|
|
|
|
};
|
|
|
|
|
|
|
|
enum eMonster {
|
|
|
|
moNone,
|
|
|
|
moYeti, moWolf, moWolfMoved,
|
|
|
|
moRanger,
|
|
|
|
moTroll, moGoblin,
|
|
|
|
moWorm, moWormtail, moWormwait, moHedge,
|
|
|
|
moDesertman,
|
|
|
|
moIvyRoot, moIvyHead, moIvyBranch, moIvyWait, moIvyNext, moIvyDead,
|
|
|
|
moMonkey,
|
|
|
|
moSlime,
|
|
|
|
moMimic, moREMOVED, moGolem, moGolemMoved,
|
|
|
|
moEagle, moSeep,
|
|
|
|
moZombie, moGhost, moNecromancer, moShadow,
|
|
|
|
moTentacle, moTentacletail, moTentaclewait, moTentacleEscaping,
|
|
|
|
moCultist, moPyroCultist,
|
|
|
|
moGreater, moGreaterM, moLesser, moLesserM,
|
|
|
|
moShark, moRunDog, moGreaterShark, moFireFairy,
|
|
|
|
moCrystalSage, moLancer, moFlailer, moMiner,
|
|
|
|
moVineBeast, moVineSpirit, moDarkTroll, moEarthElemental,
|
|
|
|
moBug0, moBug1, moBug2,
|
|
|
|
moWitch, moWitchSpeed, moWitchFlash, moWitchFire, moWitchWinter, moWitchGhost,
|
|
|
|
moEvilGolem, moKnight, moCultistLeader, moSlimeNextTurn, moKnightMoved,
|
|
|
|
moIllusion,
|
|
|
|
moPirate, moCShark, moParrot,
|
|
|
|
moHexSnake, moHexSnakeTail, moRedTroll, moBomberbird, moAlbatross,
|
|
|
|
moTameBomberbird, moTameBomberbirdMoved,
|
|
|
|
moPalace, moFatGuard, moSkeleton, moVizier,
|
|
|
|
moViking, moFjordTroll, moWaterElemental,
|
|
|
|
moMouse, moMouseMoved,
|
|
|
|
moPrincess, moPrincessMoved,
|
|
|
|
moPrincessArmed, moPrincessArmedMoved,
|
|
|
|
moFamiliar, moGargoyle, moFireElemental, moAirElemental,
|
|
|
|
moOrangeDog, moTentacleGhost,
|
|
|
|
moMetalBeast, moMetalBeast2, moOutlaw, moMutant,
|
|
|
|
moStormTroll, moForestTroll,
|
|
|
|
moRedFox, moWindCrow, moFriendlyGhost, moRatling, moFalsePrincess, moRoseLady,
|
|
|
|
moRoseBeauty, moRatlingAvenger,
|
|
|
|
moTortoise, moDragonHead, moDragonTail,
|
|
|
|
moGadfly, moResearcher, moSparrowhawk,
|
|
|
|
moKrakenH, moKrakenT, moDraugr, moFriendlyIvy,
|
|
|
|
moVampire, moBat, moReptile,
|
|
|
|
moHerdBull, moRagingBull, moSleepBull,
|
|
|
|
moButterfly, moNarciss, moMirrorSpirit,
|
|
|
|
moHunterDog, moTerraWarrior, moJiangshi, moVoidBeast, moLavaWolf, moHunterGuard,
|
|
|
|
moIceGolem, moSandBird, moSalamander, moHunterChanging,
|
2017-12-30 14:12:15 +00:00
|
|
|
moNorthPole, moSouthPole,
|
2018-01-02 10:15:42 +00:00
|
|
|
moPair, moHexDemon, moAltDemon, moMonk, moCrusher,
|
2017-12-30 14:12:15 +00:00
|
|
|
moSwitch1, moSwitch2,
|
2017-10-29 11:19:33 +00:00
|
|
|
// shmup specials
|
2018-02-12 11:48:31 +00:00
|
|
|
moPlayer, moBullet, moFlailBullet, moFireball, moTongue, moAirball, moCrushball,
|
2017-10-29 11:19:33 +00:00
|
|
|
// temporary
|
|
|
|
moDeadBug, moLightningBolt, moDeadBird, moEnergySword, moWarning, moArrowTrap,
|
|
|
|
moRogueviz
|
|
|
|
};
|
|
|
|
|
|
|
|
struct genderswitch_t {
|
|
|
|
int gender;
|
|
|
|
eMonster m;
|
|
|
|
const char *name;
|
|
|
|
const char *desc;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define NUM_GS 6
|
|
|
|
|
2017-12-30 22:47:10 +00:00
|
|
|
static const int ittypes = 130;
|
2017-10-29 11:19:33 +00:00
|
|
|
|
|
|
|
struct itemtype {
|
|
|
|
char glyph;
|
2018-09-04 17:53:42 +00:00
|
|
|
color_t color;
|
2017-10-29 11:19:33 +00:00
|
|
|
const char *name;
|
|
|
|
const char *help;
|
|
|
|
};
|
|
|
|
|
|
|
|
enum eItem {
|
|
|
|
itNone, itDiamond, itGold, itSpice, itRuby, itElixir, itShard, itBone, itHell, itStatue,
|
|
|
|
itFeather, itSapphire, itHyperstone, itKey,
|
|
|
|
itGreenStone, itOrbYendor,
|
|
|
|
itOrbLightning, itOrbFlash, itOrbWinter, itOrbSpeed, itOrbLife, itOrbShield, itOrbDigging,
|
|
|
|
itOrbTeleport, itOrbSafety,
|
|
|
|
itOrbThorns, itFernFlower,
|
|
|
|
itWine, itOrbAether, itSilver, itOrbPsi,
|
|
|
|
itRoyalJelly, itEmerald, itOrbInvis, itPower, itOrbFire,
|
|
|
|
itHolyGrail, itGrimoire,
|
|
|
|
itOrbDragon, itOrbIllusion,
|
|
|
|
itPirate, itCompass,
|
|
|
|
itRedGem, itOrbTime, itOrbSpace,
|
|
|
|
itBombEgg, itCoast, itWhirlpool,
|
|
|
|
itOrbFriend, itOrbWater, itOrbAir,
|
|
|
|
itPalace, itOrbFrog,
|
|
|
|
itFjord, itOrbFish,
|
|
|
|
itOrbDiscord,
|
|
|
|
itSavedPrincess, itOrbLove,
|
|
|
|
itIvory, itZebra,
|
|
|
|
itFireShard, itAirShard, itEarthShard, itWaterShard,
|
|
|
|
itElemental, itOrbSummon, itOrbMatter,
|
|
|
|
itBounty, itRevolver, itFulgurite, itMutant,
|
|
|
|
itOrbStunning, itOrbLuck,
|
|
|
|
itMutant2, itOrbFreedom, itLotus, itOrbUndeath,
|
|
|
|
itWindstone, itOrbEmpathy, itStrongWind, itBuggy, itBuggy2,
|
|
|
|
itRose, itCoral, itOrbBeauty, itOrb37, itOrbEnergy,
|
|
|
|
itBabyTortoise, itOrbShell, itApple, itDragon, itOrbDomination,
|
|
|
|
itOrbSword, itKraken, itOrbSword2, itBarrow,
|
|
|
|
itTrollEgg, itWarning, itOrbStone, itOrbNature, itTreat,
|
|
|
|
itSlime, itAmethyst, itOrbRecall, itDodeca, itOrbDash, itGreenGrass, itOrbHorns,
|
|
|
|
itOrbBull, itBull, itOrbMirror,
|
|
|
|
itInventory,
|
|
|
|
itLavaLily, itHunting, itBlizzard, itTerra,
|
|
|
|
itOrbSide1, itOrbSide2, itOrbSide3,
|
2017-12-29 00:10:47 +00:00
|
|
|
itOrbLava, itOrbMorph, itGlowCrystal, itSnake,
|
2018-01-03 20:51:11 +00:00
|
|
|
itDock, itRuins, itMagnet, itSwitch,
|
2018-01-03 20:49:14 +00:00
|
|
|
itOrbPhasing, itOrbMagnetism, itOrbSlaying
|
2017-10-29 11:19:33 +00:00
|
|
|
};
|
|
|
|
|
2018-05-04 00:43:25 +00:00
|
|
|
static const int walltypes = 109;
|
2017-10-29 11:19:33 +00:00
|
|
|
|
|
|
|
struct walltype {
|
|
|
|
char glyph;
|
2018-09-04 17:53:42 +00:00
|
|
|
color_t color;
|
2017-10-29 11:19:33 +00:00
|
|
|
const char *name;
|
|
|
|
const char *help;
|
|
|
|
};
|
|
|
|
|
|
|
|
enum eWall { waNone, waIcewall, waBarrier, waFloorA, waFloorB, waCavewall, waCavefloor, waDeadTroll, waDune,
|
|
|
|
waMirror, waCloud, waThumperOff, waFire, waAncientGrave, waFreshGrave, waColumn, waSulphurC, waSulphur,
|
|
|
|
waLake, waFrozenLake, waChasm, waChasmD, waBigTree, waSmallTree,
|
|
|
|
waVinePlant, waVineHalfA, waVineHalfB, waPartialFire,
|
|
|
|
waDeadwall, waDeadfloor, waDeadfloor2, waWaxWall, waGlass, waCamelot, waRoundTable,
|
|
|
|
waCamelotMoat,
|
|
|
|
waBigStatue,
|
|
|
|
waSea, waBoat, waCIsland, waCIsland2, waCTree,
|
|
|
|
waRed1, waRed2, waRed3,
|
|
|
|
waMineUnknown, waMineMine, waMineOpen,
|
|
|
|
waStrandedBoat,
|
|
|
|
waPalace, waClosedGate, waOpenGate, waClosePlate, waOpenPlate, waTrapdoor,
|
|
|
|
waGiantRug,
|
|
|
|
waPlatform, waGargoyle, waGargoyleFloor, waRubble, waLadder, waStone,
|
|
|
|
waBonfireOff, waThumperOn, waEternalFire,
|
|
|
|
waGargoyleBridge,
|
|
|
|
waTempWall, waTempFloor, waTempBridge,
|
|
|
|
waCharged, waGrounded, waSandstone, waSaloon, waMetal,
|
|
|
|
waDeadTroll2, waFan,
|
|
|
|
waTemporary, waEarthD, waElementalTmp, waElementalD,
|
|
|
|
waSlime1, waSlime2, waRose, waWarpGate,
|
|
|
|
waTrunk, waSolidBranch, waWeakBranch, waCanopy,
|
|
|
|
waBarrowWall, waBarrowDig,
|
|
|
|
waPetrified, waTower,
|
|
|
|
waBigBush, waSmallBush,
|
|
|
|
waReptile, waReptileBridge,
|
|
|
|
waInvisibleFloor,
|
|
|
|
waMirrorWall,
|
|
|
|
waPetrifiedBridge,
|
|
|
|
waTempBridgeBlocked,
|
|
|
|
waTerraWarrior, waBubble,
|
2017-12-29 00:10:47 +00:00
|
|
|
waArrowTrap, waMercury, waMagma,
|
2018-05-04 00:43:25 +00:00
|
|
|
waDock, waBurningDock, waRuinWall, waBrownian
|
2017-10-29 11:19:33 +00:00
|
|
|
};
|
|
|
|
|
2018-05-04 00:43:25 +00:00
|
|
|
static const int landtypes = 85;
|
2017-10-29 11:19:33 +00:00
|
|
|
|
|
|
|
struct landtype {
|
2018-09-04 17:53:42 +00:00
|
|
|
color_t color;
|
2017-10-29 11:19:33 +00:00
|
|
|
const char *name;
|
|
|
|
const char *help;
|
|
|
|
};
|
|
|
|
|
|
|
|
enum eLand { laNone, laBarrier, laCrossroads, laDesert, laIce, laCaves, laJungle, laAlchemist, laMirror, laGraveyard,
|
|
|
|
laRlyeh, laHell, laCocytus, laMotion, laDryForest, laEmerald, laWineyard, laDeadCaves,
|
|
|
|
laHive, laPower, laCamelot, laTemple,
|
|
|
|
laCrossroads2, laCaribbean, laRedRock, laMinefield, laOcean, laWhirlpool,
|
|
|
|
laPalace, laLivefjord,
|
|
|
|
laIvoryTower, laZebra, laEFire, laEAir, laEEarth, laEWater, laCrossroads3,
|
|
|
|
laOceanWall, laElementalWall,
|
|
|
|
laCanvas, laPrincessQuest,
|
|
|
|
laWildWest, laStorms, laOvergrown, laClearing,
|
|
|
|
laHaunted, laHauntedWall, laHauntedBorder,
|
|
|
|
laWhirlwind, laRose, laWarpCoast, laWarpSea, laCrossroads4,
|
|
|
|
laEndorian, laTortoise, laDragon,
|
|
|
|
laKraken, laBurial, laTrollheim,
|
|
|
|
laHalloween, laDungeon, laMountain, laReptile,
|
|
|
|
laPrairie, laBull, laCrossroads5, laCA,
|
|
|
|
laMirrorWall, laMirrored, laMirrorWall2, laMirrored2,
|
|
|
|
laMirrorOld,
|
2017-10-29 22:54:26 +00:00
|
|
|
laVolcano, laBlizzard, laHunting, laTerracotta, laMercuryRiver,
|
2018-01-03 20:51:11 +00:00
|
|
|
laDual, laSnakeNest, laDocks, laRuins, laMagnetic,
|
2018-05-04 00:43:25 +00:00
|
|
|
laSwitch, laMemory, laBrownian
|
2017-10-29 11:19:33 +00:00
|
|
|
};
|
|
|
|
|
2018-06-21 23:48:46 +00:00
|
|
|
enum eGeometry {
|
|
|
|
gNormal, gEuclid, gSphere, gElliptic, gZebraQuotient, gFieldQuotient, gTorus, gOctagon, g45, g46, g47, gSmallSphere, gTinySphere, gEuclidSquare, gSmallElliptic,
|
2018-11-23 22:46:26 +00:00
|
|
|
gKleinQuartic, gBolza, gBolza2, gMinimal, gBinaryTiling, gArchimedean,
|
2019-01-11 01:22:19 +00:00
|
|
|
gMacbeath, gBring, gSchmutzM2, gSchmutzM3, gCrystal, gOctahedron,
|
2018-06-21 23:48:46 +00:00
|
|
|
gGUARD};
|
2017-10-29 11:19:33 +00:00
|
|
|
|
2017-12-27 10:57:30 +00:00
|
|
|
enum eGeometryClass { gcHyperbolic, gcEuclid, gcSphere };
|
|
|
|
|
2018-08-28 15:17:34 +00:00
|
|
|
enum class eVariation { bitruncated, pure, goldberg, irregular, dual };
|
|
|
|
|
2017-10-29 11:19:33 +00:00
|
|
|
struct geometryinfo {
|
2019-02-06 15:34:22 +00:00
|
|
|
const char* tiling_name;
|
|
|
|
const char* quotient_name;
|
|
|
|
const char* menu_displayed_name;
|
2017-10-29 11:19:33 +00:00
|
|
|
const char* shortname;
|
|
|
|
int sides;
|
|
|
|
int vertex;
|
2018-11-30 14:26:50 +00:00
|
|
|
flagtype flags;
|
2017-12-27 10:57:30 +00:00
|
|
|
eGeometryClass cclass;
|
2018-01-06 20:45:13 +00:00
|
|
|
int xcode;
|
2018-06-10 23:58:31 +00:00
|
|
|
std::array<int,2> distlimit; // bitrunc, non-bitrunc
|
2018-08-29 19:19:52 +00:00
|
|
|
eVariation default_variation;
|
2017-10-29 11:19:33 +00:00
|
|
|
};
|
|
|
|
|
2018-11-30 14:26:50 +00:00
|
|
|
static const flagtype qBOUNDED = 1;
|
|
|
|
static const flagtype qANYQ = 2;
|
|
|
|
static const flagtype qNONORIENTABLE = 4;
|
|
|
|
static const flagtype qSMALL = 8;
|
|
|
|
|
|
|
|
static const flagtype qFIELD = 16;
|
|
|
|
static const flagtype qDOCKS = 32;
|
|
|
|
static const flagtype qZEBRA = 64;
|
2017-10-29 11:19:33 +00:00
|
|
|
|
|
|
|
// note: dnext assumes that x&7 equals 7
|
2018-08-20 14:28:25 +00:00
|
|
|
static const int SEE_ALL = 50;
|
2017-10-29 11:19:33 +00:00
|
|
|
static const int FORBIDDEN = -1;
|
|
|
|
|
|
|
|
extern eGeometry geometry;
|
2018-08-28 15:17:34 +00:00
|
|
|
extern eVariation variation;
|
2017-10-29 11:46:57 +00:00
|
|
|
|
2018-11-30 13:37:59 +00:00
|
|
|
extern std::vector<geometryinfo> ginf;
|
2017-10-29 13:19:51 +00:00
|
|
|
|
|
|
|
extern monstertype minf[motypes];
|
|
|
|
extern itemtype iinf[ittypes];
|
2017-12-01 23:31:36 +00:00
|
|
|
|
|
|
|
extern const landtype linf[landtypes];
|
2018-11-08 20:56:06 +00:00
|
|
|
extern color_t floorcolors[landtypes];
|
2017-12-19 13:35:34 +00:00
|
|
|
|
|
|
|
enum cpatterntype {
|
2018-08-02 20:25:08 +00:00
|
|
|
cpFootball, cpThree, cpChess, cpSingle, cpSingleSym, cpOddEven, cpLarge, cpZebra, cpUnknown
|
2017-12-19 13:35:34 +00:00
|
|
|
};
|
|
|
|
|
2018-02-08 21:27:12 +00:00
|
|
|
struct landtacinfo { eLand l; int tries, multiplier; };
|
2018-06-10 23:58:31 +00:00
|
|
|
|
2018-11-09 13:13:01 +00:00
|
|
|
enum eModel {
|
|
|
|
mdDisk, mdHalfplane, mdBand, mdPolygonal, mdFormula,
|
|
|
|
mdEquidistant, mdEquiarea, mdBall, mdHyperboloid,
|
|
|
|
mdHemisphere, mdBandEquidistant, mdBandEquiarea, mdSinusoidal, mdTwoPoint,
|
|
|
|
mdFisheye, mdJoukowsky, mdJoukowskyInverted,
|
|
|
|
mdRotatedHyperboles, mdSpiral,
|
|
|
|
mdGUARD, mdUnchanged, mdHyperboloidFlat, mdPolynomial
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef unsigned long long flagtype;
|
|
|
|
|
|
|
|
namespace mf {
|
|
|
|
static const flagtype azimuthal = 1;
|
|
|
|
static const flagtype band = 2 + 512;
|
|
|
|
static const flagtype equiarea = 4;
|
|
|
|
static const flagtype equidistant = 8;
|
|
|
|
static const flagtype conformal = 16;
|
|
|
|
static const flagtype euc_boring = 32;
|
|
|
|
static const flagtype space = 64;
|
|
|
|
static const flagtype hyper_only = 128;
|
|
|
|
static const flagtype hyper_or_torus = 256;
|
|
|
|
static const flagtype quasiband = 512;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct modelinfo {
|
|
|
|
const char *name_hyperbolic;
|
|
|
|
const char *name_euclidean;
|
|
|
|
const char *name_spherical;
|
|
|
|
|
|
|
|
flagtype flags;
|
|
|
|
|
|
|
|
int is_azimuthal;
|
|
|
|
int is_band;
|
|
|
|
int is_equiarea;
|
|
|
|
int is_equidistant;
|
|
|
|
int is_conformal;
|
|
|
|
const char* name;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern const modelinfo models[int(mdPolynomial)+1];
|
|
|
|
|
2018-06-10 23:58:31 +00:00
|
|
|
}
|