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