#ifndef __DEFS_H #define __DEFS_H // MACROS #define MAXOF(a,b) (a > b ? a : b) // save/load #define MAPDIR "data/maps" #define SAVEDIR "data/save" #define DUMMYCELLTYPE 0xabcd // SPECIAL NUMBERS/CONSTANTS #define UNLIMITED (-9876) #define ALL (-9875) #define NA (-9874) #define NOBODY (-1) #define ALLCONFERRED (-9873) enum ATTRIB { A_NONE = -1, A_STR = 0, A_DEX = 1, A_IQ = 2, A_CON = 3, }; #define MAXATTS 4 enum CHECKTYPE { SC_STR, SC_DEX, SC_IQ, SC_CON, ////////// SC_DODGE, SC_SLIP, SC_MORALE, SC_OPENLOCKS, }; enum BURDENED { BR_NONE = 0, BR_BURDENED = 1, BR_STRAINED = 2, BR_OVERLOADED = 3, }; enum LFCONDITION { C_DEAD = 0, C_CRITICAL = 1, C_SERIOUS = 2, C_WOUNDED = 3, C_HURT = 4, C_HEALTHY = 5, }; // AI defs // if target lf is out of view for this many turns, abandon chase #define AI_FOLLOWTIME (10) // object confitions for random objects #define RO_NONE 0 #define RO_DAMTYPE 1 #define RO_OBCLASS 2 // for flags #define PERMENANT (-9873) #define FROMRACE (-9872) #define FROMJOB (-9871) #define FROMOBEQUIP (-9870) #define FROMOBHOLD (-9869) #define FROMOBACTIVATE (-9868) #define FROMMAT (-9867) #define FROMBLESSING (-9866) #define FROMBRAND (-9865) #define FROMOBMOD (-9864) #define IFKNOWN (-9772) // used by f_xxconfer. only confer a flag if item is known. #define IFACTIVE (-9771) // used by f_prodeuceslight. only does so if object is activated #define NOCONDITION (0) #define IFMONSTER (-9769) // used in v2 of f_ifpct job flags #define IFPLAYER (-9768) // used in v2 of f_ifpct job flags #define ANYROOM (-9770) #define TICK_INTERVAL (20) // STRINGS #define BUFLENSMALL 64 #define BUFLEN 128 #define HUGEBUFLEN 1024 #define MORESTRING "--More--" #define SOLDOUTSTRING "--SOLD OUT--" // hunger constant #define HUNGERCONST 10000 // LIMITS #define DEF_SCREENW 80 #define DEF_SCREENH 24 #define MAXPILEOBS 52 #define MAXCHOICES 150 #define MAXDEPTH 25 // max dungeon depth #define MAXRANDOMOBCANDIDATES 100 #define MAXRANDOMLFCANDIDATES 100 #define MAXCANDIDATES 200 //#define MAX_MAPW 80 //#define MAX_MAPH 50 #define MAX_MAPW 80 #define MAX_MAPH 20 //#define MAX_MAPROOMS 10 #define MIN_ROOMH 4 #define MIN_ROOMW 4 #define MAX_ROOMW (MAX_MAPW / 5) #define MAX_ROOMH (MAX_MAPH / 5) #define MAXDIR_ORTH 4 #define MAXDIR_COMPASS 8 #define MAXHISTORY 20 // max lines of history to keep // MAP BUILDING #define DEF_TURNPCT 40 //#define DEF_SPARSENESS 14 #define DEF_SPARSENESS 20 //#define DEF_SPARSENESS 0 //#define DEF_LOOPPCT 70 #define DEF_LOOPPCT 95 //#define DEF_LOOPPCT 0 #define MINROOMS 5 #define MAXROOMS 10 #define DEF_WINDOWPCT 5 // #define ANIMDELAY (1000000 / 100) // 1/100 of a second #define MAXVISRANGE 10 // max visible range in full light // askobject options #define AO_NONE 0 #define AO_INCLUDENOTHING 1 #define AO_ONLYEQUIPPED 2 #define AO_EDIBLE 4 #define AO_NOTIDENTIFIED 8 #define AO_WEARABLE 16 #define AO_OPERABLE 32 #define AO_POURABLE 64 #define AO_EQUIPPEDARMOUR 128 #define AO_WEILDABLE 256 #define AO_SPECIFIED 512 #define AO_READABLE 1024 #define AO_ARMOUR 2048 #define AO_NOTKNOWN 4096 // askcoords target types #define TT_NONE 0 #define TT_MONSTER 1 #define TT_OBJECT 2 #define TT_DOOR 4 #define TT_PLAYER 8 // target requirements #define TR_NONE 0 #define TR_NEEDLOS 1 #define TR_NEEDLOF 2 // CONTROLLERS #define C_AI 0 #define C_PLAYER 1 // deafult //#define DEF_HEALTIME 100 // time to heal 1 hp // speeds #define SP_GODLIKE 1 #define SP_ULTRAFAST 5 #define SP_VERYFAST 10 #define SP_FAST 15 #define SP_NORMAL 20 #define SP_SLOW 25 #define SP_VERYSLOW 30 #define SP_ULTRASLOW 35 #define SP_SLOWEST 40 // speed settings (lower is faster) #define SPEED_ATTACK SP_NORMAL #define SPEED_DEAD 50 #define SPEED_ACTION SP_NORMAL #define SPEED_MOVE SP_NORMAL #define SPEED_DROP SP_FAST #define SPEED_PICKUP SP_FAST #define SPEED_THROW SP_FAST #define SPEED_WAIT SP_NORMAL #define SPEED_READ SP_NORMAL #define SPEED_DRINK SP_FAST // DIRECTION TYPES #define DT_ORTH 0 #define DT_COMPASS 1 // DIRECTIONS #define D_NONE -1 #define D_UNKNOWN -2 // Orthogonal directions #define D_N 0 #define D_E 1 #define D_S 2 #define D_W 3 // Compass directions #define DC_N 4 #define DC_NE 5 #define DC_E 6 #define DC_SE 7 #define DC_S 8 #define DC_SW 9 #define DC_W 10 #define DC_NW 11 // altitude directions #define D_UP 12 #define D_DOWN 13 #define D_IN 14 // Cell types enum CELLTYPE { CT_WALL, CT_ROOMWALL, CT_CORRIDOR, CT_ROOM, CT_LOOPCORRIDOR, }; enum SPELLSCHOOL { SS_NONE, SS_DIVINE, SS_ABILITY, SS_ALLOMANCY, SS_AIR, SS_DEATH, SS_DIVINATION, SS_FIRE, SS_ICE, SS_GRAVITY, SS_LIFE, SS_MODIFICATION, SS_MENTAL, SS_SUMMONING, SS_TRANSLOCATION, SS_WILD, SS_LAST, }; enum STRBRACKET { ST_RANDOM = -1, ST_HELPLESS = 0, ST_FEEBLE = 1, ST_VWEAK = 2, ST_WEAK = 3, ST_AVERAGE = 4, ST_STRONG = 5, ST_MIGHTY = 6, ST_TITANIC = 7, }; enum DEXBRACKET { DX_RANDOM = -1, DX_INCOMPETENT = 0, DX_OAFISH = 1, DX_INEPT = 2, DX_CLUMSY = 3, DX_AWKWARD = 4, DX_AVERAGE = 5, DX_DEXTROUS = 6, DX_NIMBLE = 7, DX_AGILE = 8, DX_SWIFT = 9, DX_SUPERSONIC = 10, }; enum IQBRACKET { IQ_RANDOM = -1, IQ_MINDLESS = 0, IQ_VEGETABLE = 1, IQ_ANIMAL = 2, IQ_STUPID = 3, IQ_DIMWITTED = 4, IQ_DOPEY = 5, IQ_AVERAGE = 6, IQ_SMART = 7, IQ_ENLIGHTENED = 8, IQ_GENIUS = 9, }; enum CONBRACKET { CN_RANDOM = -1, CN_FRAIL = 0, CN_SICKLY = 1, CN_UNHEALTHY = 2, CN_UNFIT = 3, CN_AVERAGE = 4, CN_HEALTHY = 5, CN_FIT = 6, CN_HARDY = 7, }; // damage type enum DAMTYPE { DT_ALL = -1, DT_PIERCE = 0, DT_SLASH = 1, DT_FIRE = 2, DT_COLD = 3, DT_CLAW = 4, DT_BASH = 5, DT_BITE = 6, DT_CHOP = 7, DT_PROJECTILE = 8, DT_HOLY = 9, DT_WATER = 10, DT_ACID = 11, DT_MELT = 12, DT_DIRECT = 13, // eg. from f_obhpdrain flag DT_ELECTRIC = 14, DT_EXPLOSIVE = 15, DT_DECAY = 16, DT_MAGIC = 17, DT_TOUCH = 18, DT_POISONGAS = 19, DT_UNARMED = 20, DT_LIGHT = 21, DT_CRUSH = 22, DT_FALL = 23, DT_NONE = 24, // for direclty dealt damage, not really any type }; #define MAXDAMTYPE 25 // Object Classes enum OBCLASS { OC_MONEY, OC_WEAPON, OC_ARMOUR, OC_MISSILE, OC_RING, OC_SCROLL, OC_POTION, OC_WAND, OC_FOOD, OC_CORPSE, OC_ROCK, OC_TOOLS, OC_TECH, OC_MISC, OC_SPELL, OC_ABILITY, OC_EFFECT, OC_DFEATURE, OC_BOOK, OC_NULL = -999 }; enum BLESSTYPE { B_UNCURSED = 0, B_BLESSED = 1, B_CURSED = -1 }; enum HABITAT { H_DUNGEON = 1, H_ALL = 999 }; /* enum RARITY { RR_UNIQUE = 7, RR_NEVER = 6, RR_VERYRARE = 5, RR_RARE = 4, RR_UNCOMMON = 3, RR_COMMON = 2, RR_FREQUENT = 1, }; */ enum RACE { R_NONE, R_RANDOM, R_HUMAN, // monsters R_BUGBEAR, R_DARKMANTLE, R_EYEBAT, R_GIANTHILL, R_GIANTFIRE, R_GIANTFIREFC, R_GIANTFIRETITAN, R_GNOLL, R_GNOLLHM, R_GNOLLMR, R_GOBLIN, R_GOBLINWAR, R_GOBLINSHOOTER, R_GOBLINHEXER, R_HOBGOBLIN, R_HOBGOBLINWAR, R_KOBOLD, R_LIZARDMAN, R_LURKINGHORROR, R_OGRE, R_OGRESAVAGE, R_OGREWARHULK, R_OOZEGREY, R_ORC, R_ORCWARRIOR, R_ORK, R_POLTERGEIST, R_SHADOWCAT, R_SPRITEFIRE, R_TROGLODYTE, R_TROLL, R_XAT, // small animals R_BAT, R_NEWT, R_RAT, R_WOLF, // insects R_BUTTERFLY, R_GLOWBUG, R_GIANTFLY, R_GIANTBLOWFLY, // undead R_GHAST, R_GHOUL, R_SKELETON, R_ZOMBIE, // special R_GASCLOUD, R_DANCINGWEAPON, }; enum JOB { J_NONE, J_GOD, J_ADVENTURER, J_ALLOMANCER, J_COMMANDO, J_PLUMBER, J_PRINCE, J_WIZARD, }; // Object Materials enum MATERIAL { MT_NOTHING = 0, MT_BONE = 1, MT_STONE = 2, MT_FIRE = 3, MT_PLASTIC = 4, MT_METAL = 5, MT_GLASS = 6, MT_FLESH = 7, MT_WOOD = 8, MT_GOLD = 9, MT_PAPER = 10, MT_WETPAPER = 11, MT_ICE = 12, MT_WATER = 13, MT_BLOOD = 14, MT_LEATHER = 15, MT_CLOTH = 16, MT_FOOD = 17, MT_RUBBER = 18, MT_MAGIC = 19, MT_GAS = 20, MT_SLIME = 21, }; // Object Types enum OBTYPE { OT_NONE, // dungeon features OT_BOULDER, OT_STATUE, OT_WOODENDOOR, OT_WOODENTABLE, OT_WOODENBARREL, OT_WOODENSTOOL, OT_STAIRSDOWN, OT_STAIRSUP, OT_VENDINGMACHINE, OT_PORTAL, // rocks OT_GOLD, OT_STONE, OT_ASH, OT_GEMOFSEEING, // food OT_BERRY, OT_NUT, OT_BANANA, OT_BANANASKIN, // not really food OT_APPLE, OT_MUSHROOM, OT_BREADSTALE, OT_CHEESE, OT_ROASTMEAT, OT_BREADFRESH, OT_CHOCOLATE, // corpses OT_CORPSE, OT_HEAD, /* OT_CORPSEEYEBAT, OT_CORPSEBAT, OT_CORPSEFLY, OT_CORPSEGLOWBUG, OT_CORPSEGOBLIN, OT_CORPSEHUMAN, OT_CORPSELIZARD, OT_CORPSEOGRE, OT_CORPSEORK, OT_CORPSERODENT, OT_CORPSETROLL, OT_CORPSEWOLF, */ // potions OT_POT_ACID, OT_POT_ACROBATICS, OT_POT_AMBROSIA, OT_POT_COMPETENCE, OT_POT_ELEMENTENDURE, OT_POT_ELEMENTIMMUNE, OT_POT_ETHEREALNESS, OT_POT_EXPERIENCE, OT_POT_GASEOUSFORM, OT_POT_HEALING, OT_POT_HEALINGMIN, OT_POT_INVIS, OT_POT_INVULN, OT_POT_MAGIC, OT_POT_OIL, OT_POT_POLYMORPH, OT_POT_RESTORATION, OT_POT_SANCTUARY, OT_POT_SPEED, OT_POT_WATER, OT_POT_JUICE, // scrolls OT_MAP, OT_SCR_NOTHING, OT_SCR_CREATEMONSTER, OT_SCR_DETECTAURA, OT_SCR_DETECTLIFE, OT_SCR_DETECTMAGIC, OT_SCR_FLAMEPILLAR, OT_SCR_FLAMEBURST, OT_SCR_IDENTIFY, OT_SCR_KNOCK, OT_SCR_LIGHT, OT_SCR_MAPPING, OT_SCR_MINDSCAN, OT_SCR_ENCHANT, OT_SCR_FREEZEOB, OT_SCR_REMOVECURSE, OT_SCR_TELEPORT, OT_SCR_TURNUNDEAD, OT_SCR_WISH, // SPELLBOOKS // allomancy can't be learned from books // -- death OT_SB_ANIMATEDEAD, OT_SB_PAIN, OT_SB_INFINITEDEATH, OT_SB_WEAKEN, OT_SB_BLINDNESS, // -- divination OT_SB_DETECTAURA, OT_SB_DETECTLIFE, OT_SB_IDENTIFY, OT_SB_MAPPING, // -- elemental - air OT_SB_CLOUDKILL, // -- elemental - fire OT_SB_SPARK, OT_SB_FIREDART, OT_SB_FIREBALL, OT_SB_FLAMEPILLAR, OT_SB_FLAMEBURST, OT_SB_BURNINGWAVE, // -- elemental - ice OT_SB_CONECOLD, OT_SB_FREEZEOB, // -- gravity OT_SB_GRAVBOOST, OT_SB_HASTE, OT_SB_SLOW, // -- life OT_SB_HEALING, OT_SB_HEALINGMIN, OT_SB_TURNUNDEAD, // -- mental OT_SB_MINDSCAN, OT_SB_TELEKINESIS, // -- modification OT_SB_GASEOUSFORM, OT_SB_KNOCK, OT_SB_INSCRIBE, OT_SB_INVISIBILITY, OT_SB_LIGHT, OT_SB_DARKNESS, OT_SB_PASSWALL, OT_SB_PETRIFY, OT_SB_POLYMORPH, // -- summoning OT_SB_CREATEMONSTER, // -- translocation OT_SB_BLINK, OT_SB_DISPERSAL, OT_SB_GATE, OT_SB_TELEPORT, // -- wild can't be learned from books // spells // -- allomancy OT_S_ABSORBMETAL, OT_S_ACCELMETAL, OT_S_ANIMATEMETAL, OT_S_EXPLODEMETAL, OT_S_PULLMETAL, OT_S_MAGSHIELD, OT_S_METALHEAL, // -- death OT_S_ANIMATEDEAD, OT_S_PAIN, OT_S_INFINITEDEATH, OT_S_WEAKEN, OT_S_BLINDNESS, // -- divination OT_S_DETECTAURA, OT_S_DETECTLIFE, OT_S_DETECTMAGIC, OT_S_IDENTIFY, OT_S_MAPPING, // -- elemental - air OT_S_CLOUDKILL, // -- elemental - fire OT_S_SPARK, OT_S_FIREDART, OT_S_FIREBALL, OT_S_FLAMEPILLAR, OT_S_FLAMEBURST, OT_S_BURNINGWAVE, // -- elemental - ice OT_S_CONECOLD, OT_S_FREEZEOB, // -- gravity OT_S_GRAVBOOST, OT_S_HASTE, OT_S_SLOW, // -- life OT_S_HEALING, OT_S_HEALINGMIN, OT_S_TURNUNDEAD, // -- mental OT_S_MINDSCAN, OT_S_SLEEP, OT_S_TELEKINESIS, // -- modification OT_S_ENCHANT, OT_S_GASEOUSFORM, OT_S_INSCRIBE, OT_S_INVISIBILITY, OT_S_KNOCK, OT_S_LIGHT, OT_S_DARKNESS, OT_S_PASSWALL, OT_S_PETRIFY, OT_S_POLYMORPH, OT_S_POLYMORPHRND, // -- summoning OT_S_CREATEMONSTER, // -- translocation OT_S_BLINK, OT_S_DISPERSAL, OT_S_GATE, OT_S_TELEPORT, // -- wild OT_S_MANASPIKE, OT_S_DETONATE, OT_S_ENERGYBOLT, OT_S_ENERGYBLAST, OT_S_FLASH, // -- divine powers OT_S_WISH, OT_S_GIFT, // abilities OT_A_GRAB, OT_A_CRUSH, OT_A_JUMP, OT_A_SPRINT, OT_A_DEBUG, OT_A_EMPLOY, OT_A_HEAVYBLOW, OT_A_INSPECT, // wands OT_WAND_COLD, OT_WAND_DETONATION, OT_WAND_DISPERSAL, OT_WAND_FIRE, OT_WAND_FIREBALL, OT_WAND_HASTE, OT_WAND_INVIS, OT_WAND_KNOCK, OT_WAND_LIGHT, OT_WAND_POLYMORPH, OT_WAND_SLOW, OT_WAND_WEAKNESS, OT_WAND_WONDER, // tools OT_BLINDFOLD, OT_BUGLAMP, OT_GUNPOWDER, OT_LANTERNOIL, OT_LOCKPICK, OT_PICKAXE, // tech OT_POCKETWATCH, OT_C4, OT_CREDITCARD, OT_DIGITALWATCH, OT_FLASHBANG, OT_GRENADE, OT_INFOVISOR, OT_INSECTICIDE, OT_JETPACK, OT_LANTERNLED, OT_LOCKHACKER, OT_MOTIONSCANNER, OT_NVGOGGLES, OT_PAPERCLIP, OT_TELEPAD, OT_XRAYGOGGLES, // misc objects OT_BONE, OT_EMPTYFLASK, OT_EMPTYVIAL, OT_CALTROP, OT_BROKENGLASS, OT_ICECHUNK, OT_ICESHEET, OT_PUDDLEWATER, OT_PUDDLEWATERL, OT_SLIMEPOOL, OT_VOMITPOOL, OT_BLOODSTAIN, OT_BLOODSPLASH, OT_BLOODPOOL, OT_SOGGYPAPER, OT_FLESHCHUNK, // effects OT_FIRELARGE, OT_FIREMED, OT_FIRESMALL, OT_MAGICBARRIER, OT_SMOKECLOUD, OT_SMOKEPUFF, OT_POISONCLOUD, OT_POISONPUFF, // armour - body OT_ARMOURLEATHER, OT_ARMOURRING, OT_ARMOURSCALE, OT_ARMOURCHAIN, OT_ARMOURSPLINT, OT_ARMOURPLATE, OT_FLAKJACKET, OT_OVERALLS, OT_COTTONSHIRT, OT_SILKSHIRT, OT_ROBE, OT_VELVETROBE, // armour - shoulders OT_CLOAK, // armour - waist OT_BELTLEATHER, // armour - legs OT_CLOTHTROUSERS, OT_RIDINGTROUSERS, OT_COMBATPANTS, // armour - feet OT_SANDALS, OT_SHOESLEATHER, OT_BOOTSLEATHER, OT_BOOTSRUBBER, OT_BOOTSSPIKED, // armour - hands OT_GLOVESCLOTH, OT_GLOVESLEATHER, OT_GAUNTLETS, // armour - head OT_SUNHAT, OT_CAP, OT_HELM, OT_GASMASK, OT_GOLDCROWN, OT_HELMBONE, OT_HELMFOOTBALL, // armour - eyes OT_SUNGLASSES, // armour - shields OT_BUCKLER, OT_SHIELD, OT_SHIELDLARGE, // rings OT_RING_INVIS, OT_RING_INVULN, OT_RING_MPREGEN, OT_RING_PROTFIRE, OT_RING_REGENERATION, OT_RING_RESISTMAG, OT_RING_SEEINVIS, // animal weapons OT_CLAWS, OT_FISTS, OT_TAIL, OT_TEETH, OT_TENTACLE, OT_ZAPPER, // monster weapons OT_ACIDATTACK, OT_TOUCHPARALYZE, OT_TOUCHPARALYZE2, // missiles / ammo OT_ARROW, OT_BOLT, OT_DART, OT_NANODART, OT_JAVELIN, OT_BULLET, OT_RUBBERBULLET, // stabbing weapons OT_DAGGER, OT_COMBATKNIFE, OT_ORNDAGGER, OT_RAPIER, OT_TRIDENT, OT_QUICKBLADE, // chopping weapons OT_AXE, OT_HANDAXE, OT_BATTLEAXE, OT_GREATAXE, // slashing weapons OT_KNIFE, OT_STEAKKNIFE, OT_SCYTHE, OT_SHORTSWORD, OT_SCIMITAR, OT_LONGSWORD, OT_GREATSWORD, OT_ORNSWORD, // polearms OT_SPEAR, OT_QUARTERSTAFF, // bashing weapons OT_STICK, OT_SPANNER, OT_CLUB, OT_FLAIL, OT_FLAILHEAVY, OT_MACE, OT_MORNINGSTAR, OT_GREATCLUB, OT_SICKLE, // projectile weapons OT_REVOLVER, OT_SLING, OT_BOW, OT_LONGBOW, OT_CROSSBOWHAND, // holy weapons OT_HANDOFGOD, }; #define BP_NONE (-1) enum BODYPART { BP_WEAPON = 0, BP_SECWEAPON, BP_EYES, BP_HEAD, BP_SHOULDERS, BP_BODY, BP_HANDS, BP_WAIST, BP_LEGS, BP_FEET, BP_RIGHTHAND, BP_LEFTHAND, }; #define MAXBODYPARTS (12) // empty types #define WE_NOTSOLID 1 #define WE_EMPTY 2 #define WE_PORTAL 3 enum NOISETYPE { N_GETANGRY, }; enum LFSIZE { SZ_MINI = 0, // ie. fly SZ_TINY = 1, // ie. mouse SZ_SMALL = 2, // ie. cat SZ_MEDIUM = 3, // ie. wolf/dog SZ_HUMAN = 4, // ie. human-sized SZ_LARGE = 5, // ie. bear/horse SZ_HUGE = 6, // ie. elephant, dragon, giant SZ_ENORMOUS = 7, // ie. ??? kraken, titan SZ_MAX = 100 }; enum FLAG { F_NONE, // dummy flag // object flags F_DEAD, // object will be removed F_ENCHANTABLE, // object can get +1/-1 ect F_STACKABLE, // can stack multiple objects togethr F_NO_PLURAL, // this obname doesn't need an 's' for plurals (eg. gold, money) F_NO_A, // this obname doesn't need to start with 'a' for singular (eg. gold) F_CONTAINSOB, // for vending machiens. v0 is ob letter // text is an object it contains. // for items in shops F_SHOPITEM, // causes shops to show this item as identified F_VALUE, // how much an item is worth (over its base weight+material) // weapon/armour flags F_EQUIPPED, // val0 = where it is equipped. CLEAR WHEN OB MOVED! F_CURAMMO, // currently equipped ammo F_GOESON, // val0 = where it can be equipped. F_BONUS, // val0=bonus/penalty to damage/armour. ie. +1 sword F_MISSILE, // weapon would make a good missle - used by AI F_UNIQUE, // only one may appear F_GLYPH, // override the glyph with the first char of text F_NOPICKUP, // cannot pick this up F_IMPASSABLE, // cannot walk past this if your size if v0 or smaller F_CRUSHABLE, // if you are bigger than size v0, walking on this crushes it F_BLOCKSVIEW, // cannot see past this F_BLOCKSTHROW, // cannot throw past this F_DIETEXT, // text when the object dies F_DIECONVERTTEXT, // text when the object converts. eg. "melts" F_DIECONVERTTEXTPL, // text when the object converts, if there are more than 1. eg. "melt" F_DIECONVERT, // val0 = what this turns into when dying F_NOBLESS, // can't be blessed or cursed F_CORPSEOF, // this is a corpse of montype val0. F_DTCONVERT, // damtype val0 converts this to f->text F_MATCONVERT, // touching material id val0 converts this to f->text F_MATCONVERTTEXT, // description when F_MATCONVERT happens. ie. "is consumed in flame" F_MATCONVERTTEXTPL, // plural for matconverttext. F_DTIMMUNE, // immune to damtype val0 F_DTRESIST, // half dam from damtype val0 F_DTVULN, // double dam from damtype val0 // if dam=0, set dam to textfield dice (eg.text="2d6") F_MATIMMUNE, // immune to damage from obs with material 'mat' F_DAMAGABLE, // this ob can be damaged via takedamage() F_TINTED, // when worn on eyes, protects against bright lights F_HASBRAND, // has the object mod v0 (ie. OM_FLAMESTRIKE) F_HOLDCONFER, // gives flag v0+v1 when carried. v2 specifies if it must be id'd. F_EQUIPCONFER, // gives flag v0+v1 when weilded/worn. v2 specifies if it must be id'd. F_ACTIVATECONFER, // gives flag v0+v1 when activated. v2 specifies if it must be id'd. F_HITCONFER, // hitting with this gives flagid=v0 // with flagval0 = val1 // with flagval1 = val2 // with timeleft = text ("min-max") F_ACTIVATED, // val0 = is this object turned on? F_GRENADE, // this obkejct will drain charge when activated, then die F_EXPLODEONDEATH, // explodes when it dies, deals val0 vamage. // val1 = BIG means hit surrounding cells // val2 = ifactivated, only explodes if activated. F_EXPLODEONDAM, // explodes when it is damaged, deals val0 vamage. // val1 = BIG means hit surrounding cells // val2 = ifactivated, only explodes if activated. F_FLASHONDEATH, // produce a bright flash when it dies,v0=range F_FLASHONDAM, // produces a bright flash when it is damaged,v0=range,v2=ifacctivated F_LASTDAMTYPE, // object equivilant of lf->lastdamtype F_OPERONOFF, // operating this will just turn it on/off F_OPERUSECHARGE, // operating this will use 1 charge F_OPERNEEDTARGET, // need to ask for a target of type val0 when opering // v0 is target requirements (los/lof) // text is prompt F_OPERNEEDDIR, // need to ask a direction when operating this. text is prompt // technology flags F_TECHLEVEL, // v0 is a PR_xxx enum for tech usage skill // what can you do with this object? F_TAINTED, // will give food poisoning if you eat/drink it F_EDIBLE, // you can eat this. val1 = nutrition. 100 = a meal // -1 means "nutrition is weight x abs(val1)" F_DRINKABLE, // you can drink this. val1 = nutrition. 100 = a meal // -1 means "nutrition is weight x abs(val1)" F_OPERABLE, // can operate? F_POURABLE, // can pour? F_PUSHABLE, // can push this object F_PICKLOCKS, // can pick locks? val0=% change, // val1=b_false, f_dieonfail, f_bluntonfail F_LOCKABLE,// this object can be locked // doors F_DOOR, // this object is a door - ie. can open it F_OPEN, // is this door open? F_LOCKED,// door is locked F_JAMMED, // is this door jammed? // stairs / teleporters / portals F_CLIMBABLE, // this is a stiarcase F_STAIRDIR, // val0 = direcion F_OPPOSITESTAIRS, // val0 = opposite kind of stairs F_MAPLINK, // val0 = map to link to. optional v1/v2 = x/y // ob interaction flags F_HARD, // object is hard (ie. punching it will hurt!) F_SHARP, // does damage when you step on it. v0/1 are min/max dam F_SLIPPERY, // you might slip when stepping on it. v0 is amt F_SLIPMOVE, // if someone slips on this, it will move to an adj cell F_FLAMMABLE, // object will catch alight if burnt (ie fire damage) // object mods/effects F_ONFIRE, // burning, also deals extra fire damage F_HEADLESS, // for corpses. can go on LFs too. F_MASTERWORK, // weps do higher damager, armour protects better F_SHODDY, // weps do less damage, armour protects less. // weapon flags F_OBATTACKDELAY, // how long weapon takes to attack F_DAMTYPE, // val0 = damage type F_DAM, // val0 = ndice, val1 = nsidesondie, val2 = mod F_MISSILEDAM, // val0 = dam if it hits (without speed multiplier) F_ACCURACY, // 100 - val0 = penalty to tohit% (ie. higher is better) F_ARMOURPIERCE, // goes through armour F_TWOHANDED, // weapon uses two hands to weild F_FIREARM, // this weapon is equipped in bp_secweapon, not _weapon. F_FIRESPEED, // how fast this weapon shoots projectimes F_AMMOOB, // what object this weapon fires F_RANGE, // range of projectile firing weapon F_FLAMESTRIKE, // causes fires where you hit F_BALANCE, // heals target if their maxhp < your maxhp F_REVENGE, // causes damage based on your hp // tech flags F_RNDCHARGES, // ob starts with between val0 and val1 charges // this will cause F_CHARGES to be filled in F_CHARGES, // generally the number of uses left,v0=min, v1=max F_DONTSHOWCHARGES, // don't show 'xx charges left' when id'd F_RECHARGEWHENOFF, // get power back when you turn it off F_REFILLWITH, // pour obj id val0 onto this to refill its charges // F_POWDER, // this item is a powder // ob appearance flags F_SHINY, // armour flags F_ARMOURRATING, // val0 * 2 = pct of damage reduced F_SHIELD, // this is a shield - use special bodyhitchance code F_OBHP, // val0 = object health, val1 = object maxhealth F_OBHPDRAIN, // val0 = amt hp to lose each second. val1 = NA or damtype // if no damtype specified, it will be DT_DIRECT F_NOOBDAMTEXT, // don't anounce damage to this object F_NOOBDIETEXT, // don't anounce destruction of this object F_NODIECONVERTTEXT, // don't anounce when this object changes // scroll flags F_LINKSPELL, // val0 = spell this scroll will cast when read // v1 = spell power // ob identification flags F_HASHIDDENNAME, // whether this object class has a hidden name F_IDENTIFIED, // whether this object is fully identified // bad flags F_WALKDAM, // val0 = dam per sec, val1 = damtype // magic F_SPELLSCHOOL, // val0 = SPELLSCHOOL enum F_SPELLLEVEL, // val0 = difficulty level of spell F_MAXPOWER, // val0 = max power of this spell (1-10) F_MPCOST, // v0=mp cost of spell. if missing, mpcost if splev^2 //F_SPELLLETTER, // text[0] = letter to cast this spell F_AICASTATVICTIM, // hints for AI to cast spells F_AICASTATADJVICTIM, // hints for AI to cast spells F_AICASTATSELF, // hints for AI to cast spells F_AICASTNEXTTOVICTIM, // hints for AI to cast spells F_AICASTANYWHERE, // hints for AI to cast spells F_AICASTTOFLEE, // hints for AI to cast spells F_AIBOOSTITEM, // ai will use this item to boost/buff itself. // if using this on wands, update aiobok() ! F_AIHEALITEM, // ai will use this item when low on hp F_AIFLEEITEM, // ai will use this item when fleeing // if using this on wands, update aiobok() ! // object _AND_ lifeform flags F_NOSTRDAMMOD, // this object/lf does not have attacks modified // using their strength // lifeform flags F_DEBUG, // debugging enabled F_ATTRMOD, // modify attribute val0 by val1. ie. 0=A_STR,1=-3 F_ATTRSET, // forces attribute val0 to be val1. ie. 0=A_STR,1=18 F_SIZE, // val0 = lf size (enum LFSIZE) F_RESTCOUNT, // val0 = how long you've been resting for F_RESTHEALTIME, // val0 = how long to rest before healing hp F_RESTHEALAMT, // val0 = how many hp to gain after resting x turns F_RESTHEALMPAMT, // val0 = how many MP to gain after resting x turns F_AUTOCMD, // val0 = how many times to repeat this F_LASTCMD, // text[0] = last command performed, v0/1 = x/y of cell, v2=various F_STARTOB, // val0 = %chance of starting with it, text = ob name // val1,2 = min/max amounts. if NA, min=max=1. F_STARTSKILL, // val0 = skill id F_STARTOBDT, // val0 = %chance of starting with damtype val1 F_STARTOBCLASS, // val0 = %chance of starting with obclass val1 F_STARTJOB, // val0 = %chance of starting with it, v1 = jobid F_STARTATT, // val0 = A_xxx, val0 = start bracket (ie. IQ_GENIUS) F_CORPSETYPE, // text field specifies what corpse obtype to leave F_NOCORPSE, // monster's body crumbles to dust after death F_LFSUFFIX, // text = suffix. eg. "skeleton" F_VISRANGE, // how far you can see (in the light) F_VISRANGEMOD, // modifications to visrange F_GUNTARGET, // current projectile weapon target F_CASTINGSPELL, // set while the player is casting a spell // v0 is spell id // ABILITY FLAGS F_FAILEDINSPECT, // lf has failed an inspect check for item id v0 // MONSTER AI FLAGS F_HOSTILE, // lf will attack the player if in sight F_FRIENDLY, // lf will attack all non-players if in sight F_WANTS, // lf will try to pick up object type val0. if // val1 = B_COVETS, will even abandon attacks // for it! F_WANTSOBFLAG, // lf will look for obs with this flag. val1=covets F_WANTSBETTERWEP, // lf will look for better weapons, val1=covets F_WANTSBETTERARM, // lf will look for better armour, val1=covets F_FLEEONDAM, // lf will run away instead of counterattacking F_FLEEONHPPCT, // lf will run away if its hp drop to v0% or lower F_NOFLEE, // lf will not run away F_TARGET, // lf will attack lfid v0. lastknown x/y is v1/v2 F_TARGETCELL, // lf will go towards this place. val0=x,val1=y F_FLEEFROM, // lf will run away from this lf id // TEMP FLAGS F_KILLEDBYPLAYER, // did the player kill this lf? // monster noise flags F_NOISETEXT, // val0 is a enum NOISETYPE // text is "verb^noun" // eg. "shouts^a shout" F_SPELLCASTTEXT, // text is announcement for spellcast F_NODEATHANNOUNCE, // don't say 'the xx dies' if this lf dies F_BEHEADED, // use special corpse drop code F_MOVESPEED, // override default move speed F_ACTIONSPEED, // override default action speed F_SPELLSPEED, // override default spellcast speed (ie. movespeed) F_RARITY, // val[0] = habitat, val[1] = rarity F_NUMAPPEAR, // when randomly appearing, can have > 1. val[0] = min, val[1] = max F_HITDICE, // val0: # d4 to roll for maxhp per level. val1: +xx F_MPDICE, // val0: # d4 to roll for maxmp per level. val1: +xx F_JOB, // val0 = player's class/job F_NAME, // text = player's name F_XPMOD, // add/subtract this much from calculated xpval F_BLOODOB, // text = type of object to drop for blood F_OBESE, // double base weight for race! F_ORIGRACE, // original player race (if you polymorphed) F_ORIGJOB, // original player job (if you polymorphed) F_POLYMORPHED, // lf has been polymorphed F_SHORTCUT, // spell keyboard shortcut. // v0=slot (0-9) // text=spell text // for monsters F_INSECT, // this race is classed as an insect F_ANIMAL, // this race is classed as an animal F_UNDEAD, // this race is classed as undead F_COLDBLOOD, // this race is coldblooded F_NOBODYPART, // this race doesn't have bodypart val0 F_NOPACK, // this race cannot hold objects F_NOSPELLS, // this race cannot cast spells F_INDUCEFEAR, // causes fear when you attack it F_AUTOCREATEOB, // produces obtype 'text' wherever it walks, v0=radius // (only if ob of that type not already there) F_PACKATTACK, // deal v0 extra damage of type v1 if there are // v2 or more monsters matching f->text next // to the victim F_PHALANX, // gain v0 AR if v2 or more adj monsters matching f->text // INTRINSICS F_ASLEEP, // is asleep F_BLIND, // cannot see anything F_CANCAST, // can cast the spell val0 (need MP) F_CANWILL, // can cast the spell val0 without using MP // v1 is counter untiluse // v2 is what you need to use it // ie. when v1 == v2, ability is ready. F_DETECTAURAS, // autodetect bless/curse F_DETECTLIFE, // autodetect nearby lifeforms in orthogonal dist v0 F_DETECTMAGIC, // autodetect magic/special objects F_DETECTMETAL, // autodetect nearby metal F_EXTRAINFO, // knows extra info F_FLYING, // lf is flying F_FASTACT, // modifier for action speed F_FASTMOVE, // modifier for move speed F_FOODPOISONED, // has food poisoning F_FREEZINGTOUCH,// next thing touched turns to ice! F_GRABBEDBY,// you've been grabbed by lf id v0 F_GRABBING, // you are grabbing lf id v0 F_HEAVYBLOW, // next attack is a heavy blow F_INVISIBLE, // lifeform is invisible F_INVULNERABLE,// immune to most damage F_QUICKBITE, // deals v0 d d1 + d2 damage when you hit a bleeding victim // (bypasses armour) F_GRAVBOOSTED,// cannot walk or throw stuff F_PAIN, // take damage if you walk F_PARALYZED,// cannot do anything F_FROZEN, // made of ice F_LEVITATING, // like flying but uncontrolled F_MAGSHIELD,// magnetic shield F_NAUSEATED, // lf has a stench penalty of v0 (-v0*10 to hit). F_NONCORPOREAL,// can walk through walls F_OMNIPOTENT, // knows extra info F_PHOTOMEM, // you don't forget your surroundings F_REGENERATES, // regenerate HP at val0 per turn F_RESISTMAG, // immune to most magic effects F_MPREGEN, // regenerate MP at val0 per turn F_SEEINDARK, // nightvis range is val0 F_SEEINVIS, // can see invisible things F_SEEWITHOUTEYES, // doesn't need eyes to see F_STABILITY, // doesn't slip over F_STENCH, // creatures within v0 gain f_nauseated = v1 F_PRODUCESLIGHT, // produces light of val0 radius. // (but not for obs in pack) // if val2 is true, will only make light if ob // is activated! F_SLOWACT, // modifier for action speed F_SLOWMOVE, // modifier for move speed F_XRAYVIS, //val0=num of walls we can see through F_CANSEETHROUGHMAT, //val0=kind of material you can see through F_SPRINTING, // you are sprinting F_TIRED, // you are too tired to sprint F_DODGES, // you dodge missed attacks F_NOTIME, // this lf's actions don't take time // skills F_HASSKILL, // lf has skill v0 at level v1 // COMBAT F_HASATTACK, // objecttype id to use when attacking unarmed // if val0-3 are filled in, they override the object's // damage (x y-sided dice + z) F_EVASION, // % chance of evading an attack // healing F_STATGAINREADY, // ready to increase str/int etc. v2 is how many times // we can do it. F_RESTING, // are we resting? cleared on any action other than rest. // v2 = if not, NA it is the training counter. // when it hits 0, you finish trainign. // F_RUNNING, // are we running? // nutrition F_HUNGER, // val0 = hunger, higher = hungrier // for jobs F_IFPCT, // only add the NEXT job flag if rnd(1,100) <= v0. F_ELSE, F_IFPLAYER, F_IFMONSTER, F_ENDIFPLAYER, F_ENDIFMONSTER, // F_NULL = -1 }; // hunger levels enum HUNGER { H_STUFFED = -2, H_FULL = -1, H_NONE = 0, H_PECKISH = 1, H_HUNGRY = 2, H_VHUNGRY = 3, H_STARVING = 4, H_STARVED = 5 }; // probabilities //#define CH_DEADENDOB 35 //#define CH_EMPTYCELLOB 3 #define CH_PILLAR 5 // Booleans #define B_FALSE (0) #define B_TRUE (-1) //#define B_TEMP (-1) //#define B_PERM (-2) //#define B_NOT (-3) enum LIGHTLEV { L_PERMDARK = -1, L_NOTLIT = 0, L_TEMP = 1, L_PERMLIGHT = 2, }; #define B_DIEONFAIL (-1) #define B_BLUNTONFAIL (-2) #define B_COVETS (-1) #define B_ANY (0) #define B_SINGLE (0) #define B_MULTI (-1) #define B_MULTIPLE (-1) #define B_NOOBS (0) #define B_WITHOBS (-1) #define B_UNKNOWN (0) #define B_KNOWN (-1) #define B_NOBADMOVES (0) #define B_BADMOVESOK (1) #define B_NOSTACK (0) #define B_STACK (-1) #define B_STACKOK (-1) #define NOOWNER (NULL) #define NOLOC (NULL) #define B_NOTSOLID (0) #define B_EMPTY (0) #define B_SOLID (-1) #define B_OPAQUE (0) #define B_TRANSPARENT (-1) #define B_TRANS (-1) #define B_IFACTIVATED (-1) #define B_BIG (-1) // errors enum ERROR { E_OK = 0, E_WALLINWAY = 1, E_LFINWAY = 2, E_NOSPACE = 3, E_SELNOTHING = 4, E_ALREADYUSING = 5, E_WEARINGSOMETHINGELSE = 6, E_NOUNARMEDATTACK = 7, E_NOTEQUIPPED = 8, E_NOPICKUP = 9, E_MONSTERNEARBY = 10, E_NOEFFECT = 11, E_FAILED = 12, E_WRONGCELLTYPE = 13, E_OBINWAY = 14, E_TOOHEAVY = 15, E_NOHANDS = 16, E_NOPACK = 17, E_INSUBSTANTIAL = 18, E_WRONGOBTYPE = 19, E_CURSED = 20, E_NOLOS = 21, E_NOLOF = 22, E_IMPOSSIBLE = 23, E_NOTARGET = 24, E_NOAMMO = 25, E_GRAVBOOSTED = 26, E_NOMP = 27, E_AVOIDOB = 28, E_FROZEN = 29, E_TOOBIG = 30, E_NOTREADY = 31, E_BLIND = 32, E_GRABBEDBY = 33, E_CANTMOVE = 34, E_NOTKNOWN = 35, E_TOOPOWERFUL = 36, }; enum COMMAND { CMD_AIM, CMD_CLOSE, CMD_DOWN, CMD_DROP, CMD_DROPMULTI, CMD_EAT, CMD_FIRE, CMD_FIRENEW, CMD_FORCEATTACK, CMD_HELP, CMD_INFOARMOUR, CMD_INFOKNOWLEDGE, CMD_INFOPLAYER, CMD_INV, CMD_LOOKAROUND, CMD_LOOKHERE, CMD_MAGIC, CMD_MEMMAGIC, CMD_MSGHIST, CMD_OPERATE, CMD_PICKLOCK, CMD_PICKUP, CMD_POUR, CMD_QUAFF, CMD_QUIT, CMD_READ, CMD_REST, CMD_RESTFULL, CMD_SAVEQUIT, CMD_TAKEOFF, CMD_UP, CMD_WEAR, CMD_WEILD, }; // command types typedef struct command_s { enum COMMAND id; char ch; char *desc; struct command_s *next, *prev; } command_t; typedef struct map_s { int id; int depth; char *name; // name of this map enum HABITAT habitat; // eg. dungeon, forest, etc unsigned int seed; int w,h; // width/height of this map struct cell_s *cell[MAX_MAPW*MAX_MAPH]; // list of cells in this map int nextmap[MAXDIR_ORTH]; // which map is in each direction struct lifeform_s *lf,*lastlf; struct map_s *next, *prev; } map_t; //////////////// remember to modify save/load for new props!! typedef struct cell_s { map_t *map; // pointer back to map int x,y; // map coords int roomid; struct celltype_s *type; struct obpile_s *obpile; enum LIGHTLEV lit; enum LIGHTLEV origlit; int littimer; char *writing; // lifeform pile struct lifeform_s *lf; // known to player? int known; // FOR CONSTRUCTION int visited; } cell_t; typedef struct celltype_s { int id; // eg. dungeonfloor, wall, door char glyph; // how to display it char *name; // name of cell type int solid; // can you walk through it? int transparent; // can you see through it? struct material_s *material; struct flagpile_s *flags; struct celltype_s *next, *prev; } celltype_t; typedef struct race_s { enum RACE id; enum RACE baseid; struct material_s *material; char *name; char glyph; float weight; struct flagpile_s *flags; // speed modifiers // hit dice struct race_s *next, *prev; } race_t; typedef struct lifeform_s { int id; int controller; struct race_s *race; int level; long xp; int skillpoints; int hp,maxhp; int mp,maxmp; int alive; char *lastdam; enum DAMTYPE lastdamtype; int timespent; int sorted; int att[MAXATTS]; int baseatt[MAXATTS]; float forgettimer; struct obpile_s *pack; struct flagpile_s *flags; int created; // set to TRUE once lf creation is done. int polyrevert; // about to revert form a polymorph? // for loading long oblist[MAXPILEOBS]; int x,y; int nlos; cell_t **los; // set to TRUE after lf has being created int born; // for ai movement - don't need to save. struct cell_s *ignorecell; struct cell_s *cell; struct lifeform_s *next, *prev; } lifeform_t; typedef struct obpile_s { lifeform_t *owner;// } Only one of these cell_t *where; // } should be filled in struct object_s *first,*last; // for loading long oblist[MAXPILEOBS]; } obpile_t; typedef struct flagpile_s { lifeform_t *owner; struct object_s *ob; struct flag_s *first,*last; } flagpile_t; typedef struct flag_s { enum FLAG id; int nvals; int val[3]; char *text; long obfrom; // for conferred flags, link to object->id. -1 if not conferred. // int known; int lifetime; struct flagpile_s *pile; struct flag_s *next, *prev; } flag_t; typedef struct material_s { enum MATERIAL id; char *name; float weightrating; struct flagpile_s *flags; struct material_s *next,*prev; } material_t; enum SKILL { SK_ATHLETICS, SK_LOCKPICKING, SK_RESEARCH, SK_SPELLCASTING, SK_TECHUSAGE, }; #define MAXSKILLS 5 // proficiency levels enum SKILLLEVEL { PR_INEPT = 0, PR_NOVICE = 1, PR_BEGINNER = 2, PR_ADEPT = 3, PR_SKILLED = 4, PR_EXPERT = 5, PR_MASTER = 6, }; typedef struct skill_s { enum SKILL id; char *name; char *desc; struct skill_s *next, *prev; } skill_t; typedef struct hiddenname_s { enum OBCLASS obclass; char *text; int used; struct hiddenname_s *next, *prev; } hiddenname_t; typedef struct knowledge_s { enum OBTYPE id; char *hiddenname; int known; struct knowledge_s *next, *prev; } knowledge_t; typedef struct job_s { enum JOB id; char *name; flagpile_t *flags; struct job_s *next, *prev; } job_t; typedef struct objectclass_s { enum OBCLASS id; char *name; char *desc; char glyph; struct flagpile_s *flags; struct objectclass_s *next, *prev; } objectclass_t; typedef struct objecttype_s { enum OBTYPE id; char *name; char *desc; struct objectclass_s *obclass; material_t *material; float weight; // in kilograms struct flagpile_s *flags; struct objecttype_s *next, *prev; } objecttype_t; typedef struct object_s { long id; // unique for every ob in the game! struct objecttype_s *type; struct obpile_s *pile; // reverse pointer back to pile // these variables are initially // inherited from objecttype: material_t *material; float weight; // in kilograms // flags // these variables are NOT inherited char *inscription; char letter; enum BLESSTYPE blessed; int blessknown; int amt; // for stackable objects long birthtime; flagpile_t *flags; struct object_s *next, *prev; } object_t; enum OBMOD { OM_FLAMING, OM_FROZEN, OM_HEADLESS, OM_MASTERWORK, OM_SHODDY, }; #define MAXOBMODS 4 enum BRAND { BR_BALANCE, BR_DEXTERITY, BR_FEEBLENESS, BR_FLIGHT, BR_GIANTSTRENGTH, BR_IMPACT, BR_INTELLIGENCE, BR_KNOWLEDGE, BR_LEVITATION, BR_FEATHERFALL, BR_ANTIMAG, BR_CONCEALMENT, BR_SHARPNESS, BR_PYROMANIA, BR_REVENGE, BR_SLOTH, BR_SPEED, BR_STRENGTH, BR_SWIFTNESS, BR_TELEKINESIS, BR_TELEPATHY, BR_WEAKNESS, }; typedef struct brand_s { enum BRAND id; char *description; char *suffix; flagpile_t *flags; enum BODYPART bp; struct brand_s *next, *prev; } brand_t; typedef struct obmod_s { enum OBMOD id; char *prefix; flagpile_t *flags; struct obmod_s *next, *prev; } obmod_t; typedef struct choice_s { char ch; char *text; char *desc; void *data; int heading; int valid; // used in askchoicestr } choice_t; #define MAXPROMPTQUESTIONS 5 typedef struct prompt_s { char *q[MAXPROMPTQUESTIONS]; int nqs; int whichq; void *result; choice_t choice[MAXCHOICES]; int selection; int nchoices; int maycancel; } prompt_t; #endif