Use enums for object number mnemonics instead of VOCWRD() calls.

This commit is contained in:
Jason S. Ninneman 2017-06-26 11:27:27 -07:00
parent 0bab67e106
commit 6ac098170c
5 changed files with 86 additions and 137 deletions

View file

@ -166,15 +166,19 @@ extern int restore(FILE *);
#define INDEEP(LOC) ((LOC) >= LOC_MISTHALL && !OUTSID(LOC)) #define INDEEP(LOC) ((LOC) >= LOC_MISTHALL && !OUTSID(LOC))
/* vocabulary items */ /* vocabulary items */
extern long AMBER, ATTACK, AXE, BACK, BATTERY, BEAR, extern long NUL;
BIRD, BLOOD, BOTTLE, CAGE, CAVE, CAVITY, CHAIN, CHASM, CHEST, extern long BACK;
CLAM, COINS, DOOR, DPRSSN, DRAGON, DWARF, EGGS, extern long LOOK;
EMERALD, ENTER, ENTRNC, FIND, FISSURE, FOOD, GRATE, HINT, INVENT, extern long CAVE;
JADE, KEYS, KNIFE, LAMP, LOCK, LOOK, MAGAZINE, MESSAG, MIRROR, NUGGET, NUL, extern long FIND;
OGRE, OIL, OYSTER, PANIC, PEARL, PILLOW, PLANT, PLANT2, PYRAMID, extern long INVENT;
RESER, ROD, ROD2, RUBY, RUG, SAPPH, SAY, SIGN, SNAKE, extern long SAY;
STEPS, STICK, STREAM, THROW, TRIDENT, TROLL, TROLL2, extern long ENTER;
URN, VASE, VEND, VOLCANO, WATER; extern long STREAM;
extern long DPRSSN;
extern long ENTRNC;
extern long LOCK;
extern long THROW;
enum speechpart {unknown, intransitive, transitive}; enum speechpart {unknown, intransitive, transitive};

View file

@ -2771,20 +2771,20 @@ objects: !!omap
- OBJ_0: - OBJ_0:
inventory: !!null inventory: !!null
longs: !!null longs: !!null
- OBJ_1: - KEYS:
words: ['keys', 'key'] words: ['keys', 'key']
inventory: 'Set of keys' inventory: 'Set of keys'
locations: LOC_BUILDING locations: LOC_BUILDING
longs: longs:
- 'There are some keys on the ground here.' - 'There are some keys on the ground here.'
- OBJ_2: - LAMP:
words: ['lamp', 'lante'] words: ['lamp', 'lante']
inventory: 'Brass lantern' inventory: 'Brass lantern'
locations: LOC_BUILDING locations: LOC_BUILDING
longs: longs:
- [LAMP_DARK, 'There is a shiny brass lamp nearby.'] - [LAMP_DARK, 'There is a shiny brass lamp nearby.']
- [LAMP_BRIGHT, 'There is a lamp shining nearby.'] - [LAMP_BRIGHT, 'There is a lamp shining nearby.']
- OBJ_3: - GRATE:
words: ['grate'] words: ['grate']
inventory: '*grate' inventory: '*grate'
locations: [LOC_GRATE, LOC_BELOWGRATE] locations: [LOC_GRATE, LOC_BELOWGRATE]
@ -2792,25 +2792,25 @@ objects: !!omap
longs: longs:
- [GRATE_CLOSED, 'The grate is locked.'] - [GRATE_CLOSED, 'The grate is locked.']
- [GRATE_OPEN, 'The grate is open.'] - [GRATE_OPEN, 'The grate is open.']
- OBJ_4: - CAGE:
words: ['cage'] words: ['cage']
inventory: 'Wicker cage' inventory: 'Wicker cage'
locations: LOC_COBBLE locations: LOC_COBBLE
longs: longs:
- 'There is a small wicker cage discarded nearby.' - 'There is a small wicker cage discarded nearby.'
- OBJ_5: - ROD:
words: ['rod'] words: ['rod']
inventory: 'Black rod' inventory: 'Black rod'
locations: LOC_DEBRIS locations: LOC_DEBRIS
longs: longs:
- 'A three foot black rod with a rusty star on an end lies nearby.' - 'A three foot black rod with a rusty star on an end lies nearby.'
- OBJ_6: - ROD2:
words: ['rod'] words: ['rod']
inventory: 'Black rod' inventory: 'Black rod'
locations: LOC_NOWHERE locations: LOC_NOWHERE
longs: longs:
- 'A three foot black rod with a rusty mark on an end lies nearby.' - 'A three foot black rod with a rusty mark on an end lies nearby.'
- OBJ_7: - STEPS:
words: ['steps'] words: ['steps']
inventory: '*steps' inventory: '*steps'
locations: [LOC_PITTOP, LOC_MISTHALL] locations: [LOC_PITTOP, LOC_MISTHALL]
@ -2818,7 +2818,7 @@ objects: !!omap
longs: longs:
- 'Rough stone steps lead down the pit.' - 'Rough stone steps lead down the pit.'
- 'Rough stone steps lead up the dome.' - 'Rough stone steps lead up the dome.'
- OBJ_8: - BIRD:
words: ['bird'] words: ['bird']
inventory: 'Little bird in cage' inventory: 'Little bird in cage'
locations: LOC_BIRD locations: LOC_BIRD
@ -2833,7 +2833,7 @@ objects: !!omap
- 'To your surprise, you can understand the bird''s chirping; it is\nsinging about the joys of its forest home.' - 'To your surprise, you can understand the bird''s chirping; it is\nsinging about the joys of its forest home.'
- 'The bird does not seem inclined to sing while in the cage.' - 'The bird does not seem inclined to sing while in the cage.'
- 'The bird is singing to you in gratitude for your having returned it to\nits home. In return, it informs you of a magic word which it thinks\nyou may find useful somewhere near the Hall of Mists. The magic word\nchanges frequently, but for now the bird believes it is "%s". You\nthank the bird for this information, and it flies off into the forest.' - 'The bird is singing to you in gratitude for your having returned it to\nits home. In return, it informs you of a magic word which it thinks\nyou may find useful somewhere near the Hall of Mists. The magic word\nchanges frequently, but for now the bird believes it is "%s". You\nthank the bird for this information, and it flies off into the forest.'
- OBJ_9: - DOOR:
words: ['door'] words: ['door']
inventory: '*rusty door' inventory: '*rusty door'
locations: LOC_IMMENSE locations: LOC_IMMENSE
@ -2841,13 +2841,13 @@ objects: !!omap
longs: longs:
- 'The way north is barred by a massive, rusty, iron door.' - 'The way north is barred by a massive, rusty, iron door.'
- 'The way north leads through a massive, rusty, iron door.' - 'The way north leads through a massive, rusty, iron door.'
- OBJ_10: - PILLOW:
words: ['pillo', 'velve'] words: ['pillo', 'velve']
inventory: 'Velvet pillow' inventory: 'Velvet pillow'
locations: LOC_SOFTROOM locations: LOC_SOFTROOM
longs: longs:
- 'A small velvet pillow lies on the floor.' - 'A small velvet pillow lies on the floor.'
- OBJ_11: - SNAKE:
words: ['snake'] words: ['snake']
inventory: '*snake' inventory: '*snake'
locations: LOC_KINGHALL locations: LOC_KINGHALL
@ -2857,7 +2857,7 @@ objects: !!omap
- '' # chased away - '' # chased away
sounds: sounds:
- 'The snake is hissing venomously.' - 'The snake is hissing venomously.'
- OBJ_12: - FISSURE:
words: ['fissu'] words: ['fissu']
inventory: '*fissure' inventory: '*fissure'
locations: [LOC_EASTBANK, LOC_WESTBANK] locations: [LOC_EASTBANK, LOC_WESTBANK]
@ -2875,7 +2875,7 @@ objects: !!omap
- 'A massive stone tablet imbedded in the wall reads:\n"Congratulations on bringing light into the dark-room!"' - 'A massive stone tablet imbedded in the wall reads:\n"Congratulations on bringing light into the dark-room!"'
texts: texts:
- '"Congratulations on bringing light into the dark-room!"' - '"Congratulations on bringing light into the dark-room!"'
- OBJ_14: - CLAM:
words: ['clam'] words: ['clam']
inventory: 'Giant clam >GRUNT!<' inventory: 'Giant clam >GRUNT!<'
locations: LOC_SHELLROOM locations: LOC_SHELLROOM
@ -2883,7 +2883,7 @@ objects: !!omap
- 'There is an enormous clam here with its shell tightly closed.' - 'There is an enormous clam here with its shell tightly closed.'
sounds: sounds:
- 'The clam is as tight-mouthed as a, er, clam.' - 'The clam is as tight-mouthed as a, er, clam.'
- OBJ_15: - OYSTER:
words: ['oyste'] words: ['oyste']
inventory: 'Giant oyster >GROAN!<' inventory: 'Giant oyster >GROAN!<'
locations: LOC_NOWHERE locations: LOC_NOWHERE
@ -2893,7 +2893,7 @@ objects: !!omap
sounds: sounds:
- 'Even though it''s an oyster, the critter''s as tight-mouthed as a clam.' - 'Even though it''s an oyster, the critter''s as tight-mouthed as a clam.'
- 'It says the same thing it did before. Hm, maybe it''s a pun?' - 'It says the same thing it did before. Hm, maybe it''s a pun?'
- OBJ_16: - MAGAZINE:
words: ['issue', 'spelu', '"spel'] words: ['issue', 'spelu', '"spel']
inventory: '"Spelunker Today"' inventory: '"Spelunker Today"'
locations: LOC_ANTEROOM locations: LOC_ANTEROOM
@ -2901,24 +2901,24 @@ objects: !!omap
- 'There are a few recent issues of "Spelunker Today" magazine here.' - 'There are a few recent issues of "Spelunker Today" magazine here.'
texts: texts:
- 'I''m afraid the magazine is written in dwarvish. But pencilled on one\ncover you see, "Please leave the magazines at the construction site."' - 'I''m afraid the magazine is written in dwarvish. But pencilled on one\ncover you see, "Please leave the magazines at the construction site."'
- OBJ_17: - DWARF:
words: ['dwarf', 'dwarv'] words: ['dwarf', 'dwarv']
inventory: !!null inventory: !!null
locations: LOC_NOWHERE locations: LOC_NOWHERE
immovable: true immovable: true
longs: !!null longs: !!null
- OBJ_18: - KNIFE:
words: ['knife', 'knive'] words: ['knife', 'knive']
inventory: !!null inventory: !!null
locations: LOC_NOWHERE locations: LOC_NOWHERE
longs: !!null longs: !!null
- OBJ_19: - FOOD:
words: ['food', 'ratio'] words: ['food', 'ratio']
inventory: 'Tasty food' inventory: 'Tasty food'
locations: LOC_BUILDING locations: LOC_BUILDING
longs: longs:
- 'There is food here.' - 'There is food here.'
- OBJ_20: - BOTTLE:
words: ['bottl', 'jar'] words: ['bottl', 'jar']
inventory: 'Small bottle' inventory: 'Small bottle'
locations: LOC_BUILDING locations: LOC_BUILDING
@ -2926,23 +2926,23 @@ objects: !!omap
- [WATER_BOTTLE, 'There is a bottle of water here.'] - [WATER_BOTTLE, 'There is a bottle of water here.']
- [EMPTY_BOTTLE, 'There is an empty bottle here.'] - [EMPTY_BOTTLE, 'There is an empty bottle here.']
- [OIL_BOTTLE, 'There is a bottle of oil here.'] - [OIL_BOTTLE, 'There is a bottle of oil here.']
- OBJ_21: - WATER:
words: ['water', 'h2o'] words: ['water', 'h2o']
inventory: 'Water in the bottle' inventory: 'Water in the bottle'
locations: LOC_NOWHERE locations: LOC_NOWHERE
longs: !!null longs: !!null
- OBJ_22: - OIL:
words: ['oil'] words: ['oil']
inventory: 'Oil in the bottle' inventory: 'Oil in the bottle'
locations: LOC_NOWHERE locations: LOC_NOWHERE
longs: !!null longs: !!null
- OBJ_23: - MIRROR:
words: ['mirro'] words: ['mirro']
inventory: '*mirror' inventory: '*mirror'
locations: LOC_MIRRORCANYON locations: LOC_MIRRORCANYON
immovable: true immovable: true
longs: !!null longs: !!null
- OBJ_24: - PLANT:
words: ['plant', 'beans'] words: ['plant', 'beans']
inventory: '*plant' inventory: '*plant'
locations: LOC_WESTPIT locations: LOC_WESTPIT
@ -2958,7 +2958,7 @@ objects: !!omap
- 'The plant continues to ask plaintively for water.' - 'The plant continues to ask plaintively for water.'
- 'The plant continues to demand water.' - 'The plant continues to demand water.'
- 'The plant now maintains a contented silence.' - 'The plant now maintains a contented silence.'
- OBJ_25: - PLANT2:
words: ['plant'] words: ['plant']
inventory: '*phony plant' # seen in Twopit Room only when tall enough inventory: '*phony plant' # seen in Twopit Room only when tall enough
locations: [LOC_WESTEND, LOC_EASTEND] locations: [LOC_WESTEND, LOC_EASTEND]
@ -2981,7 +2981,7 @@ objects: !!omap
immovable: true immovable: true
longs: longs:
- 'The shadowy figure seems to be trying to attract your attention.' - 'The shadowy figure seems to be trying to attract your attention.'
- OBJ_28: - AXE:
words: ['axe'] words: ['axe']
inventory: 'Dwarf''s axe' inventory: 'Dwarf''s axe'
locations: LOC_NOWHERE locations: LOC_NOWHERE
@ -3000,7 +3000,7 @@ objects: !!omap
locations: LOC_NOWHERE locations: LOC_NOWHERE
immovable: true immovable: true
longs: !!null # never present longs: !!null # never present
- OBJ_31: - DRAGON:
words: ['drago'] words: ['drago']
inventory: '*dragon' inventory: '*dragon'
locations: [LOC_SECRET4, LOC_SECRET6] locations: [LOC_SECRET4, LOC_SECRET6]
@ -3014,7 +3014,7 @@ objects: !!omap
- 'The dragon''s ominous hissing does not bode well for you.' - 'The dragon''s ominous hissing does not bode well for you.'
- 'The dragon is, not surprisingly, silent.' - 'The dragon is, not surprisingly, silent.'
- 'The dragon is, not surprisingly, silent.' - 'The dragon is, not surprisingly, silent.'
- OBJ_32: - CHASM:
words: ['chasm'] words: ['chasm']
inventory: '*chasm' inventory: '*chasm'
locations: [LOC_SWCHASM, LOC_NECHASM] locations: [LOC_SWCHASM, LOC_NECHASM]
@ -3022,7 +3022,7 @@ objects: !!omap
longs: longs:
- 'A rickety wooden bridge extends across the chasm, vanishing into the\nmist. A notice posted on the bridge reads, "Stop! Pay troll!"' - 'A rickety wooden bridge extends across the chasm, vanishing into the\nmist. A notice posted on the bridge reads, "Stop! Pay troll!"'
- 'The wreckage of a bridge (and a dead bear) can be seen at the bottom\nof the chasm.' - 'The wreckage of a bridge (and a dead bear) can be seen at the bottom\nof the chasm.'
- OBJ_33: - TROLL:
words: ['troll'] words: ['troll']
inventory: '*troll' inventory: '*troll'
locations: [LOC_SWCHASM, LOC_NECHASM] locations: [LOC_SWCHASM, LOC_NECHASM]
@ -3033,14 +3033,14 @@ objects: !!omap
- '' # chased away - '' # chased away
sounds: sounds:
- 'The troll sounds quite adamant in his demand for a treasure.' - 'The troll sounds quite adamant in his demand for a treasure.'
- OBJ_34: - TROLL2:
words: ['troll'] words: ['troll']
inventory: '*phony troll' inventory: '*phony troll'
locations: [LOC_NOWHERE, LOC_NOWHERE] locations: [LOC_NOWHERE, LOC_NOWHERE]
immovable: true immovable: true
longs: longs:
- 'The troll is nowhere to be seen.' - 'The troll is nowhere to be seen.'
- OBJ_35: - BEAR:
words: ['bear'] words: ['bear']
inventory: !!null # bear uses rtext 141 inventory: !!null # bear uses rtext 141
locations: LOC_BARRENROOM locations: LOC_BARRENROOM
@ -3050,7 +3050,7 @@ objects: !!omap
- 'There is a gentle cave bear sitting placidly in one corner.' - 'There is a gentle cave bear sitting placidly in one corner.'
- 'There is a contented-looking bear wandering about nearby.' - 'There is a contented-looking bear wandering about nearby.'
- '' # dead - '' # dead
- OBJ_36: - MESSAG:
words: ['messa'] words: ['messa']
inventory: '*message in second maze' inventory: '*message in second maze'
locations: LOC_NOWHERE locations: LOC_NOWHERE
@ -3059,13 +3059,13 @@ objects: !!omap
- 'There is a message scrawled in the dust in a flowery script, reading:\n"This is not the maze where the pirate leaves his treasure chest."' - 'There is a message scrawled in the dust in a flowery script, reading:\n"This is not the maze where the pirate leaves his treasure chest."'
texts: texts:
- '"This is not the maze where the pirate leaves his treasure chest."' - '"This is not the maze where the pirate leaves his treasure chest."'
- OBJ_37: - VOLCANO:
words: ['volca', 'geyse'] words: ['volca', 'geyse']
inventory: '*volcano and/or geyser' inventory: '*volcano and/or geyser'
locations: LOC_BREATHTAKING locations: LOC_BREATHTAKING
immovable: true immovable: true
longs: !!null longs: !!null
- OBJ_38: - VEND:
words: ['machi', 'vendi'] words: ['machi', 'vendi']
inventory: '*vending machine' inventory: '*vending machine'
locations: LOC_DEADEND13 locations: LOC_DEADEND13
@ -3076,7 +3076,7 @@ objects: !!omap
texts: texts:
- '"Drop coins here to receive fresh batteries."' - '"Drop coins here to receive fresh batteries."'
- '"Drop coins here to receive fresh batteries."' - '"Drop coins here to receive fresh batteries."'
- OBJ_39: - BATTERY:
words: ['batte'] words: ['batte']
inventory: 'Batteries' inventory: 'Batteries'
locations: LOC_NOWHERE locations: LOC_NOWHERE
@ -3089,7 +3089,7 @@ objects: !!omap
locations: LOC_SOFTROOM locations: LOC_SOFTROOM
immovable: true immovable: true
longs: !!null longs: !!null
- OBJ_41: - OGRE:
words: ['ogre'] words: ['ogre']
inventory: '*ogre' inventory: '*ogre'
locations: LOC_LARGE locations: LOC_LARGE
@ -3098,7 +3098,7 @@ objects: !!omap
- 'A formidable ogre bars the northern exit.' - 'A formidable ogre bars the northern exit.'
sounds: sounds:
- 'The ogre is apparently the strong, silent type.' - 'The ogre is apparently the strong, silent type.'
- OBJ_42: - URN:
words: ['urn'] words: ['urn']
inventory: '*urn' inventory: '*urn'
locations: LOC_CLIFF locations: LOC_CLIFF
@ -3107,7 +3107,7 @@ objects: !!omap
- 'A small urn is embedded in the rock.' - 'A small urn is embedded in the rock.'
- 'A small urn full of oil is embedded in the rock.' - 'A small urn full of oil is embedded in the rock.'
- 'A small oil flame extrudes from an urn embedded in the rock.' - 'A small oil flame extrudes from an urn embedded in the rock.'
- OBJ_43: - CAVITY:
words: ['cavit'] words: ['cavit']
inventory: '*cavity' inventory: '*cavity'
locations: LOC_NOWHERE locations: LOC_NOWHERE
@ -3115,14 +3115,14 @@ objects: !!omap
longs: longs:
- '' # something in it - '' # something in it
- 'There is a small urn-shaped cavity in the rock.' - 'There is a small urn-shaped cavity in the rock.'
- OBJ_44: - BLOOD:
words: ['blood'] words: ['blood']
inventory: '*blood' inventory: '*blood'
locations: LOC_NOWHERE locations: LOC_NOWHERE
immovable: true immovable: true
longs: longs:
- '' # described with dragon - '' # described with dragon
- OBJ_45: - RESER:
words: ['reser'] words: ['reser']
inventory: '*reservoir' inventory: '*reservoir'
locations: [LOC_RESERVOIR, LOC_RESNORTH] locations: [LOC_RESERVOIR, LOC_RESNORTH]
@ -3155,7 +3155,7 @@ objects: !!omap
- '' - ''
texts: texts:
- '"You won''t get it up the steps"' - '"You won''t get it up the steps"'
- OBJ_49: - SIGN:
words: ['sign'] words: ['sign']
inventory: '*sign' inventory: '*sign'
locations: LOC_ANTEROOM locations: LOC_ANTEROOM
@ -3166,7 +3166,7 @@ objects: !!omap
texts: texts:
- 'Cave under construction beyond this point.\n Proceed at own risk.\n [Witt Construction Company]' - 'Cave under construction beyond this point.\n Proceed at own risk.\n [Witt Construction Company]'
- '"Treasure Vault. Keys in main office."' - '"Treasure Vault. Keys in main office."'
- OBJ_50: - NUGGET:
words: ['gold', 'nugge'] words: ['gold', 'nugge']
inventory: 'Large gold nugget' inventory: 'Large gold nugget'
locations: LOC_NUGGET locations: LOC_NUGGET
@ -3194,21 +3194,21 @@ objects: !!omap
treasure: true treasure: true
longs: longs:
- 'There is precious jewelry here!' - 'There is precious jewelry here!'
- OBJ_54: - COINS:
words: ['coins'] words: ['coins']
inventory: 'Rare coins' inventory: 'Rare coins'
locations: LOC_WESTSIDE locations: LOC_WESTSIDE
treasure: true treasure: true
longs: longs:
- 'There are many coins here!' - 'There are many coins here!'
- OBJ_55: - CHEST:
words: ['chest', 'box', 'treas'] words: ['chest', 'box', 'treas']
inventory: 'Treasure chest' inventory: 'Treasure chest'
locations: LOC_NOWHERE locations: LOC_NOWHERE
treasure: true treasure: true
longs: longs:
- 'The pirate''s treasure chest is here!' - 'The pirate''s treasure chest is here!'
- OBJ_56: - EGGS:
words: ['eggs', 'egg', 'nest'] words: ['eggs', 'egg', 'nest']
inventory: 'Golden eggs' inventory: 'Golden eggs'
locations: LOC_GIANTROOM locations: LOC_GIANTROOM
@ -3217,14 +3217,14 @@ objects: !!omap
- 'There is a large nest here, full of golden eggs!' - 'There is a large nest here, full of golden eggs!'
- 'The nest of golden eggs has vanished!' - 'The nest of golden eggs has vanished!'
- 'Done!' - 'Done!'
- OBJ_57: - TRIDENT:
words: ['tride'] words: ['tride']
inventory: 'Jeweled trident' inventory: 'Jeweled trident'
locations: LOC_WATERFALL locations: LOC_WATERFALL
treasure: true treasure: true
longs: longs:
- 'There is a jewel-encrusted trident here!' - 'There is a jewel-encrusted trident here!'
- OBJ_58: - VASE:
words: ['vase', 'ming', 'shard', 'potte'] words: ['vase', 'ming', 'shard', 'potte']
inventory: 'Ming vase' inventory: 'Ming vase'
locations: LOC_ORIENTAL locations: LOC_ORIENTAL
@ -3234,7 +3234,7 @@ objects: !!omap
- [VASE_RESTING, 'The vase is now resting, delicately, on a velvet pillow.'] - [VASE_RESTING, 'The vase is now resting, delicately, on a velvet pillow.']
- [VASE_BROKEN, 'The floor is littered with worthless shards of pottery.'] - [VASE_BROKEN, 'The floor is littered with worthless shards of pottery.']
- [VASE_DROPS, 'The ming vase drops with a delicate crash.'] - [VASE_DROPS, 'The ming vase drops with a delicate crash.']
- OBJ_59: - EMERALD:
words: ['emera'] words: ['emera']
inventory: 'Egg-sized emerald' inventory: 'Egg-sized emerald'
locations: LOC_PLOVER locations: LOC_PLOVER
@ -3242,21 +3242,21 @@ objects: !!omap
longs: longs:
- 'There is an emerald here the size of a plover''s egg!' - 'There is an emerald here the size of a plover''s egg!'
- 'There is an emerald resting in a small cavity in the rock!' - 'There is an emerald resting in a small cavity in the rock!'
- OBJ_60: - PYRAMID:
words: ['plati', 'pyram'] words: ['plati', 'pyram']
inventory: 'Platinum pyramid' inventory: 'Platinum pyramid'
locations: LOC_DARKROOM locations: LOC_DARKROOM
treasure: true treasure: true
longs: longs:
- 'There is a platinum pyramid here, 8 inches on a side!' - 'There is a platinum pyramid here, 8 inches on a side!'
- OBJ_61: - PEARL:
words: ['pearl'] words: ['pearl']
inventory: 'Glistening pearl' inventory: 'Glistening pearl'
locations: LOC_NOWHERE locations: LOC_NOWHERE
treasure: true treasure: true
longs: longs:
- 'Off to one side lies a glistening pearl!' - 'Off to one side lies a glistening pearl!'
- OBJ_62: - RUG:
words: ['rug', 'persi'] words: ['rug', 'persi']
inventory: 'Persian rug' inventory: 'Persian rug'
locations: [LOC_SECRET4, LOC_SECRET6] locations: [LOC_SECRET4, LOC_SECRET6]
@ -3273,7 +3273,7 @@ objects: !!omap
treasure: true treasure: true
longs: longs:
- 'There are rare spices here!' - 'There are rare spices here!'
- OBJ_64: - CHAIN:
words: ['chain'] words: ['chain']
inventory: 'Golden chain' inventory: 'Golden chain'
locations: LOC_BARRENROOM locations: LOC_BARRENROOM
@ -3283,7 +3283,7 @@ objects: !!omap
- 'There is a golden chain lying in a heap on the floor!' - 'There is a golden chain lying in a heap on the floor!'
- 'The bear is locked to the wall with a golden chain!' - 'The bear is locked to the wall with a golden chain!'
- 'There is a golden chain locked to the wall!' - 'There is a golden chain locked to the wall!'
- OBJ_65: - RUBY:
words: ['ruby'] words: ['ruby']
inventory: 'Giant ruby' inventory: 'Giant ruby'
locations: LOC_STOREROOM locations: LOC_STOREROOM
@ -3291,14 +3291,14 @@ objects: !!omap
longs: longs:
- 'There is an enormous ruby here!' - 'There is an enormous ruby here!'
- 'There is a ruby resting in a small cavity in the rock!' - 'There is a ruby resting in a small cavity in the rock!'
- OBJ_66: - JADE:
words: ['jade', 'neckl'] words: ['jade', 'neckl']
inventory: 'Jade necklace' inventory: 'Jade necklace'
locations: LOC_NOWHERE locations: LOC_NOWHERE
treasure: true treasure: true
longs: longs:
- 'A precious jade necklace has been dropped here!' - 'A precious jade necklace has been dropped here!'
- OBJ_67: - AMBER:
words: ['amber', 'gemst'] words: ['amber', 'gemst']
inventory: 'Amber gemstone' inventory: 'Amber gemstone'
locations: LOC_NOWHERE locations: LOC_NOWHERE
@ -3306,7 +3306,7 @@ objects: !!omap
longs: longs:
- 'There is a rare amber gemstone here!' - 'There is a rare amber gemstone here!'
- 'There is an amber gemstone resting in a small cavity in the rock!' - 'There is an amber gemstone resting in a small cavity in the rock!'
- OBJ_68: - SAPPH:
words: ['sapph'] words: ['sapph']
inventory: 'Star sapphire' inventory: 'Star sapphire'
locations: LOC_LEDGE locations: LOC_LEDGE

View file

@ -198,7 +198,7 @@ static long GETNUM(FILE *source)
* scanned). If we're at the end of the line or encounter an illegal * scanned). If we're at the end of the line or encounter an illegal
* character (not a digit, hyphen, or blank), we return 0. */ * character (not a digit, hyphen, or blank), we return 0. */
long DIGIT, GETNUM, SIGN; long DIGIT, GETNUM, sign;
if (source != NULL) MAPLIN(source); if (source != NULL) MAPLIN(source);
GETNUM = 0; GETNUM = 0;
@ -209,9 +209,9 @@ static long GETNUM(FILE *source)
} }
if (INLINE[LNPOSN] != 9) { if (INLINE[LNPOSN] != 9) {
SIGN = 1; sign = 1;
} else { } else {
SIGN = -1; sign = -1;
LNPOSN = LNPOSN + 1; LNPOSN = LNPOSN + 1;
} }
while (!(LNPOSN > LNLENG || INLINE[LNPOSN] == 0)) { while (!(LNPOSN > LNLENG || INLINE[LNPOSN] == 0)) {
@ -224,7 +224,7 @@ static long GETNUM(FILE *source)
LNPOSN = LNPOSN + 1; LNPOSN = LNPOSN + 1;
} }
GETNUM = GETNUM * SIGN; GETNUM = GETNUM * sign;
LNPOSN = LNPOSN + 1; LNPOSN = LNPOSN + 1;
return (GETNUM); return (GETNUM);
} }

59
init.c
View file

@ -72,64 +72,7 @@ void initialise(void)
game.hintlc[i] = 0; game.hintlc[i] = 0;
} }
/* Define some handy mnemonics. These correspond to object numbers. */ /* Define some handy mnemonics. */
AXE = VOCWRD(WORD_AXE, 1);
BATTERY = VOCWRD(WORD_BATTERY, 1);
BEAR = VOCWRD(WORD_BEAR, 1);
BIRD = VOCWRD(WORD_BIRD, 1);
BLOOD = VOCWRD(WORD_BLOOD, 1);
BOTTLE = VOCWRD(WORD_BOTTLE, 1);
CAGE = VOCWRD(WORD_CAGE, 1);
CAVITY = VOCWRD(WORD_CAVITY, 1);
CHASM = VOCWRD(WORD_CHASM, 1);
CLAM = VOCWRD(WORD_CLAM, 1);
DOOR = VOCWRD(WORD_DOOR, 1);
DRAGON = VOCWRD(WORD_DRAGON, 1);
DWARF = VOCWRD(WORD_DWARF, 1);
FISSURE = VOCWRD(WORD_FISSURE, 1);
FOOD = VOCWRD(WORD_FOOD, 1);
GRATE = VOCWRD(WORD_GRATE, 1);
KEYS = VOCWRD(WORD_KEYS, 1);
KNIFE = VOCWRD(WORD_KNIFE, 1);
LAMP = VOCWRD(WORD_LAMP, 1);
MAGAZINE = VOCWRD(WORD_MAGAZINE, 1);
MESSAG = VOCWRD(WORD_MESSAG, 1);
MIRROR = VOCWRD(WORD_MIRROR, 1);
OGRE = VOCWRD(WORD_OGRE, 1);
OIL = VOCWRD(WORD_OIL, 1);
OYSTER = VOCWRD(WORD_OYSTER, 1);
PILLOW = VOCWRD(WORD_PILLOW, 1);
PLANT = VOCWRD(WORD_PLANT, 1);
PLANT2 = PLANT + 1;
RESER = VOCWRD(WORD_RESER, 1);
ROD = VOCWRD(WORD_ROD, 1);
ROD2 = ROD + 1;
SIGN = VOCWRD(WORD_SIGN, 1);
SNAKE = VOCWRD(WORD_SNAKE, 1);
STEPS = VOCWRD(WORD_STEPS, 1);
TROLL = VOCWRD(WORD_TROLL, 1);
TROLL2 = TROLL + 1;
URN = VOCWRD(WORD_URN, 1);
VEND = VOCWRD(WORD_VEND, 1);
VOLCANO = VOCWRD(WORD_VOLCANO, 1);
WATER = VOCWRD(WORD_WATER, 1);
/* Vocabulary for treasures */
AMBER = VOCWRD(WORD_AMBER, 1);
CHAIN = VOCWRD(WORD_CHAIN, 1);
CHEST = VOCWRD(WORD_CHEST, 1);
COINS = VOCWRD(WORD_COINS, 1);
EGGS = VOCWRD(WORD_EGGS, 1);
EMERALD = VOCWRD(WORD_EMERALD, 1);
JADE = VOCWRD(WORD_JADE, 1);
NUGGET = VOCWRD(WORD_NUGGET, 1);
PEARL = VOCWRD(WORD_PEARL, 1);
PYRAMID = VOCWRD(WORD_PYRAMID, 1);
RUBY = VOCWRD(WORD_RUBY, 1);
RUG = VOCWRD(WORD_RUG, 1);
SAPPH = VOCWRD(WORD_SAPPH, 1);
TRIDENT = VOCWRD(WORD_TRIDENT, 1);
VASE = VOCWRD(WORD_VASE, 1);
/* These are motion-verb numbers. */ /* These are motion-verb numbers. */
BACK = VOCWRD(WORD_BACK, 0); BACK = VOCWRD(WORD_BACK, 0);

24
main.c
View file

@ -43,17 +43,19 @@ struct game_t game;
long LNLENG, LNPOSN; long LNLENG, LNPOSN;
char rawbuf[LINESIZE], INLINE[LINESIZE + 1]; char rawbuf[LINESIZE], INLINE[LINESIZE + 1];
long AMBER, AXE, BACK, BATTERY, BEAR, BIRD, BLOOD, long NUL;
BOTTLE, CAGE, CAVE, CAVITY, CHAIN, CHASM, CHEST, long BACK;
CLAM, COINS, DOOR, DPRSSN, DRAGON, DWARF, EGGS, long LOOK;
EMERALD, ENTER, ENTRNC, FIND, FISSURE, FOOD, long CAVE;
GRATE, HINT, INVENT, JADE, KEYS, long FIND;
KNIFE, LAMP, LOCK, LOOK, MAGAZINE, long INVENT;
MESSAG, MIRROR, NUGGET, NUL, OGRE, OIL, OYSTER, long SAY;
PEARL, PILLOW, PLANT, PLANT2, PYRAMID, RESER, ROD, ROD2, long ENTER;
RUBY, RUG, SAPPH, SAY, SIGN, SNAKE, long STREAM;
STEPS, STREAM, THROW, TRIDENT, TROLL, TROLL2, long DPRSSN;
URN, VASE, VEND, VOLCANO, WATER; long ENTRNC;
long LOCK;
long THROW;
FILE *logfp = NULL, *rfp = NULL; FILE *logfp = NULL, *rfp = NULL;
bool oldstyle = false; bool oldstyle = false;