xref: /csrg-svn/games/larn/Fixed.Bugs (revision 37001)
1*37001SbosticThis is a list of the fixes/enhancements made to larn V11.0 in Version 12.0.
2*37001Sbostic(Version numbers consist of 2 parts: ver.subver.  When the save file format
3*37001Sbosticchanges, ver must be bumped.  This is why the next release of Larn is 12.0
4*37001Sbosticand not 11.1. This is used in the savefile routines to check for out-of-date
5*37001Sbosticsave files).  This list was mainly meant to be a record of what changed,
6*37001Sbosticfor my own sanity.  It's included for your benefit (Warning: SPOILER!):
7*37001Sbostic
8*37001Sbostic0.  lprintf() in fileio.c (now called io.c) has been changed to use varargs
9*37001Sbostic	so that its variable number of arguments usage is now portable.  Pyramids
10*37001Sbostic	primarily had this problem.
11*37001Sbostic
12*37001Sbostic1.	Panic handler was added to signal.c.  This routine catches fatal errors
13*37001Sbostic	like segmentation faults, bus errors, illegal instructions, etc., and
14*37001Sbostic	trys to performs a savegame() before dumping core.  This helps prevent
15*37001Sbostic	the loss of a good game due to a game malfunction.  Also, the name of the
16*37001Sbostic	signal received is printed, instead of just its number.
17*37001Sbostic
18*37001Sbostic2.	The version number of the program is now selectable from the Makefile.
19*37001Sbostic	see the symbols VER and SUBVER.
20*37001Sbostic
21*37001Sbostic3.	When at an altar, pray and donate 3000000000 gp. and ye used to receive
22*37001Sbostic	a whopping amount of gold due to a wraparound problem with the signed
23*37001Sbostic	ints.  This has been fixed by using unsigned longs when asking for money
24*37001Sbostic	amounts.
25*37001Sbostic
26*37001Sbostic4.	It was possible that when compiled with work hours checking, checkpointing
27*37001Sbostic	enabled, and having "play-day-play" in the .larnopts file a segmentation
28*37001Sbostic	fault would occur at its first attempt to do a checkpoint.  This was due
29*37001Sbostic	to an improperly declared savefilename array in tok.c.  This has been fixed.
30*37001Sbostic
31*37001Sbostic5.	on level H, casting a missile weapon (mle cld ssp bal lit) off the edge of
32*37001Sbostic	the level would mess up the display, as it didn't know when to stop.  This
33*37001Sbostic	is needless to say, fixed.  Absolute bounds are now in effect for missile
34*37001Sbostic	type spells, see godirect() in monster.c.
35*37001Sbostic
36*37001Sbostic6.  The create monster routine will now create monsters in random positions
37*37001Sbostic	around the player.  Before, the 1st one would always be created to the
38*37001Sbostic	upper left.
39*37001Sbostic
40*37001Sbostic7.	If you vpr or lit at a throne, it would summon a gnome king that you
41*37001Sbostic	would have to deal with.  However, as each throne has only one king with it,
42*37001Sbostic	successive vpr's should not create more gnome kings.  Presently, successive
43*37001Sbostic	vpr's will create more kings.  This has been fixed.
44*37001Sbostic
45*37001Sbostic8.	The mechanism to manage spheres of annihilation has been reworked to provide
46*37001Sbostic	a cleaner design and to eliminate some possible problems.
47*37001Sbostic
48*37001Sbostic9.	The spell gen (genocide monsters) has been implemented.
49*37001Sbostic
50*37001Sbostic10.	When dropping a ring of strength and having been weakened to STR=3 the
51*37001Sbostic	player might end up with a negative strength.  Strength is now stored
52*37001Sbostic	in 2 variables, real strength, and strength bonuses.  Only real strength
53*37001Sbostic	can now be weakened down to a minimum of 3, so unless you have a ring of
54*37001Sbostic	strength -3 or less, strengths below 3 should not occur.
55*37001Sbostic
56*37001Sbostic11. larn -h will now print out a list of all available command line options.
57*37001Sbostic
58*37001Sbostic12. larn -o<optsfile> now lets you specify a .larnopts file on the command
59*37001Sbostic	line.  This was necessary as part of the solution to number 14 below.
60*37001Sbostic
61*37001Sbostic13.	The "savefile:" statement has been aded to the .larnopts format to allow
62*37001Sbostic	specifying the savefilename (full path) for the savegame operation.
63*37001Sbostic	This too was needed as part of # 14 below.
64*37001Sbostic
65*37001Sbostic14. A player id facility has been added to larn.  The complaint was that
66*37001Sbostic	the game used the userid to order the scoreboard, thus only one scoreboard
67*37001Sbostic	entry was allowed for each userid.  If the compile time symbol UIDSCORE
68*37001Sbostic	is defined at compilation time (see Makefile), this will still be true.
69*37001Sbostic	However, if this define is omitted, the game will create and manage a
70*37001Sbostic	file called ".playerids" where names are taken from the specified
71*37001Sbostic	.larnopts file (now a command line option) and assigned a unique playerid.
72*37001Sbostic	playerid's will now be used to govern scoreboard entry posting.  This
73*37001Sbostic	feature makes it easy for one person to have many characters, each
74*37001Sbostic	appearing on the scoreboard.  Be kind to your fellow players!
75*37001Sbostic	The philosophy of one score per player gives more players the opportunity
76*37001Sbostic	to bask in glory for all to see!
77*37001Sbostic
78*37001Sbostic15. It is no longer required that the player be WIZID to create the scoreboard
79*37001Sbostic	or to examine the logfile.  Anyone with the correct wizard's password can
80*37001Sbostic	now use these command line options (password is only needed to create/clear
81*37001Sbostic	the scoreboard).  If you want to prevent players from zeroing the
82*37001Sbostic	scoreboard, change the wizard's password. (in config.c) By the way, wizards
83*37001Sbostic	may be alot of fun, but they are prevented from being placed on any
84*37001Sbostic	scoreboard. (for clarification)
85*37001Sbostic
86*37001Sbostic16. Monsters now have intelligence, that is some of them.  This determines if
87*37001Sbostic	the monster moves using the previously stupid movement method, or by using
88*37001Sbostic	the new IMM (intelligent monster movement) algorithm.  With IMM, monsters
89*37001Sbostic	will move around corners, avoid pits, traps, etc.  With increasing levels
90*37001Sbostic	of difficulty, more monsters will be using IMM.  Beware of IMM when
91*37001Sbostic	aggravated!  Those little beasties can really find you!
92*37001Sbostic
93*37001Sbostic17. Added the scroll of life protection.
94*37001Sbostic
95*37001Sbostic18. Larn now consults the file ".holiday" to check for holidays if the TIMECHECK
96*37001Sbostic	option (no playing during working hours) is enabled.  Before, larn knew
97*37001Sbostic	nothing about holidays.  It should now let people play if it is a holiday.
98*37001Sbostic	The format for a .holiday entry is: "mmm dd yyyy comments . . .".
99*37001Sbostic
100*37001Sbostic19. In nap() and napms() it is possible that with nap(0) or napms(0) there
101*37001Sbostic	would be an infinite loop and the game would hang.  The case of nap(0)
102*37001Sbostic	is now looked for.
103*37001Sbostic
104*37001Sbostic20. The granularity of gold piles has been increased.  iarg[] has been changed
105*37001Sbostic	from char's to short's, so instead of 255 x 10^n granularity we now have
106*37001Sbostic	32767 x 10^n granularity.  This also means more than 255000 gp can be
107*37001Sbostic	dropped in one place.  Not realistic, but it prevents a worthless
108*37001Sbostic	annoyance.  Who said games were supposed to be realistic?
109*37001Sbostic
110*37001Sbostic21. Termcap capability has been added to larn.  If the symbol VT100 is defined
111*37001Sbostic	in the makefile, the game will be compiled to use only VT100 compatible
112*37001Sbostic	terminals (Much more efficient).  If the symbol VT100 is omitted, the game
113*37001Sbostic	will be compiled to use the termcap entry for whatever terminal you are
114*37001Sbostic	using.  This involves an extra layer of output interpretation, as every
115*37001Sbostic	byte sent to the terminal must be inspected for control tokens.
116*37001Sbostic	Only 3 termcap entries need be found for the game to be functional:
117*37001Sbostic	CM (cursor movement), CE (clear to end of line), and CL (clear screen).
118*37001Sbostic	For a better display, the following are optional: AL (insert line), DL
119*37001Sbostic	(delete line), SO (Standout begin), SE (Standout end), and CD (clear to end
120*37001Sbostic	of screen).  The .larn.help file was left as is, with VT100 escape
121*37001Sbostic	sequences in it.  If the termcap version of larn reads it, it is translated
122*37001Sbostic	for the desired terminal type.  The .mail60* files have been removed, and
123*37001Sbostic	their text is now included in bill.c so it can be used with any terminal.
124*37001Sbostic	Note:  If compiled for termcap, and using a VT100, the display will act
125*37001Sbostic	a little different.  This is because the VT100 does not have insert line/
126*37001Sbostic	delete line codes, and the scrolling region must be simulated with vertical
127*37001Sbostic	wraparound instead of scrolling.  Thanks goes to Michiel Huisjes for the
128*37001Sbostic	original termcap patch.
129*37001Sbostic
130*37001Sbostic22. When playing as wizard, if you go down stairs on 10 or V3, or up stairs
131*37001Sbostic	on H, 1, or V1, etc. you would be placed in a phantom zone where the display
132*37001Sbostic	was really weird ([-1] subscripting), and would eventually lead to a
133*37001Sbostic	segmentation fault.  Stairs and volcano shafts now check for the level
134*37001Sbostic	they are being used on.
135*37001Sbostic
136*37001Sbostic23. In response to some sites having only unsigned chars (flame the
137*37001Sbostic	manufacturer), the chars that were used to store positive and negative
138*37001Sbostic	numbers have been changed to shorts.  This includes diroffx[], diroffy[],
139*37001Sbostic	iarg[][][], ivenarg[], and some others.  I believe the changes are correct,
140*37001Sbostic	but I have none of these machines to try it out on. (Volunteers?)
141*37001Sbostic
142*37001Sbostic24. The function fullhit(n) in monster.c was supposed to return the damage
143*37001Sbostic	done by n full hits on a monster.  It only returned the damage for ONE hit,
144*37001Sbostic	thus severely limiting the usefulness of the web and sle spells.
145*37001Sbostic
146*37001Sbostic25. Someone said that they were getting segmentation faults when they were
147*37001Sbostic	reading scrolls as the wizard.  I couldn't find the problem, which may
148*37001Sbostic	have had something to do with the signed char problem mentioned above.
149*37001Sbostic	However, I've added a check in read_scroll() and quaff_potion() to trap
150*37001Sbostic	any scroll or potion types that are not in the game.
151*37001Sbostic
152*37001Sbostic26. "vt125" has been added to the acceptable terminal list
153*37001Sbostic	(checked only if compiled with -DVT100).
154*37001Sbostic
155*37001Sbostic27. In savegame() and restoregame(), there was a 6 hardwired into the i/o
156*37001Sbostic	statements which assumed the size of struct cel was 6.  On some machines
157*37001Sbostic	this caused the rightmost part of each level to not be saved in a savefile.
158*37001Sbostic	These 6's have been replaced with sizeof(struct cel), and should now be
159*37001Sbostic	portable.
160*37001Sbostic
161*37001Sbostic28. The option "no-beep" has been added to the .larnopts file.  When specified,
162*37001Sbostic	beeping is inhibited at the terminal.
163*37001Sbostic
164*37001Sbostic29. When becoming wizard, no longer to you wear the ring of protection, and
165*37001Sbostic	null scrolls and potions are no longer created.
166*37001Sbostic
167*37001Sbostic30. Many spelling errors have been fixed, both in player messages, and in the
168*37001Sbostic	code itself.  A thanks goes to Mars Gralia who sent me a detailed list of
169*37001Sbostic	the mistakes.
170*37001Sbostic
171*37001Sbostic31. When a player wins a game, if getlogin() fails, a segmentation fault will
172*37001Sbostic	result, because the NULL returned from getlogin() is used as a pointer.
173*37001Sbostic	This call has been replaced (now using loginname already determined).
174*37001Sbostic	Also, the mail creation upon winning has been rewritten, mainly to allow
175*37001Sbostic	termcapping of the text.
176*37001Sbostic
177*37001Sbostic32. The Larn Revenue Service will now always appear on level H.  Before, it
178*37001Sbostic	was only created if the player had outstanding taxes.  In that multiple
179*37001Sbostic	save files per player are now more possible, this was seen as incorrect.
180*37001Sbostic
181*37001Sbostic33. Input buffer flushing is now in effect.  If the input char queue exceeds
182*37001Sbostic	5 bytes, the excess is discarded.  Also, if the player hits or gets hit
183*37001Sbostic	all input bytes are flushed (within 1).  This relieves the situation
184*37001Sbostic	where many moves have been typed ahead of the display and the player keeps
185*37001Sbostic	getting hit while the queue of moves is processed.
186*37001Sbostic
187*37001Sbostic34. When a savefile has been altered, a warning message is displayed to the
188*37001Sbostic	effect that you've cheated, and you will not be placed on the normal
189*37001Sbostic	scoreboard.  If you then save the game, and start 'er up again, memory
190*37001Sbostic	of the cheating was lost.  This has been fixed, by letting the scoreboard
191*37001Sbostic	routines consult the cheating flag.  Also, the I node number of the
192*37001Sbostic	savefile is written into the savefile, so cp'ing, etc., will avail the
193*37001Sbostic	cheater not.  If high security is needed, the game should be run suid.
194*37001Sbostic	This suid mode has not been made the default because most installations
195*37001Sbostic	do not want to install it that way.
196*37001Sbostic
197*37001Sbostic35. The sources have been run through lint, and most of lint's complaints have
198*37001Sbostic	been taken care of.  An attempt was made to adjust the code for 16 bit int
199*37001Sbostic	machines.  Many casts to long have been put in.  I don't know if it will
200*37001Sbostic	run on a 16 bitter, but it should be closer to that end.
201*37001Sbostic
202*37001Sbostic36. When larn starts up, if it can't find the scoreboard, it will now make a
203*37001Sbostic	blank one instead of complaining that there is no scoreboard.  It is not
204*37001Sbostic	necessary to do "larn -c" to initially create the scoreboard.
205*37001Sbostic
206*37001Sbostic37. When listing out the logfile (larn -l), the error message "error reading
207*37001Sbostic	from input file" has been fixed.  Also, the date & time of a player's
208*37001Sbostic	demise is now included in the logfile.
209*37001Sbostic
210*37001Sbostic38. When casting web or sle into a mirror, the game will no longer bash the
211*37001Sbostic	player.  Instead, the player will either fall asleep or get stuck in his
212*37001Sbostic	web.
213*37001Sbostic
214*37001Sbostic39. Items like cookies, books, chests, swords of slashing, and Bessmann's
215*37001Sbostic	flailing hammer can now be sold at the trading post.
216*37001Sbostic
217