games@tekred.TEK.COM (07/22/88)
Submitted by: "Laurence R. Brothers" <brothers@paul.rutgers.edu> Comp.sources.games: Volume 5, Issue 12 Archive-name: omega2/Part02 #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh <file", e.g.. If this archive is complete, you # will see the following message at the end: # "End of archive 2 (of 19)." # Contents: oiinit.h oscr.c # Wrapped by billr@saab on Wed Jul 13 10:46:40 1988 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'oiinit.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'oiinit.h'\" else echo shar: Extracting \"'oiinit.h'\" \(20905 characters\) sed "s/^X//" >'oiinit.h' <<'END_OF_FILE' X/* omega, (C) 1987,1988 by Laurence Raphael Brothers */ X/* oiinit.h */ X/* This file defines and initializes the Objects Array */ X Xstruct object Objects[TOTALITEMS] = { X0,10,0,0,0,0,0,1,10,50,0,0,0,0,0,1107,2,'\\',"small grey box with red button","disposeable garage door opener","disposeable garage door opener", X X1,20,0,0,0,0,0,1,20,2000,0,0,0,0,0,0,4,'\\',"some rocks","uncut diamonds","uncut diamonds", X X2,15,0,0,0,0,0,1,10,50,0,0,0,0,0,1101,2,'\\',"twisted piece of metal","thieve's pick","thieve's pick", X X3,10,0,0,0,0,0,1,15,1500,0,0,0,0,0,0,1,'\\',"large green gem","humongous emerald","humongous emerald", X X4,200,0,0,0,0,0,1,18,1750,0,0,0,0,0,0,4,'\\',"gold ingot","gold ingot","gold ingot", X X5,5,0,0,0,0,0,1,1,3000,0,0,0,0,0,0,5,'\\',"old illegible documents","bearer bonds","bearer bonds", X X6,100,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,'\\',"bucket of salt water","bucket of salt water","bucket of salt water", X X7,3,0,0,0,0,0,1,10,20,0,0,0,0,0,1102,2,'\\',"key","magic key","magic key", X X8,30,0,0,0,0,6,1,8,10,0,0,0,0,0,1105,0,'\\',"torch","torch","torch", X X9,10,0,0,0,0,0,1,12,0,0,0,0,0,0,0,0,'\\',"grot","grot","grot", X X10,10,0,0,0,0,0,1,12,0,0,0,0,0,0,0,0,'\\',"grot","grot","grot", X X11,10,0,0,0,0,0,1,12,0,0,0,0,0,0,0,0,'\\',"grot","grot","grot", X X12,10,0,0,0,0,0,1,12,0,0,0,0,0,0,0,0,'\\',"grot","grot","grot", X X13,10,0,0,0,0,0,1,12,0,0,0,0,0,0,0,0,'\\',"grot","grot","grot", X X14,10,0,0,0,0,0,1,12,0,0,0,0,0,0,0,0,'\\',"grot","grot","grot", X X15,10,0,0,0,0,0,1,12,0,0,0,0,0,0,0,0,'\\',"grot","grot","grot", X X16,10,0,0,0,0,0,1,12,0,0,0,0,0,2,0,0,'\\',"Justiciar's Badge","Justiciar's Badge","Justiciar's Badge", X X17,10,0,0,0,0,89,1,3,30,0,0,0,0,0,1106,0,'\\',"spring-loaded tube","dart-trap component","dart-trap component", X X18,10,0,0,0,0,98,1,3,30,0,0,0,0,0,1106,0,'\\',"pressurized cannister","acid-trap component","acid-trap component", X X19,10,0,0,0,0,92,1,3,30,0,0,0,0,0,1106,0,'\\',"coil of fine wire","snare component","snare component", X X20,10,0,0,0,0,94,1,3,30,0,0,0,0,0,1106,0,'\\',"mound of powdered aluminum","fire-trap component","fire-trap component", X X21,10,0,0,0,0,95,1,3,30,0,0,0,0,0,1106,0,'\\',"powerful rune","teleport-trap component","teleport-trap component", X X22,10,0,0,0,0,97,1,3,30,0,0,0,0,0,1106,0,'\\',"pressurized cannister","sleepgas-trap component","sleepgas-trap component", X X23,10,0,0,0,0,96,1,3,30,0,0,0,0,0,1106,0,'\\',"powerful rune","disintegration-trap component","disintegration-trap component", X X24,10,0,0,0,0,100,1,3,30,0,0,0,0,0,1106,0,'\\',"dark fabric patch","abyss-trap component","abyss-trap component", X X25,10,0,0,0,0,99,1,3,30,0,0,0,0,0,1106,0,'\\',"powerful rune","manadrain-trap component","manadrain-trap component", X X26,20,0,0,0,0,8,1,0,2,0,0,0,0,0,401,0,'%',"red and white striped bucket","food ration","food ration", X X27,10,0,0,0,0,48,1,0,200,0,0,0,0,0,402,2,'%',"wafer of lembas","wafer of lembas","wafer of lembas", X X28,1,0,0,0,0,1,1,0,50,0,0,0,0,0,403,3,'%',"small gray tablet","stimtab","stimtab", X X29,1,0,0,0,0,1,1,0,100,0,0,0,0,0,404,3,'%',"small gray tablet","powtab","powtab", X X30,1,0,0,0,0,36,1,0,20,0,0,0,0,0,401,3,'%',"small gray tablet","nutritab","nutritab", X X31,1,0,0,0,0,1,1,0,500,0,0,0,0,0,405,3,'%',"small gray tablet","immunotab","immunotab", X X32,1,0,0,0,0,2,1,0,1,0,0,0,0,0,401,0,'%',"jelly baby","jelly baby","jelly baby", X X33,20,0,0,0,0,-1,1,0,25,0,0,0,0,0,406,1,'%',"food ration","poisoned ration","poisoned ration", X X34,2,0,0,0,0,1,1,0,100,0,0,0,0,0,408,2,'%',"withered reddish stringy vegetable","szechuan pepper","szechuan pepper", X X35,2,0,0,0,0,8,1,0,5,0,0,0,0,0,401,2,'%',"messy red and white disk","pepperoni pizza pie","pepperoni pizza pie", X X36,2,0,0,0,0,6,1,0,7,0,0,0,0,0,401,2,'%',"brown bag with strange ideograms","hunan take-out","hunan take-out", X X37,2,0,0,0,0,2,1,0,5,0,0,0,0,0,401,2,'%',"strange foamy cylinders","twinkies","twinkies", X X38,2,0,0,0,0,3,1,0,3,0,0,0,0,0,401,2,'%',"squiggly orange spirals","cheese-doodles","cheese-doodles", X X39,2,0,0,0,0,4,1,0,3,0,0,0,0,0,401,2,'%',"sweet nutty-smelling disks","pecan twirls","pecan_twirls", X X40,2,0,0,0,0,10,1,0,75,0,0,0,0,0,401,2,'%',"pale white strips with green dots","veal piccata with capers","veal piccata with capers", X X41,2,0,0,0,0,3,1,0,5,0,0,0,0,0,401,2,'%',"a bag of hard brown kernels","a bag of unmilled grain","a bag of unmilled grain", X X42,5,0,0,0,0,0,1,1,5,0,0,0,0,0,1,0,'?',"?","blank scroll","Antinomy!", X X43,5,0,0,0,0,0,1,1,250,0,0,0,0,0,110,1,'?',"?","scroll of spells","scroll of spell loss", X X44,5,0,0,0,0,0,1,1,400,0,0,0,0,0,101,2,'?',"?","scroll of blessing","scroll of cursing", X X45,5,0,0,0,0,0,1,1,5000,0,0,0,0,0,102,7,'?',"?","scroll of acquirement","scroll of destruction", X X46,5,0,0,0,0,0,1,1,200,0,0,0,0,0,103,2,'?',"?","scroll of enchantment","scroll of disenchantment", X X47,5,0,0,0,0,0,1,1,75,0,0,0,0,0,104,1,'?',"?","scroll of teleportation","scroll of teleportation", X X48,5,0,0,0,0,0,1,1,10000,0,0,0,0,0,105,10,'?',"?","scroll of wishing","scroll of wishing", X X49,5,0,0,0,0,0,1,1,25,0,0,0,0,0,106,1,'?',"?","scroll of clairvoyance","scroll of amnesia", X X50,5,0,0,0,0,0,1,1,50,0,0,0,0,0,107,2,'?',"?","scroll of displacement","scroll of vulnerability", X X51,5,0,0,0,0,0,1,1,20,0,0,0,0,0,108,0,'?',"?","scroll of identification","scroll of forgetfulness", X X52,5,0,0,0,0,0,1,1,10,0,0,0,0,0,118,0,'?',"?","hint sheet","hint sheet", X X53,5,0,0,0,0,0,1,1,50,0,0,0,0,0,111,2,'?',"?","jane's guide to treasure","jane's guide to treasure", X X54,5,0,0,0,0,0,1,1,50,0,0,0,0,0,112,1,'?',"?","scroll of alertness","scroll of drowsiness", X X55,5,0,0,0,0,0,1,1,300,0,0,0,0,0,113,5,'?',"?","scroll of cosmic flux","scroll of cosmic flux", X X56,5,0,0,0,0,0,1,1,100,0,0,0,0,0,114,2,'?',"?","scroll of charging","scroll of draining", X X57,5,0,0,0,0,0,1,1,100,0,0,0,0,0,115,3,'?',"?","scroll of the warp","scroll of the warp", X X58,5,0,0,0,0,0,1,1,10,0,0,0,0,0,116,1,'?',"?","scroll of self-knowledge","scroll of delusion", X X59,5,0,0,0,0,0,1,1,100,0,0,0,0,0,117,2,'?',"?","scroll of law","scroll of law", X X60,5,0,0,0,0,0,1,1,200,0,0,0,0,0,119,5,'?',"?","scroll of heroism","scroll of cowardliness", X X61,5,0,0,0,0,0,1,1,50,0,0,0,0,0,120,2,'?',"?","scroll of true sight","scroll of blindness", X X62,5,0,0,0,0,0,1,1,250,0,0,0,0,0,313,3,'?',"?","scroll of dispelling","scroll of self-dispelling", X X63,5,0,0,0,0,0,1,1,300,0,0,0,0,0,307,2,'?',"?","scroll of summoning","scroll of summoning", X X64,5,0,0,0,0,0,1,1,30,0,0,0,0,0,121,0,'?',"?","scroll of light","scroll of darkness", X X65,5,0,0,0,0,0,1,1,250,0,0,0,0,0,122,3,'?',"?","scroll of deflection","scroll of vulnerability", X X66,20,0,0,0,0,0,1,5,0,0,0,0,0,0,0,0,'!',"?","potion of quenching thirst","Antinomy!", X X67,20,0,0,0,0,0,1,5,40,0,0,0,0,0,201,2,'!',"?","potion of healing","potion of disruption", X X68,20,0,0,0,0,0,1,5,10,0,0,0,0,0,202,1,'!',"?","potion of object detection","potion of object detection", X X69,20,0,0,0,0,0,1,5,10,0,0,0,0,0,203,1,'!',"?","potion of monster detection","potion of monster detection", X X70,20,0,0,0,0,0,1,5,20,0,0,0,0,0,206,2,'!',"?","potion of neutralize poison","potion of poison", X X71,20,0,0,0,0,0,1,5,100,0,0,0,0,0,112,0,'!',"?","potion of alertness","potion of sleep", X X72,20,0,0,0,0,0,1,5,40,0,0,0,0,0,207,1,'!',"?","potion of speed","potion of slowness", X X73,20,0,0,0,0,0,1,5,50,0,0,0,0,0,205,3,'!',"?","potion of restoration","potion of debilitation", X X74,20,-1,0,0,0,0,1,5,1500,0,0,0,0,0,208,7,'!',"mercury","azoth","mercury", X X75,20,0,0,0,0,0,1,5,100,0,0,0,0,0,210,4,'!',"?","potion of regeneration","potion of great disruption", X X76,20,0,0,0,0,0,1,5,100,0,0,0,0,0,211,2,'!',"?","potion of invisibility","potion of aggravation", X X77,20,0,0,0,0,0,1,5,30,0,0,0,0,0,212,2,'!',"?","potion of breathing","potion of choking", X X78,20,0,0,0,0,0,1,5,200,0,0,0,0,0,214,5,'!',"?","potion of augmentation","potion of debilitation", X X79,20,0,0,0,0,0,1,5,50,0,0,0,0,0,213,2,'!',"?","potion of banishing fear","potion of fear", X X80,20,0,0,0,0,0,1,5,100,0,0,0,0,0,215,3,'!',"?","potion of chaos","Antinomy!", X X81,20,0,0,0,0,0,1,5,200,0,0,0,0,0,216,3,'!',"?","potion of accuracy","potion of fuzziness", X X82,20,0,0,0,0,0,1,5,50,0,0,0,0,0,217,1,'!',"?","potion of levitation","potion of levitation", X X83,20,0,0,0,0,0,1,5,50,0,0,0,0,0,218,1,'!',"?","potion of curing","potion of disease", X X84,10,0,0,6,12,0,1,15,5,0,0,0,2,0,1001,0,')',"dagger","dagger","dagger", X X85,25,0,0,8,11,0,1,15,40,0,0,0,1,0,1001,1,')',"short sword","short sword","short sword", X X86,40,0,0,12,9,0,1,15,90,0,0,0,1,0,1001,2,')',"broad sword","broad sword","broad sword", X X87,50,0,0,16,8,0,1,15,250,0,0,0,1,0,1001,3,')',"bastard sword","bastard sword","bastard sword", X X88,50,0,0,16,10,0,1,15,500,0,0,0,1,0,1001,4,')',"katana","katana","katana", X X89,75,0,0,20,7,0,1,15,400,0,0,0,1,0,1001,5,')',"great-sword","great-sword","great-sword", X X90,15,0,0,6,15,0,1,15,50,0,0,0,2,0,1001,2,')',"epee","epee","epee", X X91,20,0,0,8,13,0,1,15,250,0,0,0,2,0,1001,3,')',"rapier","rapier","rapier", X X92,25,0,0,11,12,0,1,15,500,0,0,0,2,0,1001,5,')',"estoc","estoc","estoc", X X93,35,0,0,8,8,0,1,15,40,0,0,0,1,0,1001,1,')',"cutlass","cutlass","cutlass", X X94,25,0,0,8,10,0,1,15,50,0,0,0,1,0,1001,1,')',"hand-axe","hand-axe","hand-axe", X X95,50,0,0,12,8,0,1,15,100,0,0,0,1,0,1001,2,')',"battle-axe","battle-axe","battle-axe", X X96,100,0,0,24,7,0,1,15,200,0,0,0,1,0,1001,5,')',"great-axe","great-axe","great-axe", X X97,50,0,0,12,8,0,1,15,50,0,0,0,3,0,1001,2,')',"mace","mace","mace", X X98,50,0,0,14,6,0,1,15,60,0,0,0,3,0,1001,2,')',"war-hammer","war-hammer","war-hammer", X X99,60,0,0,16,7,0,1,15,150,0,0,0,3,0,1001,5,')',"morning-star","morning-star","morning-star", X X100,50,0,0,12,7,0,1,15,50,0,0,0,3,0,1001,3,')',"flail","flail","flail", X X101,30,0,0,6,10,0,1,15,5,0,0,0,3,0,1001,0,')',"club","club","club", X X102,80,0,0,9,12,0,1,15,30,0,0,0,3,0,1001,1,')',"quarterstaff","quarterstaff","quarterstaff", X X103,50,0,0,10,10,0,1,15,50,0,0,0,2,0,1001,2,')',"spear","spear","spear", X X104,100,0,0,16,6,0,1,15,100,0,0,0,1,0,1001,3,')',"halberd","halberd","halberd", X X105,80,0,0,12,7,0,1,15,75,0,0,0,2,0,1001,3,')',"trident","trident","trident", X X106,20,0,0,4,8,1005,1,15,100,0,0,0,3,0,1001,2,')',"whip","whip","whip", X X107,20,0,0,30,20,1002,1,15,2000,0,0,0,2,0,1002,9,')',"grey metal cylinder","lightsabre","lightsabre", X X108,500,8,0,16,8,1003,1,15,1000,0,0,-8,1,0,1003,9,')',"bastard sword","Demonblade","Demonblade", X X109,250,7,0,17,10,1004,1,15,3000,0,0,7,3,0,1004,7,')',"mace","mace of disruption","mace", X X110,100,0,0,12,15,0,1,15,300,0,0,0,4,0,1001,2,'(',"longbow","longbow","longbow", X X111,150,0,0,20,15,0,1,15,500,0,0,0,4,0,1001,3,'(',"crossbow","crossbow","crossbow", X X112,2,0,0,3,3,1006,1,15,2,0,0,0,4,0,1001,1,'(',"arrow","arrow","arrow", X X113,2,0,0,3,0,1007,1,15,5,0,0,0,4,0,1001,1,'(',"bolt","bolt","bolt", X X114,50,0,0,3,10,1005,1,15,50,0,0,0,4,0,1001,2,'(',"bola","bola","bola", X X115,40,5,0,12,9,1008,1,15,3000,0,0,0,1,0,1001,7,')',"broad sword","vorpal sword","sword of self-mutilation", X X116,100,7,0,20,7,1009,1,15,5000,0,0,-7,1,0,1009,9,')',"great-sword","Desecrator","Desecrator", X X117,60,7,0,16,7,1010,1,15,2000,0,0,0,3,0,705,6,')',"morning-star","firestar","firestar", X X118,50,7,0,10,12,1011,1,15,3000,0,0,7,2,0,1011,7,')',"estoc","Defender","Defender", X X119,50,10,0,100,10,1012,1,15,5000,0,0,10,2,2,1012,10,')',"ivory spear","Victrix","Victrix", X X120,500,6,0,32,6,0,1,15,2000,0,0,0,1,2,1001,7,')',"great-axe","Goblins' Hewer","Goblins' Hewer", X X121,100,20,0,30,10,0,1,15,500,0,0,-10,1,0,1001,6,')',"scythe","scythe of slicing","scythe of slicing", X X122,250,0,0,50,-10,0,1,15,100,0,0,0,3,0,1001,5,')',"giant club","giant club","giant club", X X123,500,0,0,10000,1000,1014,1,15,10000,0,0,0,1,2,1001,10,')',"Scythe of Death","Scythe of Death","Scythe of Death", X X124,30,0,0,16,16,1015,1,15,1000,0,0,0,3,0,1001,4,')',"whip","acid whip","acid whip", X X125,100,0,0,1,0,0,1,20,5,0,0,0,0,0,804,0,']',"flak jacket","flak jacket","flak jacket", X X126,200,0,0,2,0,1,1,20,10,0,0,0,0,0,804,1,']',"soft leather armor","soft leather armor","soft leather armor", X X127,200,0,0,2,0,1,1,20,30,0,0,0,0,0,804,1,']',"cuirbouilli","cuirbouilli","cuirbouilli", X X128,300,0,0,3,0,2,1,20,100,0,0,0,0,0,804,2,']',"ring mail","ring mail","ring mail", X X129,400,0,0,4,0,3,1,20,200,0,0,0,0,0,804,3,']',"chain mail","chain mail","chain mail", X X130,400,0,0,4,0,2,1,20,300,0,0,0,0,0,804,4,']',"scale mail","scale mail","scale mail", X X131,400,0,0,5,0,3,1,20,450,0,0,0,0,0,804,5,']',"partial plate mail","partial plate mail","partial plate mail", X X132,600,0,0,6,0,4,1,20,750,0,0,0,0,0,804,6,']',"full plate mail","full plate mail","full plate mail", X X133,500,0,0,7,0,4,1,20,1500,0,0,0,0,0,804,6,']',"plate armor","plate armor","plate armor", X X134,200,0,0,5,0,2,1,20,1500,0,0,0,0,0,804,6,']',"lamellar armor","lamellar armor","lamellar armor", X X135,200,0,0,5,0,2,1,20,2000,0,0,0,0,0,803,7,']',"mithril chain mail","mithril chain mail","mithril chain mail", X X136,300,0,0,8,0,3,1,20,3000,0,0,0,0,0,803,7,']',"mithril plate armor","mithril plate armor","mithril plate armor", X X137,500,0,0,6,0,3,1,20,3000,0,0,0,0,0,705,7,']',"dragonscale armor","dragonscale armor","dragonscale armor", X X138,100,9,0,7,0,2,1,20,1000,0,0,0,0,0,801,8,']',"prismatrix armor","prismatrix armor","prismatrix armor", X X139,0,0,0,20,0,0,1,20,5000,0,0,0,0,0,802,9,']',"powered combat armor","powered combat armor","powered combat armor", X X140,0,0,0,10,0,0,1,20,3000,0,0,0,0,0,802,7,']',"powered scout armor","powered scout armor","powered scout armor", X X141,100,5,0,5,0,0,1,20,2000,0,0,-9,0,0,801,3,']',"demonhide armor","demonhide armor","demonhide armor", X X142,20,0,0,0,0,1,1,15,10,0,0,0,0,0,1202,0,'[',"buckler","buckler","buckler", X X143,40,0,0,0,0,2,1,15,20,0,0,0,0,0,1202,1,'[',"small round shield","small round shield","small round shield", X X144,100,0,0,0,0,3,1,15,50,0,0,0,0,0,1202,2,'[',"large round shield","large round shield","large round shield", X X145,200,0,0,0,0,4,1,15,75,0,0,0,0,0,1202,2,'[',"heater shield","heater shield","heater shield", X X146,300,0,0,0,0,5,1,15,150,0,0,0,0,0,1202,3,'[',"hoplon","hoplon","hoplon", X X147,500,0,0,0,0,6,1,15,200,0,0,0,0,0,1202,4,'[',"tower shield","tower shield","tower shield", X X148,20,0,0,0,0,7,1,15,1000,0,0,0,0,0,1202,6,'[',"plasteel shield","plasteel shield","plasteel shield", X X149,200,6,0,0,0,6,1,15,2000,0,0,0,0,0,1201,7,'[',"shield of deflection","shield of deflection","shield of deflection", X X150,30,0,0,0,0,0,1,4,15,0,0,0,0,0,0,0,'}',"?","cloak of wool","cloak of wool", X X151,30,0,0,0,0,0,1,4,500,0,0,0,0,0,602,3,'}',"?","cloak of negimmunity","cloak of level drain", X X152,30,0,0,0,0,0,1,4,500,0,0,0,0,0,603,5,'}',"?","cloak of invisibility","cloak of invisibility", X X153,30,0,0,0,0,0,1,4,1000,0,0,0,0,0,604,5,'}',"?","cloak of skill","cloak of skill", X X154,30,0,0,0,0,0,1,4,500,0,0,0,0,0,605,3,'}',"?","cloak of protection","cloak of damage", X X155,30,0,0,0,0,0,1,4,2000,0,0,0,0,0,601,6,'}',"?","cloak of displacement","cloak of vulnerability", X X156,30,0,0,0,0,0,1,4,500,0,0,0,0,0,606,3,'}',"?","cloak of true sight","cloak of blindness", X X157,30,0,0,0,0,0,1,6,1000,0,0,0,0,0,501,4,'{',"?","boots of speed","boots of slowness", X X158,30,0,0,0,0,0,1,6,1000,0,0,0,0,0,502,6,'{',"?","boots of heroism","boots of cowardliness", X X159,30,0,0,0,0,0,1,6,500,0,0,0,0,0,503,3,'{',"?","boots of levitation","boots of levitation", X X160,30,0,0,0,0,0,1,6,250,0,0,0,0,0,504,3,'{',"?","boots of agility","boots of clumsiness", X X161,30,0,0,0,0,0,1,6,200,0,0,0,0,0,505,2,'{',"?","jumping boots","jumping boots", X X162,30,0,0,0,0,0,1,6,7,0,0,0,0,0,0,0,'{',"?","boots of leather","boots of leather", X X163,30,0,0,0,0,0,1,6,2700,0,0,0,0,0,506,7,'{',"?","seven league boots","umpteen league boots", X X164,1,0,0,0,0,0,1,10,400,0,0,0,0,0,606,3,'=',"?","ring of truesight","ring of blindness", X X165,1,0,0,0,0,0,1,10,1,0,0,-1,0,0,702,0,'=',"?","ring of burden","ring of burden", X X166,1,0,0,0,0,0,1,10,100,0,0,0,0,0,703,1,'=',"?","ring of strength","ring of strength", X X167,1,0,0,0,0,0,1,10,100,0,0,0,0,0,704,2,'=',"?","ring of gaze immunity","ring of gaze immunity", X X168,1,0,0,0,0,0,1,10,100,0,0,0,0,0,705,3,'=',"?","ring of fire resistance","ring of fire resistance", X X169,1,0,0,0,0,0,1,10,10,0,0,0,0,0,0,0,'=',"?","ring of brass and glass","ring of brass and glass", X X170,1,0,0,0,0,0,1,10,100,0,0,0,0,0,706,4,'=',"?","ring of poison resistance","ring of poison", X X171,1,0,0,0,0,0,1,10,1000,0,0,0,0,0,707,5,'=',"?","ring of regeneration","ring of regeneration", X X172,1,0,0,0,0,0,1,10,100,0,0,0,0,0,708,0,'=',"?","ring of self-knowledge","ring of delusion", X X173,1,0,0,0,0,0,1,10,500,0,0,0,0,0,605,4,'=',"?","ring of protection","ring of vulnerability", X X174,80,0,0,0,0,0,1,10,500,0,0,0,0,0,301,3,'/',"?","staff of firebolts","staff of firebolts", X X175,80,0,0,0,0,0,1,10,10,0,0,0,0,0,1,0,'/',"?","walking stick","walking stick", X X176,80,0,0,0,0,0,1,10,100,0,0,0,0,0,304,1,'/',"?","staff of sleep","staff of sleep", X X177,80,0,0,0,0,0,1,10,500,0,0,0,0,0,306,4,'/',"?","wand of ball lightning","wand of ball lightning", X X178,80,0,0,0,0,0,1,10,500,0,0,0,0,0,307,2,'/',"?","rod of summoning","rod of summoning", X X179,80,0,0,0,0,0,1,10,100,0,0,0,0,0,308,1,'/',"?","rod of hiding","rod of hiding", X X180,80,0,0,0,0,0,1,10,500,0,0,0,0,0,302,3,'/',"?","staff of lightning bolts","staff of lightning bolts", X X181,80,0,0,0,0,0,1,10,500,0,0,0,0,0,305,5,'/',"?","wand of fireballs","wand of fireballs", X X182,80,0,0,0,0,0,1,10,2000,0,0,0,0,0,310,7,'/',"?","rod of disintegration","rod of disintegration", X X183,80,0,0,0,0,0,1,10,1000,0,0,0,0,0,309,6,'/',"?","staff of disruption","staff of disruption", X X184,80,0,0,0,0,0,1,10,100,0,0,0,0,0,311,2,'/',"?","snowball stick","snowball stick", X X185,80,0,0,0,0,0,1,10,50,0,0,0,0,0,303,1,'/',"?","staff of missiles","staff of missiles", X X186,80,0,0,0,0,0,1,10,200,0,0,0,0,0,312,2,'/',"?","rod of apportation","rod of lossage", X X187,80,0,0,0,0,0,1,10,750,0,0,0,0,0,313,6,'/',"?","staff of dispelling","staff of self-dispelling", X X188,80,0,0,0,0,0,1,10,500,0,0,0,0,0,201,3,'/',"?","staff of healing","staff of harming", X X189,80,0,0,0,0,0,1,10,1000,0,0,0,0,0,314,3,'/',"wand of stupidity","wand of polymorph","wand of stupidity", X X190,80,0,0,0,0,0,1,10,500,0,0,0,0,0,315,2,'/',"?","wand of fear","wand of fear", X X191,500,0,0,0,0,0,1,15,10000,0,0,0,0,2,905,10,'&',"Mysterious Orb","Orb of Mastery","Orb of Mastery", X X192,50,0,0,0,0,0,1,15,2000,0,0,0,0,0,901,9,'&',"Mysterious Orb","Orb of Fire","Orb of Fire", X X193,50,0,0,0,0,0,1,15,2000,0,0,0,0,0,902,8,'&',"Mysterious Orb","Orb of Water","Orb of Water", X X194,50,0,0,0,0,0,1,15,2000,0,0,0,0,0,903,7,'&',"Mysterious Orb","Orb of Earth","Orb of Earth", X X195,50,0,0,0,0,0,1,15,2000,0,0,0,0,0,904,6,'&',"Mysterious Orb","Orb of Air","Orb of Air", X X196,25,0,0,0,0,0,1,15,100,0,0,0,0,0,906,1,'&',"Black Orb","Burnt-out Orb","Burnt-out Orb", X X197,75,0,0,0,0,0,1,15,500,0,0,0,0,0,907,3,'&',"Glass Orb","Crystal Ball","Ball of Mindlessness", X X198,25,0,0,0,0,0,1,15,1000,0,0,0,0,0,908,5,'&',"Metal Pineapple","Holy Hand-Grenade of Antioch","Holy Hand-Grenade of Antioch", X X199,500,0,0,0,0,0,1,15,1,0,0,0,0,0,1,1,'&',"The Amulet of Yendor","The Amulet of Yendor","The Amulet of Yendor", X X200,1,0,0,0,0,0,1,15,20000,0,0,0,0,2,909,7,'&',"Key","Kolwynia, the Key That Was Lost","Kolwynia, the Key That was Lost", X X201,10,0,0,0,0,0,1,15,500,0,0,0,0,0,910,3,'&',"?","Potion of Death","Potion of Death", X X202,100,0,0,0,0,0,1,15,2000,0,0,0,0,0,911,5,'&',"Scintillating Staff","Staff of Enchantment","Staff of Enchantment", X X203,0,0,0,0,0,0,1,15,1500,0,0,0,0,0,912,2,'&',"Strange Weightless Helm","Helm of Teleportation","Helm of Teleportation", X X204,10,0,0,0,0,0,1,15,500,0,0,0,0,0,913,1,'&',"?","Potion of Life","Potion of Life", X X205,5,0,0,0,0,1,1,15,5000,0,0,0,0,2,915,10,'&',"Holy Symbol of Odin","Silver Gallows","Holy Symbol of Odin", X X206,5,0,0,0,0,4,1,15,5000,0,0,0,0,2,915,10,'&',"Holy Symbol of Hecate","Obsidian Crescent","Holy Symbol of Hecate", X X207,5,0,0,0,0,3,1,15,5000,0,0,0,0,2,915,10,'&',"Holy Symbol of Athena","Gold Owl Pendant","Holy Symbol of Athena", X X208,5,0,0,0,0,2,1,15,5000,0,0,0,0,2,915,10,'&',"Holy Symbol of Set","Jet Scarab","Holy Symbol of Set", X X209,5,0,0,0,0,5,1,15,5000,0,0,0,0,2,915,10,'&',"Holy Symbol of Druidism","Sprig of Mistletoe","Holy Symbol of Druidism", X X210,5,0,0,0,0,6,1,15,5000,0,0,0,0,2,915,10,'&',"Holy Symbol of Destiny","Blue Crystal Pendant","Holy Symbol of Destiny", X X211,1000,0,0,0,0,0,1,15,1000,0,0,0,0,0,914,6,'&',"Crudely Carved Monolith","The Juggernaut of Karnak","The Juggernaut of Karnak", X X212,10,0,0,0,0,0,1,0,10000,0,0,0,0,2,916,7,'&',"Strangely Glowing Crystal","The Star Gem","The Star Gem", X X213,1000,0,0,0,0,0,1,10,1000,0,0,0,0,2,917,10,'&',"Extremely Heavy Stick ","Sceptre of High Magic","Sceptre of High Magic", X X214,10,0,0,0,0,0,1,10,1000,0,0,0,0,2,918,10,'&',"Octagonal Copper Amulet ","Amulet of the Planes","Amulet of the Planes", X X215,0,0,0,0,0,0,1,10,0,0,0,0,0,0,0,0,'$',"money","money","money (the root of all evil)", X X216,100,0,0,0,0,0,1,10,0,0,0,0,0,0,407,0,'+',"a mysterious corpse","a mysterious corpse","a mysterious corpse" X}; END_OF_FILE if test 20905 -ne `wc -c <'oiinit.h'`; then echo shar: \"'oiinit.h'\" unpacked with wrong size! fi # end of 'oiinit.h' fi if test -f 'oscr.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'oscr.c'\" else echo shar: Extracting \"'oscr.c'\" \(31141 characters\) sed "s/^X//" >'oscr.c' <<'END_OF_FILE' X/* omega (c) 1987 by Laurence Raphael Brothers */ X/* oscr.c */ X/* functions that use curses routines directly */ X/* plus a few file i/o stuff */ X/* also some in ofile.c */ X X#include <curses.h> X#include <sys/types.h> X#include <sys/timeb.h> X#include "oglob.h" X Xchar *sprintf(); X X#ifdef EXCESSIVE_REDRAW X#define wclear werase X#endif X X X/* note these variables are not exported to other files */ X XWINDOW *Levelw,*Dataw,*Flagw,*Timew,*Menuw,*Locw,*Morew,*Phasew; XWINDOW *Comwin,*Rightside,*Msg1w,*Msg2w,*Msg3w,*Msgw,*Packw; XWINDOW *Hideline[MAXITEMS],*Showline[MAXITEMS]; X Xvoid phaseprint() X{ X wclear(Phasew); X wprintw(Phasew,"Moon's Phase:\n"); X switch(Phase/2) { X case 0: wprintw(Phasew,"NEW"); break; X case 1: case 11: wprintw(Phasew,"CRESCENT"); break; X case 2: case 10: wprintw(Phasew,"1/4"); break; X case 3: case 9: wprintw(Phasew,"HALF"); break; X case 4: case 8: wprintw(Phasew,"3/4"); break; X case 5: case 7: wprintw(Phasew,"GIBBOUS"); break; X case 6: wprintw(Phasew,"FULL"); break; X } X} X Xvoid show_screen() X{ X int i,j,top,bottom; X wclear(Levelw); X top = ScreenOffset; X bottom = ScreenOffset + ScreenLength; X top = max(0,top); X bottom = min(bottom,LENGTH-1); X if (Current_Environment != E_COUNTRYSIDE) X for (j=top;j<=bottom;j++) X for (i=0;i<WIDTH;i++) { X wmove(Levelw,screenmod(j),i); X waddch(Levelw,(loc_statusp(i,j,SEEN) ? X getspot(i,j,FALSE) : X ' ')); X } X else for (j=top;j<=bottom;j++) X for (i=0;i<WIDTH;i++) { X wmove(Levelw,screenmod(j),i); X waddch(Levelw,(Country[i][j].explored ? X Country[i][j].current_terrain_type : X ' ')); X } X wrefresh(Levelw); X} X X X Xchar mgetc() X{ X return(wgetch(Msgw)); X} X X/* case insensitive mgetc -- sends uppercase to lowercase */ Xchar mcigetc() X{ X char c = wgetch(Msgw); X if ((c>='A') && (c<='Z')) X return(c+('a'-'A')); X else return(c); X} X Xchar menugetc() X{ X return(wgetch(Menuw)); X} X X Xchar lgetc() X{ X return(wgetch(Levelw)); X} X X Xchar ynq() X{ X char p=' '; X while ((p != 'n') && (p != 'y') && (p != 'q') && (p != ESCAPE)) X p = wgetch(Msgw); X switch (p) { X case 'y': wprintw(Msgw,"yes. "); break; X case 'n': wprintw(Msgw,"no. "); break; X case ESCAPE: X case 'q': wprintw(Msgw,"quit. "); break; X } X wrefresh(Msgw); X return(p); X} X X Xchar ynq1() X{ X char p=' '; X while ((p != 'n') && (p != 'y') && (p != 'q') && (p != ESCAPE)) X p = wgetch(Msg1w); X switch (p) { X case 'y': wprintw(Msg1w,"yes. "); break; X case 'n': wprintw(Msg1w,"no. "); break; X case ESCAPE: X case 'q': wprintw(Msg1w,"quit. "); break; X } X wrefresh(Msg1w); X return(p); X} X X Xchar ynq2() X{ X char p=' '; X while ((p != 'n') && (p != 'y') && (p != 'q') && (p != ESCAPE)) X p = wgetch(Msg2w); X switch (p) { X case 'y': wprintw(Msg2w,"yes. "); break; X case 'n': wprintw(Msg2w,"no. "); break; X case ESCAPE: X case 'q': wprintw(Msg2w,"quit. "); break; X } X wrefresh(Msg2w); X return(p); X} X X/* puts up a morewait to allow reading if anything in top two lines */ Xvoid checkclear() X{ X int x1,y,x2; X getyx(Msg1w,x1,y); X getyx(Msg2w,x2,y); X if ((x1 != 0) || (x2 != 0)) { X morewait(); X wclear(Msg1w); X wclear(Msg2w); X wrefresh(Msg1w); X wrefresh(Msg2w); X } X} X X/* for external call */ Xvoid clearmsg() X{ X wclear(Msg1w); X wclear(Msg2w); X wclear(Msg3w); X Msgw = Msg1w; X wrefresh(Msg1w); X wrefresh(Msg2w); X wrefresh(Msg3w); X} X Xvoid clearmsg3() X{ X wclear(Msg3w); X wrefresh(Msg3w); X} X Xvoid clearmsg1() X{ X wclear(Msg1w); X wclear(Msg2w); X Msgw = Msg1w; X wrefresh(Msg1w); X wrefresh(Msg2w); X} X X Xvoid erase_level() X{ X wclear(Levelw); X} X X/* direct print to first msg line */ Xvoid print1(s) Xchar *s; X{ X if (! gamestatusp(SUPPRESS_PRINTING)) { X buffercycle(s); X wclear(Msg1w); X wprintw(Msg1w,s); X wrefresh(Msg1w); X } X} X X/* for run on-messages -- print1 clears first.... */ Xvoid nprint1(s) Xchar *s; X{ X if (! gamestatusp(SUPPRESS_PRINTING)) { X buffercycle(s); X wprintw(Msg1w,s); X wrefresh(Msg1w); X } X} X X X X X/* direct print to second msg line */ Xvoid print2(s) Xchar *s; X{ X if (! gamestatusp(SUPPRESS_PRINTING)) { X buffercycle(s); X wclear(Msg2w); X wprintw(Msg2w,s); X wrefresh(Msg2w); X } X} X X/* for run on-messages -- print2 clears first.... */ Xvoid nprint2(s) Xchar *s; X{ X if (! gamestatusp(SUPPRESS_PRINTING)) { X buffercycle(s); X wprintw(Msg2w,s); X wrefresh(Msg2w); X } X} X X X X X/* msg line 3 is not part of the region that mprint or printm can reach */ X/* typical use of print3 is for "you can't do that" type error messages */ Xvoid print3(s) Xchar *s; X{ X if (! gamestatusp(SUPPRESS_PRINTING)) { X buffercycle(s); X wclear(Msg3w); X wprintw(Msg3w,s); X wrefresh(Msg3w); X } X} X X/* for run on-messages -- print3 clears first.... */ Xvoid nprint3(s) Xchar *s; X{ X if (! gamestatusp(SUPPRESS_PRINTING)) { X buffercycle(s); X wprintw(Msg3w,s); X wrefresh(Msg3w); X } X} X X X X/* prints wherever cursor is in window, but checks to see if Xit should morewait and clear window */ Xvoid mprint(s) Xchar *s; X{ X int x,y; X if (! gamestatusp(SUPPRESS_PRINTING)) { X buffercycle(s); X getyx(Msgw,y,x); X if (x+strlen(s) >= WIDTH) { X if (Msgw == Msg1w) { X wclear(Msg2w); X Msgw = Msg2w; X } X else { X morewait(); X wclear(Msg1w); X wclear(Msg2w); X wrefresh(Msg2w); X Msgw = Msg1w; X } X } X wprintw(Msgw,s); X waddch(Msgw,' '); X wrefresh(Msgw); X } X} X X X X Xvoid title() X{ X showmotd(); X /* Pseudo Random Seed */ X Seed = (int) time((long *)NULL); X clear(); X refresh(); X showscores(); X} X X X X X X/* blanks out ith line of Menuw or Levelw */ X/* This is a serious kluge, but nothing else seems to work the way X I want it to! */ Xvoid hide_line(i) Xint i; X{ X touchwin(Hideline[i]); X wrefresh(Hideline[i]); X} X X X X/* initialize, screen, windows */ Xvoid initgraf() X{ X int i; X initscr(); X if (LINES < 24) { X printf("Minimum Screen Size: 24 Lines."); X exit(0); X } X else ScreenLength = LINES - 6; X Rightside = newwin(ScreenLength,15,2,65); X Msg1w = newwin(1,80,0,0); X Msg2w = newwin(1,80,1,0); X Msg3w = newwin(1,80,2,0); X Msgw = Msg1w; X Morew = newwin(1,15,3,65); X Locw = newwin(1,80,ScreenLength+3,0); X Levelw = newwin(ScreenLength,64,3,0); X for(i=0;i<MAXITEMS;i++) { X Hideline[i] = newwin(1,64,i+3,0); X Showline[i] = newwin(1,64,i+3,0); X wclear(Hideline[i]); X wclear(Showline[i]); X } X Menuw = newwin(ScreenLength,64,3,0); X Packw = newwin(ScreenLength,64,3,0); X Dataw = newwin(2,80,ScreenLength+4,0); X Timew = newwin(2,15,4,65); X Phasew = newwin(2,15,6,65); X Flagw = newwin(4,15,9,65); X Comwin = newwin(8,15,14,65); X X noecho(); X crmode(); X X clear(); X title(); X clear(); X refresh(); X} X X X X X Xvoid drawplayer() X{ X static int lastx= -1,lasty= -1; X if (Current_Environment == E_COUNTRYSIDE) { X wmove(Levelw,screenmod(lasty),lastx); X waddch(Levelw,Country[lastx][lasty].current_terrain_type); X wmove(Levelw,screenmod(Player.y),Player.x); X waddch(Levelw,PLAYER); X } X else { X if (inbounds(lastx,lasty)) X plotspot(lastx,lasty,(Player.status[BLINDED]>0 ? FALSE : TRUE)); X wmove(Levelw,screenmod(Player.y),Player.x); X if ((! Player.status[INVISIBLE]) || Player.status[TRUESIGHT]) X waddch(Levelw,PLAYER); X } X lastx = Player.x; X lasty = Player.y; X} X Xint litroom(x,y) Xint x,y; X{ X if (Level->site[x][y].roomnumber < ROOMBASE) return(FALSE); X else return(loc_statusp(x,y,LIT) || X Player.status[ILLUMINATION]); X} X Xvoid drawvision(x,y) Xint x,y; X{ X static int oldx = -1,oldy = -1; X int i,j; X X if (Current_Environment != E_COUNTRYSIDE) { X if (Player.status[BLINDED]) { X drawspot(oldx,oldy); X drawspot(x,y); X drawplayer(); X } X else { X if (Player.status[ILLUMINATION] > 0) { X for (i= -2;i<3;i++) X for (j= -2;j<3;j++) X if (inbounds(x+i,y+j)) X if (view_los_p(x+i,y+j,Player.x,Player.y)) X dodrawspot(x+i,y+j); X } X else { X for (i= -1;i<2;i++) X for (j= -1;j<2;j++) X if (inbounds(x+i,y+j)) X dodrawspot(x+i,y+j); X } X drawplayer(); X drawmonsters(FALSE); /* erase all monsters */ X drawmonsters(TRUE); /* draw those now visible */ X } X if ((! gamestatusp(FAST_MOVE)) || (! optionp(JUMPMOVE))) X showcursor(Player.x,Player.y); X oldx = x; X oldy = y; X } X else { X for (i= -1;i<2;i++) X for (j= -1;j<2;j++) X if (inbounds(x+i,y+j)) { X wmove(Levelw,screenmod(y+j),x+i); X Country[x+i][y+j].explored = TRUE; X waddch(Levelw,Country[x+i][y+j].current_terrain_type); X } X drawplayer(); X showcursor(Player.x,Player.y); X } X} X X Xvoid showcursor(x,y) Xint x,y; X{ X wmove(Levelw,screenmod(y),x); X wrefresh(Levelw); X} X Xvoid levelrefresh() X{ X wrefresh(Levelw); X} X X X/* draws a particular spot under if in line-of-sight */ Xvoid drawspot(x,y) Xint x,y; X{ X char c = getspot(x,y,FALSE); X if (c != Level->site[x][y].showchar) X if (view_los_p(Player.x,Player.y,x,y)) { X lset(x,y,SEEN); X Level->site[x][y].showchar = c; X putspot(x,y,c); X } X} X X X X/* draws a particular spot regardless of line-of-sight */ Xvoid dodrawspot(x,y) Xint x,y; X{ X char c = getspot(x,y,FALSE); X if (c != Level->site[x][y].showchar) { X lset(x,y,SEEN); X Level->site[x][y].showchar = c; X putspot(x,y,c); X } X} X X/* write a blank to a spot if it is floor */ Xvoid blankoutspot(i,j) Xint i,j; X{ X lreset(i,j,LIT); X if (Level->site[i][j].locchar == FLOOR) { X Level->site[i][j].showchar = ' '; X putspot(i,j,' '); X } X} X X/* blank out a spot regardless */ Xvoid blotspot(i,j) Xint i,j; X{ X lreset(i,j,SEEN); X Level->site[i][j].showchar = SPACE; X if (! offscreen(j)) { X wmove(Levelw,screenmod(j),i); X wdelch(Levelw); X winsch(Levelw,SPACE); X } X} X X X/* for displaying activity specifically at some point */ Xvoid plotspot(x,y,showmonster) Xint x,y,showmonster; X{ X if (loc_statusp(x,y,SEEN)) X putspot(x,y,getspot(x,y,showmonster)); X else X putspot(x,y,' '); X} X X X/* Puts c at x,y on screen. No fuss, no bother. */ Xvoid putspot(x,y,c) Xint x,y; Xchar c; X{ X if (! offscreen(y)) { X wmove(Levelw,screenmod(y),x); X waddch(Levelw,c); X } X} X X X/* regardless of line of sight, etc, draw a monster */ Xvoid plotmon(m) Xstruct monster *m; X{ X if (! offscreen(m->y)) { X wmove(Levelw,screenmod(m->y),m->x); X waddch(Levelw,m->monchar); X } X} X X/* if display, displays monsters, otherwise erases them */ Xvoid drawmonsters(display) Xint display; X{ X pml ml; X for (ml=Level->mlist;ml!=NULL;ml=ml->next) { X if (ml->m->hp > 0) { X if (display) { X if (view_los_p(Player.x,Player.y,ml->m->x,ml->m->y)) { X if (Player.status[TRUESIGHT] || (! m_statusp(ml->m,M_INVISIBLE))) { X if ((ml->m->level > 5) && X (ml->m->monchar != '@') && X (ml->m->monchar != '|')) wstandout(Levelw); X putspot(ml->m->x,ml->m->y,ml->m->monchar); X wstandend(Levelw); X } X } X } X else erase_monster(ml->m); X } X } X} X X/* replace monster with what would be displayed if monster weren't there */ Xvoid erase_monster(m) Xstruct monster *m; X{ X if (loc_statusp(m->x,m->y,SEEN)) X putspot(m->x,m->y,getspot(m->x,m->y,FALSE)); X else blotspot(m->x,m->y); X} X X/* find apt char to display at some location */ Xchar getspot(x,y,showmonster) Xint x,y,showmonster; X{ X if (loc_statusp(x,y,SECRET)) return(WALL); X else switch (Level->site[x][y].locchar) { X case WATER: X if (Level->site[x][y].creature == NULL) X return(WATER); X else if (m_statusp(Level->site[x][y].creature,SWIMMING)) X return(WATER); X else return(Level->site[x][y].creature->monchar); X break; X /* these sites never show anything but their location char's */ X case CLOSED_DOOR: X case LAVA: X case FIRE: X case ABYSS: X return(Level->site[x][y].locchar); X break; X /* rubble and hedge don't show items on their location */ X case RUBBLE: X case HEDGE: X if (showmonster && (Level->site[x][y].creature != NULL)) { X if ((m_statusp(Level->site[x][y].creature,M_INVISIBLE)) && X (! Player.status[TRUESIGHT])) X return(getspot(x,y,FALSE)); X else return (Level->site[x][y].creature->monchar); X } X else return(Level->site[x][y].locchar); X break; X /* everywhere else, first try to show monster, next show items, next show X location char */ X default: X if (showmonster && (Level->site[x][y].creature != NULL)) { X if ((m_statusp(Level->site[x][y].creature,M_INVISIBLE)) && X (! Player.status[TRUESIGHT])) X return(getspot(x,y,FALSE)); X else return (Level->site[x][y].creature->monchar); X } X else if (Level->site[x][y].things != NULL) { X if (Level->site[x][y].things->next != NULL) X return(PILE); X else return(Level->site[x][y].things->thing->objchar); X } X else return(Level->site[x][y].locchar); X break; X } X} X Xvoid commanderror() X{ X wclear(Msg3w); X wprintw(Msg3w,"%c : unknown command",Cmd); X wrefresh(Msg3w); X} X Xvoid timeprint() X{ X wclear(Timew); X wprintw(Timew,"%d:%d",showhour(),showminute()); X if (showminute()==0) waddch(Timew,'0'); X wprintw(Timew,hour()>11 ? " PM \n" : " AM \n"); X wprintw(Timew,month()); X wprintw(Timew," the %d",day()); X wprintw(Timew,ordinal(day())); X wrefresh(Timew); X} X X Xvoid comwinprint() X{ X wclear(Comwin); X wprintw(Comwin,"Hit: %d \n",Player.hit); X wprintw(Comwin,"Dmg: %d \n",Player.dmg); X wprintw(Comwin,"Def: %d \n",Player.defense); X wprintw(Comwin,"Arm: %d \n",Player.absorption); X wprintw(Comwin,"Spd: %.2f \n",5.0/Player.speed); X wrefresh(Comwin); X} X Xvoid dataprint() X{ X wclear(Dataw); X wprintw(Dataw,"HP:%d/%d MANA:%d/%d AU:%d LEVEL:%d/%d CARRY:%d/%d \n", X Player.hp,Player.maxhp,Player.mana,Player.maxmana,Player.cash, X Player.level,Player.xp,Player.itemweight,Player.maxweight); X wprintw(Dataw,"STR:%d/%d CON:%d/%d DEX:%d/%d AGI:%d/%d INT:%d/%d POW:%d/%d ", X Player.str,Player.maxstr,Player.con,Player.maxcon, X Player.dex,Player.maxdex,Player.agi,Player.maxagi, X Player.iq,Player.maxiq,Player.pow,Player.maxpow); X wrefresh(Dataw); X wrefresh(Dataw); X} X X X/* redraw everything currently displayed */ Xvoid redraw() X{ X touchwin(curscr); X wrefresh(curscr); X} X X/* redraw each permanent window */ Xvoid xredraw() X{ X wclear(Rightside); X wrefresh(Rightside); X touchwin(Msgw); X touchwin(Msg3w); X touchwin(Levelw); X touchwin(Timew); X touchwin(Flagw); X touchwin(Dataw); X touchwin(Locw); X touchwin(Morew); X touchwin(Phasew); X touchwin(Comwin); X wrefresh(Msgw); X wrefresh(Msg3w); X wrefresh(Levelw); X wrefresh(Timew); X wrefresh(Flagw); X wrefresh(Dataw); X wrefresh(Locw); X wrefresh(Morew); X wrefresh(Phasew); X wrefresh(Comwin); X} X X X Xvoid menuaddch(c) Xchar c; X{ X waddch(Menuw,c); X wrefresh(Menuw); X} X X X Xvoid morewait() X{ X int display=TRUE; X char c; X do { X wclear(Morew); X if (display) wprintw(Morew,"*** MORE ***"); X else wprintw(Morew,"+++ MORE +++"); X display = ! display; X wrefresh(Morew); X c = wgetch(Msgw); X } while ((c != SPACE) && (c != RETURN)); X wclear(Morew); X wrefresh(Morew); X} X Xint stillonblock() X{ X int display=TRUE; X char c; X do { X wclear(Morew); X if (display) wprintw(Morew,"<<<STAY?>>>"); X else wprintw(Morew,">>>STAY?<<<"); X display = ! display; X wrefresh(Morew); X c = wgetch(Msgw); X } while ((c != SPACE) && (c != ESCAPE)); X wclear(Morew); X wrefresh(Morew); X return (c == SPACE); X} X Xvoid menuclear() X{ X wclear(Menuw); X wrefresh(Menuw); X} X Xvoid menuspellprint(i) Xint i; X{ X int x,y; X getyx(Menuw,y,x); X if (y >= ScreenLength - 2) { X morewait(); X wclear(Menuw); X } X wprintw(Menuw,spellid(i)); X wprintw(Menuw,"(%d)\n",Spells[i].powerdrain); X wrefresh(Menuw); X} X Xvoid menuprint(s) Xchar *s; X{ X int x,y; X getyx(Menuw,y,x); X if (y >= ScreenLength - 2) { X morewait(); X wclear(Menuw); X } X wprintw(Menuw,s); X wrefresh(Menuw); X} X X X Xvoid endgraf() X{ Xclear(); Xrefresh(); Xendwin(); X} X X Xvoid plotchar(pyx,x,y) Xchar pyx; Xint x,y; X{ X if (! offscreen(y)) { X wmove(Levelw,screenmod(y),x); X waddch(Levelw,pyx); X wrefresh(Levelw); X } X} X X X Xvoid draw_explosion(pyx,x,y) Xchar pyx; Xint x,y; X{ X int i,j; X X for(j=0;j<3;j++) { X for(i=0;i<9;i++) X plotchar(pyx,x+Dirs[0][i],y+Dirs[1][i]); X for(i=0;i<9;i++) X plotchar(' ',x+Dirs[0][i],y+Dirs[1][i]); X } X for(i=0;i<9;i++) X plotspot(x+Dirs[0][i],y+Dirs[1][i],TRUE); X wrefresh(Levelw); X} X Xchar *msgscanstring() X{ X static char instring[80],byte='x'; X int i=0; X X instring[0]=0; X byte = mgetc(); X while (byte != '\n') { X if ((byte == 8) || (byte == 127)) { /* ^h or delete */ X instring[i] = 0; X if (i>0){ X i--; X dobackspace(); X } X } X else { X instring[i] = byte; X waddch(Msgw,byte); X wrefresh(Msgw); X i++; X instring[i] = 0; X } X byte = mgetc(); X } X return(instring); X} X X Xvoid locprint(s) Xchar *s; X{ X wclear(Locw); X wprintw(Locw,s); X wrefresh(Locw); X} X X/* draw everything whether visible or not */ Xvoid drawscreen() X{ X int i,j; X if (Current_Environment == E_COUNTRYSIDE) X for (i=0;i<WIDTH;i++) X for(j=0;j<LENGTH;j++) X putspot(i,j,Country[i][j].current_terrain_type); X else for (i=0;i<WIDTH;i++) X for(j=0;j<LENGTH;j++) X putspot(i,j,Level->site[i][j].locchar); X wrefresh(Levelw); X morewait(); X xredraw(); X} X X/*selects a number up to range */ X Xint getnumber(range) X{ X int done=FALSE,value=1; X char atom; X X if (range==1) return(1); X else while (! done) { X clearmsg1(); X wprintw(Msg1w,"How many? Change with < or >, ESCAPE to select:"); X mnumprint(value); X do atom=mgetc(); X while ((atom != '<')&&(atom != '>')&&(atom!=ESCAPE)); X if ((atom=='>') && (value < range)) value++; X else if ((atom=='<') && (value > 1)) value--; X else if (atom==ESCAPE) done = TRUE; X } X return(value); X} X X/* reads a positive number up to 999999 */ Xint parsenum() X{ X int number[8]; X int place = -1; X int i,x,y,num=0,mult=1; X char byte=' '; X X while ((byte != ESCAPE) && (byte != '\n')) { X byte = mgetc(); X if ((byte == BACKSPACE) || (byte == DELETE)) { X if (place > -1) { X number[place] = 0; X place--; X getyx(Msgw,y,x); X wmove(Msgw,y,x-1); X waddch(Msgw,' '); X wmove(Msgw,y,x-1); X wrefresh(Msgw); X } X } X else if ((byte <= '9') && (byte >= '0') && (place < 7)) { X place++; X number[place]=byte; X waddch(Msgw,byte); X wrefresh(Msgw); X } X } X waddch(Msgw,' '); X if (byte == ESCAPE) return(ABORT); X else { X for (i=place;i>=0;i--) { X num += mult*(number[i]-'0'); X mult*=10; X } X return(num); X } X} X X X Xvoid maddch(c) Xchar c; X{ X waddch(Msgw,c); X wrefresh(Msgw); X} X X Xvoid display_death(source) Xchar *source; X{ X clear(); X printw("\n\n\n\n"); X printw("Requiescat In Pace, "); X printw(Player.name); X printw(" (%d points)",calc_points()); X strcpy(Str4,"Killed by "); X strcat(Str4,source); X printw("\n"); X printw(Str4); X printw("."); X printw("\n\n\n\n\nHit any key to continue."); X refresh(); X wgetch(stdscr); X clear(); X refresh(); X extendlog(Str4,DEAD); X} X X Xvoid display_win() X{ X clear(); X printw("\n\n\n\n"); X printw(Player.name); X if (Player.status[ADEPT]) { X printw(" is a total master of omega with %d points!",FixedPoints); X strcpy(Str4,"A total master of omega"); X } X else { X strcpy(Str4,"retired a winner"); X printw(" triumphed in omega with %d points!",calc_points()); X } X printw("\n\n\n\n\nHit any key to continue."); X refresh(); X wgetch(stdscr); X clear(); X refresh(); X if (Player.status[ADEPT]) X extendlog(Str4,BIGWIN); X else extendlog(Str4,WIN); X} X Xvoid display_quit() X{ X clear(); X printw("\n\n\n\n"); X printw(Player.name); X strcpy(Str4,"A quitter."); X printw(" wimped out with %d points!",calc_points()); X printw("\n\n\n\n\nHit any key to continue."); X refresh(); X wgetch(stdscr); X clear(); X refresh(); X extendlog(Str4,QUIT); X} X X Xvoid display_bigwin() X{ X clear(); X printw("\n\n\n\n"); X printw(Player.name); X strcpy(Str4,"retired, an Adept of Omega."); X printw(" retired, an Adept of Omega with %d points!",FixedPoints); X printw("\n\n\n\n\nHit any key to continue."); X refresh(); X wgetch(stdscr); X clear(); X refresh(); X extendlog(Str4,BIGWIN); X} X X Xvoid mnumprint(n) Xint n; X{ X char numstr[20]; X sprintf(numstr,"%d",n); X buffercycle(numstr); X wprintw(Msgw,"%d",n); X wrefresh(Msgw); X} X Xvoid menunumprint(n) Xint n; X{ X int x,y; X getyx(Menuw,y,x); X if (y >= ScreenLength - 2) { X morewait(); X wclear(Menuw); X } X wprintw(Menuw,"%d",n); X wrefresh(Menuw); X} X Xvoid dobackspace() X{ X int x,y; X X getyx(Msgw,y,x); X if (x > 0) { X waddch(Msgw,' '); X wmove(Msgw,y,x-1); X waddch(Msgw,' '); X wmove(Msgw,y,x-1); X } X wrefresh(Msgw); X} X X Xvoid showflags() X{ X X phaseprint(); X wclear(Flagw); X if (Player.food < 0) X wprintw(Flagw,"Starving\n"); X else if (Player.food <= 3) X wprintw(Flagw,"Weak\n"); X else if (Player.food <= 10) X wprintw(Flagw,"Ravenous\n"); X else if (Player.food <= 20) X wprintw(Flagw,"Hungry\n"); X else if (Player.food <= 30) X wprintw(Flagw,"A mite peckish\n"); X else if (Player.food <= 36) X wprintw(Flagw,"Content\n"); X else if (Player.food <= 44) X wprintw(Flagw,"Satiated\n"); X else wprintw(Flagw,"Bloated\n"); X X X if (Player.status[POISONED]>0) X wprintw(Flagw,"Poisoned\n"); X else wprintw(Flagw,"Vigorous\n"); X X if (Player.status[DISEASED]>0) X wprintw(Flagw,"Diseased\n"); X else wprintw(Flagw,"Healthy\n"); X X if (gamestatusp(MOUNTED)) wprintw(Flagw,"Mounted\n"); X else if (Player.status[LEVITATING]) wprintw(Flagw,"Levitating\n"); X else wprintw(Flagw,"Afoot\n"); X X wrefresh(Flagw); X} X Xvoid drawomega() X{ X int i; X for(i=0;i<7;i++) { X clear(); X printw("\n\n\n"); X printw("\n *****"); X printw("\n ****** ******"); X printw("\n *** ***"); X printw("\n *** ***"); X printw("\n ** **"); X printw("\n *** ***"); X printw("\n ** **"); X printw("\n ** **"); X printw("\n *** ***"); X printw("\n *** ***"); X printw("\n ** **"); X printw("\n * *** *** *"); X printw("\n **** ****"); X refresh(); X clear(); X printw("\n\n\n"); X printw("\n +++++"); X printw("\n ++++++ ++++++"); X printw("\n +++ +++"); X printw("\n +++ +++"); X printw("\n ++ ++"); X printw("\n +++ +++"); X printw("\n ++ ++"); X printw("\n ++ ++"); X printw("\n +++ +++"); X printw("\n +++ +++"); X printw("\n ++ ++"); X printw("\n + +++ +++ +"); X printw("\n ++++ ++++"); X refresh(); X clear(); X printw("\n\n\n"); X printw("\n ....."); X printw("\n ...... ......"); X printw("\n ... ..."); X printw("\n ... ..."); X printw("\n .. .."); X printw("\n ... ..."); X printw("\n .. .."); X printw("\n .. .."); X printw("\n ... ..."); X printw("\n ... ..."); X printw("\n .. .."); X printw("\n . ... ... ."); X printw("\n .... ...."); X refresh(); X } X} X X/* y is an absolute coordinate */ X/* ScreenOffset is the upper left hand corner of the current screen X in absolute coordinates */ X Xvoid screencheck(y) Xint y; X{ X if (((y-ScreenOffset) < (ScreenLength/8)) || X ((y-ScreenOffset) > (7*ScreenLength/8))) { X ScreenOffset = y - (ScreenLength/2); X show_screen(); X } X} X X X X Xvoid spreadroomlight(x,y,roomno) Xint x,y,roomno; X{ X lightspot(x,y); X X if (inbounds(x+1,y)) { X if ((! loc_statusp(x+1,y,LIT)) && X (Level->site[x+1][y].roomnumber == roomno)) X spreadroomlight(x+1,y,roomno); X else lightspot(x+1,y); X } X X if (inbounds(x,y+1)) { X if ((! loc_statusp(x,y+1,LIT)) && X (Level->site[x][y+1].roomnumber == roomno)) X spreadroomlight(x,y+1,roomno); X else lightspot(x,y+1); X } X X if (inbounds(x-1,y)) { X if ((! loc_statusp(x-1,y,LIT)) && X (Level->site[x-1][y].roomnumber == roomno)) X spreadroomlight(x-1,y,roomno); X else lightspot(x-1,y); X } X X if (inbounds(x,y-1)) { X if ((! loc_statusp(x,y-1,LIT)) && X (Level->site[x][y-1].roomnumber == roomno)) X spreadroomlight(x,y-1,roomno); X else lightspot(x,y-1); X } X} X X/* illuminate one spot at x y */ Xvoid lightspot(x,y) Xint x,y; X{ X char c; X lset(x,y,LIT); X lset(x,y,SEEN); X c = getspot(x,y,FALSE); X Level->site[x][y].showchar = c; X putspot(x,y,c); X} X X X Xvoid spreadroomdark(x,y,roomno) Xint x,y,roomno; X{ X if (inbounds(x,y)) X if (loc_statusp(x,y,LIT) && (Level->site[x][y].roomnumber == roomno)) { X blankoutspot(x,y); X spreadroomdark(x+1,y,roomno); X spreadroomdark(x,y+1,roomno); X spreadroomdark(x-1,y,roomno); X spreadroomdark(x,y-1,roomno); X } X} X X X X Xvoid display_pack() X{ X int i,x,y; X if (Player.packptr < 1) print3("Pack is empty."); X else { X wclear(Packw); X wprintw(Packw,"Items in Pack:"); X for(i=0;i<Player.packptr;i++) { X wprintw(Packw,"\n"); X getyx(Packw,y,x); X if (y >= ScreenLength - 2) { X wrefresh(Packw); X morewait(); X wclear(Packw); X } X waddch(Packw,i+'A'); X waddch(Packw,':'); X wprintw(Packw,itemid(Player.pack[i])); X } X wrefresh(Packw); X } X} X X Xvoid display_possessions() X{ X int i; X wclear(Menuw); X for(i=0;i<MAXITEMS;i++) X display_inventory_slot(i,FALSE); X move_slot(1,0,MAXITEMS); X wrefresh(Menuw); X} X X X Xvoid display_inventory_slot(slotnum,topline) Xint slotnum; Xint topline; X{ X WINDOW *W; X char usechar = ')'; X if (Player.possessions[slotnum] != NULL) X if (Player.possessions[slotnum]->used) X usechar = '>'; X if (topline) W = Msg3w; X else { X W = Showline[slotnum]; X hide_line(slotnum); X } X wclear(W); X switch(slotnum) { X case O_UP_IN_AIR: X wprintw(W,"-- Object 'up in air':",usechar); X break; X case O_READY_HAND: X wprintw(W,"-- a%c ready hand: ",usechar); X break; X case O_WEAPON_HAND: X wprintw(W,"-- b%c weapon hand: ",usechar); X break; X case O_LEFT_SHOULDER: X wprintw(W,"-- c%c left shoulder: ",usechar); X break; X case O_RIGHT_SHOULDER: X wprintw(W,"-- d%c right shoulder: ",usechar); X break; X case O_BELT1: X wprintw(W,"-- e%c belt: ",usechar); X break; X case O_BELT2: X wprintw(W,"-- f%c belt: ",usechar); X break; X case O_BELT3: X wprintw(W,"-- g%c belt: ",usechar); X break; X case O_SHIELD: X wprintw(W,"-- h%c shield: ",usechar); X break; X case O_ARMOR: X wprintw(W,"-- i%c armor: ",usechar); X break; X case O_BOOTS: X wprintw(W,"-- j%c boots: ",usechar); X break; X case O_CLOAK: X wprintw(W,"-- k%c cloak: ",usechar); X break; X case O_RING1: X wprintw(W,"-- l%c finger: ",usechar); X break; X case O_RING2: X wprintw(W,"-- m%c finger: ",usechar); X break; X case O_RING3: X wprintw(W,"-- n%c finger: ",usechar); X break; X case O_RING4: X wprintw(W,"-- o%c finger: ",usechar); X break; X } X if (Player.possessions[slotnum]== NULL) X wprintw(W,"(slot vacant)"); X else wprintw(W,itemid(Player.possessions[slotnum])); X wrefresh(W); X} X Xint move_slot(oldslot,newslot,maxslot) Xint oldslot,newslot; X{ X if ((newslot >= 0) && (newslot < maxslot)){ X wmove(Showline[oldslot],0,0); X waddstr(Showline[oldslot],"--"); X wrefresh(Showline[oldslot]); X wmove(Showline[newslot],0,0); X wstandout(Showline[newslot]); X waddstr(Showline[newslot],">>"); X wstandend(Showline[newslot]); X wrefresh(Showline[newslot]); X return(newslot); X } X else return(oldslot); X} X X X Xvoid display_option_slot(slot) Xint slot; X{ X hide_line(slot); X wclear(Showline[slot]); X switch(slot) { X case 1: X wprintw(Showline[slot],"-- Option BELLICOSE [TF]: "); X wprintw(Showline[slot], optionp(BELLICOSE) ? "(now T) " : "(now F) "); X break; X case 2: X wprintw(Showline[slot],"-- Option JUMPMOVE [TF]: "); X wprintw(Showline[slot], optionp(JUMPMOVE) ? "(now T) " : "(now F) "); X break; X case 3: X wprintw(Showline[slot],"-- Option RUNSTOP [TF]: "); X wprintw(Showline[slot], optionp(RUNSTOP) ? "(now T) " : "(now F) "); X break; X case 4: X wprintw(Showline[slot],"-- Option PICKUP [TF]: "); X wprintw(Showline[slot], optionp(PICKUP) ? "(now T) " : "(now F) "); X break; X case 5: X wprintw(Showline[slot],"-- Option CONFIRM [TF]: "); X wprintw(Showline[slot], optionp(CONFIRM) ? "(now T) " : "(now F) "); X break; X case 6: X wprintw(Showline[slot],"-- Option TOPINV [TF]: "); X wprintw(Showline[slot], optionp(TOPINV) ? "(now T) " : "(now F) "); X break; X case 7: X wprintw(Showline[slot],"-- Option PACKADD [TF]: "); X wprintw(Showline[slot], optionp(PACKADD) ? "(now T) " : "(now F) "); X break; X case 8: X wprintw(Showline[slot], X "-- Option VERBOSITY [(T)erse,(M)edium,(V)erbose]: (now "); X if (Verbosity == VERBOSE) wprintw(Showline[slot],"Verbose)"); X else if (Verbosity == MEDIUM) wprintw(Showline[slot],"Medium)"); X else wprintw(Showline[slot],"Terse)"); X break; X case 9: X wprintw(Showline[slot],"-- Option SEARCHNUM [0>x>10]: (now %d)",Searchnum); X break; X } X wrefresh(Showline[slot]); X} X X Xvoid display_options() X{ X int i; X menuclear(); X hide_line(0); X for(i=1;i<=NUMOPTIONS;i++) X display_option_slot(i); X} X X X/* nya ha ha ha ha haaaa.... */ Xvoid deathprint() X{ X mgetc(); X waddch(Msgw,'D'); X mgetc(); X waddch(Msgw,'e'); X mgetc(); X waddch(Msgw,'a'); X mgetc(); X waddch(Msgw,'t'); X mgetc(); X waddch(Msgw,'h'); X mgetc(); X} X Xvoid clear_if_necessary() X{ X int x,y; X getyx(Msg1w,y,x); X X if (x != 0) { X wclear(Msg1w); X wrefresh(Msg1w); X } X X getyx(Msg2w,y,x); X X if (x != 0) { X wclear(Msg2w); X wrefresh(Msg2w); X } X X getyx(Msg3w,y,x); X X if (x != 0) { X wclear(Msg3w); X wrefresh(Msg3w); X } X X} X X Xvoid buffercycle(s) Xchar *s; X{ X int i; X for(i=9;i>0;i--) X strcpy(Stringbuffer[i], Stringbuffer[i-1]); X strcpy(Stringbuffer[0],s); X} X X Xvoid bufferprint() X{ X int i = 0; X clearmsg(); X wprintw(Msg1w,"^p for last message, anything else to quit."); X wrefresh(Msg1w); X do { X wclear(Msg2w); X wprintw(Msg2w,Stringbuffer[i]); X wrefresh(Msg2w); X if (++i > 9) i = 0; X } while (mgetc() == 16); X clearmsg(); X showcursor(Player.x,Player.y); X} END_OF_FILE if test 31141 -ne `wc -c <'oscr.c'`; then echo shar: \"'oscr.c'\" unpacked with wrong size! fi # end of 'oscr.c' fi echo shar: End of archive 2 \(of 19\). cp /dev/null ark2isdone MISSING="" for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have unpacked all 19 archives. rm -f ark[1-9]isdone ark[1-9][0-9]isdone else echo You still need to unpack the following archives: echo " " ${MISSING} fi ## End of shell archive. exit 0