This file contains a set of context diffs for updating a complete version of the NetHack sources from version 3.2.1 to 3.2.2. If you have a non- ancient version of patch, just enter "patch -p < path-to-this-file" from the top directory of your 3.2.1 distribution. *** /dev/null Wed Dec 11 01:31:14 1996 --- UPDATE32.2 Mon Dec 9 17:21:56 1996 *************** *** 0 **** --- 1,22 ---- + This is a minor bugfix release. Sorry, no major new functionality this + time around. + + The two bugs found by dozens of people, recover not working and boomerangs + sometimes causing crashes, are fixed. A problem with priest names in the + endgame found by several people is fixed. Dozens of other mostly minor + bugs noticed by one person each are fixed, and some minor extensions added. + + Several people's problems with curses.h when compiling for UNIX/tty + should be fixed as well. + + Save files are not compatible with earlier versions -- various session- + specific flags are no longer stored in the save file, instead of trying + to ignore their saved values when restoring. NetHack should diagnose + this instead of crashing mysteriously, however. + + In port news, Mac mrecover is updated, although the windowing still needs + help from a Mac programming expert. There has been some Amiga work, although + more people with time are needed there. None of us have access to an + Atari any longer, so if anyone wants that port to continue this is a good + time to make yourself known. (The UNIX, VMS, MS-DOS, and NT ports are + reasonably healthy, modulo people getting busy.) *** Old/README Tue Dec 10 16:34:28 1996 --- ./README Mon Nov 25 17:42:17 1996 *************** *** 158,168 **** Valid Logic Systems SCALD-System 286 box running Microport SysV/AT (not extensively tested) 386/486/Pentium boxes running 386BSD ! ! There is support for NetHack 3.2 on IBM PS/2 and AT compatibles ! running OS/2 1.1 - 2.0 (and probably Warp) with Microsoft ! C 5.1 or 6.0, and OS/2 2.0 with GCC emx 0.8f or IBM C Set/2, ! but this port is currently untested Unless otherwise mentioned, the compiler used was the OS-vendor's C compiler. --- 158,166 ---- Valid Logic Systems SCALD-System 286 box running Microport SysV/AT (not extensively tested) 386/486/Pentium boxes running 386BSD ! IBM PS/2 and AT compatibles running OS/2 1.1 - 2.0 (and probably ! Warp) with Microsoft 6.0, and OS/2 2.0 and up with GCC emx or ! IBM CSet++ 2.0. Unless otherwise mentioned, the compiler used was the OS-vendor's C compiler. *** Old/dat/data.base Tue Dec 10 16:35:09 1996 --- dat/data.base Tue Dec 10 13:35:12 1996 *************** *** 1,4 **** ! # SCCS Id: @(#)data.base 3.2 96/05/13 # Copyright (c) 1994, 1995, 1996 by the NetHack Development Team # Copyright (c) 1994 by Boudewijn Wayers # NetHack may be freely redistributed. See license for details. --- 1,4 ---- ! # SCCS Id: @(#)data.base 3.2 96/10/17 # Copyright (c) 1994, 1995, 1996 by the NetHack Development Team # Copyright (c) 1994 by Boudewijn Wayers # NetHack may be freely redistributed. See license for details. *************** *** 274,279 **** --- 274,285 ---- actually existed, but in Irish mythology she became the midwife to the Virgin Mary. [ Encyclopedia of Gods, by Michael Jordan ] + broadsword + Bring me my broadsword + And clear understanding. + Bring me my cross of gold, + As a talisman. + [ "Broadsword" (refrain) by Ian Anderson ] bugbear Bugbears are relatives of goblins, although they tend to be larger and more hairy. They are aggressive carnivores and *************** *** 1295,1300 **** --- 1301,1307 ---- great magical power. A Lich hates life in any form; even a touch from one of these creatures will cause a numbing cold in the victim. They all possess the capability to use magic. + ~* of light * light Strange creatures formed from energy rather than matter, lights are given to self-destructive behavior when battling *************** *** 1809,1815 **** stinger. He is most feared, though, for his powerful magic abilities. His wand causes death to those he chooses. ~orc ??m* ! *orc* uruk*hai Orcs, bipeds with a humanoid appearance, are related to the goblins, but much bigger and more dangerous. The average orc --- 1816,1823 ---- stinger. He is most feared, though, for his powerful magic abilities. His wand causes death to those he chooses. ~orc ??m* ! orc* ! * orc uruk*hai Orcs, bipeds with a humanoid appearance, are related to the goblins, but much bigger and more dangerous. The average orc *** Old/dat/endgame.des Tue Dec 10 16:35:19 1996 --- dat/endgame.des Mon Nov 25 17:43:02 1996 *************** *** 1,4 **** ! # SCCS Id: @(#)endgame.des 3.2 95/10/11 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1992,1993 by Izchak Miller, David Cohrs, # and Timo Hakulinen --- 1,4 ---- ! # SCCS Id: @(#)endgame.des 3.2 96/11/09 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1992,1993 by Izchak Miller, David Cohrs, # and Timo Hakulinen *************** *** 516,523 **** DOOR:locked,(51,12) DOOR:locked,(57,09) DOOR:closed,(63,09) ! # Non diggable everywhere NON_DIGGABLE:(00,00,74,19) # Moloch's horde # West round room MONSTER:'@',"aligned priest",(18,09),noalign,hostile --- 516,524 ---- DOOR:locked,(51,12) DOOR:locked,(57,09) DOOR:closed,(63,09) ! # Non diggable and phazeable everywhere NON_DIGGABLE:(00,00,74,19) + NON_PASSWALL:(00,00,74,19) # Moloch's horde # West round room MONSTER:'@',"aligned priest",(18,09),noalign,hostile *** Old/dat/gehennom.des Tue Dec 10 16:35:22 1996 --- dat/gehennom.des Mon Nov 25 17:43:03 1996 *************** *** 1,4 **** ! # SCCS Id: @(#)gehennom.des 3.2 95/04/22 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1992 by M. Stephenson and Izchak Miller # NetHack may be freely redistributed. See license for details. --- 1,4 ---- ! # SCCS Id: @(#)gehennom.des 3.2 96/11/09 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1992 by M. Stephenson and Izchak Miller # NetHack may be freely redistributed. See license for details. *************** *** 579,584 **** --- 579,586 ---- REGION:(41,06,48,11),unlit,"morgue",filled,true # Non diggable walls NON_DIGGABLE:(00,00,75,19) + # Invisible barrier separating the left & right halves of the level + NON_PASSWALL:(37,00,39,19) # Doors DOOR:closed,(40,06) DOOR:locked,(62,06) *** Old/dat/quest.txt Tue Dec 10 16:35:49 1996 --- dat/quest.txt Sat Sep 7 00:20:21 1996 *************** *** 1,4 **** ! # SCCS Id: @(#)quest.txt 3.2 95/06/29 # Copyright (c) 1991 by M. Stephenson # NetHack may be freely redistributed. See license for details. # --- 1,4 ---- ! # SCCS Id: @(#)quest.txt 3.2 96/08/19 # Copyright (c) 1991 by M. Stephenson # NetHack may be freely redistributed. See license for details. # *************** *** 66,72 **** You have an odd feeling this may be the last time you ever come here. %E %Cp A 00005 ! "Man, the dig this year was a real bust!" %E %Cp A 00006 "Hey man, got any potions of hallucination for sale?" --- 66,72 ---- You have an odd feeling this may be the last time you ever come here. %E %Cp A 00005 ! "Did you see Lash LaRue in 'Song of Old Wyoming' the other night?" %E %Cp A 00006 "Hey man, got any potions of hallucination for sale?" *************** *** 78,84 **** "So what species do *you* think we evolved from?" %E %Cp A 00009 ! "So you're %l's prize pupil! I don't know what he sees in you." %E %Cc A 00010 "Finally you have returned, %p. You were always --- 78,84 ---- "So what species do *you* think we evolved from?" %E %Cp A 00009 ! "So you're %ls prize pupil! I don't know what he sees in you." %E %Cc A 00010 "Finally you have returned, %p. You were always *************** *** 118,126 **** the university will soon have no choice but to revoke our research grants. "You must locate the entrance to %i. Within it, ! you will find the %n. ! "You must the defeat the %n and return %o to me. "Only in this way will we be able to prevent the budget cuts that could --- 118,126 ---- the university will soon have no choice but to revoke our research grants. "You must locate the entrance to %i. Within it, ! you will find %n. ! "You must the defeat %n and return %o to me. "Only in this way will we be able to prevent the budget cuts that could *************** *** 129,152 **** "May the wisdom of %d be your guide." %E %Cp A 00020 ! "Beware, for the %n is powerful and cunning." %E %Cp A 00021 "To locate the entrance to %i, you must pass many traps." %E %Cp A 00022 ! "%nA may be vulnerable to attacks by magical cold." %E %Cp A 00023 ! "Call upon %d when you encounter the %n." %E %Cp A 00024 ! "You must destroy the %n. It will pursue you otherwise." %E %Cp A 00025 "%oC is a mighty talisman. With it you ! can destroy the %n." %E %Cp A 00026 "Go forth with the blessings of %d." --- 129,152 ---- "May the wisdom of %d be your guide." %E %Cp A 00020 ! "Beware, for %n is powerful and cunning." %E %Cp A 00021 "To locate the entrance to %i, you must pass many traps." %E %Cp A 00022 ! "A %nt may be vulnerable to attacks by magical cold." %E %Cp A 00023 ! "Call upon %d when you encounter %n." %E %Cp A 00024 ! "You must destroy %n. It will pursue you otherwise." %E %Cp A 00025 "%oC is a mighty talisman. With it you ! can destroy %n." %E %Cp A 00026 "Go forth with the blessings of %d." *************** *** 230,242 **** you know you must return %o to %l. %E %Cp A 00080 ! The body of the %n dissipates in a cloud of noxious fumes. %E %Cc A 00081 ! %l touches %o briefly, gazes into it, then smiles at you and says: ! "Well done, %p. You have defeated the %n and recovered %o. But I fear that it shall never be safe here. --- 230,242 ---- you know you must return %o to %l. %E %Cp A 00080 ! The body of %n dissipates in a cloud of noxious fumes. %E %Cc A 00081 ! %lC touches %o briefly, gazes into it, then smiles at you and says: ! "Well done, %p. You have defeated %n and recovered %o. But I fear that it shall never be safe here. *************** *** 298,304 **** "The horde is mighty in numbers, but they have little courage." %E %Cp B 00009 ! "%l is a strange one, but he has helped defend us." %E %Cc B 00010 "Ah, %p. You have returned at last. The world is in dire --- 298,304 ---- "The horde is mighty in numbers, but they have little courage." %E %Cp B 00009 ! "%lC is a strange one, but he has helped defend us." %E %Cc B 00010 "Ah, %p. You have returned at last. The world is in dire *************** *** 341,347 **** "At about the same time, these people you once rode with `liberated' a potent magical talisman, %o, from a Turanian caravan. ! "%n and his Black Horde swept down upon %i and defeated the people there, driving them out into the desert. He has taken %o, and seeks to bend it to his will. I detected the subtle changes in the currents of fate, and joined these people. --- 341,347 ---- "At about the same time, these people you once rode with `liberated' a potent magical talisman, %o, from a Turanian caravan. ! "%nC and his Black Horde swept down upon %i and defeated the people there, driving them out into the desert. He has taken %o, and seeks to bend it to his will. I detected the subtle changes in the currents of fate, and joined these people. *************** *** 357,363 **** then will the world be safe." %E %Cp B 00020 ! "%n is strong in the dark arts, but not immune to cold steel." %E %Cp B 00021 "Remember that %n is a great sorcerer. He lived in the time --- 357,363 ---- then will the world be safe." %E %Cp B 00020 ! "%nC is strong in the dark arts, but not immune to cold steel." %E %Cp B 00021 "Remember that %n is a great sorcerer. He lived in the time *************** *** 380,386 **** "If you can lay hands upon %o, carry it for good fortune." %E %Cp B 00027 ! "I cannot stand against %n's sorcery. But %d will help you." %E %Cp B 00028 "Do not fear %n. I know you can defeat him." --- 380,386 ---- "If you can lay hands upon %o, carry it for good fortune." %E %Cp B 00027 ! "I cannot stand against %ns sorcery. But %d will help you." %E %Cp B 00028 "Do not fear %n. I know you can defeat him." *************** *** 456,462 **** at once, even though you are holding it. %E %Cp B 00080 ! %n falls to the ground, and utters a last curse at you. Then his body fades slowly, seemingly dispersing into the air around you. You slowly become aware that the overpowering aura of magic in the air has begun to fade. --- 456,462 ---- at once, even though you are holding it. %E %Cp B 00080 ! %nC falls to the ground, and utters a last curse at you. Then his body fades slowly, seemingly dispersing into the air around you. You slowly become aware that the overpowering aura of magic in the air has begun to fade. *************** *** 509,515 **** # %Cc C 00001 You descend through a barely familiar stairwell that you remember ! the %l showing you when you embarked upon your vision quest. You arrive back at %H, but something seems wrong here. The usual smoke and glowing light of the fires of the --- 509,515 ---- # %Cc C 00001 You descend through a barely familiar stairwell that you remember ! %l showing you when you embarked upon your vision quest. You arrive back at %H, but something seems wrong here. The usual smoke and glowing light of the fires of the *************** *** 527,533 **** off our access to the outer world." %E %Cp C 00006 ! "Since the %n sent her minions, we have been constantly fighting." %E %Cp C 00007 "I have heard your vision quest was successful. Is this so?" --- 527,533 ---- off our access to the outer world." %E %Cp C 00006 ! "Since %n sent her minions, we have been constantly fighting." %E %Cp C 00007 "I have heard your vision quest was successful. Is this so?" *************** *** 536,542 **** "So, tell me, %p, how have you fared?" %E %Cp C 00009 ! "The %l grows old. We know not who will guide us after he ascends." %E %Cc C 00010 "You have returned from your vision quest, %p. Thank %d. --- 536,542 ---- "So, tell me, %p, how have you fared?" %E %Cp C 00009 ! "%lC grows old. We know not who will guide us after he ascends." %E %Cc C 00010 "You have returned from your vision quest, %p. Thank %d. *************** *** 566,572 **** a difficult quest as that I propose to give you. "%rA could not possibly survive the rigors demanded to find ! %i, never mind to confront the %n herself. "Adventure some more, and you will learn the skills you will require. %d decrees it." --- 566,572 ---- a difficult quest as that I propose to give you. "%rA could not possibly survive the rigors demanded to find ! %i, never mind to confront %n herself. "Adventure some more, and you will learn the skills you will require. %d decrees it." *************** *** 582,624 **** great suffering among your people: "Shortly after you left on your vision quest, the caves were invaded by ! the creatures sent against us by the %n. "She, herself, could not attack us due to her great size, but her minions have harassed us ever since. In the first attacks, many died, and the ! minions of the %n managed to steal %o. They took it to %i and there, none of our %g warriors have been able to go. "You must find %i, and within it wrest ! %o from the %n. She guards it as jealously as she guards all treasures she attains. But with it, we can make our caves safe once more. "Please, %p, recover %o for us, and return it here." %E %Cp C 00020 ! "The %n is immune to her own breath weapons. You should use magic upon her that she does not use herself." %E %Cp C 00021 ! "When you encounter the %n, call upon %d for assistance." %E %Cp C 00022 ! "There will be nowhere to hide inside the %n's inner sanctum." %E %Cp C 00023 ! "Your best chance with the %n will be to keep moving." %E %Cp C 00024 ! "Do not be distracted by the great treasures in the %n's lair. Concentrate on %o." %E %Cp C 00025 ! "%oC is the only object that the %n truly fears." %E %Cp C 00026 ! "Do not be fooled by the %n's size. She is fast, and it is rumored that she uses magic." %E %Cp C 00027 --- 582,624 ---- great suffering among your people: "Shortly after you left on your vision quest, the caves were invaded by ! the creatures sent against us by %n. "She, herself, could not attack us due to her great size, but her minions have harassed us ever since. In the first attacks, many died, and the ! minions of %n managed to steal %o. They took it to %i and there, none of our %g warriors have been able to go. "You must find %i, and within it wrest ! %o from %n. She guards it as jealously as she guards all treasures she attains. But with it, we can make our caves safe once more. "Please, %p, recover %o for us, and return it here." %E %Cp C 00020 ! "%nC is immune to her own breath weapons. You should use magic upon her that she does not use herself." %E %Cp C 00021 ! "When you encounter %n, call upon %d for assistance." %E %Cp C 00022 ! "There will be nowhere to hide inside %ns inner sanctum." %E %Cp C 00023 ! "Your best chance with %n will be to keep moving." %E %Cp C 00024 ! "Do not be distracted by the great treasures in %ns lair. Concentrate on %o." %E %Cp C 00025 ! "%oC is the only object that %n truly fears." %E %Cp C 00026 ! "Do not be fooled by %ns size. She is fast, and it is rumored that she uses magic." %E %Cp C 00027 *************** *** 649,661 **** Bones litter the floor, and there are objects scattered everywhere. The air is close with the stench of sulphurous fumes. ! The %n is clearly visible, but she seems to be asleep. %E %Cp C 00041 ! Once again, you find yourself in the lair of the %n. %E %Cc C 00050 ! "So, human, you seek to invade the lair of the %n. Only my meals are allowed down here. Prepare to be eaten!" %E %Cp C 00051 --- 649,661 ---- Bones litter the floor, and there are objects scattered everywhere. The air is close with the stench of sulphurous fumes. ! %nC is clearly visible, but she seems to be asleep. %E %Cp C 00041 ! Once again, you find yourself in the lair of %n. %E %Cc C 00050 ! "So, human, you seek to invade the lair of %n. Only my meals are allowed down here. Prepare to be eaten!" %E %Cp C 00051 *************** *** 681,693 **** "With %o, I am invincible! You cannot succeed." %E %Cp C 00064 ! "Your mentor, the %l has failed. You are nothing to fear." %E %Cp C 00065 "You shall die here, %c. %rA cannot hope to defeat me." %E %Cp C 00066 ! "You, a mere %r challenge the might of the %n? Hah!" %E %Cp C 00067 "I am the Mother of all Dragons! You cannot hope to defeat me." --- 681,693 ---- "With %o, I am invincible! You cannot succeed." %E %Cp C 00064 ! "Your mentor, %l has failed. You are nothing to fear." %E %Cp C 00065 "You shall die here, %c. %rA cannot hope to defeat me." %E %Cp C 00066 ! "You, a mere %r challenge the might of %n? Hah!" %E %Cp C 00067 "I am the Mother of all Dragons! You cannot hope to defeat me." *************** *** 706,716 **** in your path. %E %Cp C 00080 ! The %n sinks to the ground, her heads flailing about. As she dies, a cloud of noxious fumes billows about her. %E %Cc C 00081 ! The %l glimpses %o in your possession. He smiles and says: You have done it! We are saved. But I fear that %o --- 706,716 ---- in your path. %E %Cp C 00080 ! %nC sinks to the ground, her heads flailing about. As she dies, a cloud of noxious fumes billows about her. %E %Cc C 00081 ! %lC glimpses %o in your possession. He smiles and says: You have done it! We are saved. But I fear that %o *************** *** 757,766 **** "%p! I have not seen you in many cycles. How do you fare?" %E %Cp E 00006 ! "The %n continues to threaten the circle. But we hold fast." %E %Cp E 00007 ! "%l is growing weak. The magic required to defend the circle drains us." %E %Cp E 00008 "Remember %i is hard to enter. Seek the secret --- 757,766 ---- "%p! I have not seen you in many cycles. How do you fare?" %E %Cp E 00006 ! "%nC continues to threaten the circle. But we hold fast." %E %Cp E 00007 ! "%lC is growing weak. The magic required to defend the circle drains us." %E %Cp E 00008 "Remember %i is hard to enter. Seek the secret *************** *** 804,815 **** and why we so desperately need your help: "A short time ago, the Uruk-hai tribes of the mountains to the east ! invaded and enslaved the Goblin tribes in this area. The local ! %n is now only a figurehead, and serves the Uruk-hai Overlord. "During our last gathering of worship here, we were beset by hordes of orcs and goblins, as you witnessed. In the first onslaught a group, ! headed by the %n himself, managed to breach the circle and steal %o. "Since then, we have been besieged. We do not know how much longer --- 804,815 ---- and why we so desperately need your help: "A short time ago, the Uruk-hai tribes of the mountains to the east ! invaded and enslaved the goblin tribes in this area. The local ! %nt is now only a figurehead, and serves the Uruk-hai Overlord. "During our last gathering of worship here, we were beset by hordes of orcs and goblins, as you witnessed. In the first onslaught a group, ! headed by %n himself, managed to breach the circle and steal %o. "Since then, we have been besieged. We do not know how much longer *************** *** 817,823 **** "If we are to survive, you, %p, must infiltrate %i. There, you will find a pathway down, to the ! underground castle of the %n. He has always coveted %o, and will surely keep it on his person, until he delivers it to the Uruk-hai Overlord. --- 817,823 ---- "If we are to survive, you, %p, must infiltrate %i. There, you will find a pathway down, to the ! underground castle of %n. He has always coveted %o, and will surely keep it on his person, until he delivers it to the Uruk-hai Overlord. *************** *** 828,834 **** "It is rumored that the Uruk-hai have a pact with the Hill Ogres." %E %Cp E 00021 ! "The %n is strong, but not very smart." %E %Cp E 00022 "Use %o, when you find it. It will help you survive --- 828,834 ---- "It is rumored that the Uruk-hai have a pact with the Hill Ogres." %E %Cp E 00021 ! "%nC is strong, but not very smart." %E %Cp E 00022 "Use %o, when you find it. It will help you survive *************** *** 838,848 **** "Remember, let %d be your guide." %E %Cp E 00024 ! "Call upon %d when you face the %n. The very act of doing so will infuriate him, and give you advantage." %E %Cp E 00025 ! "Though the %n is as %C as we, he and his kind have always hated us." %E %Cp E 00026 --- 838,848 ---- "Remember, let %d be your guide." %E %Cp E 00024 ! "Call upon %d when you face %n. The very act of doing so will infuriate him, and give you advantage." %E %Cp E 00025 ! "Though %n is as %C as we, he and his kind have always hated us." %E %Cp E 00026 *************** *** 852,858 **** "To infiltrate %i, you must be very stealthy." %E %Cp E 00028 ! "Remember that the %n is a braggart. Trust not what he says." %E %Cp E 00029 "You can triumph, %p, if you trust in %d." --- 852,858 ---- "To infiltrate %i, you must be very stealthy." %E %Cp E 00028 ! "Remember that %n is a braggart. Trust not what he says." %E %Cp E 00029 "You can triumph, %p, if you trust in %d." *************** *** 875,884 **** Off in the distance, you hear the sounds of a large, raucous gathering. %E %Cp E 00041 ! Once again, you enter the distorted castle of the %n. %E %Cc E 00050 ! "So, %c. %l has sent you to recover %o. "Well, I shall keep that bauble. It pleases me. You, %c, shall die." %E --- 875,884 ---- Off in the distance, you hear the sounds of a large, raucous gathering. %E %Cp E 00041 ! Once again, you enter the distorted castle of %n. %E %Cc E 00050 ! "So, %c. %lC has sent you to recover %o. "Well, I shall keep that bauble. It pleases me. You, %c, shall die." %E *************** *** 896,902 **** "Your %d is nothing, %c. You are mine now!" %E %Cp E 00061 ! "Run away little %c! You can never hope to defeat the %n!" %E %Cp E 00062 "My Uruk-hai servants will rip you to shreds!" --- 896,902 ---- "Your %d is nothing, %c. You are mine now!" %E %Cp E 00061 ! "Run away little %c! You can never hope to defeat %n!" %E %Cp E 00062 "My Uruk-hai servants will rip you to shreds!" *************** *** 905,920 **** "I shall display your head as a trophy. What do you think about that wall?" %E %Cp E 00064 ! "I shall break your %l's circle, and destroy all the %gP!" %E %Cp E 00065 "%d has abandoned you, %c. You are doomed." %E %Cp E 00066 ! "%rA? %l sends a mere %r against me? Hah!" %E %Cp E 00067 ! "%l has failed, %c. %oC will never leave here." %E %Cp E 00068 "You really think you can defeat me, eh %c? You are wrong!" --- 905,920 ---- "I shall display your head as a trophy. What do you think about that wall?" %E %Cp E 00064 ! "I shall break your %ls circle, and destroy all the %gP!" %E %Cp E 00065 "%d has abandoned you, %c. You are doomed." %E %Cp E 00066 ! "%rA? %lC sends a mere %r against me? Hah!" %E %Cp E 00067 ! "%lC has failed, %c. %oC will never leave here." %E %Cp E 00068 "You really think you can defeat me, eh %c? You are wrong!" *************** *** 931,937 **** on your speed. %E %Cc E 00080 ! The %n collapses to the ground, cursing you and %l, then says: You have defeated me, %r! But I curse you one final time, with my dying breath! You shall die before you leave my castle! --- 931,937 ---- on your speed. %E %Cc E 00080 ! %nC collapses to the ground, cursing you and %l, then says: You have defeated me, %r! But I curse you one final time, with my dying breath! You shall die before you leave my castle! *************** *** 941,947 **** "Your aura proclaims that you possess %o! ! "I fear, now, that the Uruk-hai will select yet another %n. This will take some time, but if you can recover the Amulet of Yendor for %d before that happens, we will be eternally safe. --- 941,947 ---- "Your aura proclaims that you possess %o! ! "I fear, now, that the Uruk-hai will select yet another %nt. This will take some time, but if you can recover the Amulet of Yendor for %d before that happens, we will be eternally safe. *************** *** 976,982 **** common folk who used to come for the cures? You know that you must quickly make your way to the collegium, and ! %l's iatreion, and find out what has happened in your absence. %E %Cp H 00002 --- 976,982 ---- common folk who used to come for the cures? You know that you must quickly make your way to the collegium, and ! %ls iatreion, and find out what has happened in your absence. %E %Cp H 00002 *************** *** 988,994 **** Again, you %x %H in the distance. The smell of death and disease permeates the air. You do not have ! to be %Ra to know that the %n is on the verge of victory. %E %Cp H 00005 "Did you read that new treatise on the therapeutic use of leeches?" --- 988,994 ---- Again, you %x %H in the distance. The smell of death and disease permeates the air. You do not have ! to be %Ra to know that %n is on the verge of victory. %E %Cp H 00005 "Did you read that new treatise on the therapeutic use of leeches?" *************** *** 1003,1009 **** "I've heard that even %l has not been able to cure Chiron." %E %Cp H 00009 ! "We think the %n has used his alchemists, and %o, to unleash a new disease we call 'the cold' on Gehennom." %E %Cc H 00010 --- 1003,1009 ---- "I've heard that even %l has not been able to cure Chiron." %E %Cp H 00009 ! "We think %n has used his alchemists, and %o, to unleash a new disease we call 'the cold' on Gehennom." %E %Cc H 00010 *************** *** 1011,1017 **** "It is good to see you again, %p. I see the concern in your eyes, but do not worry for me. I am not ready for Hades yet. We have ! exhausted much of our healing powers holding off the %n. I need your fresh strength to carry on our work. "Come closer and let me lay hands on you, and determine if you have --- 1011,1017 ---- "It is good to see you again, %p. I see the concern in your eyes, but do not worry for me. I am not ready for Hades yet. We have ! exhausted much of our healing powers holding off %n. I need your fresh strength to carry on our work. "Come closer and let me lay hands on you, and determine if you have *************** *** 1044,1062 **** %E %Cc H 00015 "You have learned much of the remedies that benefit, but you must also ! know which physic for which ail. That is why %d's teachings are a part of your training. "Return to us when you have healed thyself." %E %Cc H 00016 ! For the first time, you sense a smile on %l' face. You have indeed learned as much as we can teach you in preparation for this task. Let me tell you what I know of the symptoms and hope that you can provide a cure. ! A short while ago, the dreaded %n was fooled by the gods into thinking that he could use %o to find a cure for old age. Think of it, eternal youth! But his good health is accomplished by drawing the health from those around him. --- 1044,1062 ---- %E %Cc H 00015 "You have learned much of the remedies that benefit, but you must also ! know which physic for which ail. That is why %ds teachings are a part of your training. "Return to us when you have healed thyself." %E %Cc H 00016 ! For the first time, you sense a smile on %ls face. You have indeed learned as much as we can teach you in preparation for this task. Let me tell you what I know of the symptoms and hope that you can provide a cure. ! A short while ago, the dreaded %nt was fooled by the gods into thinking that he could use %o to find a cure for old age. Think of it, eternal youth! But his good health is accomplished by drawing the health from those around him. *************** *** 1066,1078 **** %o and break the spell. You must travel into the swamps to %i, and from there ! follow the trail to the %n's island lair. Be careful. %E %Cp H 00020 "Remember, %p, to always wash your hands before operating." %E %Cp H 00021 ! "The %n has no real magic of his own. To this he is vulnerable." %E %Cp H 00022 "If you have been true to %d, you can draw on the power of --- 1066,1078 ---- %o and break the spell. You must travel into the swamps to %i, and from there ! follow the trail to %ns island lair. Be careful. %E %Cp H 00020 "Remember, %p, to always wash your hands before operating." %E %Cp H 00021 ! "%nC has no real magic of his own. To this he is vulnerable." %E %Cp H 00022 "If you have been true to %d, you can draw on the power of *************** *** 1095,1105 **** "The plague grows worse as we speak. Hurry, %p!" %E %Cp H 00028 ! "Many times the %n has caused trouble in these lands. It is time that he was eradicated like the diseases he has caused." %E %Cp H 00029 ! "With but one eye, the %n should be easy to blind. Remember this." %E %Cc H 00030 You stand before the entrance to %i. Strange --- 1095,1105 ---- "The plague grows worse as we speak. Hurry, %p!" %E %Cp H 00028 ! "Many times %n has caused trouble in these lands. It is time that he was eradicated like the diseases he has caused." %E %Cp H 00029 ! "With but one eye, %n should be easy to blind. Remember this." %E %Cc H 00030 You stand before the entrance to %i. Strange *************** *** 1111,1117 **** Once again you stand at the entrance to %i. %E %Cc H 00040 ! You stand within sight of the infamous Isle of the %n. Even the words of %l had not prepared you for this. Steeling yourself against the wails of the ill that pierce your ears, --- 1111,1117 ---- Once again you stand at the entrance to %i. %E %Cc H 00040 ! You stand within sight of the infamous Isle of %n. Even the words of %l had not prepared you for this. Steeling yourself against the wails of the ill that pierce your ears, *************** *** 1119,1125 **** heal them on your return, but not now. %E %Cp H 00041 ! Once again, you %x the Isle of the %n in the distance. %E %Cc H 00050 "They have made a mistake in sending you, %p. --- 1119,1125 ---- heal them on your return, but not now. %E %Cp H 00041 ! Once again, you %x the Isle of %n in the distance. %E %Cc H 00050 "They have made a mistake in sending you, %p. *************** *** 1176,1189 **** again. %E %Cc H 00080 ! The battered body of the %n slumps to the ground and gasps out one last curse: You have defeated me, %p, but I shall have my revenge. How, I shall not say, but this curse shall be like a cancer on you. ! With that the %n dies. %E %Cc H 00081 As soon as %l sees %o he summons his %gP. --- 1176,1189 ---- again. %E %Cc H 00080 ! The battered body of %n slumps to the ground and gasps out one last curse: You have defeated me, %p, but I shall have my revenge. How, I shall not say, but this curse shall be like a cancer on you. ! With that %n dies. %E %Cc H 00081 As soon as %l sees %o he summons his %gP. *************** *** 1309,1315 **** "Great treasure, 'tis said, is hoarded in the lair of %n." %E %Cp K 00024 ! "If thou possesseth %o, %p, %n's magic shalt therewith be thwarted." %E %Cp K 00025 --- 1309,1315 ---- "Great treasure, 'tis said, is hoarded in the lair of %n." %E %Cp K 00024 ! "If thou possesseth %o, %p, %ns magic shalt therewith be thwarted." %E %Cp K 00025 *************** *** 1344,1350 **** pieces of rusted metal and broken weapons show above the surface. %E %Cp K 00041 ! Again, you stand at the entrance to %n's lair. %E %Cp K 00050 "Hah! Another puny %c seeks death. I shall dine well tonight, --- 1344,1350 ---- pieces of rusted metal and broken weapons show above the surface. %E %Cp K 00041 ! Again, you stand at the entrance to %ns lair. %E %Cp K 00050 "Hah! Another puny %c seeks death. I shall dine well tonight, *************** *** 1441,1447 **** stand open, are closed. Strange human shapes shamble around outside. ! You realize that the %l needs your assistance! %E %Cp P 00002 Once again, you stand before %H. --- 1441,1447 ---- stand open, are closed. Strange human shapes shamble around outside. ! You realize that %l needs your assistance! %E %Cp P 00002 Once again, you stand before %H. *************** *** 1457,1463 **** "Ah, %p! Surely you can help us in our hour of need." %E %Cp P 00007 ! "Greetings, %s. The %l has great need of your help." %E %Cp P 00008 "Alas, it seems as if even %d has deserted us." --- 1457,1463 ---- "Ah, %p! Surely you can help us in our hour of need." %E %Cp P 00007 ! "Greetings, %s. %lC has great need of your help." %E %Cp P 00008 "Alas, it seems as if even %d has deserted us." *************** *** 1509,1515 **** barely enough %gP left to keep the undead at bay. "We need you to find %i, then, from there, travel ! to %n's lair. If you can manage to defeat %n and return %o here, we can then drive off the legions of undead that befoul the land. --- 1509,1515 ---- barely enough %gP left to keep the undead at bay. "We need you to find %i, then, from there, travel ! to %ns lair. If you can manage to defeat %n and return %o here, we can then drive off the legions of undead that befoul the land. *************** *** 1552,1558 **** undead in larger numbers than you have ever encountered before. You remember the descriptions of %i, given to you by ! the %l. It is ahead that you will find %n's trail. %E %Cp P 00031 Again, you stand before %i. --- 1552,1558 ---- undead in larger numbers than you have ever encountered before. You remember the descriptions of %i, given to you by ! %lC. It is ahead that you will find %ns trail. %E %Cp P 00031 Again, you stand before %i. *************** *** 1564,1573 **** Ahead, there is a small clearing amidst the bubbling pits of lava... %E %Cp P 00041 ! Again, you have invaded %n's domain. %E %Cc P 00050 ! "Ah, so the %l has sent another %g to retrieve %o. "No, I see you are no %g. Perhaps I shall have some fun today --- 1564,1573 ---- Ahead, there is a small clearing amidst the bubbling pits of lava... %E %Cp P 00041 ! Again, you have invaded %ns domain. %E %Cc P 00050 ! "Ah, so %lC has sent another %g to retrieve %o. "No, I see you are no %g. Perhaps I shall have some fun today *************** *** 1605,1611 **** "You cannot defeat %n, you fool. I shall kill you now." %E %Cp P 00067 ! "Your precious %l will be my next victim." %E %Cp P 00068 "I feel your powers failing you, %r. You shall die now." --- 1605,1611 ---- "You cannot defeat %n, you fool. I shall kill you now." %E %Cp P 00067 ! "Your precious %lt will be my next victim." %E %Cp P 00068 "I feel your powers failing you, %r. You shall die now." *************** *** 1620,1630 **** easily defeat his plans. You sense a message from %d. Though not verbal, you ! get the impression that you must return to the %l as soon as possible. %E %Cc P 00080 ! You feel a wrenching shift in the ether as %n's body dissolves into a cloud of noxious gas. Suddenly, a voice booms out: --- 1620,1630 ---- easily defeat his plans. You sense a message from %d. Though not verbal, you ! get the impression that you must return to %lC as soon as possible. %E %Cc P 00080 ! You feel a wrenching shift in the ether as %ns body dissolves into a cloud of noxious gas. Suddenly, a voice booms out: *************** *** 1652,1660 **** %E %Cc P 00091 "You have prevailed, %p! %d is surely with you. Now, ! you must take the amulet, and sacrifice it on %d's altar on the Astral plane. I suspect that I shall never see you again in this ! life, but I hope to at %d's feet." %E # # Rogue (with apologies to all Norsk speakers -dean) --- 1652,1660 ---- %E %Cc P 00091 "You have prevailed, %p! %d is surely with you. Now, ! you must take the amulet, and sacrifice it on %ds altar on the Astral plane. I suspect that I shall never see you again in this ! life, but I hope to at %ds feet." %E # # Rogue (with apologies to all Norsk speakers -dean) *************** *** 1662,1677 **** %Cc R 00001 Unexpectedly, you find yourself back in Ransmannsby, where you trained to be a thief. Quickly you make the guild sign, hoping that you AND word ! of your arrival reach the %l's den. %E %Cp R 00002 Once again, you find yourself back in Ransmannsby. Fond memories are ! replaced by fear, knowing that the %l is waiting for you. %E %Cp R 00003 You rub your hands through your hair, hoping that the little ones on the back of your neck stay down, and prepare yourself for your meeting ! with the %l. %E %Cp R 00005 "I hear that Lady Tyvefelle's household is lightly guarded." --- 1662,1677 ---- %Cc R 00001 Unexpectedly, you find yourself back in Ransmannsby, where you trained to be a thief. Quickly you make the guild sign, hoping that you AND word ! of your arrival reach %ls den. %E %Cp R 00002 Once again, you find yourself back in Ransmannsby. Fond memories are ! replaced by fear, knowing that %l is waiting for you. %E %Cp R 00003 You rub your hands through your hair, hoping that the little ones on the back of your neck stay down, and prepare yourself for your meeting ! with %l. %E %Cp R 00005 "I hear that Lady Tyvefelle's household is lightly guarded." *************** *** 1702,1708 **** isn't stupidity that brings you back." %E %Cp R 00012 ! "Did you perhaps mistake me for some other %l? You must think me as stupid as your behavior. I warn you not to try my patience." %E %Cc R 00013 --- 1702,1708 ---- isn't stupidity that brings you back." %E %Cp R 00012 ! "Did you perhaps mistake me for some other %lt? You must think me as stupid as your behavior. I warn you not to try my patience." %E %Cc R 00013 *************** *** 1711,1717 **** charge. Wrong. DEAD WRONG!" Your sudden shift in surroundings prevents you from hearing the end ! of the %l's curse. %E %Cc R 00014 "In the time that you've been gone you've only been able to master the --- 1711,1717 ---- charge. Wrong. DEAD WRONG!" Your sudden shift in surroundings prevents you from hearing the end ! of %ls curse. %E %Cc R 00014 "In the time that you've been gone you've only been able to master the *************** *** 1727,1737 **** %E %Cc R 00016 "Will everyone not going to retrieve %o from that ! jerk, the %n, take one step backwards. Good choice, %p, because I was going to send you anyway. My other %gp are too valuable to me. ! "Here's the deal. I want %o, the %n has %o. You are going to get %o and bring it back to me. So simple an assignment even you can understand it." --- 1727,1737 ---- %E %Cc R 00016 "Will everyone not going to retrieve %o from that ! jerk, %n, take one step backwards. Good choice, %p, because I was going to send you anyway. My other %gp are too valuable to me. ! "Here's the deal. I want %o, %n has %o. You are going to get %o and bring it back to me. So simple an assignment even you can understand it." *************** *** 1774,1780 **** %o. %E %Cp R 00031 ! Not wanting to face the %l without having stolen %o, you continue. %E %Cc R 00040 --- 1774,1780 ---- %o. %E %Cp R 00031 ! Not wanting to face %l without having stolen %o, you continue. %E %Cc R 00040 *************** *** 1785,1791 **** The hairs on the back of your neck whisper -- it's fear. %E %Cc R 00050 ! "Ah! You must be the %l's ... er, `hero'. A pleasure to meet you." %E %Cc R 00051 --- 1785,1791 ---- The hairs on the back of your neck whisper -- it's fear. %E %Cc R 00050 ! "Ah! You must be %ls ... er, `hero'. A pleasure to meet you." %E %Cc R 00051 *************** *** 1793,1804 **** %E %Cp R 00052 "Surely, %p, you have learned that you cannot trust any bargains ! that the %l has made. I can show you how to continue on your quest without having to run into him again." %E %Cp R 00053 "Please, think for a moment about what you are doing. Do you truly ! believe that %d would want the %l to have %o?" %E %Cp R 00060 --- 1793,1804 ---- %E %Cp R 00052 "Surely, %p, you have learned that you cannot trust any bargains ! that %l has made. I can show you how to continue on your quest without having to run into him again." %E %Cp R 00053 "Please, think for a moment about what you are doing. Do you truly ! believe that %d would want %l to have %o?" %E %Cp R 00060 *************** *** 1811,1817 **** "Grim times are upon us all. Will you not see reason?" %E %Cp R 00063 ! "I knew the %l, and you're no %l, thankfully." %E %Cp R 00064 "It is a shame that we are not meeting under more pleasant circumstances." --- 1811,1817 ---- "Grim times are upon us all. Will you not see reason?" %E %Cp R 00063 ! "I knew %l, and you're no %lt, thankfully." %E %Cp R 00064 "It is a shame that we are not meeting under more pleasant circumstances." *************** *** 1821,1831 **** is better." %E %Cp R 00066 ! "Stay with me, and I will make you %o's guardian." %E %Cp R 00067 "When you return, with or without %o, ! the %l will have you killed." %E %Cp R 00068 "Do not be fooled; I am prepared to kill to defend %o." --- 1821,1831 ---- is better." %E %Cp R 00066 ! "Stay with me, and I will make you %os guardian." %E %Cp R 00067 "When you return, with or without %o, ! %l will have you killed." %E %Cp R 00068 "Do not be fooled; I am prepared to kill to defend %o." *************** *** 1835,1842 **** %E %Cc R 00070 "As you pick up %o, the hairs on the back of your ! neck fall out. At once you realize why the %n was ! willing to die to keep it out of the %l's hands. Somehow you know that you must do likewise." %E %Cc R 00080 --- 1835,1842 ---- %E %Cc R 00070 "As you pick up %o, the hairs on the back of your ! neck fall out. At once you realize why %n was ! willing to die to keep it out of %ls hands. Somehow you know that you must do likewise." %E %Cc R 00080 *************** *** 1844,1851 **** to use %o wisely. For the sake of your guild %sp, do what is right." ! You sit and wait for death to come for the %n, and then you ! brace yourself for your next meeting with the %l! %E %Cc R 00081 "Well, I'll be damned. You got it. I am proud of you, a fine %r --- 1844,1851 ---- to use %o wisely. For the sake of your guild %sp, do what is right." ! You sit and wait for death to come for %n, and then you ! brace yourself for your next meeting with %l! %E %Cc R 00081 "Well, I'll be damned. You got it. I am proud of you, a fine %r *************** *** 1854,1862 **** "While you were gone I got to thinking, you and %o together could bring me more treasure than either of you apart, so why don't you take it with you. All I ask is a cut of whatever loot you come by. ! That is a better deal than I offered the %n. ! "But, you see what happened to the %n when he refused. Don't make me find another to send after you this time." %E %Cc R 00090 --- 1854,1862 ---- "While you were gone I got to thinking, you and %o together could bring me more treasure than either of you apart, so why don't you take it with you. All I ask is a cut of whatever loot you come by. ! That is a better deal than I offered %n. ! "But, you see what happened to %n when he refused. Don't make me find another to send after you this time." %E %Cc R 00090 *************** *** 1905,1911 **** "I fear for The Land of The Gods." %E %Cp S 00008 ! "%n has hired the Ninja -- be careful." %E %Cp S 00009 "If %o is not returned, we will all be ninja." --- 1905,1911 ---- "I fear for The Land of The Gods." %E %Cp S 00008 ! "%nC has hired the Ninja -- be careful." %E %Cp S 00009 "If %o is not returned, we will all be ninja." *************** *** 2066,2072 **** sun god. %E %Cc S 00080 ! Your healing skills tell you that %n's wounds are mortal. You know that the bushido tells you to finish him and let his kami die with honor, but the thought of so many samurai dead due to this --- 2066,2072 ---- sun god. %E %Cc S 00080 ! Your healing skills tell you that %ns wounds are mortal. You know that the bushido tells you to finish him and let his kami die with honor, but the thought of so many samurai dead due to this *************** *** 2095,2101 **** %o. %E %Cp S 00090 ! %l bows. "%p-sama, tell us of your search for the Amulet." %E %Cc S 00091 "Ah, %p-sama. You have wasted your efforts returning home. --- 2095,2101 ---- %o. %E %Cp S 00090 ! %lC bows. "%p-sama, tell us of your search for the Amulet." %E %Cc S 00091 "Ah, %p-sama. You have wasted your efforts returning home. *************** *** 2144,2150 **** %Cc T 00010 "Is it really you, %p! I had given up hope for your return. As you can %x, we are desperately in need of your talents. Someone must ! defeat the %n if our town is become what it once was. "Let me see if you are ready to be that someone." %E --- 2144,2150 ---- %Cc T 00010 "Is it really you, %p! I had given up hope for your return. As you can %x, we are desperately in need of your talents. Someone must ! defeat %n if our town is become what it once was. "Let me see if you are ready to be that someone." %E *************** *** 2181,2187 **** "But now your kinfolk and I must ask you to put aside your travels and help us in our time of need. After you left us we elected a new mayor, ! the %n. He proved to be a most heinous and vile creature. "Soon after taking office he absconded with %o and fled town, leaving behind his henchmen to rule over us. In order --- 2181,2187 ---- "But now your kinfolk and I must ask you to put aside your travels and help us in our time of need. After you left us we elected a new mayor, ! %n. He proved to be a most heinous and vile creature. "Soon after taking office he absconded with %o and fled town, leaving behind his henchmen to rule over us. In order *************** *** 2192,2198 **** that all will be lost. Let us both pray now that %d will guide you and keep you safe." %Cp T 00020 ! "Do not be fooled by the false promises of the %n." %E %Cp T 00021 "To enter %i you must pass many traps." --- 2192,2198 ---- that all will be lost. Let us both pray now that %d will guide you and keep you safe." %Cp T 00020 ! "Do not be fooled by the false promises of %n." %E %Cp T 00021 "To enter %i you must pass many traps." *************** *** 2205,2214 **** "Do not be afraid to call upon %d if you truly need help." %E %Cp T 00024 ! "If you do not destroy the %n, he will follow you back here!" %E %Cp T 00025 ! "Take %o from the %n and you may be able to defeat him." %E %Cp T 00026 --- 2205,2214 ---- "Do not be afraid to call upon %d if you truly need help." %E %Cp T 00024 ! "If you do not destroy %n, he will follow you back here!" %E %Cp T 00025 ! "Take %o from %n and you may be able to defeat him." %E %Cp T 00026 *************** *** 2226,2235 **** %E %Cp T 00030 Only your faith in %d keeps you from trembling. You %x ! the handiwork of the %n's henchlings everywhere. %E %Cp T 00031 ! You know that this time you must find and destroy the %n. %E %Cp T 00040 You sense the presence of %o. --- 2226,2235 ---- %E %Cp T 00030 Only your faith in %d keeps you from trembling. You %x ! the handiwork of %ns henchlings everywhere. %E %Cp T 00031 ! You know that this time you must find and destroy %n. %E %Cp T 00040 You sense the presence of %o. *************** *** 2289,2295 **** hope to defeat me." %E %Cp T 00067 ! "The %n has never been defeated, NEVER!" %E %Cp T 00068 "Are you truly the best %H has to send against me? --- 2289,2295 ---- hope to defeat me." %E %Cp T 00067 ! "%nC has never been defeated, NEVER!" %E %Cp T 00068 "Are you truly the best %H has to send against me? *************** *** 2350,2359 **** that should not be able to live in this environment moving towards you. %E %Cp V 00002 ! Once again, you are near the abode of the %l. %E %Cp V 00003 ! Again you materialize near the %l's abode. You have a nagging feeling that this may be the last time you come here. %E %Cp V 00005 --- 2350,2359 ---- that should not be able to live in this environment moving towards you. %E %Cp V 00002 ! Once again, you are near the abode of %l. %E %Cp V 00003 ! Again you materialize near %ls abode. You have a nagging feeling that this may be the last time you come here. %E %Cp V 00005 *************** *** 2363,2369 **** "May %d guide your steps, %p." %E %Cp V 00007 ! "The %l weakens. Without %o, her foresight is dim." %E %Cp V 00008 "You must hurry, %p, else Ragnarok may well come." --- 2363,2369 ---- "May %d guide your steps, %p." %E %Cp V 00007 ! "%lC weakens. Without %o, her foresight is dim." %E %Cp V 00008 "You must hurry, %p, else Ragnarok may well come." *************** *** 2393,2399 **** %E %Cc V 00014 "I see you and %n fighting, %p. But you are not prepared and ! shall die at %n's hand if you proceed. No. This will not do. Go back out into the world, and grow more experienced at the ways of war. Only when you have returned %Ra will you be able to defeat %n." --- 2393,2399 ---- %E %Cc V 00014 "I see you and %n fighting, %p. But you are not prepared and ! shall die at %ns hand if you proceed. No. This will not do. Go back out into the world, and grow more experienced at the ways of war. Only when you have returned %Ra will you be able to defeat %n." *************** *** 2421,2427 **** unless %o is returned into my care, %n may start Ragnarok. "You must find the entrance to %i. Travel downward ! from there and you will find %n's lair. Defeat him and return %o to me." %E %Cp V 00020 --- 2421,2427 ---- unless %o is returned into my care, %n may start Ragnarok. "You must find the entrance to %i. Travel downward ! from there and you will find %ns lair. Defeat him and return %o to me." %E %Cp V 00020 *************** *** 2468,2480 **** %Cc V 00040 Through clouds of sulphurous gasses, you %x a rock palisade surrounded with a moat of bubbling lava. You remember the description ! from something that the %l said. This is the lair of %n. %E %Cp V 00041 ! Once again, you stand in sight of %n's lair. %E %Cc V 00050 ! "So! The %l has finally sent %ca to challenge me! "I thought that mastering %o would enable me to challenge %d, but it has shown me that first I must kill you! --- 2468,2480 ---- %Cc V 00040 Through clouds of sulphurous gasses, you %x a rock palisade surrounded with a moat of bubbling lava. You remember the description ! from something that %l said. This is the lair of %n. %E %Cp V 00041 ! Once again, you stand in sight of %ns lair. %E %Cc V 00050 ! "So! %lC has finally sent %ca to challenge me! "I thought that mastering %o would enable me to challenge %d, but it has shown me that first I must kill you! *************** *** 2500,2506 **** "With you out of the way, Valhalla will be mine for the taking." %E %Cp V 00063 ! "I killed scores of %d's best when I took %o. Do you really think that one %c can stand against me?" %E %Cp V 00064 --- 2500,2506 ---- "With you out of the way, Valhalla will be mine for the taking." %E %Cp V 00063 ! "I killed scores of %ds best when I took %o. Do you really think that one %c can stand against me?" %E %Cp V 00064 *************** *** 2525,2547 **** As you pick up %o, your mind is suddenly filled with images, and you perceive all of the possibilities of each potential choice you could make. As you begin to control and channel your thoughts, you ! realize that you must return %o to the %l immediately. %E %Cc V 00080 ! A look of surprise and horror appears on %n's face. No!!! %o has lied to me! I have been misled! Suddenly, %n grasps his head and screams in agony, then dies. %E %Cc V 00081 ! As you approach, the %l rises and touches %o. "You may take %o with you, %p. I have removed from it the power to foretell the future, for that power no mortal should have. Its other abilities, however, you have at your disposal. ! "You must now begin in %d's name to search for the Amulet of Yendor. May your steps be guided by %d, my %S." %E %Cp V 00090 --- 2525,2547 ---- As you pick up %o, your mind is suddenly filled with images, and you perceive all of the possibilities of each potential choice you could make. As you begin to control and channel your thoughts, you ! realize that you must return %o to %lC immediately. %E %Cc V 00080 ! A look of surprise and horror appears on %ns face. No!!! %o has lied to me! I have been misled! Suddenly, %n grasps his head and screams in agony, then dies. %E %Cc V 00081 ! As you approach, %lC rises and touches %o. "You may take %o with you, %p. I have removed from it the power to foretell the future, for that power no mortal should have. Its other abilities, however, you have at your disposal. ! "You must now begin in %ds name to search for the Amulet of Yendor. May your steps be guided by %d, my %S." %E %Cp V 00090 *************** *** 2563,2569 **** %Cc W 00001 You are suddenly in familiar surroundings. You notice what appears to be a large, squat stone structure nearby. Wait! That looks like the ! tower of your old master, the %l. However, things are not the same as when you were last here. Mists and areas of unexplained darkness surround the tower. There is movement in --- 2563,2569 ---- %Cc W 00001 You are suddenly in familiar surroundings. You notice what appears to be a large, squat stone structure nearby. Wait! That looks like the ! tower of your old master, %l. However, things are not the same as when you were last here. Mists and areas of unexplained darkness surround the tower. There is movement in *************** *** 2586,2599 **** "Ah, the spell to create the magic portal worked. Outstanding!" %E %Cp W 00007 ! "Hurry! The %l may not survive that casting of the portal spell!!" %E %Cp W 00008 "We must strive to return balance to the world, or all is lost." %E %Cp W 00009 ! "I, too, will venture into the world, because the %n is but one of many evils to be vanquished." %E %Cc W 00010 --- 2586,2599 ---- "Ah, the spell to create the magic portal worked. Outstanding!" %E %Cp W 00007 ! "Hurry! %lC may not survive that casting of the portal spell!!" %E %Cp W 00008 "We must strive to return balance to the world, or all is lost." %E %Cp W 00009 ! "I, too, will venture into the world, because %n is but one of many evils to be vanquished." %E %Cc W 00010 *************** *** 2623,2629 **** %Cc W 00015 "You amaze me, %p! How many times did I tell you that Balance requires care. One must use the world with care, lest one leave it in ruins ! and simplify the task of the %n. "You must go back and show your worthiness. Do not return until you are truly ready for this quest. May %d guide you in this task." --- 2623,2629 ---- %Cc W 00015 "You amaze me, %p! How many times did I tell you that Balance requires care. One must use the world with care, lest one leave it in ruins ! and simplify the task of %n. "You must go back and show your worthiness. Do not return until you are truly ready for this quest. May %d guide you in this task." *************** *** 2634,2675 **** carefully, for what I tell you now will be of vital importance. "Since you left us to hone your skills in the world, we unexpectedly came ! under attack by the forces of the %n. As you know, we thought ! the %n had perished at the end of the last age, but, alas, this was not the case. ! "The %n sent an army of abominations against us. Among them was a minion, mindless and ensorcelled, and thus, in the confusion, it was able to penetrate our defenses. Alas, this creature has stolen %o and I fear it has delivered %o ! to the %n. "Over the years, I had woven most of my power into this amulet, and thus, without it, I have but a shadow of my former power, and I fear that I shall soon perish. "You must travel to %i, and within its dungeons, ! find and overcome the %n, and return %o to me. "Go now, with %d, and return Balance to the world." %Cp W 00020 ! "Beware, for the %n is immune to most magical attacks." %E %Cp W 00021 "To enter %i you must pass many traps." %E %Cp W 00022 ! "The %n may be vulnerable to physical attacks." %E %Cp W 00023 "%d will come to your aid when you call." %E %Cp W 00024 ! "You must utterly destroy the %n. He will pursue you otherwise." %E %Cp W 00025 "%oC is a mighty artifact. With it you can ! destroy the %n." %E %Cp W 00026 "Go forth with the blessings of %d." --- 2634,2675 ---- carefully, for what I tell you now will be of vital importance. "Since you left us to hone your skills in the world, we unexpectedly came ! under attack by the forces of %n. As you know, we thought ! %n had perished at the end of the last age, but, alas, this was not the case. ! "%nC sent an army of abominations against us. Among them was a minion, mindless and ensorcelled, and thus, in the confusion, it was able to penetrate our defenses. Alas, this creature has stolen %o and I fear it has delivered %o ! to %n. "Over the years, I had woven most of my power into this amulet, and thus, without it, I have but a shadow of my former power, and I fear that I shall soon perish. "You must travel to %i, and within its dungeons, ! find and overcome %n, and return %o to me. "Go now, with %d, and return Balance to the world." %Cp W 00020 ! "Beware, for %n is immune to most magical attacks." %E %Cp W 00021 "To enter %i you must pass many traps." %E %Cp W 00022 ! "%nC may be vulnerable to physical attacks." %E %Cp W 00023 "%d will come to your aid when you call." %E %Cp W 00024 ! "You must utterly destroy %n. He will pursue you otherwise." %E %Cp W 00025 "%oC is a mighty artifact. With it you can ! destroy %n." %E %Cp W 00026 "Go forth with the blessings of %d." *************** *** 2684,2690 **** "You will know when %o is near. Proceed with care!" %E %Cp W 00030 ! Wisps of fog swirl nearby. You feel that the %n's lair is close. %E %Cp W 00031 You believe that you may once again invade %i. --- 2684,2690 ---- "You will know when %o is near. Proceed with care!" %E %Cp W 00030 ! Wisps of fog swirl nearby. You feel that %ns lair is close. %E %Cp W 00031 You believe that you may once again invade %i. *************** *** 2696,2703 **** The aura of %o tingles at the edge of your perception. %E %Cc W 00050 ! "Ah, I recognize you, %p. So, the %l has sent you to steal ! %o from me, hmmm? Well, the %l is a fool to send such a mental weakling against me. "Your destruction, however, should make for good sport. In the end, you --- 2696,2703 ---- The aura of %o tingles at the edge of your perception. %E %Cc W 00050 ! "Ah, I recognize you, %p. So, %l has sent you to steal ! %o from me, hmmm? Well, %l is a fool to send such a mental weakling against me. "Your destruction, however, should make for good sport. In the end, you *************** *** 2725,2731 **** "When you are defeated, your torment will last for a thousand years." %E %Cp W 00062 ! "After your downfall, %p, I shall devour the %l for dessert!" %E %Cp W 00063 --- 2725,2731 ---- "When you are defeated, your torment will last for a thousand years." %E %Cp W 00062 ! "After your downfall, %p, I shall devour %l for dessert!" %E %Cp W 00063 *************** *** 2744,2750 **** "A mere %r is nothing compared to my skill!" %E %Cp W 00068 ! "So, you are the best hope of the %l? How droll." %E %Cp W 00069 "Feel my power, %c! My victory is imminent!" --- 2744,2750 ---- "A mere %r is nothing compared to my skill!" %E %Cp W 00068 ! "So, you are the best hope of %l? How droll." %E %Cp W 00069 "Feel my power, %c! My victory is imminent!" *************** *** 2754,2774 **** with new energy. You feel as if you can detect others' thoughts flowing through it. Although you yearn to wear %o and attack the Wizard of Yendor, you know you must return it to its ! rightful owner, the %l. %E %Cc W 00080 ! The %n croaks out, as his body begins to shrivel up: I shall haunt your progress until the end of time. A thousand ! curses on you and the %l. Then, the body bursts into a cloud of choking dust, and blows away. %E %Cc W 00081 ! The %l notices %o in your possession, beams at you and says: ! I knew you could defeat the %n and retrieve %o. We shall never forget this brave service. --- 2754,2774 ---- with new energy. You feel as if you can detect others' thoughts flowing through it. Although you yearn to wear %o and attack the Wizard of Yendor, you know you must return it to its ! rightful owner, %l. %E %Cc W 00080 ! %nC croaks out, as his body begins to shrivel up: I shall haunt your progress until the end of time. A thousand ! curses on you and %l. Then, the body bursts into a cloud of choking dust, and blows away. %E %Cc W 00081 ! %lC notices %o in your possession, beams at you and says: ! I knew you could defeat %n and retrieve %o. We shall never forget this brave service. *************** *** 2954,2957 **** --- 2954,2960 ---- C suffix: return capitalized(root); p suffix: return makeplural(root); P suffix: return makeplural(capitalized(root)); + s suffix: return s_suffix(root); + S suffix: return s_suffix(capitalized(root)); + t suffix: return strip_the_prefix(root); %E *** Old/dat/rumors.tru Tue Dec 10 16:36:01 1996 --- dat/rumors.tru Thu Jun 13 17:03:21 1996 *************** *** 57,62 **** --- 57,63 ---- Expensive cameras have penetrating flash lights. Extra staircases lead to extra levels. Fiery letters might deter monsters. + For a good time engrave `Elbereth'. Gems are too precious to be thrown away carelessly. Getting hungry? Stop wearing rings! Getting too warm? Take off that Amulet of Yendor and stay away from the exit! *************** *** 208,214 **** They say that escaping a dungeon is only the beginning of the end. They say that feeling an unexpected draft of air is sort of a breakthrough. They say that finding a cursed gray stone is always bad luck. - They say that for a good time engrave `Elbereth'. They say that gaining a level is an experience that can raise your sights. They say that garter snake meat rarely tastes good but it's still healthy. They say that gauntlets of dexterity have a hidden enchanted touch. --- 209,214 ---- *** Old/dat/yendor.des Tue Dec 10 16:36:08 1996 --- dat/yendor.des Mon Oct 21 22:12:58 1996 *************** *** 1,4 **** ! # SCCS Id: @(#)yendor.des 3.2 94/08/20 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1992 by M. Stephenson and Izchak Miller # NetHack may be freely redistributed. See license for details. --- 1,4 ---- ! # SCCS Id: @(#)yendor.des 3.2 96/10/20 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1992 by M. Stephenson and Izchak Miller # NetHack may be freely redistributed. See license for details. *************** *** 230,236 **** STAIR:levregion(01,00,79,20),(0,0,8,7),up STAIR:levregion(01,00,79,20),(0,0,8,7),down BRANCH:levregion(01,00,79,20),(0,0,8,7) ! TELEPORT_REGION:levregion(01,00,79,20),(1,1,7,7) PORTAL:(4,4,4,4),(0,0,0,0),"wizard3" MAZEWALK:(08,05),east REGION:(04,03,06,06),unlit,"ordinary",unfilled,true --- 230,236 ---- STAIR:levregion(01,00,79,20),(0,0,8,7),up STAIR:levregion(01,00,79,20),(0,0,8,7),down BRANCH:levregion(01,00,79,20),(0,0,8,7) ! TELEPORT_REGION:levregion(01,00,79,20),(2,2,6,6) PORTAL:(4,4,4,4),(0,0,0,0),"wizard3" MAZEWALK:(08,05),east REGION:(04,03,06,06),unlit,"ordinary",unfilled,true *************** *** 259,265 **** STAIR:levregion(01,00,79,20),(0,0,8,7),up STAIR:levregion(01,00,79,20),(0,0,8,7),down BRANCH:levregion(01,00,79,20),(0,0,8,7) ! TELEPORT_REGION:levregion(01,00,79,20),(1,1,7,7) MAZEWALK:(08,05),east REGION:(04,03,06,06),unlit,"ordinary",unfilled,true MONSTER:'L',random,(04,04) --- 259,265 ---- STAIR:levregion(01,00,79,20),(0,0,8,7),up STAIR:levregion(01,00,79,20),(0,0,8,7),down BRANCH:levregion(01,00,79,20),(0,0,8,7) ! TELEPORT_REGION:levregion(01,00,79,20),(2,2,6,6) MAZEWALK:(08,05),east REGION:(04,03,06,06),unlit,"ordinary",unfilled,true MONSTER:'L',random,(04,04) *** Old/doc/window.doc Tue Dec 10 16:36:52 1996 --- doc/window.doc Mon Jun 17 19:28:33 1996 *************** *** 206,212 **** should be interpreted, and *argcp and *argv should be changed to remove those arguments. -- When the message window is created, the variable ! flags.window_inited needs to be set to TRUE. Otherwise all plines() will be done via raw_print(). ** Why not have init_nhwindows() create all of the "standard" ** windows? Or at least all but WIN_INFO? -dean --- 206,212 ---- should be interpreted, and *argcp and *argv should be changed to remove those arguments. -- When the message window is created, the variable ! iflags.window_inited needs to be set to TRUE. Otherwise all plines() will be done via raw_print(). ** Why not have init_nhwindows() create all of the "standard" ** windows? Or at least all but WIN_INFO? -dean *************** *** 386,392 **** requires the variable "char toplines[]" be defined; Every putstr() on WIN_MESSAGE must copy str to toplines[] for use by Norep() and pline(). If the window system is not active ! (!flags.window_inited) pline() uses raw_print(). V. Game startup --- 386,392 ---- requires the variable "char toplines[]" be defined; Every putstr() on WIN_MESSAGE must copy str to toplines[] for use by Norep() and pline(). If the window system is not active ! (!iflags.window_inited) pline() uses raw_print(). V. Game startup *** Old/include/beconf.h Tue Dec 10 16:37:11 1996 --- include/beconf.h Sun Oct 27 19:33:00 1996 *************** *** 8,15 **** #define BECONF_H /* - * This header works for BeOS 1.1d7 - * * We must use UNWIDENED_PROTOTYPES because we mix C++ and C. */ --- 8,13 ---- *** Old/include/config.h Tue Dec 10 17:02:08 1996 --- include/config.h Tue Dec 10 16:43:58 1996 *************** *** 55,61 **** #endif #ifdef __MWERKS__ /* defined by Metrowerks compiler */ ! # ifndef __beos__ /* BeOS */ # define MAC # endif # define NEED_VARARGS --- 55,61 ---- #endif #ifdef __MWERKS__ /* defined by Metrowerks compiler */ ! # ifndef __BEOS__ /* BeOS */ # define MAC # endif # define NEED_VARARGS *************** *** 113,118 **** --- 113,119 ---- #ifdef WIN32 # undef UNIX # undef MSDOS + # define STRNCMPI #endif /* *************** *** 237,243 **** # define DEFAULT_WINDOW_SYS "tty" #endif ! #ifdef __beos__ /* leave at tty graphics for now */ /* # define DEFAULT_WINDOW_SYS "be" */ #endif --- 238,244 ---- # define DEFAULT_WINDOW_SYS "tty" #endif ! #ifdef __BEOS__ /* leave at tty graphics for now */ /* # define DEFAULT_WINDOW_SYS "be" */ #endif *** Old/include/extern.h Tue Dec 10 16:37:46 1996 --- include/extern.h Mon Dec 9 10:37:13 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)extern.h 3.2 96/05/05 */ /* Copyright (c) Steve Creps, 1988. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)extern.h 3.2 96/10/21 */ /* Copyright (c) Steve Creps, 1988. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 14,20 **** #endif E char *FDECL(fmt_ptr, (const genericptr,char *)); ! /* This next pre-processor directive covers almost the entire file, * interrupted only occasionally to pick up specific functions as needed. */ #if !defined(MAKEDEFS_C) && !defined(LEV_LEX_C) --- 14,20 ---- #endif E char *FDECL(fmt_ptr, (const genericptr,char *)); ! /* This next pre-processor directive covers almost the entire file, * interrupted only occasionally to pick up specific functions as needed. */ #if !defined(MAKEDEFS_C) && !defined(LEV_LEX_C) *************** *** 203,209 **** E void FDECL(use_crystal_ball, (struct obj *)); E void NDECL(do_mapping); E void NDECL(do_vicinity_map); ! E int FDECL(exposed_sdoor_mask, (struct rm *)); #ifdef USE_TRAMPOLI E void FDECL(findone, (int,int,genericptr_t)); E void FDECL(openone, (int,int,genericptr_t)); --- 203,209 ---- E void FDECL(use_crystal_ball, (struct obj *)); E void NDECL(do_mapping); E void NDECL(do_vicinity_map); ! E void FDECL(cvt_sdoor_to_door, (struct rm *)); #ifdef USE_TRAMPOLI E void FDECL(findone, (int,int,genericptr_t)); E void FDECL(openone, (int,int,genericptr_t)); *************** *** 323,329 **** #ifdef REINCARNATION E const char *NDECL(roguename); #endif ! E struct obj *FDECL(replobj, (struct obj *, int, genericptr_t, int, const char *)); /* ### do_wear.c ### */ --- 323,329 ---- #ifdef REINCARNATION E const char *NDECL(roguename); #endif ! E struct obj *FDECL(replobj, (struct obj *, int, genericptr_t, int, const char *)); /* ### do_wear.c ### */ *************** *** 715,720 **** --- 715,721 ---- E struct obj *FDECL(display_minventory,(struct monst *,int)); E int NDECL(dotypeinv); E int NDECL(dolook); + E void FDECL(feel_cockatrice, (struct obj *,BOOLEAN_P)); E void FDECL(stackobj, (struct obj *)); E int NDECL(doprgold); E int NDECL(doprwep); *************** *** 730,743 **** /* ### ioctl.c ### */ ! #if defined(UNIX) || defined(__beos__) E void NDECL(getwindowsz); E void NDECL(getioctls); E void NDECL(setioctls); # ifdef SUSPEND E int NDECL(dosuspend); # endif /* SUSPEND */ ! #endif /* UNIX || __beos__ */ /* ### light.c ### */ --- 731,744 ---- /* ### ioctl.c ### */ ! #if defined(UNIX) || defined(__BEOS__) E void NDECL(getwindowsz); E void NDECL(getioctls); E void NDECL(setioctls); # ifdef SUSPEND E int NDECL(dosuspend); # endif /* SUSPEND */ ! #endif /* UNIX || __BEOS__ */ /* ### light.c ### */ *************** *** 1010,1015 **** --- 1011,1017 ---- E void FDECL(monfree, (struct monst *)); E void FDECL(replmon, (struct monst *,struct monst *)); E void FDECL(relmon, (struct monst *)); + E struct obj *FDECL(mlifesaver, (struct monst *)); E void FDECL(mondead, (struct monst *)); E void FDECL(mondied, (struct monst *)); E void FDECL(mongone, (struct monst *)); *************** *** 1223,1228 **** --- 1225,1232 ---- E char *FDECL(the, (const char *)); E char *FDECL(aobjnam, (struct obj *,const char *)); E char *FDECL(Doname2, (struct obj *)); + E char *FDECL(yname, (struct obj *)); + E char *FDECL(Yname2, (struct obj *)); E char *FDECL(makeplural, (const char *)); E char *FDECL(makesingular, (const char *)); E struct obj *FDECL(readobjnam, (char *)); *************** *** 1276,1282 **** E void VDECL(msmsg, (const char *,...)); # endif E FILE *FDECL(fopenp, (const char *,const char *)); - E void FDECL(msexit, (int)); #endif /* MICRO */ /* ### pctty.c ### */ --- 1280,1285 ---- *************** *** 1403,1409 **** E char FDECL(temple_occupied, (char *)); E int FDECL(pri_move, (struct monst *)); E void FDECL(priestini, (d_level *,struct mkroom *,int,int,BOOLEAN_P)); ! E char *FDECL(priestname, (struct monst *)); E boolean FDECL(p_coaligned, (struct monst *)); E struct monst *FDECL(findpriest, (CHAR_P)); E void FDECL(intemple, (int)); --- 1406,1412 ---- E char FDECL(temple_occupied, (char *)); E int FDECL(pri_move, (struct monst *)); E void FDECL(priestini, (d_level *,struct mkroom *,int,int,BOOLEAN_P)); ! E char *FDECL(priestname, (struct monst *,char *)); E boolean FDECL(p_coaligned, (struct monst *)); E struct monst *FDECL(findpriest, (CHAR_P)); E void FDECL(intemple, (int)); *************** *** 1731,1737 **** E void FDECL(grease_protect, (struct obj *,const char *,BOOLEAN_P)); E struct trap *FDECL(maketrap, (int,int,int)); E void FDECL(fall_through, (BOOLEAN_P)); ! E void FDECL(activate_statue_trap, (struct trap *,XCHAR_P,XCHAR_P)); E void FDECL(dotrap, (struct trap *)); E void FDECL(seetrap, (struct trap *)); E int FDECL(mintrap, (struct monst *)); --- 1734,1741 ---- E void FDECL(grease_protect, (struct obj *,const char *,BOOLEAN_P)); E struct trap *FDECL(maketrap, (int,int,int)); E void FDECL(fall_through, (BOOLEAN_P)); ! E struct monst *FDECL(activate_statue_trap, ! (struct trap *,XCHAR_P,XCHAR_P,BOOLEAN_P)); E void FDECL(dotrap, (struct trap *)); E void FDECL(seetrap, (struct trap *)); E int FDECL(mintrap, (struct monst *)); *************** *** 1784,1797 **** /* ### unixtty.c ### */ ! #if defined(UNIX) || defined(__beos__) E void NDECL(gettty); E void FDECL(settty, (const char *)); E void NDECL(setftty); E void NDECL(intron); E void NDECL(introff); E void VDECL(error, (const char *,...)) PRINTF_F(1,2); ! #endif /* UNIX || __beos__ */ /* ### unixunix.c ### */ --- 1788,1801 ---- /* ### unixtty.c ### */ ! #if defined(UNIX) || defined(__BEOS__) E void NDECL(gettty); E void FDECL(settty, (const char *)); E void NDECL(setftty); E void NDECL(intron); E void NDECL(introff); E void VDECL(error, (const char *,...)) PRINTF_F(1,2); ! #endif /* UNIX || __BEOS__ */ /* ### unixunix.c ### */ *************** *** 1825,1831 **** #ifdef MICRO E boolean FDECL(comp_times, (long)); #endif ! E boolean FDECL(check_version, (unsigned long *,const char *,BOOLEAN_P)); /* ### video.c ### */ --- 1829,1836 ---- #ifdef MICRO E boolean FDECL(comp_times, (long)); #endif ! E boolean FDECL(check_version, (struct version_info *, ! const char *,BOOLEAN_P)); /* ### video.c ### */ *************** *** 1835,1840 **** --- 1840,1846 ---- E void NDECL(gr_init); E void NDECL(gr_finish); # endif + E void FDECL(tileview,(BOOLEAN_P)); #endif #ifdef VIDEOSHADES E int FDECL(assign_videoshades, (char *)); *************** *** 1946,1953 **** E int NDECL(enhance_weapon_skill); E void FDECL(unrestrict_weapon_skill, (int)); E void FDECL(use_skill, (int)); ! E void NDECL(add_weapon_skill); ! E void NDECL(lose_weapon_skill); E int FDECL(weapon_type, (struct obj *)); E int FDECL(weapon_hit_bonus, (struct obj *)); E int FDECL(weapon_dam_bonus, (struct obj *)); --- 1952,1959 ---- E int NDECL(enhance_weapon_skill); E void FDECL(unrestrict_weapon_skill, (int)); E void FDECL(use_skill, (int)); ! E void FDECL(add_weapon_skill, (int)); ! E void FDECL(lose_weapon_skill, (int)); E int FDECL(weapon_type, (struct obj *)); E int FDECL(weapon_hit_bonus, (struct obj *)); E int FDECL(weapon_dam_bonus, (struct obj *)); *************** *** 1960,1965 **** --- 1966,1972 ---- E void FDECL(new_were, (struct monst *)); E boolean FDECL(were_summon, (struct permonst *,BOOLEAN_P)); E void NDECL(you_were); + E void FDECL(you_unwere, (BOOLEAN_P)); /* ### wield.c ### */ *************** *** 1969,1975 **** E void FDECL(erode_weapon, (BOOLEAN_P)); E int FDECL(chwepon, (struct obj *,int)); E int FDECL(welded, (struct obj *)); ! E void FDECL(weldmsg, (struct obj *,BOOLEAN_P)); /* ### windows.c ### */ --- 1976,1982 ---- E void FDECL(erode_weapon, (BOOLEAN_P)); E int FDECL(chwepon, (struct obj *,int)); E int FDECL(welded, (struct obj *)); ! E void FDECL(weldmsg, (struct obj *)); /* ### windows.c ### */ *** Old/include/flag.h Tue Dec 10 16:37:52 1996 --- include/flag.h Sat Oct 26 14:52:59 1996 *************** *** 1,13 **** ! /* SCCS Id: @(#)flag.h 3.2 96/05/26 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ ! /* If you change this file make sure you increment EDITLEVEL in */ ! /* patchlevel.h if needed. */ #ifndef FLAG_H #define FLAG_H struct flag { #ifdef AMIFLUSH boolean altmeta; /* use ALT keys as META */ --- 1,19 ---- ! /* SCCS Id: @(#)flag.h 3.2 96/06/17 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ ! /* If you change the flag structure make sure you increment EDITLEVEL in */ ! /* patchlevel.h if needed. Changing the instance_flags structure does */ ! /* not require incrementing EDITLEVEL. */ #ifndef FLAG_H #define FLAG_H + /* + * Persistent flags that are saved and restored with the game. + * + */ + struct flag { #ifdef AMIFLUSH boolean altmeta; /* use ALT keys as META */ *************** *** 20,36 **** #ifdef MAIL boolean biff; /* enable checking for mail */ #endif - #ifdef MICRO - boolean BIOS; /* use IBM or ST BIOS calls when appropriate */ - #endif boolean botl; /* partially redo status line */ boolean botlx; /* print an entirely new bottom line */ - boolean cbreak; /* in cbreak mode, rogue format */ boolean confirm; /* confirm before hitting tame monsters */ boolean debug; /* in debugging mode */ #define wizard flags.debug - boolean DECgraphics; /* use DEC VT-xxx extended character set */ - boolean echo; /* 1 to echo characters */ boolean end_own; /* list all own scores */ boolean explore; /* in exploration mode */ #ifdef OPT_DISPMAP --- 26,36 ---- *************** *** 40,46 **** boolean female; boolean friday13; /* it's Friday the 13th */ boolean help; /* look in data file for info about stuff */ - boolean IBMgraphics; /* use IBM extended character set */ boolean ignintr; /* ignore interrupts */ #ifdef INSURANCE boolean ins_chkpt; /* checkpoint as appropriate */ --- 40,45 ---- *************** *** 53,62 **** boolean move; boolean mv; boolean nap; /* `timed_delay' option for display effects */ - boolean news; /* print news */ boolean nopick; /* do not pickup objects (as when running) */ boolean null; /* OK to send nulls to the terminal */ - boolean num_pad; /* use numbers for movement commands */ #ifdef MAC boolean page_wait; /* put up a --More-- after a page of messages */ #endif --- 52,59 ---- *************** *** 66,79 **** boolean popup_dialog; /* put queries in pop up dialogs instead of in the message window */ #endif - #ifdef MICRO - boolean rawio; /* Whether can use rawio (IOCTL call) */ - #endif boolean rest_on_space; /* space means rest */ boolean safe_dog; /* give complete protection to the dog */ - #ifdef WIZARD - boolean sanity_check; /* run sanity checks */ - #endif #ifdef EXP_ON_BOTL boolean showexp; /* show experience points */ #endif --- 63,70 ---- *************** *** 87,105 **** boolean time; /* display elapsed 'time' */ boolean tombstone; /* print tombstone */ boolean toptenwin; /* ending list in window instead of stdout */ - #ifdef TEXTCOLOR - boolean use_color; /* use color graphics */ - boolean hilite_pet; /* hilight pets on monochome displays */ - #endif boolean verbose; /* max battle info */ - boolean window_inited; /* true if init_nhwindows() completed */ int end_top, end_around; /* describe desired score list */ unsigned ident; /* social security number for each monster */ unsigned moonphase; #define NEW_MOON 0 #define FULL_MOON 4 - unsigned msg_history; /* hint: # of top lines to save */ unsigned no_of_wizards; /* 0, 1 or 2 (wizard and his shadow) */ unsigned run; /* 0: h (etc), 1: H (etc), 2: fh (etc) */ /* 3: FH, 4: ff+, 5: ff-, 6: FF+, 7: FF- */ --- 78,90 ---- *************** *** 108,124 **** char pickup_types[MAXOCLASSES]; char end_disclose[5]; /* disclose various info upon exit */ char menu_style; /* User interface style setting */ #ifdef MAC_GRAPHICS_ENV boolean large_font; /* draw in larger fonts (say, 12pt instead of 9pt) */ boolean MACgraphics; /* use Macintosh extended character set, as as defined in the special font HackFont */ #endif ! #ifdef AMII_GRAPHICS ! int numcols; ! unsigned short amii_dripens[ 20 ]; /* DrawInfo Pens currently there are 13 in v39 */ ! AMII_COLOR_TYPE amii_curmap[ AMII_MAXCOLORS ]; /* colormap */ ! #endif #ifdef MSDOS boolean hasvga; /* has a vga adapter */ boolean usevga; /* use the vga adapter */ --- 93,142 ---- char pickup_types[MAXOCLASSES]; char end_disclose[5]; /* disclose various info upon exit */ char menu_style; /* User interface style setting */ + #ifdef AMII_GRAPHICS + int numcols; + unsigned short amii_dripens[ 20 ]; /* DrawInfo Pens currently there are 13 in v39 */ + AMII_COLOR_TYPE amii_curmap[ AMII_MAXCOLORS ]; /* colormap */ + #endif + + }; + + /* + * Flags that are set each time the game is started. + * These are not saved with the game. + * + */ + + struct instance_flags { + #ifdef MICRO + boolean rawio; /* Whether can use rawio (IOCTL call) */ + #endif + #ifdef MICRO + boolean BIOS; /* use IBM or ST BIOS calls when appropriate */ + #endif + + #ifdef TEXTCOLOR + boolean use_color; /* use color graphics */ + boolean hilite_pet; /* hilight pets on monochome displays */ + #endif + #ifdef WIZARD + boolean sanity_check; /* run sanity checks */ + #endif #ifdef MAC_GRAPHICS_ENV boolean large_font; /* draw in larger fonts (say, 12pt instead of 9pt) */ boolean MACgraphics; /* use Macintosh extended character set, as as defined in the special font HackFont */ #endif ! ! boolean cbreak; /* in cbreak mode, rogue format */ ! boolean DECgraphics; /* use DEC VT-xxx extended character set */ ! boolean echo; /* 1 to echo characters */ ! boolean IBMgraphics; /* use IBM extended character set */ ! unsigned msg_history; /* hint: # of top lines to save */ ! boolean num_pad; /* use numbers for movement commands */ ! boolean news; /* print news */ ! boolean window_inited; /* true if init_nhwindows() completed */ #ifdef MSDOS boolean hasvga; /* has a vga adapter */ boolean usevga; /* use the vga adapter */ *************** *** 128,143 **** boolean usevesa; boolean grmode; /* currently in graphics mode */ #endif - #if defined(MSDOS) || defined(WIN32) boolean hassound; /* has a sound card */ boolean usesound; /* use the sound card */ boolean usepcspeaker; /* use the pc speaker */ boolean preload_tiles; /* preload the tiles into RAM */ #endif }; - extern NEARDATA struct flag flags; #endif /* FLAG_H */ --- 146,163 ---- boolean usevesa; boolean grmode; /* currently in graphics mode */ #endif #if defined(MSDOS) || defined(WIN32) boolean hassound; /* has a sound card */ boolean usesound; /* use the sound card */ boolean usepcspeaker; /* use the pc speaker */ boolean preload_tiles; /* preload the tiles into RAM */ + boolean tile_view; + boolean over_view; + boolean traditional_view; #endif }; extern NEARDATA struct flag flags; + extern NEARDATA struct instance_flags iflags; #endif /* FLAG_H */ *** Old/include/global.h Tue Dec 10 16:37:56 1996 --- include/global.h Mon Nov 25 18:52:52 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)global.h 3.2 96/03/28 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)global.h 3.2 96/06/22 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 168,174 **** #include "macconf.h" #endif ! #if defined(__beos__) && !defined(BECONF_H) #include "beconf.h" #endif --- 168,174 ---- #include "macconf.h" #endif ! #if defined(__BEOS__) && !defined(BECONF_H) #include "beconf.h" #endif *************** *** 217,225 **** # endif #endif ! #if defined(MICRO) && !defined(AMIGA) && !defined(TOS) && !defined(OS2_HPFS) #define SHORT_FILENAMES /* filenames are 8.3 */ #endif /* * This must follow the include of macconf.h because EXIT_SUCCESS is defined --- 217,227 ---- # endif #endif ! #if defined(MICRO) ! #if !defined(AMIGA) && !defined(TOS) && !defined(OS2_HPFS) && !defined(WIN32) #define SHORT_FILENAMES /* filenames are 8.3 */ #endif + #endif /* * This must follow the include of macconf.h because EXIT_SUCCESS is defined *************** *** 268,273 **** --- 270,284 ---- #else /* !MONITOR_HEAP */ extern long *FDECL(alloc, (unsigned int)); /* alloc.c */ #endif + + /* Used for consistency checks of various data files; declare it here so + that utility programs which include config.h but not hack.h can see it. */ + struct version_info { + unsigned long incarnation; /* actual version number */ + unsigned long feature_set; /* bitmask of config settings */ + unsigned long entity_count; /* # of monsters and objects */ + unsigned long struct_sizes; /* size of key structs */ + }; /* *** Old/include/ntconf.h Tue Dec 10 16:38:33 1996 --- include/ntconf.h Mon Nov 4 09:00:56 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)ntconf.h 3.2 94/12/08 */ /* Copyright (c) NetHack PC Development Team 1993, 1994. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)ntconf.h 3.2 96/10/14 */ /* Copyright (c) NetHack PC Development Team 1993, 1994. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 13,25 **** #define PATHLEN 64 /* maximum pathlength */ #define FILENAME 80 /* maximum filename length (conservative) */ - #define SHORT_FILENAMES #define EXEPATH /* Allow .exe location to be used as HACKDIR */ /* * ----------------------------------------------------------------- * The remaining code shouldn't need modification. * ----------------------------------------------------------------- */ #define MICRO /* always define this! */ #define NO_TERMS --- 13,25 ---- #define PATHLEN 64 /* maximum pathlength */ #define FILENAME 80 /* maximum filename length (conservative) */ #define EXEPATH /* Allow .exe location to be used as HACKDIR */ /* * ----------------------------------------------------------------- * The remaining code shouldn't need modification. * ----------------------------------------------------------------- */ + /* #define SHORT_FILENAMES /* All NT filesystems support long names now */ #define MICRO /* always define this! */ #define NO_TERMS *************** *** 30,41 **** #include /* Provides prototypes of exit(), spawn() */ #endif #ifndef SYSTEM_H #include "system.h" #endif #define index strchr #define rindex strrchr - #include #ifdef RANDOM --- 30,45 ---- #include /* Provides prototypes of exit(), spawn() */ #endif + #include /* Provides prototypes of strncmpi(), etc. */ + #ifdef STRNCMPI + #define strncmpi(a,b,c) strnicmp(a,b,c) + #endif + #ifndef SYSTEM_H #include "system.h" #endif #define index strchr #define rindex strrchr #include #ifdef RANDOM *************** *** 76,85 **** #ifndef alloca #define ALLOCA_HACK /* used in util/panic.c */ - #endif - - #ifdef MICRO - #define exit msexit /* do chdir first */ #endif #ifndef REDO --- 80,85 ---- *** Old/include/objclass.h Tue Dec 10 16:38:38 1996 --- include/objclass.h Mon Jun 17 18:36:24 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)objclass.h 3.2 95/08/13 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)objclass.h 3.2 96/06/16 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 35,41 **** #define RAY 3 /* zap beams */ #define PIERCE 1 /* for weapons & tools used as weapons */ ! #define SLASH 2 #define WHACK 0 Bitfield(oc_subtyp,3); --- 35,41 ---- #define RAY 3 /* zap beams */ #define PIERCE 1 /* for weapons & tools used as weapons */ ! #define SLASH 2 /* (latter includes iron ball & chain) */ #define WHACK 0 Bitfield(oc_subtyp,3); *** Old/include/os2conf.h Tue Dec 10 16:38:40 1996 --- include/os2conf.h Mon Nov 4 09:08:32 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)os2conf.h 3.2 96/02/29 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Timo Hakulinen, 1990, 1991, 1992, 1993, 1996. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)os2conf.h 3.2 96/10/29 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Timo Hakulinen, 1990, 1991, 1992, 1993, 1996. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 15,20 **** --- 15,22 ---- /* #define OS2_MSC /* Microsoft C 5.1 and 6.0 */ /* #define OS2_GCC /* GCC emx 0.8f */ /* #define OS2_CSET2 /* IBM C Set/2 (courtesy Jeff Urlwin) */ + /* #define OS2_CSET2_VER_1 /* CSet/2 version selection */ + /* #define OS2_CSET2_VER_2 /* - " - */ /* * System configuration. *************** *** 86,93 **** #define FCMASK (S_IREAD | S_IWRITE) #include - - #define exit msexit /* do chdir first */ #ifndef REDO # undef Getchar --- 88,93 ---- *** Old/include/patchlevel.h Tue Dec 10 16:38:42 1996 --- include/patchlevel.h Mon Dec 9 17:22:52 1996 *************** *** 1,14 **** ! /* SCCS Id: @(#)patchlevel.h 3.2 96/05/25 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ ! /* NetHack 3.2.1 */ #define VERSION_MAJOR 3 #define VERSION_MINOR 2 /* * PATCHLEVEL is updated for each release. */ ! #define PATCHLEVEL 1 /* * Incrementing EDITLEVEL can be used to force invalidation of old bones * and save files. --- 1,14 ---- ! /* SCCS Id: @(#)patchlevel.h 3.2 96/11/19 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ ! /* NetHack 3.2.2 */ #define VERSION_MAJOR 3 #define VERSION_MINOR 2 /* * PATCHLEVEL is updated for each release. */ ! #define PATCHLEVEL 2 /* * Incrementing EDITLEVEL can be used to force invalidation of old bones * and save files. *************** *** 34,44 **** * PP = patch level, ee = edit level, L = literal suffix "L", * with all four numbers specified as two hexadecimal digits. */ ! #define VERSION_COMPATIBILITY 0x03020100L #endif /*****************************************************************************/ ! /* Version 3.2.1 */ /* Patch 1, May 28, 1996 * eliminate `#qualifications'; fix weapon proficiency handling for missiles --- 34,64 ---- * PP = patch level, ee = edit level, L = literal suffix "L", * with all four numbers specified as two hexadecimal digits. */ ! #define VERSION_COMPATIBILITY 0x03020200L #endif /*****************************************************************************/ ! /* Version 3.2.2 */ ! ! /* Patch 2, December 10, 1996 ! * fix the `recover' utility ! * fix priest/minion name overflow which could cause Astral Plane crashes ! * avoid crash when hit by own thrown boomerang ! * " " " worn blindfold pushed off by applying cursed towel ! * handle returning live Wizard correctly in deep dungeon levels ! * don't occasionally display unseen areas of new levels during level change ! * other minor display fixes ! * fix several minor reason for death inconsistencies and shop bugs ! * high dexterity doesn't guarantee that thrown eggs & potions will hit ! * ! * Selected platform- or configuration-specific changes: ! * Mac: update `mrecover' ! * MSDOS: don't switch into tiles mode when resuming play on rogue level ! * tty: support object class characters for 'I' command in menu mode ! * Unix: work around several compilation problems ! * X11: as tty above, plus implement tty-style count handling in menus; ! * better window placement support for old window managers ! */ /* Patch 1, May 28, 1996 * eliminate `#qualifications'; fix weapon proficiency handling for missiles *** Old/include/pcconf.h Tue Dec 10 16:38:45 1996 --- include/pcconf.h Mon Nov 4 09:08:32 1996 *************** *** 199,206 **** #include - #define exit msexit /* do chdir first */ - #ifndef REDO # undef Getchar # define Getchar nhgetch --- 199,204 ---- *** Old/include/rm.h Tue Dec 10 16:38:58 1996 --- include/rm.h Thu Jun 13 17:03:06 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)rm.h 3.2 93/02/21 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)rm.h 3.2 96/05/31 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 363,369 **** * 5 top left & bottom right (1/2 rock) * 6 bottom left & top right (1/2 rock) */ - #define SDOOR_BITS D_CLOSED /* sdoor bottom 3 bits are these */ #define WM_W_LEFT 1 /* vertical or horizontal wall */ #define WM_W_RIGHT 2 --- 363,368 ---- *** Old/include/system.h Tue Dec 10 16:39:05 1996 --- include/system.h Mon Nov 4 09:01:25 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)system.h 3.2 96/03/18 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)system.h 3.2 96/10/29 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 50,56 **** * impossible to get right automatically. * This is the type of signal handling functions. */ ! #if defined(_MSC_VER) || defined(__TURBOC__) || defined(__SC__) || defined(WIN32) # define SIG_RET_TYPE void (__cdecl *)(int) #endif #ifndef SIG_RET_TYPE --- 50,56 ---- * impossible to get right automatically. * This is the type of signal handling functions. */ ! #if !defined(OS2) && (defined(_MSC_VER) || defined(__TURBOC__) || defined(__SC__) || defined(WIN32)) # define SIG_RET_TYPE void (__cdecl *)(int) #endif #ifndef SIG_RET_TYPE *************** *** 94,99 **** --- 94,110 ---- # ifndef MICRO E void FDECL(exit, (int)); # endif /* MICRO */ + /* compensate for some CSet/2 bogosities */ + # if defined(OS2_CSET2) && defined(OS2_CSET2_VER_2) + # define open _open + # define close _close + # define read _read + # define write _write + # define lseek _lseek + # define chdir _chdir + # define getcwd _getcwd + # define setmode _setmode + # endif /* OS2_CSET2 && OS2_CSET2_VER_2 */ /* If flex thinks that we're not __STDC__ it declares free() to return int and we die. We must use __STDC__ instead of NHSTDC because the former is naturally what flex tests for. */ *************** *** 159,165 **** --- 170,180 ---- # endif /* ULTRIX */ # ifdef OS2_CSET2 /* IBM CSet/2 */ + # ifdef OS2_CSET2_VER_1 E int FDECL(unlink, (char *)); + # else + E int FDECL(unlink, (const char *)); /* prototype is ok in ver >= 2 */ + # endif # else # ifndef __SC__ E int FDECL(unlink, (const char *)); *** Old/include/tradstdc.h Tue Dec 10 16:39:17 1996 --- include/tradstdc.h Sun Oct 27 19:33:02 1996 *************** *** 105,111 **** #endif #endif /* NEED_VARARGS */ ! #if defined(NHSTDC) || defined(MSDOS) || defined(MAC) || defined(ULTRIX_PROTO) || defined(__beos__) /* * Used for robust ANSI parameter forward declarations: --- 105,111 ---- #endif #endif /* NEED_VARARGS */ ! #if defined(NHSTDC) || defined(MSDOS) || defined(MAC) || defined(ULTRIX_PROTO) || defined(__BEOS__) /* * Used for robust ANSI parameter forward declarations: *************** *** 206,212 **** #if defined(applec) #define UNWIDENED_PROTOTYPES #endif ! #if defined(__MWERKS__) && defined(__beos__) #define UNWIDENED_PROTOTYPES #endif #if defined(WIN32) --- 206,212 ---- #if defined(applec) #define UNWIDENED_PROTOTYPES #endif ! #if defined(__MWERKS__) && defined(__BEOS__) #define UNWIDENED_PROTOTYPES #endif #if defined(WIN32) *** Old/include/vmsconf.h Tue Dec 10 16:39:31 1996 --- include/vmsconf.h Mon Nov 4 09:08:32 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)vmsconf.h 3.2 96/03/02 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)vmsconf.h 3.2 96/10/20 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 16,22 **** * extra room for patching longer values into an existing executable. */ #define Local_WIZARD "NHWIZARD\0\0\0\0" ! #define Local_HACKDIR "DISK$USERS:[GAMES.NETHACK.3-2-0.PLAY]\0\0\0\0\0\0\0\0" /* * This section cleans up the stuff done in config.h so that it --- 16,22 ---- * extra room for patching longer values into an existing executable. */ #define Local_WIZARD "NHWIZARD\0\0\0\0" ! #define Local_HACKDIR "DISK$USERS:[GAMES.NETHACK.3-2-2.PLAY]\0\0\0\0\0\0\0\0" /* * This section cleans up the stuff done in config.h so that it *** Old/include/winX.h Tue Dec 10 16:39:33 1996 --- include/winX.h Mon Aug 19 08:24:12 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)winX.h 3.2 96/05/12 */ /* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)winX.h 3.2 96/08/18 */ /* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 118,128 **** typedef struct x11_mi { struct x11_mi *next; anything identifier; /* Opaque type to identify this selection */ boolean selected; /* Been selected? */ char selector; /* Char used to select this entry. */ char gselector; /* Group selector. */ - int attr; /* Attribute for the line. */ - char *str; /* The text of the item. */ } x11_menu_item; struct menu { --- 118,129 ---- typedef struct x11_mi { struct x11_mi *next; anything identifier; /* Opaque type to identify this selection */ + long pick_count; /* specific selection count; -1 if none */ + char *str; /* The text of the item. */ + int attr; /* Attribute for the line. */ boolean selected; /* Been selected? */ char selector; /* Char used to select this entry. */ char gselector; /* Group selector. */ } x11_menu_item; struct menu { *************** *** 142,147 **** --- 143,149 ---- struct menu new_menu; /* New menu being built. */ XFontStruct *fs; /* Font for the window. */ + long menu_count; /* number entered by user */ Dimension line_height; /* Total height of a line of text. */ Dimension internal_height; /* Internal height between widget & border */ Dimension internal_width; /* Internal width between widget & border */ *************** *** 151,156 **** --- 153,159 ---- boolean is_active; /* TRUE when waiting for user input. */ boolean is_up; /* TRUE when window is popped-up. */ boolean cancelled; /* Menu has been explicitly cancelled. */ + boolean counting; /* true when menu_count has a valid value */ }; /* *** Old/src/allmain.c Tue Dec 10 16:39:50 1996 --- src/allmain.c Tue Aug 13 12:57:33 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)allmain.c 3.2 96/03/28 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)allmain.c 3.2 96/07/15 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 131,137 **** /* for the moment at least, you're in tiptop shape */ wtcap = UNENCUMBERED; moverate = 0; ! } else if (u.mtimedone && u.mh < u.mhmax) { if (u.mh < 1) { rehumanize(); moverate = 0; --- 131,137 ---- /* for the moment at least, you're in tiptop shape */ wtcap = UNENCUMBERED; moverate = 0; ! } else if (Upolyd && u.mh < u.mhmax) { if (u.mh < 1) { rehumanize(); moverate = 0; *************** *** 165,171 **** if (wtcap > MOD_ENCUMBER && flags.mv) { if(!(wtcap < EXT_ENCUMBER ? moves%30 : moves%10)) { ! if(u.uhp > 1) { u.uhp--; } else { You("pass out from exertion!"); --- 165,173 ---- if (wtcap > MOD_ENCUMBER && flags.mv) { if(!(wtcap < EXT_ENCUMBER ? moves%30 : moves%10)) { ! if (Upolyd && u.mh > 1) { ! u.mh--; ! } else if (!Upolyd && u.uhp > 1) { u.uhp--; } else { You("pass out from exertion!"); *************** *** 326,332 **** } #ifdef WIZARD ! if (flags.sanity_check) sanity_check(); #endif --- 328,334 ---- } #ifdef WIZARD ! if (iflags.sanity_check) sanity_check(); #endif *************** *** 437,443 **** (void) signal(SIGINT, (SIG_RET_TYPE) done1); #endif #ifdef NEWS ! if(flags.news) display_file(NEWS, FALSE); #endif load_qtlist(); /* load up the quest text info */ quest_init(); --- 439,445 ---- (void) signal(SIGINT, (SIG_RET_TYPE) done1); #endif #ifdef NEWS ! if(iflags.news) display_file(NEWS, FALSE); #endif load_qtlist(); /* load up the quest text info */ quest_init(); *************** *** 487,493 **** if (upstair.sx && (glyph_to_cmap(level.locations[upstair.sx][upstair.sy].glyph) == S_upstair || ! glyph_to_cmap(level.locations[upstair.sx][upstair.sy].glyph) == S_upladder)) { *p++ = '<'; *p++ = upstair.sx; --- 489,495 ---- if (upstair.sx && (glyph_to_cmap(level.locations[upstair.sx][upstair.sy].glyph) == S_upstair || ! glyph_to_cmap(level.locations[upstair.sx][upstair.sy].glyph) == S_upladder)) { *p++ = '<'; *p++ = upstair.sx; *************** *** 495,501 **** if (sstairs.sx && (glyph_to_cmap(level.locations[sstairs.sx][sstairs.sy].glyph) == S_upstair || ! glyph_to_cmap(level.locations[sstairs.sx][sstairs.sy].glyph) == S_upladder)) { *p++ = '<'; *p++ = sstairs.sx; --- 497,503 ---- if (sstairs.sx && (glyph_to_cmap(level.locations[sstairs.sx][sstairs.sy].glyph) == S_upstair || ! glyph_to_cmap(level.locations[sstairs.sx][sstairs.sy].glyph) == S_upladder)) { *p++ = '<'; *p++ = sstairs.sx; *************** *** 513,519 **** if (sstairs.sx && (glyph_to_cmap(level.locations[sstairs.sx][sstairs.sy].glyph) == S_dnstair || ! glyph_to_cmap(level.locations[sstairs.sx][sstairs.sy].glyph) == S_dnladder)) { *p++ = '>'; *p++ = sstairs.sx; --- 515,521 ---- if (sstairs.sx && (glyph_to_cmap(level.locations[sstairs.sx][sstairs.sy].glyph) == S_dnstair || ! glyph_to_cmap(level.locations[sstairs.sx][sstairs.sy].glyph) == S_dnladder)) { *p++ = '>'; *p++ = sstairs.sx; *** Old/src/apply.c Tue Dec 10 16:39:56 1996 --- src/apply.c Mon Oct 21 22:10:20 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)apply.c 3.2 96/05/18 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)apply.c 3.2 96/10/12 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 102,110 **** You("push your blindfold %s.", rn2(2) ? "cock-eyed" : "crooked"); } else { You("push your blindfold off."); Blindf_off(ublindf); ! dropx(ublindf); } } return 1; --- 102,111 ---- You("push your blindfold %s.", rn2(2) ? "cock-eyed" : "crooked"); } else { + struct obj *saved_ublindf = ublindf; You("push your blindfold off."); Blindf_off(ublindf); ! dropx(saved_ublindf); } } return 1; *************** *** 242,249 **** switch(lev->typ) { case SDOOR: You_hear(hollow_str, "door"); ! lev->typ = DOOR; ! lev->doormask = exposed_sdoor_mask(lev); if (Blind) feel_location(rx,ry); else newsym(rx,ry); return res; --- 243,249 ---- switch(lev->typ) { case SDOOR: You_hear(hollow_str, "door"); ! cvt_sdoor_to_door(lev); /* ->typ = DOOR */ if (Blind) feel_location(rx,ry); else newsym(rx,ry); return res; *************** *** 256,262 **** } if (!its_dead(rx, ry, &res)) ! You_hear("nothing special."); return res; } --- 256,262 ---- } if (!its_dead(rx, ry, &res)) ! You("hear nothing special."); /* not You_hear() */ return res; } *************** *** 285,296 **** for(mtmp = fmon; mtmp; mtmp = nextmon) { nextmon = mtmp->nmon; /* trap might kill mon */ if (mtmp->mtame) { mnexto(mtmp); if (canspotmon(mtmp)) ++pet_cnt; ! /* No longer in previous trap. Necessary since */ ! /* mintrap acts differently for already-trapped mons */ ! mtmp->mtrapped = 0; ! (void) mintrap(mtmp); } } if (pet_cnt > 0) makeknown(MAGIC_WHISTLE); --- 285,298 ---- for(mtmp = fmon; mtmp; mtmp = nextmon) { nextmon = mtmp->nmon; /* trap might kill mon */ if (mtmp->mtame) { + if (mtmp->mtrapped) { + /* no longer in previous trap (affects mintrap) */ + mtmp->mtrapped = 0; + fill_pit(mtmp->mx, mtmp->my); + } mnexto(mtmp); if (canspotmon(mtmp)) ++pet_cnt; ! if (mintrap(mtmp) == 2) change_luck(-1); } } if (pet_cnt > 0) makeknown(MAGIC_WHISTLE); *************** *** 956,962 **** snuff_lit(obj) struct obj *obj; { - char buf[BUFSZ]; xchar x, y; if (obj->lamplit) { --- 958,963 ---- *************** *** 964,970 **** obj->otyp == BRASS_LANTERN || obj->otyp == POT_OIL) { (void) get_obj_location(obj, &x, &y, 0); if (obj->where == OBJ_MINVENT ? cansee(x,y) : !Blind) ! pline("%s %s goes out!", Shk_Your(buf, obj), xname(obj)); end_burn(obj, TRUE); return TRUE; } --- 965,971 ---- obj->otyp == BRASS_LANTERN || obj->otyp == POT_OIL) { (void) get_obj_location(obj, &x, &y, 0); if (obj->where == OBJ_MINVENT ? cansee(x,y) : !Blind) ! pline("%s goes out!", Yname2(obj)); end_burn(obj, TRUE); return TRUE; } *************** *** 988,994 **** obj->otyp == BRASS_LANTERN) pline("%s lamp is now off.", Shk_Your(buf, obj)); else ! You("snuff out %s %s.", shk_your(buf, obj), xname(obj)); end_burn(obj, TRUE); return; } --- 989,995 ---- obj->otyp == BRASS_LANTERN) pline("%s lamp is now off.", Shk_Your(buf, obj)); else ! You("snuff out %s.", yname(obj)); end_burn(obj, TRUE); return; } *************** *** 1011,1019 **** check_unpaid(obj); pline("%s lamp is now on.", Shk_Your(buf, obj)); } else { /* candle(s) */ ! pline("%s %s flame%s burn%s%s", ! Shk_Your(buf, obj), ! s_suffix(xname(obj)), obj->quan > 1L ? "s" : "", obj->quan > 1L ? "" : "s", Blind ? "." : " brightly!"); --- 1012,1019 ---- check_unpaid(obj); pline("%s lamp is now on.", Shk_Your(buf, obj)); } else { /* candle(s) */ ! pline("%s flame%s burn%s%s", ! s_suffix(Yname2(obj)), obj->quan > 1L ? "s" : "", obj->quan > 1L ? "" : "s", Blind ? "." : " brightly!"); *************** *** 1110,1116 **** coord cc; struct monst *mtmp; ! if (!Jumping) { You_cant("jump very far."); return 0; } else if (u.uswallow) { --- 1110,1121 ---- coord cc; struct monst *mtmp; ! if (nolimbs(uasmon) || slithy(uasmon)) { ! /* normally (nolimbs || slithy) implies !Jumping, ! but that isn't necessarily the case for knights */ ! You_cant("jump; you have no legs!"); ! return 0; ! } else if (!Jumping) { You_cant("jump very far."); return 0; } else if (u.uswallow) { *************** *** 1131,1136 **** --- 1136,1152 ---- } else if (u.uhunger <= 100 || ACURR(A_STR) < 6) { You("lack the strength to jump!"); return 0; + } else if (Wounded_legs) { + /* note: dojump() has similar code */ + long wl = (Wounded_legs & BOTH_SIDES); + const char *bp = body_part(LEG); + + if (wl == BOTH_SIDES) bp = makeplural(bp); + Your("%s%s %s in no shape for jumping.", + (wl == LEFT_SIDE) ? "left " : + (wl == RIGHT_SIDE) ? "right " : "", + bp, (wl == BOTH_SIDES) ? "are" : "is"); + return 0; } pline("Where do you want to jump?"); *************** *** 1490,1498 **** check_unpaid(obj); obj->spe--; if (otmp != &zeroobj) { ! You("cover %s %s with a thick layer of grease.", ! shk_your(buf, otmp), ! xname(otmp)); otmp->greased = 1; if (obj->cursed && !nohands(uasmon)) { Glib += rnd(15); --- 1506,1513 ---- check_unpaid(obj); obj->spe--; if (otmp != &zeroobj) { ! You("cover %s with a thick layer of grease.", ! yname(otmp)); otmp->greased = 1; if (obj->cursed && !nohands(uasmon)) { Glib += rnd(15); *************** *** 1729,1734 **** --- 1744,1754 ---- #endif /* 0 */ break; default: + { + char save_usym = u.usym; + /* kludge for body_part() to work */ + u.usym = mtmp->data->mlet; + uasmon = mtmp->data; /* to floor beneath mon */ You("yank %s from %s %s!", the(xname(otmp)), *************** *** 1737,1742 **** --- 1757,1765 ---- if(otmp->otyp == CRYSKNIFE) otmp->otyp = WORM_TOOTH; place_object(otmp, mtmp->mx, mtmp->my); + set_uasmon(); + u.usym = save_usym; + } } } else { pline(msg_slipsfree); *************** *** 1771,1777 **** boolean affects_objects; char confirm[QBUFSZ], the_wand[BUFSZ]; ! Strcat(strcat(shk_your(the_wand, obj), " "), xname(obj)); Sprintf(confirm, "Are you really sure you want to break %s?", the_wand); if (yn(confirm) == 'n' ) return 0; --- 1794,1800 ---- boolean affects_objects; char confirm[QBUFSZ], the_wand[BUFSZ]; ! Strcpy(the_wand, yname(obj)); Sprintf(confirm, "Are you really sure you want to break %s?", the_wand); if (yn(confirm) == 'n' ) return 0; *** Old/src/artifact.c Tue Dec 10 16:40:01 1996 --- src/artifact.c Tue Aug 13 12:57:34 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)artifact.c 3.2 96/01/15 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)artifact.c 3.2 96/07/08 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 504,513 **** } else if (weap->spfx & SPFX_DFLAG2) { if (yours) { if ((weap->mtype & M2_HUMAN) != 0 && ! (u.mtimedone ? is_human(uasmon) : human_role())) return 1; if ((weap->mtype & M2_ELF) != 0 && ! (u.mtimedone ? is_elf(uasmon) : Role_is('E'))) return 1; } return ((ptr->mflags2 & weap->mtype) != 0L); --- 504,513 ---- } else if (weap->spfx & SPFX_DFLAG2) { if (yours) { if ((weap->mtype & M2_HUMAN) != 0 && ! (Upolyd ? is_human(uasmon) : human_role())) return 1; if ((weap->mtype & M2_ELF) != 0 && ! (Upolyd ? is_elf(uasmon) : Role_is('E'))) return 1; } return ((ptr->mflags2 & weap->mtype) != 0L); *************** *** 852,858 **** * value to the damage so that this reduction in * damage does not prevent death. */ ! *dmgptr = u.uhp + FATAL_DAMAGE; pline_The("razor-sharp blade cuts you in half!"); otmp->dknown = TRUE; return TRUE; --- 852,858 ---- * value to the damage so that this reduction in * damage does not prevent death. */ ! *dmgptr = (Upolyd ? u.mh : u.uhp) + FATAL_DAMAGE; pline_The("razor-sharp blade cuts you in half!"); otmp->dknown = TRUE; return TRUE; *************** *** 881,887 **** pline("%s slices through %s neck.", artilist[ART_VORPAL_BLADE].name, s_suffix(mon_nam(mdef))); ! return ((boolean)(youattack || vis)); } *dmgptr = mdef->mhp + FATAL_DAMAGE; pline(behead_msg[rn2(SIZE(behead_msg))], --- 881,887 ---- pline("%s slices through %s neck.", artilist[ART_VORPAL_BLADE].name, s_suffix(mon_nam(mdef))); ! return TRUE; } *dmgptr = mdef->mhp + FATAL_DAMAGE; pline(behead_msg[rn2(SIZE(behead_msg))], *************** *** 901,907 **** artilist[ART_VORPAL_BLADE].name); return TRUE; } ! *dmgptr = u.uhp + FATAL_DAMAGE; pline(behead_msg[rn2(SIZE(behead_msg))], artilist[ART_VORPAL_BLADE].name, "you"); otmp->dknown = TRUE; --- 901,907 ---- artilist[ART_VORPAL_BLADE].name); return TRUE; } ! *dmgptr = (Upolyd ? u.mh : u.uhp) + FATAL_DAMAGE; pline(behead_msg[rn2(SIZE(behead_msg))], artilist[ART_VORPAL_BLADE].name, "you"); otmp->dknown = TRUE; *************** *** 1007,1017 **** } case HEALING: { int healamt = (u.uhpmax + 1 - u.uhp) / 2; if(healamt || Sick || (Blinded > 1)) You_feel("better."); else goto nothing_special; ! if(healamt) u.uhp += healamt; if(Sick) make_sick(0L,(char *)0,FALSE,SICK_ALL); if(Blinded > 1) make_blinded(0L,FALSE); flags.botl = 1; --- 1007,1021 ---- } case HEALING: { int healamt = (u.uhpmax + 1 - u.uhp) / 2; + if (Upolyd) healamt = (u.mhmax + 1 - u.mh) / 2; if(healamt || Sick || (Blinded > 1)) You_feel("better."); else goto nothing_special; ! if (healamt > 0) { ! if (Upolyd) u.mh += healamt; ! else u.uhp += healamt; ! } if(Sick) make_sick(0L,(char *)0,FALSE,SICK_ALL); if(Blinded > 1) make_blinded(0L,FALSE); flags.botl = 1; *** Old/src/attrib.c Tue Dec 10 16:40:05 1996 --- src/attrib.c Mon Jun 17 18:36:36 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)attrib.c 3.2 96/03/28 */ /* Copyright 1988, 1989, 1990, 1992, M. Stephenson */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)attrib.c 3.2 96/06/16 */ /* Copyright 1988, 1989, 1990, 1992, M. Stephenson */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 657,662 **** --- 657,671 ---- } } } + + #ifdef WEAPON_SKILLS + if (oldlevel > 0) { + if (newlevel > oldlevel) + add_weapon_skill(newlevel - oldlevel); + else + lose_weapon_skill(oldlevel - newlevel); + } + #endif /* WEAPON_SKILLS */ } int *** Old/src/bones.c Tue Dec 10 16:40:11 1996 --- src/bones.c Sat Jul 6 22:35:16 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)bones.c 3.2 95/11/29 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985,1993. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)bones.c 3.2 96/07/06 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985,1993. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 273,279 **** if(mtmp->mtame) mtmp->mtame = mtmp->mpeaceful = 0; } for(ttmp = ftrap; ttmp; ttmp = ttmp->ntrap) { ! ttmp->tseen = ttmp->madeby_u = 0; } resetobjs(fobj,FALSE); resetobjs(level.buriedobjlist, FALSE); --- 273,280 ---- if(mtmp->mtame) mtmp->mtame = mtmp->mpeaceful = 0; } for(ttmp = ftrap; ttmp; ttmp = ttmp->ntrap) { ! ttmp->madeby_u = 0; ! ttmp->tseen = (ttmp->ttyp == HOLE); } resetobjs(fobj,FALSE); resetobjs(level.buriedobjlist, FALSE); *** Old/src/botl.c Tue Dec 10 16:40:14 1996 --- src/botl.c Tue Aug 13 12:57:35 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)botl.c 3.2 95/05/31 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)botl.c 3.2 96/07/15 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 324,330 **** newbot1[10] = 0; Sprintf(nb = eos(newbot1)," the "); ! if (u.mtimedone) { char mbot[BUFSZ]; int k = 0; --- 324,330 ---- newbot1[10] = 0; Sprintf(nb = eos(newbot1)," the "); ! if (Upolyd) { char mbot[BUFSZ]; int k = 0; *************** *** 374,381 **** int hp, hpmax; int cap = near_capacity(); ! hp = u.mtimedone ? u.mh : u.uhp; ! hpmax = u.mtimedone ? u.mhmax : u.uhpmax; if(hp < 0) hp = 0; /* TODO: Add in dungeon name */ --- 374,381 ---- int hp, hpmax; int cap = near_capacity(); ! hp = Upolyd ? u.mh : u.uhp; ! hpmax = Upolyd ? u.mhmax : u.uhpmax; if(hp < 0) hp = 0; /* TODO: Add in dungeon name */ *************** *** 392,398 **** "%c:%-2ld HP:%d(%d) Pw:%d(%d) AC:%-2d", oc_syms[GOLD_CLASS], u.ugold, hp, hpmax, u.uen, u.uenmax, u.uac); ! if (u.mtimedone) Sprintf(nb = eos(nb), " HD:%d", mons[u.umonnum].mlevel); #ifdef EXP_ON_BOTL else if(flags.showexp) --- 392,398 ---- "%c:%-2ld HP:%d(%d) Pw:%d(%d) AC:%-2d", oc_syms[GOLD_CLASS], u.ugold, hp, hpmax, u.uen, u.uenmax, u.uac); ! if (Upolyd) Sprintf(nb = eos(nb), " HD:%d", mons[u.umonnum].mlevel); #ifdef EXP_ON_BOTL else if(flags.showexp) *** Old/src/cmd.c Tue Dec 10 16:40:17 1996 --- src/cmd.c Tue Aug 13 13:27:04 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)cmd.c 3.2 96/05/14 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)cmd.c 3.2 96/08/04 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 664,669 **** --- 664,677 ---- Strcpy(buf, an(mons[u.ulycn].mname)); you_are(buf); } + if (Upolyd) { + if (u.ulycn >= LOW_PM) Strcpy(buf, "in beast form"); + else Sprintf(buf, "polymorphed into %s", an(uasmon->mname)); + #ifdef WIZARD + if (wizard) Sprintf(eos(buf), " (%d)", u.mtimedone); + #endif + you_are(buf); + } if (Luck) { ltmp = abs((int)Luck); Sprintf(buf, "%s%slucky", *************** *** 759,776 **** #endif /* OVLB */ #ifdef OVL1 - #ifdef WEAPON_SKILLS - STATIC_PTR int NDECL(obsolete_qualifications); - - /* 3.2.0's "#qualifications" was eliminated in 3.2.1; remove this for 3.3 */ - STATIC_PTR int - obsolete_qualifications() - { - pline("`#qualifications' is obsolete. Use `#enhance'."); - return 0; - } - #endif /* WEAPON_SKILLS */ - #ifndef M # ifndef NHSTDC # define M(c) (0x80 | (c)) --- 767,772 ---- *************** *** 850,858 **** {M('p'), TRUE, dopray}, {'q', FALSE, dodrink}, {'Q', TRUE, done2}, - #ifdef WEAPON_SKILLS - {M('Q'), TRUE, obsolete_qualifications}, - #endif /* WEAPON_SKILLS */ {'r', FALSE, doread}, {'R', FALSE, doremring}, {M('r'), FALSE, dorub}, --- 846,851 ---- *************** *** 920,929 **** {"name", "name an item or type of object", ddocall, TRUE}, {"offer", "offer a sacrifice to the gods", dosacrifice, FALSE}, {"pray", "pray to the gods for help", dopray, TRUE}, - #ifdef WEAPON_SKILLS - {"qualifications", "(obsolete; use #enhance)", obsolete_qualifications, - TRUE}, - #endif /* WEAPON_SKILLS */ {"rub", "rub a lamp", dorub, FALSE}, {"sit", "sit down", dosit, FALSE}, {"turn", "turn undead", doturn, TRUE}, --- 913,918 ---- *************** *** 1223,1236 **** } else prefix_seen = TRUE; break; ! case '5': if (!flags.num_pad) break; /* else FALLTHRU */ case 'G': if (movecmd(lowc(cmd[1]))) { flags.run = 3; do_rush = TRUE; } else prefix_seen = TRUE; break; ! case '-': if (!flags.num_pad) break; /* else FALLTHRU */ case 'm': if (movecmd(cmd[1]) || u.dz) { flags.run = 0; flags.nopick = 1; --- 1212,1225 ---- } else prefix_seen = TRUE; break; ! case '5': if (!iflags.num_pad) break; /* else FALLTHRU */ case 'G': if (movecmd(lowc(cmd[1]))) { flags.run = 3; do_rush = TRUE; } else prefix_seen = TRUE; break; ! case '-': if (!iflags.num_pad) break; /* else FALLTHRU */ case 'm': if (movecmd(cmd[1]) || u.dz) { flags.run = 0; flags.nopick = 1; *************** *** 1246,1259 **** } else prefix_seen = TRUE; break; ! case '0': if (!flags.num_pad) break; (void)ddoinv(); /* a convenience borrowed from the PC */ flags.move = FALSE; multi = 0; return; default: if (movecmd(*cmd)) { /* ordinary movement */ do_walk = TRUE; ! } else if (movecmd(flags.num_pad ? unmeta(*cmd) : lowc(*cmd))) { flags.run = 1; do_rush = TRUE; --- 1235,1248 ---- } else prefix_seen = TRUE; break; ! case '0': if (!iflags.num_pad) break; (void)ddoinv(); /* a convenience borrowed from the PC */ flags.move = FALSE; multi = 0; return; default: if (movecmd(*cmd)) { /* ordinary movement */ do_walk = TRUE; ! } else if (movecmd(iflags.num_pad ? unmeta(*cmd) : lowc(*cmd))) { flags.run = 1; do_rush = TRUE; *************** *** 1363,1369 **** { register const char *dp; register const char *sdp; ! if(flags.num_pad) sdp = ndir; else sdp = sdir; /* DICE workaround */ u.dz = 0; if(!(dp = index(sdp, sym))) return 0; --- 1352,1358 ---- { register const char *dp; register const char *sdp; ! if(iflags.num_pad) sdp = ndir; else sdp = sdir; /* DICE workaround */ u.dz = 0; if(!(dp = index(sdp, sym))) return 0; *************** *** 1455,1463 **** x = xytod(x, y); if(mod == CLICK_1) { ! return (flags.num_pad ? ndir[x] : sdir[x]); } else { ! return (flags.num_pad ? M(ndir[x]) : (sdir[x] - 'a' + 'A')); /* run command */ } } --- 1444,1452 ---- x = xytod(x, y); if(mod == CLICK_1) { ! return (iflags.num_pad ? ndir[x] : sdir[x]); } else { ! return (iflags.num_pad ? M(ndir[x]) : (sdir[x] - 'a' + 'A')); /* run command */ } } *************** *** 1477,1483 **** flags.move = 1; flush_screen(1); /* Flush screen buffer. Put the cursor on the hero. */ ! if (!flags.num_pad || (foo = readchar()) == 'n') for (;;) { foo = readchar(); if (foo >= '0' && foo <= '9') { --- 1466,1472 ---- flags.move = 1; flush_screen(1); /* Flush screen buffer. Put the cursor on the hero. */ ! if (!iflags.num_pad || (foo = readchar()) == 'n') for (;;) { foo = readchar(); if (foo >= '0' && foo <= '9') { *************** *** 1515,1521 **** } in_line[0] = foo; in_line[1] = '\0'; ! if (foo == 'g' || foo == 'G' || (flags.num_pad && foo == '5') || foo == 'm' || foo == 'M') { foo = readchar(); #ifdef REDO --- 1504,1510 ---- } in_line[0] = foo; in_line[1] = '\0'; ! if (foo == 'g' || foo == 'G' || (iflags.num_pad && foo == '5') || foo == 'm' || foo == 'M') { foo = readchar(); #ifdef REDO *** Old/src/decl.c Tue Dec 10 16:40:24 1996 --- src/decl.c Mon Jun 17 18:34:47 1996 *************** *** 123,128 **** --- 123,129 ---- struct trap *ftrap = (struct trap *)0; NEARDATA struct monst youmonst = DUMMY; NEARDATA struct flag flags = DUMMY; + NEARDATA struct instance_flags iflags = DUMMY; NEARDATA struct you u = DUMMY; NEARDATA struct obj *invent = (struct obj *)0, *** Old/src/detect.c Tue Dec 10 16:40:27 1996 --- src/detect.c Mon Oct 21 22:41:36 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)detect.c 3.2 96/05/01 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)detect.c 3.2 96/10/21 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 801,818 **** } } ! int ! exposed_sdoor_mask(lev) struct rm *lev; { #ifdef REINCARNATION if (Is_rogue_level(&u.uz)) ! /* rogue didn't have doors, only doorways */ ! return (lev->doormask & ~WM_MASK); else #endif ! /* newly exposed door is closed */ ! return ((lev->doormask & ~WM_MASK) | SDOOR_BITS); } --- 801,824 ---- } } ! /* convert a secret door into a normal door */ ! void ! cvt_sdoor_to_door(lev) struct rm *lev; { + int newmask = lev->doormask & ~WM_MASK; + #ifdef REINCARNATION if (Is_rogue_level(&u.uz)) ! /* rogue didn't have doors, only doorways */ ! newmask = D_NODOOR; else #endif ! /* newly exposed door is closed */ ! if (!(newmask & D_LOCKED)) newmask |= D_CLOSED; ! ! lev->typ = DOOR; ! lev->doormask = newmask; } *************** *** 825,832 **** register struct monst *mtmp; if(levl[zx][zy].typ == SDOOR) { ! levl[zx][zy].typ = DOOR; ! levl[zx][zy].doormask = exposed_sdoor_mask(&levl[zx][zy]); newsym(zx, zy); (*(int*)num)++; } else if(levl[zx][zy].typ == SCORR) { --- 831,837 ---- register struct monst *mtmp; if(levl[zx][zy].typ == SDOOR) { ! cvt_sdoor_to_door(&levl[zx][zy]); /* .typ = DOOR */ newsym(zx, zy); (*(int*)num)++; } else if(levl[zx][zy].typ == SCORR) { *************** *** 873,882 **** } if(levl[zx][zy].typ == SDOOR || (levl[zx][zy].typ == DOOR && (levl[zx][zy].doormask & (D_CLOSED|D_LOCKED)))) { ! if(levl[zx][zy].typ == SDOOR) { ! levl[zx][zy].typ = DOOR; ! levl[zx][zy].doormask = exposed_sdoor_mask(&levl[zx][zy]); ! } if(levl[zx][zy].doormask & D_TRAPPED) { if(distu(zx, zy) < 3) b_trapped("door", 0); else Norep("You %s an explosion!", --- 878,885 ---- } if(levl[zx][zy].typ == SDOOR || (levl[zx][zy].typ == DOOR && (levl[zx][zy].doormask & (D_CLOSED|D_LOCKED)))) { ! if(levl[zx][zy].typ == SDOOR) ! cvt_sdoor_to_door(&levl[zx][zy]); /* .typ = DOOR */ if(levl[zx][zy].doormask & D_TRAPPED) { if(distu(zx, zy) < 3) b_trapped("door", 0); else Norep("You %s an explosion!", *************** *** 965,972 **** if (Blind && !aflag) feel_location(x,y); if(levl[x][y].typ == SDOOR) { if(rnl(7-fund)) continue; ! levl[x][y].typ = DOOR; ! levl[x][y].doormask = exposed_sdoor_mask(&levl[x][y]); exercise(A_WIS, TRUE); nomul(0); if (Blind && !aflag) --- 968,974 ---- if (Blind && !aflag) feel_location(x,y); if(levl[x][y].typ == SDOOR) { if(rnl(7-fund)) continue; ! cvt_sdoor_to_door(&levl[x][y]); /* .typ = DOOR */ exercise(A_WIS, TRUE); nomul(0); if (Blind && !aflag) *************** *** 1009,1016 **** nomul(0); if (trap->ttyp == STATUE_TRAP) { ! activate_statue_trap(trap, x, y); ! if (MON_AT(x, y)) exercise(A_WIS, TRUE); return(1); } else { You("find %s.", an(defsyms[ --- 1011,1018 ---- nomul(0); if (trap->ttyp == STATUE_TRAP) { ! if (activate_statue_trap(trap, x, y, FALSE)) ! exercise(A_WIS, TRUE); return(1); } else { You("find %s.", an(defsyms[ *** Old/src/dig.c Tue Dec 10 16:40:31 1996 --- src/dig.c Tue Aug 13 13:05:07 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)dig.c 3.2 96/04/21 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)dig.c 3.2 96/07/28 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 139,145 **** boolean verbose; int x, y; { ! struct trap *ttmp; if (On_stairs(x, y)) { if (x == xdnladder || x == xupladder) { --- 139,145 ---- boolean verbose; int x, y; { ! struct trap *ttmp = t_at(x, y); if (On_stairs(x, y)) { if (x == xdnladder || x == xupladder) { *************** *** 159,175 **** } else if (Is_waterlevel(&u.uz)) { if(verbose) pline_The("water splashes and subsides."); return(FALSE); ! } else if ((IS_WALL(levl[x][y].typ) ! && (levl[x][y].wall_info & W_NONDIGGABLE) != 0) ! || ((ttmp = t_at(x, y)) != 0 && ! (ttmp->ttyp == MAGIC_PORTAL || !Can_dig_down(&u.uz)))) { if(verbose) pline_The("%s here is too hard to dig in.", surface(x,y)); return(FALSE); } else if (sobj_at(BOULDER, x, y)) { if(verbose) pline("There isn't enough room to dig here."); return(FALSE); ! } else if (madeby == BY_OBJECT && (is_pool(x,y) || is_lava(x,y))) { /* digging by player handles pools separately */ return FALSE; } --- 159,178 ---- } else if (Is_waterlevel(&u.uz)) { if(verbose) pline_The("water splashes and subsides."); return(FALSE); ! } else if ((IS_WALL(levl[x][y].typ) && ! (levl[x][y].wall_info & W_NONDIGGABLE) != 0) ! || (ttmp && ! (ttmp->ttyp == MAGIC_PORTAL || !Can_dig_down(&u.uz)))) { if(verbose) pline_The("%s here is too hard to dig in.", surface(x,y)); return(FALSE); } else if (sobj_at(BOULDER, x, y)) { if(verbose) pline("There isn't enough room to dig here."); return(FALSE); ! } else if (madeby == BY_OBJECT && ! /* the block against existing traps is mainly to ! prevent broken wands from turning holes into pits */ ! (ttmp || is_pool(x,y) || is_lava(x,y))) { /* digging by player handles pools separately */ return FALSE; } *************** *** 293,300 **** } digtxt = "You make an opening in the wall."; } else if(lev->typ == SDOOR) { ! lev->typ = DOOR; ! lev->doormask = exposed_sdoor_mask(lev); digtxt = "You break through a secret door!"; if(!(lev->doormask & D_TRAPPED)) lev->doormask = D_BROKEN; --- 296,302 ---- } digtxt = "You make an opening in the wall."; } else if(lev->typ == SDOOR) { ! cvt_sdoor_to_door(lev); /* ->typ = DOOR */ digtxt = "You break through a secret door!"; if(!(lev->doormask & D_TRAPPED)) lev->doormask = D_BROKEN; *************** *** 679,685 **** register int rx, ry; int dig_target, res = 0; register const char *sdp; ! if(flags.num_pad) sdp = ndir; else sdp = sdir; /* DICE workaround */ if (obj != uwep) { if (!wield_tool(obj)) return(0); --- 681,687 ---- register int rx, ry; int dig_target, res = 0; register const char *sdp; ! if(iflags.num_pad) sdp = ndir; else sdp = sdir; /* DICE workaround */ if (obj != uwep) { if (!wield_tool(obj)) return(0); *************** *** 820,829 **** int pile; here = &levl[mtmp->mx][mtmp->my]; ! if (here->typ == SDOOR) { ! here->typ = DOOR; ! here->doormask = exposed_sdoor_mask(here); ! } /* Eats away door if present & closed or locked */ if (closed_door(mtmp->mx, mtmp->my)) { --- 822,829 ---- int pile; here = &levl[mtmp->mx][mtmp->my]; ! if (here->typ == SDOOR) ! cvt_sdoor_to_door(here); /* ->typ = DOOR */ /* Eats away door if present & closed or locked */ if (closed_door(mtmp->mx, mtmp->my)) { *** Old/src/do.c Tue Dec 10 16:40:43 1996 --- src/do.c Sat Oct 26 14:53:02 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)do.c 3.2 96/03/09 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)do.c 3.2 96/06/28 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 20,32 **** extern int errno; #endif - #ifdef USE_TILES - # ifdef MSDOS - extern boolean tiles_on; /* video.c */ - # endif - #endif - - #ifdef SINKS # ifdef OVLB static void FDECL(trycall, (struct obj *)); --- 20,25 ---- *************** *** 285,295 **** pline_The("water's force seems %ser now.", (obj->spe<0) ? "small" : "great"); break; default: ideed = FALSE; break; } ! if(!Blind && !ideed) { ideed = TRUE; switch(obj->otyp) { /* effects that need eyes */ case RIN_ADORNMENT: --- 278,302 ---- pline_The("water's force seems %ser now.", (obj->spe<0) ? "small" : "great"); break; + case RIN_HUNGER: + ideed = FALSE; + for(otmp = level.objects[u.ux][u.uy]; otmp; otmp = otmp2) { + otmp2 = otmp->nexthere; + if(otmp != uball && otmp != uchain) { + if (!Blind) { + pline("Suddenly, %s vanishes from the sink!", + doname(otmp)); + ideed = TRUE; + } + delobj(otmp); + } + } + break; default: ideed = FALSE; break; } ! if(!Blind && !ideed && obj->otyp != RIN_HUNGER) { ideed = TRUE; switch(obj->otyp) { /* effects that need eyes */ case RIN_ADORNMENT: *************** *** 307,324 **** case RIN_STEALTH: pline_The("sink seems to blend into the floor for a moment."); break; - case RIN_HUNGER: - ideed = FALSE; - for(otmp = level.objects[u.ux][u.uy]; otmp; otmp = otmp2) { - otmp2 = otmp->nexthere; - if(otmp != uball && otmp != uchain) { - pline("Suddenly, %s vanishes from the sink!", - doname(otmp)); - delobj(otmp); - ideed = TRUE; - } - } - break; case RIN_FIRE_RESISTANCE: pline_The("hot water faucet flashes brightly for a moment."); break; --- 314,319 ---- *************** *** 417,423 **** return(0); if(obj == uwep) { if(welded(uwep)) { ! weldmsg(obj, FALSE); return(0); } setuwep((struct obj *)0); --- 412,418 ---- return(0); if(obj == uwep) { if(welded(uwep)) { ! weldmsg(obj); return(0); } setuwep((struct obj *)0); *************** *** 527,533 **** u_gold->nobj = invent; invent = u_gold; } ! if (retry) { all_categories = (retry == -2); } else if (flags.menu_style == MENU_FULL) { --- 522,528 ---- u_gold->nobj = invent; invent = u_gold; } ! if (retry) { all_categories = (retry == -2); } else if (flags.menu_style == MENU_FULL) { *************** *** 876,888 **** assign_rogue_graphics(Is_rogue_level(newlevel)); #endif #ifdef USE_TILES - # if defined(MSDOS) - if (flags.grmode) { - if (Is_rogue_level(newlevel) && tiles_on) - tiles_on = FALSE; - else tiles_on = TRUE; - } - # endif substitute_tiles(newlevel); #endif assign_level(&u.uz0, &u.uz); --- 871,876 ---- *************** *** 919,924 **** --- 907,915 ---- getlev(fd, hackpid, new_ledger, FALSE); (void) close(fd); } + /* do this prior to level-change pline messages */ + vision_reset(); /* clear old level's line-of-sight */ + vision_full_recalc = 0; /* don't let that reenable vision yet */ if (portal && !In_endgame(&u.uz)) { /* find the portal on the new level */ *** Old/src/do_name.c Tue Dec 10 16:40:47 1996 --- src/do_name.c Mon Nov 25 17:43:19 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)do_name.c 3.2 96/05/05 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)do_name.c 3.2 96/10/28 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 18,24 **** int sidx, tx, ty; boolean msg_given = TRUE; /* clear message window by default */ const char *sdp; ! if(flags.num_pad) sdp = ndir; else sdp = sdir; /* DICE workaround */ if (flags.verbose) { pline("(For instructions type a ?)"); --- 18,24 ---- int sidx, tx, ty; boolean msg_given = TRUE; /* clear message window by default */ const char *sdp; ! if(iflags.num_pad) sdp = ndir; else sdp = sdir; /* DICE workaround */ if (flags.verbose) { pline("(For instructions type a ?)"); *************** *** 67,73 **** char sbuf[80]; winid tmpwin = create_nhwindow(NHW_MENU); Sprintf(sbuf, "Use [%s] to move the cursor to %s.", ! flags.num_pad ? "2468" : "hjkl", goal); putstr(tmpwin, 0, sbuf); putstr(tmpwin, 0, "Use [HJKL] to move the cursor 8 units at a time."); --- 67,73 ---- char sbuf[80]; winid tmpwin = create_nhwindow(NHW_MENU); Sprintf(sbuf, "Use [%s] to move the cursor to %s.", ! iflags.num_pad ? "2468" : "hjkl", goal); putstr(tmpwin, 0, sbuf); putstr(tmpwin, 0, "Use [HJKL] to move the cursor 8 units at a time."); *************** *** 116,122 **** pline("Unknown direction: '%s' (%s).", visctrl((char)c), !force ? "aborted" : ! flags.num_pad ? "use 2468 or ." : "use hjkl or ."); msg_given = TRUE; } /* k => matching */ } /* !quitchars */ --- 116,122 ---- pline("Unknown direction: '%s' (%s).", visctrl((char)c), !force ? "aborted" : ! iflags.num_pad ? "use 2468 or ." : "use hjkl or ."); msg_given = TRUE; } /* k => matching */ } /* !quitchars */ *************** *** 210,223 **** pline("I see no monster there."); return(0); } ! Sprintf(qbuf, "What do you want to call %s?", x_monnam(mtmp, 0, ! (char *)0, 1)); getlin(qbuf,buf); if(!*buf || *buf == '\033') return(0); /* strip leading and trailing spaces; unnames monster if all spaces */ (void)mungspaces(buf); ! if (type_is_pname(mtmp->data)) pline("%s doesn't like being called names!", Monnam(mtmp)); else (void) christen_monst(mtmp, buf); return(0); --- 210,227 ---- pline("I see no monster there."); return(0); } ! /* special case similar to the one in lookat() */ ! if (mtmp->data != &mons[PM_HIGH_PRIEST]) ! Strcpy(buf, x_monnam(mtmp, 0, (char *)0, 1)); ! else ! Sprintf(buf, "the high priest%s", mtmp->female ? "ess" : ""); ! Sprintf(qbuf, "What do you want to call %s?", buf); getlin(qbuf,buf); if(!*buf || *buf == '\033') return(0); /* strip leading and trailing spaces; unnames monster if all spaces */ (void)mungspaces(buf); ! if (mtmp->iswiz || type_is_pname(mtmp->data)) pline("%s doesn't like being called names!", Monnam(mtmp)); else (void) christen_monst(mtmp, buf); return(0); *************** *** 297,303 **** precedes this `if' statement, a gcc bug will miscompile the test on vax (`insv' instruction used to store bitfield does not set condition codes, but optimizer behaves as if it did). ! gcc-2.8.0 should finally fix this.... */ if (oname_size) { if (name) Strcpy(ONAME(otmp), name); --- 301,307 ---- precedes this `if' statement, a gcc bug will miscompile the test on vax (`insv' instruction used to store bitfield does not set condition codes, but optimizer behaves as if it did). ! gcc-2.7.2.1 finally fixed this. */ if (oname_size) { if (name) Strcpy(ONAME(otmp), name); *************** *** 450,461 **** #ifdef OEXTRA otemp.oxlth = 0; #endif ! if (objects[otemp.otyp].oc_class == POTION_CLASS && otemp.corpsenm) { ! /* kludge, meaning it's sink water */ ! Sprintf(qbuf,"Call a stream of %s fluid:", ! OBJ_DESCR(objects[otemp.otyp])); ! } else ! Sprintf(qbuf, "Call %s:", an(xname(&otemp))); getlin(qbuf, buf); if(!*buf || *buf == '\033') return; --- 454,465 ---- #ifdef OEXTRA otemp.oxlth = 0; #endif ! if (objects[otemp.otyp].oc_class == POTION_CLASS && otemp.corpsenm) ! /* kludge, meaning it's sink water */ ! Sprintf(qbuf,"Call a stream of %s fluid:", ! OBJ_DESCR(objects[otemp.otyp])); ! else ! Sprintf(qbuf, "Call %s:", an(xname(&otemp))); getlin(qbuf, buf); if(!*buf || *buf == '\033') return; *************** *** 467,477 **** /* strip leading and trailing spaces; uncalls item if all spaces */ (void)mungspaces(buf); if (!*buf) { ! if (*str1) /* had name, so possibly remove from disco[] */ ! undiscover_object(obj->otyp), *str1 = (char *)0; } else { ! *str1 = strcpy((char *) alloc((unsigned)strlen(buf)+1), buf); ! discover_object(obj->otyp, FALSE); /* possibly add to disco[] */ } } --- 471,485 ---- /* strip leading and trailing spaces; uncalls item if all spaces */ (void)mungspaces(buf); if (!*buf) { ! if (*str1) { /* had name, so possibly remove from disco[] */ ! /* strip name first, for the update_inventory() call ! from undiscover_object() */ ! *str1 = (char *)0; ! undiscover_object(obj->otyp); ! } } else { ! *str1 = strcpy((char *) alloc((unsigned)strlen(buf)+1), buf); ! discover_object(obj->otyp, FALSE); /* possibly add to disco[] */ } } *************** *** 525,531 **** buf[0] = '\0'; if (mtmp->ispriest || mtmp->isminion) { ! name = priestname(mtmp); if ((trunam || article == 3) && !strncmp(name, "the ", 4)) name += 4; return strcpy(buf, name); --- 533,541 ---- buf[0] = '\0'; if (mtmp->ispriest || mtmp->isminion) { ! char priestnambuf[BUFSZ]; ! ! name = priestname(mtmp, priestnambuf); if ((trunam || article == 3) && !strncmp(name, "the ", 4)) name += 4; return strcpy(buf, name); *** Old/src/do_wear.c Tue Dec 10 16:40:51 1996 --- src/do_wear.c Tue Aug 13 12:00:39 1996 *************** *** 1127,1133 **** * welded to your hand, not armor if(welded(otmp)) { if(!err++) ! weldmsg(otmp, FALSE); } */ if(err) return(0); --- 1127,1133 ---- * welded to your hand, not armor if(welded(otmp)) { if(!err++) ! weldmsg(otmp); } */ if(err) return(0); *************** *** 1184,1190 **** return(0); } if(welded(otmp)) { ! weldmsg(otmp, TRUE); return(0); } if(otmp == uwep) --- 1184,1190 ---- return(0); } if(welded(otmp)) { ! weldmsg(otmp); return(0); } if(otmp == uwep) *** Old/src/dog.c Tue Dec 10 16:40:56 1996 --- src/dog.c Mon Oct 21 22:41:37 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)dog.c 3.2 96/02/11 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)dog.c 3.2 96/10/20 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 99,104 **** --- 99,107 ---- mtmp->mpeaceful = 0; } } + /* if figurine has been named, give same name to the monster */ + if (otmp->onamelth) + mtmp = christen_monst(mtmp, ONAME(otmp)); } set_malign(mtmp); /* more alignment changes */ newsym(mtmp->mx, mtmp->my); *************** *** 198,203 **** --- 201,215 ---- _after_ the current level has been fully set up; see dochug() */ mtmp->mstrategy |= STRAT_ARRIVE; + /* make sure mnexto(rloc_to(set_apparxy())) doesn't use stale data */ + mtmp->mux = u.ux, mtmp->muy = u.uy; + xyloc = mtmp->mtrack[0].x; + xyflags = mtmp->mtrack[0].y; + xlocale = mtmp->mtrack[1].x; + ylocale = mtmp->mtrack[1].y; + mtmp->mtrack[0].x = mtmp->mtrack[0].y = 0; + mtmp->mtrack[1].x = mtmp->mtrack[1].y = 0; + if (with_you) { mnexto(mtmp); return; *************** *** 208,221 **** * specify its final destination. */ - xyloc = mtmp->mtrack[0].x; - xyflags = mtmp->mtrack[0].y; - xlocale = mtmp->mtrack[1].x; - ylocale = mtmp->mtrack[1].y; - mtmp->mtrack[0].x = mtmp->mtrack[0].y = 0; - mtmp->mtrack[1].x = mtmp->mtrack[1].y = 0; - mtmp->mux = u.ux, mtmp->muy = u.uy; /* not really req'd */ - if (mtmp->mlstmv < monstermoves - 1L) { /* heal monster for time spent in limbo */ long nmv = monstermoves - 1L - mtmp->mlstmv; --- 220,225 ---- *************** *** 246,259 **** case MIGR_SSTAIRS: xlocale = sstairs.sx, ylocale = sstairs.sy; break; case MIGR_PORTAL: for (t = ftrap; t; t = t->ntrap) if (t->ttyp == MAGIC_PORTAL) break; if (t) { xlocale = t->tx, ylocale = t->ty; break; } else { ! if (!In_endgame(&u.uz)) ! impossible("mon_arrive: no corresponding portal?"); } /*FALLTHRU*/ default: case MIGR_RANDOM: xlocale = ylocale = 0; --- 250,273 ---- case MIGR_SSTAIRS: xlocale = sstairs.sx, ylocale = sstairs.sy; break; case MIGR_PORTAL: + if (In_endgame(&u.uz)) { + /* there is no arrival portal for endgame levels */ + /* BUG[?]: for simplicity, this code relies on the fact + that we know that the current endgame levels always + build upwards and never have any exclusion subregion + inside their TELEPORT_REGION settings. */ + xlocale = rn1(updest.hx - updest.lx + 1, updest.lx); + ylocale = rn1(updest.hy - updest.ly + 1, updest.ly); + break; + } + /* find the arrival portal */ for (t = ftrap; t; t = t->ntrap) if (t->ttyp == MAGIC_PORTAL) break; if (t) { xlocale = t->tx, ylocale = t->ty; break; } else { ! impossible("mon_arrive: no corresponding portal?"); } /*FALLTHRU*/ default: case MIGR_RANDOM: xlocale = ylocale = 0; *** Old/src/dokick.c Tue Dec 10 16:41:03 1996 --- src/dokick.c Mon Oct 21 22:12:10 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)dokick.c 3.2 96/05/04 */ /* Copyright (c) Izchak Miller, Mike Stephenson, Steve Linhart, 1989. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)dokick.c 3.2 96/10/12 */ /* Copyright (c) Izchak Miller, Mike Stephenson, Steve Linhart, 1989. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 31,36 **** --- 31,39 ---- { register int mdx, mdy; register int dmg = ( ACURRSTR + ACURR(A_DEX) + ACURR(A_CON) )/ 15; + #ifdef WEAPON_SKILLS + int kick_skill = P_NO_TYPE; + #endif /* excessive wt affects dex, so it affects dmg */ if(clumsy) dmg = dmg/2; *************** *** 61,66 **** --- 64,72 ---- if (dmg > 0) { /* convert potential damage to actual damage */ dmg = rnd(dmg); + #ifdef WEAPON_SKILLS + if (dmg > 1 && martial()) kick_skill = P_MARTIAL_ARTS; + #endif if (martial()) dmg += rn2(ACURR(A_DEX)/2 + 1); } dmg += u.udaminc; /* add ring(s) of increase damage */ *************** *** 84,92 **** (void) passive(mon, TRUE, mon->mhp > 0, TRUE); if (mon->mhp <= 0) killed(mon); /* may bring up a dialog, so put this after all messages */ ! if (dmg > 1 && martial_bonus()) /* exercise proficiency */ ! use_skill(P_MARTIAL_ARTS); } static void --- 90,100 ---- (void) passive(mon, TRUE, mon->mhp > 0, TRUE); if (mon->mhp <= 0) killed(mon); + #ifdef WEAPON_SKILLS /* may bring up a dialog, so put this after all messages */ ! if (kick_skill != P_NO_TYPE) /* exercise proficiency */ ! use_skill(kick_skill); ! #endif } static void *************** *** 178,185 **** (can_teleport(mon->data) ? "teleports" : is_floater(mon->data) ? "floats" : is_flyer(mon->data) ? "flutters" : ! nolimbs(mon->data) ? "slides" : ! "jumps"), clumsy ? "easily" : "nimbly", clumsy ? "clumsy " : ""); (void) passive(mon, FALSE, 1, TRUE); --- 186,193 ---- (can_teleport(mon->data) ? "teleports" : is_floater(mon->data) ? "floats" : is_flyer(mon->data) ? "flutters" : ! (nolimbs(mon->data) || slithy(mon->data)) ? ! "slides" : "jumps"), clumsy ? "easily" : "nimbly", clumsy ? "clumsy " : ""); (void) passive(mon, FALSE, 1, TRUE); *************** *** 303,308 **** --- 311,328 ---- return(1); } + if(kickobj->otyp == CORPSE && kickobj->corpsenm == PM_COCKATRICE + && !resists_ston(&youmonst) && !uarmf) { + You("kick the cockatrice corpse with your bare %s.", + makeplural(body_part(FOOT))); + if (!(poly_when_stoned(uasmon) && polymon(PM_STONE_GOLEM))) { + You("turn to stone..."); + killer_format = KILLED_BY; + killer = "kicking a cockatrice corpse without boots"; + done(STONING); + } + } + /* range < 2 means the object will not move. */ /* maybe dexterity should also figure here. */ range = (int)((ACURRSTR)/2 - kickobj->owt/40); *************** *** 437,459 **** surface(x,y)); obj_extract_self(kickobj); newsym(x, y); mon = bhit(u.dx, u.dy, range, KICKED_WEAPON, (int (*)()) 0, (int (*)()) 0, kickobj); - /* We check for whether the object falls down the stairs by - * calling ship_object() from bhit(). This is necessary so that if - * the object doesn't fall, we can continue bhit() by moving the - * object the rest of the way. If it does fall, bhit() returns at - * the fall position (which must have stairs at it). This is somewhat - * ugly (for instance, we need to duplicate the shop check within - * bhit()), and we really should be checking _whether_ it falls in there - * and only doing the actual fall here, but this would take a lot of - * rewriting. - */ - if (!mon && down_gate(bhitpos.x, bhitpos.y) != MIGR_NOWHERE) - return 1; - if(mon) { if (mon->isshk && kickobj->where == OBJ_MINVENT && kickobj->ocarry == mon) --- 457,467 ---- surface(x,y)); obj_extract_self(kickobj); + (void) snuff_candle(kickobj); newsym(x, y); mon = bhit(u.dx, u.dy, range, KICKED_WEAPON, (int (*)()) 0, (int (*)()) 0, kickobj); if(mon) { if (mon->isshk && kickobj->where == OBJ_MINVENT && kickobj->ocarry == mon) *************** *** 465,470 **** --- 473,483 ---- thitmonst(mon, kickobj)) /* hit && used up? */ return(1); } + + /* the object might have fallen down a hole */ + if (kickobj->where == OBJ_MIGRATING) + return 1; + bhitroom = *in_rooms(bhitpos.x, bhitpos.y, SHOPBASE); if (costly && (!costly_spot(bhitpos.x, bhitpos.y) || *in_rooms(x, y, SHOPBASE) != bhitroom)) { *************** *** 513,529 **** boolean no_kick = FALSE; char buf[BUFSZ]; ! if (nolimbs(uasmon)) { You("have no legs to kick with."); no_kick = TRUE; } else if (verysmall(uasmon)) { You("are too small to do any kicking."); no_kick = TRUE; } else if (Wounded_legs) { ! Your("%s %s in no shape for kicking.", ! ((Wounded_legs & BOTH_SIDES)==BOTH_SIDES) ! ? (const char *)makeplural(body_part(LEG)) : body_part(LEG), ! ((Wounded_legs & BOTH_SIDES)==BOTH_SIDES) ? "are" : "is"); no_kick = TRUE; } else if (near_capacity() > SLT_ENCUMBER) { Your("load is too heavy to balance yourself for a kick."); --- 526,547 ---- boolean no_kick = FALSE; char buf[BUFSZ]; ! if (nolimbs(uasmon) || slithy(uasmon)) { You("have no legs to kick with."); no_kick = TRUE; } else if (verysmall(uasmon)) { You("are too small to do any kicking."); no_kick = TRUE; } else if (Wounded_legs) { ! /* note: dojump() has similar code */ ! long wl = (Wounded_legs & BOTH_SIDES); ! const char *bp = body_part(LEG); ! ! if (wl == BOTH_SIDES) bp = makeplural(bp); ! Your("%s%s %s in no shape for kicking.", ! (wl == LEFT_SIDE) ? "left " : ! (wl == RIGHT_SIDE) ? "right " : "", ! bp, (wl == BOTH_SIDES) ? "are" : "is"); no_kick = TRUE; } else if (near_capacity() > SLT_ENCUMBER) { Your("load is too heavy to balance yourself for a kick."); *************** *** 557,562 **** --- 575,581 ---- x = u.ux + u.dx; y = u.uy + u.dy; + avrg_attrib = (ACURRSTR+ACURR(A_DEX)+ACURR(A_CON))/3; if(u.uswallow) { *************** *** 571,576 **** --- 590,611 ---- } return(1); } + if (Levitation) { + int xx, yy; + + xx = u.ux - u.dx; + yy = u.uy - u.dy; + /* doors can be opened while levitating, so they must be + * reachable for bracing purposes + * Possible extension: allow bracing against stuff on the side? + */ + if (isok(xx,yy) && !IS_ROCK(levl[xx][yy].typ) && + !IS_DOOR(levl[xx][yy].typ) && + (!Is_airlevel(&u.uz) || !OBJ_AT(xx,yy))) { + You("have nothing to brace yourself against."); + return(0); + } + } wake_nearby(); u_wipe_engr(2); *************** *** 618,637 **** if(!IS_DOOR(maploc->typ)) { if(maploc->typ == SDOOR) { if(!Levitation && rn2(30) < avrg_attrib) { ! pline("Crash! You kick open a secret door!"); exercise(A_DEX, TRUE); - maploc->typ = DOOR; - maploc->doormask = exposed_sdoor_mask(maploc); if(maploc->doormask & D_TRAPPED) { maploc->doormask = D_NODOOR; b_trapped("door", FOOT); ! } else if (maploc->doormask != D_NODOOR) maploc->doormask = D_ISOPEN; if (Blind) feel_location(x,y); /* we know its gone */ else newsym(x,y); ! unblock_point(x,y); /* vision */ return(1); } else goto ouch; } --- 653,678 ---- if(!IS_DOOR(maploc->typ)) { if(maploc->typ == SDOOR) { if(!Levitation && rn2(30) < avrg_attrib) { ! cvt_sdoor_to_door(maploc); /* ->typ = DOOR */ ! pline("Crash! %s a secret door!", ! /* don't "kick open" when it's locked ! unless it also happens to be trapped */ ! (maploc->doormask & (D_LOCKED|D_TRAPPED)) == D_LOCKED ? ! "Your kick uncovers" : "You kick open"); exercise(A_DEX, TRUE); if(maploc->doormask & D_TRAPPED) { maploc->doormask = D_NODOOR; b_trapped("door", FOOT); ! } else if (maploc->doormask != D_NODOOR && ! !(maploc->doormask & D_LOCKED)) maploc->doormask = D_ISOPEN; if (Blind) feel_location(x,y); /* we know its gone */ else newsym(x,y); ! if (maploc->doormask == D_ISOPEN || ! maploc->doormask == D_NODOOR) ! unblock_point(x,y); /* vision */ return(1); } else goto ouch; } *************** *** 641,647 **** exercise(A_DEX, TRUE); maploc->typ = CORR; if (Blind) ! feel_location(x,y); /* we known its gone */ else newsym(x,y); unblock_point(x,y); /* vision */ --- 682,688 ---- exercise(A_DEX, TRUE); maploc->typ = CORR; if (Blind) ! feel_location(x,y); /* we known it's gone */ else newsym(x,y); unblock_point(x,y); /* vision */ *************** *** 981,1002 **** dct += obj->quan; } ! if (dct) { /* at least one object fell */ const char *what = (dct == 1L ? "object falls" : "objects fall"); if (missile) pline("From the impact, %sother %s.", ! dct == oct ? "the " : dct == 1L ? "an" : "", what); else ! if (oct == dct) { ! pline("%s adjacent %s %s.", ! dct == 1L ? "The" : "All the", ! what, gate_str); ! } else { ! pline("%s adjacent %s %s.", ! dct == 1L ? "One of the" : "Some of the", ! dct == 1L ? "objects falls" : what, ! gate_str); ! } } if(costly && shkp && price) { --- 1022,1040 ---- dct += obj->quan; } ! if (dct && cansee(x,y)) { /* at least one object fell */ const char *what = (dct == 1L ? "object falls" : "objects fall"); + if (missile) pline("From the impact, %sother %s.", ! dct == oct ? "the " : dct == 1L ? "an" : "", what); ! else if (oct == dct) ! pline("%s adjacent %s %s.", ! dct == 1L ? "The" : "All the", what, gate_str); else ! pline("%s adjacent %s %s.", ! dct == 1L ? "One of the" : "Some of the", ! dct == 1L ? "objects falls" : what, gate_str); } if(costly && shkp && price) { *************** *** 1067,1073 **** return FALSE; /* let caller finish the drop */ } ! otransit_msg(otmp, nodrop, n); if (nodrop) { if (impact) impact_drop(otmp, x, y, 0); --- 1105,1112 ---- return FALSE; /* let caller finish the drop */ } ! if (cansee(x, y)) ! otransit_msg(otmp, nodrop, n); if (nodrop) { if (impact) impact_drop(otmp, x, y, 0); *** Old/src/dothrow.c Tue Dec 10 16:41:07 1996 --- src/dothrow.c Mon Oct 28 23:28:19 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)dothrow.c 3.2 96/05/17 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)dothrow.c 3.2 96/10/28 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 66,72 **** if(obj == uwep) { if(welded(obj)) { ! weldmsg(obj, FALSE); return(1); } if(obj->quan > 1L) --- 66,72 ---- if(obj == uwep) { if(welded(obj)) { ! weldmsg(obj); return(1); } if(obj->quan > 1L) *************** *** 237,243 **** struct obj *obj; boolean hitsroof; { - int do_death = 0; const char *almost; /* note: obj->quan == 1 */ --- 237,242 ---- *************** *** 257,313 **** /* object now hits you */ ! if (obj->oclass != POTION_CLASS /* potions have hit handling below */ ! && breaktest(obj)) { ! int otyp = obj->otyp; int blindinc; breakmsg(obj, !Blind); breakobj(obj, u.ux, u.uy, TRUE, TRUE); ! /* obj is now gone */ switch (otyp) { ! case EGG: ! case CREAM_PIE: ! case BLINDING_VENOM: ! pline("You've got it all over your face!"); ! blindinc = rnd(25); ! if (blindinc && !Blindfolded) { ! if (otyp != BLINDING_VENOM) ! u.ucreamed += blindinc; ! else if (!Blind) ! pline("It blinds you!"); ! make_blinded(Blinded + blindinc, FALSE); ! } ! break; } return FALSE; ! } ! if(obj->oclass == POTION_CLASS) ! potionhit(&youmonst, obj); ! else { ! int dmg = rnd((int)(obj->owt)); ! ! if (uarmh) { ! if(is_metallic(uarmh)) { ! pline("Fortunately, you are wearing a hard helmet."); ! dmg = 1; ! } else if (flags.verbose) ! Your("%s does not protect you.", xname(uarmh)); ! } else if (obj->otyp == CORPSE && ! obj->corpsenm == PM_COCKATRICE) { ! if (!resists_ston(&youmonst) && ! !(poly_when_stoned(uasmon) && ! polymon(PM_STONE_GOLEM))) { ! killer = doname(obj); ! You("turn to stone."); ! do_death = STONING; ! } ! } ! hitfloor(obj); ! if (do_death == STONING) ! done(STONING); ! else ! losehp(dmg, "falling object", KILLED_BY_AN); } return TRUE; } --- 256,328 ---- /* object now hits you */ ! if (obj->oclass == POTION_CLASS) { ! potionhit(&youmonst, obj); ! } else if (breaktest(obj)) { ! int otyp = obj->otyp, ocorpsenm = obj->corpsenm; int blindinc; breakmsg(obj, !Blind); breakobj(obj, u.ux, u.uy, TRUE, TRUE); ! obj = 0; /* it's now gone */ switch (otyp) { ! case EGG: ! if (ocorpsenm == PM_COCKATRICE && ! !uarmh && !resists_ston(&youmonst) && ! !(poly_when_stoned(uasmon) && polymon(PM_STONE_GOLEM))) ! goto petrify; ! case CREAM_PIE: ! case BLINDING_VENOM: ! pline("You've got it all over your face!"); ! blindinc = rnd(25); ! if (blindinc && !Blindfolded) { ! if (otyp != BLINDING_VENOM) ! u.ucreamed += blindinc; ! else if (!Blind) ! pline("It blinds you!"); ! make_blinded(Blinded + blindinc, FALSE); ! } ! break; ! default: ! break; } return FALSE; ! } else { /* neither potion nor other breaking object */ ! boolean less_damage = uarmh && is_metallic(uarmh); ! int dmg = dmgval(obj, &youmonst); ! ! if (!dmg) { /* probably wasn't a weapon; base damage on weight */ ! dmg = (int) obj->owt / 100; ! if (dmg < 1) dmg = 1; ! else if (dmg > 6) dmg = 6; ! if (uasmon == &mons[PM_SHADE] && ! objects[obj->otyp].oc_material != SILVER) ! dmg = 0; ! } ! if (dmg > 1 && less_damage) dmg = 1; ! if (dmg > 0) dmg += u.udaminc; ! if (dmg < 0) dmg = 0; /* beware negative rings of increase damage */ ! ! if (uarmh) { ! if (less_damage && dmg < (Upolyd ? u.mh : u.uhp)) ! pline("Fortunately, you are wearing a hard helmet."); ! else if (flags.verbose && ! !(obj->otyp == CORPSE && obj->corpsenm == PM_COCKATRICE)) ! Your("%s does not protect you.", xname(uarmh)); ! } else if (obj->otyp == CORPSE && obj->corpsenm == PM_COCKATRICE) { ! if (!resists_ston(&youmonst) && ! !(poly_when_stoned(uasmon) && polymon(PM_STONE_GOLEM))) { ! petrify: ! killer_format = KILLED_BY; ! killer = "elementary physics"; /* "what goes up..." */ ! You("turn to stone."); ! if (obj) dropy(obj); /* bypass most of hitfloor() */ ! done(STONING); ! return obj ? TRUE : FALSE; ! } ! } ! hitfloor(obj); ! losehp(dmg, "falling object", KILLED_BY_AN); } return TRUE; } *************** *** 330,341 **** pline("%s misfires!", The(xname(obj))); else { /* only slip if it's greased or meant to be thrown */ ! if(obj->greased || ! objects[obj->otyp].oc_wepcat == WEP_MISSILE || ! objects[obj->otyp].oc_wepcat == WEP_SPEAR || ! (objects[obj->otyp].oc_wepcat == WEP_BLADE && ! (objects[obj->otyp].oc_dir & PIERCE)) || ! obj->otyp == WAR_HAMMER || obj->otyp == AKLYS) pline("%s slips as you throw it!", The(xname(obj))); else slipok = FALSE; } --- 345,359 ---- pline("%s misfires!", The(xname(obj))); else { /* only slip if it's greased or meant to be thrown */ ! if (obj->greased || ! (obj->oclass == WEAPON_CLASS && /* => oc_wepcat valid */ ! (objects[obj->otyp].oc_wepcat == WEP_MISSILE || ! objects[obj->otyp].oc_wepcat == WEP_SPEAR || ! (objects[obj->otyp].oc_wepcat == WEP_BLADE && ! (objects[obj->otyp].oc_dir & PIERCE)) || ! obj->otyp == WAR_HAMMER || obj->otyp == AKLYS))) ! /* BUG: this message is grammatically incorrect if obj has ! a plural name; greased gloves or boots for instance. */ pline("%s slips as you throw it!", The(xname(obj))); else slipok = FALSE; } *************** *** 378,384 **** } } else { urange = (int)(ACURRSTR)/2; ! range = urange - (int)(obj->owt/40); if (obj == uball) { if (u.ustuck) range = 1; else if (range >= 5) range = 5; --- 396,410 ---- } } else { urange = (int)(ACURRSTR)/2; ! /* balls are easy to throw or at least roll */ ! /* also, this insures the maximum range of a ball is greater ! * than 1, so the effects from throwing attached balls are ! * actually possible ! */ ! if (obj->otyp == HEAVY_IRON_BALL) ! range = urange - (int)(obj->owt/100); ! else ! range = urange - (int)(obj->owt/40); if (obj == uball) { if (u.ustuck) range = 1; else if (range >= 5) range = 5; *************** *** 710,723 **** miss(xname(obj), mon); } ! } else if ((otyp == EGG || otyp == CREAM_PIE ! || otyp == BLINDING_VENOM || otyp == ACID_VENOM) ! && ACURR(A_DEX) >= rnd(15)) { (void) hmon(mon, obj, 1); return 1; /* hmon used it up */ ! } else if (obj->oclass == POTION_CLASS && ((ACURR(A_DEX) >= rnd(15)) ! || guaranteed_hit)) { potionhit(mon, obj); return 1; --- 736,749 ---- miss(xname(obj), mon); } ! } else if ((otyp == EGG || otyp == CREAM_PIE || ! otyp == BLINDING_VENOM || otyp == ACID_VENOM) && ! (guaranteed_hit || ACURR(A_DEX) > rnd(25))) { (void) hmon(mon, obj, 1); return 1; /* hmon used it up */ ! } else if (obj->oclass == POTION_CLASS && ! (guaranteed_hit || ACURR(A_DEX) > rnd(25))) { potionhit(mon, obj); return 1; *** Old/src/drawing.c Tue Dec 10 16:41:11 1996 --- src/drawing.c Sat Oct 26 14:53:01 1996 *************** *** 646,653 **** * to the ISO 8859 character set. We should probably do a VioSetCp() call to * set the codepage to 437. */ ! flags.IBMgraphics = TRUE; ! flags.DECgraphics = FALSE; assign_graphics(ibm_graphics, SIZE(ibm_graphics), MAXPCHARS, 0); #ifdef PC9800 if (ibmgraphics_mode_callback) (*ibmgraphics_mode_callback)(); --- 646,653 ---- * to the ISO 8859 character set. We should probably do a VioSetCp() call to * set the codepage to 437. */ ! iflags.IBMgraphics = TRUE; ! iflags.DECgraphics = FALSE; assign_graphics(ibm_graphics, SIZE(ibm_graphics), MAXPCHARS, 0); #ifdef PC9800 if (ibmgraphics_mode_callback) (*ibmgraphics_mode_callback)(); *************** *** 659,666 **** /* * Use the VT100 line drawing character set. */ ! flags.DECgraphics = TRUE; ! flags.IBMgraphics = FALSE; assign_graphics(dec_graphics, SIZE(dec_graphics), MAXPCHARS, 0); if (decgraphics_mode_callback) (*decgraphics_mode_callback)(); break; --- 659,666 ---- /* * Use the VT100 line drawing character set. */ ! iflags.DECgraphics = TRUE; ! iflags.IBMgraphics = FALSE; assign_graphics(dec_graphics, SIZE(dec_graphics), MAXPCHARS, 0); if (decgraphics_mode_callback) (*decgraphics_mode_callback)(); break; *************** *** 757,765 **** */ # ifdef ASCIIGRAPH ! if (!flags.IBMgraphics # if defined(USE_TILES) && defined(MSDOS) ! || flags.grmode # endif ) { # endif --- 757,765 ---- */ # ifdef ASCIIGRAPH ! if (!iflags.IBMgraphics # if defined(USE_TILES) && defined(MSDOS) ! || iflags.grmode # endif ) { # endif *************** *** 813,821 **** for (i = 0; i < MAXOCLASSES; i++) { #ifdef ASCIIGRAPH ! if (flags.IBMgraphics # if defined(USE_TILES) && defined(MSDOS) ! && !flags.grmode # endif ) oc_syms[i] = IBM_r_oc_syms[i]; --- 813,821 ---- for (i = 0; i < MAXOCLASSES; i++) { #ifdef ASCIIGRAPH ! if (iflags.IBMgraphics # if defined(USE_TILES) && defined(MSDOS) ! && !iflags.grmode # endif ) oc_syms[i] = IBM_r_oc_syms[i]; *************** *** 823,829 **** #endif /* ASCIIGRAPH */ oc_syms[i] = r_oc_syms[i]; } ! } else { (void) memcpy((genericptr_t)showsyms, (genericptr_t)save_showsyms, sizeof showsyms); --- 823,831 ---- #endif /* ASCIIGRAPH */ oc_syms[i] = r_oc_syms[i]; } ! #if defined(MSDOS) ! if (iflags.grmode) tileview(FALSE); ! #endif } else { (void) memcpy((genericptr_t)showsyms, (genericptr_t)save_showsyms, sizeof showsyms); *************** *** 831,836 **** --- 833,841 ---- (genericptr_t)save_oc_syms, sizeof oc_syms); (void) memcpy((genericptr_t)monsyms, (genericptr_t)save_monsyms, sizeof monsyms); + #if defined(MSDOS) + if (iflags.grmode) tileview(TRUE); + #endif } } #endif /* REINCARNATION */ *** Old/src/dungeon.c Tue Dec 10 16:41:14 1996 --- src/dungeon.c Mon Jun 24 13:35:22 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)dungeon.c 3.2 96/05/10 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)dungeon.c 3.2 96/06/22 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 620,626 **** register s_level *x; struct proto_dungeon pd; struct level_map *lev_map; ! unsigned long vers_info[4]; pd.n_levs = pd.n_brs = 0; --- 620,626 ---- register s_level *x; struct proto_dungeon pd; struct level_map *lev_map; ! struct version_info vers_info; pd.n_levs = pd.n_brs = 0; *************** *** 629,636 **** panic("Cannot open dungeon description file \"%s\"!", DUNGEON_FILE); /* validate the data's version against the program's version */ ! Fread((genericptr_t) vers_info, sizeof vers_info, 1, dgn_file); ! if (!check_version(vers_info, DUNGEON_FILE, TRUE)) panic("Dungeon description not valid."); /* --- 629,636 ---- panic("Cannot open dungeon description file \"%s\"!", DUNGEON_FILE); /* validate the data's version against the program's version */ ! Fread((genericptr_t) &vers_info, sizeof vers_info, 1, dgn_file); ! if (!check_version(&vers_info, DUNGEON_FILE, TRUE)) panic("Dungeon description not valid."); /* *** Old/src/eat.c Tue Dec 10 16:41:18 1996 --- src/eat.c Mon Oct 21 22:10:37 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)eat.c 3.2 96/03/06 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)eat.c 3.2 96/09/14 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 19,24 **** --- 19,25 ---- STATIC_PTR int NDECL(unfaint); #ifdef OVLB + static const char *FDECL(food_xname, (struct obj *,BOOLEAN_P)); static void FDECL(choke, (struct obj *)); static void NDECL(recalc_wt); static struct obj *FDECL(touchfood, (struct obj *)); *************** *** 150,170 **** Bitfield(doreset,1); /* stop eating at end of turn */ } victual; STATIC_PTR int eatmdone() /* called after mimicing is over */ { ! u.usym = Upolyd ? uasmon->mlet : S_HUMAN; ! newsym(u.ux,u.uy); return 0; } /* Created by GAN 01/28/87 * Amended by AKP 09/22/87: if not hard, don't choke, just vomit. * Amended by 3. 06/12/89: if not hard, sometimes choke anyway, to keep risk. * 11/10/89: if hard, rarely vomit anyway, for slim chance. */ - /*ARGSUSED*/ static void choke(food) /* To a full belly all food is bad. (It.) */ register struct obj *food; --- 151,204 ---- Bitfield(doreset,1); /* stop eating at end of turn */ } victual; + static char *eatmbuf = 0; /* set by cpostfx() */ + STATIC_PTR int eatmdone() /* called after mimicing is over */ { ! /* release `eatmbuf' */ ! if (eatmbuf) { ! if (nomovemsg == eatmbuf) nomovemsg = 0; ! free((genericptr_t)eatmbuf), eatmbuf = 0; ! } ! /* update display */ ! if (u.usym == 0) { ! u.usym = Upolyd ? uasmon->mlet : S_HUMAN; ! newsym(u.ux,u.uy); ! } return 0; } + /* ``[the(] singular(food, xname) [)]'' with awareness of unique monsters */ + static const char * + food_xname(food, the_pfx) + struct obj *food; + boolean the_pfx; + { + const char *result; + int mnum = food->corpsenm; + + if (food->otyp == CORPSE && (mons[mnum].geno & G_UNIQ)) { + /* grab xname()'s modifiable return buffer for our own use */ + char *bufp = xname(food); + Sprintf(bufp, "%s%s corpse", + (the_pfx && !type_is_pname(&mons[mnum])) ? "the " : "", + s_suffix(mons[mnum].mname)); + result = bufp; + } else { + /* the ordinary case */ + result = singular(food, xname); + if (the_pfx) result = the(result); + } + return result; + } + /* Created by GAN 01/28/87 * Amended by AKP 09/22/87: if not hard, don't choke, just vomit. * Amended by 3. 06/12/89: if not hard, sometimes choke anyway, to keep risk. * 11/10/89: if hard, rarely vomit anyway, for slim chance. */ static void choke(food) /* To a full belly all food is bad. (It.) */ register struct obj *food; *************** *** 200,206 **** if (food->oclass == GOLD_CLASS) { killer = "a very rich meal"; } else { ! killer = singular(food, xname); } } else { You("choke over it."); --- 234,240 ---- if (food->oclass == GOLD_CLASS) { killer = "a very rich meal"; } else { ! killer = food_xname(food, FALSE); } } else { You("choke over it."); *************** *** 350,356 **** if (message) pline(nomovemsg); nomovemsg = 0; } else if (message) ! You("finish eating %s.", the(singular(victual.piece, xname))); if(victual.piece->otyp == CORPSE) cpostfx(victual.piece->corpsenm); --- 384,390 ---- if (message) pline(nomovemsg); nomovemsg = 0; } else if (message) ! You("finish eating %s.", food_xname(victual.piece, TRUE)); if(victual.piece->otyp == CORPSE) cpostfx(victual.piece->corpsenm); *************** *** 392,407 **** case PM_MEDUSA: if (!resists_ston(&youmonst) && !(poly_when_stoned(uasmon) && polymon(PM_STONE_GOLEM))) { ! char *cruft; /* killer is const char * */ ! killer_format = KILLED_BY; ! killer = cruft = (char *) /* sizeof "s" includes \0 */ ! alloc((unsigned) strlen(mons[pm].mname) ! + sizeof " meat"); ! Sprintf(cruft, "%s meat", mons[pm].mname); ! You("turn to stone."); ! done(STONING); ! } ! break; case PM_LIZARD: if (Stoned) fix_petrification = TRUE; break; --- 426,440 ---- case PM_MEDUSA: if (!resists_ston(&youmonst) && !(poly_when_stoned(uasmon) && polymon(PM_STONE_GOLEM))) { ! char kbuf[BUFSZ]; ! ! Sprintf(kbuf, "tasting %s meat", mons[pm].mname); ! killer_format = KILLED_BY; ! killer = kbuf; ! You("turn to stone."); ! done(STONING); ! } ! break; case PM_LIZARD: if (Stoned) fix_petrification = TRUE; break; *************** *** 691,696 **** --- 724,733 ---- { register int tmp = 0; + /* in case `afternmv' didn't get called for previously mimicking + gold, clean up now to avoid `eatmbuf' memory leak */ + if (eatmbuf) (void)eatmdone(); + switch(pm) { case PM_WRAITH: pluslvl(); *************** *** 705,711 **** u.ulycn = PM_WEREWOLF; break; case PM_NURSE: ! u.uhp = u.uhpmax; flags.botl = 1; break; case PM_STALKER: --- 742,749 ---- u.ulycn = PM_WEREWOLF; break; case PM_NURSE: ! if (Upolyd) u.mh = u.mhmax; ! else u.uhp = u.uhpmax; flags.botl = 1; break; case PM_STALKER: *************** *** 734,751 **** /* fall into next case */ case PM_SMALL_MIMIC: tmp += 20; ! if(u.usym == S_HUMAN) { You_cant("resist the temptation to mimic a pile of gold."); nomul(-tmp); afternmv = eatmdone; - if (Role_is('E')) - nomovemsg = "You now prefer mimicking an elf again."; - else - nomovemsg = "You now prefer mimicking a human again."; u.usym = 0; /* hack! no monster sym 0; use for gold */ newsym(u.ux,u.uy); curs_on_u(); ! flush_screen(0); /* make gold symbol show up now */ } break; case PM_QUANTUM_MECHANIC: --- 772,793 ---- /* fall into next case */ case PM_SMALL_MIMIC: tmp += 20; ! if (u.usym != S_MIMIC) { ! char buf[BUFSZ]; ! You_cant("resist the temptation to mimic a pile of gold."); nomul(-tmp); + Sprintf(buf, "You now prefer mimicking %s again.", + an(Upolyd ? uasmon->mname : + Role_is('E') ? "elf" : "human")); + eatmbuf = strcpy((char *) alloc(strlen(buf) + 1), buf); + nomovemsg = eatmbuf; afternmv = eatmdone; u.usym = 0; /* hack! no monster sym 0; use for gold */ newsym(u.ux,u.uy); curs_on_u(); ! /* make gold symbol show up now */ ! display_nhwindow(WIN_MAP, TRUE); } break; case PM_QUANTUM_MECHANIC: *************** *** 1038,1080 **** eatcorpse(otmp) /* called when a corpse is selected as food */ register struct obj *otmp; { ! register const char *cname = corpse_xname(otmp, TRUE); ! register int tp; ! long sick_time, rotted = 0L; ! ! tp = 0; ! if(otmp->corpsenm != PM_LIZARD) { long age = peek_at_iced_corpse_age(otmp); rotted = (monstermoves - age)/(10L + rn2(20)); ! if(otmp->cursed) rotted += 2L; else if (otmp->blessed) rotted -= 2L; } ! if(otmp->corpsenm != PM_ACID_BLOB && (rotted > 5L)) { ! char buf[BUFSZ]; pline("Ulch - that %s was tainted!", ! mons[otmp->corpsenm].mlet == S_FUNGUS ? "fungoid vegetation" : ! is_meaty(&mons[otmp->corpsenm]) ? "meat" : "protoplasm"); ! if (u.usym == S_FUNGUS) pline("It doesn't seem at all sickening, though..."); ! else { sick_time = (long) rn1(10, 10); /* make sure new ill doesn't result in improvement */ if (Sick && (sick_time > Sick)) sick_time = (Sick > 1L) ? Sick - 1L : 1L; ! Sprintf(buf, "rotted %s", cname); make_sick(sick_time, buf, TRUE, SICK_VOMITABLE); } if (carried(otmp)) useup(otmp); else useupf(otmp); return(1); ! } else if (acidic(&mons[otmp->corpsenm]) && !resists_acid(&youmonst)) { tp++; You("have a very bad case of stomach acid."); losehp(rnd(15), "acidic corpse", KILLED_BY_AN); ! } else if(poisonous(&mons[otmp->corpsenm]) && rn2(5)) { tp++; pline("Ecch - that must have been poisonous!"); if(!Poison_resistance) { --- 1080,1127 ---- eatcorpse(otmp) /* called when a corpse is selected as food */ register struct obj *otmp; { ! int tp = 0, mnum = otmp->corpsenm; ! long rotted = 0L; ! boolean uniq = !!(mons[mnum].geno & G_UNIQ); ! if (mnum != PM_LIZARD) { long age = peek_at_iced_corpse_age(otmp); rotted = (monstermoves - age)/(10L + rn2(20)); ! if (otmp->cursed) rotted += 2L; else if (otmp->blessed) rotted -= 2L; } ! if (mnum != PM_ACID_BLOB && rotted > 5L) { pline("Ulch - that %s was tainted!", ! mons[mnum].mlet == S_FUNGUS ? "fungoid vegetation" : ! is_meaty(&mons[mnum]) ? "meat" : "protoplasm"); ! if (u.usym == S_FUNGUS) { pline("It doesn't seem at all sickening, though..."); ! } else { ! char buf[BUFSZ]; ! long sick_time; ! sick_time = (long) rn1(10, 10); /* make sure new ill doesn't result in improvement */ if (Sick && (sick_time > Sick)) sick_time = (Sick > 1L) ? Sick - 1L : 1L; ! if (!uniq) ! Sprintf(buf, "rotted %s", corpse_xname(otmp,TRUE)); ! else ! Sprintf(buf, "%s%s rotted corpse", ! !type_is_pname(&mons[mnum]) ? "the " : "", ! s_suffix(mons[mnum].mname)); make_sick(sick_time, buf, TRUE, SICK_VOMITABLE); } if (carried(otmp)) useup(otmp); else useupf(otmp); return(1); ! } else if (acidic(&mons[mnum]) && !resists_acid(&youmonst)) { tp++; You("have a very bad case of stomach acid."); losehp(rnd(15), "acidic corpse", KILLED_BY_AN); ! } else if (poisonous(&mons[mnum]) && rn2(5)) { tp++; pline("Ecch - that must have been poisonous!"); if(!Poison_resistance) { *************** *** 1088,1094 **** You("feel%s sick.", (Sick) ? " very" : ""); losehp(rnd(8), "cadaver", KILLED_BY_AN); } ! if(!tp && otmp->corpsenm != PM_LIZARD && (otmp->orotten || !rn2(7))) { if (rottenfood(otmp)) { otmp->orotten = TRUE; (void)touchfood(otmp); --- 1135,1141 ---- You("feel%s sick.", (Sick) ? " very" : ""); losehp(rnd(8), "cadaver", KILLED_BY_AN); } ! if (!tp && mnum != PM_LIZARD && (otmp->orotten || !rn2(7))) { if (rottenfood(otmp)) { otmp->orotten = TRUE; (void)touchfood(otmp); *************** *** 1096,1108 **** } otmp->oeaten >>= 2; } else { ! pline("This %s %s!", cname, ! (carnivorous(uasmon) && !herbivorous(uasmon)) ! ? "is delicious" : "tastes terrible"); } /* delay is weight dependent */ ! victual.reqtime = 3 + (mons[otmp->corpsenm].cwt >> 6); return(0); } --- 1143,1157 ---- } otmp->oeaten >>= 2; } else { ! pline("%s%s %s!", ! !uniq ? "This " : !type_is_pname(&mons[mnum]) ? "The " : "", ! food_xname(otmp, FALSE), ! (carnivorous(uasmon) && !herbivorous(uasmon)) ? ! "is delicious" : "tastes terrible"); } /* delay is weight dependent */ ! victual.reqtime = 3 + (mons[mnum].cwt >> 6); return(0); } *************** *** 1134,1140 **** return; } ! Sprintf(msgbuf, "eating %s", the(singular(otmp, xname))); set_occupation(eatfood, msgbuf, 0); } --- 1183,1189 ---- return; } ! Sprintf(msgbuf, "eating %s", food_xname(otmp, TRUE)); set_occupation(eatfood, msgbuf, 0); } *************** *** 1350,1361 **** { switch(otmp->otyp) { case SPRIG_OF_WOLFSBANE: ! if (u.ulycn >= LOW_PM) { ! You_feel("purified."); ! if (uasmon == &mons[u.ulycn] && !Polymorph_control) ! rehumanize(); ! u.ulycn = NON_PM; ! } break; case CARROT: make_blinded(0L,TRUE); --- 1399,1406 ---- { switch(otmp->otyp) { case SPRIG_OF_WOLFSBANE: ! if (u.ulycn >= LOW_PM || is_were(uasmon)) ! you_unwere(TRUE); break; case CARROT: make_blinded(0L,TRUE); *************** *** 1366,1379 **** case LUMP_OF_ROYAL_JELLY: /* This stuff seems to be VERY healthy! */ gainstr(otmp, 1); ! u.uhp += (otmp->cursed) ? -rnd(20) : rnd(20); ! if(u.uhp > u.uhpmax) { if(!rn2(17)) u.uhpmax++; u.uhp = u.uhpmax; ! } else if(u.uhp <= 0) { killer_format = KILLED_BY_AN; killer = "rotten lump of royal jelly"; done(POISONING); } if(!otmp->cursed) heal_legs(); break; --- 1411,1434 ---- case LUMP_OF_ROYAL_JELLY: /* This stuff seems to be VERY healthy! */ gainstr(otmp, 1); ! if (Upolyd) { ! u.mh += otmp->cursed ? -rnd(20) : rnd(20); ! if (u.mh > u.mhmax) { ! if (!rn2(17)) u.mhmax++; ! u.mh = u.mhmax; ! } else if (u.mh <= 0) { ! rehumanize(); ! } ! } else { ! u.uhp += otmp->cursed ? -rnd(20) : rnd(20); ! if (u.uhp > u.uhpmax) { if(!rn2(17)) u.uhpmax++; u.uhp = u.uhpmax; ! } else if (u.uhp <= 0) { killer_format = KILLED_BY_AN; killer = "rotten lump of royal jelly"; done(POISONING); + } } if(!otmp->cursed) heal_legs(); break; *************** *** 1422,1434 **** if (otmp->quan > 1L) { if(!carried(otmp)) (void) splitobj(otmp, 1L); ! else otmp = splitobj(otmp, otmp->quan - 1L); } pline("Ulch - That %s was rustproofed!", xname(otmp)); /* The regurgitated object's rustproofing is gone now */ otmp->oerodeproof = 0; ! make_stunned(HStun + rn2(10), TRUE); pline("You spit %s out onto the %s.", the(xname(otmp)), surface(u.ux, u.uy)); if (carried(otmp)) { --- 1477,1489 ---- if (otmp->quan > 1L) { if(!carried(otmp)) (void) splitobj(otmp, 1L); ! else otmp = splitobj(otmp, otmp->quan - 1L); } pline("Ulch - That %s was rustproofed!", xname(otmp)); /* The regurgitated object's rustproofing is gone now */ otmp->oerodeproof = 0; ! make_stunned(HStun + rn2(10), TRUE); pline("You spit %s out onto the %s.", the(xname(otmp)), surface(u.ux, u.uy)); if (carried(otmp)) { *************** *** 1837,1842 **** --- 1892,1898 ---- } u.uhs = newhs; flags.botl = 1; + bot(); if(u.uhp < 1) { You("die from hunger and exhaustion."); killer_format = KILLED_BY; *** Old/src/end.c Tue Dec 10 16:41:24 1996 --- src/end.c Mon Nov 4 09:01:04 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)end.c 3.2 96/05/25 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)end.c 3.2 96/08/04 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 22,27 **** --- 22,32 ---- static void FDECL(done_hangup, (int)); #endif + #if defined(__BEOS__) || defined(MICRO) || defined(WIN32) || defined(OS2) + extern void FDECL(nethack_exit,(int)); + #else + #define nethack_exit exit + #endif #define done_stopprint program_state.stopprint *************** *** 191,200 **** (mtmp->female ? "Ms." : "Mr."), shkname(mtmp)); killer_format = KILLED_BY; } else if (mtmp->ispriest || mtmp->isminion) { ! killer = priestname(mtmp); if (!strncmp(killer, "the ", 4)) Strcat(buf, killer+4); else Strcat(buf, killer); } else Strcat(buf, mtmp->data->mname); if (mtmp->mnamelth) Sprintf(eos(buf), " called %s", NAME(mtmp)); killer = buf; if (mtmp->data->mlet == S_WRAITH) --- 196,208 ---- (mtmp->female ? "Ms." : "Mr."), shkname(mtmp)); killer_format = KILLED_BY; } else if (mtmp->ispriest || mtmp->isminion) { ! char priestnambuf[BUFSZ]; ! ! killer = priestname(mtmp, priestnambuf); if (!strncmp(killer, "the ", 4)) Strcat(buf, killer+4); else Strcat(buf, killer); } else Strcat(buf, mtmp->data->mname); + if (mtmp->mnamelth) Sprintf(eos(buf), " called %s", NAME(mtmp)); killer = buf; if (mtmp->data->mlet == S_WRAITH) *************** *** 222,232 **** if (program_state.panicking++) NH_abort(); /* avoid loops - this should never happen*/ ! if (flags.window_inited) { raw_print("\r\nOops..."); wait_synch(); /* make sure all pending output gets flushed */ exit_nhwindows((char *)0); ! flags.window_inited = 0; /* they're gone; force raw_print()ing */ } raw_print(!program_state.something_worth_saving ? --- 230,240 ---- if (program_state.panicking++) NH_abort(); /* avoid loops - this should never happen*/ ! if (iflags.window_inited) { raw_print("\r\nOops..."); wait_synch(); /* make sure all pending output gets flushed */ exit_nhwindows((char *)0); ! iflags.window_inited = 0; /* they're gone; force raw_print()ing */ } raw_print(!program_state.something_worth_saving ? *************** *** 387,393 **** boolean taken; char kilbuf[BUFSZ], pbuf[BUFSZ]; winid endwin = WIN_ERR; ! boolean bones_ok, have_windows = flags.window_inited; /* kilbuf: used to copy killer in case it comes from something like * xname(), which would otherwise get overwritten when we call --- 395,401 ---- boolean taken; char kilbuf[BUFSZ], pbuf[BUFSZ]; winid endwin = WIN_ERR; ! boolean bones_ok, have_windows = iflags.window_inited; /* kilbuf: used to copy killer in case it comes from something like * xname(), which would otherwise get overwritten when we call *************** *** 474,480 **** killer_format = NO_KILLER_PREFIX; if (u.uhp < 1) { how = DIED; ! /* note that killer is pointing at kilbuf */ Strcpy(kilbuf, "quit while already on Charon's boat"); } } --- 482,489 ---- killer_format = NO_KILLER_PREFIX; if (u.uhp < 1) { how = DIED; ! u.umortality++; /* skipped above when how==QUIT */ ! /* note that killer is pointing at kilbuf */ Strcpy(kilbuf, "quit while already on Charon's boat"); } } *************** *** 719,729 **** terminate(status) int status; { - #ifdef __beos__ - extern void nethack_exit(int); - #else - # define nethack_exit exit - #endif #ifdef MAC getreturn("to exit"); --- 728,733 ---- *** Old/src/exper.c Tue Dec 10 16:41:31 1996 --- src/exper.c Mon Jun 17 18:36:36 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)exper.c 3.2 96/01/21 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)exper.c 3.2 96/06/16 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 111,119 **** /* remove intrinsic abilities */ adjabil(u.ulevel + 1, u.ulevel); reset_rndmonst(NON_PM); /* new monster selection */ - #ifdef WEAPON_SKILLS - lose_weapon_skill(); - #endif /* WEAPON_SKILLS */ } else u.uhp = -1; num = newhp(); --- 111,116 ---- *************** *** 153,161 **** tmp = enermod(rn1((int)ACURR(A_WIS)/2+1, 2)); /* M. Stephenson */ u.uenmax += tmp; u.uen += tmp; - #ifdef WEAPON_SKILLS - add_weapon_skill(); - #endif /* WEAPON_SKILLS */ flags.botl = 1; } } --- 150,155 ---- *************** *** 178,186 **** adjabil(u.ulevel - 1, u.ulevel); reset_rndmonst(NON_PM); /* new monster selection */ } - #ifdef WEAPON_SKILLS - add_weapon_skill(); - #endif /* WEAPON_SKILLS */ flags.botl = 1; } --- 172,177 ---- *** Old/src/files.c Tue Dec 10 16:41:39 1996 --- src/files.c Sun Oct 27 19:33:03 1996 *************** *** 42,48 **** # endif /* VMS */ #endif /* MFLOPPY */ ! #if defined(UNIX) || defined(__beos__) #define SAVESIZE (PL_NSIZ + 13) /* save/99999player.e */ #else # ifdef VMS --- 42,48 ---- # endif /* VMS */ #endif /* MFLOPPY */ ! #if defined(UNIX) || defined(__BEOS__) #define SAVESIZE (PL_NSIZ + 13) /* save/99999player.e */ #else # ifdef VMS *************** *** 892,898 **** #ifdef UNIX ".nethackrc"; #else ! # if defined(MAC) || defined(__beos__) "NetHack Defaults"; # else "NetHack.cnf"; --- 892,898 ---- #ifdef UNIX ".nethackrc"; #else ! # if defined(MAC) || defined(__BEOS__) "NetHack Defaults"; # else "NetHack.cnf"; *************** *** 934,940 **** } } ! #if defined(MICRO) || defined(MAC) || defined(__beos__) if ((fp = fopenp(configfile, "r")) != (FILE *)0) return(fp); #else --- 934,940 ---- } } ! #if defined(MICRO) || defined(MAC) || defined(__BEOS__) if ((fp = fopenp(configfile, "r")) != (FILE *)0) return(fp); #else *** Old/src/hack.c Tue Dec 10 16:41:45 1996 --- src/hack.c Sun Oct 6 14:38:59 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)hack.c 3.2 96/03/09 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)hack.c 3.2 96/07/15 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 56,78 **** STATIC_OVL int moverock() { ! register xchar rx, ry; register struct obj *otmp; register struct trap *ttmp; register struct monst *mtmp; ! while ((otmp = sobj_at(BOULDER, u.ux+u.dx, u.uy+u.dy)) != 0) { ! rx = u.ux+2*u.dx; ! ry = u.uy+2*u.dy; nomul(0); if (Levitation || Is_airlevel(&u.uz)) { ! if (Blind) feel_location(u.ux+u.dx,u.uy+u.dy); You("don't have enough leverage to push %s.", the(xname(otmp))); /* Give them a chance to climb over it? */ return -1; } if (verysmall(uasmon)) { ! if (Blind) feel_location(u.ux+u.dx,u.uy+u.dy); pline("You're too small to push that %s.", xname(otmp)); goto cannot_push; } --- 56,82 ---- STATIC_OVL int moverock() { ! register xchar rx, ry, sx, sy; register struct obj *otmp; register struct trap *ttmp; register struct monst *mtmp; ! sx = u.ux + u.dx, sy = u.uy + u.dy; /* boulder starting position */ ! while ((otmp = sobj_at(BOULDER, sx, sy)) != 0) { ! /* make sure that this boulder is visible as the top object */ ! if (otmp != level.objects[sx][sy]) movobj(otmp, sx, sy); ! ! rx = u.ux + 2 * u.dx; /* boulder destination position */ ! ry = u.uy + 2 * u.dy; nomul(0); if (Levitation || Is_airlevel(&u.uz)) { ! if (Blind) feel_location(sx, sy); You("don't have enough leverage to push %s.", the(xname(otmp))); /* Give them a chance to climb over it? */ return -1; } if (verysmall(uasmon)) { ! if (Blind) feel_location(sx, sy); pline("You're too small to push that %s.", xname(otmp)); goto cannot_push; } *************** *** 96,102 **** if (canspotmon(mtmp)) pline("There's %s on the other side.", mon_nam(mtmp)); else { ! if (Blind) feel_location(u.ux+u.dx,u.uy+u.dy); You_hear("a monster behind %s.", the(xname(otmp))); } if (flags.verbose) --- 100,106 ---- if (canspotmon(mtmp)) pline("There's %s on the other side.", mon_nam(mtmp)); else { ! if (Blind) feel_location(sx, sy); You_hear("a monster behind %s.", the(xname(otmp))); } if (flags.verbose) *************** *** 130,135 **** --- 134,140 ---- if (!flooreffects(otmp, rx, ry, "fall")) { place_object(otmp, rx, ry); } + if (mtmp && !Blind) newsym(rx, ry); continue; case HOLE: case TRAPDOOR: *************** *** 197,210 **** movobj(otmp, rx, ry); /* does newsym(rx,ry) */ if (Blind) { feel_location(rx,ry); ! feel_location(u.ux+u.dx, u.uy+u.dy); } else { ! newsym(u.ux+u.dx, u.uy+u.dy); } } else { nopushmsg: You("try to move %s, but in vain.", the(xname(otmp))); ! if (Blind) feel_location(u.ux+u.dx, u.uy+u.dy); cannot_push: if (throws_rocks(uasmon)) { pline("However, you can easily %s.", --- 202,215 ---- movobj(otmp, rx, ry); /* does newsym(rx,ry) */ if (Blind) { feel_location(rx,ry); ! feel_location(sx, sy); } else { ! newsym(sx, sy); } } else { nopushmsg: You("try to move %s, but in vain.", the(xname(otmp))); ! if (Blind) feel_location(sx, sy); cannot_push: if (throws_rocks(uasmon)) { pline("However, you can easily %s.", *************** *** 212,219 **** break; } if (((!invent || inv_weight() <= -850) && ! (!u.dx || !u.dy || (IS_ROCK(levl[u.ux][u.uy+u.dy].typ) ! && IS_ROCK(levl[u.ux+u.dx][u.uy].typ)))) || verysmall(uasmon)) { pline("However, you can squeeze yourself into a small opening."); break; --- 217,224 ---- break; } if (((!invent || inv_weight() <= -850) && ! (!u.dx || !u.dy || (IS_ROCK(levl[u.ux][sy].typ) ! && IS_ROCK(levl[sx][u.uy].typ)))) || verysmall(uasmon)) { pline("However, you can squeeze yourself into a small opening."); break; *************** *** 451,457 **** if(((wtcap = near_capacity()) >= OVERLOADED || (wtcap > SLT_ENCUMBER && ! (u.mtimedone ? (u.mh < 5 && u.mh != u.mhmax) : (u.uhp < 10 && u.uhp != u.uhpmax)))) && !Is_airlevel(&u.uz)) { if(wtcap < OVERLOADED) { --- 456,462 ---- if(((wtcap = near_capacity()) >= OVERLOADED || (wtcap > SLT_ENCUMBER && ! (Upolyd ? (u.mh < 5 && u.mh != u.mhmax) : (u.uhp < 10 && u.uhp != u.uhpmax)))) && !Is_airlevel(&u.uz)) { if(wtcap < OVERLOADED) { *************** *** 616,624 **** !is_safepet(mtmp))){ gethungry(); if(wtcap >= HVY_ENCUMBER && moves%3) { ! if(u.uhp > 1) u.uhp--; ! else { You("pass out from exertion!"); exercise(A_CON, FALSE); fall_asleep(-10, FALSE); --- 621,631 ---- !is_safepet(mtmp))){ gethungry(); if(wtcap >= HVY_ENCUMBER && moves%3) { ! if (Upolyd && u.mh > 1) { ! u.mh--; ! } else if (!Upolyd && u.uhp > 1) { u.uhp--; ! } else { You("pass out from exertion!"); exercise(A_CON, FALSE); fall_asleep(-10, FALSE); *************** *** 797,803 **** mtmp = m_at(x, y); u.ux += u.dx; u.uy += u.dy; ! /* if safepet at destination then move the pet to the hero's * previous location using the same conditions as in attack(). * there are special extenuating circumstances: * (1) if the pet dies then your god angers, --- 804,811 ---- mtmp = m_at(x, y); u.ux += u.dx; u.uy += u.dy; ! /* ! * If safepet at destination then move the pet to the hero's * previous location using the same conditions as in attack(). * there are special extenuating circumstances: * (1) if the pet dies then your god angers, *************** *** 805,849 **** * (3) if the pet was already trapped and you attempt to free it * not only do you encounter the trap but you may frighten your * pet causing it to go wild! moral: don't abuse this privilege. ! */ ! /* Ceiling-hiding pets are skipped by this section of code, to * be caught by the normal falling-monster code. */ if (is_safepet(mtmp) && !(is_hider(mtmp->data) && mtmp->mundetected)) { ! int swap_result; ! ! /* if trapped, there's a chance the pet goes wild */ ! if (mtmp->mtrapped) { ! if (!rn2(mtmp->mtame)) { ! mtmp->mtame = mtmp->mpeaceful = mtmp->msleep = 0; ! growl(mtmp); ! } else { ! yelp(mtmp); ! } ! } ! ! if (mtmp->m_ap_type) seemimic(mtmp); ! else if (!mtmp->mtame) newsym(mtmp->mx, mtmp->my); ! mtmp->mtrapped = 0; - mtmp->mundetected = 0; remove_monster(x, y); place_monster(mtmp, u.ux0, u.uy0); ! /* check first to see if monster drowned. ! * then check for traps. ! */ ! if (minwater(mtmp)) { ! swap_result = 2; ! } else swap_result = mintrap(mtmp); ! ! switch (swap_result) { case 0: You("%s %s.", mtmp->mtame ? "displaced" : "frightened", ! mtmp->mnamelth ? NAME(mtmp) : mon_nam(mtmp)); break; ! case 1: /* trapped */ ! case 3: /* changed levels */ /* there's already been a trap message, reinforce it */ abuse_dog(mtmp); adjalign(-3); --- 813,855 ---- * (3) if the pet was already trapped and you attempt to free it * not only do you encounter the trap but you may frighten your * pet causing it to go wild! moral: don't abuse this privilege. ! * ! * Ceiling-hiding pets are skipped by this section of code, to * be caught by the normal falling-monster code. */ if (is_safepet(mtmp) && !(is_hider(mtmp->data) && mtmp->mundetected)) { ! /* if trapped, there's a chance the pet goes wild */ ! if (mtmp->mtrapped) { ! if (!rn2(mtmp->mtame)) { ! mtmp->mtame = mtmp->mpeaceful = mtmp->msleep = 0; ! growl(mtmp); ! } else { ! yelp(mtmp); ! } ! } ! mtmp->mundetected = 0; ! if (mtmp->m_ap_type) seemimic(mtmp); ! else if (!mtmp->mtame) newsym(mtmp->mx, mtmp->my); ! ! if (mtmp->mtrapped && ! (trap = t_at(mtmp->mx, mtmp->my)) != 0 && ! (trap->ttyp == PIT || trap->ttyp == SPIKED_PIT) && ! sobj_at(BOULDER, trap->tx, trap->ty)) { ! /* can't swap places with pet pinned in a pit by a boulder */ ! u.ux = u.ux0, u.uy = u.uy0; /* didn't move after all */ ! } else { mtmp->mtrapped = 0; remove_monster(x, y); place_monster(mtmp, u.ux0, u.uy0); ! /* check for displacing it into pools and traps */ ! switch (minwater(mtmp) ? 2 : mintrap(mtmp)) { case 0: You("%s %s.", mtmp->mtame ? "displaced" : "frightened", ! mtmp->mnamelth ? NAME(mtmp) : mon_nam(mtmp)); break; ! case 1: /* trapped */ ! case 3: /* changed levels */ /* there's already been a trap message, reinforce it */ abuse_dog(mtmp); adjalign(-3); *************** *** 862,867 **** --- 868,874 ---- pline("that's strange, unknown mintrap result!"); break; } + } } reset_occupations(); *************** *** 896,902 **** move_bc(0,bc_control,ballx,bally,chainx,chainy); spoteffects(); ! /* delay next move because of ball dragging */ /* must come after we finished picking up, in spoteffects() */ if (cause_delay) { --- 903,909 ---- move_bc(0,bc_control,ballx,bally,chainx,chainy); spoteffects(); ! /* delay next move because of ball dragging */ /* must come after we finished picking up, in spoteffects() */ if (cause_delay) { *************** *** 1120,1126 **** ptr4 = &u.ushops_entered[0]; *ptr1; ptr1++) { if (!index(u.urooms0, *ptr1)) ! *(ptr2++) = *ptr1; if (IS_SHOP(*ptr1 - ROOMOFFSET)) { *(ptr3++) = *ptr1; if (!index(u.ushops0, *ptr1)) --- 1127,1133 ---- ptr4 = &u.ushops_entered[0]; *ptr1; ptr1++) { if (!index(u.urooms0, *ptr1)) ! *(ptr2++) = *ptr1; if (IS_SHOP(*ptr1 - ROOMOFFSET)) { *(ptr3++) = *ptr1; if (!index(u.ushops0, *ptr1)) *************** *** 1257,1264 **** /* uswallow case added by GAN 01/29/87 */ if(u.uswallow) { if (is_animal(u.ustuck->data)) { ! You("pick up %s tongue.", ! s_suffix(mon_nam(u.ustuck))); pline("But it's kind of slimy, so you drop it."); } else You("don't %s anything in here to pick up.", --- 1264,1270 ---- /* uswallow case added by GAN 01/29/87 */ if(u.uswallow) { if (is_animal(u.ustuck->data)) { ! You("pick up %s tongue.", s_suffix(mon_nam(u.ustuck))); pline("But it's kind of slimy, so you drop it."); } else You("don't %s anything in here to pick up.", *************** *** 1473,1479 **** register const char *knam; boolean k_format; { ! if (u.mtimedone) { u.mh -= n; if (u.mhmax < u.mh) u.mhmax = u.mh; flags.botl = 1; --- 1479,1485 ---- register const char *knam; boolean k_format; { ! if (Upolyd) { u.mh -= n; if (u.mhmax < u.mh) u.mhmax = u.mh; flags.botl = 1; *************** *** 1527,1536 **** register long carrcap; carrcap = (((ACURRSTR + ACURR(A_CON))/2)+1)*50; ! if (u.mtimedone) { /* consistent with can_carry() in mon.c */ if (u.usym == S_NYMPH) ! carrcap = MAX_CARR_CAP; else if (!uasmon->cwt) carrcap = (carrcap * (long)uasmon->msize) / MZ_HUMAN; else if (!strongmonst(uasmon) --- 1533,1542 ---- register long carrcap; carrcap = (((ACURRSTR + ACURR(A_CON))/2)+1)*50; ! if (Upolyd) { /* consistent with can_carry() in mon.c */ if (u.usym == S_NYMPH) ! carrcap = MAX_CARR_CAP; else if (!uasmon->cwt) carrcap = (carrcap * (long)uasmon->msize) / MZ_HUMAN; else if (!strongmonst(uasmon) *** Old/src/invent.c Tue Dec 10 16:41:53 1996 --- src/invent.c Tue Aug 13 11:55:36 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)invent.c 3.2 96/05/12 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)invent.c 3.2 96/07/06 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 23,29 **** static struct obj *FDECL(find_unpaid,(struct obj *,struct obj **)); static void FDECL(fully_identify_obj, (struct obj *)); static void FDECL(menu_identify, (int)); - static void FDECL(feel_cockatrice, (struct obj *)); #endif /* OVLB */ STATIC_DCL char FDECL(obj_to_let,(struct obj *)); --- 23,28 ---- *************** *** 109,126 **** #undef inv_rank /* scan a list of objects to see whether another object will merge with ! one of them; used in pickup.c */ struct obj * merge_choice(objlist, obj) struct obj *objlist, *obj; { if (obj->otyp == SCR_SCARE_MONSTER) /* punt on these */ return (struct obj *)0; while (objlist) { ! if (mergable(objlist, obj)) return objlist; objlist = objlist->nobj; } ! return (struct obj *)0; } /* merge obj with otmp and delete obj if types agree */ --- 108,146 ---- #undef inv_rank /* scan a list of objects to see whether another object will merge with ! one of them; used in pickup.c when all 52 inventory slots are in use, ! to figure out whether another object could still be picked up */ struct obj * merge_choice(objlist, obj) struct obj *objlist, *obj; { + struct monst *shkp; + int save_nocharge; + if (obj->otyp == SCR_SCARE_MONSTER) /* punt on these */ return (struct obj *)0; + /* if this is an item on the shop floor, the attributes it will + have when carried are different from what they are now; prevent + that from eliciting an incorrect result from mergable() */ + save_nocharge = obj->no_charge; + if (objlist == invent && obj->where == OBJ_FLOOR && + (shkp = shop_keeper(inside_shop(obj->ox, obj->oy))) != 0) { + if (obj->no_charge) obj->no_charge = 0; + /* A billable object won't have its `unpaid' bit set, so would + erroneously seem to be a candidate to merge with a similar + ordinary object. That's no good, because once it's really + picked up, it won't merge after all. It might merge with + another unpaid object, but we can't check that here (depends + too much upon shk's bill) and if it doesn't merge it would + end up in the '#' overflow inventory slot, so reject it now. */ + else if (inhishop(shkp)) return (struct obj *)0; + } while (objlist) { ! if (mergable(objlist, obj)) break; objlist = objlist->nobj; } ! obj->no_charge = save_nocharge; ! return objlist; } /* merge obj with otmp and delete obj if types agree */ *************** *** 371,377 **** delobj(obj) register struct obj *obj; { ! if(obj->otyp == LEASH && obj->leashmon != 0) o_unleash(obj); if (obj->otyp == AMULET_OF_YENDOR || obj->otyp == CANDELABRUM_OF_INVOCATION || obj->otyp == BELL_OF_OPENING || --- 391,398 ---- delobj(obj) register struct obj *obj; { ! boolean update_map; ! if (obj->otyp == AMULET_OF_YENDOR || obj->otyp == CANDELABRUM_OF_INVOCATION || obj->otyp == BELL_OF_OPENING || *************** *** 383,390 **** */ return; } obj_extract_self(obj); ! newsym(obj->ox,obj->oy); obfree(obj, (struct obj *) 0); /* frees contents also */ } --- 404,412 ---- */ return; } + update_map = (obj->where == OBJ_FLOOR); obj_extract_self(obj); ! if (update_map) newsym(obj->ox, obj->oy); obfree(obj, (struct obj *) 0); /* frees contents also */ } *************** *** 1676,1682 **** /* only one object */ if (dfeature) pline(fbuf); You("%s here %s.", verb, doname(otmp0)); ! feel_cockatrice(otmp0); } else { display_nhwindow(WIN_MESSAGE, FALSE); tmpwin = create_nhwindow(NHW_MENU); --- 1698,1704 ---- /* only one object */ if (dfeature) pline(fbuf); You("%s here %s.", verb, doname(otmp0)); ! feel_cockatrice(otmp0, FALSE); } else { display_nhwindow(WIN_MESSAGE, FALSE); tmpwin = create_nhwindow(NHW_MENU); *************** *** 1687,1693 **** putstr(tmpwin, 0, "Things that are here:"); for(otmp = otmp0; otmp; otmp = otmp->nexthere) { putstr(tmpwin, 0, doname(otmp)); ! feel_cockatrice(otmp); } display_nhwindow(tmpwin, TRUE); destroy_nhwindow(tmpwin); --- 1709,1715 ---- putstr(tmpwin, 0, "Things that are here:"); for(otmp = otmp0; otmp; otmp = otmp->nexthere) { putstr(tmpwin, 0, doname(otmp)); ! feel_cockatrice(otmp, FALSE); } display_nhwindow(tmpwin, TRUE); destroy_nhwindow(tmpwin); *************** *** 1695,1706 **** return(!!Blind); } ! static void ! feel_cockatrice(otmp) struct obj *otmp; { ! if(Blind && !uarmg && !resists_ston(&youmonst) && ! (otmp->otyp == CORPSE && otmp->corpsenm == PM_COCKATRICE)) { if(poly_when_stoned(uasmon)) You("touched the cockatrice corpse with your bare %s.", makeplural(body_part(HAND))); --- 1717,1730 ---- return(!!Blind); } ! void ! feel_cockatrice(otmp, force_touch) struct obj *otmp; + boolean force_touch; { ! if ((Blind || force_touch) && ! !uarmg && !resists_ston(&youmonst) && ! (otmp->otyp == CORPSE && otmp->corpsenm == PM_COCKATRICE)) { if(poly_when_stoned(uasmon)) You("touched the cockatrice corpse with your bare %s.", makeplural(body_part(HAND))); *** Old/src/lock.c Tue Dec 10 16:42:02 1996 --- src/lock.c Thu Jun 13 17:03:09 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)lock.c 3.2 96/04/28 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)lock.c 3.2 96/05/31 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 114,120 **** if (*in_rooms(u.ux+u.dx, u.uy+u.dy, SHOPBASE)) add_damage(u.ux+u.dx, u.uy+u.dy, 0L); newsym(u.ux+u.dx, u.uy+u.dy); ! } else if(xlock.door->doormask == D_LOCKED) xlock.door->doormask = D_CLOSED; else xlock.door->doormask = D_LOCKED; } else { --- 114,120 ---- if (*in_rooms(u.ux+u.dx, u.uy+u.dy, SHOPBASE)) add_damage(u.ux+u.dx, u.uy+u.dy, 0L); newsym(u.ux+u.dx, u.uy+u.dy); ! } else if (xlock.door->doormask & D_LOCKED) xlock.door->doormask = D_CLOSED; else xlock.door->doormask = D_LOCKED; } else { *************** *** 529,543 **** return(0); } ! if(!(door->doormask & D_CLOSED)) { ! switch(door->doormask) { ! case D_BROKEN: pline("This door is broken."); break; ! case D_NODOOR: pline("This doorway has no door."); break; ! case D_ISOPEN: pline("This door is already open."); break; ! default: pline("This door is locked."); break; ! } ! if(Blind) feel_location(x,y); ! return(0); } if(verysmall(uasmon)) { --- 529,546 ---- return(0); } ! if (!(door->doormask & D_CLOSED)) { ! const char *mesg; ! ! switch (door->doormask) { ! case D_BROKEN: mesg = " is broken"; break; ! case D_NODOOR: mesg = "way has no door"; break; ! case D_ISOPEN: mesg = " is already open"; break; ! default: mesg = " is locked"; break; ! } ! pline("This door%s.", mesg); ! if (Blind) feel_location(x,y); ! return(0); } if(verysmall(uasmon)) { *** Old/src/mail.c Tue Dec 10 16:42:06 1996 --- src/mail.c Mon Dec 9 17:44:03 1996 *************** *** 434,440 **** { char *junk[]={ "Please disregard previous letter.", ! "Welcome to NetHack 3.2.1!", #ifdef AMIGA "Only Amiga makes it possible.", "CATS have all the answers.", --- 434,440 ---- { char *junk[]={ "Please disregard previous letter.", ! "Welcome to NetHack 3.2.2!", #ifdef AMIGA "Only Amiga makes it possible.", "CATS have all the answers.", *** Old/src/makemon.c Tue Dec 10 16:42:09 1996 --- src/makemon.c Sat Jul 6 22:34:47 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)makemon.c 3.2 95/08/12 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)makemon.c 3.2 96/07/04 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 879,890 **** if (allow_minvent) { if(is_armed(ptr)) m_initweap(mtmp); /* equip with weapons / armor */ ! m_initinv(mtmp); /* add on a few special items incl. more armor */ m_dowear(mtmp, TRUE); ! } else if (mtmp->minvent) { /* sanity check */ ! impossible("makemon: non-null minvent despite NO_MINVENT flag."); ! discard_minvent(mtmp); ! mtmp->minvent = (struct obj *)0; /* caller expects this */ } if (ptr->mflags3 & M3_WAITMASK) { if (ptr->mflags3 & M3_WAITFORU) --- 879,889 ---- if (allow_minvent) { if(is_armed(ptr)) m_initweap(mtmp); /* equip with weapons / armor */ ! m_initinv(mtmp); /* add on a few special items incl. more armor */ m_dowear(mtmp, TRUE); ! } else { ! /* no initial inventory is allowed */ ! if (mtmp->minvent) discard_minvent(mtmp); } if (ptr->mflags3 & M3_WAITMASK) { if (ptr->mflags3 & M3_WAITFORU) *** Old/src/mhitm.c Tue Dec 10 16:42:16 1996 --- src/mhitm.c Thu Jun 13 17:03:02 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)mhitm.c 3.2 96/04/29 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)mhitm.c 3.2 96/05/25 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 15,20 **** --- 15,21 ---- static const char brief_feeling[] = "have a %s feeling for a moment, then it passes."; + static char *FDECL(mon_nam_too, (char *,struct monst *,struct monst *)); static void FDECL(mrustm, (struct monst *, struct monst *, struct obj *)); static int FDECL(hitmm, (struct monst *,struct monst *,struct attack *)); static int FDECL(gazemm, (struct monst *,struct monst *,struct attack *)); *************** *** 32,37 **** --- 33,55 ---- */ static int dieroll; + /* returns mon_nam(mon) relative to other_mon; normal name unless they're + the same, in which case the reference is to {him|her|it} self */ + static char * + mon_nam_too(outbuf, mon, other_mon) + char *outbuf; + struct monst *mon, *other_mon; + { + Strcpy(outbuf, mon_nam(mon)); + if (mon == other_mon) + switch (pronoun_gender(mon)) { + case 0: Strcpy(outbuf, "himself"); break; + case 1: Strcpy(outbuf, "herself"); break; + default: Strcpy(outbuf, "itself"); break; + } + return outbuf; + } + static void noises(magr, mattk) register struct monst *magr; *************** *** 55,61 **** struct attack *mattk; { const char *fmt; ! char buf[BUFSZ]; if (vis) { if (mdef->m_ap_type) seemimic(mdef); --- 73,79 ---- struct attack *mattk; { const char *fmt; ! char buf[BUFSZ], mdef_name[BUFSZ]; if (vis) { if (mdef->m_ap_type) seemimic(mdef); *************** *** 63,69 **** fmt = (could_seduce(magr,mdef,mattk) && !magr->mcan) ? "%s pretends to be friendly to" : "%s misses"; Sprintf(buf, fmt, Monnam(magr)); ! pline("%s %s.", buf, mon_nam(mdef)); } else noises(magr, mattk); } --- 81,87 ---- fmt = (could_seduce(magr,mdef,mattk) && !magr->mcan) ? "%s pretends to be friendly to" : "%s misses"; Sprintf(buf, fmt, Monnam(magr)); ! pline("%s %s.", buf, mon_nam_too(mdef_name, mdef, magr)); } else noises(magr, mattk); } *************** *** 303,309 **** { if(vis){ int compat; ! char buf[BUFSZ]; if(mdef->m_ap_type) seemimic(mdef); if(magr->m_ap_type) seemimic(magr); --- 321,327 ---- { if(vis){ int compat; ! char buf[BUFSZ], mdef_name[BUFSZ]; if(mdef->m_ap_type) seemimic(mdef); if(magr->m_ap_type) seemimic(magr); *************** *** 343,349 **** Sprintf(buf,"%s hits", magr_name); } } ! pline("%s %s.", buf, mon_nam(mdef)); } else noises(magr, mattk); return(mdamagem(magr, mdef, mattk)); } --- 361,367 ---- Sprintf(buf,"%s hits", magr_name); } } ! pline("%s %s.", buf, mon_nam_too(mdef_name, mdef, magr)); } else noises(magr, mattk); return(mdamagem(magr, mdef, mattk)); } *** Old/src/mhitu.c Tue Dec 10 16:42:20 1996 --- src/mhitu.c Tue Aug 13 12:57:38 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)mhitu.c 3.2 96/05/01 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)mhitu.c 3.2 96/07/12 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 388,400 **** "tries to pick you up" : "disturbs you"); else pline("Wait, %s! That gold is really %s named %s!", m_monnam(mtmp), ! u.mtimedone ? an(uasmon->mname) : ! an(player_mon()->mname), plname); if (multi < 0) { /* this should always be the case */ char buf[BUFSIZ]; Sprintf(buf, "You appear to be %s again.", ! u.mtimedone ? (const char *) an(uasmon->mname) : (const char *) "yourself"); unmul(buf); /* immediately stop mimicking gold */ } --- 388,399 ---- "tries to pick you up" : "disturbs you"); else pline("Wait, %s! That gold is really %s named %s!", m_monnam(mtmp), ! an(Upolyd ? uasmon->mname : player_mon()->mname), plname); if (multi < 0) { /* this should always be the case */ char buf[BUFSIZ]; Sprintf(buf, "You appear to be %s again.", ! Upolyd ? (const char *) an(uasmon->mname) : (const char *) "yourself"); unmul(buf); /* immediately stop mimicking gold */ } *************** *** 719,724 **** --- 718,725 ---- #ifdef TOURIST if (!obj) obj = uarmu; #endif + if (mattk->adtyp == AD_DRIN) obj = uarmh; + /* if your cloak/armor is greased, monster slips off */ if (obj && (obj->greased || obj->otyp == OILSKIN_CLOAK)) { pline("%s %s your %s %s!", *************** *** 935,940 **** --- 936,943 ---- You("don't seem harmed."); break; } + if (u_slip_free(mtmp,mattk)) break; + if (uarmh && rn2(8)) { Your("helmet blocks the attack to your head."); break; *************** *** 1198,1204 **** && !uarm && !uarmh && !uarms && !uarmg && !uarmc && !uarmf) { boolean goaway = FALSE; pline("%s hits! (I hope you don't mind.)", Monnam(mtmp)); ! if (u.mtimedone) { u.mh += rnd(7); if (!rn2(7)) { /* no upper limit necessary; effect is temporary */ --- 1201,1207 ---- && !uarm && !uarmh && !uarms && !uarmg && !uarmc && !uarmf) { boolean goaway = FALSE; pline("%s hits! (I hope you don't mind.)", Monnam(mtmp)); ! if (Upolyd) { u.mh += rnd(7); if (!rn2(7)) { /* no upper limit necessary; effect is temporary */ *************** *** 1693,1699 **** register int n; { flags.botl = 1; ! if (u.mtimedone) { u.mh -= n; if (u.mh < 1) rehumanize(); } else { --- 1696,1702 ---- register int n; { flags.botl = 1; ! if (Upolyd) { u.mh -= n; if (u.mh < 1) rehumanize(); } else { *************** *** 1976,1983 **** break; case 4: You_feel("restored to health!"); u.uhp = u.uhpmax; ! if (u.mtimedone) u.mh = u.mhmax; ! exercise(A_STR, TRUE); flags.botl = 1; break; } --- 1979,1986 ---- break; case 4: You_feel("restored to health!"); u.uhp = u.uhpmax; ! if (Upolyd) u.mh = u.mhmax; ! exercise(A_STR, TRUE); flags.botl = 1; break; } *************** *** 2111,2117 **** default: break; } ! if (!u.mtimedone) return 1; /* These affect the enemy only if you are still a monster */ if (rn2(3)) switch(uasmon->mattk[i].adtyp) { --- 2114,2120 ---- default: break; } ! if (!Upolyd) return 1; /* These affect the enemy only if you are still a monster */ if (rn2(3)) switch(uasmon->mattk[i].adtyp) { *** Old/src/mkmaze.c Tue Dec 10 16:42:35 1996 --- src/mkmaze.c Mon Nov 4 09:01:26 1996 *************** *** 14,20 **** static boolean FDECL(iswall,(int,int)); static boolean FDECL(iswall_or_stone,(int,int)); static boolean FDECL(is_solid,(int,int)); ! static int FDECL(extend_spine, (int locale[3][3], int, int, int)); static boolean FDECL(okay,(int,int,int)); static void FDECL(maze0xy,(coord *)); static boolean FDECL(put_lregion_here,(XCHAR_P,XCHAR_P,XCHAR_P, --- 14,20 ---- static boolean FDECL(iswall,(int,int)); static boolean FDECL(iswall_or_stone,(int,int)); static boolean FDECL(is_solid,(int,int)); ! static int FDECL(extend_spine, (int [3][3], int, int, int)); static boolean FDECL(okay,(int,int,int)); static void FDECL(maze0xy,(coord *)); static boolean FDECL(put_lregion_here,(XCHAR_P,XCHAR_P,XCHAR_P, *** Old/src/mon.c Tue Dec 10 16:42:45 1996 --- src/mon.c Tue Aug 13 11:59:40 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)mon.c 3.2 96/03/07 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)mon.c 3.2 96/07/13 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 41,46 **** --- 41,47 ---- #ifdef OVLB static struct obj *FDECL(make_corpse,(struct monst *)); static void FDECL(m_detach, (struct monst *,struct permonst *)); + static void FDECL(lifesaved_monster, (struct monst *)); /* convert the monster index of an undead to its living counterpart */ int *************** *** 985,1000 **** if(mtmp->wormno) wormgone(mtmp); } ! static void FDECL(lifesaved_monster, (struct monst *)); static void lifesaved_monster(mtmp) struct monst *mtmp; { ! struct obj *lifesave; ! if (!nonliving(mtmp->data) && (lifesave = which_armor(mtmp, W_AMUL)) ! && lifesave->otyp == AMULET_OF_LIFE_SAVING) { /* not canseemon; amulets are on the head, so you don't want */ /* to show this for a long worm with only a tail visible. */ /* Nor do you check invisibility, because glowing and disinte- */ --- 986,1012 ---- if(mtmp->wormno) wormgone(mtmp); } ! /* find the worn amulet of life saving which will save a monster */ ! struct obj * ! mlifesaver(mon) ! struct monst *mon; ! { ! if (!nonliving(mon->data)) { ! struct obj *otmp = which_armor(mon, W_AMUL); ! ! if (otmp && otmp->otyp == AMULET_OF_LIFE_SAVING) ! return otmp; ! } ! return (struct obj *)0; ! } static void lifesaved_monster(mtmp) struct monst *mtmp; { ! struct obj *lifesave = mlifesaver(mtmp); ! if (lifesave) { /* not canseemon; amulets are on the head, so you don't want */ /* to show this for a long worm with only a tail visible. */ /* Nor do you check invisibility, because glowing and disinte- */ *** Old/src/monmove.c Tue Dec 10 16:42:53 1996 --- src/monmove.c Tue Aug 13 13:21:53 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)monmove.c 3.2 96/02/10 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)monmove.c 3.2 96/07/29 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 1006,1011 **** --- 1006,1014 ---- /* newsym(mtmp->mx, mtmp->my); */ /* done below */ unblock_point(mtmp->mx,mtmp->my); /* vision */ } + /* if it's a shop door, schedule repair */ + if (*in_rooms(mtmp->mx, mtmp->my, SHOPBASE)) + add_damage(mtmp->mx, mtmp->my, 0L); } } *** Old/src/monst.c Tue Dec 10 16:42:57 1996 --- src/monst.c Thu Jun 13 17:03:36 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)monst.c 3.2 96/04/26 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)monst.c 3.2 96/06/05 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 2733,2746 **** M2_NOPOLY|M2_HUMAN|M2_PNAME|M2_STRONG|M2_MALE|M2_STALK|M2_HOSTILE| M2_NASTY|M2_COLLECT|M2_MAGIC, M3_WANTSARTI|M3_WAITFORU, HI_LORD), MON("Chromatic Dragon", S_DRAGON, LVL(16, 10, 0, 30, -14), (G_NOGEN|G_UNIQ), A(ATTK(AT_BREA, AD_RBRE, 6, 8), ATTK(AT_MAGC, AD_SPEL, 0, 0), ATTK(AT_CLAW, AD_SAMU, 2, 8), ATTK(AT_BITE, AD_PHYS, 4, 8), ATTK(AT_BITE, AD_PHYS, 4, 8), ATTK(AT_STNG, AD_PHYS, 1, 6)), SIZ(WT_DRAGON, 1700, 0, MS_NEMESIS, MZ_GIGANTIC), ! MR_FIRE|MR_COLD|MR_ELEC|MR_DISINT|MR_POISON, ! MR_FIRE|MR_COLD|MR_ELEC|MR_DISINT|MR_POISON, M1_THICK_HIDE|M1_NOHANDS|M1_CARNIVORE|M1_SEE_INVIS|M1_POIS, M2_NOPOLY|M2_HOSTILE|M2_FEMALE|M2_STALK|M2_STRONG|M2_NASTY| M2_GREEDY|M2_JEWELS|M2_MAGIC, --- 2733,2749 ---- M2_NOPOLY|M2_HUMAN|M2_PNAME|M2_STRONG|M2_MALE|M2_STALK|M2_HOSTILE| M2_NASTY|M2_COLLECT|M2_MAGIC, M3_WANTSARTI|M3_WAITFORU, HI_LORD), + /* Multi-headed, possessing the breath attacks of all the other dragons + * (selected at random when attacking). + */ MON("Chromatic Dragon", S_DRAGON, LVL(16, 10, 0, 30, -14), (G_NOGEN|G_UNIQ), A(ATTK(AT_BREA, AD_RBRE, 6, 8), ATTK(AT_MAGC, AD_SPEL, 0, 0), ATTK(AT_CLAW, AD_SAMU, 2, 8), ATTK(AT_BITE, AD_PHYS, 4, 8), ATTK(AT_BITE, AD_PHYS, 4, 8), ATTK(AT_STNG, AD_PHYS, 1, 6)), SIZ(WT_DRAGON, 1700, 0, MS_NEMESIS, MZ_GIGANTIC), ! MR_FIRE|MR_COLD|MR_SLEEP|MR_DISINT|MR_ELEC|MR_POISON|MR_ACID|MR_STONE, ! MR_FIRE|MR_COLD|MR_SLEEP|MR_DISINT|MR_ELEC|MR_POISON|MR_STONE, M1_THICK_HIDE|M1_NOHANDS|M1_CARNIVORE|M1_SEE_INVIS|M1_POIS, M2_NOPOLY|M2_HOSTILE|M2_FEMALE|M2_STALK|M2_STRONG|M2_NASTY| M2_GREEDY|M2_JEWELS|M2_MAGIC, *** Old/src/mthrowu.c Tue Dec 10 16:43:08 1996 --- src/mthrowu.c Tue Aug 13 13:21:40 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)mthrowu.c 3.2 96/05/01 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)mthrowu.c 3.2 96/06/26 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 37,43 **** register const char *name; { const char *onm = (obj && obj_is_pname(obj)) ? the(name) : ! (obj->quan > 1) ? name : an(name); boolean is_acid = (obj && obj->otyp == ACID_VENOM); if(u.uac + tlev <= rnd(20)) { --- 37,43 ---- register const char *name; { const char *onm = (obj && obj_is_pname(obj)) ? the(name) : ! (obj && obj->quan > 1) ? name : an(name); boolean is_acid = (obj && obj->otyp == ACID_VENOM); if(u.uac + tlev <= rnd(20)) { *************** *** 290,352 **** if (ohitmon(mtmp, singleobj, range, TRUE)) break; } else if (bhitpos.x == u.ux && bhitpos.y == u.uy) { ! if (multi) nomul(0); ! if (singleobj->oclass == POTION_CLASS) { ! if (!Blind) singleobj->dknown = 1; ! potionhit(&youmonst, singleobj); ! break; } ! switch(singleobj->otyp) { ! int dam, hitv; ! case CREAM_PIE: ! case BLINDING_VENOM: ! hitu = thitu(8, 0, singleobj, xname(singleobj)); ! break; ! default: ! dam = dmgval(singleobj, &youmonst); ! hitv = 3 - distmin(u.ux,u.uy, mon->mx,mon->my); ! if (hitv < -4) hitv = -4; ! if (is_elf(mon->data) && ! objects[singleobj->otyp].w_propellor ! == WP_BOW) { hitv++; ! if (MON_WEP(mon) && ! MON_WEP(mon)->otyp == ELVEN_BOW) ! hitv++; ! if(singleobj->otyp == ELVEN_ARROW) dam++; ! } ! if (bigmonst(uasmon)) hitv++; ! hitv += 8+singleobj->spe; ! ! if (dam < 1) dam = 1; ! hitu = thitu(hitv, dam, ! singleobj, xname(singleobj)); ! } ! if (hitu && singleobj->opoisoned) { ! char *singlename = xname(singleobj); ! poisoned(singlename, A_STR, singlename, 10); ! } ! if(hitu && (singleobj->otyp == CREAM_PIE || ! singleobj->otyp == BLINDING_VENOM)) { ! blindinc = rnd(25); ! if(singleobj->otyp == CREAM_PIE) { ! if(!Blind) pline("Yecch! You've been creamed."); ! else pline("There's %s sticky all over your %s.", ! something, ! body_part(FACE)); ! } else { /* venom in the eyes */ ! if(Blindfolded) /* nothing */ ; ! else if(!Blind) pline_The("venom blinds you."); ! else Your("%s sting.", ! makeplural(body_part(EYE))); } } ! stop_occupation(); ! if (hitu || !range) { ! (void) drop_throw(singleobj, hitu, u.ux, u.uy); ! break; ! } } else if (!range /* reached end of path */ /* missile hits edge of screen */ || !isok(bhitpos.x+dx,bhitpos.y+dy) --- 290,370 ---- if (ohitmon(mtmp, singleobj, range, TRUE)) break; } else if (bhitpos.x == u.ux && bhitpos.y == u.uy) { ! if (multi) nomul(0); ! if (singleobj->oclass == GEM_CLASS && ! singleobj->otyp <= LAST_GEM+6 /* 6 glass colors */ ! && u.usym == S_UNICORN) { ! if (singleobj->otyp > LAST_GEM) { ! You("catch the %s.", xname(singleobj)); ! You("are not interested in %s junk.", ! s_suffix(mon_nam(mon))); ! makeknown(singleobj->otyp); ! dropy(singleobj); ! } else { ! You("accept %s gift in the spirit in which it was intended.", ! s_suffix(mon_nam(mon))); ! (void)hold_another_object(singleobj, ! "You catch, but drop, %s.", xname(singleobj), ! "You catch:"); } ! break; ! } ! if (singleobj->oclass == POTION_CLASS) { ! if (!Blind) singleobj->dknown = 1; ! potionhit(&youmonst, singleobj); ! break; ! } ! switch(singleobj->otyp) { ! int dam, hitv; ! case CREAM_PIE: ! case BLINDING_VENOM: ! hitu = thitu(8, 0, singleobj, xname(singleobj)); ! break; ! default: ! dam = dmgval(singleobj, &youmonst); ! hitv = 3 - distmin(u.ux,u.uy, mon->mx,mon->my); ! if (hitv < -4) hitv = -4; ! if (is_elf(mon->data) && ! objects[singleobj->otyp].w_propellor ! == WP_BOW) { ! hitv++; ! if (MON_WEP(mon) && ! MON_WEP(mon)->otyp == ELVEN_BOW) hitv++; ! if(singleobj->otyp == ELVEN_ARROW) dam++; } + if (bigmonst(uasmon)) hitv++; + hitv += 8+singleobj->spe; + + if (dam < 1) dam = 1; + hitu = thitu(hitv, dam, + singleobj, xname(singleobj)); + } + if (hitu && singleobj->opoisoned) { + char *singlename = xname(singleobj); + poisoned(singlename, A_STR, singlename, 10); + } + if(hitu && (singleobj->otyp == CREAM_PIE || + singleobj->otyp == BLINDING_VENOM)) { + blindinc = rnd(25); + if(singleobj->otyp == CREAM_PIE) { + if(!Blind) pline("Yecch! You've been creamed."); + else pline("There's %s sticky all over your %s.", + something, + body_part(FACE)); + } else { /* venom in the eyes */ + if(Blindfolded) /* nothing */ ; + else if(!Blind) pline_The("venom blinds you."); + else Your("%s sting.", + makeplural(body_part(EYE))); } ! } ! stop_occupation(); ! if (hitu || !range) { ! (void) drop_throw(singleobj, hitu, u.ux, u.uy); ! break; ! } } else if (!range /* reached end of path */ /* missile hits edge of screen */ || !isok(bhitpos.x+dx,bhitpos.y+dy) *** Old/src/muse.c Tue Dec 10 16:43:11 1996 --- src/muse.c Tue Aug 13 13:01:07 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)muse.c 3.2 96/04/29 */ /* Copyright (C) 1990 by Ken Arromdee */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)muse.c 3.2 96/06/10 */ /* Copyright (C) 1990 by Ken Arromdee */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 317,323 **** } if (levl[x][y].typ == STAIRS && !stuck && !immobile) { ! if (x == xdnstair && y == ydnstair) m.has_defense = MUSE_DOWNSTAIRS; if (x == xupstair && y == yupstair && ledger_no(&u.uz) != 1) /* Unfair to let the monsters leave the dungeon with the Amulet */ --- 317,323 ---- } if (levl[x][y].typ == STAIRS && !stuck && !immobile) { ! if (x == xdnstair && y == ydnstair && !is_floater(mtmp->data)) m.has_defense = MUSE_DOWNSTAIRS; if (x == xupstair && y == yupstair && ledger_no(&u.uz) != 1) /* Unfair to let the monsters leave the dungeon with the Amulet */ *************** *** 326,332 **** } else if (levl[x][y].typ == LADDER && !stuck && !immobile) { if (x == xupladder && y == yupladder) m.has_defense = MUSE_UP_LADDER; ! if (x == xdnladder && y == ydnladder) m.has_defense = MUSE_DN_LADDER; } else if (sstairs.sx && sstairs.sx == x && sstairs.sy == y) { m.has_defense = MUSE_SSTAIRS; --- 326,332 ---- } else if (levl[x][y].typ == LADDER && !stuck && !immobile) { if (x == xupladder && y == yupladder) m.has_defense = MUSE_UP_LADDER; ! if (x == xdnladder && y == ydnladder && !is_floater(mtmp->data)) m.has_defense = MUSE_DN_LADDER; } else if (sstairs.sx && sstairs.sx == x && sstairs.sy == y) { m.has_defense = MUSE_SSTAIRS; *************** *** 478,484 **** case MUSE_UNICORN_HORN: if (vismon) { if (otmp) ! pline("%s grasps %s!", Monnam(mtmp), doname(otmp)); else pline("The tip of %s's horn glows!", mon_nam(mtmp)); } --- 478,484 ---- case MUSE_UNICORN_HORN: if (vismon) { if (otmp) ! pline("%s uses a unicorn horn!", Monnam(mtmp)); else pline("The tip of %s's horn glows!", mon_nam(mtmp)); } *************** *** 1431,1446 **** return 2; case MUSE_POT_INVISIBILITY: mquaffmsg(mtmp, otmp); ! if (vis) { if (See_invisible) ! pline("%s body takes on a %s transparency.", s_suffix(Monnam(mtmp)), Hallucination ? "normal" : "strange"); else ! pline("Suddenly you cannot see %s.", mon_nam(mtmp)); } - if (oseen) makeknown(POT_INVISIBILITY); - mon_set_minvis(mtmp); if (otmp->cursed) you_aggravate(mtmp); m_useup(mtmp, otmp); return 2; --- 1431,1446 ---- return 2; case MUSE_POT_INVISIBILITY: mquaffmsg(mtmp, otmp); ! mon_set_minvis(mtmp); ! if (vismon && mtmp->minvis) { /* was seen, now invisible */ if (See_invisible) ! pline("%s body takes on a %s transparency.", s_suffix(Monnam(mtmp)), Hallucination ? "normal" : "strange"); else ! pline("Suddenly you cannot see %s.", mon_nam(mtmp)); ! if (oseen) makeknown(POT_INVISIBILITY); } if (otmp->cursed) you_aggravate(mtmp); m_useup(mtmp, otmp); return 2; *** Old/src/o_init.c Tue Dec 10 16:43:18 1996 --- src/o_init.c Tue Aug 13 13:31:28 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)o_init.c 3.2 94/07/10 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)o_init.c 3.2 96/08/11 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 316,321 **** --- 316,322 ---- objects[oindx].oc_name_known = 1; exercise(A_WIS, TRUE); } + if (moves > 1L) update_inventory(); } } *************** *** 340,345 **** --- 341,347 ---- /* clear last slot */ if (found) disco[dindx-1] = 0; else impossible("named object not in disco"); + update_inventory(); } } *** Old/src/objects.c Tue Dec 10 16:43:22 1996 --- src/objects.c Mon Jun 17 18:36:24 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)objects.c 3.2 96/05/23 */ /* Copyright (c) Mike Threepoint, 1989. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)objects.c 3.2 96/06/16 */ /* Copyright (c) Mike Threepoint, 1989. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 862,878 **** /* miscellaneous ... */ /* Note: boulders and rocks are not normally created at random; the * probabilities only come into effect when you try to polymorph them. ! * Boulders and statues weigh more than MAX_CARR_CAP. */ OBJECT(OBJ("boulder",(char *)0), BITS(1,0,0,0,0,0,0,0,1,0,0,0,MINERAL), 0, ROCK_CLASS, 100, 0, 6000, 0, 20, 20, 0, 0, 2000, HI_MINERAL), OBJECT(OBJ("statue", (char *)0), BITS(1,0,0,1,0,0,0,0,0,0,0,0,MINERAL), 0, ROCK_CLASS, 900, 0, 2500, 0, 20, 20, 0, 0, 2500, CLR_WHITE), ! OBJECT(OBJ("heavy iron ball", (char *)0), BITS(1,0,0,0,0,0,0,0,0,0,0,0,IRON), 0, BALL_CLASS, 1000, 0, 480, 10, 25, 25, 0, 0, 200, HI_METAL), ! OBJECT(OBJ("iron chain", (char *)0), BITS(1,0,0,0,0,0,0,0,0,0,0,0,IRON), 0, ! CHAIN_CLASS, 1000, 0, 120, 0, 0, 0, 0, 0, 200, HI_METAL), OBJECT(OBJ("blinding venom", "splash of venom"), BITS(0,1,0,0,0,0,0,1,0,0,0,0,LIQUID), 0, --- 862,881 ---- /* miscellaneous ... */ /* Note: boulders and rocks are not normally created at random; the * probabilities only come into effect when you try to polymorph them. ! * Boulders weigh more than MAX_CARR_CAP; statues use corpsenm to take ! * on a specific type and may act as containers (both affect weight). */ OBJECT(OBJ("boulder",(char *)0), BITS(1,0,0,0,0,0,0,0,1,0,0,0,MINERAL), 0, ROCK_CLASS, 100, 0, 6000, 0, 20, 20, 0, 0, 2000, HI_MINERAL), OBJECT(OBJ("statue", (char *)0), BITS(1,0,0,1,0,0,0,0,0,0,0,0,MINERAL), 0, ROCK_CLASS, 900, 0, 2500, 0, 20, 20, 0, 0, 2500, CLR_WHITE), ! OBJECT(OBJ("heavy iron ball", (char *)0), BITS(1,0,0,0,0,0,0,0,0,0,WHACK,0,IRON), 0, BALL_CLASS, 1000, 0, 480, 10, 25, 25, 0, 0, 200, HI_METAL), ! /* +d4 when "very heavy" */ ! OBJECT(OBJ("iron chain", (char *)0), BITS(1,0,0,0,0,0,0,0,0,0,WHACK,0,IRON), 0, ! CHAIN_CLASS, 1000, 0, 120, 0, 4, 4, 0, 0, 200, HI_METAL), ! /* +1 both l & s */ OBJECT(OBJ("blinding venom", "splash of venom"), BITS(0,1,0,0,0,0,0,1,0,0,0,0,LIQUID), 0, *** Old/src/objnam.c Tue Dec 10 16:43:26 1996 --- src/objnam.c Mon Dec 9 10:43:29 1996 *************** *** 1,11 **** ! /* SCCS Id: @(#)objnam.c 3.2 96/05/05 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" ! /* "an uncursed partly eaten guardian naga hatchling corpse" */ ! #define PREFIX 50 #define SCHAR_LIM 127 STATIC_DCL char *FDECL(strprepend,(char *,const char *)); --- 1,11 ---- ! /* SCCS Id: @(#)objnam.c 3.2 96/11/01 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" ! /* "an uncursed greased partly eaten guardian naga hatchling [corpse]" */ ! #define PREFIX 80 /* (56) */ #define SCHAR_LIM 127 STATIC_DCL char *FDECL(strprepend,(char *,const char *)); *************** *** 56,65 **** STATIC_OVL char * strprepend(s,pref) register char *s; ! register const char *pref; { ! register int i = strlen(pref); if(i > PREFIX) { ! pline("WARNING: prefix too short."); return(s); } s -= i; --- 56,67 ---- STATIC_OVL char * strprepend(s,pref) register char *s; ! register const char *pref; ! { ! register int i = (int)strlen(pref); ! if(i > PREFIX) { ! impossible("PREFIX too short (for %d).", i); return(s); } s -= i; *************** *** 841,854 **** return(bp); } char * Doname2(obj) register struct obj *obj; { register char *s = doname(obj); ! if('a' <= *s && *s <= 'z') *s -= ('a' - 'A'); return(s); } static const char *wrp[] = { --- 843,880 ---- return(bp); } + /* capitalized variant of doname() */ char * Doname2(obj) register struct obj *obj; { register char *s = doname(obj); ! *s = highc(*s); return(s); + } + + /* returns "your xname(obj)" or "Foobar's xname(obj)" or "the xname(obj)" */ + char * + yname(obj) + struct obj *obj; + { + static char outbuf[BUFSZ]; + char *s = shk_your(outbuf, obj); /* assert( s == outbuf ); */ + int space_left = sizeof outbuf - strlen(s) - sizeof " "; + + return strncat(strcat(s, " "), xname(obj), space_left); + } + + /* capitalized variant of yname() */ + char * + Yname2(obj) + struct obj *obj; + { + char *s = yname(obj); + + *s = highc(*s); + return s; } static const char *wrp[] = { *** Old/src/options.c Tue Dec 10 16:43:31 1996 --- src/options.c Mon Jun 17 18:34:46 1996 *************** *** 7,12 **** --- 7,13 ---- #include "objclass.h" #include "flag.h" NEARDATA struct flag flags; /* provide linkage */ + NEARDATA struct instance_flags iflags; /* provide linkage */ #define static #else #include "hack.h" *************** *** 40,46 **** #endif {"autopickup", &flags.pickup, TRUE}, #if defined(MICRO) && !defined(AMIGA) ! {"BIOS", &flags.BIOS, FALSE}, #else {"BIOS", (boolean *)0, FALSE}, #endif --- 41,47 ---- #endif {"autopickup", &flags.pickup, TRUE}, #if defined(MICRO) && !defined(AMIGA) ! {"BIOS", &iflags.BIOS, FALSE}, #else {"BIOS", (boolean *)0, FALSE}, #endif *************** *** 51,66 **** #endif #ifdef TEXTCOLOR # ifdef MICRO ! {"color", &flags.use_color, TRUE}, # else /* systems that support multiple terminals, many monochrome */ ! {"color", &flags.use_color, FALSE}, # endif #else {"color", (boolean *)0, FALSE}, #endif {"confirm",&flags.confirm, TRUE}, #ifdef TERMLIB ! {"DECgraphics", &flags.DECgraphics, FALSE}, #else {"DECgraphics", (boolean *)0, FALSE}, #endif --- 52,67 ---- #endif #ifdef TEXTCOLOR # ifdef MICRO ! {"color", &iflags.use_color, TRUE}, # else /* systems that support multiple terminals, many monochrome */ ! {"color", &iflags.use_color, FALSE}, # endif #else {"color", (boolean *)0, FALSE}, #endif {"confirm",&flags.confirm, TRUE}, #ifdef TERMLIB ! {"DECgraphics", &iflags.DECgraphics, FALSE}, #else {"DECgraphics", (boolean *)0, FALSE}, #endif *************** *** 78,102 **** #endif {"help", &flags.help, TRUE}, #ifdef TEXTCOLOR ! {"hilite_pet", &flags.hilite_pet, FALSE}, #else {"hilite_pet", (boolean *)0, FALSE}, #endif #ifdef ASCIIGRAPH ! {"IBMgraphics", &flags.IBMgraphics, FALSE}, #else {"IBMgraphics", (boolean *)0, FALSE}, #endif {"ignintr", &flags.ignintr, FALSE}, #ifdef MAC_GRAPHICS_ENV ! {"large_font", &flags.large_font, FALSE}, #else {"large_font", (boolean *)0, FALSE}, #endif {"legacy",&flags.legacy, TRUE}, {"lit_corridor", &flags.lit_corridor, FALSE}, #ifdef MAC_GRAPHICS_ENV ! {"Macgraphics", &flags.MACgraphics, TRUE}, #else {"Macgraphics", (boolean *)0, FALSE}, #endif --- 79,103 ---- #endif {"help", &flags.help, TRUE}, #ifdef TEXTCOLOR ! {"hilite_pet", &iflags.hilite_pet, FALSE}, #else {"hilite_pet", (boolean *)0, FALSE}, #endif #ifdef ASCIIGRAPH ! {"IBMgraphics", &iflags.IBMgraphics, FALSE}, #else {"IBMgraphics", (boolean *)0, FALSE}, #endif {"ignintr", &flags.ignintr, FALSE}, #ifdef MAC_GRAPHICS_ENV ! {"large_font", &iflags.large_font, FALSE}, #else {"large_font", (boolean *)0, FALSE}, #endif {"legacy",&flags.legacy, TRUE}, {"lit_corridor", &flags.lit_corridor, FALSE}, #ifdef MAC_GRAPHICS_ENV ! {"Macgraphics", &iflags.MACgraphics, TRUE}, #else {"Macgraphics", (boolean *)0, FALSE}, #endif *************** *** 106,117 **** {"mail", (boolean *)0, TRUE}, #endif #ifdef NEWS ! {"news", &flags.news, TRUE}, #else {"news", (boolean *)0, FALSE}, #endif {"null", &flags.null, TRUE}, ! {"number_pad", &flags.num_pad, FALSE}, #ifdef MAC {"page_wait", &flags.page_wait, TRUE}, #else --- 107,118 ---- {"mail", (boolean *)0, TRUE}, #endif #ifdef NEWS ! {"news", &iflags.news, TRUE}, #else {"news", (boolean *)0, FALSE}, #endif {"null", &flags.null, TRUE}, ! {"number_pad", &iflags.num_pad, FALSE}, #ifdef MAC {"page_wait", &flags.page_wait, TRUE}, #else *************** *** 124,142 **** {"popup_dialog", (boolean *)0, FALSE}, #endif #if defined(MSDOS) && defined(USE_TILES) ! {"preload_tiles", &flags.preload_tiles, TRUE}, #else {"preload_tiles", (boolean *)0, FALSE}, #endif #if defined(MICRO) && !defined(AMIGA) ! {"rawio", &flags.rawio, FALSE}, #else {"rawio", (boolean *)0, FALSE}, #endif {"rest_on_space", &flags.rest_on_space, FALSE}, {"safe_pet", &flags.safe_dog, TRUE}, #ifdef WIZARD ! {"sanity_check", &flags.sanity_check, FALSE}, #else {"sanity_check", (boolean *)0, FALSE}, #endif --- 125,143 ---- {"popup_dialog", (boolean *)0, FALSE}, #endif #if defined(MSDOS) && defined(USE_TILES) ! {"preload_tiles", &iflags.preload_tiles, TRUE}, #else {"preload_tiles", (boolean *)0, FALSE}, #endif #if defined(MICRO) && !defined(AMIGA) ! {"rawio", &iflags.rawio, FALSE}, #else {"rawio", (boolean *)0, FALSE}, #endif {"rest_on_space", &flags.rest_on_space, FALSE}, {"safe_pet", &flags.safe_dog, TRUE}, #ifdef WIZARD ! {"sanity_check", &iflags.sanity_check, FALSE}, #else {"sanity_check", (boolean *)0, FALSE}, #endif *************** *** 361,367 **** flags.end_own = FALSE; flags.end_top = 3; flags.end_around = 2; ! flags.msg_history = 20; /* Set the default monster and object class symbols. Don't use */ /* memcpy() --- sizeof char != sizeof uchar on some machines. */ --- 362,368 ---- flags.end_own = FALSE; flags.end_top = 3; flags.end_around = 2; ! iflags.msg_history = 20; /* Set the default monster and object class symbols. Don't use */ /* memcpy() --- sizeof char != sizeof uchar on some machines. */ *************** *** 388,394 **** if (!strncmp(getenv("TERM"), "AT", 2)) { switch_graphics(IBM_GRAPHICS); # ifdef TEXTCOLOR ! flags.use_color = TRUE; # endif } #endif /* UNIX && TTY_GRAPHICS */ --- 389,395 ---- if (!strncmp(getenv("TERM"), "AT", 2)) { switch_graphics(IBM_GRAPHICS); # ifdef TEXTCOLOR ! iflags.use_color = TRUE; # endif } #endif /* UNIX && TTY_GRAPHICS */ *************** *** 526,536 **** return (boolopt[i].addr == &flags.female || boolopt[i].addr == &flags.legacy #if defined(MICRO) && !defined(AMIGA) ! || boolopt[i].addr == &flags.rawio ! || boolopt[i].addr == &flags.BIOS #endif #if defined(MSDOS) && defined(USE_TILES) ! || boolopt[i].addr == &flags.preload_tiles #endif ); } --- 527,537 ---- return (boolopt[i].addr == &flags.female || boolopt[i].addr == &flags.legacy #if defined(MICRO) && !defined(AMIGA) ! || boolopt[i].addr == &iflags.rawio ! || boolopt[i].addr == &iflags.BIOS #endif #if defined(MSDOS) && defined(USE_TILES) ! || boolopt[i].addr == &iflags.preload_tiles #endif ); } *************** *** 735,741 **** #if defined(MICRO) && !defined(AMIGA) /* included for compatibility with old NetHack.cnf files */ if (match_optname(opts, "IBM_", 4, FALSE)) { ! flags.BIOS = !negated; return; } #endif /* MICRO */ --- 736,742 ---- #if defined(MICRO) && !defined(AMIGA) /* included for compatibility with old NetHack.cnf files */ if (match_optname(opts, "IBM_", 4, FALSE)) { ! iflags.BIOS = !negated; return; } #endif /* MICRO */ *************** *** 785,791 **** if (match_optname(opts, fullname, 3, TRUE)) { op = string_for_env_opt(fullname, opts, negated); if ((negated && !op) || (!negated && op)) { ! flags.msg_history = negated ? 0 : atoi(op); } else if (negated) bad_negation(fullname, TRUE); return; } --- 786,792 ---- if (match_optname(opts, fullname, 3, TRUE)) { op = string_for_env_opt(fullname, opts, negated); if ((negated && !op) || (!negated && op)) { ! iflags.msg_history = negated ? 0 : atoi(op); } else if (negated) bad_negation(fullname, TRUE); return; } *************** *** 1303,1315 **** #if defined(TERMLIB) || defined(ASCIIGRAPH) || defined(MAC_GRAPHICS_ENV) if (FALSE # ifdef TERMLIB ! || (boolopt[i].addr) == &flags.DECgraphics # endif # ifdef ASCIIGRAPH ! || (boolopt[i].addr) == &flags.IBMgraphics # endif # ifdef MAC_GRAPHICS_ENV ! || (boolopt[i].addr) == &flags.MACgraphics # endif ) { # ifdef REINCARNATION --- 1304,1316 ---- #if defined(TERMLIB) || defined(ASCIIGRAPH) || defined(MAC_GRAPHICS_ENV) if (FALSE # ifdef TERMLIB ! || (boolopt[i].addr) == &iflags.DECgraphics # endif # ifdef ASCIIGRAPH ! || (boolopt[i].addr) == &iflags.IBMgraphics # endif # ifdef MAC_GRAPHICS_ENV ! || (boolopt[i].addr) == &iflags.MACgraphics # endif ) { # ifdef REINCARNATION *************** *** 1318,1335 **** # endif need_redraw = TRUE; # ifdef TERMLIB ! if ((boolopt[i].addr) == &flags.DECgraphics) ! switch_graphics(flags.DECgraphics ? DEC_GRAPHICS : ASCII_GRAPHICS); # endif # ifdef ASCIIGRAPH ! if ((boolopt[i].addr) == &flags.IBMgraphics) ! switch_graphics(flags.IBMgraphics ? IBM_GRAPHICS : ASCII_GRAPHICS); # endif # ifdef MAC_GRAPHICS_ENV ! if ((boolopt[i].addr) == &flags.MACgraphics) ! switch_graphics(flags.MACgraphics ? MAC_GRAPHICS : ASCII_GRAPHICS); # endif # ifdef REINCARNATION --- 1319,1336 ---- # endif need_redraw = TRUE; # ifdef TERMLIB ! if ((boolopt[i].addr) == &iflags.DECgraphics) ! switch_graphics(iflags.DECgraphics ? DEC_GRAPHICS : ASCII_GRAPHICS); # endif # ifdef ASCIIGRAPH ! if ((boolopt[i].addr) == &iflags.IBMgraphics) ! switch_graphics(iflags.IBMgraphics ? IBM_GRAPHICS : ASCII_GRAPHICS); # endif # ifdef MAC_GRAPHICS_ENV ! if ((boolopt[i].addr) == &iflags.MACgraphics) ! switch_graphics(iflags.MACgraphics ? MAC_GRAPHICS : ASCII_GRAPHICS); # endif # ifdef REINCARNATION *************** *** 1356,1363 **** if (flags.invlet_constant) reassign(); } ! else if ((boolopt[i].addr) == &flags.num_pad) ! number_pad(flags.num_pad ? 1 : 0); else if ((boolopt[i].addr) == &flags.lit_corridor) { /* --- 1357,1364 ---- if (flags.invlet_constant) reassign(); } ! else if ((boolopt[i].addr) == &iflags.num_pad) ! number_pad(iflags.num_pad ? 1 : 0); else if ((boolopt[i].addr) == &flags.lit_corridor) { /* *************** *** 1372,1383 **** } #ifdef TEXTCOLOR ! else if ((boolopt[i].addr) == &flags.use_color ! || (boolopt[i].addr) == &flags.hilite_pet) { need_redraw = TRUE; # ifdef TOS ! if ((boolopt[i].addr) == &flags.use_color ! && flags.BIOS) { if (colors_changed) restore_colors(); else --- 1373,1384 ---- } #ifdef TEXTCOLOR ! else if ((boolopt[i].addr) == &iflags.use_color ! || (boolopt[i].addr) == &iflags.hilite_pet) { need_redraw = TRUE; # ifdef TOS ! if ((boolopt[i].addr) == &iflags.use_color ! && iflags.BIOS) { if (colors_changed) restore_colors(); else *************** *** 1522,1528 **** (boolopt_only_initial(i) ^ pass)) { if (bool_p == &flags.female) continue; /* already done */ #ifdef WIZARD ! if (bool_p == &flags.sanity_check && !wizard) continue; #endif any.a_int = (pass == 0) ? 0 : i + 1; Sprintf(buf, "%s%-13s [%s]", pass == 0 ? " " : "", --- 1523,1529 ---- (boolopt_only_initial(i) ^ pass)) { if (bool_p == &flags.female) continue; /* already done */ #ifdef WIZARD ! if (bool_p == &iflags.sanity_check && !wizard) continue; #endif any.a_int = (pass == 0) ? 0 : i + 1; Sprintf(buf, "%s%-13s [%s]", pass == 0 ? " " : "", *************** *** 1543,1549 **** doset_add_menu(tmpwin, "name", plname, 0); doset_add_menu(tmpwin, "catname", catname[0] ? catname : "(null)", 0); doset_add_menu(tmpwin, "dogname", dogname[0] ? dogname : "(null)", 0); ! Sprintf(buf, "%u", flags.msg_history); doset_add_menu(tmpwin, "msghistory", buf, 0); doset_add_menu(tmpwin, "pettype", (preferred_pet == 'c') ? "cat" : --- 1544,1550 ---- doset_add_menu(tmpwin, "name", plname, 0); doset_add_menu(tmpwin, "catname", catname[0] ? catname : "(null)", 0); doset_add_menu(tmpwin, "dogname", dogname[0] ? dogname : "(null)", 0); ! Sprintf(buf, "%u", iflags.msg_history); doset_add_menu(tmpwin, "msghistory", buf, 0); doset_add_menu(tmpwin, "pettype", (preferred_pet == 'c') ? "cat" : *** Old/src/pickup.c Tue Dec 10 16:43:40 1996 --- src/pickup.c Tue Aug 13 12:20:12 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)pickup.c 3.2 96/05/03 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)pickup.c 3.2 96/07/19 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 1242,1249 **** struct obj *obj; int depthin; { /* odds: 1/1, 2/2, 3/4, 4/8, 5/16, 6/32, 7/64, 8/128, 9/128, 10/128,... */ ! if ((Is_mbag(obj) || (obj->otyp == WAN_CANCELLATION && obj->spe > 0)) && (rn2(1 << (depthin > 7 ? 7 : depthin)) <= depthin)) return TRUE; else if (Has_contents(obj)) { --- 1242,1254 ---- struct obj *obj; int depthin; { + /* these won't cause an explosion when they're empty */ + if ((obj->otyp == WAN_CANCELLATION || obj->otyp == BAG_OF_TRICKS) && + obj->spe <= 0) + return FALSE; + /* odds: 1/1, 2/2, 3/4, 4/8, 5/16, 6/32, 7/64, 8/128, 9/128, 10/128,... */ ! if ((Is_mbag(obj) || obj->otyp == WAN_CANCELLATION) && (rn2(1 << (depthin > 7 ? 7 : depthin)) <= depthin)) return TRUE; else if (Has_contents(obj)) { *************** *** 1302,1308 **** return 0; } else if (obj == uwep) { if (welded(obj)) { ! weldmsg(obj, FALSE); return 0; } setuwep((struct obj *) 0); --- 1307,1313 ---- return 0; } else if (obj == uwep) { if (welded(obj)) { ! weldmsg(obj); return 0; } setuwep((struct obj *) 0); *************** *** 1470,1476 **** struct monst *shkp; boolean one_by_one, allflag, loot_out = FALSE, loot_in = FALSE; char select[MAXOCLASSES+1]; ! char buf[BUFSZ], qbuf[QBUFSZ]; long loss = 0L; int cnt = 0, used = 0, lcnt = 0, menu_on_request; --- 1475,1481 ---- struct monst *shkp; boolean one_by_one, allflag, loot_out = FALSE, loot_in = FALSE; char select[MAXOCLASSES+1]; ! char qbuf[QBUFSZ]; long loss = 0L; int cnt = 0, used = 0, lcnt = 0, menu_on_request; *************** *** 1562,1571 **** obj->owt = weight(obj); if (!cnt) { ! pline("%s %s is empty.", Shk_Your(buf, obj), xname(obj)); } else { ! Sprintf(qbuf, "Do you want to take %s out of %s %s?", ! something, shk_your(buf, obj), xname(obj)); if (flags.menu_style != MENU_TRADITIONAL) { if (flags.menu_style == MENU_FULL) { int t = in_or_out_menu("Do what?", current_container); --- 1567,1576 ---- obj->owt = weight(obj); if (!cnt) { ! pline("%s is empty.", Yname2(obj)); } else { ! Sprintf(qbuf, "Do you want to take %s out of %s?", ! something, yname(obj)); if (flags.menu_style != MENU_TRADITIONAL) { if (flags.menu_style == MENU_FULL) { int t = in_or_out_menu("Do what?", current_container); *** Old/src/pline.c Tue Dec 10 16:43:45 1996 --- src/pline.c Tue Aug 13 12:57:39 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)pline.c 3.2 96/02/01 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)pline.c 3.2 96/07/15 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 52,58 **** Vsprintf(pbuf,line,VA_ARGS); line = pbuf; } ! if (!flags.window_inited) { raw_print(line); return; } --- 52,58 ---- Vsprintf(pbuf,line,VA_ARGS); line = pbuf; } ! if (!iflags.window_inited) { raw_print(line); return; } *************** *** 291,297 **** if (mtmp->mundetected) Strcat(info, ", concealed"); if (mtmp->minvis) Strcat(info, ", invisible"); if (mtmp == u.ustuck) Strcat(info, ! (u.mtimedone && sticks(uasmon)) ? ", held by you" : u.uswallow ? (is_animal(u.ustuck->data) ? ", swallowed you" : ", engulfed you") : --- 291,297 ---- if (mtmp->mundetected) Strcat(info, ", concealed"); if (mtmp->minvis) Strcat(info, ", invisible"); if (mtmp == u.ustuck) Strcat(info, ! (Upolyd && sticks(uasmon)) ? ", held by you" : u.uswallow ? (is_animal(u.ustuck->data) ? ", swallowed you" : ", engulfed you") : *************** *** 358,364 **** if (u.uundetected) Strcat(info, ", concealed"); if (Invis) Strcat(info, ", invisible"); if (u.ustuck) { ! if (u.mtimedone && sticks(uasmon)) Strcat(info, ", holding "); else Strcat(info, ", held by "); --- 358,364 ---- if (u.uundetected) Strcat(info, ", concealed"); if (Invis) Strcat(info, ", invisible"); if (u.ustuck) { ! if (Upolyd && sticks(uasmon)) Strcat(info, ", holding "); else Strcat(info, ", held by "); *************** *** 376,384 **** (u.ualign.record == 0) ? "nominally " : "insufficiently ", align_str(u.ualign.type), ! u.mtimedone ? mons[u.umonnum].mlevel : u.ulevel, ! u.mtimedone ? u.mh : u.uhp, ! u.mtimedone ? u.mhmax : u.uhpmax, u.uac, info); } --- 376,384 ---- (u.ualign.record == 0) ? "nominally " : "insufficiently ", align_str(u.ualign.type), ! Upolyd ? mons[u.umonnum].mlevel : u.ulevel, ! Upolyd ? u.mh : u.uhp, ! Upolyd ? u.mhmax : u.uhpmax, u.uac, info); } *** Old/src/polyself.c Tue Dec 10 16:43:48 1996 --- src/polyself.c Tue Aug 13 13:25:57 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)polyself.c 3.2 95/11/12 */ /* Copyright (C) 1987, 1988, 1989 by Ken Arromdee */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)polyself.c 3.2 96/07/19 */ /* Copyright (C) 1987, 1988, 1989 by Ken Arromdee */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 49,55 **** polyman(fmt, arg) const char *fmt, *arg; { ! boolean sticky = sticks(uasmon) && u.ustuck && !u.uswallow; if (u.umonnum != PM_PLAYERMON) { u.acurr = u.macurr; /* restore old attribs */ --- 49,56 ---- polyman(fmt, arg) const char *fmt, *arg; { ! boolean sticky = sticks(uasmon) && u.ustuck && !u.uswallow, ! was_mimicking_gold = (u.usym == 0); if (u.umonnum != PM_PLAYERMON) { u.acurr = u.macurr; /* restore old attribs */ *************** *** 68,77 **** if (sticky) uunstick(); find_ac(); You(fmt, arg); /* check whether player foolishly genocided self while poly'd */ ! if (mvitals[u.umonster].mvflags & G_GENOD) done(GENOCIDED); if(!Levitation && !u.ustuck && (is_pool(u.ux,u.uy) || is_lava(u.ux,u.uy))) --- 69,88 ---- if (sticky) uunstick(); find_ac(); + if (was_mimicking_gold) { + if (multi < 0) unmul(""); + } You(fmt, arg); /* check whether player foolishly genocided self while poly'd */ ! if (mvitals[u.umonster].mvflags & G_GENOD) { ! /* intervening activity might have clobbered genocide info */ ! if (!killer || !strstri(killer, "genocid")) { ! killer_format = KILLED_BY; ! killer = "self-genocide"; ! } ! done(GENOCIDED); ! } if(!Levitation && !u.ustuck && (is_pool(u.ux,u.uy) || is_lava(u.ux,u.uy))) *************** *** 569,579 **** void rehumanize() { if (emits_light(uasmon)) del_light_source(LS_MONSTER, (genericptr_t)&youmonst); ! polyman("return to %s form!", Role_is('E') ? "elven" : "human"); ! if (u.uhp < 1) done(DIED); if (!uarmg) selftouch("No longer petrify-resistant, you"); nomul(0); --- 580,599 ---- void rehumanize() { + const char *uform = Role_is('E') ? "elven" : "human"; + if (emits_light(uasmon)) del_light_source(LS_MONSTER, (genericptr_t)&youmonst); ! polyman("return to %s form!", uform); ! ! if (u.uhp < 1) { ! char kbuf[256]; ! Sprintf(kbuf, "reverting to unhealthy %s form", uform); ! killer_format = KILLED_BY; ! killer = kbuf; ! done(DIED); ! } if (!uarmg) selftouch("No longer petrify-resistant, you"); nomul(0); *************** *** 797,806 **** : -200); return 1; } ! if ((mtmp->data==&mons[PM_MEDUSA]) && !mtmp->mcan) { ! pline("Gazing at the awake Medusa is not a very good idea."); /* as if gazing at a sleeping anything is fruitful... */ You("turn to stone..."); done(STONING); } } --- 817,830 ---- : -200); return 1; } ! if ((mtmp->data == &mons[PM_MEDUSA]) && !mtmp->mcan) { ! pline( ! "Gazing at the awake Medusa is not a very good idea."); /* as if gazing at a sleeping anything is fruitful... */ You("turn to stone..."); + killer_format = KILLED_BY; + killer = + "deliberately gazing at Medusa's hideous countenance"; done(STONING); } } *** Old/src/potion.c Tue Dec 10 16:43:52 1996 --- src/potion.c Tue Aug 13 13:30:55 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)potion.c 3.2 96/03/06 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)potion.c 3.2 96/08/09 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 387,414 **** if (u.ulycn >= LOW_PM) { Your("affinity to %s disappears!", makeplural(mons[u.ulycn].mname)); ! if (uasmon == &mons[u.ulycn] && !Polymorph_control) ! rehumanize(); ! u.ulycn = NON_PM; } losehp(d(2,6), "potion of holy water", KILLED_BY_AN); } else if(otmp->cursed) { You_feel("quite proud of yourself."); healup(d(2,6),0,0,0); exercise(A_CON, TRUE); } ! } else if(otmp->blessed) { You_feel("full of awe."); make_sick(0L, (char *) 0, TRUE, SICK_ALL); exercise(A_WIS, TRUE); exercise(A_CON, TRUE); ! if (u.ulycn >= LOW_PM) { ! You_feel("purified."); ! if (uasmon == &mons[u.ulycn] && !Polymorph_control) ! rehumanize(); ! u.ulycn = NON_PM; ! } /* make_confused(0L,TRUE); */ } else { if(u.ualign.type == A_LAWFUL) { --- 387,411 ---- if (u.ulycn >= LOW_PM) { Your("affinity to %s disappears!", makeplural(mons[u.ulycn].mname)); ! if (uasmon == &mons[u.ulycn]) ! you_unwere(FALSE); ! u.ulycn = NON_PM; /* cure lycanthropy */ } losehp(d(2,6), "potion of holy water", KILLED_BY_AN); } else if(otmp->cursed) { You_feel("quite proud of yourself."); healup(d(2,6),0,0,0); + if (u.ulycn >= LOW_PM && !Upolyd) you_were(); exercise(A_CON, TRUE); } ! } else { if(otmp->blessed) { You_feel("full of awe."); make_sick(0L, (char *) 0, TRUE, SICK_ALL); exercise(A_WIS, TRUE); exercise(A_CON, TRUE); ! if (u.ulycn >= LOW_PM) ! you_unwere(TRUE); /* "Purified" */ /* make_confused(0L,TRUE); */ } else { if(u.ualign.type == A_LAWFUL) { *************** *** 417,424 **** --- 414,423 ---- KILLED_BY_AN); } else You_feel("full of dread."); + if (u.ulycn >= LOW_PM && !Upolyd) you_were(); exercise(A_CON, FALSE); } + } break; case POT_BOOZE: unkn++; *************** *** 428,435 **** if (!otmp->blessed) make_confused(itimeout_incr(HConfusion, d(3,8)), FALSE); /* the whiskey makes us feel better */ ! if (u.uhp < u.uhpmax && !otmp->odiluted) ! losehp(-1, "", 0); /* can't kill you */ u.uhunger += 10 * (2 + bcsign(otmp)); newuhs(FALSE); exercise(A_WIS, FALSE); --- 427,433 ---- if (!otmp->blessed) make_confused(itimeout_incr(HConfusion, d(3,8)), FALSE); /* the whiskey makes us feel better */ ! if (!otmp->odiluted) healup(1, 0, FALSE, FALSE); u.uhunger += 10 * (2 + bcsign(otmp)); newuhs(FALSE); exercise(A_WIS, FALSE); *************** *** 738,744 **** register boolean curesick, cureblind; { if (nhp) { ! if (u.mtimedone) { u.mh += nhp; if (u.mh > u.mhmax) u.mh = (u.mhmax += nxtra); } else { --- 736,742 ---- register boolean curesick, cureblind; { if (nhp) { ! if (Upolyd) { u.mh += nhp; if (u.mh > u.mhmax) u.mh = (u.mhmax += nxtra); } else { *************** *** 873,898 **** } break; case POT_WATER: ! if (is_undead(mon->data) || is_demon(mon->data)) { ! if (obj->blessed) { ! pline("%s shrieks in pain!", Monnam(mon)); ! mon->mhp -= d(2,6); ! if (mon->mhp <1) killed(mon); ! } else if (obj->cursed) { ! if (canseemon(mon)) ! pline("%s looks healthier.", Monnam(mon)); ! mon->mhp += d(2,6); ! if (mon->mhp > mon->mhpmax) ! mon->mhp = mon->mhpmax; ! } } else if(mon->data == &mons[PM_GREMLIN]) { ! struct monst *mtmp2 = clone_mon(mon); ! if (mtmp2) { ! mtmp2->mhpmax = (mon->mhpmax /= 2); ! if (canseemon(mon)) ! pline("%s multiplies.", Monnam(mon)); ! } } break; case POT_OIL: --- 871,901 ---- } break; case POT_WATER: ! if (is_undead(mon->data) || is_demon(mon->data) || ! is_were(mon->data)) { ! if (obj->blessed) { ! pline("%s shrieks in pain!", Monnam(mon)); ! mon->mhp -= d(2,6); ! if (mon->mhp < 1) killed(mon); ! else if (is_were(mon->data) && !is_human(mon->data)) ! new_were(mon); /* revert to human */ ! } else if (obj->cursed) { ! if (canseemon(mon)) ! pline("%s looks healthier.", Monnam(mon)); ! mon->mhp += d(2,6); ! if (mon->mhp > mon->mhpmax) mon->mhp = mon->mhpmax; ! if (is_were(mon->data) && is_human(mon->data) && ! !Protection_from_shape_changers) ! new_were(mon); /* transform into beast */ ! } } else if(mon->data == &mons[PM_GREMLIN]) { ! struct monst *mtmp2 = clone_mon(mon); ! if (mtmp2) { ! mtmp2->mhpmax = (mon->mhpmax /= 2); ! if (canseemon(mon)) ! pline("%s multiplies.", Monnam(mon)); ! } } break; case POT_OIL: *************** *** 955,969 **** } break; case POT_EXTRA_HEALING: if (u.uhp < u.uhpmax) u.uhp++, flags.botl = 1; /*FALL THROUGH*/ case POT_HEALING: if (u.uhp < u.uhpmax) u.uhp++, flags.botl = 1; exercise(A_CON, TRUE); break; case POT_SICKNESS: if (!Role_is('H')) { ! if(u.uhp <= 5) u.uhp = 1; else u.uhp -= 5; flags.botl = 1; exercise(A_CON, FALSE); } --- 958,978 ---- } break; case POT_EXTRA_HEALING: + if (Upolyd && u.mh < u.mhmax) u.mh++, flags.botl = 1; if (u.uhp < u.uhpmax) u.uhp++, flags.botl = 1; /*FALL THROUGH*/ case POT_HEALING: + if (Upolyd && u.mh < u.mhmax) u.mh++, flags.botl = 1; if (u.uhp < u.uhpmax) u.uhp++, flags.botl = 1; exercise(A_CON, TRUE); break; case POT_SICKNESS: if (!Role_is('H')) { ! if (Upolyd) { ! if (u.mh <= 5) u.mh = 1; else u.mh -= 5; ! } else { ! if (u.uhp <= 5) u.uhp = 1; else u.uhp -= 5; ! } flags.botl = 1; exercise(A_CON, FALSE); } *************** *** 1007,1012 **** --- 1016,1028 ---- mtmp->mhpmax = (u.mhmax /= 2); You("multiply."); } + } else if (u.ulycn >= LOW_PM) { + /* vapor from [un]holy water will trigger + transformation but won't cure lycanthropy */ + if (obj->blessed && uasmon == &mons[u.ulycn]) + you_unwere(FALSE); + else if (obj->cursed && !Upolyd) + you_were(); } /* case POT_GAIN_LEVEL: *************** *** 1121,1145 **** register struct obj *obj; /* returns TRUE if something happened (potion should be used up) */ { ! if(snuff_lit(obj)) return(TRUE); if (obj->greased) { grease_protect(obj,(char *)0,FALSE); return(FALSE); } switch (obj->oclass) { case WEAPON_CLASS: if (!obj->oerodeproof && is_rustprone(obj) && (obj->oeroded < MAX_ERODE) && !rn2(10)) { ! Your("%s some%s.", aobjnam(obj, "rust"), ! obj->oeroded ? " more" : "what"); obj->oeroded++; return TRUE; } else break; case POTION_CLASS: if (obj->otyp == POT_WATER) return FALSE; ! Your("%s%s.", aobjnam(obj,"dilute"), ! obj->odiluted ? " further" : ""); if (obj->odiluted) { obj->odiluted = 0; #ifdef UNIXPC --- 1137,1166 ---- register struct obj *obj; /* returns TRUE if something happened (potion should be used up) */ { ! char Your_buf[BUFSZ]; ! ! if (snuff_lit(obj)) return(TRUE); if (obj->greased) { grease_protect(obj,(char *)0,FALSE); return(FALSE); } + (void) Shk_Your(Your_buf, obj); + /* (Rusting and diluting unpaid shop goods ought to be charged for.) */ switch (obj->oclass) { case WEAPON_CLASS: if (!obj->oerodeproof && is_rustprone(obj) && (obj->oeroded < MAX_ERODE) && !rn2(10)) { ! pline("%s %s some%s.", ! Your_buf, aobjnam(obj, "rust"), ! obj->oeroded ? " more" : "what"); obj->oeroded++; return TRUE; } else break; case POTION_CLASS: if (obj->otyp == POT_WATER) return FALSE; ! pline("%s %s%s.", Your_buf, aobjnam(obj,"dilute"), ! obj->odiluted ? " further" : ""); if (obj->odiluted) { obj->odiluted = 0; #ifdef UNIXPC *************** *** 1194,1200 **** return TRUE; } } ! Your("%s wet.", aobjnam(obj,"get")); return FALSE; } --- 1215,1221 ---- return TRUE; } } ! pline("%s %s wet.", Your_buf, aobjnam(obj,"get")); return FALSE; } *************** *** 1206,1212 **** uchar here; char allowall[2]; short mixture; ! char qbuf[QBUFSZ]; allowall[0] = ALL_CLASSES; allowall[1] = '\0'; if(!(obj = getobj(allowall, "dip"))) --- 1227,1233 ---- uchar here; char allowall[2]; short mixture; ! char qbuf[QBUFSZ], Your_buf[BUFSZ]; allowall[0] = ALL_CLASSES; allowall[1] = '\0'; if(!(obj = getobj(allowall, "dip"))) *************** *** 1238,1247 **** return 0; } if(potion->otyp == POT_WATER) { if (potion->blessed) { if (obj->cursed) { ! if (!Blind) ! Your("%s %s.", aobjnam(obj, "softly glow"), hcolor(amber)); uncurse(obj); --- 1259,1271 ---- return 0; } if(potion->otyp == POT_WATER) { + boolean useeit = !Blind; + if (useeit) (void) Shk_Your(Your_buf, obj); if (potion->blessed) { if (obj->cursed) { ! if (useeit) ! pline("%s %s %s.", ! Your_buf, aobjnam(obj, "softly glow"), hcolor(amber)); uncurse(obj); *************** *** 1253,1261 **** useup(potion); return(1); } else if(!obj->blessed) { ! if (!Blind) { tmp = hcolor(light_blue); ! Your("%s with a%s %s aura.", aobjnam(obj, "softly glow"), index(vowels, *tmp) ? "n" : "", tmp); } --- 1277,1286 ---- useup(potion); return(1); } else if(!obj->blessed) { ! if (useeit) { tmp = hcolor(light_blue); ! pline("%s %s with a%s %s aura.", ! Your_buf, aobjnam(obj, "softly glow"), index(vowels, *tmp) ? "n" : "", tmp); } *************** *** 1265,1280 **** } } else if (potion->cursed) { if (obj->blessed) { ! if (!Blind) ! Your("%s %s.", aobjnam(obj, "glow"), ! hcolor((const char *)"brown")); unbless(obj); obj->bknown=1; goto poof; } else if(!obj->cursed) { ! if (!Blind) { tmp = hcolor(Black); ! Your("%s with a%s %s aura.", aobjnam(obj, "glow"), index(vowels, *tmp) ? "n" : "", tmp); } --- 1290,1308 ---- } } else if (potion->cursed) { if (obj->blessed) { ! if (useeit) ! pline("%s %s %s.", ! Your_buf, ! aobjnam(obj, "glow"), ! hcolor((const char *)"brown")); unbless(obj); obj->bknown=1; goto poof; } else if(!obj->cursed) { ! if (useeit) { tmp = hcolor(Black); ! pline("%s %s with a%s %s aura.", ! Your_buf, aobjnam(obj, "glow"), index(vowels, *tmp) ? "n" : "", tmp); } *************** *** 1361,1414 **** goto poof; } } ! if((obj->oclass == WEAPON_CLASS) && (potion->otyp == POT_OIL)) { if (potion->lamplit) { /* burning */ ! if (obj->oerodeproof) { ! Your("%s burns for a moment.", xname(obj)); } else { ! pline_The("burning oil %s your %s", obj->oeroded == MAX_ERODE ? "destroys" : "damages", ! xname(obj)); if (obj->oeroded == MAX_ERODE) { obj_extract_self(obj); obfree(obj, (struct obj *)0); obj = (struct obj *) 0; ! } else obj->oeroded++; } ! exercise(A_WIS, FALSE); } else if (!obj->oeroded) { ! Your("%s do%s not need oiling.", xname(obj), ! (obj->quan > 1L) ? "" : "es"); ! exercise(A_WIS, FALSE); } else { ! if (potion->cursed) { ! pline_The("oil spills and covers your %s.", ! makeplural(body_part(FINGER))); ! exercise(A_WIS, FALSE); ! incr_itimeout(&Glib, rnd(10)); ! } else { ! Your("%s %s less rusty.", xname(obj), ! (obj->quan > 1L) ? "are" : "is"); ! obj->oeroded--; ! exercise(A_WIS, TRUE); ! } } makeknown(potion->otyp); useup(potion); ! return TRUE; } /* Allow filling of MAGIC_LAMPs to prevent identification by player */ if ((obj->otyp == OIL_LAMP || obj->otyp == MAGIC_LAMP) && (potion->otyp == POT_OIL)) { - /* Turn off engine before fueling, turn off fuel too :-) */ if (obj->lamplit || potion->lamplit) { useup(potion); explode(u.ux, u.uy, 11, d(6,6), 0); exercise(A_WIS, FALSE); ! return TRUE; } /* Adding oil to an empty magic lamp renders it into an oil lamp */ if ((obj->otyp == MAGIC_LAMP) && obj->spe == 0) { --- 1389,1456 ---- goto poof; } } ! ! if (potion->otyp == POT_OIL && ! (obj->oclass == WEAPON_CLASS || is_weptool(obj))) { ! boolean wisx = FALSE; if (potion->lamplit) { /* burning */ ! int omat = objects[obj->otyp].oc_material; ! if (obj->oerodeproof || obj_resists(obj, 5, 95) || ! /* `METAL' should not be confused with is_metallic() */ ! omat == METAL || omat == MITHRIL || omat == BONE) { ! pline("%s seem%s to burn for a moment.", ! Yname2(obj), ! (obj->quan > 1L) ? "" : "s"); } else { ! if (omat == PLASTIC) obj->oeroded = MAX_ERODE; ! pline_The("burning oil %s %s.", obj->oeroded == MAX_ERODE ? "destroys" : "damages", ! yname(obj)); if (obj->oeroded == MAX_ERODE) { obj_extract_self(obj); obfree(obj, (struct obj *)0); obj = (struct obj *) 0; ! } else { ! /* should check for and do something about ! damaging unpaid shop goods here */ obj->oeroded++; + } } ! } else if (potion->cursed || !is_metallic(obj) || ! /* arrows,&c are classed as metallic due to arrowhead ! material, but dipping in oil shouldn't repair them */ ! objects[obj->otyp].oc_wepcat == WEP_AMMO) { ! pline_The("potion spills and covers your %s with oil.", ! makeplural(body_part(FINGER))); ! incr_itimeout(&Glib, d(2,10)); } else if (!obj->oeroded) { ! /* uses up potion, doesn't set obj->greased */ ! pline("%s gleam%s with an oily sheen.", ! Yname2(obj), ! (obj->quan > 1L) ? "" : "s"); } else { ! pline("%s %s less %s.", ! Yname2(obj), ! (obj->quan > 1L) ? "are" : "is", ! is_corrodeable(obj) ? "corroded" : "rusty"); ! obj->oeroded--; ! wisx = TRUE; } + exercise(A_WIS, wisx); makeknown(potion->otyp); useup(potion); ! return 1; } /* Allow filling of MAGIC_LAMPs to prevent identification by player */ if ((obj->otyp == OIL_LAMP || obj->otyp == MAGIC_LAMP) && (potion->otyp == POT_OIL)) { /* Turn off engine before fueling, turn off fuel too :-) */ if (obj->lamplit || potion->lamplit) { useup(potion); explode(u.ux, u.uy, 11, d(6,6), 0); exercise(A_WIS, FALSE); ! return 1; } /* Adding oil to an empty magic lamp renders it into an oil lamp */ if ((obj->otyp == MAGIC_LAMP) && obj->spe == 0) { *************** *** 1416,1424 **** obj->age = 0; } if (obj->age > 1000L) { ! Your("%s is full.", xname(obj)); } else { ! You("fill your %s with oil.", xname(obj)); check_unpaid(potion); /* surcharge for using unpaid item */ obj->age += 2*potion->age; /* burns more efficiently */ if (obj->age > 1500L) obj->age = 1500L; --- 1458,1466 ---- obj->age = 0; } if (obj->age > 1000L) { ! pline("%s is full.", Yname2(obj)); } else { ! You("fill %s with oil.", yname(obj)); check_unpaid(potion); /* surcharge for using unpaid item */ obj->age += 2*potion->age; /* burns more efficiently */ if (obj->age > 1500L) obj->age = 1500L; *************** *** 1427,1433 **** } obj->spe = 1; update_inventory(); ! return TRUE; } if ((obj->otyp == UNICORN_HORN || obj->otyp == AMETHYST) && --- 1469,1475 ---- } obj->spe = 1; update_inventory(); ! return 1; } if ((obj->otyp == UNICORN_HORN || obj->otyp == AMETHYST) && *** Old/src/pray.c Tue Dec 10 16:43:57 1996 --- src/pray.c Tue Aug 13 13:30:56 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)pray.c 3.2 96/05/24 */ /* Copyright (c) Benson I. Margulies, Mike Stephenson, Steve Linhart, 1989. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)pray.c 3.2 96/08/09 */ /* Copyright (c) Benson I. Margulies, Mike Stephenson, Steve Linhart, 1989. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 136,142 **** if(u.utrap && u.utraptype == TT_LAVA) return(TROUBLE_LAVA); if(Sick) return(TROUBLE_SICK); if(u.uhs >= WEAK) return(TROUBLE_STARVING); ! if(u.uhp < 5 || (u.uhp*7 < u.uhpmax)) return(TROUBLE_HIT); if(u.ulycn >= LOW_PM) return(TROUBLE_LYCANTHROPE); if(near_capacity() >= EXT_ENCUMBER && AMAX(A_STR)-ABASE(A_STR) > 3) return(TROUBLE_COLLAPSING); --- 136,143 ---- if(u.utrap && u.utraptype == TT_LAVA) return(TROUBLE_LAVA); if(Sick) return(TROUBLE_SICK); if(u.uhs >= WEAK) return(TROUBLE_STARVING); ! if ((Upolyd && (u.mh <= 5 || u.mh*7 <= u.mhmax)) || ! (u.uhp <= 5 || u.uhp*7 <= u.uhpmax)) return(TROUBLE_HIT); if(u.ulycn >= LOW_PM) return(TROUBLE_LYCANTHROPE); if(near_capacity() >= EXT_ENCUMBER && AMAX(A_STR)-ABASE(A_STR) > 3) return(TROUBLE_COLLAPSING); *************** *** 234,239 **** --- 235,241 ---- break; case TROUBLE_HIT: You_feel("much better."); + if (Upolyd) u.mh = u.mhmax += rnd(5); if (u.uhpmax < u.ulevel * 5 + 11) u.uhp = u.uhpmax += rnd(5); else *************** *** 265,274 **** otmp = ublindf; goto decurse; case TROUBLE_LYCANTHROPE: ! You_feel("purified."); ! if(uasmon == &mons[u.ulycn] && !Polymorph_control) ! rehumanize(); ! u.ulycn = NON_PM; /* now remove the curse */ break; case TROUBLE_PUNISHED: Your("chain disappears."); --- 267,273 ---- otmp = ublindf; goto decurse; case TROUBLE_LYCANTHROPE: ! you_unwere(TRUE); break; case TROUBLE_PUNISHED: Your("chain disappears."); *************** *** 637,646 **** if (!Blind) You("are surrounded by %s glow.", an(hcolor(golden))); u.uhp = u.uhpmax += 5; ABASE(A_STR) = AMAX(A_STR); ! if (u.uhunger < 900) init_uhunger(); ! if (u.uluck < 0) u.uluck = 0; make_blinded(0L,TRUE); flags.botl = 1; break; --- 636,646 ---- if (!Blind) You("are surrounded by %s glow.", an(hcolor(golden))); + if (Upolyd) u.mh = u.mhmax += 5; u.uhp = u.uhpmax += 5; ABASE(A_STR) = AMAX(A_STR); ! if (u.uhunger < 900) init_uhunger(); ! if (u.uluck < 0) u.uluck = 0; make_blinded(0L,TRUE); flags.botl = 1; break; *************** *** 926,934 **** if (In_endgame(&u.uz)) { if (!(otmp = getobj(sacrifice_types, "sacrifice"))) return 0; ! } else if (!(otmp = floorfood("sacrifice", 1))) return 0; ! /* Was based on nutritional value and aging behavior (< 50 moves). Sacrificing a food ration got you max luck instantly, making the --- 926,934 ---- if (In_endgame(&u.uz)) { if (!(otmp = getobj(sacrifice_types, "sacrifice"))) return 0; ! } else { if (!(otmp = floorfood("sacrifice", 1))) return 0; ! } /* Was based on nutritional value and aging behavior (< 50 moves). Sacrificing a food ration got you max luck instantly, making the *************** *** 945,950 **** --- 945,953 ---- if (otmp->otyp == CORPSE) { register struct permonst *ptr = &mons[otmp->corpsenm]; extern int monstr[]; + + /* you're handling this corpse, even if it was killed upon the altar */ + feel_cockatrice(otmp, TRUE); if (otmp->corpsenm == PM_ACID_BLOB || (monstermoves <= peek_at_iced_corpse_age(otmp) + 50)) *** Old/src/priest.c Tue Dec 10 16:44:04 1996 --- src/priest.c Sat Sep 14 14:43:32 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)priest.c 3.2 96/05/03 */ /* Copyright (c) Izchak Miller, Steve Linhart, 1989. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)priest.c 3.2 96/08/04 */ /* Copyright (c) Izchak Miller, Steve Linhart, 1989. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 250,260 **** * - minions do not have ispriest but have isminion and emin */ char * ! priestname(mon) register struct monst *mon; { - static NEARDATA char pname[PL_NSIZ]; - Strcpy(pname, "the "); if (mon->minvis) Strcat(pname, "invisible "); if (mon->ispriest || mon->data == &mons[PM_ALIGNED_PRIEST] || --- 250,259 ---- * - minions do not have ispriest but have isminion and emin */ char * ! priestname(mon, pname) register struct monst *mon; + char *pname; /* caller-supplied output buffer */ { Strcpy(pname, "the "); if (mon->minvis) Strcat(pname, "invisible "); if (mon->ispriest || mon->data == &mons[PM_ALIGNED_PRIEST] || *** Old/src/quest.c Tue Dec 10 16:44:07 1996 --- src/quest.c Wed Aug 14 21:04:45 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)quest.c 3.2 96/03/15 */ /* Copyright 1991, M. Stephenson */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)quest.c 3.2 96/08/13 */ /* Copyright 1991, M. Stephenson */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 172,177 **** --- 172,178 ---- { branch *br; d_level *dest; + struct trap *t; int portal_flag; br = dungeon_branch("The Quest"); *************** *** 179,186 **** portal_flag = u.uevent.qexpelled ? 0 : /* returned via artifact? */ !seal ? 1 : -1; schedule_goto(dest, FALSE, FALSE, portal_flag, (char *)0, (char *)0); ! if (seal) /* remove the portal to the quest - sealing it off */ u.uevent.qexpelled = 1; } static void --- 180,196 ---- portal_flag = u.uevent.qexpelled ? 0 : /* returned via artifact? */ !seal ? 1 : -1; schedule_goto(dest, FALSE, FALSE, portal_flag, (char *)0, (char *)0); ! if (seal) { /* remove the portal to the quest - sealing it off */ u.uevent.qexpelled = 1; + /* Delete the near portal now; the far (main dungeon side) + portal will be deleted as part of arrival on that level. + If monster movement is in progress, any who haven't moved + yet will now miss out on a chance to wander through it... */ + for (t = ftrap; t; t = t->ntrap) + if (t->ttyp == MAGIC_PORTAL) break; + if (t) deltrap(t); /* (display might be briefly out of sync) */ + else impossible("quest portal already gone?"); + } } static void *** Old/src/questpgr.c Tue Dec 10 16:44:09 1996 --- src/questpgr.c Sat Sep 7 00:20:20 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)questpgr.c 3.2 95/08/04 */ /* Copyright 1991, M. Stephenson */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)questpgr.c 3.2 96/08/19 */ /* Copyright 1991, M. Stephenson */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 29,34 **** --- 29,36 ---- static char in_line[80], cvt_buf[64], out_line[128]; static struct qtlists qt_list; static dlb *msg_file; + /* used by ldrname() and neminame(), then copied into cvt_buf */ + static char nambuf[sizeof cvt_buf]; #ifdef DEBUG static void NDECL(dump_qtlist); *************** *** 287,294 **** ldrname() /* return your class leader's name */ { int i = qt_matrix[class_index()].ldrnum; ! /* return(mons[qt_matrix[class_index()].ldrnum].mname); */ ! return(mons[i].mname); } static const char * --- 289,299 ---- ldrname() /* return your class leader's name */ { int i = qt_matrix[class_index()].ldrnum; ! ! Sprintf(nambuf, "%s%s", ! type_is_pname(&mons[i]) ? "" : "the ", ! mons[i].mname); ! return nambuf; } static const char * *************** *** 307,319 **** static const char * neminame() /* return your class nemesis' name */ { ! return(mons[qt_matrix[class_index()].neminum].mname); } static const char * guardname() /* return your class leader's guard monster name */ { ! return(mons[qt_matrix[class_index()].guardnum].mname); } static const char * --- 312,331 ---- static const char * neminame() /* return your class nemesis' name */ { ! int i = qt_matrix[class_index()].neminum; ! ! Sprintf(nambuf, "%s%s", ! type_is_pname(&mons[i]) ? "" : "the ", ! mons[i].mname); ! return nambuf; } static const char * guardname() /* return your class leader's guard monster name */ { ! int i = qt_matrix[class_index()].guardnum; ! ! return(mons[i].mname); } static const char * *************** *** 326,331 **** --- 338,345 ---- leaderless() /* return true iff leader is dead */ { int i = qt_matrix[class_index()].ldrnum; + /* BUG: This doesn't take the possibility of resurrection + via wand or spell of undead turning into account. */ return (boolean)(mvitals[i].died > 0); } *************** *** 419,444 **** case '%': if (*(c+1)) { convert_arg(*(++c)); ! switch (*(c+1)) { case 'A': Strcat(cc, An(cvt_buf)); cc += strlen(cc); - c++; continue; /* for */ case 'a': Strcat(cc, an(cvt_buf)); cc += strlen(cc); - c++; continue; /* for */ case 'C': cvt_buf[0] = highc(cvt_buf[0]); - c++; break; case 'P': cvt_buf[0] = highc(cvt_buf[0]); case 'p': Strcpy(cvt_buf, makeplural(cvt_buf)); ! c++; break; ! default: break; } Strcat(cc, cvt_buf); cc += strlen(cvt_buf); --- 433,472 ---- case '%': if (*(c+1)) { convert_arg(*(++c)); ! switch (*(++c)) { + /* insert "a"/"an" prefix */ case 'A': Strcat(cc, An(cvt_buf)); cc += strlen(cc); continue; /* for */ case 'a': Strcat(cc, an(cvt_buf)); cc += strlen(cc); continue; /* for */ + /* capitalize */ case 'C': cvt_buf[0] = highc(cvt_buf[0]); break; + /* pluralize */ case 'P': cvt_buf[0] = highc(cvt_buf[0]); case 'p': Strcpy(cvt_buf, makeplural(cvt_buf)); ! break; ! /* append possessive suffix */ ! case 'S': cvt_buf[0] = highc(cvt_buf[0]); ! case 's': Strcpy(cvt_buf, s_suffix(cvt_buf)); ! break; ! ! /* strip any "the" prefix */ ! case 't': if (!strncmpi(cvt_buf, "the ", 4)) { ! Strcat(cc, &cvt_buf[4]); ! cc += strlen(cc); ! continue; /* for */ ! } ! break; ! ! default: --c; /* undo switch increment */ ! break; } Strcat(cc, cvt_buf); cc += strlen(cvt_buf); *************** *** 450,455 **** --- 478,485 ---- break; } } + if (cc >= out_line + sizeof out_line) + panic("convert_line: overflow"); *cc = 0; return; } *** Old/src/read.c Tue Dec 10 16:44:12 1996 --- src/read.c Tue Aug 13 13:01:08 1996 *************** *** 1319,1325 **** u.uhp = -1; killer_format = KILLED_BY_AN; ! killer = "genocidal confusion"; /* Polymorphed characters will die as soon as they're rehumanized. */ if (u.umonnum >= LOW_PM) You_feel("dead inside."); --- 1319,1328 ---- u.uhp = -1; killer_format = KILLED_BY_AN; ! if (how & PLAYER) ! killer = "genocidal confusion"; ! else /* selected player deliberately, not confused */ ! killer = "scroll of genocide"; /* Polymorphed characters will die as soon as they're rehumanized. */ if (u.umonnum >= LOW_PM) You_feel("dead inside."); *** Old/src/restore.c Tue Dec 10 16:44:19 1996 --- src/restore.c Sat Oct 26 14:53:01 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)restore.c 3.2 96/05/26 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)restore.c 3.2 96/10/21 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 347,353 **** { struct obj *otmp; int tmp; /* not a register ! */ - struct flag oldflags; restore_timers(fd, RANGE_GLOBAL, FALSE, 0L); restore_light_sources(fd); --- 347,352 ---- *************** *** 365,415 **** return(FALSE); } - oldflags = flags; mread(fd, (genericptr_t) &flags, sizeof(struct flag)); - /* Some config file and command line OPTIONS take precedence over - * those in save file. - */ - #ifdef TERMLIB - flags.DECgraphics = oldflags.DECgraphics; - #endif - #ifdef ASCIIGRAPH - flags.IBMgraphics = oldflags.IBMgraphics; - #endif - #ifdef MICRO - flags.rawio = oldflags.rawio; - flags.BIOS = oldflags.BIOS; - #endif - #ifdef TEXTCOLOR - flags.use_color = oldflags.use_color; - flags.hilite_pet = oldflags.hilite_pet; - #endif - #ifdef WIZARD - flags.sanity_check = oldflags.sanity_check; - #endif - #ifdef MAC_GRAPHICS_ENV - flags.MACgraphics = oldflags.MACgraphics; - flags.large_font = oldflags.large_font; - #endif - #ifdef MSDOS - flags.hasvga = oldflags.hasvga; - flags.usevga = oldflags.usevga; - flags.hasvesa = oldflags.hasvesa; - flags.usevesa = oldflags.usevesa; - flags.has8514 = oldflags.has8514; - flags.use8514 = oldflags.use8514; - flags.grmode = oldflags.grmode; - flags.preload_tiles = oldflags.preload_tiles; - #endif - /* these come from the current environment; ignore saved values */ - flags.window_inited = oldflags.window_inited; - flags.msg_history = oldflags.msg_history; - flags.num_pad = oldflags.num_pad; - flags.echo = oldflags.echo; - flags.cbreak = oldflags.cbreak; - #ifdef NEWS - flags.news = oldflags.news; - #endif #ifdef AMII_GRAPHICS amii_setpens(amii_numcolors); /* use colors from save file */ #endif --- 364,370 ---- *************** *** 436,441 **** --- 391,405 ---- for(otmp = invent; otmp; otmp = otmp->nobj) if(otmp->owornmask) setworn(otmp, otmp->owornmask); + /* reset weapon so that player will get a reminder about "bashing" + during next fight when bare-handed or wielding an unconventional + item; for pick-axe, we aren't able to distinguish between having + applied or wielded it, so be conservative and assume the former */ + otmp = uwep; /* `uwep' usually init'd by setworn() in loop above */ + uwep = 0; /* clear it and have setuwep() reinit */ + setuwep(otmp); /* (don't need any null check here) */ + if (!uwep || uwep->otyp == PICK_AXE) + unweapon = TRUE; restore_dungeon(fd); restlevchn(fd); *** Old/src/rip.c Tue Dec 10 16:44:22 1996 --- src/rip.c Sun Oct 27 19:33:03 1996 *************** *** 8,14 **** extern const char *killed_by_prefix[]; ! #if defined(TTY_GRAPHICS) || defined(X11_GRAPHICS) || defined(mac) || defined(__beos__) static const char *rip_txt[] = { " ---------- ----------", --- 8,14 ---- extern const char *killed_by_prefix[]; ! #if defined(TTY_GRAPHICS) || defined(X11_GRAPHICS) || defined(mac) || defined(__BEOS__) static const char *rip_txt[] = { " ---------- ----------", *** Old/src/save.c Tue Dec 10 16:44:30 1996 --- src/save.c Mon Jun 17 18:34:47 1996 *************** *** 125,131 **** if (!saveDiskPrompt(0)) return 0; #endif ! HUP if (flags.window_inited) { uncompress(SAVEF); fd = open_savefile(); if (fd > 0) { --- 125,131 ---- if (!saveDiskPrompt(0)) return 0; #endif ! HUP if (iflags.window_inited) { uncompress(SAVEF); fd = open_savefile(); if (fd > 0) { *************** *** 152,158 **** change_luck(-1); /* and unido!ab */ if(flags.friday13) change_luck(1); ! if(flags.window_inited) clear_nhwindow(WIN_MESSAGE); #ifdef MICRO --- 152,158 ---- change_luck(-1); /* and unido!ab */ if(flags.friday13) change_luck(1); ! if(iflags.window_inited) clear_nhwindow(WIN_MESSAGE); #ifdef MICRO *** Old/src/shk.c Tue Dec 10 16:44:33 1996 --- src/shk.c Tue Aug 13 13:03:23 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)shk.c 3.2 96/03/09 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)shk.c 3.2 96/07/20 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 620,628 **** register struct bill_x *bpm; register struct monst *shkp; ! if(obj->oclass == FOOD_CLASS) food_disappears(obj); ! ! if (obj->cobj) delete_contents(obj); shkp = shop_keeper(*u.ushops); --- 620,628 ---- register struct bill_x *bpm; register struct monst *shkp; ! if (obj->otyp == LEASH && obj->leashmon) o_unleash(obj); ! if (obj->oclass == FOOD_CLASS) food_disappears(obj); ! if (Has_contents(obj)) delete_contents(obj); shkp = shop_keeper(*u.ushops); *************** *** 830,846 **** register xchar ox,oy; { xchar sx, sy; ! if(index(in_rooms(ox, oy, SHOPBASE), ESHK(shkp)->shoproom) && ! !ANGRY(shkp)) { ! ESHK(shkp)->robbed += (addupbill(shkp) + ! ESHK(shkp)->debit + ESHK(shkp)->loan); ! ESHK(shkp)->robbed -= ESHK(shkp)->credit; ! if(ESHK(shkp)->robbed < 0L) ! ESHK(shkp)->robbed = 0L; ! ESHK(shkp)->credit = 0L; ! setpaid(shkp); } /* If you just used a wand of teleportation to send the shk away, you might not be able to see her any more. Monnam would yield "it", which makes this message look pretty silly, so temporarily restore --- 830,846 ---- register xchar ox,oy; { xchar sx, sy; + struct eshk *eshkp = ESHK(shkp); ! /* all pending shop transactions are now "past due" */ ! if (eshkp->billct || eshkp->debit || eshkp->loan || eshkp->credit) { ! eshkp->robbed += (addupbill(shkp) + eshkp->debit + eshkp->loan); ! eshkp->robbed -= eshkp->credit; ! if (eshkp->robbed < 0L) eshkp->robbed = 0L; ! /* billct, debit, loan, and credit will be cleared by setpaid */ ! setpaid(shkp); } + /* If you just used a wand of teleportation to send the shk away, you might not be able to see her any more. Monnam would yield "it", which makes this message look pretty silly, so temporarily restore *** Old/src/shknam.c Tue Dec 10 16:44:40 1996 --- src/shknam.c Thu Jun 13 17:03:10 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)shknam.c 3.2 96/05/23 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)shknam.c 3.2 96/05/31 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 436,443 **** newsym(sx,sy); } if(levl[sx][sy].typ == SDOOR) { ! levl[sx][sy].typ = DOOR; ! levl[sx][sy].doormask = exposed_sdoor_mask(&levl[sx][sy]); newsym(sx,sy); } if(levl[sx][sy].doormask & D_TRAPPED) --- 436,442 ---- newsym(sx,sy); } if(levl[sx][sy].typ == SDOOR) { ! cvt_sdoor_to_door(&levl[sx][sy]); /* .typ = DOOR */ newsym(sx,sy); } if(levl[sx][sy].doormask & D_TRAPPED) *** Old/src/sit.c Tue Dec 10 16:44:43 1996 --- src/sit.c Tue Aug 13 12:57:41 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)sit.c 3.2 95/01/31 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)sit.c 3.2 96/07/15 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 25,31 **** register int typ = levl[u.ux][u.uy].typ; if(!can_reach_floor()) { ! You("are sitting on air."); return 0; } --- 25,34 ---- register int typ = levl[u.ux][u.uy].typ; if(!can_reach_floor()) { ! if (Levitation) ! You("tumble in place."); ! else ! You("are sitting on air."); return 0; } *************** *** 140,145 **** --- 143,152 ---- break; case 4: You_feel("much, much better!"); + if (Upolyd) { + if (u.mh >= (u.mhmax - 5)) u.mhmax += 4; + u.mh = u.mhmax; + } if(u.uhp >= (u.uhpmax - 5)) u.uhpmax += 4; u.uhp = u.uhpmax; make_blinded(0L,TRUE); *** Old/src/sp_lev.c Tue Dec 10 16:44:48 1996 --- src/sp_lev.c Mon Nov 25 17:43:01 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)sp_lev.c 3.2 96/05/08 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)sp_lev.c 3.2 96/10/27 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 923,929 **** } if (o->spe != -127) /* That means NOT RANDOM! */ ! otmp->spe = o->spe; switch (o->curse_state) { case 1: bless(otmp); break; /* BLESSED */ --- 923,929 ---- } if (o->spe != -127) /* That means NOT RANDOM! */ ! otmp->spe = (schar)o->spe; switch (o->curse_state) { case 1: bless(otmp); break; /* BLESSED */ *************** *** 2567,2579 **** dlb *fd; boolean result = FALSE; char c; ! unsigned long vers_info[4]; fd = dlb_fopen(name, RDBMODE); if (!fd) return FALSE; ! Fread((genericptr_t) vers_info, sizeof vers_info, 1, fd); ! if (!check_version(vers_info, name, TRUE)) goto give_up; Fread((genericptr_t) &c, sizeof c, 1, fd); /* c Header */ --- 2567,2579 ---- dlb *fd; boolean result = FALSE; char c; ! struct version_info vers_info; fd = dlb_fopen(name, RDBMODE); if (!fd) return FALSE; ! Fread((genericptr_t) &vers_info, sizeof vers_info, 1, fd); ! if (!check_version(&vers_info, name, TRUE)) goto give_up; Fread((genericptr_t) &c, sizeof c, 1, fd); /* c Header */ *** Old/src/spell.c Tue Dec 10 16:44:55 1996 --- src/spell.c Tue Aug 13 13:27:25 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)spell.c 3.2 96/05/19 */ /* Copyright (c) M. Stephenson 1988 */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)spell.c 3.2 96/08/04 */ /* Copyright (c) M. Stephenson 1988 */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 587,605 **** } } - /* u.uen _will_ reduce once here reached */ - - flags.botl = 1; - chance = percent_success(spell); - if (confused || (rnd(100) > chance)) { You("fail to cast the spell correctly."); u.uen -= energy / 2; return(1); } u.uen -= energy; exercise(A_WIS, TRUE); /* pseudo is a temporary "false" object containing the spell stats. */ pseudo = mksobj(spellid(spell), FALSE, FALSE); --- 587,602 ---- } } chance = percent_success(spell); if (confused || (rnd(100) > chance)) { You("fail to cast the spell correctly."); u.uen -= energy / 2; + flags.botl = 1; return(1); } u.uen -= energy; + flags.botl = 1; exercise(A_WIS, TRUE); /* pseudo is a temporary "false" object containing the spell stats. */ pseudo = mksobj(spellid(spell), FALSE, FALSE); *** Old/src/timeout.c Tue Dec 10 16:45:05 1996 --- src/timeout.c Tue Aug 13 13:04:16 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)timeout.c 3.2 96/04/28 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)timeout.c 3.2 96/06/02 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 528,547 **** struct obj *obj; const char *tailer; { - char buf[BUFSZ]; - switch (obj->where) { case OBJ_INVENT: case OBJ_MINVENT: ! pline("%s %s flickers%s.", ! Shk_Your(buf, obj), ! xname(obj), ! tailer); break; case OBJ_FLOOR: ! You("see %s flicker%s.", ! an(xname(obj)), ! tailer); break; } } --- 528,540 ---- struct obj *obj; const char *tailer; { switch (obj->where) { case OBJ_INVENT: case OBJ_MINVENT: ! pline("%s flickers%s.", Yname2(obj), tailer); break; case OBJ_FLOOR: ! You("see %s flicker%s.", an(xname(obj)), tailer); break; } } *** Old/src/topten.c Tue Dec 10 16:45:09 1996 --- src/topten.c Mon Nov 25 17:41:39 1996 *************** *** 48,54 **** int deathdnum, deathlev; int maxlvl, hp, maxhp, deaths; int ver_major, ver_minor, patchlevel; ! char deathdate[7], birthdate[7]; int uid; char plchar; char sex; --- 48,54 ---- int deathdnum, deathlev; int maxlvl, hp, maxhp, deaths; int ver_major, ver_minor, patchlevel; ! char deathdate[8], birthdate[8]; /* see readentry about size */ int uid; char plchar; char sex; *************** *** 125,140 **** FILE *rfile; struct toptenentry *tt; { #ifdef UPDATE_RECORD_IN_PLACE /* note: fscanf() below must read the record's terminating newline */ final_fpos = tt->fpos = ftell(rfile); #endif #define TTFIELDS 17 ! #ifdef NO_SCAN_BRACK ! if(fscanf(rfile,"%d %d %d %ld %d %d %d %d %d %d %6s %6s %d%*c%c%c %s %s%*c", ! #else ! if(fscanf(rfile, "%d.%d.%d %ld %d %d %d %d %d %d %6s %6s %d %c%c %[^,],%[^\n]%*c", ! #endif &tt->ver_major, &tt->ver_minor, &tt->patchlevel, &tt->points, &tt->deathdnum, &tt->deathlev, &tt->maxlvl, &tt->hp, &tt->maxhp, &tt->deaths, --- 125,166 ---- FILE *rfile; struct toptenentry *tt; { + #ifdef NO_SCAN_BRACK + static char *fmt = "%d %d %d %ld %d %d %d %d %d %d %6s %6s %d%*c%c%c %s %s%*c"; + #else + static char *fmt = "%d.%d.%d %ld %d %d %d %d %d %d %6s %6s %d %c%c %[^,],%[^\n]%*c"; + #endif + + #ifdef __BEOS__ + /* + Test for a bug in Be's *scanf functions. This exists in at least + versions DR8.2 and earlier. We should eventually be able to + remove this special code.. + + The bug is that a read of a sized string field, e.g. %6s, leaves + the last character of the string to be read again. The work-round + is to increase the read size by 1. This means that deathdate and + birthdate need a size of 8 (7 chars + 1 NULL) instead of a size + 7 (6 chars + 1 NULL). + */ + static boolean tested_scanf_bug = FALSE; + + if (!tested_scanf_bug) { + char s1[16], s2[16]; + + tested_scanf_bug = TRUE; + (void) sscanf("123456 789012", "%6s %6s", s1, s2); + if (strcmp(s2, "789012") != 0) + fmt = "%d.%d.%d %ld %d %d %d %d %d %d %7s %7s %d %c%c %[^,],%[^\n]%*c"; + } + #endif /* __BEOS__ */ + #ifdef UPDATE_RECORD_IN_PLACE /* note: fscanf() below must read the record's terminating newline */ final_fpos = tt->fpos = ftell(rfile); #endif #define TTFIELDS 17 ! if(fscanf(rfile, fmt, &tt->ver_major, &tt->ver_minor, &tt->patchlevel, &tt->points, &tt->deathdnum, &tt->deathlev, &tt->maxlvl, &tt->hp, &tt->maxhp, &tt->deaths, *** Old/src/trap.c Tue Dec 10 16:45:15 1996 --- src/trap.c Mon Oct 21 22:41:38 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)trap.c 3.2 96/05/18 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)trap.c 3.2 96/10/21 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 299,322 **** } /* you've either stepped onto a statue trap's location ! or you've triggered a statue trap by searching next to it */ ! void ! activate_statue_trap(trap, x, y) struct trap *trap; xchar x, y; { ! struct monst *mtmp; ! struct obj *otmp = sobj_at(STATUE, x, y); ! deltrap(trap); ! if (otmp && (mtmp = makemon(&mons[otmp->corpsenm], ! x, y, NO_MINVENT)) != 0) { ! struct obj *obj; ! ! while(otmp->cobj) { ! obj = otmp->cobj; ! obj_extract_self(obj); ! add_to_minv(mtmp, obj); } m_dowear(mtmp, TRUE); delobj(otmp); --- 299,335 ---- } /* you've either stepped onto a statue trap's location ! or you've triggered a statue trap by searching next to it ! or by trying to break it with a wand or pick-axe */ ! struct monst * ! activate_statue_trap(trap, x, y, shatter) struct trap *trap; xchar x, y; + boolean shatter; { ! struct monst *mtmp = 0; ! struct permonst *mptr = 0; ! struct obj *item, *otmp = sobj_at(STATUE, x, y); ! ! /* Guard against someone wishing for a statue of a unique monster ! (which is allowed in normal play) and then tossing it onto the ! [detected or guessed] location of a statue trap. Normally the ! uppermost statue is the one which would be activated. */ ! while (otmp) { ! mptr = &mons[otmp->corpsenm]; ! if (!(mptr->geno & G_UNIQ)) break; /* not unique => use it */ ! while ((otmp = otmp->nexthere) != 0) ! if (otmp->otyp == STATUE) break; ! } deltrap(trap); ! if (otmp && (mtmp = makemon(mptr, x, y, NO_MINVENT)) != 0) { ! /* if statue has been named, give same name to the monster */ ! if (otmp->onamelth) ! mtmp = christen_monst(mtmp, ONAME(otmp)); ! /* transfer any statue contents to monster's inventory */ ! while ((item = otmp->cobj) != 0) { ! obj_extract_self(item); ! add_to_minv(mtmp, item); } m_dowear(mtmp, TRUE); delobj(otmp); *************** *** 325,330 **** --- 338,345 ---- else mtmp->mundetected = FALSE; if (x == u.ux && y == u.uy) pline_The("statue comes to life!"); + else if (shatter) + pline("Instead of shattering, the statue suddenly comes alive!"); else You("find %s posing as a statue.", a_monnam(mtmp)); /* avoid hiding under nothing */ *************** *** 334,339 **** --- 349,355 ---- } if (Blind) feel_location(x, y); else newsym(x, y); + return mtmp; } void *************** *** 654,660 **** break; case STATUE_TRAP: ! activate_statue_trap(trap, u.ux, u.uy); break; case MAGIC_TRAP: /* A magic trap. */ --- 670,676 ---- break; case STATUE_TRAP: ! (void) activate_statue_trap(trap, u.ux, u.uy, FALSE); break; case MAGIC_TRAP: /* A magic trap. */ *************** *** 1002,1027 **** struct permonst *mptr = mtmp->data; struct obj *otmp; ! if(!trap) { ! mtmp->mtrapped = 0; /* perhaps teleported? */ ! } else if (mtmp->mtrapped) { /* was in trap */ ! if(!rn2(40)) { ! if (sobj_at(BOULDER, mtmp->mx, mtmp->my) && ! ((trap->ttyp == PIT) || ! (trap->ttyp == SPIKED_PIT))) { ! if (!rn2(2)) { ! mtmp->mtrapped = 0; ! fill_pit(mtmp->mx, mtmp->my); ! } ! } else ! mtmp->mtrapped = 0; ! } else if (trap->ttyp == BEAR_TRAP && metallivorous(mptr)) { ! if (canseemon(mtmp)) ! pline("%s eats a bear trap!", Monnam(mtmp)); ! deltrap(trap); ! mtmp->meating = 5; mtmp->mtrapped = 0; } } else { register int tt = trap->ttyp; boolean in_sight, tear_web, see_it; --- 1018,1045 ---- struct permonst *mptr = mtmp->data; struct obj *otmp; ! if (!trap) { ! mtmp->mtrapped = 0; /* perhaps teleported? */ ! } else if (mtmp->mtrapped) { /* is currently in the trap */ ! if (!rn2(40)) { ! if (sobj_at(BOULDER, mtmp->mx, mtmp->my) && ! (trap->ttyp == PIT || trap->ttyp == SPIKED_PIT)) { ! if (!rn2(2)) { mtmp->mtrapped = 0; + if (canseemon(mtmp)) + pline("%s pulls free...", Monnam(mtmp)); + fill_pit(mtmp->mx, mtmp->my); + } + } else { + mtmp->mtrapped = 0; } + } else if (trap->ttyp == BEAR_TRAP && metallivorous(mptr)) { + if (canseemon(mtmp)) + pline("%s eats a bear trap!", Monnam(mtmp)); + deltrap(trap); + mtmp->meating = 5; + mtmp->mtrapped = 0; + } } else { register int tt = trap->ttyp; boolean in_sight, tear_web, see_it; *************** *** 1343,1365 **** break; case ROLLING_BOULDER_TRAP: ! newsym(mtmp->mx,mtmp->my); ! if (in_sight) ! pline("Click! %s triggers %s.", Monnam(mtmp), ! trap->tseen ? ! "a rolling boulder trap" : ! something); ! if (launch_obj(BOULDER, trap->launch.x, trap->launch.y, ! trap->launch2.x, trap->launch2.y, ROLL)) { ! if (in_sight) trap->tseen = TRUE; ! else You_hear(Hallucination ? "someone bowling." : "rumbling in the distance."); ! if (mtmp->mhp <= 0) trapkilled = TRUE; ! } else { ! deltrap(trap); ! newsym(mtmp->mx,mtmp->my); ! } break; default: --- 1361,1385 ---- break; case ROLLING_BOULDER_TRAP: ! if (!is_flyer(mptr)) { ! newsym(mtmp->mx,mtmp->my); ! if (in_sight) ! pline("Click! %s triggers %s.", Monnam(mtmp), ! trap->tseen ? ! "a rolling boulder trap" : ! something); ! if (launch_obj(BOULDER, trap->launch.x, trap->launch.y, ! trap->launch2.x, trap->launch2.y, ROLL)) { ! if (in_sight) trap->tseen = TRUE; ! else You_hear(Hallucination ? "someone bowling." : "rumbling in the distance."); ! if (mtmp->mhp <= 0) trapkilled = TRUE; ! } else { ! deltrap(trap); ! newsym(mtmp->mx,mtmp->my); ! } ! } break; default: *************** *** 2270,2288 **** } } You("reach out your %s and grab %s.", ! makeplural(body_part(ARM)), mon_nam(mtmp)); /* is the monster too heavy? */ wt = inv_weight() + mtmp->data->cwt; if (!try_lift(mtmp, ttmp, wt, FALSE)) return 1; /* is the monster with inventory too heavy? */ ! for (otmp = mtmp->minvent; otmp; otmp=otmp->nobj) wt += otmp->owt; if (!try_lift(mtmp, ttmp, wt, TRUE)) return 1; You("pull %s out of the pit.", mon_nam(mtmp)); mtmp->mtrapped = 0; reward_untrap(ttmp, mtmp); return 1; } --- 2290,2309 ---- } } You("reach out your %s and grab %s.", ! makeplural(body_part(ARM)), mon_nam(mtmp)); /* is the monster too heavy? */ wt = inv_weight() + mtmp->data->cwt; if (!try_lift(mtmp, ttmp, wt, FALSE)) return 1; /* is the monster with inventory too heavy? */ ! for (otmp = mtmp->minvent; otmp; otmp = otmp->nobj) wt += otmp->owt; if (!try_lift(mtmp, ttmp, wt, TRUE)) return 1; You("pull %s out of the pit.", mon_nam(mtmp)); mtmp->mtrapped = 0; + fill_pit(mtmp->mx, mtmp->my); reward_untrap(ttmp, mtmp); return 1; } *************** *** 2459,2464 **** --- 2480,2487 ---- if (get_obj_location(obj, &cc.x, &cc.y, 0)) /* might be carried */ obj->ox = cc.x, obj->oy = cc.y; + otmp->otrapped = 0; /* trap is one-shot; clear flag first in case + chest kills you and ends up in bones file */ You(disarm ? "set it off!" : "trigger a trap!"); display_nhwindow(WIN_MESSAGE, FALSE); if (Luck > -13 && rn2(13+Luck) > 7) { /* saved by luck */ *************** *** 2601,2607 **** } bot(); /* to get immediate botl re-display */ } - otmp->otrapped = 0; /* these traps are one-shot things */ return FALSE; } --- 2624,2629 ---- *** Old/src/u_init.c Tue Dec 10 16:45:22 1996 --- src/u_init.c Mon Jun 17 18:36:31 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)u_init.c 3.2 96/05/13 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)u_init.c 3.2 96/06/16 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 211,217 **** { P_SLING, P_SKILLED }, { P_DART, P_BASIC }, { P_BOOMERANG, P_EXPERT }, { P_WHIP, P_EXPERT }, { P_UNICORN_HORN, P_SKILLED }, { P_TWO_WEAPON_COMBAT, P_BASIC }, ! { P_BARE_HANDED_COMBAT, 4 }, { P_NO_TYPE, 0 } }; --- 211,217 ---- { P_SLING, P_SKILLED }, { P_DART, P_BASIC }, { P_BOOMERANG, P_EXPERT }, { P_WHIP, P_EXPERT }, { P_UNICORN_HORN, P_SKILLED }, { P_TWO_WEAPON_COMBAT, P_BASIC }, ! { P_BARE_HANDED_COMBAT, P_EXPERT }, { P_NO_TYPE, 0 } }; *************** *** 225,231 **** { P_FLAIL, P_BASIC }, { P_HAMMER, P_EXPERT }, { P_QUARTERSTAFF, P_BASIC }, { P_SPEAR, P_SKILLED }, { P_TRIDENT, P_SKILLED }, { P_BOW, P_BASIC }, ! { P_TWO_WEAPON_COMBAT, P_BASIC }, { P_BARE_HANDED_COMBAT, 6 }, { P_NO_TYPE, 0 } }; --- 225,232 ---- { P_FLAIL, P_BASIC }, { P_HAMMER, P_EXPERT }, { P_QUARTERSTAFF, P_BASIC }, { P_SPEAR, P_SKILLED }, { P_TRIDENT, P_SKILLED }, { P_BOW, P_BASIC }, ! { P_TWO_WEAPON_COMBAT, P_BASIC }, ! { P_BARE_HANDED_COMBAT, P_GRAND_MASTER }, { P_NO_TYPE, 0 } }; *************** *** 239,245 **** { P_JAVELIN, P_SKILLED }, { P_TRIDENT, P_SKILLED }, { P_BOW, P_EXPERT }, { P_SLING, P_SKILLED }, { P_BOOMERANG, P_EXPERT }, { P_UNICORN_HORN, P_BASIC }, ! { P_BARE_HANDED_COMBAT, 6 }, { P_NO_TYPE, 0 } }; --- 240,246 ---- { P_JAVELIN, P_SKILLED }, { P_TRIDENT, P_SKILLED }, { P_BOW, P_EXPERT }, { P_SLING, P_SKILLED }, { P_BOOMERANG, P_EXPERT }, { P_UNICORN_HORN, P_BASIC }, ! { P_BARE_HANDED_COMBAT, P_GRAND_MASTER }, { P_NO_TYPE, 0 } }; *************** *** 251,257 **** { P_SPEAR, P_EXPERT }, { P_JAVELIN, P_BASIC }, { P_BOW, P_EXPERT }, { P_SLING, P_BASIC }, { P_CROSSBOW, P_BASIC }, { P_SHURIKEN, P_BASIC }, ! { P_TWO_WEAPON_COMBAT, P_EXPERT }, { P_MARTIAL_ARTS, 3 }, { P_NO_TYPE, 0 } }; --- 252,259 ---- { P_SPEAR, P_EXPERT }, { P_JAVELIN, P_BASIC }, { P_BOW, P_EXPERT }, { P_SLING, P_BASIC }, { P_CROSSBOW, P_BASIC }, { P_SHURIKEN, P_BASIC }, ! { P_TWO_WEAPON_COMBAT, P_EXPERT }, ! { P_BARE_HANDED_COMBAT, P_SKILLED }, { P_NO_TYPE, 0 } }; *************** *** 264,270 **** { P_JAVELIN, P_BASIC }, { P_TRIDENT, P_BASIC }, { P_SLING, P_SKILLED }, { P_DART, P_EXPERT }, { P_SHURIKEN, P_SKILLED }, { P_UNICORN_HORN, P_EXPERT }, ! { P_BARE_HANDED_COMBAT, 2 }, { P_NO_TYPE, 0 } }; --- 266,272 ---- { P_JAVELIN, P_BASIC }, { P_TRIDENT, P_BASIC }, { P_SLING, P_SKILLED }, { P_DART, P_EXPERT }, { P_SHURIKEN, P_SKILLED }, { P_UNICORN_HORN, P_EXPERT }, ! { P_BARE_HANDED_COMBAT, P_BASIC }, { P_NO_TYPE, 0 } }; *************** *** 280,286 **** { P_SPEAR, P_SKILLED }, { P_JAVELIN, P_SKILLED }, { P_TRIDENT, P_BASIC }, { P_LANCE, P_EXPERT }, { P_BOW, P_BASIC }, { P_CROSSBOW, P_SKILLED }, ! { P_TWO_WEAPON_COMBAT, P_SKILLED }, { P_BARE_HANDED_COMBAT, 4 }, { P_NO_TYPE, 0 } }; --- 282,289 ---- { P_SPEAR, P_SKILLED }, { P_JAVELIN, P_SKILLED }, { P_TRIDENT, P_BASIC }, { P_LANCE, P_EXPERT }, { P_BOW, P_BASIC }, { P_CROSSBOW, P_SKILLED }, ! { P_TWO_WEAPON_COMBAT, P_SKILLED }, ! { P_BARE_HANDED_COMBAT, P_EXPERT }, { P_NO_TYPE, 0 } }; *************** *** 294,300 **** { P_SLING, P_BASIC }, { P_CROSSBOW, P_BASIC }, { P_DART, P_BASIC }, { P_SHURIKEN, P_BASIC }, { P_BOOMERANG, P_BASIC }, { P_UNICORN_HORN, P_SKILLED }, ! { P_BARE_HANDED_COMBAT, 2 }, { P_NO_TYPE, 0 } }; --- 297,303 ---- { P_SLING, P_BASIC }, { P_CROSSBOW, P_BASIC }, { P_DART, P_BASIC }, { P_SHURIKEN, P_BASIC }, { P_BOOMERANG, P_BASIC }, { P_UNICORN_HORN, P_SKILLED }, ! { P_MARTIAL_ARTS, P_BASIC }, /* until Monk finally gets added */ { P_NO_TYPE, 0 } }; *************** *** 308,314 **** { P_HAMMER, P_BASIC }, { P_POLEARMS, P_BASIC }, { P_SPEAR, P_BASIC }, { P_CROSSBOW, P_EXPERT }, { P_DART, P_EXPERT }, { P_SHURIKEN, P_SKILLED }, ! { P_TWO_WEAPON_COMBAT, P_EXPERT }, { P_BARE_HANDED_COMBAT, 4 }, { P_NO_TYPE, 0 } }; --- 311,318 ---- { P_HAMMER, P_BASIC }, { P_POLEARMS, P_BASIC }, { P_SPEAR, P_BASIC }, { P_CROSSBOW, P_EXPERT }, { P_DART, P_EXPERT }, { P_SHURIKEN, P_SKILLED }, ! { P_TWO_WEAPON_COMBAT, P_EXPERT }, ! { P_BARE_HANDED_COMBAT, P_EXPERT }, { P_NO_TYPE, 0 } }; *************** *** 321,327 **** { P_POLEARMS, P_SKILLED }, { P_SPEAR, P_BASIC }, { P_JAVELIN, P_BASIC }, { P_LANCE, P_SKILLED }, { P_BOW, P_EXPERT }, { P_SHURIKEN, P_EXPERT }, ! { P_TWO_WEAPON_COMBAT, P_EXPERT }, { P_MARTIAL_ARTS, 6 }, { P_NO_TYPE, 0 } }; --- 325,332 ---- { P_POLEARMS, P_SKILLED }, { P_SPEAR, P_BASIC }, { P_JAVELIN, P_BASIC }, { P_LANCE, P_SKILLED }, { P_BOW, P_EXPERT }, { P_SHURIKEN, P_EXPERT }, ! { P_TWO_WEAPON_COMBAT, P_EXPERT }, ! { P_MARTIAL_ARTS, P_GRAND_MASTER }, { P_NO_TYPE, 0 } }; *************** *** 341,347 **** { P_CROSSBOW, P_BASIC }, { P_DART, P_EXPERT }, { P_SHURIKEN, P_BASIC }, { P_BOOMERANG, P_BASIC }, { P_WHIP, P_BASIC }, { P_UNICORN_HORN, P_SKILLED }, ! { P_TWO_WEAPON_COMBAT, P_SKILLED }, { P_BARE_HANDED_COMBAT, 3 }, { P_NO_TYPE, 0 } }; #endif /* TOURIST */ --- 346,353 ---- { P_CROSSBOW, P_BASIC }, { P_DART, P_EXPERT }, { P_SHURIKEN, P_BASIC }, { P_BOOMERANG, P_BASIC }, { P_WHIP, P_BASIC }, { P_UNICORN_HORN, P_SKILLED }, ! { P_TWO_WEAPON_COMBAT, P_SKILLED }, ! { P_BARE_HANDED_COMBAT, P_SKILLED }, { P_NO_TYPE, 0 } }; #endif /* TOURIST */ *************** *** 356,362 **** { P_SPEAR, P_SKILLED }, { P_JAVELIN, P_BASIC }, { P_TRIDENT, P_BASIC }, { P_LANCE, P_SKILLED }, { P_SLING, P_BASIC }, { P_TWO_WEAPON_COMBAT, P_SKILLED }, ! { P_BARE_HANDED_COMBAT, 4 }, { P_NO_TYPE, 0 } }; --- 362,368 ---- { P_SPEAR, P_SKILLED }, { P_JAVELIN, P_BASIC }, { P_TRIDENT, P_BASIC }, { P_LANCE, P_SKILLED }, { P_SLING, P_BASIC }, { P_TWO_WEAPON_COMBAT, P_SKILLED }, ! { P_BARE_HANDED_COMBAT, P_EXPERT }, { P_NO_TYPE, 0 } }; *************** *** 368,374 **** { P_SPEAR, P_BASIC }, { P_JAVELIN, P_BASIC }, { P_TRIDENT, P_BASIC }, { P_SLING, P_SKILLED }, { P_DART, P_EXPERT }, { P_SHURIKEN, P_BASIC }, ! { P_BARE_HANDED_COMBAT, 2 }, { P_NO_TYPE, 0 } }; #endif /* WEAPON_SKILLS */ --- 374,380 ---- { P_SPEAR, P_BASIC }, { P_JAVELIN, P_BASIC }, { P_TRIDENT, P_BASIC }, { P_SLING, P_SKILLED }, { P_DART, P_EXPERT }, { P_SHURIKEN, P_BASIC }, ! { P_BARE_HANDED_COMBAT, P_BASIC }, { P_NO_TYPE, 0 } }; #endif /* WEAPON_SKILLS */ *** Old/src/uhitm.c Tue Dec 10 16:45:26 1996 --- src/uhitm.c Mon Oct 21 22:11:14 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)uhitm.c 3.2 96/05/23 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)uhitm.c 3.2 96/10/13 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 325,330 **** --- 325,331 ---- int type; struct obj *monwep; #endif /* WEAPON_SKILLS */ + char yourbuf[BUFSZ]; wakeup(mon); if(!obj) { /* attack with bare hands */ *************** *** 389,396 **** monwep->owornmask &= ~W_WEP; MON_NOWEP(mon); mon->weapon_check = NEED_WEAPON; ! pline("%s %s shatters from the force of your blow!", ! s_suffix(Monnam(mon)), xname(monwep)); m_useup(mon, monwep); /* If someone just shattered MY weapon, I'd flee! */ if (rn2(4) && !mon->mflee) { --- 390,398 ---- monwep->owornmask &= ~W_WEP; MON_NOWEP(mon); mon->weapon_check = NEED_WEAPON; ! pline("%s %s shatter%s from the force of your blow!", ! s_suffix(Monnam(mon)), xname(monwep), ! (monwep->quan) == 1L ? "s" : ""); m_useup(mon, monwep); /* If someone just shattered MY weapon, I'd flee! */ if (rn2(4) && !mon->mflee) { *************** *** 444,466 **** } } } else if(obj->oclass == POTION_CLASS) { ! if (obj->quan > 1L) setworn(splitobj(obj, 1L), W_WEP); ! else setuwep((struct obj *)0); ! freeinv(obj); ! potionhit(mon,obj); ! hittxt = TRUE; ! if (mdat == &mons[PM_SHADE]) ! tmp = 0; ! else ! tmp = 1; } else { switch(obj->otyp) { ! case HEAVY_IRON_BALL: ! tmp = rnd(25); break; ! case BOULDER: ! tmp = rnd(20); break; case MIRROR: ! You("break your mirror. That's bad luck!"); change_luck(-2); useup(obj); obj = (struct obj *) 0; --- 446,475 ---- } } } else if(obj->oclass == POTION_CLASS) { ! if (obj->quan > 1L) ! setworn(splitobj(obj, 1L), W_WEP); ! else ! setuwep((struct obj *)0); ! freeinv(obj); ! potionhit(mon, obj); ! if (mon->mhp <= 0) return FALSE; /* killed */ ! hittxt = TRUE; ! /* in case potion effect causes transformation */ ! mdat = mon->data; ! tmp = (mdat == &mons[PM_SHADE]) ? 0 : 1; } else { + boolean shade_aware = FALSE; + switch(obj->otyp) { ! case BOULDER: /* 1d20 */ ! case HEAVY_IRON_BALL: /* 1d25 */ ! case IRON_CHAIN: /* 1d4+1 */ ! tmp = dmgval(obj, mon); ! shade_aware = TRUE; /* dmgval handles it */ ! break; case MIRROR: ! You("break %s mirror. That's bad luck!", ! shk_your(yourbuf, obj)); change_luck(-2); useup(obj); obj = (struct obj *) 0; *************** *** 469,475 **** break; #ifdef TOURIST case EXPENSIVE_CAMERA: ! You("succeed in destroying your camera. Congratulations!"); useup(obj); return(TRUE); #endif --- 478,485 ---- break; #ifdef TOURIST case EXPENSIVE_CAMERA: ! You("succeed in destroying %s camera. Congratulations!", ! shk_your(yourbuf, obj)); useup(obj); return(TRUE); #endif *************** *** 563,574 **** case CREAM_PIE: case BLINDING_VENOM: /* note: resists_blnd() does not apply here */ ! if (Blind || !haseyes(mdat)) pline(obj->otyp==CREAM_PIE ? "Splat!" : "Splash!"); ! else if (obj->otyp == BLINDING_VENOM) pline_The("venom blinds %s%s!", mon_nam(mon), mon->mcansee ? "" : " further"); ! else { char *whom = mon_nam(mon); /* note: s_suffix returns a modifiable buffer */ if (haseyes(mdat) && mdat != &mons[PM_FLOATING_EYE]) --- 573,584 ---- case CREAM_PIE: case BLINDING_VENOM: /* note: resists_blnd() does not apply here */ ! if (Blind || !haseyes(mdat) || u.uswallow) { pline(obj->otyp==CREAM_PIE ? "Splat!" : "Splash!"); ! } else if (obj->otyp == BLINDING_VENOM) { pline_The("venom blinds %s%s!", mon_nam(mon), mon->mcansee ? "" : " further"); ! } else { char *whom = mon_nam(mon); /* note: s_suffix returns a modifiable buffer */ if (haseyes(mdat) && mdat != &mons[PM_FLOATING_EYE]) *************** *** 577,583 **** } if(mon->msleep) mon->msleep = 0; setmangry(mon); ! if(haseyes(mon->data)) { mon->mcansee = 0; tmp = rn1(25, 21); if(((int) mon->mblinded + tmp) > 127) --- 587,593 ---- } if(mon->msleep) mon->msleep = 0; setmangry(mon); ! if (haseyes(mon->data) && !u.uswallow) { mon->mcansee = 0; tmp = rn1(25, 21); if(((int) mon->mblinded + tmp) > 127) *************** *** 612,618 **** else tmp = rnd(tmp); if(tmp > 6) tmp = 6; } ! if (mdat == &mons[PM_SHADE] && obj && objects[obj->otyp].oc_material != SILVER) tmp = 0; } --- 622,629 ---- else tmp = rnd(tmp); if(tmp > 6) tmp = 6; } ! ! if (!shade_aware && mdat == &mons[PM_SHADE] && obj && objects[obj->otyp].oc_material != SILVER) tmp = 0; } *************** *** 652,665 **** tmp += rnd(6); else poiskilled = TRUE; } ! if (tmp < 1 && !hittxt) { if (mdat == &mons[PM_SHADE]) { ! Your("attack passes harmlessly through %s.", mon_nam(mon)); ! hittxt = TRUE; ! tmp = 0; ! } else ! tmp = 1; } #ifdef WEAPON_SKILLS --- 663,681 ---- tmp += rnd(6); else poiskilled = TRUE; } ! if (tmp < 1) { ! /* make sure that negative damage adjustment can't result ! in inadvertently boosting the victim's hit points */ ! tmp = 0; if (mdat == &mons[PM_SHADE]) { ! if (!hittxt) { ! Your("attack passes harmlessly through %s.", mon_nam(mon)); ! hittxt = TRUE; ! } ! } else { ! if (get_dmg_bonus) tmp = 1; ! } } #ifdef WEAPON_SKILLS *************** *** 789,794 **** --- 805,812 ---- #ifdef TOURIST if (!obj) obj = which_armor(mdef, W_ARMU); #endif + if (mattk->adtyp == AD_DRIN) obj = which_armor(mdef, W_ARMH); + /* if defender's cloak/armor is greased, attacker slips off */ if (obj && (obj->greased || obj->otyp == OILSKIN_CLOAK)) { You("%s %s %s %s!", *************** *** 1086,1091 **** --- 1104,1111 ---- tmp = 0; break; } + if (m_slips_free(mdef, mattk)) break; + if ((mdef->misc_worn_check & W_ARMH) && rn2(8)) { pline("%s helmet blocks your attack to %s head.", s_suffix(Monnam(mdef)), his[pronoun_gender(mdef)]); *** Old/src/vault.c Tue Dec 10 16:45:31 1996 --- src/vault.c Thu Jun 13 17:03:36 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)vault.c 3.2 95/01/16 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)vault.c 3.2 96/06/05 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 558,563 **** --- 558,564 ---- rloc(m_at(m, n)); } remove_monster(grd->mx, grd->my); + newsym(grd->mx, grd->my); place_monster(grd, m, n); mpickgold(grd); /* does a newsym */ } *************** *** 566,573 **** grd->mpeaceful ? " calms down and" : ""); if(x != grd->mx || y != grd->my) { remove_monster(grd->mx, grd->my); place_monster(grd, x, y); ! newsym(grd->mx,grd->my); } if(!grd->mpeaceful) return(-1); else { --- 567,575 ---- grd->mpeaceful ? " calms down and" : ""); if(x != grd->mx || y != grd->my) { remove_monster(grd->mx, grd->my); + newsym(grd->mx, grd->my); place_monster(grd, x, y); ! newsym(x, y); } if(!grd->mpeaceful) return(-1); else { *** Old/src/version.c Tue Dec 10 16:45:35 1996 --- src/version.c Mon Jun 24 13:35:23 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)version.c 3.2 96/05/10 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)version.c 3.2 96/06/22 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 48,72 **** #endif boolean ! check_version(version_info, filename, complain) ! unsigned long *version_info; const char *filename; boolean complain; { if ( #ifdef VERSION_COMPATIBILITY ! version_info[0] < VERSION_COMPATIBILITY || ! version_info[0] > VERSION_NUMBER #else ! version_info[0] != VERSION_NUMBER #endif ) { if (complain) pline("Version mismatch for file \"%s\".", filename); return FALSE; ! } else if (version_info[1] != VERSION_FEATURES || ! version_info[2] != VERSION_SANITY1 || ! version_info[3] != VERSION_SANITY2) { if (complain) pline("Configuration incompatability for file \"%s\".", filename); --- 48,72 ---- #endif boolean ! check_version(version_data, filename, complain) ! struct version_info *version_data; const char *filename; boolean complain; { if ( #ifdef VERSION_COMPATIBILITY ! version_data->incarnation < VERSION_COMPATIBILITY || ! version_data->incarnation > VERSION_NUMBER #else ! version_data->incarnation != VERSION_NUMBER #endif ) { if (complain) pline("Version mismatch for file \"%s\".", filename); return FALSE; ! } else if (version_data->feature_set != VERSION_FEATURES || ! version_data->entity_count != VERSION_SANITY1 || ! version_data->struct_sizes != VERSION_SANITY2) { if (complain) pline("Configuration incompatability for file \"%s\".", filename); *************** *** 82,93 **** int fd; const char *name; { ! unsigned long vers_info[4]; boolean verbose = name ? TRUE : FALSE; ! (void) read(fd, (genericptr_t) vers_info, sizeof vers_info); minit(); /* ZEROCOMP */ ! if (!check_version(vers_info, name, verbose)) { if (verbose) wait_synch(); return FALSE; } --- 82,93 ---- int fd; const char *name; { ! struct version_info vers_info; boolean verbose = name ? TRUE : FALSE; ! (void) read(fd, (genericptr_t) &vers_info, sizeof vers_info); minit(); /* ZEROCOMP */ ! if (!check_version(&vers_info, name, verbose)) { if (verbose) wait_synch(); return FALSE; } *************** *** 98,111 **** store_version(fd) int fd; { ! static unsigned long version_info[4] = { VERSION_NUMBER, VERSION_FEATURES, VERSION_SANITY1, VERSION_SANITY2 }; bufoff(fd); /* bwrite() before bufon() uses plain write() */ ! bwrite(fd, (genericptr_t)version_info, (unsigned)(sizeof version_info)); bufon(fd); return; } --- 98,111 ---- store_version(fd) int fd; { ! static struct version_info version_data = { VERSION_NUMBER, VERSION_FEATURES, VERSION_SANITY1, VERSION_SANITY2 }; bufoff(fd); /* bwrite() before bufon() uses plain write() */ ! bwrite(fd,(genericptr_t)&version_data,(unsigned)(sizeof version_data)); bufon(fd); return; } *** Old/src/weapon.c Tue Dec 10 16:45:42 1996 --- src/weapon.c Mon Nov 25 17:43:02 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)weapon.c 3.2 96/05/12 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)weapon.c 3.2 96/11/11 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 129,134 **** --- 129,135 ---- if (objects[otyp].oc_wldam) tmp = rnd(objects[otyp].oc_wldam); switch (otyp) { + case IRON_CHAIN: case CROSSBOW_BOLT: case MORNING_STAR: case PARTISAN: *************** *** 156,161 **** --- 157,163 ---- if (objects[otyp].oc_wsdam) tmp = rnd(objects[otyp].oc_wsdam); switch (otyp) { + case IRON_CHAIN: case CROSSBOW_BOLT: case MACE: case WAR_HAMMER: *************** *** 178,185 **** case ACID_VENOM: tmp += rnd(6); break; } } ! if (Is_weapon) tmp += otmp->spe; if (objects[otyp].oc_material <= LEATHER && thick_skinned(ptr)) /* thick skinned/scaled creatures don't feel it */ --- 180,190 ---- case ACID_VENOM: tmp += rnd(6); break; } } ! if (Is_weapon) { tmp += otmp->spe; + /* negative enchantment mustn't produce negative damage */ + if (tmp < 0) tmp = 0; + } if (objects[otyp].oc_material <= LEATHER && thick_skinned(ptr)) /* thick skinned/scaled creatures don't feel it */ *************** *** 187,194 **** if (ptr == &mons[PM_SHADE] && objects[otyp].oc_material != SILVER) tmp = 0; /* Put weapon vs. monster type damage bonuses in below: */ ! if (Is_weapon || otmp->oclass == GEM_CLASS) { int bonus = 0; if (otmp->blessed && (is_undead(ptr) || is_demon(ptr))) --- 192,211 ---- if (ptr == &mons[PM_SHADE] && objects[otyp].oc_material != SILVER) tmp = 0; + /* "very heavy iron ball"; weight increase is in increments of 160 */ + if (otyp == HEAVY_IRON_BALL && tmp > 0) { + int wt = (int)objects[HEAVY_IRON_BALL].oc_weight; + + if ((int)otmp->owt > wt) { + wt = ((int)otmp->owt - wt) / 160; + tmp += rnd(4 * wt); + if (tmp > 25) tmp = 25; /* objects[].oc_wldam */ + } + } + /* Put weapon vs. monster type damage bonuses in below: */ ! if (Is_weapon || otmp->oclass == GEM_CLASS || ! otmp->oclass == BALL_CLASS || otmp->oclass == CHAIN_CLASS) { int bonus = 0; if (otmp->blessed && (is_undead(ptr) || is_demon(ptr))) *************** *** 207,212 **** --- 224,234 ---- } if (tmp > 0) { + /* It's debateable whether a rusted blunt instrument + should do less damage than a pristine one, since + it will hit with essentially the same impact, but + there ought to some penalty for using damaged gear + so always subtract erosion even for blunt weapons. */ tmp -= otmp->oeroded; if (tmp < 1) tmp = 1; } *************** *** 591,601 **** slots_required(skill) int skill; { ! /* The more difficult the training, the more slots it takes. */ if (skill <= P_LAST_WEAPON || skill == P_TWO_WEAPON_COMBAT) ! return P_SKILL(skill); ! return (P_SKILL(skill) > 5) ? 2 : 1; /* unarmed or martial */ } /* return true if this skill can be advanced */ --- 613,636 ---- slots_required(skill) int skill; { ! int tmp = P_SKILL(skill); ! ! /* The more difficult the training, the more slots it takes. ! * unskilled -> basic 1 ! * basic -> skilled 2 ! * skilled -> expert 3 ! */ if (skill <= P_LAST_WEAPON || skill == P_TWO_WEAPON_COMBAT) ! return tmp; ! /* Fewer slots used up for unarmed or martial. ! * unskilled -> basic 1 ! * basic -> skilled 1 ! * skilled -> expert 2 ! * expert -> master 2 ! * master -> grand master 3 ! */ ! return (tmp + 1) / 2; } /* return true if this skill can be advanced */ *************** *** 619,625 **** P_SKILL(skill)++; u.skill_record[u.skills_advanced++] = skill; /* subtly change the adavnce message to indicate no more advancement */ ! You("are now %s skilled in %s.", P_SKILL(skill) >= P_MAX_SKILL(skill) ? "most" : "more", P_NAME(skill)); } --- 654,660 ---- P_SKILL(skill)++; u.skill_record[u.skills_advanced++] = skill; /* subtly change the adavnce message to indicate no more advancement */ ! You("are now %s skilled in %s.", P_SKILL(skill) >= P_MAX_SKILL(skill) ? "most" : "more", P_NAME(skill)); } *************** *** 636,642 **** enhance_weapon_skill() { int i, n, len, longest, to_advance; ! char buf[BUFSIZ], buf2[BUFSIZ]; menu_item *selected; anything any; winid win; --- 671,677 ---- enhance_weapon_skill() { int i, n, len, longest, to_advance; ! char buf[BUFSZ], buf2[BUFSZ]; menu_item *selected; anything any; winid win; *************** *** 678,685 **** add_menu(win, NO_GLYPH, &any, 0, 0, ATR_NONE, buf2, MENU_UNSELECTED); } ! end_menu(win, to_advance ? "Pick a skill to advance:" : ! "Current skills:"); n = select_menu(win, to_advance ? PICK_ONE : PICK_NONE, &selected); destroy_nhwindow(win); if (n > 0) { --- 713,724 ---- add_menu(win, NO_GLYPH, &any, 0, 0, ATR_NONE, buf2, MENU_UNSELECTED); } ! Strcpy(buf, to_advance ? "Pick a skill to advance:" : "Current skills:"); ! #ifdef WIZARD ! if (wizard) Sprintf(eos(buf), " (%d slot%s available)", ! u.weapon_slots, plur(u.weapon_slots)); ! #endif ! end_menu(win, buf); n = select_menu(win, to_advance ? PICK_ONE : PICK_NONE, &selected); destroy_nhwindow(win); if (n > 0) { *************** *** 734,746 **** } void ! add_weapon_skill() { int i, before, after; for (i = 0, before = 0; i < P_NUM_SKILLS; i++) if (can_advance(i)) before++; ! u.weapon_slots++; for (i = 0, after = 0; i < P_NUM_SKILLS; i++) if (can_advance(i)) after++; if (before < after) --- 773,786 ---- } void ! add_weapon_skill(n) ! int n; /* number of slots to gain; normally one */ { int i, before, after; for (i = 0, before = 0; i < P_NUM_SKILLS; i++) if (can_advance(i)) before++; ! u.weapon_slots += n; for (i = 0, after = 0; i < P_NUM_SKILLS; i++) if (can_advance(i)) after++; if (before < after) *************** *** 748,772 **** } void ! lose_weapon_skill() { int skill; ! /* deduct first from unused slots, then from last placed slot, if any */ ! if (u.weapon_slots) { ! u.weapon_slots--; ! } else if (u.skills_advanced) { ! skill = u.skill_record[--u.skills_advanced]; ! if (P_SKILL(skill) <= P_UNSKILLED) ! panic("lose_weapon_skill"); ! ! P_SKILL(skill)--; /* drop skill one level */ ! ! /* Some skills take more than one slot, refund the rest. */ ! if (skill <= P_LAST_WEAPON || skill == P_TWO_WEAPON_COMBAT) ! u.weapon_slots = P_SKILL(skill) - 1; ! else if (P_SKILL(skill) >= 5) ! u.weapon_slots = 1; } } --- 788,813 ---- } void ! lose_weapon_skill(n) ! int n; /* number of slots to lose; normally one */ { int skill; ! while (--n >= 0) { ! /* deduct first from unused slots, then from last placed slot, if any */ ! if (u.weapon_slots) { ! u.weapon_slots--; ! } else if (u.skills_advanced) { ! skill = u.skill_record[--u.skills_advanced]; ! if (P_SKILL(skill) <= P_UNSKILLED) ! panic("lose_weapon_skill (%d)", skill); ! P_SKILL(skill)--; /* drop skill one level */ ! /* Lost skill might have taken more than one slot; refund rest. */ ! u.weapon_slots = slots_required(skill) - 1; ! /* It might now be possible to advance some other pending ! skill by using the refunded slots, but giving a message ! to that affect would seem pretty confusing.... */ ! } } } *** Old/src/were.c Tue Dec 10 16:45:46 1996 --- src/were.c Tue Aug 13 13:30:56 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)were.c 3.2 96/05/03 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)were.c 3.2 96/08/09 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 125,139 **** } void ! you_were() { ! char qbuf[80]; if(u.umonnum == u.ulycn) return; if(Polymorph_control) { ! Sprintf(qbuf,"Do you want to change into a %s? ", ! mons[u.ulycn].mname+4); if(yn(qbuf) == 'n') return; } (void) polymon(u.ulycn); } #endif /* OVLB */ --- 125,155 ---- } void ! you_were() ! { ! char qbuf[QBUFSZ]; ! if(u.umonnum == u.ulycn) return; if(Polymorph_control) { ! /* `+4' => skip "were" prefix to get name of beast */ ! Sprintf(qbuf, "Do you want to change into %s? ", ! an(mons[u.ulycn].mname+4)); if(yn(qbuf) == 'n') return; } (void) polymon(u.ulycn); + } + + void + you_unwere(purify) + boolean purify; + { + if (purify) { + You_feel("purified."); + u.ulycn = NON_PM; /* cure lycanthropy */ + } + if (is_were(uasmon) && + (!Polymorph_control || yn("Remain in beast form?") == 'n')) + rehumanize(); } #endif /* OVLB */ *** Old/src/wield.c Tue Dec 10 16:45:48 1996 --- src/wield.c Tue Aug 13 12:00:43 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)wield.c 3.2 96/01/24 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)wield.c 3.2 96/07/04 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 12,22 **** || (optr)->otyp == ELVEN_BROADSWORD\ || (optr)->otyp == ELVEN_BOW) /* used by welded(), and also while wielding */ #define will_weld(optr) ((optr)->cursed \ ! && ((optr)->oclass == WEAPON_CLASS \ ! || is_weptool(optr) \ ! || (optr)->otyp == HEAVY_IRON_BALL \ || (optr)->otyp == TIN_OPENER)) /* Note: setuwep() with a null obj, and uwepgone(), are NOT the same! --- 12,26 ---- || (optr)->otyp == ELVEN_BROADSWORD\ || (optr)->otyp == ELVEN_BOW) + /* used by erode_weapon() and will_weld() */ + #define erodeable_wep(optr) ((optr)->oclass == WEAPON_CLASS \ + || is_weptool(optr) \ + || (optr)->otyp == HEAVY_IRON_BALL \ + || (optr)->otyp == IRON_CHAIN) + /* used by welded(), and also while wielding */ #define will_weld(optr) ((optr)->cursed \ ! && (erodeable_wep(optr) \ || (optr)->otyp == TIN_OPENER)) /* Note: setuwep() with a null obj, and uwepgone(), are NOT the same! *************** *** 32,45 **** setworn(obj, W_WEP); /* Note: Explicitly wielding a pick-axe will not give a "bashing" * message. Wielding one via 'a'pplying it will. */ ! if (obj) ! unweapon = ((obj->oclass == WEAPON_CLASS && ! (objects[obj->otyp].oc_wepcat == WEP_BOW || ! objects[obj->otyp].oc_wepcat == WEP_AMMO || ! objects[obj->otyp].oc_wepcat == WEP_MISSILE)) || ! (obj->oclass == TOOL_CLASS && !is_weptool(obj))); ! else unweapon = TRUE; /* for "bare hands" message */ update_inventory(); } --- 36,51 ---- setworn(obj, W_WEP); /* Note: Explicitly wielding a pick-axe will not give a "bashing" * message. Wielding one via 'a'pplying it will. + * 3.2.2: Wielding arbitrary objects will give bashing message too. */ ! if (obj) { ! int wepcat = objects[obj->otyp].oc_wepcat; ! unweapon = (obj->oclass == WEAPON_CLASS) ? ! (wepcat == WEP_BOW || ! wepcat == WEP_AMMO || ! wepcat == WEP_MISSILE) : ! !is_weptool(obj); ! } else unweapon = TRUE; /* for "bare hands" message */ update_inventory(); } *************** *** 74,80 **** You("are already wielding that!"); if (is_weptool(wep)) unweapon = FALSE; /* [see setuwep()] */ } else if (welded(uwep)) { ! weldmsg(uwep, TRUE); } else if (wep == &zeroobj) { if (uwep == 0) You("are already empty %s.", body_part(HANDED)); --- 80,86 ---- You("are already wielding that!"); if (is_weptool(wep)) unweapon = FALSE; /* [see setuwep()] */ } else if (welded(uwep)) { ! weldmsg(uwep); } else if (wep == &zeroobj) { if (uwep == 0) You("are already empty %s.", body_part(HANDED)); *************** *** 136,151 **** return(res); } void erode_weapon(acid_dmg) boolean acid_dmg; - /* Rust weapon, or corrode it if acid damage is called for */ { ! if(!uwep || uwep->oclass != WEAPON_CLASS) return; /* %% */ if (uwep->greased) { grease_protect(uwep,(char *)0,FALSE); ! } else if(uwep->oerodeproof || ! (acid_dmg ? !is_corrodeable(uwep) : !is_rustprone(uwep))) { if (flags.verbose || !(uwep->oerodeproof && uwep->rknown)) Your("%s not affected.", aobjnam(uwep, "are")); if (uwep->oerodeproof) uwep->rknown = TRUE; --- 142,159 ---- return(res); } + /* maybe rust weapon, or corrode it if acid damage is called for */ void erode_weapon(acid_dmg) boolean acid_dmg; { ! if (!uwep || !erodeable_wep(uwep)) ! return; ! if (uwep->greased) { grease_protect(uwep,(char *)0,FALSE); ! } else if (uwep->oerodeproof || ! (acid_dmg ? !is_corrodeable(uwep) : !is_rustprone(uwep))) { if (flags.verbose || !(uwep->oerodeproof && uwep->rknown)) Your("%s not affected.", aobjnam(uwep, "are")); if (uwep->oerodeproof) uwep->rknown = TRUE; *************** *** 154,164 **** uwep->oeroded+1 == MAX_ERODE ? " completely" : uwep->oeroded ? " further" : ""); uwep->oeroded++; ! } else if (flags.verbose) Your("%s completely %s.", aobjnam(uwep, Blind ? "feel" : "look"), acid_dmg ? "corroded" : "rusty"); } int --- 162,173 ---- uwep->oeroded+1 == MAX_ERODE ? " completely" : uwep->oeroded ? " further" : ""); uwep->oeroded++; ! } else { if (flags.verbose) Your("%s completely %s.", aobjnam(uwep, Blind ? "feel" : "look"), acid_dmg ? "corroded" : "rusty"); + } } int *************** *** 252,282 **** return 0; } - /* The reason for "specific" is historical; some parts of the code used - * the object name and others just used "weapon"/"sword". This function - * replaced all of those. Which one we use is really arbitrary. - */ void ! weldmsg(obj, specific) register struct obj *obj; - boolean specific; { ! char buf[BUFSZ]; ! if (specific) { ! long savewornmask = obj->owornmask; ! obj->owornmask &= ~W_WEP; ! Strcpy(buf, Doname2(obj)); ! obj->owornmask = savewornmask; ! } else ! Sprintf(buf, "Your %s%s", ! is_sword(obj) ? "sword" : "weapon", ! plur(obj->quan)); ! Strcat(buf, (obj->quan == 1L) ? " is" : " are"); ! Sprintf(eos(buf), " welded to your %s!", bimanual(obj) ? (const char *)makeplural(body_part(HAND)) : body_part(HAND)); ! pline(buf); } /*wield.c*/ --- 261,278 ---- return 0; } void ! weldmsg(obj) register struct obj *obj; { ! long savewornmask; ! savewornmask = obj->owornmask; ! Your("%s %s welded to your %s!", ! xname(obj), (obj->quan == 1L) ? "is" : "are", bimanual(obj) ? (const char *)makeplural(body_part(HAND)) : body_part(HAND)); ! obj->owornmask = savewornmask; } /*wield.c*/ *** Old/src/wizard.c Tue Dec 10 16:45:53 1996 --- src/wizard.c Mon Nov 25 17:43:19 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)wizard.c 3.2 95/11/18 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)wizard.c 3.2 96/11/17 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 440,445 **** --- 440,447 ---- mmtmp = &migrating_mons; while ((mtmp = *mmtmp) != 0) { if (mtmp->iswiz && + /* if he has the Amulet, he won't bring it to you */ + !mon_has_amulet(mtmp) && (elapsed = monstermoves - mtmp->mlstmv) > 0L) { mon_catchup_elapsed_time(mtmp, elapsed); if (elapsed >= LARGEST_INT) elapsed = LARGEST_INT - 1; *** Old/src/worn.c Tue Dec 10 16:45:59 1996 --- src/worn.c Sun Oct 6 14:32:50 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)worn.c 3.2 96/03/28 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)worn.c 3.2 96/08/03 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 241,249 **** --- 241,251 ---- continue; best = obj; goto outer_break; /* no such thing as better amulets */ + #ifdef TOURIST case W_ARMU: if (!is_shirt(obj)) continue; break; + #endif case W_ARMC: if (!is_cloak(obj)) continue; break; *************** *** 276,284 **** outer_break: if (!best || best == old) return; ! if ((flag == W_ARMU || flag == W_ARM) && ! (mon->misc_worn_check & W_ARMC)) m_delay += 2; if (old) m_delay += objects[old->otyp].oc_delay; --- 278,293 ---- outer_break: if (!best || best == old) return; ! /* if wearing a cloak, account for the time spent removing ! and re-wearing it when putting on a suit or shirt */ ! if ((flag == W_ARM ! #ifdef TOURIST ! || flag == W_ARMU ! #endif ! ) && (mon->misc_worn_check & W_ARMC)) m_delay += 2; + /* when upgrading a piece of armor, account for time spent + taking off current one */ if (old) m_delay += objects[old->otyp].oc_delay; *** Old/src/zap.c Tue Dec 10 16:46:05 1996 --- src/zap.c Mon Dec 9 09:49:45 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)zap.c 3.2 96/05/02 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)zap.c 3.2 96/11/19 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 25,31 **** STATIC_DCL void FDECL(polyuse, (struct obj*, int, int)); STATIC_DCL void FDECL(create_polymon, (struct obj *)); STATIC_DCL boolean FDECL(zap_updown, (struct obj *)); ! STATIC_DCL int FDECL(zhitm, (struct monst *,int,int)); STATIC_DCL void FDECL(zhitu, (int,int,const char *,XCHAR_P,XCHAR_P)); STATIC_DCL void FDECL(revive_egg, (struct obj *)); --- 25,31 ---- STATIC_DCL void FDECL(polyuse, (struct obj*, int, int)); STATIC_DCL void FDECL(create_polymon, (struct obj *)); STATIC_DCL boolean FDECL(zap_updown, (struct obj *)); ! STATIC_DCL int FDECL(zhitm, (struct monst *,int,int,struct obj **)); STATIC_DCL void FDECL(zhitu, (int,int,const char *,XCHAR_P,XCHAR_P)); STATIC_DCL void FDECL(revive_egg, (struct obj *)); *************** *** 668,673 **** --- 668,674 ---- for(otmp = objhdr; minwt > 0 && otmp; otmp = otmp2) { otmp2 = otmp->nexthere; + if (otmp == uball || otmp == uchain) continue; if (((int) objects[otmp->otyp].oc_material == mat) == (rn2(minwt + 1) != 0)) { /* appropriately add damage to bill */ *************** *** 980,988 **** else if (obj->otyp == STATUE) (void) break_statue(obj); else { ! (void)breaks(obj, obj->ox, obj->oy); res = 0; } makeknown(otmp->otyp); break; case WAN_DIGGING: --- 981,993 ---- else if (obj->otyp == STATUE) (void) break_statue(obj); else { ! if (!flags.mon_moving) ! (void)hero_breaks(obj, obj->ox, obj->oy, FALSE); ! else ! (void)breaks(obj, obj->ox, obj->oy); res = 0; } + /* BUG[?]: shouldn't this depend upon you seeing it happen? */ makeknown(otmp->otyp); break; case WAN_DIGGING: *************** *** 1049,1068 **** int tx, ty; { int hitanything = 0; ! register struct obj *otmp, *next_obj = (struct obj *)0; /* modified by GAN to hit all objects */ /* pre-reverse the polymorph pile, -dave- 3/90 */ poly_zapped = -1; ! if(obj->otyp == SPE_POLYMORPH || obj->otyp == WAN_POLYMORPH) { ! otmp = level.objects[tx][ty]; ! level.objects[tx][ty] = next_obj; ! while(otmp) { next_obj = otmp->nexthere; otmp->nexthere = level.objects[tx][ty]; level.objects[tx][ty] = otmp; - otmp = next_obj; } } for(otmp = level.objects[tx][ty]; otmp; otmp = next_obj) { /* Fix for polymorph bug, Tim Wright */ --- 1054,1082 ---- int tx, ty; { int hitanything = 0; ! register struct obj *otmp, *next_obj; /* modified by GAN to hit all objects */ /* pre-reverse the polymorph pile, -dave- 3/90 */ poly_zapped = -1; ! if (obj->otyp == SPE_POLYMORPH || obj->otyp == WAN_POLYMORPH) { ! next_obj = level.objects[tx][ty]; ! level.objects[tx][ty] = 0; ! while ((otmp = next_obj) != 0) { next_obj = otmp->nexthere; otmp->nexthere = level.objects[tx][ty]; level.objects[tx][ty] = otmp; } + } else if (obj->otyp == SPE_FORCE_BOLT || obj->otyp == WAN_STRIKING) { + struct trap *t = t_at(tx, ty); + + /* We can't settle for the default calling sequence of + bhito(otmp) -> break_statue(otmp) -> activate_statue_trap(ox,oy) + because that last call might end up operating on our `next_obj' + (below), rather than on the current object, if it happens to + encounter a statue which mustn't become animated. */ + if (t && t->ttyp == STATUE_TRAP) + (void) activate_statue_trap(t, tx, ty, TRUE); } for(otmp = level.objects[tx][ty]; otmp; otmp = next_obj) { /* Fix for polymorph bug, Tim Wright */ *************** *** 1898,1911 **** } STATIC_OVL int ! zhitm(mon, type, nd) /* returns damage to mon */ register struct monst *mon; register int type, nd; { register int tmp = 0; register int abstype = abs(type) % 10; boolean sho_shieldeff = FALSE; switch(abstype) { case ZT_MAGIC_MISSILE: if (resists_magm(mon)) { --- 1912,1927 ---- } STATIC_OVL int ! zhitm(mon, type, nd, ootmp) /* returns damage to mon */ register struct monst *mon; register int type, nd; + struct obj **ootmp; /* to return worn armor for caller to disintegrate */ { register int tmp = 0; register int abstype = abs(type) % 10; boolean sho_shieldeff = FALSE; + *ootmp = (struct obj *)0; switch(abstype) { case ZT_MAGIC_MISSILE: if (resists_magm(mon)) { *************** *** 1950,1962 **** } type = -1; /* so they don't get saving throws */ } else { if (resists_disint(mon)) { sho_shieldeff = TRUE; ! break; } else { tmp = MAGIC_COOKIE; ! break; } } tmp = mon->mhp+1; break; --- 1966,1996 ---- } type = -1; /* so they don't get saving throws */ } else { + struct obj *otmp2; + if (resists_disint(mon)) { sho_shieldeff = TRUE; ! } else if (mon->misc_worn_check & W_ARMS) { ! /* destroy shield; victim survives */ ! *ootmp = which_armor(mon, W_ARMS); ! } else if (mon->misc_worn_check & W_ARM) { ! /* destroy body armor, also cloak if present */ ! *ootmp = which_armor(mon, W_ARM); ! if ((otmp2 = which_armor(mon, W_ARMC)) != 0) ! m_useup(mon, otmp2); } else { + /* no body armor, victim dies; destroy cloak + and shirt now in case target gets life-saved */ tmp = MAGIC_COOKIE; ! if ((otmp2 = which_armor(mon, W_ARMC)) != 0) ! m_useup(mon, otmp2); ! #ifdef TOURIST ! if ((otmp2 = which_armor(mon, W_ARMU)) != 0) ! m_useup(mon, otmp2); ! #endif } + type = -1; /* no saving throw wanted */ + break; /* not ordinary damage */ } tmp = mon->mhp+1; break; *************** *** 1994,2002 **** if (sho_shieldeff) shieldeff(mon->mx, mon->my); if ((type >= 10 && type <= 19) && (Role_is('K') && u.uhave.questart)) tmp *= 2; ! if (type >= 0) ! if (resist(mon, (type < ZT_SPELL(0)) ? WAND_CLASS : '\0', ! 0, NOTELL)) tmp /= 2; mon->mhp -= tmp; return(tmp); } --- 2028,2036 ---- if (sho_shieldeff) shieldeff(mon->mx, mon->my); if ((type >= 10 && type <= 19) && (Role_is('K') && u.uhave.questart)) tmp *= 2; ! if (tmp > 0 && type >= 0 && ! resist(mon, type < ZT_SPELL(0) ? WAND_CLASS : '\0', 0, NOTELL)) ! tmp /= 2; mon->mhp -= tmp; return(tmp); } *************** *** 2203,2215 **** coord save_bhitpos; boolean shopdamage = FALSE; register const char *fltxt; fltxt = flash_types[(type <= -30) ? abstype : abs(type)]; if(u.uswallow) { register int tmp; if(type < 0) return; ! tmp = zhitm(u.ustuck, type, nd); if(!u.ustuck) u.uswallow = 0; else pline("%s rips into %s%s", The(fltxt), mon_nam(u.ustuck), exclam(tmp)); --- 2237,2250 ---- coord save_bhitpos; boolean shopdamage = FALSE; register const char *fltxt; + struct obj *otmp; fltxt = flash_types[(type <= -30) ? abstype : abs(type)]; if(u.uswallow) { register int tmp; if(type < 0) return; ! tmp = zhitm(u.ustuck, type, nd, &otmp); if(!u.ustuck) u.uswallow = 0; else pline("%s rips into %s%s", The(fltxt), mon_nam(u.ustuck), exclam(tmp)); *************** *** 2258,2296 **** dy = -dy; } else { boolean mon_could_move = mon->mcanmove; ! int tmp = zhitm(mon, type, nd); ! if (is_rider(mon->data) && type == ZT_BREATH(ZT_DEATH)) { if (canseemon(mon)) { ! hit(fltxt, mon, exclam(tmp)); pline("%s disintegrates.", Monnam(mon)); pline("%s body reintegrates before your %s!", ! s_suffix(Monnam(mon)), ! makeplural(body_part(EYE))); ! pline("%s resurrects!", Monnam(mon)); } ! mon->mhp = mon->mhpmax; break; /* Out of while loop */ } ! if(mon->data == &mons[PM_DEATH] && abstype == ZT_DEATH) { ! if(cansee(mon->mx,mon->my)) { ! hit(fltxt, mon, exclam(tmp)); ! pline("Death absorbs the deadly %s!", ! type == ZT_BREATH(ZT_DEATH) ? ! "blast" : "ray"); ! pline("It seems even stronger than before."); ! } ! break; /* Out of while loop */ } if (tmp == MAGIC_COOKIE) { /* disintegration */ ! struct obj *otmp, *otmp2; ! pline("%s is disintegrated!", Monnam(mon)); mon->mgold = 0L; #define oresist_disintegration(obj) \ (objects[obj->otyp].oc_oprop == DISINT_RES || \ ! obj_resists(obj, 5, 50) || is_quest_artifact(obj)) for (otmp = mon->minvent; otmp; otmp = otmp2) { otmp2 = otmp->nobj; --- 2293,2339 ---- dy = -dy; } else { boolean mon_could_move = mon->mcanmove; ! int tmp = zhitm(mon, type, nd, &otmp); ! if (is_rider(mon->data) && abs(type) == ZT_BREATH(ZT_DEATH)) { if (canseemon(mon)) { ! hit(fltxt, mon, "."); pline("%s disintegrates.", Monnam(mon)); pline("%s body reintegrates before your %s!", ! s_suffix(Monnam(mon)), ! makeplural(body_part(EYE))); ! pline("%s resurrects!", Monnam(mon)); } ! mon->mhp = mon->mhpmax; break; /* Out of while loop */ } ! if (mon->data == &mons[PM_DEATH] && abstype == ZT_DEATH) { ! if (canseemon(mon)) { ! hit(fltxt, mon, "."); ! pline("%s absorbs the deadly %s!", Monnam(mon), ! type == ZT_BREATH(ZT_DEATH) ? ! "blast" : "ray"); ! pline("It seems even stronger than before."); ! } ! break; /* Out of while loop */ } if (tmp == MAGIC_COOKIE) { /* disintegration */ ! struct obj *otmp2, *m_amulet = mlifesaver(mon); ! ! if (canseemon(mon)) { ! if (!m_amulet) ! pline("%s is disintegrated!", Monnam(mon)); ! else ! hit(fltxt, mon, "!"); ! } mon->mgold = 0L; + /* note: worn amulet of life saving must be preserved in order to operate */ #define oresist_disintegration(obj) \ (objects[obj->otyp].oc_oprop == DISINT_RES || \ ! obj_resists(obj, 5, 50) || is_quest_artifact(obj) || \ ! obj == m_amulet) for (otmp = mon->minvent; otmp; otmp = otmp2) { otmp2 = otmp->nobj; *************** *** 2310,2317 **** else killed(mon); } else { ! hit(fltxt, mon, exclam(tmp)); ! if (mon_could_move && !mon->mcanmove) /* ZT_SLEEP */ slept_monst(mon); } --- 2353,2369 ---- else killed(mon); } else { ! if (!otmp) { ! /* normal non-fatal hit */ ! hit(fltxt, mon, exclam(tmp)); ! } else { ! /* some armor was destroyed; no damage done */ ! if (canseemon(mon)) ! pline("%s %s is disintegrated!", ! s_suffix(Monnam(mon)), ! distant_name(otmp, xname)); ! m_useup(mon, otmp); ! } if (mon_could_move && !mon->mcanmove) /* ZT_SLEEP */ slept_monst(mon); } *************** *** 2647,2666 **** newsym(obj->ox,obj->oy); } boolean break_statue(obj) register struct obj *obj; { ! struct trap *trap; struct obj *item; ! if((trap = t_at(obj->ox,obj->oy)) && trap->ttyp == STATUE_TRAP) ! if(makemon(&mons[obj->corpsenm], obj->ox, obj->oy, NO_MM_FLAGS)) { ! pline("Instead of shattering, the statue suddenly comes alive!"); ! delobj(obj); ! deltrap(trap); ! return FALSE; ! } while ((item = obj->cobj) != 0) { obj_extract_self(item); place_object(item, obj->ox, obj->oy); --- 2699,2717 ---- newsym(obj->ox,obj->oy); } + /* handle statue hit by striking/force bolt/pick-axe */ boolean break_statue(obj) register struct obj *obj; { ! /* [obj is assumed to be on floor, so no get_obj_location() needed] */ ! struct trap *trap = t_at(obj->ox, obj->oy); struct obj *item; ! if (trap && trap->ttyp == STATUE_TRAP && ! activate_statue_trap(trap, obj->ox, obj->oy, TRUE)) ! return FALSE; ! /* drop any objects contained inside the statue */ while ((item = obj->cobj) != 0) { obj_extract_self(item); place_object(item, obj->ox, obj->oy); *** Old/util/dgn_comp.l Tue Dec 10 16:46:12 1996 --- util/dgn_comp.l Mon Oct 21 22:14:35 1996 *************** *** 61,73 **** void FDECL(init_yyin, (FILE *)); void FDECL(init_yyout, (FILE *)); - #ifdef MICRO - #undef exit - # if !defined(MSDOS) && !defined(WIN32) - extern void FDECL(exit, (int)); - # endif - #endif - /* this doesn't always get put in dgn_comp.h * (esp. when using older versions of bison) */ --- 61,66 ---- *** Old/util/dgn_comp.y Tue Dec 10 16:46:14 1996 --- util/dgn_comp.y Mon Oct 21 22:14:36 1996 *************** *** 1,5 **** %{ ! /* SCCS Id: @(#)dgn_comp.c 3.2 96/05/10 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* Copyright (c) 1990 by M. Stephenson */ /* NetHack may be freely redistributed. See license for details. */ --- 1,5 ---- %{ ! /* SCCS Id: @(#)dgn_comp.c 3.2 96/06/22 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* Copyright (c) 1990 by M. Stephenson */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 48,60 **** #endif #endif - #ifdef MICRO - # undef exit - # if !defined(MSDOS) && !defined(WIN32) - extern void FDECL(exit, (int)); - # endif - #endif - #define ERR (-1) static struct couple couple; --- 48,53 ---- *************** *** 647,653 **** { int nd, cl = 0, nl = 0, cb = 0, nb = 0; ! static unsigned long version_info[4] = { VERSION_NUMBER, VERSION_FEATURES, VERSION_SANITY1, VERSION_SANITY2 }; --- 640,646 ---- { int nd, cl = 0, nl = 0, cb = 0, nb = 0; ! static struct version_info version_data = { VERSION_NUMBER, VERSION_FEATURES, VERSION_SANITY1, VERSION_SANITY2 }; *************** *** 657,663 **** exit(EXIT_FAILURE); } ! if (fwrite((char *)version_info, sizeof version_info, 1, yyout) != 1) { yyerror("FATAL - output failure."); exit(EXIT_FAILURE); } --- 650,656 ---- exit(EXIT_FAILURE); } ! if (fwrite((char *)&version_data, sizeof version_data, 1, yyout) != 1) { yyerror("FATAL - output failure."); exit(EXIT_FAILURE); } *** Old/util/dgn_main.c Tue Dec 10 16:46:17 1996 --- util/dgn_main.c Mon Oct 21 22:14:18 1996 *************** *** 11,23 **** #include "config.h" #include "dlb.h" - #ifdef MICRO - # undef exit - # if !defined(AMIGA) && !defined(MSDOS) && !defined(WIN32) - extern void FDECL(exit, (int)); - # endif - #endif - #ifdef MAC # ifdef applec # define MPWTOOL --- 11,16 ---- *** Old/util/dlb_main.c Tue Dec 10 16:46:20 1996 --- util/dlb_main.c Mon Oct 21 22:14:20 1996 *************** *** 13,21 **** #include #endif - #ifdef MICRO - # undef exit - #endif static void FDECL(xexit, (int)); #ifdef DLB --- 13,18 ---- *** Old/util/lev_comp.l Tue Dec 10 16:46:22 1996 --- util/lev_comp.l Mon Oct 21 22:14:34 1996 *************** *** 58,70 **** void FDECL(init_yyin, (FILE *)); void FDECL(init_yyout, (FILE *)); - #ifdef MICRO - #undef exit - # if !defined(MSDOS) && !defined(WIN32) - extern void FDECL(exit, (int)); - # endif - #endif - /* * This doesn't always get put in lev_comp.h * (esp. when using older versions of bison). --- 58,63 ---- *** Old/util/lev_comp.y Tue Dec 10 16:46:25 1996 --- util/lev_comp.y Mon Oct 21 22:14:35 1996 *************** *** 37,49 **** #define NewTab(type, size) (type **) alloc(sizeof(type *) * size) #define Free(ptr) free((genericptr_t)ptr) - #ifdef MICRO - # undef exit - # if !defined(MSDOS) && !defined(WIN32) - extern void FDECL(exit, (int)); - # endif - #endif - extern void FDECL(yyerror, (const char *)); extern void FDECL(yywarning, (const char *)); extern int NDECL(yylex); --- 37,42 ---- *** Old/util/lev_main.c Tue Dec 10 16:46:29 1996 --- util/lev_main.c Mon Oct 21 22:14:19 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)lev_main.c 3.2 96/05/10 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)lev_main.c 3.2 96/06/22 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 55,67 **** #define Free(ptr) if(ptr) free((genericptr_t) (ptr)) #define Write(fd, item, size) (void) write(fd, (genericptr_t)(item), size) - #ifdef MICRO - # undef exit - # if !defined(AMIGA) && !defined(MSDOS) && !defined(WIN32) - extern void FDECL(exit, (int)); - # endif - #endif - #ifdef __BORLANDC__ extern unsigned _stklen = STKSIZ; #endif --- 55,60 ---- *************** *** 941,952 **** { char c; uchar len; ! static unsigned long version_info[4] = { VERSION_NUMBER, VERSION_FEATURES, VERSION_SANITY1, VERSION_SANITY2 }; ! Write(fd, version_info, sizeof version_info); c = typ; Write(fd, &c, sizeof(c)); /* 1 byte header */ Write(fd, init, sizeof(lev_init)); --- 934,945 ---- { char c; uchar len; ! static struct version_info version_data = { VERSION_NUMBER, VERSION_FEATURES, VERSION_SANITY1, VERSION_SANITY2 }; ! Write(fd, &version_data, sizeof version_data); c = typ; Write(fd, &c, sizeof(c)); /* 1 byte header */ Write(fd, init, sizeof(lev_init)); *** Old/util/makedefs.c Tue Dec 10 16:46:33 1996 --- util/makedefs.c Mon Nov 4 09:01:17 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)makedefs.c 3.2 96/05/09 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) M. Stephenson, 1990, 1991. */ /* Copyright (c) Dean Luick, 1990. */ --- 1,4 ---- ! /* SCCS Id: @(#)makedefs.c 3.2 96/10/29 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) M. Stephenson, 1990, 1991. */ /* Copyright (c) Dean Luick, 1990. */ *************** *** 52,64 **** static const char SCCS_Id[] = "@(#)makedefs.c\t3.2\t95/06/10"; #endif - #ifdef MICRO - # undef exit - # if !defined(MSDOS) && !defined(WIN32) - extern void FDECL(exit, (int)); - # endif - #endif - /* names of files to be generated */ #define DATE_FILE "date.h" #define MONST_FILE "pm.h" --- 52,57 ---- *************** *** 90,100 **** --- 83,101 ---- # define DATA_TEMPLATE ":lib:%s" # define DATA_IN_TEMPLATE ":dat:%s" # else /* MAC */ + # ifdef OS2 + # define INCLUDE_TEMPLATE "..\\include\\%s" + # define SOURCE_TEMPLATE "..\\src\\%s" + # define DGN_TEMPLATE "..\\dat\\%s" /* where dungeon.pdf file goes */ + # define DATA_TEMPLATE "..\\dat\\%s" + # define DATA_IN_TEMPLATE "..\\dat\\%s" + # else /* OS2 */ # define INCLUDE_TEMPLATE "../include/%s" # define SOURCE_TEMPLATE "../src/%s" # define DGN_TEMPLATE "../dat/%s" /* where dungeon.pdf file goes */ # define DATA_TEMPLATE "../dat/%s" # define DATA_IN_TEMPLATE "../dat/%s" + # endif /* OS2 */ # endif /* MAC */ #endif /* AMIGA */ *************** *** 104,115 **** *Dont_Edit_Data = "#\tThis data file is generated by 'makedefs'. Do not edit. \n"; ! static struct { ! unsigned long incarnation; ! unsigned long features; ! unsigned long entity_cnt; ! unsigned long struct_sizes; ! } version; /* definitions used for vision tables */ #define TEST_WIDTH COLNO --- 105,111 ---- *Dont_Edit_Data = "#\tThis data file is generated by 'makedefs'. Do not edit. \n"; ! static struct version_info version; /* definitions used for vision tables */ #define TEST_WIDTH COLNO *************** *** 423,429 **** * The actual values have no special meaning, and the category * groupings are just for convenience. */ ! version.features = (unsigned long)(0L /* levels and/or topology (0..4) */ #ifdef REINCARNATION | (1L << 1) --- 419,425 ---- * The actual values have no special meaning, and the category * groupings are just for convenience. */ ! version.feature_set = (unsigned long)(0L /* levels and/or topology (0..4) */ #ifdef REINCARNATION | (1L << 1) *************** *** 477,487 **** * (NROFARTIFACTS<<24) | (NUM_OBJECTS<<12) | (NUMMONS<<0) */ for (i = 1; artifact_names[i]; i++) continue; ! version.entity_cnt = (unsigned long) (i - 1); for (i = 1; objects[i].oc_class != ILLOBJ_CLASS; i++) continue; ! version.entity_cnt = (version.entity_cnt << 12) | (unsigned long) i; for (i = 0; mons[i].mlet; i++) continue; ! version.entity_cnt = (version.entity_cnt << 12) | (unsigned long) i; /* * Value used for compiler (word size/field alignment/padding) check. */ --- 473,483 ---- * (NROFARTIFACTS<<24) | (NUM_OBJECTS<<12) | (NUMMONS<<0) */ for (i = 1; artifact_names[i]; i++) continue; ! version.entity_count = (unsigned long)(i - 1); for (i = 1; objects[i].oc_class != ILLOBJ_CLASS; i++) continue; ! version.entity_count = (version.entity_count << 12) | (unsigned long)i; for (i = 0; mons[i].mlet; i++) continue; ! version.entity_count = (version.entity_count << 12) | (unsigned long)i; /* * Value used for compiler (word size/field alignment/padding) check. */ *************** *** 563,571 **** Fprintf(ofp,"#define VERSION_NUMBER 0x%08lx%s\n", version.incarnation, ul_sfx); Fprintf(ofp,"#define VERSION_FEATURES 0x%08lx%s\n", ! version.features, ul_sfx); Fprintf(ofp,"#define VERSION_SANITY1 0x%08lx%s\n", ! version.entity_cnt, ul_sfx); Fprintf(ofp,"#define VERSION_SANITY2 0x%08lx%s\n", version.struct_sizes, ul_sfx); Fprintf(ofp,"\n"); --- 559,567 ---- Fprintf(ofp,"#define VERSION_NUMBER 0x%08lx%s\n", version.incarnation, ul_sfx); Fprintf(ofp,"#define VERSION_FEATURES 0x%08lx%s\n", ! version.feature_set, ul_sfx); Fprintf(ofp,"#define VERSION_SANITY1 0x%08lx%s\n", ! version.entity_count, ul_sfx); Fprintf(ofp,"#define VERSION_SANITY2 0x%08lx%s\n", version.struct_sizes, ul_sfx); Fprintf(ofp,"\n"); *** Old/util/panic.c Tue Dec 10 16:46:38 1996 --- util/panic.c Mon Oct 21 22:14:18 1996 *************** *** 10,21 **** #define NEED_VARARGS #include "config.h" - #ifdef MICRO - #undef exit - # if !defined(MSDOS) && !defined(WIN32) - extern void FDECL(exit, (int)); - # endif - #endif #ifdef AZTEC #define abort() exit() #endif --- 10,15 ---- *** Old/util/recover.c Tue Dec 10 16:46:40 1996 --- util/recover.c Mon Oct 21 22:14:19 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)recover.c 3.2 95/05/19 */ /* Copyright (c) Janet Walz, 1992. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)recover.c 3.2 96/06/22 */ /* Copyright (c) Janet Walz, 1992. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 12,27 **** #include #endif ! #ifndef VMS ! # ifdef exit ! # undef exit ! # endif ! #ifdef MICRO ! # if !defined(MSDOS) && !defined(WIN32) ! extern void FDECL(exit, (int)); ! # endif ! #endif ! #else /* VMS */ extern int FDECL(vms_creat, (const char *,unsigned)); extern int FDECL(vms_open, (const char *,int,unsigned)); #endif /* VMS */ --- 12,18 ---- #include #endif ! #ifdef VMS extern int FDECL(vms_creat, (const char *,unsigned)); extern int FDECL(vms_open, (const char *,int,unsigned)); #endif /* VMS */ *************** *** 192,198 **** int gfd, lfd, sfd; int lev, savelev, hpid; xchar levc; ! long version_info[3]; /* level 0 file contains: * pid of creating process (ignored here) --- 183,189 ---- int gfd, lfd, sfd; int lev, savelev, hpid; xchar levc; ! struct version_info version_data; /* level 0 file contains: * pid of creating process (ignored here) *************** *** 223,230 **** } if ((read(gfd, (genericptr_t) savename, sizeof savename) != sizeof savename) || ! (read(gfd, (genericptr_t) version_info, sizeof version_info) ! != sizeof version_info)) { Fprintf(stderr, "Error reading %s -- can't recover.\n", lock); Close(gfd); return(-1); --- 214,221 ---- } if ((read(gfd, (genericptr_t) savename, sizeof savename) != sizeof savename) || ! (read(gfd, (genericptr_t) &version_data, sizeof version_data) ! != sizeof version_data)) { Fprintf(stderr, "Error reading %s -- can't recover.\n", lock); Close(gfd); return(-1); *************** *** 251,258 **** return(-1); } ! if (write(sfd, (genericptr_t) version_info, sizeof version_info) ! != sizeof version_info) { Fprintf(stderr, "Error writing %s; recovery failed.\n", savename); Close(gfd); Close(sfd); --- 242,249 ---- return(-1); } ! if (write(sfd, (genericptr_t) &version_data, sizeof version_data) ! != sizeof version_data) { Fprintf(stderr, "Error writing %s; recovery failed.\n", savename); Close(gfd); Close(sfd); *** Old/sys/amiga/Build.ami Tue Dec 10 16:46:43 1996 --- sys/amiga/Build.ami Tue Nov 5 17:22:00 1996 *************** *** 1,6 **** Compiling Amiga NetHack 3.2 ! Last Revision: 9 March 1996 for NetHack 3.2.0 We would like to thank each and every one of the people who took --- 1,6 ---- Compiling Amiga NetHack 3.2 ! Last Revision: 5 November 1996 for NetHack 3.2.2 We would like to thank each and every one of the people who took *** Old/sys/amiga/Install.ami Tue Dec 10 16:46:47 1996 --- sys/amiga/Install.ami Tue Nov 5 17:22:00 1996 *************** *** 2,21 **** Using and Installing Amiga NetHack 3.2 (or Everything You Never Wanted to Know Before NetHacking) ! Last Revision: 2 March 1996 for NetHack 3.2.0 ! 0. Pre-intro for NetHack 3.2.0 ! Amiga-specific changes for 3.2.0: ! Tile (graphics images) support. ! Repackaged support files (see the DLB man page). ! Improved TTY/BBS mode. ! New option: altmeta. ! New option: fast_map. ! ! And the bad news: HackWB is not supported in 3.2.0 - we hope to have it ! ready for 3.2.1. Our apologies - please use HackCli to start the game. ! We would like to thank each and every one of the people who took the time and effort to report bugs to us. THANK YOU! --- 2,17 ---- Using and Installing Amiga NetHack 3.2 (or Everything You Never Wanted to Know Before NetHacking) ! Last Revision: 5 November 1996 for NetHack 3.2.2 ! 0. Pre-intro for NetHack 3.2.2: ! Amiga-specific changes for 3.2.2: ! Some (but not all) known bugs fixed (volunteers welcome). ! Some HackWB bugs fixed - if it works for you, great. If not, ! please use HackCli. ! The bug giving wierd usernames is fixed. ! We would like to thank each and every one of the people who took the time and effort to report bugs to us. THANK YOU! *************** *** 62,69 **** II. Using Amiga NetHack 3.2 The short version: from the WorkBench click on HackWB and from the ! CLI invoke HackCli. (For 3.2.0 HackWB is not included - please use ! HackCli.) II.A. Sources of Information Where to go depends on what you want to find out. If you want to find --- 58,64 ---- II. Using Amiga NetHack 3.2 The short version: from the WorkBench click on HackWB and from the ! CLI invoke HackCli. II.A. Sources of Information Where to go depends on what you want to find out. If you want to find *************** *** 77,84 **** ManPage and in section II.C. II.B. The Amiga NetHack WorkBench Front End ! 3.2.0 does not include HackWB; it is expected to return in the next ! patch release. Please ignore this section until then. The Amiga NetHack WorkBench Front End, HackWB, looks more or less like a WorkBench Drawer - and acts the same way. Games start with double clicks --- 72,79 ---- ManPage and in section II.C. II.B. The Amiga NetHack WorkBench Front End ! 3.2.2 once again includes HackWB; it is better than it was, but is still ! buggy in some cases. The Amiga NetHack WorkBench Front End, HackWB, looks more or less like a WorkBench Drawer - and acts the same way. Games start with double clicks *************** *** 177,186 **** Find the space cd to wherever you want to install NetHack make a new directory to be the main NetHack directory: ! makedir NH320 ! makedir NH320/NetHack ! makedir NH320/HackExe ! makedir NH320/HackExe2 In S:User-Startup (under 2.0 or later) or S:Startup-Sequence (under 1.3): assign NetHack: to the NetHack directory you created above. --- 172,181 ---- Find the space cd to wherever you want to install NetHack make a new directory to be the main NetHack directory: ! makedir NH322 ! makedir NH322/NetHack ! makedir NH322/HackExe ! makedir NH322/HackExe2 In S:User-Startup (under 2.0 or later) or S:Startup-Sequence (under 1.3): assign NetHack: to the NetHack directory you created above. *************** *** 190,199 **** Cd to the appropriate places then unpack the files: Archive 1 (the one this ReadMe came in), should be unpacked into NetHack: ! cd NH320: lz x NH32P0-1.lzh Archive 2 unpacks in two sections to two different places. ! cd NH320: lz x NH32P0-2.lzh HackExe/#? lz x NH32P0-2.lzh HackExe2/#? --- 185,194 ---- Cd to the appropriate places then unpack the files: Archive 1 (the one this ReadMe came in), should be unpacked into NetHack: ! cd NH322: lz x NH32P0-1.lzh Archive 2 unpacks in two sections to two different places. ! cd NH322: lz x NH32P0-2.lzh HackExe/#? lz x NH32P0-2.lzh HackExe2/#? *** Old/sys/amiga/amidos.c Tue Dec 10 16:47:01 1996 --- sys/amiga/amidos.c Tue Nov 5 17:22:01 1996 *************** *** 458,464 **** */ #undef exit void ! msexit(code) { #ifdef CHDIR extern char orgdir[]; --- 458,464 ---- */ #undef exit void ! nethack_exit(code) { #ifdef CHDIR extern char orgdir[]; *** Old/sys/amiga/amidos.p Tue Dec 10 16:47:04 1996 --- sys/amiga/amidos.p Tue Nov 5 17:22:01 1996 *************** *** 31,43 **** #ifndef msmsg void FDECL(msmsg, ( const char *, ... )); #endif - #if 0 - FILE *FDECL(fopenp, (const char * , const char *)); - #endif #if !defined(__SASC_60) && !defined(_DCC) int FDECL(chdir, (char *)); #endif - void FDECL(msexit, (int )); #ifndef strcmpi int FDECL(strcmpi, (char * , char *)); #endif --- 31,39 ---- *** Old/sys/amiga/amitty.c Tue Dec 10 16:47:25 1996 --- sys/amiga/amitty.c Mon Jun 17 18:34:19 1996 *************** *** 29,35 **** void settty(const char *s){ end_screen(); if(s)raw_print(s); ! flags.cbreak=ON; /* this is too easy: probably wrong */ #if 1 /* should be version>=36 */ /* if(IsInteractive(afh_in)){ */ SetMode(afh_in,0); /* con mode */ --- 29,35 ---- void settty(const char *s){ end_screen(); if(s)raw_print(s); ! iflags.cbreak=ON; /* this is too easy: probably wrong */ #if 1 /* should be version>=36 */ /* if(IsInteractive(afh_in)){ */ SetMode(afh_in,0); /* con mode */ *************** *** 44,50 **** #endif } void setftty(){ ! flags.cbreak=ON; /* ditto */ } char kill_char='X'-'@'; char erase_char='\b'; --- 44,50 ---- #endif } void setftty(){ ! iflags.cbreak=ON; /* ditto */ } char kill_char='X'-'@'; char erase_char='\b'; *** Old/sys/amiga/amiwbench.c Tue Dec 10 16:47:28 1996 --- sys/amiga/amiwbench.c Tue Nov 5 17:22:01 1996 *************** *** 291,297 **** case ' ': case '-': break; #ifdef NEWS ! case 'n': flags.news = FALSE; #endif case 'D': # ifdef WIZARD --- 291,297 ---- case ' ': case '-': break; #ifdef NEWS ! case 'n': iflags.news = FALSE; #endif case 'D': # ifdef WIZARD *************** *** 604,610 **** } prscore(ac+1,av); free( av ); ! exit(0); /* #defined to msexit() */ } static --- 604,610 ---- } prscore(ac+1,av); free( av ); ! nethack_exit(0); } static *** Old/sys/amiga/amiwind.c Tue Dec 10 16:47:30 1996 --- sys/amiga/amiwind.c Mon Jun 17 19:21:51 1996 *************** *** 271,283 **** if (length == 1) { /* Plain ASCII character */ length = buffer[0]; /* ! * If flags.num_pad is set, movement is by 4286. * If not set, translate 4286 into hjkl. * This way, the numeric pad can /always/ be used * for moving, though best results are when it is off. */ arrow: ! if (!flags.num_pad && numeric_pad && length >= '1' && length <= '9') { length -= '1'; if (control) { length = ctrl_numpad[length]; --- 271,283 ---- if (length == 1) { /* Plain ASCII character */ length = buffer[0]; /* ! * If iflags.num_pad is set, movement is by 4286. * If not set, translate 4286 into hjkl. * This way, the numeric pad can /always/ be used * for moving, though best results are when it is off. */ arrow: ! if (!iflags.num_pad && numeric_pad && length >= '1' && length <= '9') { length -= '1'; if (control) { length = ctrl_numpad[length]; *** Old/sys/amiga/wb.c Tue Dec 10 16:48:21 1996 --- sys/amiga/wb.c Tue Sep 24 20:36:56 1996 *************** *** 2771,2777 **** /* The character class of the player */ itext[ 0 ].IText = ToolsEntry( gptr, "CHARACTER" ); ! if( itext[ i ].IText == NULL || *itext[ 0 ].IText == 0 ) { itext[ 0 ].IText = players[ 0 ]; SetToolLine( gptr, "CHARACTER", "" ); --- 2771,2779 ---- /* The character class of the player */ itext[ 0 ].IText = ToolsEntry( gptr, "CHARACTER" ); ! ! /* DCF - Changed "itext[ i ].IText == NULL" to "itext[ 0 ].Itext == NULL" */ ! if( itext[ 0 ].IText == NULL || *itext[ 0 ].IText == 0 ) { itext[ 0 ].IText = players[ 0 ]; SetToolLine( gptr, "CHARACTER", "" ); *** Old/sys/amiga/wbcli.c Tue Dec 10 16:48:27 1996 --- sys/amiga/wbcli.c Tue Sep 24 20:36:57 1996 *************** *** 55,69 **** void s_UnLoadSeg(void); void append_slash(char *); #ifdef CLI char *cnfsavedir="NetHack:save"; /* unless overridden in cnf file */ char argline[255]; /* no overflow - bigger than ADOS will pass */ - int amibbs=0; /* BBS mode flag */ void WaitEOG(GPTR); char *eos(char *); void condaddslash(char *); # ifdef SPLIT int running_split=0; /* if 0, using normal LoadSeg/UnLoadSeg */ # endif --- 55,75 ---- void s_UnLoadSeg(void); void append_slash(char *); + /*DCF - GetWBIcon() needs these to be available in both WB and CLI modes */ + int amibbs=0; /* BBS mode flag */ + char *bbsuid=NULL; /* Unique user identifier for bbs mode. */ + #ifdef CLI char *cnfsavedir="NetHack:save"; /* unless overridden in cnf file */ char argline[255]; /* no overflow - bigger than ADOS will pass */ void WaitEOG(GPTR); char *eos(char *); void condaddslash(char *); + /*DCF - Copies NewGame.info to new game. */ + void CopyGameIcon(char *desticon); + # ifdef SPLIT int running_split=0; /* if 0, using normal LoadSeg/UnLoadSeg */ # endif *************** *** 147,152 **** --- 153,161 ---- if (argc>1 && argv[1][0]==':'){ amibbs=1; sprintf(newcmdline,":%08x %08x ;%s ",Input(),Output(),&argv[1][1]); + + /* DCF - Set BBS mode user identifier */ + bbsuid = &argv[1][1]; argv++;argc--; } *************** *** 192,202 **** #ifdef TESTCMDLINE __builtin_printf("sending '%s'\n",argline); #else strcpy(namebuf,cnfsavedir); append_slash(namebuf); ! if(!name)name="NewGame.info"; ! strcat(namebuf,name); lc=Lock(namebuf,ACCESS_READ); if(!lc){ dirname="NetHack:"; strcpy(namebuf,dirname); --- 201,242 ---- #ifdef TESTCMDLINE __builtin_printf("sending '%s'\n",argline); #else + /* DCF - If the user provided a name, try to get the icon for this + * game. If there is no icon, try to find the NewGame.info + * icon and copy it to match the appropriate name. + */ strcpy(namebuf,cnfsavedir); append_slash(namebuf); ! ! /* DAN - In BBS mode, prepend the bbsuid on the front of the player ! * name. This will make the icon match the format used by the ! * Nethack executable when saving the game. ! */ ! ! if ((amibbs) && (bbsuid)) ! { ! strcat(namebuf,bbsuid); ! strcat(namebuf,"_"); ! } ! ! if(!name) ! strcat(namebuf,"NewGame"); ! else ! strcat(namebuf,name); ! ! strcat(namebuf,".info"); ! lc=Lock(namebuf,ACCESS_READ); + + if (!lc) /* && name) */ + { + /* If no icon found, this is probably a new game. Build a new + * icon for the game based on the NewGame.info. */ + + CopyGameIcon(namebuf); /* copies the NewGame.info to namebuf */ + lc = Lock(namebuf,ACCESS_READ); + } + if(!lc){ dirname="NetHack:"; strcpy(namebuf,dirname); *************** *** 1335,1340 **** --- 1375,1383 ---- register char *t; register GPTR gptr; + /* DCF */ + char *bbsptr=NULL; + if( ( gptr = AllocGITEM( ) ) == NULL ) goto noitems; *************** *** 1354,1360 **** } gptr->name = xmalloc(strlen(finfo->fib_FileName)+1+9); ! sprintf(gptr->name,"%s_%08x",finfo->fib_FileName,FindTask(0)); /* If removed .info, put it back */ --- 1397,1424 ---- } gptr->name = xmalloc(strlen(finfo->fib_FileName)+1+9); ! ! /* DCF - This is wrong: ! * sprintf(gptr->name,"%s_%08x",finfo->fib_FileName,FindTask(0)); ! * ! * We don't want to append the taskID, we want to append the ! * unique user identifier passed to the cmd line in BBS mode. ! * if one is not available, (i.e. we are not in BBS mode), ! * then only use the player name (or "NewGame" if not given) ! * with no additions. ! */ ! ! if(amibbs) ! { ! /* BBS names are of the form _ */ ! /* e.g.: SYSOP_SuperHacker */ ! ! bbsptr = strstr(finfo->fib_FileName,"_"); ! ++bbsptr; ! strcpy(gptr->name,bbsptr); ! } ! else ! strcpy(gptr->name,finfo->fib_FileName); /* If removed .info, put it back */ *************** *** 1994,1996 **** --- 2058,2118 ---- } #endif } + + /* DCF - This copies the NewGame.info file to the specified filename. + * Used to make an icon for a new game. + */ + + #ifdef CLI + void CopyGameIcon(char *desticon) + { + BPTR in,out; + char *filen=NULL; + struct FileInfoBlock *fib=NULL; + UBYTE *buf=NULL; + + in = Open("Nethack:NewGame.info", MODE_OLDFILE); + if (!in) + { + filen = xmalloc(strlen(cnfsavedir)+15); + if (filen) + { + strcat(filen,"/NewGame.info"); + /* Try the save dir. */ + in = Open(filen,MODE_OLDFILE); + free(filen); + if (!in) + { + return; /* failed. Oh well. */ + } + } + else + return; /* No memory */ + } + + out = Open(desticon,MODE_NEWFILE); + if (!out) + { + /* Should print error: can't copy icon */ + Close(in); + in = NULL; + return; + } + else + { + /* Copy the file. */ + fib = (struct FileInfoBlock *) AllocDosObject(DOS_FIB,TAG_DONE); + ExamineFH(in,fib); + buf = xmalloc (fib->fib_Size); + FRead(in,buf,fib->fib_Size,1); + Close(in); + FWrite(out,buf,fib->fib_Size,1); + free(buf); + Close(out); + FreeDosObject(DOS_FIB,fib); + } + } + + #endif /* CLI */ + + *** Old/sys/amiga/winchar.c Tue Dec 10 16:48:57 1996 --- sys/amiga/winchar.c Mon Jun 17 18:34:20 1996 *************** *** 889,896 **** /* * Set the mode, and be done with it */ ! usecolor = flags.use_color; ! flags.use_color = FALSE; cw->wflags |= FLMAP_INGLYPH; } --- 889,896 ---- /* * Set the mode, and be done with it */ ! usecolor = iflags.use_color; ! iflags.use_color = FALSE; cw->wflags |= FLMAP_INGLYPH; } *************** *** 917,923 **** /* * Clean up whatever is left in the buffer */ ! flags.use_color = usecolor; /* * Reset internal data structs --- 917,923 ---- /* * Clean up whatever is left in the buffer */ ! iflags.use_color = usecolor; /* * Reset internal data structs *************** *** 1181,1188 **** /* * Set the mode, and be done with it */ ! usecolor = flags.use_color; ! flags.use_color = FALSE; cw->wflags |= FLMAP_INGLYPH; } #endif /* !TESTING */ --- 1181,1188 ---- /* * Set the mode, and be done with it */ ! usecolor = iflags.use_color; ! iflags.use_color = FALSE; cw->wflags |= FLMAP_INGLYPH; } #endif /* !TESTING */ *************** *** 1211,1217 **** /* * Clean up whatever is left in the buffer */ ! flags.use_color = usecolor; /* * Reset internal data structs --- 1211,1217 ---- /* * Clean up whatever is left in the buffer */ ! iflags.use_color = usecolor; /* * Reset internal data structs *** Old/sys/amiga/winfuncs.c Tue Dec 10 16:49:05 1996 --- sys/amiga/winfuncs.c Mon Oct 21 22:09:29 1996 *************** *** 290,296 **** int maph; maph = ( 22 * mxsize ) + HackScreen->WBorTop + ! HackScreen->WBorBottom + TextsFont->tf_YSize + 1 + 1; if( WIN_STATUS != WIN_ERR && amii_wins[ WIN_STATUS ] ) stwin = amii_wins[ WIN_STATUS ]->win; --- 290,296 ---- int maph; maph = ( 22 * mxsize ) + HackScreen->WBorTop + ! HackScreen->WBorBottom + HackFont->tf_YSize + 1 + 1; if( WIN_STATUS != WIN_ERR && amii_wins[ WIN_STATUS ] ) stwin = amii_wins[ WIN_STATUS ]->win; *************** *** 650,663 **** case NHW_MESSAGE: SetMenuStrip(w, HackMenu); if( WINVERS_AMIV ) ! if(flags.msg_history<20)flags.msg_history=20; else ! if(flags.msg_history<40)flags.msg_history=40; ! if(flags.msg_history>400)flags.msg_history=400; ! flags.window_inited=TRUE; ! wd->data = (char **)alloc( flags.msg_history*sizeof( char * ) ); ! memset( wd->data, 0, flags.msg_history * sizeof( char * ) ); wd->maxrow = wd->maxcol = 0; /* Indicate that we have not positioned the cursor yet */ wd->curx = -1; --- 650,663 ---- case NHW_MESSAGE: SetMenuStrip(w, HackMenu); if( WINVERS_AMIV ) ! if(iflags.msg_history<20)iflags.msg_history=20; else ! if(iflags.msg_history<40)iflags.msg_history=40; ! if(iflags.msg_history>400)iflags.msg_history=400; ! iflags.window_inited=TRUE; ! wd->data = (char **)alloc( iflags.msg_history*sizeof( char * ) ); ! memset( wd->data, 0, iflags.msg_history * sizeof( char * ) ); wd->maxrow = wd->maxcol = 0; /* Indicate that we have not positioned the cursor yet */ wd->curx = -1; *************** *** 1685,1691 **** if( window == WIN_ERR || ( cw = amii_wins[window] ) == NULL ) { ! flags.window_inited=0; panic(winpanicstr,window, "cursor_off"); } --- 1685,1691 ---- if( window == WIN_ERR || ( cw = amii_wins[window] ) == NULL ) { ! iflags.window_inited=0; panic(winpanicstr,window, "cursor_off"); } *************** *** 1749,1755 **** if( window == WIN_ERR || ( cw = amii_wins[window] ) == NULL ) { /* tty does this differently - is this OK? */ ! flags.window_inited=0; panic(winpanicstr,window, "cursor_on"); } --- 1749,1755 ---- if( window == WIN_ERR || ( cw = amii_wins[window] ) == NULL ) { /* tty does this differently - is this OK? */ ! iflags.window_inited=0; panic(winpanicstr,window, "cursor_on"); } *************** *** 1927,1940 **** else /* AMII, or Rogue level in either version */ { #ifdef TEXTCOLOR ! #define zap_color(n) color = flags.use_color ? zapcolors[n] : NO_COLOR ! #define cmap_color(n) color = flags.use_color ? defsyms[n].color : NO_COLOR ! #define obj_color(n) color = flags.use_color ? objects[n].oc_color : NO_COLOR ! #define mon_color(n) color = flags.use_color ? mons[n].mcolor : NO_COLOR ! #define pet_color(n) color = flags.use_color ? mons[n].mcolor : \ /* If no color, try to hilite pets; black */ \ /* should be HI */ \ ! ((flags.hilite_pet) ? CLR_BLACK : NO_COLOR) # else /* no text color */ --- 1927,1940 ---- else /* AMII, or Rogue level in either version */ { #ifdef TEXTCOLOR ! #define zap_color(n) color = iflags.use_color ? zapcolors[n] : NO_COLOR ! #define cmap_color(n) color = iflags.use_color ? defsyms[n].color : NO_COLOR ! #define obj_color(n) color = iflags.use_color ? objects[n].oc_color : NO_COLOR ! #define mon_color(n) color = iflags.use_color ? mons[n].mcolor : NO_COLOR ! #define pet_color(n) color = iflags.use_color ? mons[n].mcolor : \ /* If no color, try to hilite pets; black */ \ /* should be HI */ \ ! ((iflags.hilite_pet) ? CLR_BLACK : NO_COLOR) # else /* no text color */ *** Ols/sys/amiga/winmenu.c Tue Dec 10 16:49:13 1996 --- sys/amiga/winmenu.c Thu Jun 27 11:49:31 1996 *************** *** 68,74 **** { register struct amii_WinDesc *cw; amii_menu_item *mip; ! char buf[ QBUFSZ ]; if(str == NULL)return; --- 68,74 ---- { register struct amii_WinDesc *cw; amii_menu_item *mip; ! char buf[ BUFSZ ]; if(str == NULL)return; *** Old/sys/amiga/winreq.c Tue Dec 10 16:49:18 1996 --- sys/amiga/winreq.c Thu Jun 27 11:49:32 1996 *************** *** 1139,1148 **** { int i; char s[ 10 ]; ! static char buf[ 100 ]; *buf = 0; ! for( i = 0; i < amii_numcolors; ++i ) { sprintf( s, "%s%03lx", i ? "/" : "", (long)flags.amii_curmap[ i ] ); strcat( buf, s ); --- 1139,1148 ---- { int i; char s[ 10 ]; ! static char buf[ BUFSZ ]; *buf = 0; ! for( i = 0; i < min(32,amii_numcolors); ++i ) { sprintf( s, "%s%03lx", i ? "/" : "", (long)flags.amii_curmap[ i ] ); strcat( buf, s ); *** Old/sys/amiga/winstr.c Tue Dec 10 16:49:22 1996 --- sys/amiga/winstr.c Mon Jun 17 18:34:21 1996 *************** *** 31,37 **** if( window == WIN_ERR || ( cw = amii_wins[window] ) == NULL ) { ! flags.window_inited=0; panic(winpanicstr,window, "putstr"); } --- 31,37 ---- if( window == WIN_ERR || ( cw = amii_wins[window] ) == NULL ) { ! iflags.window_inited=0; panic(winpanicstr,window, "putstr"); } *************** *** 90,104 **** } /* If used all of history lines, move them down */ ! if( cw->maxrow >= flags.msg_history ) { if( cw->data[ 0 ] ) free( cw->data[ 0 ] ); memcpy( cw->data, &cw->data[ 1 ], ! ( flags.msg_history - 1 ) * sizeof( char * ) ); ! cw->data[ flags.msg_history - 1 ] = (char *) alloc( strlen( toplines ) + 5 ); ! strcpy( cw->data[ i = flags.msg_history - 1 ] + SOFF + (scrollmsg!=0), toplines ); } else --- 90,104 ---- } /* If used all of history lines, move them down */ ! if( cw->maxrow >= iflags.msg_history ) { if( cw->data[ 0 ] ) free( cw->data[ 0 ] ); memcpy( cw->data, &cw->data[ 1 ], ! ( iflags.msg_history - 1 ) * sizeof( char * ) ); ! cw->data[ iflags.msg_history - 1 ] = (char *) alloc( strlen( toplines ) + 5 ); ! strcpy( cw->data[ i = iflags.msg_history - 1 ] + SOFF + (scrollmsg!=0), toplines ); } else *** Old/sys/atari/tos.c Tue Dec 10 16:50:01 1996 --- sys/atari/tos.c Mon Jun 17 18:34:16 1996 *************** *** 32,38 **** char ch; /* BIOSgetch can use the numeric key pad on IBM compatibles. */ ! if (flags.BIOS) ch = BIOSgetch(); else ch = DOSgetch(); --- 32,38 ---- char ch; /* BIOSgetch can use the numeric key pad on IBM compatibles. */ ! if (iflags.BIOS) ch = BIOSgetch(); else ch = DOSgetch(); *************** *** 50,56 **** /* * Keypad keys are translated to the normal values below. ! * When flags.BIOS is active, shifted keypad keys are translated to the * shift values below. */ static const struct pad { --- 50,56 ---- /* * Keypad keys are translated to the normal values below. ! * When iflags.BIOS is active, shifted keypad keys are translated to the * shift values below. */ static const struct pad { *************** *** 137,143 **** /* Translate keypad keys */ if (iskeypad(scan)) { ! kpad = flags.num_pad ? numpad : keypad; if (shift & SHIFT) ch = kpad[scan - KEYPADLO].shift; else if (shift & CTRL) --- 137,143 ---- /* Translate keypad keys */ if (iskeypad(scan)) { ! kpad = iflags.num_pad ? numpad : keypad; if (shift & SHIFT) ch = kpad[scan - KEYPADLO].shift; else if (shift & CTRL) *************** *** 299,310 **** { static char colorHE[] = "\033q\033b0"; ! if (!flags.BIOS) return; init_aline(); tos_numcolors = 1 << (((unsigned char *) _a_line)[1]); if (tos_numcolors <= 2) { /* mono */ ! flags.use_color = FALSE; return; } else { colors_changed = TRUE; --- 299,310 ---- { static char colorHE[] = "\033q\033b0"; ! if (!iflags.BIOS) return; init_aline(); tos_numcolors = 1 << (((unsigned char *) _a_line)[1]); if (tos_numcolors <= 2) { /* mono */ ! iflags.use_color = FALSE; return; } else { colors_changed = TRUE; *** Old/sys/be/README Tue Dec 10 16:50:04 1996 --- sys/be/README Mon Nov 25 17:42:55 1996 *************** *** 1,8 **** This file is sys/be/README. It is for those intending to compile ! NetHack 3.2.1 on a BeBox running BeOS 1.1d7. An actual game ! has never been run due to the (current) lack of an uncrippled ! linker. ! BeBox NetHack currently only supports the TTY windowing system. In order to compile it, it would benefit you greatly to think of your Be --- 1,5 ---- This file is sys/be/README. It is for those intending to compile ! NetHack 3.2.2 on a BeBox running BeOS 1.1d8. BeBox NetHack currently only supports the TTY windowing system. In order to compile it, it would benefit you greatly to think of your Be *************** *** 13,23 **** suggest you avoid it for now. Let the Unix Makefiles take care of all that for you. - From a freshly unpacked source tree: ! 1. Copy the Makfiles in sys/unix to their proper spots. If you ! don't know what they are, read sys/unix/Install.unx. 2. Edit src/Makefile: o Change System to SysBe. --- 10,40 ---- suggest you avoid it for now. Let the Unix Makefiles take care of all that for you. + Suggestions: + + Set your tty window to be at least 80x24. NetHack + + Change the font to Courier New (or Courier New Bold) and set the font + size to be larger. The font size will not change for Kate. + + Known problems: + + No special characters for walls. None of the fonts available for use + in a tty window has the graphics characters needed to improve the look. + If such a font existed, then all you need to do is set the dungeon, + object, and/or monter mappings in your defaults file. + + NetHack is supposed to recognize that the background of the window is + white and change itself accordingly. It doesn't and makes the assumption + that the background is black. This is annoying, but playable. + It may be that the correct code sequence is being executed -- its hard + to tell in that particular file. A couple of combinations have been + tried, with no success. + + The arrow keys don't work. + ! Build instructions. From a freshly unpacked source tree: ! ! 1. Copy the Makfiles in sys/unix to their proper spots. You can ! use setup.sh or copy them by hand. It may be helpful to read ! sys/unix/Install.unx. 2. Edit src/Makefile: o Change System to SysBe. *************** *** 35,46 **** 4. Edit include/config.h to change HACKDIR to be the location of your install directory. You may want to uncomment the DLB define. ! 5. Edit Makefile and change GAMEDIR to match HACKDIR in include/config.h. ! Make sure the path to GAMEDIR exists. 6. Type make install at the top level. ! It is quite likely that some necessary steps needed to make the ! game have been omitted. Feel free to ad-lib as necessary. --- 52,65 ---- 4. Edit include/config.h to change HACKDIR to be the location of your install directory. You may want to uncomment the DLB define. ! 5. Edit top level Makefile and change GAMEDIR to match HACKDIR in ! include/config.h. Make sure the path to GAMEDIR exists. Change ! SHELLDIR to a "throw away" directory, like /tmp. We don't use the ! shell. 6. Type make install at the top level. ! It is possible that some necessary steps needed to make the game have been ! omitted. Feel free to ad-lib as necessary. *** Old/sys/be/bemain.c Tue Dec 10 16:50:07 1996 --- sys/be/bemain.c Sun Oct 27 19:33:04 1996 *************** *** 1,15 **** ! /* SCCS Id: @(#)bemain.c 3.2 96/05/23 */ /* Copyright (c) Dean Luick, 1996. */ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" static void whoami(void); static void process_options(int argc, char **argv); static void chdirx(const char *dir, boolean wr); ! int main(int argc, char **argv) { int fd; char *dir; --- 1,25 ---- ! /* SCCS Id: @(#)bemain.c 3.2 96/10/25 */ /* Copyright (c) Dean Luick, 1996. */ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" + #include "dlb.h" + #include static void whoami(void); static void process_options(int argc, char **argv); static void chdirx(const char *dir, boolean wr); + static void getlock(void); + + #ifdef __begui__ + #define MAIN nhmain + int nhmain(int argc, char **argv); + #else + #define MAIN main + #endif ! int MAIN(int argc, char **argv) { int fd; char *dir; *************** *** 44,54 **** /* again if suffix was whole name */ /* accepts any suffix */ ! //Sprintf(lock,"%d%s", getuid(), plname) ; ! //getlock() ; ! //dlb_init(); /* must be before newgame() */ /* * Initialization of the boundaries of the mazes --- 54,64 ---- /* again if suffix was whole name */ /* accepts any suffix */ ! Sprintf(lock,"%d%s", getuid(), plname); ! getlock(); ! dlb_init(); /* must be before newgame() */ /* * Initialization of the boundaries of the mazes *************** *** 77,85 **** boolean remember_wiz_mode = wizard; #endif #ifdef NEWS ! if(flags.news) { display_file(NEWS, FALSE); ! flags.news = FALSE; /* in case dorecover() fails */ } #endif pline("Restoring save file..."); --- 87,95 ---- boolean remember_wiz_mode = wizard; #endif #ifdef NEWS ! if(iflags.news) { display_file(NEWS, FALSE); ! iflags.news = FALSE; /* in case dorecover() fails */ } #endif pline("Restoring save file..."); *************** *** 173,179 **** break; #ifdef NEWS case 'n': ! flags.news = FALSE; break; #endif case 'u': --- 183,189 ---- break; #ifdef NEWS case 'n': ! iflags.news = FALSE; break; #endif case 'u': *************** *** 211,223 **** } /* ! * This is pretty useless now, but will be needed when we add the Be GUI. ! * When that happens, the main nethack code will run in its own thread. ! * If the main code exits we must catch this and kill the GUI threads. */ void nethack_exit(int status); void nethack_exit(int status) { exit(status); } --- 221,255 ---- } + void + getlock(void) + { + int fd; + + regularize(lock); + set_levelfile_name(lock, 0); + fd = creat(lock, FCMASK); + if(fd == -1) { + error("cannot creat lock file."); + } else { + if(write(fd, (genericptr_t) &hackpid, sizeof(hackpid)) + != sizeof(hackpid)){ + error("cannot write lock"); + } + if(close(fd) == -1) { + error("cannot close lock"); + } + } + } + + #ifndef __begui__ /* ! * If we are not using the Be GUI, then just exit -- we don't need to ! * do anything extra. */ void nethack_exit(int status); void nethack_exit(int status) { exit(status); } + #endif /* !__begui__ */ *** Old/sys/mac/MacHelp Tue Dec 10 16:50:13 1996 --- sys/mac/MacHelp Mon Dec 9 17:31:54 1996 *************** *** 5,11 **** and so on, should be addressed to: To: nethack-bugs@linc.cis.upenn.edu ! Subject: Mac NetHack 3.1 Please include your machine-type, system software version and other relevant information (i.e. system extensions, monitor, accelerators --- 5,11 ---- and so on, should be addressed to: To: nethack-bugs@linc.cis.upenn.edu ! Subject: Mac NetHack 3.2 Please include your machine-type, system software version and other relevant information (i.e. system extensions, monitor, accelerators *** Old/sys/mac/dprintf.c Tue Dec 10 16:50:34 1996 --- sys/mac/dprintf.c Mon Jun 17 18:34:28 1996 *************** *** 37,43 **** doit = 0; if ( macFlags.hasDebugger && KeyDown ( 0x39 ) ) { /* Caps Lock */ doit = DO_DEBUGSTR ; ! } else if ( KeyDown ( 0x3B ) && flags . window_inited && /* Control */ ( WIN_MESSAGE != -1 ) && theWindows [ WIN_MESSAGE ] . theWindow ) { doit = DO_PLINE ; } --- 37,43 ---- doit = 0; if ( macFlags.hasDebugger && KeyDown ( 0x39 ) ) { /* Caps Lock */ doit = DO_DEBUGSTR ; ! } else if ( KeyDown ( 0x3B ) && iflags . window_inited && /* Control */ ( WIN_MESSAGE != -1 ) && theWindows [ WIN_MESSAGE ] . theWindow ) { doit = DO_PLINE ; } *** Old/sys/mac/macmain.c Tue Dec 10 16:50:43 1996 --- sys/mac/macmain.c Mon Jun 17 18:34:28 1996 *************** *** 105,113 **** boolean remember_wiz_mode = wizard; #endif #ifdef NEWS ! if(flags.news) { display_file(NEWS, FALSE); ! flags.news = FALSE; /* in case dorecover() fails */ } #endif pline("Restoring save file..."); --- 105,113 ---- boolean remember_wiz_mode = wizard; #endif #ifdef NEWS ! if(iflags.news) { display_file(NEWS, FALSE); ! iflags.news = FALSE; /* in case dorecover() fails */ } #endif pline("Restoring save file..."); *************** *** 338,344 **** break; #ifdef NEWS case 'n': ! flags.news = FALSE; break; #endif case 'u': --- 338,344 ---- break; #ifdef NEWS case 'n': ! iflags.news = FALSE; break; #endif case 'u': *** Old/sys/mac/macmenu.c Tue Dec 10 16:50:46 1996 --- sys/mac/macmenu.c Mon Nov 25 17:43:34 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)macmenu.c 3.1 93/04/29 */ /* Copyright (c) Macintosh NetHack Port Team, 1993. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)macmenu.c 3.2 96/11/24 */ /* Copyright (c) Macintosh NetHack Port Team, 1993. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 455,462 **** GetDItem ( ( WindowPtr ) & dRec , etxtANWho , & kind , & item , & area ) ; SetIText ( item , pName ) ; if ( pName [ 0 ] > 2 && pName [ pName [ 0 ] - 1 ] == '-' ) { ! (*pANR).anMenu[anRole] = ( strchr ( (char *) uitmChar [ 0 ] , pName [ pName [ 0 ] ] ) - ! (char *) uitmChar [ 0 ] ) ; } } } --- 455,470 ---- GetDItem ( ( WindowPtr ) & dRec , etxtANWho , & kind , & item , & area ) ; SetIText ( item , pName ) ; if ( pName [ 0 ] > 2 && pName [ pName [ 0 ] - 1 ] == '-' ) { ! short role = (*pANR).anMenu[anRole]; ! char suffix = (char) pName[pName[0]], ! *choices = (char *) uitmChar[0], ! *sfxindx = strchr(choices, suffix); ! ! if (sfxindx) ! role = (short) (sfxindx - choices); ! else if (suffix == '@') ! role = (short) rn2((int) strlen(choices)); ! (*pANR).anMenu[anRole] = role; } } } *************** *** 597,604 **** GetIText ( item , ( * pANR ) . anWho ) ; BlockMove ( pANR -> anWho , pName , pANR -> anWho [ 0 ] + 1 ) ; if ( pName [ 0 ] > 2 && pName [ pName [ 0 ] - 1 ] == '-' ) { ! (*pANR).anMenu[anRole] = ( strchr ( (char *) uitmChar [ 0 ] , pName [ pName [ 0 ] ] ) - ! (char *) uitmChar [ 0 ] ) ; } } --- 605,620 ---- GetIText ( item , ( * pANR ) . anWho ) ; BlockMove ( pANR -> anWho , pName , pANR -> anWho [ 0 ] + 1 ) ; if ( pName [ 0 ] > 2 && pName [ pName [ 0 ] - 1 ] == '-' ) { ! short role = (*pANR).anMenu[anRole]; ! char suffix = (char) pName[pName[0]], ! *choices = (char *) uitmChar[0], ! *sfxindx = strchr(choices, suffix); ! ! if (sfxindx) ! role = (short) (sfxindx - choices); ! else if (suffix == '@') ! role = (short) rn2((int) strlen(choices)); ! (*pANR).anMenu[anRole] = role; } } *** Old/sys/mac/macwin.c Tue Dec 10 16:51:00 1996 --- sys/mac/macwin.c Mon Jun 17 18:34:30 1996 *************** *** 594,600 **** switch ( type ) { case NHW_MESSAGE : GetFNum ( "\pPSHackFont", & aWin -> fontNum ) ; ! aWin -> fontSize = flags.large_font ? 12 : 9 ; break ; default: aWin -> fontNum = text_wind_font ; --- 594,600 ---- switch ( type ) { case NHW_MESSAGE : GetFNum ( "\pPSHackFont", & aWin -> fontNum ) ; ! aWin -> fontSize = iflags.large_font ? 12 : 9 ; break ; default: aWin -> fontNum = text_wind_font ; *************** *** 693,699 **** Rect scr = (*GetGrayRgn())->rgnBBox; small_screen = scr.bottom - scr.top <= 9*40 || ! scr.bottom - scr.top <= 12*40 && flags.large_font; InitRes ( ) ; --- 693,699 ---- Rect scr = (*GetGrayRgn())->rgnBBox; small_screen = scr.bottom - scr.top <= 9*40 || ! scr.bottom - scr.top <= 12*40 && iflags.large_font; InitRes ( ) ; *************** *** 711,717 **** DimMenuBar ( ) ; tty_init_nhwindows(argcp, argv); ! flags.window_inited = TRUE; /* Some ugly hacks to make both interfaces happy */ mac_create_nhwindow(NHW_BASE); --- 711,717 ---- DimMenuBar ( ) ; tty_init_nhwindows(argcp, argv); ! iflags.window_inited = TRUE; /* Some ugly hacks to make both interfaces happy */ mac_create_nhwindow(NHW_BASE); *************** *** 849,855 **** switch ( ( ( WindowPeek ) theWindow ) -> windowKind - WIN_BASE_KIND ) { case NHW_MESSAGE : l = 0; ! while (aWin->lin > flags.msg_history) { const char cr = CHAR_CR; l = Munger(aWin->windowText, l, &cr, 1, nil, 0) + 1; --aWin->lin; --- 849,855 ---- switch ( ( ( WindowPeek ) theWindow ) -> windowKind - WIN_BASE_KIND ) { case NHW_MESSAGE : l = 0; ! while (aWin->lin > iflags.msg_history) { const char cr = CHAR_CR; l = Munger(aWin->windowText, l, &cr, 1, nil, 0) + 1; --aWin->lin; *************** *** 1302,1308 **** int kind , visible ; if ( win < 0 || win >= NUM_MACWINDOWS ) { ! if ( flags . window_inited ) error ( "Invalid window number %d (Max %d) in destroy_nhwindow." , win , NUM_MACWINDOWS ) ; return ; --- 1302,1308 ---- int kind , visible ; if ( win < 0 || win >= NUM_MACWINDOWS ) { ! if ( iflags . window_inited ) error ( "Invalid window number %d (Max %d) in destroy_nhwindow." , win , NUM_MACWINDOWS ) ; return ; *************** *** 1330,1336 **** return ; } if ( win == WIN_INVEN || win == WIN_MESSAGE ) { ! if ( flags . window_inited ) { if ( flags . tombstone && killer ) { /* Prepare for the coming of the tombstone window. */ mono_font ( ) ; --- 1330,1336 ---- return ; } if ( win == WIN_INVEN || win == WIN_MESSAGE ) { ! if ( iflags . window_inited ) { if ( flags . tombstone && killer ) { /* Prepare for the coming of the tombstone window. */ mono_font ( ) ; *************** *** 2089,2095 **** if ( cursor_locked ) dir = (char *)0 ; else { ! dir_bas = flags . num_pad ? (char *) ndir : (char *) sdir ; dir = strchr ( dir_bas , click_to_cmd ( where . h / nhw -> charWidth + 1 , where . v / nhw -> charHeight , CLICK_1 ) ) ; --- 2089,2095 ---- if ( cursor_locked ) dir = (char *)0 ; else { ! dir_bas = iflags . num_pad ? (char *) ndir : (char *) sdir ; dir = strchr ( dir_bas , click_to_cmd ( where . h / nhw -> charWidth + 1 , where . v / nhw -> charHeight , CLICK_1 ) ) ; *************** *** 2355,2361 **** NhWindow * aWin = GetNhWin(theWindow); if ( ! theEvent || TrackGoAway ( theWindow , theEvent -> where ) ) { ! if ( aWin - theWindows == BASE_WINDOW && ! flags . window_inited ) { AddToKeyQueue ( '\033' , 1 ) ; return ; } else { --- 2355,2361 ---- NhWindow * aWin = GetNhWin(theWindow); if ( ! theEvent || TrackGoAway ( theWindow , theEvent -> where ) ) { ! if ( aWin - theWindows == BASE_WINDOW && ! iflags . window_inited ) { AddToKeyQueue ( '\033' , 1 ) ; return ; } else { *************** *** 2389,2395 **** { EventRecord anEvent ; ! if ( ( inSelect == WIN_ERR && flags . window_inited && ! in_topl_mode ( ) ) == mBarDimmed ) if ( mBarDimmed ) { UndimMenuBar ( ) ; --- 2389,2395 ---- { EventRecord anEvent ; ! if ( ( inSelect == WIN_ERR && iflags . window_inited && ! in_topl_mode ( ) ) == mBarDimmed ) if ( mBarDimmed ) { UndimMenuBar ( ) ; *************** *** 2445,2451 **** int mac_nhgetch( void ) { int ch ; ! NhWindow * nhw = flags . window_inited ? theWindows + WIN_MAP : (NhWindow *) nil ; if ( theWindows ) { NhWindow * aWin = theWindows + WIN_MESSAGE ; --- 2445,2451 ---- int mac_nhgetch( void ) { int ch ; ! NhWindow * nhw = iflags . window_inited ? theWindows + WIN_MAP : (NhWindow *) nil ; if ( theWindows ) { NhWindow * aWin = theWindows + WIN_MESSAGE ; *** Old/sys/mac/mrecover.c Tue Dec 10 16:51:11 1996 --- sys/mac/mrecover.c Sat Oct 26 14:55:26 1996 *************** *** 1,11 **** ! /* SCCS Id: @(#)mrecover.c 3.1 93/04/15 */ /* Copyright (c) David Hairston, 1993. */ /* NetHack may be freely redistributed. See license for details. */ /* Macintosh Recovery Application */ /* based on code in util/recover.c. the significant differences are: - * - define MAC is implicit so config.h is not included (95% laziness). * - GUI vs. CLI. the vast majority of code here supports the GUI. * - Mac toolbox equivalents are used in place of ANSI functions. * - void restore_savefile(void) is event driven. --- 1,10 ---- ! /* SCCS Id: @(#)mrecover.c 3.2 96/07/24 */ /* Copyright (c) David Hairston, 1993. */ /* NetHack may be freely redistributed. See license for details. */ /* Macintosh Recovery Application */ /* based on code in util/recover.c. the significant differences are: * - GUI vs. CLI. the vast majority of code here supports the GUI. * - Mac toolbox equivalents are used in place of ANSI functions. * - void restore_savefile(void) is event driven. *************** *** 37,65 **** */ /**** Toolbox defines ****/ /* MPW C headers (99.44% pure) */ - #include #include - #include #include #include #include #ifdef applec #include #endif - #include - - #include - #include - #include #include - #include #include #include - #include #include #include #include --- 36,57 ---- */ + #include "config.h" + /**** Toolbox defines ****/ /* MPW C headers (99.44% pure) */ #include #include #include #include #ifdef applec #include #endif #include #include #include #include #include #include *************** *** 225,235 **** NMUPP nmCompletionUPP; /* UPP for nmCompletion */ FileFilterUPP basenameFileFilterUPP; /* UPP for basenameFileFilter */ - #define CREATOR 'nh31' /* NetHack signature */ - #define SAVETYPE 'SAVE' /* save file type */ - #define FILENAME 256 /* macconf.h */ - typedef signed char schar; /* config.h */ - typedef schar xchar; /* global.h */ #define MAX_RECOVER_COUNT 256 #define APP_NAME_RES_ID (-16396) /* macfile.h */ --- 217,222 ---- *************** *** 1229,1235 **** *savename = nameLen; } ! if (HCreate(vRefNum, dirID, savename, CREATOR, SAVETYPE) || HOpen(vRefNum, dirID, savename, fsRdWrPerm, &fRefNum)) { endRecover(); --- 1216,1222 ---- *savename = nameLen; } ! if (HCreate(vRefNum, dirID, savename, MAC_CREATOR, SAVE_TYPE) || HOpen(vRefNum, dirID, savename, fsRdWrPerm, &fRefNum)) { endRecover(); *************** *** 1274,1279 **** --- 1261,1267 ---- static int savelev; long saveTemp, lev; xchar levc; + struct version_info version_data; /* level 0 file contains: * pid of creating process (ignored here) *************** *** 1302,1307 **** --- 1290,1298 ---- if (in.Recover) (void) read_levelfile(gameRefNum, (Ptr) savename, sizeof(savename)); + if (in.Recover) + (void) read_levelfile(gameRefNum, + (Ptr) &version_data, sizeof version_data); /* save file should contain: * current level (including pets) *************** *** 1314,1319 **** --- 1305,1313 ---- if (in.Recover) levRefNum = open_levelfile(savelev); + if (in.Recover) + (void) write_savefile(saveRefNum, + (Ptr) &version_data, sizeof version_data); if (in.Recover) copy_bytes(levRefNum, saveRefNum); *** Old/sys/mac/mttymain.c Tue Dec 10 16:51:19 1996 --- sys/mac/mttymain.c Mon Jun 17 18:34:30 1996 *************** *** 243,249 **** SetPort ( _mt_window ) ; SetOrigin ( -3 , -3 ) ; font_num = 0 ; ! font_size = ( flags.large_font && ! small_screen ) ? 12 : 9 ; GetFNum ( "\pHackFont" , & font_num ) ; if ( font_num != 0 ) { mustwork ( init_tty_number ( _mt_window , font_num , font_size , --- 243,249 ---- SetPort ( _mt_window ) ; SetOrigin ( -3 , -3 ) ; font_num = 0 ; ! font_size = ( iflags.large_font && ! small_screen ) ? 12 : 9 ; GetFNum ( "\pHackFont" , & font_num ) ; if ( font_num != 0 ) { mustwork ( init_tty_number ( _mt_window , font_num , font_size , *************** *** 616,622 **** mustwork ( set_tty_attrib ( _mt_window , TTY_ATTRIB_CURSOR , flag ) ) ; ! flags . cbreak = 1 ; } --- 616,622 ---- mustwork ( set_tty_attrib ( _mt_window , TTY_ATTRIB_CURSOR , flag ) ) ; ! iflags . cbreak = 1 ; } *************** *** 672,678 **** void tty_start_screen ( void ) { ! flags . cbreak = 1 ; } --- 672,678 ---- void tty_start_screen ( void ) { ! iflags . cbreak = 1 ; } *** Old/sys/msdos/Makefile.BC Tue Dec 10 16:51:52 1996 --- sys/msdos/Makefile.BC Sat Oct 26 14:53:20 1996 *************** *** 1,4 **** ! # SCCS Id: @(#)Makefile.BC 3.2 96/05/14 # Copyright (c) Yitzhak Sapir, 1996. # NetHack may be freely distributed. See license for details. # --- 1,4 ---- ! # SCCS Id: @(#)Makefile.BC 3.2 96/10/25 # Copyright (c) Yitzhak Sapir, 1996. # NetHack may be freely distributed. See license for details. # *************** *** 632,638 **** SPLEVOBJS =$(O)lev_yacc.o $(O)lev_$(LEX).o $(O)lev_main.o \ $(O)alloc.o $(O)decl.o $(O)drawing.o $(O)monst.o \ ! $(O)objects.o $(O)panic.o DGNCOMPOBJS =$(O)dgn_yacc.o $(O)dgn_$(LEX).o $(O)dgn_main.o \ $(O)alloc.o $(O)panic.o --- 632,638 ---- SPLEVOBJS =$(O)lev_yacc.o $(O)lev_$(LEX).o $(O)lev_main.o \ $(O)alloc.o $(O)decl.o $(O)drawing.o $(O)monst.o \ ! $(O)objects.o $(O)panic.o $(O)stubvid.o DGNCOMPOBJS =$(O)dgn_yacc.o $(O)dgn_$(LEX).o $(O)dgn_main.o \ $(O)alloc.o $(O)panic.o *************** *** 642,655 **** GIFREADERS =$(O)gifread.o $(O)alloc.o $(O)panic.o TEXT_IO =$(O)tiletext.o $(O)tiletxt.o $(O)drawing.o \ ! $(O)decl.o $(O)monst.o $(O)objects.o PPMWRITERS = $(O)ppmwrite.o $(O)alloc.o $(O)panic.o GIFREAD2 =$(O)gifread2.o $(O)alloc.o $(O)panic.o TEXT_IO2 =$(O)tiletex2.o $(O)tiletxt2.o $(O)drawing.o \ ! $(O)decl.o $(O)monst.o $(O)objects.o PPMWRIT2 = $(O)ppmwrit2.o $(O)alloc.o $(O)panic.o --- 642,655 ---- GIFREADERS =$(O)gifread.o $(O)alloc.o $(O)panic.o TEXT_IO =$(O)tiletext.o $(O)tiletxt.o $(O)drawing.o \ ! $(O)decl.o $(O)monst.o $(O)objects.o $(O)stubvid.o PPMWRITERS = $(O)ppmwrite.o $(O)alloc.o $(O)panic.o GIFREAD2 =$(O)gifread2.o $(O)alloc.o $(O)panic.o TEXT_IO2 =$(O)tiletex2.o $(O)tiletxt2.o $(O)drawing.o \ ! $(O)decl.o $(O)monst.o $(O)objects.o $(O)stubvid.o PPMWRIT2 = $(O)ppmwrit2.o $(O)alloc.o $(O)panic.o *************** *** 966,974 **** $(U)lev_comp.exe: $(SPLEVOBJS) @echo Linking $@... $(LINK) $(LFLAGSU) @&&! ! $(O)panic.o $(O)objects.o $(O)monst.o $(O)drawing.o + ! $(O)decl.o $(O)alloc.o $(O)lev_main.o $(O)lev_$(LEX).o + ! $(O)lev_yacc.o $@ $(@B) $(BCMDL); --- 966,974 ---- $(U)lev_comp.exe: $(SPLEVOBJS) @echo Linking $@... $(LINK) $(LFLAGSU) @&&! ! $(O)stubvid.o $(O)panic.o $(O)objects.o $(O)monst.o + ! $(O)drawing.o $(O)decl.o $(O)alloc.o $(O)lev_main.o + ! $(O)lev_$(LEX).o $(O)lev_yacc.o $@ $(@B) $(BCMDL); *************** *** 1224,1231 **** @echo Linking $@... $(LINK) $(LFLAGSU) @&&! $(O)tile2bin.o+ ! $(O)objects.o $(O)monst.o $(O)decl.o $(O)drawing.o + ! $(O)tiletxt.o $(O)tiletext.o $@ $(@B) $(BCMDL); --- 1224,1231 ---- @echo Linking $@... $(LINK) $(LFLAGSU) @&&! $(O)tile2bin.o+ ! $(O)stubvid.o $(O)objects.o $(O)monst.o $(O)decl.o + ! $(O)drawing.o $(O)tiletxt.o $(O)tiletext.o $@ $(@B) $(BCMDL); *************** *** 1235,1242 **** @echo Linking $@... $(LINK) $(LFLAGSU) @&&! $(O)til2bin2.o+ ! $(O)objects.o $(O)monst.o $(O)decl.o $(O)drawing.o + ! $(O)tiletxt2.o $(O)tiletex2.o $@ $(@B) $(BCMDL); --- 1235,1242 ---- @echo Linking $@... $(LINK) $(LFLAGSU) @&&! $(O)til2bin2.o+ ! $(O)stubvid.o $(O)objects.o $(O)monst.o $(O)decl.o + ! $(O)drawing.o $(O)tiletxt2.o $(O)tiletex2.o $@ $(@B) $(BCMDL); *************** *** 1285,1291 **** $(U)dlb_main.exe: $(DLBOBJS) @$(LINK) $(LFLAGSU) $(DLBOBJS),$@,, $(CLIB) $(BCMDL); ! $(O)dlb_main.o: $(U)\dlb_main.c $(INCL)\config.h $(DLB_H) $(CC) $(CFLAGSU) $(COBJNAM)$@ $(U)dlb_main.c # --- 1285,1291 ---- $(U)dlb_main.exe: $(DLBOBJS) @$(LINK) $(LFLAGSU) $(DLBOBJS),$@,, $(CLIB) $(BCMDL); ! $(O)dlb_main.o: $(U)dlb_main.c $(INCL)\config.h $(DLB_H) $(CC) $(CFLAGSU) $(COBJNAM)$@ $(U)dlb_main.c # *************** *** 1519,1524 **** --- 1519,1527 ---- $(O)pckeys.o: $(PCHO) $(MSYS)\pckeys.c $(HACK_H) $(PCVIDEO_H) $(CC) $(FLAGUO) $$($(@B)_o) $(COBJNAM)$@ $(MSYS)\pckeys.c + + $(O)stubvid.o : $(MSYS)\video.c $(HACK_H) + $(CC) $(FLAGUO) $(CDEFINE)STUBVIDEO $$($(@B)_o) $(COBJNAM)$@ $(MSYS)\video.c $(O)video.0: $(PCH0) $(MSYS)\video.c $(HACK_H) $(WINTTY_H) $(PCVIDEO_H) \ $(TILE_H) *** Old/sys/msdos/Makefile.GCC Tue Dec 10 16:51:57 1996 --- sys/msdos/Makefile.GCC Sat Oct 26 14:53:18 1996 *************** *** 1,4 **** ! # SCCS Id: @(#)Makefile.GCC 3.2 96/03/15 # Copyright (c) NetHack PC Development Team 1996. # PC NetHack 3.2 Utilities Makefile for djgpp V2 # --- 1,4 ---- ! # SCCS Id: @(#)Makefile.GCC 3.2 96/10/25 # Copyright (c) NetHack PC Development Team 1996. # PC NetHack 3.2 Utilities Makefile for djgpp V2 # *************** *** 32,37 **** --- 32,38 ---- DDAT = ../dat DUTIL = ../util DSRC = ../src + DINCL = ../include # But we must use dos directory specs to find src files, so.... *************** *** 56,62 **** # otherwise leave blank UUDECODE = - # # Special libraries and how to link them in. --- 57,62 ---- *************** *** 107,112 **** --- 107,115 ---- DLBFLG = endif + LS = ls -1 # ls.exe from djgpp distribution + #LS = dir /l/b # DOS command + # # Flags. # *************** *** 122,127 **** --- 125,132 ---- # Utility Objects. # + VGAOBJ = vidvga.o + MAKESRC = makedefs.c SPLEVSRC = lev_yacc.c lev_$(LEX).c lev_main.c panic.c *************** *** 132,151 **** SPLEVOBJS = lev_yacc.o lev_$(LEX).o lev_main.o alloc.o \ monst.o objects.o panic.o \ ! drawing.o decl.o DGNCOMPOBJS = dgn_yacc.o dgn_$(LEX).o dgn_main.o alloc.o \ panic.o RECOVOBJS = recover.o # Tile related object files. ! TILOBJ = tile.o pctiles.o vidvga.o ! TEXTIO = tiletext.o tiletxt.o drawing.o decl.o monst.o objects.o - TEXTIO2 = tiletex2.o tiletxt2.o drawing.o decl.o monst.o objects.o PLANAR_TIB = NetHack1.tib --- 137,158 ---- SPLEVOBJS = lev_yacc.o lev_$(LEX).o lev_main.o alloc.o \ monst.o objects.o panic.o \ ! drawing.o decl.o stubvid.o DGNCOMPOBJS = dgn_yacc.o dgn_$(LEX).o dgn_main.o alloc.o \ panic.o RECOVOBJS = recover.o + # Tile related object files. ! TILOBJ = tile.o pctiles.o $(VGAOBJ) ! ! TEXTIO = tiletext.o tiletxt.o drawing.o decl.o monst.o objects.o stubvid.o ! TEXTIO2 = tiletex2.o tiletxt2.o drawing.o decl.o monst.o objects.o stubvid.o PLANAR_TIB = NetHack1.tib *************** *** 237,243 **** $(DISPLAY_H) $(INCL)\monsym.h $(INCL)\mkroom.h \ $(INCL)\objclass.h $(INCL)\trap.h $(INCL)\flag.h \ $(RM_H) $(INCL)\vision.h $(INCL)\wintype.h \ ! $(INCL)\engrave.h $(INCL)\rect.h $(INCL)\extern.h \ $(INCL)\trampoli.h $(INCL)\hack.h DLB_H = $(INCL)\dlb.h TILE_H = $(INCL)\tile.h $(INCL)\pctiles.h --- 244,250 ---- $(DISPLAY_H) $(INCL)\monsym.h $(INCL)\mkroom.h \ $(INCL)\objclass.h $(INCL)\trap.h $(INCL)\flag.h \ $(RM_H) $(INCL)\vision.h $(INCL)\wintype.h \ ! $(INCL)\engrave.h $(INCL)\rect.h \ $(INCL)\trampoli.h $(INCL)\hack.h DLB_H = $(INCL)\dlb.h TILE_H = $(INCL)\tile.h $(INCL)\pctiles.h *************** *** 250,255 **** --- 257,267 ---- DLBOBJS = endif + ifdef DJGPP + DJ1 = $(dir $(DJGPP)) + CWSDPMI = $(subst /,\,$(DJ1))bin\CWSDPMI.* + endif + # # Make Rules. # *************** *** 259,265 **** .c.o: $(CC) $(CFLAGS) -o$@ $< ! .phony: dlb # # Primary Targets. --- 271,277 ---- .c.o: $(CC) $(CFLAGS) -o$@ $< ! #.phony: dlb # # Primary Targets. *************** *** 294,306 **** copy $(MSYS)\msdoshlp.txt $(GAMEDIR) if exist $(GAMEDIR)\makefile. del $(GAMEDIR)\makefile. endif copy $(SSHR)\termcap $(GAMEDIR) copy *.tib $(GAMEDIR) copy $(SSHR)\NetHack.cnf $(GAMEDIR) copy recover.exe $(GAMEDIR) ! copy $(DOC)\guideb*.txt $(GAMEDIR) if exist $(DOC)\recover.txt copy $(DOC)\recover.txt $(GAMEDIR) if exist $(DOC)\nethack.txt copy $(DOC)\nethack.txt $(GAMEDIR) echo install done > install.tag # The main target. --- 306,325 ---- copy $(MSYS)\msdoshlp.txt $(GAMEDIR) if exist $(GAMEDIR)\makefile. del $(GAMEDIR)\makefile. endif + ifdef TERMLIB copy $(SSHR)\termcap $(GAMEDIR) + endif copy *.tib $(GAMEDIR) copy $(SSHR)\NetHack.cnf $(GAMEDIR) copy recover.exe $(GAMEDIR) ! copy $(DOC)\guidebo*.txt $(GAMEDIR) if exist $(DOC)\recover.txt copy $(DOC)\recover.txt $(GAMEDIR) if exist $(DOC)\nethack.txt copy $(DOC)\nethack.txt $(GAMEDIR) + ifdef CWSDPMI + if exist $(CWSDPMI) copy $(CWSDPMI) $(GAMEDIR) + else + echo Could not find a copy of CWSDPMI.EXE to put into $(GAMEDIR) + endif echo install done > install.tag # The main target. *************** *** 514,519 **** --- 533,539 ---- $(INCL)\lev_comp.h: $(SSHR)\lev_comp.h copy $(SSHR)\lev_comp.h $@ + touch $(DINCL)/lev_comp.h lev_$(LEX).c: $(SSHR)\lev_lex.c copy $(SSHR)\lev_lex.c $@ *************** *** 573,578 **** --- 593,599 ---- $(INCL)\dgn_comp.h: $(SSHR)\dgn_comp.h copy $(SSHR)\dgn_comp.h $@ + touch $(DINCL)/dgn_comp.h dgn_$(LEX).c: $(SSHR)\dgn_lex.c copy $(SSHR)\dgn_lex.c $@ *************** *** 733,739 **** alloc.o: $(CONFIG_H) alloc.c $(CC) $(CFLAGS) -oalloc.o alloc.c ! drawing.o: $(CONFIG_H) drawing.c $(CC) $(CFLAGS) -odrawing.o drawing.c decl.o: $(CONFIG_H) decl.c --- 754,760 ---- alloc.o: $(CONFIG_H) alloc.c $(CC) $(CFLAGS) -oalloc.o alloc.c ! drawing.o: $(CONFIG_H) drawing.c pcvideo.h $(CC) $(CFLAGS) -odrawing.o drawing.c decl.o: $(CONFIG_H) decl.c *************** *** 763,769 **** dat.tag: $(DAT)\data $(DAT)\rumors $(DAT)\dungeon \ ! $(DAT)\oracles $(DAT)\quest.dat sp_lev.tag $(DLB) @echo dat done >dat.tag $(DAT)\data: utility.tag $(DATABASE) --- 784,790 ---- dat.tag: $(DAT)\data $(DAT)\rumors $(DAT)\dungeon \ ! $(DAT)\oracles $(DAT)\quest.dat sp_lev.tag $(DAT)\nhdat @echo dat done >dat.tag $(DAT)\data: utility.tag $(DATABASE) *************** *** 822,828 **** # # DLB stuff # ! dlb: dlb_main.exe @cd $(DAT) @copy $(MSYS)\msdoshlp.txt . @echo data >dlb.lst --- 843,851 ---- # # DLB stuff # ! #note that dir below assumes bin/dir.exe from djgpp distribution ! # ! $(DAT)\nhdat: dlb_main.exe @cd $(DAT) @copy $(MSYS)\msdoshlp.txt . @echo data >dlb.lst *************** *** 839,845 **** @echo wizhelp >>dlb.lst @echo license >>dlb.lst @echo msdoshlp.txt >>dlb.lst ! @for %%N in (*.lev) do echo %%N >>dlb.lst dlb_main cvIf dlb.lst nhdat @cd $(SRC) --- 862,868 ---- @echo wizhelp >>dlb.lst @echo license >>dlb.lst @echo msdoshlp.txt >>dlb.lst ! $(LS) *.lev >>dlb.lst dlb_main cvIf dlb.lst nhdat @cd $(SRC) *************** *** 905,910 **** --- 928,936 ---- copy $(MSYS)\vidtxt.c . $(CC) $(CFLAGS) -o$@ vidtxt.c + stubvid.o : $(HACK_H) $(MSYS)\video.c + copy $(MSYS)\video.c . + $(CC) $(CFLAGS) -DSTUBVIDEO -o$@ video.c # win/tty *** Old/sys/msdos/Makefile.MSC Tue Dec 10 16:52:02 1996 --- sys/msdos/Makefile.MSC Sat Oct 26 14:53:21 1996 *************** *** 1,4 **** ! # SCCS Id: @(#)Makefile.MSC 3.2 96/05/14 # Copyright (c) NetHack PC Development Team, 1996. # NetHack may be freely distributed. See license for details. # --- 1,4 ---- ! # SCCS Id: @(#)Makefile.MSC 3.2 96/10/25 # Copyright (c) NetHack PC Development Team, 1996. # NetHack may be freely distributed. See license for details. # *************** *** 673,679 **** SPLEVOBJS =$(O)lev_yacc.o $(O)lev_$(LEX).o $(O)lev_main.o \ $(O)alloc.o $(O)decl.o $(O)drawing.o $(O)monst.o \ ! $(O)objects.o $(O)panic.o DGNCOMPOBJS =$(O)dgn_yacc.o $(O)dgn_$(LEX).o $(O)dgn_main.o \ $(O)alloc.o $(O)panic.o --- 673,679 ---- SPLEVOBJS =$(O)lev_yacc.o $(O)lev_$(LEX).o $(O)lev_main.o \ $(O)alloc.o $(O)decl.o $(O)drawing.o $(O)monst.o \ ! $(O)objects.o $(O)panic.o $(O)stubvid.o DGNCOMPOBJS =$(O)dgn_yacc.o $(O)dgn_$(LEX).o $(O)dgn_main.o \ $(O)alloc.o $(O)panic.o *************** *** 683,696 **** GIFREADERS =$(O)gifread.o $(O)alloc.o $(O)panic.o TEXT_IO =$(O)tiletext.o $(O)tiletxt.o $(O)drawing.o \ ! $(O)decl.o $(O)monst.o $(O)objects.o PPMWRITERS = $(O)ppmwrite.o $(O)alloc.o $(O)panic.o GIFREAD2 =$(O)gifread2.o $(O)alloc.o $(O)panic.o TEXT_IO2 =$(O)tiletex2.o $(O)tiletxt2.o $(O)drawing.o \ ! $(O)decl.o $(O)monst.o $(O)objects.o PPMWRIT2 = $(O)ppmwrit2.o $(O)alloc.o $(O)panic.o --- 683,696 ---- GIFREADERS =$(O)gifread.o $(O)alloc.o $(O)panic.o TEXT_IO =$(O)tiletext.o $(O)tiletxt.o $(O)drawing.o \ ! $(O)decl.o $(O)monst.o $(O)objects.o $(O)stubvid.o PPMWRITERS = $(O)ppmwrite.o $(O)alloc.o $(O)panic.o GIFREAD2 =$(O)gifread2.o $(O)alloc.o $(O)panic.o TEXT_IO2 =$(O)tiletex2.o $(O)tiletxt2.o $(O)drawing.o \ ! $(O)decl.o $(O)monst.o $(O)objects.o $(O)stubvid.o PPMWRIT2 = $(O)ppmwrit2.o $(O)alloc.o $(O)panic.o *************** *** 1330,1336 **** $(U)dlb_main.exe: $(DLBOBJS) @$(LINK) $(LFLAGSU) $(DLBOBJS),$@,, $(CLIB) $(BCMDL); ! $(O)dlb_main.o: $(U)\dlb_main.c $(INCL)\config.h $(DLB_H) $(CC) $(CFLAGSU) $(COBJNAM)$@ $(U)dlb_main.c # --- 1330,1336 ---- $(U)dlb_main.exe: $(DLBOBJS) @$(LINK) $(LFLAGSU) $(DLBOBJS),$@,, $(CLIB) $(BCMDL); ! $(O)dlb_main.o: $(U)dlb_main.c $(INCL)\config.h $(DLB_H) $(CC) $(CFLAGSU) $(COBJNAM)$@ $(U)dlb_main.c # *************** *** 1576,1581 **** --- 1576,1584 ---- $(O)pckeys.o: $(PCHO) $(MSYS)\pckeys.c $(HACK_H) $(PCVIDEO_H) $(CC) $(FLAGUO) $(CCSNAM)$(@F) $(COBJNAM)$@ $(MSYS)\pckeys.c + + $(O)stubvid.o : $(MSYS)\video.c $(HACK_H) + $(CC) $(FLAGUO) $(CDEFINE)STUBVIDEO $(CCSNAM)$(@F) $(COBJNAM)$@ $(MSYS)\video.c $(O)video.0: $(PCH0) $(MSYS)\video.c $(HACK_H) $(WINTTY_H) $(PCVIDEO_H) \ $(TILE_H) *** Old/sys/msdos/Makefile.SC Tue Dec 10 16:52:07 1996 --- sys/msdos/Makefile.SC Tue Oct 22 21:56:29 1996 *************** *** 1,4 **** ! # SCCS Id : @(#)Makefile.SC 3.2 96/02/03 # Copyright (c) NetHack Development Team 1996. # # Symantec C compiler V7.2 --- 1,4 ---- ! # SCCS Id : @(#)Makefile.SC 3.2 96/10/14 # Copyright (c) NetHack Development Team 1996. # # Symantec C compiler V7.2 *************** *** 18,33 **** # NOTE : Make sure GAMEDIR exists before make is started. GAME = nethack - # The GNU Make has a problem if you include a drive spec below (unfortunately). GAMEDIR = c:\games\nethacks # ! # Directories, gcc likes unix style directory specs # - DDAT = ../dat DUTIL = ../util - DSRC = ../src # But we must use dos directory specs to find src files, so.... --- 18,30 ---- # NOTE : Make sure GAMEDIR exists before make is started. GAME = nethack GAMEDIR = c:\games\nethacks # ! # Directories, gnu utilities like unix style directory specs # DUTIL = ../util # But we must use dos directory specs to find src files, so.... *** Old/sys/msdos/msdos.c Tue Dec 10 16:52:13 1996 --- sys/msdos/msdos.c Mon Jun 17 18:35:08 1996 *************** *** 49,55 **** #ifdef OVL0 ! /* direct bios calls are used only when flags.BIOS is set */ static char NDECL(DOSgetch); static char NDECL(BIOSgetch); --- 49,55 ---- #ifdef OVL0 ! /* direct bios calls are used only when iflags.BIOS is set */ static char NDECL(DOSgetch); static char NDECL(BIOSgetch); *************** *** 66,79 **** /* BIOSgetch can use the numeric key pad on IBM compatibles. */ # ifdef SIMULATE_CURSOR ! if (flags.grmode && cursor_flag) DrawCursor(); # endif ! if (flags.BIOS) ch = BIOSgetch(); else ch = DOSgetch(); # ifdef SIMULATE_CURSOR ! if (flags.grmode && cursor_flag) HideCursor(); # endif return ((ch == '\r') ? '\n' : ch); } --- 66,79 ---- /* BIOSgetch can use the numeric key pad on IBM compatibles. */ # ifdef SIMULATE_CURSOR ! if (iflags.grmode && cursor_flag) DrawCursor(); # endif ! if (iflags.BIOS) ch = BIOSgetch(); else ch = DOSgetch(); # ifdef SIMULATE_CURSOR ! if (iflags.grmode && cursor_flag) HideCursor(); # endif return ((ch == '\r') ? '\n' : ch); } *************** *** 96,102 **** /* * Keypad keys are translated to the normal values below. ! * When flags.BIOS is active, shifted keypad keys are translated to the * shift values below. */ static const struct pad { --- 96,102 ---- /* * Keypad keys are translated to the normal values below. ! * When iflags.BIOS is active, shifted keypad keys are translated to the * shift values below. */ static const struct pad { *************** *** 252,258 **** /* Translate keypad keys */ if (iskeypad(scan)) { ! kpad = flags.num_pad ? numpad : keypad; if (shift & SHIFT) ch = kpad[scan - KEYPADLO].shift; else if (shift & CTRL) --- 252,258 ---- /* Translate keypad keys */ if (iskeypad(scan)) { ! kpad = iflags.num_pad ? numpad : keypad; if (shift & SHIFT) ch = kpad[scan - KEYPADLO].shift; else if (shift & CTRL) *************** *** 309,315 **** ch = regs.h.al; if (iskeypad(ch)) { /* unshifted keypad keys */ ! kpad = (void *)(flags.num_pad ? numpad : keypad); ch = (*kpad)[ch - KEYPADLO].normal; } else if (inmap(ch)) { /* Alt-letters */ ch = scanmap[ch - SCANLO]; --- 309,315 ---- ch = regs.h.al; if (iskeypad(ch)) { /* unshifted keypad keys */ ! kpad = (void *)(iflags.num_pad ? numpad : keypad); ch = (*kpad)[ch - KEYPADLO].normal; } else if (inmap(ch)) { /* Alt-letters */ ch = scanmap[ch - SCANLO]; *************** *** 459,465 **** disable_ctrlP() { ! if (!flags.rawio) return; old_stdin = dos_ioctl(STDIN, GETBITS, 0); old_stdout = dos_ioctl(STDOUT, GETBITS, 0); --- 459,465 ---- disable_ctrlP() { ! if (!iflags.rawio) return; old_stdin = dos_ioctl(STDIN, GETBITS, 0); old_stdout = dos_ioctl(STDOUT, GETBITS, 0); *************** *** 473,479 **** void enable_ctrlP() { ! if (!flags.rawio) return; if (old_stdin) (void) dos_ioctl(STDIN, SETBITS, old_stdin); if (old_stdout) --- 473,479 ---- void enable_ctrlP() { ! if (!iflags.rawio) return; if (old_stdin) (void) dos_ioctl(STDIN, SETBITS, old_stdin); if (old_stdout) *** Old/sys/msdos/pckeys.c Tue Dec 10 16:52:25 1996 --- sys/msdos/pckeys.c Sat Oct 26 14:53:16 1996 *************** *** 16,25 **** boolean FDECL(pckeys, (unsigned char, unsigned char)); extern struct WinDesc *wins[MAXWIN]; /* from wintty.c */ - extern boolean tiles_on; /* from video.c */ - extern boolean traditional; /* from video.c */ extern boolean inmap; /* from video.c */ - extern boolean overview; #define SHIFT (0x1 | 0x2) #define CTRL 0x4 --- 16,22 ---- *************** *** 48,71 **** break; # endif case 0x74: /* Control-right_arrow = scroll horizontal to right */ ! if ((shift & CTRL) && tiles_on && !opening_dialog) vga_userpan(1); break; case 0x73: /* Control-left_arrow = scroll horizontal to left */ ! if ((shift & CTRL) && tiles_on && !opening_dialog) vga_userpan(0); break; case 0x3E: /* F4 = toggle overview mode */ ! if (tiles_on && !opening_dialog) { ! traditional = FALSE; ! vga_overview(overview ? 0 : 1); } break; case 0x3F: /* F5 = toggle traditional mode */ ! if (tiles_on && !opening_dialog) { ! overview = FALSE; ! vga_traditional(traditional ? 0 : 1); } break; default: --- 45,72 ---- break; # endif case 0x74: /* Control-right_arrow = scroll horizontal to right */ ! if ((shift & CTRL) && iflags.tile_view && !opening_dialog) vga_userpan(1); break; case 0x73: /* Control-left_arrow = scroll horizontal to left */ ! if ((shift & CTRL) && iflags.tile_view && !opening_dialog) vga_userpan(0); break; case 0x3E: /* F4 = toggle overview mode */ ! if (iflags.tile_view && ! !opening_dialog && !Is_rogue_level(&u.uz)) { ! iflags.traditional_view = FALSE; ! vga_overview(iflags.over_view ? FALSE : TRUE); ! vga_refresh(); } break; case 0x3F: /* F5 = toggle traditional mode */ ! if (iflags.tile_view && ! !opening_dialog && !Is_rogue_level(&u.uz)) { ! iflags.over_view = FALSE; ! vga_traditional(iflags.traditional_view ? FALSE : TRUE); ! vga_refresh(); } break; default: *** Old/sys/msdos/pctiles.c Tue Dec 10 16:52:27 1996 --- sys/msdos/pctiles.c Mon Jun 17 18:35:09 1996 *************** *** 102,108 **** if (tilefile == (FILE *)0) return 1; } #ifdef TILES_IN_RAM ! if (flags.preload_tiles) { if (filestyle) { struct overview_planar_cell_struct *gp; long ram_needed = sizeof(struct overview_planar_cell_struct) * --- 102,108 ---- if (tilefile == (FILE *)0) return 1; } #ifdef TILES_IN_RAM ! if (iflags.preload_tiles) { if (filestyle) { struct overview_planar_cell_struct *gp; long ram_needed = sizeof(struct overview_planar_cell_struct) * *** Old/sys/msdos/pcvideo.h Tue Dec 10 16:52:32 1996 --- sys/msdos/pcvideo.h Sat Oct 26 14:53:16 1996 *************** *** 273,278 **** --- 273,279 ---- E void FDECL(vga_userpan, (BOOLEAN_P)); E void FDECL(vga_overview, (BOOLEAN_P)); E void FDECL(vga_traditional, (BOOLEAN_P)); + E void NDECL(vga_refresh); # endif /* SCREEN_VGA */ # endif /* NO_TERMS */ *** Old/sys/msdos/sound.c Tue Dec 10 16:52:51 1996 --- sys/msdos/sound.c Mon Jun 17 18:35:09 1996 *************** *** 28,36 **** char *sopt; { ! flags.hassound = 0; # ifdef PCMUSIC ! flags.usepcspeaker = 0; # endif if (strncmpi(sopt,"def",3) == 0) { /* default */ --- 28,36 ---- char *sopt; { ! iflags.hassound = 0; # ifdef PCMUSIC ! iflags.usepcspeaker = 0; # endif if (strncmpi(sopt,"def",3) == 0) { /* default */ *************** *** 38,44 **** } # ifdef PCMUSIC else if (strncmpi(sopt,"speaker",7) == 0) { /* pc speaker */ ! flags.usepcspeaker = 1; } # endif else if (strncmpi(sopt,"auto",4) == 0) { /* autodetect */ --- 38,44 ---- } # ifdef PCMUSIC else if (strncmpi(sopt,"speaker",7) == 0) { /* pc speaker */ ! iflags.usepcspeaker = 1; } # endif else if (strncmpi(sopt,"auto",4) == 0) { /* autodetect */ *************** *** 48,54 **** */ if (0) ; # ifdef PCMUSIC ! else flags.usepcspeaker = 1; # endif } else { return 0; --- 48,54 ---- */ if (0) ; # ifdef PCMUSIC ! else iflags.usepcspeaker = 1; # endif } else { return 0; *************** *** 280,286 **** void pc_speaker (struct obj *instr, char *tune) { ! if (!flags.usepcspeaker) return; initspeaker (); switch (instr->otyp) { --- 280,286 ---- void pc_speaker (struct obj *instr, char *tune) { ! if (!iflags.usepcspeaker) return; initspeaker (); switch (instr->otyp) { *** Old/sys/msdos/video.c Tue Dec 10 16:52:56 1996 --- sys/msdos/video.c Sat Oct 26 14:53:17 1996 *************** *** 13,18 **** --- 13,20 ---- */ #include "hack.h" + + #ifndef STUBVIDEO #include "pcvideo.h" #include "pctiles.h" *************** *** 75,81 **** get_scr_size() { # ifdef SCREEN_VGA ! if (flags.usevga) { vga_get_scr_size(); } else # endif --- 77,83 ---- get_scr_size() { # ifdef SCREEN_VGA ! if (iflags.usevga) { vga_get_scr_size(); } else # endif *************** *** 128,134 **** int attrib_gr_normal; /* graphics mode normal attribute */ int attrib_text_intense; /* text mode intense attribute */ int attrib_gr_intense; /* graphics mode intense attribute */ - boolean tiles_on = FALSE; /* do we have tiles on? */ boolean traditional = FALSE; /* traditonal TTY character mode */ boolean inmap = FALSE; /* in the map window */ # ifdef TEXTCOLOR --- 130,135 ---- *************** *** 143,149 **** extern int attrib_gr_normal; extern int attrib_text_intense; extern int attrib_gr_intense; - extern boolean tiles_on; extern boolean traditonal; extern boolean inmap; # ifdef TEXTCOLOR --- 144,149 ---- *************** *** 155,164 **** void backsp() { ! if (!flags.grmode) { txt_backsp(); # ifdef SCREEN_VGA ! } else if (flags.usevga) { vga_backsp(); # endif } --- 155,164 ---- void backsp() { ! if (!iflags.grmode) { txt_backsp(); # ifdef SCREEN_VGA ! } else if (iflags.usevga) { vga_backsp(); # endif } *************** *** 169,178 **** void clear_screen() { ! if (!flags.grmode) { txt_clear_screen(); # ifdef SCREEN_VGA ! } else if (flags.usevga) { vga_clear_screen(BACKGROUND_VGA_COLOR); # endif } --- 169,178 ---- void clear_screen() { ! if (!iflags.grmode) { txt_clear_screen(); # ifdef SCREEN_VGA ! } else if (iflags.usevga) { vga_clear_screen(BACKGROUND_VGA_COLOR); # endif } *************** *** 185,194 **** col = (int)ttyDisplay->curx; row = (int)ttyDisplay->cury; ! if (!flags.grmode) { txt_cl_end(col,row); # ifdef SCREEN_VGA ! } else if (flags.usevga) { vga_cl_end(col,row); # endif } --- 185,194 ---- col = (int)ttyDisplay->curx; row = (int)ttyDisplay->cury; ! if (!iflags.grmode) { txt_cl_end(col,row); # ifdef SCREEN_VGA ! } else if (iflags.usevga) { vga_cl_end(col,row); # endif } *************** *** 201,210 **** { int cy = (int)ttyDisplay->cury+1; ! if (!flags.grmode) { txt_cl_eos(); # ifdef SCREEN_VGA ! } else if (flags.usevga) { vga_cl_eos(cy); # endif } --- 201,210 ---- { int cy = (int)ttyDisplay->cury+1; ! if (!iflags.grmode) { txt_cl_eos(); # ifdef SCREEN_VGA ! } else if (iflags.usevga) { vga_cl_eos(cy); # endif } *************** *** 218,227 **** { ttyDisplay->cury = (uchar)row; ttyDisplay->curx = (uchar)col; ! if (!flags.grmode) { txt_gotoxy(col,row); # ifdef SCREEN_VGA ! } else if (flags.usevga) { vga_gotoloc(col,row); # endif } --- 218,227 ---- { ttyDisplay->cury = (uchar)row; ttyDisplay->curx = (uchar)col; ! if (!iflags.grmode) { txt_gotoxy(col,row); # ifdef SCREEN_VGA ! } else if (iflags.usevga) { vga_gotoloc(col,row); # endif } *************** *** 247,256 **** { tty_curs(BASE_WINDOW, 1, 0); ttyDisplay->curx = ttyDisplay->cury = (uchar)0; ! if (!flags.grmode) { txt_gotoxy(0,0); # ifdef SCREEN_VGA ! } else if (flags.usevga) { vga_gotoloc(0,0); # endif } --- 247,256 ---- { tty_curs(BASE_WINDOW, 1, 0); ttyDisplay->curx = ttyDisplay->cury = (uchar)0; ! if (!iflags.grmode) { txt_gotoxy(0,0); # ifdef SCREEN_VGA ! } else if (iflags.usevga) { vga_gotoloc(0,0); # endif } *************** *** 260,269 **** nocmov(col, row) int col,row; { ! if (!flags.grmode) { txt_gotoxy(col,row); # ifdef SCREEN_VGA ! } else if (flags.usevga) { vga_gotoloc(col,row); # endif } --- 260,269 ---- nocmov(col, row) int col,row; { ! if (!iflags.grmode) { txt_gotoxy(col,row); # ifdef SCREEN_VGA ! } else if (iflags.usevga) { vga_gotoloc(col,row); # endif } *************** *** 272,285 **** void standoutbeg() { ! g_attribute = flags.grmode ? attrib_gr_intense : attrib_text_intense; } void standoutend() { ! g_attribute = flags.grmode ? attrib_gr_normal : attrib_text_normal; } # endif /* OVL0 */ --- 272,285 ---- void standoutbeg() { ! g_attribute = iflags.grmode ? attrib_gr_intense : attrib_text_intense; } void standoutend() { ! g_attribute = iflags.grmode ? attrib_gr_normal : attrib_text_normal; } # endif /* OVL0 */ *************** *** 295,301 **** case ATR_BLINK: case ATR_INVERSE: default: ! g_attribute = flags.grmode ? attrib_gr_normal : attrib_text_normal; } } --- 295,301 ---- case ATR_BLINK: case ATR_INVERSE: default: ! g_attribute = iflags.grmode ? attrib_gr_normal : attrib_text_normal; } } *************** *** 303,309 **** void term_end_color(void) { ! g_attribute = flags.grmode ? attrib_gr_normal : attrib_text_normal; } --- 303,309 ---- void term_end_color(void) { ! g_attribute = iflags.grmode ? attrib_gr_normal : attrib_text_normal; } *************** *** 323,341 **** if (monoflag) { g_attribute = ATTRIB_MONO_UNDERLINE; } else { ! g_attribute = flags.grmode ? attrib_gr_intense : attrib_text_intense; } break; case ATR_BOLD: ! g_attribute = flags.grmode ? attrib_gr_intense : attrib_text_intense; break; case ATR_BLINK: if (monoflag) { g_attribute = ATTRIB_MONO_BLINK; } else { ! g_attribute = flags.grmode ? attrib_gr_intense : attrib_text_intense; } break; --- 323,341 ---- if (monoflag) { g_attribute = ATTRIB_MONO_UNDERLINE; } else { ! g_attribute = iflags.grmode ? attrib_gr_intense : attrib_text_intense; } break; case ATR_BOLD: ! g_attribute = iflags.grmode ? attrib_gr_intense : attrib_text_intense; break; case ATR_BLINK: if (monoflag) { g_attribute = ATTRIB_MONO_BLINK; } else { ! g_attribute = iflags.grmode ? attrib_gr_intense : attrib_text_intense; } break; *************** *** 343,354 **** if (monoflag) { g_attribute = ATTRIB_MONO_REVERSE; } else { ! g_attribute = flags.grmode ? attrib_gr_intense : attrib_text_intense; } break; default: ! g_attribute = flags.grmode ? attrib_gr_normal : attrib_text_normal; break; } --- 343,354 ---- if (monoflag) { g_attribute = ATTRIB_MONO_REVERSE; } else { ! g_attribute = iflags.grmode ? attrib_gr_intense : attrib_text_intense; } break; default: ! g_attribute = iflags.grmode ? attrib_gr_normal : attrib_text_normal; break; } *************** *** 363,369 **** g_attribute = attrib_text_normal; } else { if (color >= 0 && color < CLR_MAX) { ! if (flags.grmode) g_attribute = color; else g_attribute = ttycolors[color]; --- 363,369 ---- g_attribute = attrib_text_normal; } else { if (color >= 0 && color < CLR_MAX) { ! if (iflags.grmode) g_attribute = color; else g_attribute = ttycolors[color]; *************** *** 399,411 **** tty_end_screen() { ! if (!flags.grmode) { txt_clear_screen(); # ifdef PC9800 fputs("\033[>1l", stdout); # endif # ifdef SCREEN_VGA ! } else if (flags.usevga) { vga_tty_end_screen(); # endif } --- 399,411 ---- tty_end_screen() { ! if (!iflags.grmode) { txt_clear_screen(); # ifdef PC9800 fputs("\033[>1l", stdout); # endif # ifdef SCREEN_VGA ! } else if (iflags.usevga) { vga_tty_end_screen(); # endif } *************** *** 441,447 **** g_attribute = attrib_text_normal; /* Give it a starting value */ # ifdef SCREEN_VGA ! if (flags.usevga) { vga_tty_startup(wid, hgt); } else # endif --- 441,447 ---- g_attribute = attrib_text_normal; /* Give it a starting value */ # ifdef SCREEN_VGA ! if (iflags.usevga) { vga_tty_startup(wid, hgt); } else # endif *************** *** 472,493 **** # ifdef PC9800 fputs("\033[>1h", stdout); # endif ! if (flags.num_pad) tty_number_pad(1); /* make keypad send digits */ } void gr_init(){ ! if (flags.usevga) { # ifdef SCREEN_VGA vga_Init(); # endif # ifdef SCREEN_VESA ! } else if (flags.usevesa) { vesa_Init(); # endif # ifdef SCREEN_8514 ! } else if (flags.use8514) { v8514_Init(); # endif } --- 472,493 ---- # ifdef PC9800 fputs("\033[>1h", stdout); # endif ! if (iflags.num_pad) tty_number_pad(1); /* make keypad send digits */ } void gr_init(){ ! if (iflags.usevga) { # ifdef SCREEN_VGA vga_Init(); # endif # ifdef SCREEN_VESA ! } else if (iflags.usevesa) { vesa_Init(); # endif # ifdef SCREEN_8514 ! } else if (iflags.use8514) { v8514_Init(); # endif } *************** *** 496,512 **** void gr_finish() { ! if (flags.grmode) { ! if (flags.usevga) { # ifdef SCREEN_VGA vga_Finish(); # endif # ifdef SCREEN_VESA ! } else if (flags.usevesa) { vesa_Finish(); # endif # ifdef SCREEN_8514 ! } else if (flags.use8514) { v8514_Finish(); # endif } --- 496,512 ---- void gr_finish() { ! if (iflags.grmode) { ! if (iflags.usevga) { # ifdef SCREEN_VGA vga_Finish(); # endif # ifdef SCREEN_VESA ! } else if (iflags.usevesa) { vesa_Finish(); # endif # ifdef SCREEN_8514 ! } else if (iflags.use8514) { v8514_Finish(); # endif } *************** *** 555,564 **** col = (int)ttyDisplay->curx; row = (int)ttyDisplay->cury; ! if (!flags.grmode) { txt_xputs(s,col,row); # ifdef SCREEN_VGA ! } else if (flags.usevga) { vga_xputs(s,col,row); # endif } --- 555,564 ---- col = (int)ttyDisplay->curx; row = (int)ttyDisplay->cury; ! if (!iflags.grmode) { txt_xputs(s,col,row); # ifdef SCREEN_VGA ! } else if (iflags.usevga) { vga_xputs(s,col,row); # endif } *************** *** 571,584 **** int i; char attribute; ! i = flags.grmode ? attrib_gr_normal : attrib_text_normal; attribute = (char)((g_attribute == 0) ? i : g_attribute); ! if (!flags.grmode) { txt_xputc(ch,attribute); # ifdef SCREEN_VGA ! } else if (flags.usevga) { vga_xputc(ch,attribute); # endif /*SCREEN_VGA*/ } --- 571,584 ---- int i; char attribute; ! i = iflags.grmode ? attrib_gr_normal : attrib_text_normal; attribute = (char)((g_attribute == 0) ? i : g_attribute); ! if (!iflags.grmode) { txt_xputc(ch,attribute); # ifdef SCREEN_VGA ! } else if (iflags.usevga) { vga_xputc(ch,attribute); # endif /*SCREEN_VGA*/ } *************** *** 589,595 **** int glyphnum; int ch; { ! if (!flags.grmode || !tiles_on) { xputc((char)ch); # ifdef SCREEN_VGA } else { --- 589,595 ---- int glyphnum; int ch; { ! if (!iflags.grmode || !iflags.tile_view) { xputc((char)ch); # ifdef SCREEN_VGA } else { *************** *** 603,609 **** video_update_positionbar(posbar) char *posbar; { ! if (!flags.grmode) return; # ifdef SCREEN_VGA else --- 603,609 ---- video_update_positionbar(posbar) char *posbar; { ! if (!iflags.grmode) return; # ifdef SCREEN_VGA else *************** *** 639,645 **** int cursor_color = CURSOR_DEFAULT_COLOR; int cursor_flag; ! /* The check for flags.grmode is made BEFORE calling these. */ void DrawCursor() { --- 639,645 ---- int cursor_color = CURSOR_DEFAULT_COLOR; int cursor_flag; ! /* The check for iflags.grmode is made BEFORE calling these. */ void DrawCursor() { *************** *** 894,951 **** * printf("video is %s",sopt); * getch(); */ ! flags.grmode = 0; ! flags.hasvesa = 0; ! flags.hasvga = 0; ! flags.has8514 = 0; ! flags.usevesa = 0; ! flags.usevga = 0; ! flags.use8514 = 0; if (strncmpi(sopt,"def",3) == 0) { /* default */ /* do nothing - default */ # ifdef SCREEN_VGA } else if (strncmpi(sopt,"vga",3) == 0) { /* vga */ ! flags.usevga = 1; ! flags.hasvga = 1; # endif # ifdef SCREEN_VESA } else if (strncmpi(sopt,"vesa",4) == 0) { /* vesa */ ! flags.hasvesa = 1; ! flags.usevesa = 1; # endif # ifdef SCREEN_8514 } else if (strncmpi(sopt,"8514",4) == 0) { /* 8514/A */ ! flags.use8514 = 1; ! flags.has8514 = 1; # endif } else if (strncmpi(sopt,"auto",4) == 0) { /* autodetect */ # ifdef SCREEN_VESA if (vesa_detect()) { ! flags.hasvesa = 1; } # endif # ifdef SCREEN_8514 if (v8514_detect()) { ! flags.has8514 = 1; } # endif # ifdef SCREEN_VGA if (vga_detect()) { ! flags.hasvga = 1; } # endif /* * Auto-detect Priorities (arbitrary for now): * VESA, 8514, VGA */ ! if (flags.hasvesa) flags.usevesa = 1; ! else if (flags.has8514) flags.use8514 = 1; ! else if (flags.hasvga) { ! flags.usevga = 1; /* VGA depends on BIOS to enable function keys*/ ! flags.BIOS = 1; ! flags.rawio = 1; } } else { return 0; --- 894,951 ---- * printf("video is %s",sopt); * getch(); */ ! iflags.grmode = 0; ! iflags.hasvesa = 0; ! iflags.hasvga = 0; ! iflags.has8514 = 0; ! iflags.usevesa = 0; ! iflags.usevga = 0; ! iflags.use8514 = 0; if (strncmpi(sopt,"def",3) == 0) { /* default */ /* do nothing - default */ # ifdef SCREEN_VGA } else if (strncmpi(sopt,"vga",3) == 0) { /* vga */ ! iflags.usevga = 1; ! iflags.hasvga = 1; # endif # ifdef SCREEN_VESA } else if (strncmpi(sopt,"vesa",4) == 0) { /* vesa */ ! iflags.hasvesa = 1; ! iflags.usevesa = 1; # endif # ifdef SCREEN_8514 } else if (strncmpi(sopt,"8514",4) == 0) { /* 8514/A */ ! iflags.use8514 = 1; ! iflags.has8514 = 1; # endif } else if (strncmpi(sopt,"auto",4) == 0) { /* autodetect */ # ifdef SCREEN_VESA if (vesa_detect()) { ! iflags.hasvesa = 1; } # endif # ifdef SCREEN_8514 if (v8514_detect()) { ! iflags.has8514 = 1; } # endif # ifdef SCREEN_VGA if (vga_detect()) { ! iflags.hasvga = 1; } # endif /* * Auto-detect Priorities (arbitrary for now): * VESA, 8514, VGA */ ! if (iflags.hasvesa) iflags.usevesa = 1; ! else if (iflags.has8514) iflags.use8514 = 1; ! else if (iflags.hasvga) { ! iflags.usevga = 1; /* VGA depends on BIOS to enable function keys*/ ! iflags.BIOS = 1; ! iflags.rawio = 1; } } else { return 0; *************** *** 953,957 **** --- 953,973 ---- return 1; } # endif /* OVL1 */ + # ifdef OVL0 + void tileview(enable) + boolean enable; + { + #ifdef SCREEN_VGA + if (iflags.grmode) vga_traditional(enable ? FALSE : TRUE); + #endif + } + # endif /* OVL0 */ #endif /* NO_TERMS */ + #else /* STUBVIDEO */ + void tileview(enable) + boolean enable; + { + } + #endif /* STUBVIDEO */ + *** Old/sys/msdos/vidtxt.c Tue Dec 10 16:53:00 1996 --- sys/msdos/vidtxt.c Mon Jun 17 18:35:11 1996 *************** *** 46,52 **** { union REGS regs; ! if (!flags.BIOS) { CO = 80; LI = 24; return; --- 46,52 ---- { union REGS regs; ! if (!iflags.BIOS) { CO = 80; LI = 24; return; *** Old/sys/msdos/vidvga.c Tue Dec 10 16:53:03 1996 --- sys/msdos/vidvga.c Sat Oct 26 14:53:17 1996 *************** *** 131,138 **** extern int attrib_gr_normal; /* graphics mode normal attribute */ extern int attrib_text_intense; /* text mode intense attribute */ extern int attrib_gr_intense; /* graphics mode intense attribute */ - extern boolean tiles_on; - extern boolean traditional; extern boolean inmap; /* in the map window */ /* --- 131,136 ---- *************** *** 154,160 **** map[y][x].ch = S_stone; map[y][x].attr = 0;} } # define TOP_MAP_ROW 1 # if defined(OVLB) - boolean overview; STATIC_VAR int vgacmap[CLR_MAX] = {0,3,5,9,4,8,12,14,11,2,6,7,1,8,12,13}; STATIC_VAR int viewport_size = 40; STATIC_VAR char masktable[8]={0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01}; --- 152,157 ---- *************** *** 184,190 **** # else extern int vgacmap[CLR_MAX]; extern int viewport_size; - extern boolean overview; extern char masktable[8]; extern char bittable[8]; extern char defpalette[]; --- 181,186 ---- *************** *** 257,263 **** } outportb(0x3ce,5); outportb(0x3cf,0); ! if (tiles_on) vga_clearmap(); vga_gotoloc(0,0); /* is this needed? */ } --- 253,259 ---- } outportb(0x3ce,5); outportb(0x3cf,0); ! if (iflags.tile_view) vga_clearmap(); vga_gotoloc(0,0); /* is this needed? */ } *************** *** 397,405 **** map[row - TOP_MAP_ROW][col].ch = ch; attr = (g_attribute == 0) ? attrib_gr_normal : g_attribute; map[row - TOP_MAP_ROW][col].attr = attr; ! if (traditional) { vga_WriteChar((unsigned char)ch,col,row,attr); ! } else if (!overview) { if ((col >= clipx) && (col <= clipxmax)) { if (!ReadPlanarTileFile(glyph2tile[glyphnum], &planecell)) vga_DisplayCell(planecell, --- 393,401 ---- map[row - TOP_MAP_ROW][col].ch = ch; attr = (g_attribute == 0) ? attrib_gr_normal : g_attribute; map[row - TOP_MAP_ROW][col].attr = attr; ! if (iflags.traditional_view) { vga_WriteChar((unsigned char)ch,col,row,attr); ! } else if (!iflags.over_view) { if ((col >= clipx) && (col <= clipxmax)) { if (!ReadPlanarTileFile(glyph2tile[glyphnum], &planecell)) vga_DisplayCell(planecell, *************** *** 448,454 **** extern boolean restoring; int oldx = clipx; ! if (!tiles_on || overview || traditional) return; if (x < clipx + 5) { clipx = max(0, x - (viewport_size / 2)); --- 444,451 ---- extern boolean restoring; int oldx = clipx; ! if (!iflags.tile_view || iflags.over_view || iflags.traditional_view) ! return; if (x < clipx + 5) { clipx = max(0, x - (viewport_size / 2)); *************** *** 500,506 **** for (x = clipx; x <= clipxmax; ++x) for (y = 0; y < ROWNO; ++y) { # endif ! if (traditional) { if (!(clearfirst && map[y][x].ch == S_stone)) vga_WriteChar( (unsigned char)map[y][x].ch, --- 497,503 ---- for (x = clipx; x <= clipxmax; ++x) for (y = 0; y < ROWNO; ++y) { # endif ! if (iflags.traditional_view) { if (!(clearfirst && map[y][x].ch == S_stone)) vga_WriteChar( (unsigned char)map[y][x].ch, *************** *** 508,514 **** } else { t = map[y][x].glyph; if (!(clearfirst && t == cmap_to_glyph(S_stone))) { ! if (!overview) { if (!ReadPlanarTileFile(glyph2tile[t], &planecell)) { vga_DisplayCell(planecell, --- 505,511 ---- } else { t = map[y][x].glyph; if (!(clearfirst && t == cmap_to_glyph(S_stone))) { ! if (!iflags.over_view) { if (!ReadPlanarTileFile(glyph2tile[t], &planecell)) { vga_DisplayCell(planecell, *************** *** 540,546 **** int x; /* pline("Into userpan"); */ ! if (overview || traditional) return; if (left) x = min(COLNO - 1, clipxmax + 10); else --- 537,543 ---- int x; /* pline("Into userpan"); */ ! if (iflags.over_view || iflags.traditional_view) return; if (left) x = min(COLNO - 1, clipxmax + 10); else *************** *** 556,574 **** { /* vga_HideCursor(); */ if (on) { ! overview = TRUE; clipx = 0; clipxmax = CO - 1; } else { ! overview = FALSE; clipx = max(0, (curcol - viewport_size / 2)); if (clipx > ((CO - 1) - viewport_size)) clipx = (CO - 1) - viewport_size; clipxmax = clipx + (viewport_size - 1); } - positionbar(); - vga_redrawmap(1); - vga_DrawCursor(); } void vga_traditional(on) --- 553,568 ---- { /* vga_HideCursor(); */ if (on) { ! iflags.over_view = TRUE; clipx = 0; clipxmax = CO - 1; } else { ! iflags.over_view = FALSE; clipx = max(0, (curcol - viewport_size / 2)); if (clipx > ((CO - 1) - viewport_size)) clipx = (CO - 1) - viewport_size; clipxmax = clipx + (viewport_size - 1); } } void vga_traditional(on) *************** *** 577,592 **** /* vga_HideCursor(); */ if (on) { /* switch_graphics(ASCII_GRAPHICS); */ ! traditional = TRUE; clipx = 0; clipxmax = CO - 1; } else { ! traditional = FALSE; ! clipx = max(0, (curcol - viewport_size / 2)); ! if (clipx > ((CO - 1) - viewport_size)) ! clipx = (CO - 1) - viewport_size; ! clipxmax = clipx + (viewport_size - 1); } positionbar(); vga_redrawmap(1); vga_DrawCursor(); --- 571,592 ---- /* vga_HideCursor(); */ if (on) { /* switch_graphics(ASCII_GRAPHICS); */ ! iflags.traditional_view = TRUE; clipx = 0; clipxmax = CO - 1; } else { ! iflags.traditional_view = FALSE; ! if (!iflags.over_view) { ! clipx = max(0, (curcol - viewport_size / 2)); ! if (clipx > ((CO - 1) - viewport_size)) ! clipx = (CO - 1) - viewport_size; ! clipxmax = clipx + (viewport_size - 1); ! } } + } + + void vga_refresh() + { positionbar(); vga_redrawmap(1); vga_DrawCursor(); *************** *** 687,695 **** raw_printf("Reverting to TTY mode, tile initialization failure (%d).", tilefailure); wait_synch(); ! flags.usevga = 0; ! tiles_on = FALSE; ! overview = FALSE; CO = 80; LI = 25; /* clear_screen() /* not vga_clear_screen() */ --- 687,695 ---- raw_printf("Reverting to TTY mode, tile initialization failure (%d).", tilefailure); wait_synch(); ! iflags.usevga = 0; ! iflags.tile_view = FALSE; ! iflags.over_view = FALSE; CO = 80; LI = 25; /* clear_screen() /* not vga_clear_screen() */ *************** *** 697,703 **** } # endif ! if (flags.usevga) { for (i=0; i < SCREENHEIGHT; ++i) { screentable[i]=MK_PTR(VIDEOSEG, (i * SCREENBYTES)); } --- 697,703 ---- } # endif ! if (iflags.usevga) { for (i=0; i < SCREENHEIGHT; ++i) { screentable[i]=MK_PTR(VIDEOSEG, (i * SCREENBYTES)); } *************** *** 707,714 **** /* vga_NoBorder(BACKGROUND_VGA_COLOR); /* Not needed after palette mod */ # ifdef USE_TILES paletteptr = tibheader.palette; ! tiles_on = TRUE; ! overview = FALSE; # else paletteptr = defpalette; # endif --- 707,714 ---- /* vga_NoBorder(BACKGROUND_VGA_COLOR); /* Not needed after palette mod */ # ifdef USE_TILES paletteptr = tibheader.palette; ! iflags.tile_view = TRUE; ! iflags.over_view = FALSE; # else paletteptr = defpalette; # endif *************** *** 733,747 **** union REGS regs; if ((mode == MODE640x480) || (mode == MODETEXT)) { ! if (flags.usevga && (mode == MODE640x480)) { ! flags.grmode = 1; } else { ! flags.grmode = 0; } regs.x.ax = mode; (void) int86(VIDEO_BIOS, ®s, ®s); } else { ! flags.grmode = 0; /* force text mode for error msg */ regs.x.ax = MODETEXT; (void) int86(VIDEO_BIOS, ®s, ®s); g_attribute = attrib_text_normal; --- 733,747 ---- union REGS regs; if ((mode == MODE640x480) || (mode == MODETEXT)) { ! if (iflags.usevga && (mode == MODE640x480)) { ! iflags.grmode = 1; } else { ! iflags.grmode = 0; } regs.x.ax = mode; (void) int86(VIDEO_BIOS, ®s, ®s); } else { ! iflags.grmode = 0; /* force text mode for error msg */ regs.x.ax = MODETEXT; (void) int86(VIDEO_BIOS, ®s, ®s); g_attribute = attrib_text_normal; *************** *** 762,768 **** vga_SwitchMode(MODETEXT); windowprocs.win_cliparound = tty_cliparound; g_attribute = attrib_text_normal; ! tiles_on = FALSE; } #if 0 --- 762,768 ---- vga_SwitchMode(MODETEXT); windowprocs.win_cliparound = tty_cliparound; g_attribute = attrib_text_normal; ! iflags.tile_view = FALSE; } #if 0 *************** *** 1049,1055 **** int pixy = (PBAR_ROW * MAX_ROWS_PER_CELL); int tmp; ! if (!flags.grmode || !tiles_on) return; if ((clipx < 0) || (clipxmax <= 0) || (clipx >= clipxmax)) nowhere = TRUE; if (nowhere) { --- 1049,1055 ---- int pixy = (PBAR_ROW * MAX_ROWS_PER_CELL); int tmp; ! if (!iflags.grmode || !iflags.tile_view) return; if ((clipx < 0) || (clipxmax <= 0) || (clipx >= clipxmax)) nowhere = TRUE; if (nowhere) { *************** *** 1186,1192 **** /* char on[2] = {0xFF,0xFF}; */ /* char off[2] = {0x00,0x00}; */ boolean isrogue = Is_rogue_level(&u.uz); ! boolean singlebyte = (isrogue || overview || traditional || !inmap); int curtyp; if (!cursor_type && inmap) return; /* CURSOR_INVIS - nothing to do */ --- 1186,1193 ---- /* char on[2] = {0xFF,0xFF}; */ /* char off[2] = {0x00,0x00}; */ boolean isrogue = Is_rogue_level(&u.uz); ! boolean singlebyte = (isrogue || iflags.over_view ! || iflags.traditional_view || !inmap); int curtyp; if (!cursor_type && inmap) return; /* CURSOR_INVIS - nothing to do */ *************** *** 1385,1391 **** char __far *tmp1; char __far *tmp2; boolean isrogue = Is_rogue_level(&u.uz); ! boolean singlebyte = (isrogue || overview || traditional || !inmap); int curtyp; if (inmap && !cursor_type) return; /* CURSOR_INVIS - nothing to do */ --- 1386,1393 ---- char __far *tmp1; char __far *tmp2; boolean isrogue = Is_rogue_level(&u.uz); ! boolean singlebyte = (isrogue || iflags.over_view ! || iflags.traditional_view || !inmap); int curtyp; if (inmap && !cursor_type) return; /* CURSOR_INVIS - nothing to do */ *** Old/sys/os2/Install.os2 Tue Dec 10 16:53:40 1996 --- sys/os2/Install.os2 Mon Nov 4 09:01:18 1996 *************** *** 2,18 **** on an OS/2 system ===================================================== Timo Hakulinen ! Last revision: 29 February 1996 ! ! NOTE: All instructions given in this file for building NetHack 3.2 for ! OS/2 should be considered tentative. They are in fact virtually unchanged ! from the notes for NetHack 3.1. This is due to the fact that, unfortunately, ! the DevTeam currently has no access to a machine running OS/2 and, thus, ! no way of verifying the correct procedures. If you build NetHack using the ! included makefile, please send the changes you had to make, if any, to ! nethack-bugs@linc.cis.upenn.edu. Also, please report any information given ! in this file which you find incorrect or inaccurate. If nothing needs to ! be changed (unlikely), it would be nice to know that too. 0. Read this entire file before starting, and come back to the Notes below if you have any problems. --- 2,8 ---- on an OS/2 system ===================================================== Timo Hakulinen ! Last revision: 29 October 1996 0. Read this entire file before starting, and come back to the Notes below if you have any problems. *************** *** 53,62 **** compiler: runs in: compiles for: ! Microsoft C 5.1 DOS / OS/2 1.0-2.x OS/2 1.x Microsoft 6.0A (see note 5) - " - - " - ! IBM C Set/2 1.00, Toolkit/2 2.00 OS/2 2.x OS/2 2.x ! GCC emx 0.8f (see note 6) OS/2 2.x OS/2 2.x Note that code compiled for OS/2 versions 1.0-1.3 runs unmodified in OS/2 versions 2.0 and up. In principle it should be possible to cross compile --- 43,53 ---- compiler: runs in: compiles for: ! Microsoft C 5.1 DOS / OS/2 1.0-Warp OS/2 1.x Microsoft 6.0A (see note 5) - " - - " - ! IBM C Set/2 1.00, Toolkit/2 2.00 OS/2 2.x, Warp OS/2 2.x, Warp ! IBM CSet++ 2.00 OS/2 2.x, Warp OS/2 2.x, Warp ! GCC emx 0.8f (see note 6) OS/2 2.x, Warp OS/2 2.x, Warp Note that code compiled for OS/2 versions 1.0-1.3 runs unmodified in OS/2 versions 2.0 and up. In principle it should be possible to cross compile *** Old/sys/os2/Makefile.os2 Tue Dec 10 16:53:43 1996 --- sys/os2/Makefile.os2 Tue Nov 5 17:21:56 1996 *************** *** 1,19 **** ! # SCCS Id: @(#)Makefile.os2 3.2 96/03/12 # OS/2 NetHack 3.2 Makefile for OS/2 versions 1.x and 2.x # Copyright (C) 1990, 1991, 1992, 1993, 1996 Timo Hakulinen # ! # NOTE: This makefile for NetHack 3.2 is untested because the ! # DevTeam currently has no access to a machine running OS/2. If ! # you build NetHack using this makefile, please send the changes ! # you had to make, if any, to nethack-bugs@linc.cis.upenn.edu. ! # If nothing had to be changed (unlikely), it would be nice to ! # know that too. ! # ! # The supported compilers list is from the NetHack 3.1 era. There ! # should be newer versions of all these compilers nowadays. # # Supported compilers: Microsoft C 5.1 and 6.0A, GCC emx 0.8f, ! # IBM C Set/2 1.00 with Toolkit/2 2.00. # # NDMAKE ver 4.5, Microsoft/IBM NMAKE, or Dennis Vadura's DMAKE is # required; old MS-MAKE will not work. To enable the appropriate --- 1,12 ---- ! # SCCS Id: @(#)Makefile.os2 3.2 96/10/29 # OS/2 NetHack 3.2 Makefile for OS/2 versions 1.x and 2.x # Copyright (C) 1990, 1991, 1992, 1993, 1996 Timo Hakulinen # ! # The supported compilers list is mainly from the NetHack 3.1 era. ! # There should be newer versions of all these compilers nowadays. # # Supported compilers: Microsoft C 5.1 and 6.0A, GCC emx 0.8f, ! # GCC emx 0.9c, IBM C Set/2 1.00 with Toolkit/2 2.00, IBM CSet++ 2.01. # # NDMAKE ver 4.5, Microsoft/IBM NMAKE, or Dennis Vadura's DMAKE is # required; old MS-MAKE will not work. To enable the appropriate *************** *** 24,29 **** --- 17,25 ---- # libraries if cross-compiling in DOS, and to protected mode libraries # for compilation in OS/2. # + # GNU MAKE for OS/2 seems to be too limited / braindamaged at the + # moment for me to bother implementing support for it. Maybe later. + # # Copy this file into $(SRC) directory, rename it to "makefile" # (important, many targets rely on it), compile and link inside # $(SRC). If required, termcap library can be built from termcap *************** *** 32,42 **** # "MSC" in this makefile refers to Microsoft C 5.1 and 6.0A. # Whenever the distinction is significant, it is indicated. # ! # "GCC" refers to GCC emx 0.8f only. No other ports of ! # GCC are supported. # ! # "CSet/2" is the IBM 32 bit C compiler for OS/2 2.0. CSet/2 # support courtesy Jeff Urlwin (jurlwin@gandalf.umcs.maine.edu). # # "OMF" is short for "Object Module Format" and refers to the # standard OS/2 object format, which e.g. link386 uses. MSC and --- 28,42 ---- # "MSC" in this makefile refers to Microsoft C 5.1 and 6.0A. # Whenever the distinction is significant, it is indicated. # ! # "GCC" refers to GCC emx only. No other ports of GCC are supported. ! # Additional credits for honing GCC support for 3.2 go to Ronald ! # Van Iwaarden (rrt0136@ibm.net) and Stefan Neis (neis@cs.uni-sb.de). # ! # "CSet/2" refers to both older CSet/2 ver 1 (IBM 32 bit C compiler for ! # OS/2 2.0) and newer CSet++ ver 2 (C/C++ compiler). Original CSet/2 # support courtesy Jeff Urlwin (jurlwin@gandalf.umcs.maine.edu). + # CSet++ support courtesy Helge Hafting (hhafting@intermec.no) and + # Justin Frank (belford-manor@worldnet.att.net). # # "OMF" is short for "Object Module Format" and refers to the # standard OS/2 object format, which e.g. link386 uses. MSC and *************** *** 148,154 **** # Source tree base directory. # ! NHSRC = \nh31 # # Source directories. Makedefs hardcodes these, don't change them. --- 148,154 ---- # Source tree base directory. # ! NHSRC = \nh32 # # Source directories. Makedefs hardcodes these, don't change them. *************** *** 175,181 **** OBJ = \tmp\obj # Object files TEMP = \tmp\bin # Temporary files during make process ! GAMEDIR = \games\nh31 # Game directory PLIBP = d:\c6\lib # Protected mode C libraries RLIBP = d:\c6\lib # Possible real mode C libraries --- 175,181 ---- OBJ = \tmp\obj # Object files TEMP = \tmp\bin # Temporary files during make process ! GAMEDIR = \games\nh32 # Game directory PLIBP = d:\c6\lib # Protected mode C libraries RLIBP = d:\c6\lib # Possible real mode C libraries *************** *** 189,194 **** --- 189,202 ---- GAMEDES = "NetHack 3.2" # + # Only if you're using CSet/2. Define the upper line for ver. 1, + # the lower one for ver. 2 (= CSet++). + # + + #CSETVER = /DOS2_CSET2_VER_1 + CSETVER = /DOS2_CSET2_VER_2 + + # # The uppermost two lines for MSC, the middle two for GCC, and # the lowermost two for CSet/2. # *************** *** 202,216 **** # include file path, debug flags, ANSI conformance. # # CSet/2: compile only, compiler id, migration lib, remove stack probes, ! # force intra 64K alignment for data, force optlink linkage on function ! # calls, warning level, include file path, debug flags, ANSI conformance. # CFLAGS = /c /DOS2_MSC /AL /O /Gs /G2 /Gt10 /Zp1 /FPi $(WARN) /I$(INCL) $(BIGC) $(CDFLAGS) $(STDC) O = /Fo #CFLAGS = -c -DOS2_GCC $(GCCO) $(WARN) -I$(INCL) $(CDFLAGS) $(STDC) #O = -o ! #CFLAGS = /c /DOS2_CSET2 /Sm /Gs /Gt+ /Mp $(WARN) /I$(INCL) $(CDFLAGS) $(STDC) #O = /Fo # --- 210,226 ---- # include file path, debug flags, ANSI conformance. # # CSet/2: compile only, compiler id, migration lib, remove stack probes, ! # large 32 bit memory model, fast integer code, optimize (to avoid a ! # compiler bug - sometimes it *does* work that way around), don't print ! # IBM logo, force optlink linkage on function calls, warning level, ! # include file path, debug flags, ANSI conformance. # CFLAGS = /c /DOS2_MSC /AL /O /Gs /G2 /Gt10 /Zp1 /FPi $(WARN) /I$(INCL) $(BIGC) $(CDFLAGS) $(STDC) O = /Fo #CFLAGS = -c -DOS2_GCC $(GCCO) $(WARN) -I$(INCL) $(CDFLAGS) $(STDC) #O = -o ! #CFLAGS = /c /DOS2_CSET2 $(CSETVER) /Sm /Gs+ /Gt- /Gi+ /O+ /Q+ /Mp $(WARN) /I$(INCL) $(CDFLAGS) $(STDC) #O = /Fo # *************** *** 263,271 **** # # GCC: likes a big stack. # ! LFLAGS = /noig /nod /stack:8192 /seg:1024 $(LDFLAGS) # MSC, CSet/2 #LFLAGS = /noig /stack:40000 # GCC OMF # # Prepare for a debugger. --- 273,284 ---- # # GCC: likes a big stack. # + # CSet/2: give it a bit more stack since we can. + # ! LFLAGS = /noig /nod /stack:8192 /seg:1024 $(LDFLAGS) # MSC #LFLAGS = /noig /stack:40000 # GCC OMF + #LFLAGS = /noig /nod /stack:32768 /seg:1024 $(LDFLAGS) # CSet/2 # # Prepare for a debugger. *************** *** 301,320 **** # MSC: Protected mode C libraries for 8087 emulator, # OS/2 API entry points. # ! # GCC OMF: C standard lib, extra GCC lib, static system lib, # OS/2 API entry points. # # GCC a.out: extra GCC lib, C standard lib, extra GCC lib (again), # OS/2 API entry points. # # CSet/2: C standard libraries, OS/2 API entry points. # #PLIBS = $(PLIBP)\llibcep $(PLIBP)\doscalls # MSC 5.1 PLIBS = $(PLIBP)\llibcep $(PLIBP)\os2 # MSC 6.0 ! #PLIBS = $(PLIBP)\libc $(PLIBP)\libgcc $(PLIBP)\libsys $(PLIBP)\libos2 # GCC OMF #PLIBS = -lgcc -lc -lgcc -los2 # GCC a.out (defining -lgcc twice is required) ! #PLIBS = $(PLIBP)\dde4sbs.lib $(PLIBP)\dde4sbm.lib $(TLIBP)\os2386.lib # CSet/2 # # C libraries used by makedefs, lev_comp and dgn_comp (change if --- 314,340 ---- # MSC: Protected mode C libraries for 8087 emulator, # OS/2 API entry points. # ! # GCC emx 0.8 OMF: C standard lib, extra GCC lib, static system lib, # OS/2 API entry points. # + # GCC emx 0.9 OMF: C single-threaded libs, Unix system call alias lib, + # extra GCC lib, single threaded system lib, OS/2 API entry points. + # Note that emx changed library naming convention between 0.8 and 0.9. + # # GCC a.out: extra GCC lib, C standard lib, extra GCC lib (again), # OS/2 API entry points. # # CSet/2: C standard libraries, OS/2 API entry points. + # Note that ver 1 needs lib dde4sbm.lib whereas ver 2 doesn't. # #PLIBS = $(PLIBP)\llibcep $(PLIBP)\doscalls # MSC 5.1 PLIBS = $(PLIBP)\llibcep $(PLIBP)\os2 # MSC 6.0 ! #PLIBS = $(PLIBP)\libc $(PLIBP)\libgcc $(PLIBP)\libsys $(PLIBP)\libos2 # GCC emx 0.8 OMF ! #PLIBS = $(PLIBP)\st\c $(PLIBP)\st\c_app $(PLIBP)\c_alias $(PLIBP)\gcc $(PLIBP)\st\sys $(PLIBP)\os2 # GCC emx 0.9 OMF #PLIBS = -lgcc -lc -lgcc -los2 # GCC a.out (defining -lgcc twice is required) ! #PLIBS = $(PLIBP)\dde4sbs.lib $(PLIBP)\dde4sbm.lib $(TLIBP)\os2386.lib # CSet/2 ver 1 ! #PLIBS = $(PLIBP)\dde4sbs.lib $(TLIBP)\os2386.lib # CSet++ ver 2 # # C libraries used by makedefs, lev_comp and dgn_comp (change if *************** *** 724,729 **** --- 744,750 ---- $(ECHO) $(VOBJ26) +>> $@ $(ECHO) $(VOBJ27) +>> $@ $(ECHO) $(VOBJ28) +>> $@ + $(ECHO) $(VOBJ29) +>> $@ $(ECHO) $(HHOBJ)>> $@ $(ECHO) $(GAMEDIR)\$(GAME).exe>> $@ $(ECHO) $(TEMP)\$(GAME)>> $@ *************** *** 795,801 **** $(ECHO) $(RLIBS)>> $@ $(ECHO) $(DGNCMD) $(LFLAGS);>> $@ ! $(OBJ)\dgn_yacc.o : $(UTIL)\$(CB) $(CONFIG_H) $(INCL)\dgn_file.h $(UTILCC) $(OBJ)\dgn_lex.o : $(UTIL)\$(CB) $(CONFIG_H) $(INCL)\dgn_comp.h $(INCL)\dgn_file.h $(UTILCC) --- 816,822 ---- $(ECHO) $(RLIBS)>> $@ $(ECHO) $(DGNCMD) $(LFLAGS);>> $@ ! $(OBJ)\dgn_yacc.o : $(UTIL)\$(CB) $(CONFIG_H) $(INCL)\date.h $(INCL)\dgn_file.h $(UTILCC) $(OBJ)\dgn_lex.o : $(UTIL)\$(CB) $(CONFIG_H) $(INCL)\dgn_comp.h $(INCL)\dgn_file.h $(UTILCC) *** Old/sys/os2/os2.c Tue Dec 10 16:53:49 1996 --- sys/os2/os2.c Mon Jun 17 18:34:24 1996 *************** *** 28,34 **** char ch; /* BIOSgetch can use the numeric key pad on IBM compatibles. */ ! if (flags.BIOS) ch = BIOSgetch(); else ch = DOSgetch(); --- 28,34 ---- char ch; /* BIOSgetch can use the numeric key pad on IBM compatibles. */ ! if (iflags.BIOS) ch = BIOSgetch(); else ch = DOSgetch(); *************** *** 46,52 **** /* * Keypad keys are translated to the normal values below. ! * When flags.BIOS is active, shifted keypad keys are translated to the * shift values below. */ static const struct pad { --- 46,52 ---- /* * Keypad keys are translated to the normal values below. ! * When iflags.BIOS is active, shifted keypad keys are translated to the * shift values below. */ static const struct pad { *************** *** 124,130 **** /* Translate keypad keys */ if (iskeypad(scan)) { ! kpad = flags.num_pad ? numpad : keypad; if (shift & SHIFT_KEY) ch = kpad[scan - KEYPADLO].shift; else if (shift & CTRL_KEY) --- 124,130 ---- /* Translate keypad keys */ if (iskeypad(scan)) { ! kpad = iflags.num_pad ? numpad : keypad; if (shift & SHIFT_KEY) ch = kpad[scan - KEYPADLO].shift; else if (shift & CTRL_KEY) *************** *** 294,300 **** KBDINFO KbdInfo; HKBD KbdHandle = 0; ! if (!flags.rawio) return; KbdInfo.cb = sizeof(KbdInfo); KbdGetStatus(&KbdInfo,KbdHandle); KbdInfo.fsMask &= 0xFFF7; /* ASCII off */ --- 294,300 ---- KBDINFO KbdInfo; HKBD KbdHandle = 0; ! if (!iflags.rawio) return; KbdInfo.cb = sizeof(KbdInfo); KbdGetStatus(&KbdInfo,KbdHandle); KbdInfo.fsMask &= 0xFFF7; /* ASCII off */ *************** *** 308,314 **** KBDINFO KbdInfo; HKBD KbdHandle = 0; ! if (!flags.rawio) return; KbdInfo.cb = sizeof(KbdInfo); KbdGetStatus(&KbdInfo,KbdHandle); KbdInfo.fsMask &= 0xFFFB; /* BINARY off */ --- 308,314 ---- KBDINFO KbdInfo; HKBD KbdHandle = 0; ! if (!iflags.rawio) return; KbdInfo.cb = sizeof(KbdInfo); KbdGetStatus(&KbdInfo,KbdHandle); KbdInfo.fsMask &= 0xFFFB; /* BINARY off */ *** Old/sys/share/dgn_lex.c Tue Dec 10 16:53:59 1996 --- sys/share/dgn_lex.c Mon Nov 25 19:19:54 1996 *************** *** 87,99 **** void FDECL(init_yyin, (FILE *)); void FDECL(init_yyout, (FILE *)); - #ifdef MICRO - #undef exit - # if !defined(MSDOS) && !defined(WIN32) - extern void FDECL(exit, (int)); - # endif - #endif - /* this doesn't always get put in dgn_comp.h * (esp. when using older versions of bison) */ --- 87,92 ---- *** Old/sys/share/dgn_yacc.c Tue Dec 10 16:54:02 1996 --- sys/share/dgn_yacc.c Mon Nov 25 19:19:46 1996 *************** *** 8,14 **** #define yyerrok (yyerrflag=0) #define YYRECOVERING (yyerrflag!=0) #define YYPREFIX "yy" ! /* SCCS Id: @(#)dgn_comp.c 3.2 96/05/10 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* Copyright (c) 1990 by M. Stephenson */ /* NetHack may be freely redistributed. See license for details. */ --- 8,14 ---- #define yyerrok (yyerrflag=0) #define YYRECOVERING (yyerrflag!=0) #define YYPREFIX "yy" ! /* SCCS Id: @(#)dgn_comp.c 3.2 96/06/22 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* Copyright (c) 1990 by M. Stephenson */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 57,69 **** #endif #endif - #ifdef MICRO - # undef exit - # if !defined(MSDOS) && !defined(WIN32) - extern void FDECL(exit, (int)); - # endif - #endif - #define ERR (-1) static struct couple couple; --- 57,62 ---- *************** *** 548,554 **** { int nd, cl = 0, nl = 0, cb = 0, nb = 0; ! static unsigned long version_info[4] = { VERSION_NUMBER, VERSION_FEATURES, VERSION_SANITY1, VERSION_SANITY2 }; --- 541,547 ---- { int nd, cl = 0, nl = 0, cb = 0, nb = 0; ! static struct version_info version_data = { VERSION_NUMBER, VERSION_FEATURES, VERSION_SANITY1, VERSION_SANITY2 }; *************** *** 558,564 **** exit(EXIT_FAILURE); } ! if (fwrite((char *)version_info, sizeof version_info, 1, yyout) != 1) { yyerror("FATAL - output failure."); exit(EXIT_FAILURE); } --- 551,557 ---- exit(EXIT_FAILURE); } ! if (fwrite((char *)&version_data, sizeof version_data, 1, yyout) != 1) { yyerror("FATAL - output failure."); exit(EXIT_FAILURE); } *** Old/sys/share/lev_lex.c Tue Dec 10 16:54:11 1996 --- sys/share/lev_lex.c Mon Nov 25 19:20:37 1996 *************** *** 84,96 **** void FDECL(init_yyin, (FILE *)); void FDECL(init_yyout, (FILE *)); - #ifdef MICRO - #undef exit - # if !defined(MSDOS) && !defined(WIN32) - extern void FDECL(exit, (int)); - # endif - #endif - /* * This doesn't always get put in lev_comp.h * (esp. when using older versions of bison). --- 84,89 ---- *** Old/sys/share/lev_yacc.c Tue Dec 10 16:54:15 1996 --- sys/share/lev_yacc.c Mon Nov 25 19:20:11 1996 *************** *** 46,58 **** #define NewTab(type, size) (type **) alloc(sizeof(type *) * size) #define Free(ptr) free((genericptr_t)ptr) - #ifdef MICRO - # undef exit - # if !defined(MSDOS) && !defined(WIN32) - extern void FDECL(exit, (int)); - # endif - #endif - extern void FDECL(yyerror, (const char *)); extern void FDECL(yywarning, (const char *)); extern int NDECL(yylex); --- 46,51 ---- *** Old/sys/share/pcmain.c Tue Dec 10 16:54:21 1996 --- sys/share/pcmain.c Sat Oct 26 14:53:03 1996 *************** *** 53,58 **** --- 53,64 ---- static void FDECL(process_options,(int argc,char **argv)); STATIC_DCL void NDECL(nhusage); + #if defined(MICRO) || defined(WIN32) || defined(OS2) + extern void FDECL(nethack_exit,(int)); + #else + #define nethack_exit exit + #endif + #ifdef EXEPATH STATIC_DCL char *FDECL(exepath,(char *)); #endif *************** *** 86,92 **** { pcmain(argc,argv); moveloop(); ! exit(EXIT_SUCCESS); /*NOTREACHED*/ return 0; } --- 92,98 ---- { pcmain(argc,argv); moveloop(); ! nethack_exit(EXIT_SUCCESS); /*NOTREACHED*/ return 0; } *************** *** 126,132 **** if (getcwd(orgdir, sizeof orgdir) == (char *)0) error("NetHack: current directory path too long"); # ifndef NO_SIGNAL ! signal(SIGINT, (SIG_RET_TYPE) exit); /* restore original directory */ # endif #endif /* !AMIGA && !GNUDOS */ --- 132,138 ---- if (getcwd(orgdir, sizeof orgdir) == (char *)0) error("NetHack: current directory path too long"); # ifndef NO_SIGNAL ! signal(SIGINT, (SIG_RET_TYPE) nethack_exit); /* restore original directory */ # endif #endif /* !AMIGA && !GNUDOS */ *************** *** 164,170 **** #endif #if defined(TOS) && defined(TEXTCOLOR) ! if (flags.BIOS && flags.use_color) set_colors(); #endif if (!hackdir[0]) --- 170,176 ---- #endif #if defined(TOS) && defined(TEXTCOLOR) ! if (iflags.BIOS && iflags.use_color) set_colors(); #endif if (!hackdir[0]) *************** *** 202,213 **** chdirx(hackdir,0); #endif prscore(argc, argv); ! exit(EXIT_SUCCESS); } /* Don't inialize the window system just to print usage */ if (!strncmp(argv[1], "-?", 2) || !strncmp(argv[1], "/?", 2)) { nhusage(); ! exit(EXIT_SUCCESS); } } } --- 208,219 ---- chdirx(hackdir,0); #endif prscore(argc, argv); ! nethack_exit(EXIT_SUCCESS); } /* Don't inialize the window system just to print usage */ if (!strncmp(argv[1], "-?", 2) || !strncmp(argv[1], "/?", 2)) { nhusage(); ! nethack_exit(EXIT_SUCCESS); } } } *************** *** 306,314 **** (void) signal(SIGINT, (SIG_RET_TYPE) done1); #endif #ifdef NEWS ! if(flags.news){ display_file(NEWS, FALSE); ! flags.news = FALSE; } #endif pline("Restoring save file..."); --- 312,320 ---- (void) signal(SIGINT, (SIG_RET_TYPE) done1); #endif #ifdef NEWS ! if(iflags.news){ display_file(NEWS, FALSE); ! iflags.news = FALSE; } #endif pline("Restoring save file..."); *************** *** 392,398 **** break; #ifdef NEWS case 'n': ! flags.news = FALSE; break; #endif case 'u': --- 398,404 ---- break; #ifdef NEWS case 'n': ! iflags.news = FALSE; break; #endif case 'u': *************** *** 444,450 **** } else raw_printf("\nUnknown switch: %s", argv[0]); case '?': nhusage(); ! exit(EXIT_SUCCESS); } } } --- 450,456 ---- } else raw_printf("\nUnknown switch: %s", argv[0]); case '?': nhusage(); ! nethack_exit(EXIT_SUCCESS); } } } *************** *** 457,463 **** (void) Sprintf(buf1, "\nUsage: %s [-d dir] -s [-[%s]] [maxrank] [name]...\n or", hname, classes); ! if (!flags.window_inited) raw_printf(buf1); else (void) printf(buf1); --- 463,469 ---- (void) Sprintf(buf1, "\nUsage: %s [-d dir] -s [-[%s]] [maxrank] [name]...\n or", hname, classes); ! if (!iflags.window_inited) raw_printf(buf1); else (void) printf(buf1); *************** *** 478,484 **** #ifdef AMIGA Strcat(buf1," [-[lL]]"); #endif ! if (!flags.window_inited) raw_printf("%s\n",buf1); else (void) printf("%s\n",buf1); --- 484,490 ---- #ifdef AMIGA Strcat(buf1," [-[lL]]"); #endif ! if (!iflags.window_inited) raw_printf("%s\n",buf1); else (void) printf("%s\n",buf1); *** Old/sys/share/pcsys.c Tue Dec 10 16:54:24 1996 --- sys/share/pcsys.c Sat Oct 26 14:53:04 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)pcsys.c 3.2 93/05/24 /* NetHack may be freely redistributed. See license for details. */ /* --- 1,4 ---- ! /* SCCS Id: @(#)pcsys.c 3.2 96/10/21 /* NetHack may be freely redistributed. See license for details. */ /* *************** *** 27,32 **** --- 27,40 ---- #define filesize filesize_nh #endif + + #if defined(MICRO) || defined(WIN32) || defined(OS2) + void FDECL(nethack_exit,(int)); + #else + #define nethack_exit exit + #endif + static void NDECL(msexit); + #ifdef MOVERLAY extern void __far __cdecl _movepause( void ); extern void __far __cdecl _moveresume( void ); *************** *** 42,48 **** #endif #ifdef WIN32CON ! extern int ProgmanLaunched; /* from nttty.c */ #endif #ifdef MICRO --- 50,56 ---- #endif #ifdef WIN32CON ! extern int GUILaunched; /* from nttty.c */ #endif #ifdef MICRO *************** *** 99,105 **** } # ifdef TOS /* Some shells (e.g. Gulam) turn the cursor off when they exit */ ! if (flags.BIOS) (void)Cursconf(1, -1); # endif chdirx(hackdir, 0); --- 107,113 ---- } # ifdef TOS /* Some shells (e.g. Gulam) turn the cursor off when they exit */ ! if (iflags.BIOS) (void)Cursconf(1, -1); # endif chdirx(hackdir, 0); *************** *** 237,243 **** c = tgetch(); if (c == 'Y') c = 'y'; if (c != 'y') { settty("Be seeing you...\n"); ! exit(EXIT_SUCCESS); } set_lock_and_bones(); return; --- 245,251 ---- c = tgetch(); if (c == 'Y') c = 'y'; if (c != 'y') { settty("Be seeing you...\n"); ! nethack_exit(EXIT_SUCCESS); } set_lock_and_bones(); return; *************** *** 380,386 **** VA_START(fmt); VA_INIT(fmt, const char *); # if defined(MSDOS) ! if (flags.grmode) { char buf[BUFSZ]; Vsprintf(buf,fmt, VA_ARGS); --- 388,394 ---- VA_START(fmt); VA_INIT(fmt, const char *); # if defined(MSDOS) ! if (iflags.grmode) { char buf[BUFSZ]; Vsprintf(buf,fmt, VA_ARGS); *************** *** 459,478 **** return (FILE *)0; } /* Chdir back to original directory */ #ifdef TOS extern boolean run_from_desktop; /* set in pcmain.c */ #endif ! #undef exit ! #if !defined(MSDOS) && !defined(WIN32) ! extern void FDECL(exit, (int)); ! #endif ! ! void ! msexit(code) ! int code; { #ifdef CHDIR extern char orgdir[]; --- 467,487 ---- return (FILE *)0; } + #if defined(MICRO) || defined(WIN32) || defined(OS2) + void nethack_exit(code) + int code; + { + msexit(); + exit(code); + } + /* Chdir back to original directory */ #ifdef TOS extern boolean run_from_desktop; /* set in pcmain.c */ #endif ! static void msexit() { #ifdef CHDIR extern char orgdir[]; *************** *** 500,513 **** # endif #endif #ifdef WIN32CON ! /* Only if we started from Progman, not command prompt, * we need to get one last return, so the score board does * not vanish instantly after being created. ! * ProgmanLaunched is defined and set in nttty.c. */ ! if (ProgmanLaunched) getreturn("to end"); #endif - exit(code); return; } --- 509,522 ---- # endif #endif #ifdef WIN32CON ! /* Only if we started from the GUI, not the command prompt, * we need to get one last return, so the score board does * not vanish instantly after being created. ! * GUILaunched is defined and set in nttty.c. */ ! if (GUILaunched) getreturn("to end"); #endif return; } + #endif /* MICRO || WIN32 || OS2 */ *** Old/sys/share/pctty.c Tue Dec 10 16:54:26 1996 --- sys/share/pctty.c Mon Jun 17 18:35:04 1996 *************** *** 19,25 **** gettty(){ erase_char = '\b'; kill_char = 21; /* cntl-U */ ! flags.cbreak = TRUE; #if !defined(TOS) disable_ctrlP(); /* turn off ^P processing */ #endif --- 19,25 ---- gettty(){ erase_char = '\b'; kill_char = 21; /* cntl-U */ ! iflags.cbreak = TRUE; #if !defined(TOS) disable_ctrlP(); /* turn off ^P processing */ #endif *************** *** 74,80 **** VA_START(s); VA_INIT(s, const char *); /* error() may get called before tty is initialized */ ! if (flags.window_inited) end_screen(); putchar('\n'); Vprintf(s,VA_ARGS); putchar('\n'); --- 74,80 ---- VA_START(s); VA_INIT(s, const char *); /* error() may get called before tty is initialized */ ! if (iflags.window_inited) end_screen(); putchar('\n'); Vprintf(s,VA_ARGS); putchar('\n'); *** Old/sys/share/unixtty.c Tue Dec 10 16:54:42 1996 --- sys/share/unixtty.c Sun Oct 27 19:33:05 1996 *************** *** 202,209 **** if(s) raw_print(s); if(STTY(&inittyb) < 0 || STTY2(&inittyb2) < 0) perror("NetHack (settty)"); ! flags.echo = (inittyb.echoflgs & ECHO) ? ON : OFF; ! flags.cbreak = (CBRKON(inittyb.cbrkflgs & CBRKMASK)) ? ON : OFF; curttyb.inputflags |= STRIPHI; setioctls(); } --- 202,209 ---- if(s) raw_print(s); if(STTY(&inittyb) < 0 || STTY2(&inittyb2) < 0) perror("NetHack (settty)"); ! iflags.echo = (inittyb.echoflgs & ECHO) ? ON : OFF; ! iflags.cbreak = (CBRKON(inittyb.cbrkflgs & CBRKMASK)) ? ON : OFF; curttyb.inputflags |= STRIPHI; setioctls(); } *************** *** 218,225 **** register int cf = CBRKON(CBRKMASK); /* desired value of flags & CBREAK */ #endif register int change = 0; ! flags.cbreak = ON; ! flags.echo = OFF; /* Should use (ECHO|CRMOD) here instead of ECHO */ if((curttyb.echoflgs & ECHO) != ef){ curttyb.echoflgs &= ~ECHO; --- 218,225 ---- register int cf = CBRKON(CBRKMASK); /* desired value of flags & CBREAK */ #endif register int change = 0; ! iflags.cbreak = ON; ! iflags.echo = OFF; /* Should use (ECHO|CRMOD) here instead of ECHO */ if((curttyb.echoflgs & ECHO) != ef){ curttyb.echoflgs &= ~ECHO; *************** *** 358,364 **** switch_graphics(IBM_GRAPHICS); # ifdef TEXTCOLOR if (has_colors()) ! flags.use_color = TRUE; # endif } # endif --- 358,364 ---- switch_graphics(IBM_GRAPHICS); # ifdef TEXTCOLOR if (has_colors()) ! iflags.use_color = TRUE; # endif } # endif *************** *** 366,374 **** #endif /* _M_UNIX */ /* fatal error */ /*VARARGS1*/ - void error VA_DECL(const char *,s) VA_START(s); --- 366,374 ---- #endif /* _M_UNIX */ + #ifndef __begui__ /* the Be GUI will define its own error proc */ /* fatal error */ /*VARARGS1*/ void error VA_DECL(const char *,s) VA_START(s); *************** *** 380,382 **** --- 380,383 ---- VA_END(); exit(EXIT_FAILURE); } + #endif /* !__begui__ */ *** Old/sys/unix/Makefile.src Tue Dec 10 16:55:25 1996 --- sys/unix/Makefile.src Tue Dec 10 16:44:00 1996 *************** *** 1,5 **** # NetHack Makefile. ! # SCCS Id: @(#)Makefile.src 3.2 96/05/08 # newer makes predefine $(MAKE) to 'make' and do smarter processing of # recursive make calls if $(MAKE) is used --- 1,5 ---- # NetHack Makefile. ! # SCCS Id: @(#)Makefile.src 3.2 96/10/26 # newer makes predefine $(MAKE) to 'make' and do smarter processing of # recursive make calls if $(MAKE) is used *************** *** 110,122 **** # flags for Linux # compile normally # CFLAGS = -O2 -fomit-frame-pointer -I../include -I/usr/X11/include # OR compile backwards compatible a.out format # CFLAGS = -O2 -b i486-linuxaout -fomit-frame-pointer -I../include -I/usr/X11/include # LFLAGS = -b i486-linuxaout -L/usr/X11/lib # flags for BeBox #CC = mwcc ! #CFLAGS = -r -D__beos__=1 -I../include #LD = mwld #LFLAGS = -map nethack.xMAP --- 110,123 ---- # flags for Linux # compile normally # CFLAGS = -O2 -fomit-frame-pointer -I../include -I/usr/X11/include + # LFLAGS = -L/usr/X11/lib # OR compile backwards compatible a.out format # CFLAGS = -O2 -b i486-linuxaout -fomit-frame-pointer -I../include -I/usr/X11/include # LFLAGS = -b i486-linuxaout -L/usr/X11/lib # flags for BeBox #CC = mwcc ! #CFLAGS = -r -I../include #LD = mwld #LFLAGS = -map nethack.xMAP *************** *** 154,165 **** # Systos needs -lcurses16 if you use -mshort # AIX 3.1 on RS/6000 likes -lcurses if TERMINFO defined in config.h # and -ltermcap otherwise ! # Be and Linux use -ltermcap # # libraries for tty ports # WINTTYLIB = -ltermcap # WINTTYLIB = -lcurses # WINTTYLIB = -lcurses16 WINTTYLIB = -ltermlib # # libraries for X11 --- 155,168 ---- # Systos needs -lcurses16 if you use -mshort # AIX 3.1 on RS/6000 likes -lcurses if TERMINFO defined in config.h # and -ltermcap otherwise ! # Linux uses -ltermcap or -lncurses ! # Be uses -ltermcap # # libraries for tty ports # WINTTYLIB = -ltermcap # WINTTYLIB = -lcurses # WINTTYLIB = -lcurses16 + # WINTTYLIB = -lncurses WINTTYLIB = -ltermlib # # libraries for X11 *************** *** 184,190 **** # LIBS = -lmalloc -linet # # Linux NetHack uses some bsd style ioctl functions, thus it is necessary to ! # use the bsd libs. # LIBS = -lbsd # # Solaris 2.x seems to work with the following --- 187,194 ---- # LIBS = -lmalloc -linet # # Linux NetHack uses some bsd style ioctl functions, thus it is necessary to ! # use the bsd libs. (Only if still compiling as BSD in unixconf.h; recent ! # versions compile fine using SYSV without this.) # LIBS = -lbsd # # Solaris 2.x seems to work with the following *************** *** 507,513 **** $(CC) $(CFLAGS) -c ../sys/unix/unixmain.c unixunix.o: ../sys/unix/unixunix.c ../include/hack.h $(CC) $(CFLAGS) -c ../sys/unix/unixunix.c ! bemain.o: ../sys/be/bemain.c ../include/hack.h $(CC) $(CFLAGS) -c ../sys/be/bemain.c getline.o: ../win/tty/getline.c ../include/hack.h ../include/wintty.h \ ../include/func_tab.h --- 511,517 ---- $(CC) $(CFLAGS) -c ../sys/unix/unixmain.c unixunix.o: ../sys/unix/unixunix.c ../include/hack.h $(CC) $(CFLAGS) -c ../sys/unix/unixunix.c ! bemain.o: ../sys/be/bemain.c ../include/hack.h ../include/dlb.h $(CC) $(CFLAGS) -c ../sys/be/bemain.c getline.o: ../win/tty/getline.c ../include/hack.h ../include/wintty.h \ ../include/func_tab.h *** Old/sys/unix/Makefile.utl Tue Dec 10 16:55:31 1996 --- sys/unix/Makefile.utl Tue Dec 10 16:44:02 1996 *************** *** 65,70 **** --- 65,71 ---- # flags for Linux # compile normally # CFLAGS = -O2 -fomit-frame-pointer -I../include -I/usr/X11/include + # LFLAGS = -L/usr/X11/lib # OR compile backwards compatible a.out format # CFLAGS = -O2 -b i486-linuxaout -fomit-frame-pointer -I../include -I/usr/X11/include # LFLAGS = -b i486-linuxaout -L/usr/X11/lib *************** *** 72,78 **** # flags for BeBox using the command line # remember to uncomment flex and bison below #CC = mwcc ! #CFLAGS = -D__beos__=1 -I../include # flags for debugging: # CFLAGS = -g -I../include --- 73,79 ---- # flags for BeBox using the command line # remember to uncomment flex and bison below #CC = mwcc ! #CFLAGS = -I../include # flags for debugging: # CFLAGS = -g -I../include *** Old/sys/unix/unixmain.c Tue Dec 10 16:55:52 1996 --- sys/unix/unixmain.c Tue Sep 24 20:37:10 1996 *************** *** 7,12 **** --- 7,13 ---- #include "hack.h" #include "dlb.h" + #include #include #include #ifndef O_RDONLY *************** *** 214,222 **** (void) chmod(SAVEF,0); /* disallow parallel restores */ (void) signal(SIGINT, (SIG_RET_TYPE) done1); #ifdef NEWS ! if(flags.news) { display_file(NEWS, FALSE); ! flags.news = FALSE; /* in case dorecover() fails */ } #endif pline("Restoring save file..."); --- 215,223 ---- (void) chmod(SAVEF,0); /* disallow parallel restores */ (void) signal(SIGINT, (SIG_RET_TYPE) done1); #ifdef NEWS ! if(iflags.news) { display_file(NEWS, FALSE); ! iflags.news = FALSE; /* in case dorecover() fails */ } #endif pline("Restoring save file..."); *************** *** 306,312 **** break; #ifdef NEWS case 'n': ! flags.news = FALSE; break; #endif case 'u': --- 307,313 ---- break; #ifdef NEWS case 'n': ! iflags.news = FALSE; break; #endif case 'u': *** Old/sys/unix/unixunix.c Tue Dec 10 16:55:55 1996 --- sys/unix/unixunix.c Mon Jun 17 18:34:55 1996 *************** *** 217,223 **** goto gotlock; (void) close(fd); ! if(flags.window_inited) { c = yn("There is already a game in progress under your name. Destroy old game?"); } else { (void) printf("\nThere is already a game in progress under your name."); --- 217,223 ---- goto gotlock; (void) close(fd); ! if(iflags.window_inited) { c = yn("There is already a game in progress under your name. Destroy old game?"); } else { (void) printf("\nThere is already a game in progress under your name."); *** Old/sys/vms/Install.vms Tue Dec 10 16:55:58 1996 --- sys/vms/Install.vms Mon Oct 21 22:13:25 1996 *************** *** 1,4 **** ! Instructions for Installing NetHack 3.2.1 on a VMS system ========================================= --- 1,4 ---- ! Instructions for Installing NetHack 3.2.2 on a VMS system ========================================= *************** *** 137,144 **** Notes: 1. Save files and bones files from earlier versions will not work with ! 3.2.1. The scoreboard file (RECORD) from versions older than 3.2.0 ! are not compatible, but one from version 3.2.0 is. 2. To specify user-preference options in your environment, define the logical name NETHACKOPTIONS to have the value of a quoted string --- 137,144 ---- Notes: 1. Save files and bones files from earlier versions will not work with ! 3.2.2. The scoreboard file (RECORD) from versions older than 3.2.0 ! are not compatible, but one from version 3.2.0 or 3.2.1 is. 2. To specify user-preference options in your environment, define the logical name NETHACKOPTIONS to have the value of a quoted string *************** *** 153,159 **** tradeoff for enabling checkpoint is that using it makes level changes do more I/O and take longer. The "menustyle" option controls some aspects of the user interface, and can be set to "menustyle:traditional" ! to make 3.2.1 behave more like 3.1.3. If logical name or DCL symbol NETHACKOPTIONS is not defined, NetHack will try HACKOPTIONS instead. Regardless of whether or not either --- 153,159 ---- tradeoff for enabling checkpoint is that using it makes level changes do more I/O and take longer. The "menustyle" option controls some aspects of the user interface, and can be set to "menustyle:traditional" ! to make 3.2.2 behave more like 3.1.3. If logical name or DCL symbol NETHACKOPTIONS is not defined, NetHack will try HACKOPTIONS instead. Regardless of whether or not either *************** *** 474,477 **** Always include version information for NetHack, the operating system, and the C compiler used. ! 24-MAY-1996 --- 474,477 ---- Always include version information for NetHack, the operating system, and the C compiler used. ! 20-OCT-1996 *** Old/sys/vms/Makefile.src Tue Dec 10 16:56:06 1996 --- sys/vms/Makefile.src Mon Oct 21 22:13:24 1996 *************** *** 1,5 **** # NetHack Makefile (VMS) - for building nethack itself. ! # SCCS Id: @(#)Makefile.src 3.2 96/05/24 # Copy this file to [.src]Makefile. and then edit it as needed. # If you changed CC or CFLAGS, make similar changes in [.util]Makefile. --- 1,5 ---- # NetHack Makefile (VMS) - for building nethack itself. ! # SCCS Id: @(#)Makefile.src 3.2 96/10/20 # Copy this file to [.src]Makefile. and then edit it as needed. # If you changed CC or CFLAGS, make similar changes in [.util]Makefile. *************** *** 92,98 **** # note: no trailing whitespace (or comment) after version or patchlevel numbers VERSION =3.2 ! PATCHLVL =1 MAKEDEFS = $(UTL)makedefs.exe; --- 92,98 ---- # note: no trailing whitespace (or comment) after version or patchlevel numbers VERSION =3.2 ! PATCHLVL =2 MAKEDEFS = $(UTL)makedefs.exe; *** Old/sys/vms/vmsbuild.com Tue Dec 10 16:56:25 1996 --- sys/vms/vmsbuild.com Mon Oct 21 22:13:24 1996 *************** *** 1,5 **** $ ! vms/vmsbuild.com -- compile and link NetHack 3.2.* [pr] ! $ version_number = "3.2.1" $ ! $ ! usage: $ ! $ set default [.src] !or [-.-.src] if starting from [.sys.vms] --- 1,5 ---- $ ! vms/vmsbuild.com -- compile and link NetHack 3.2.* [pr] ! $ version_number = "3.2.2" $ ! $ ! usage: $ ! $ set default [.src] !or [-.-.src] if starting from [.sys.vms] *** Old/sys/vms/vmsmain.c Tue Dec 10 16:56:33 1996 --- sys/vms/vmsmain.c Mon Jun 17 18:34:58 1996 *************** *** 188,196 **** (void) chmod(SAVEF,0); /* disallow parallel restores */ (void) signal(SIGINT, (SIG_RET_TYPE) done1); #ifdef NEWS ! if(flags.news) { display_file(NEWS, FALSE); ! flags.news = FALSE; /* in case dorecover() fails */ } #endif pline("Restoring save file..."); --- 188,196 ---- (void) chmod(SAVEF,0); /* disallow parallel restores */ (void) signal(SIGINT, (SIG_RET_TYPE) done1); #ifdef NEWS ! if(iflags.news) { display_file(NEWS, FALSE); ! iflags.news = FALSE; /* in case dorecover() fails */ } #endif pline("Restoring save file..."); *************** *** 258,264 **** break; #ifdef NEWS case 'n': ! flags.news = FALSE; break; #endif case 'u': --- 258,264 ---- break; #ifdef NEWS case 'n': ! iflags.news = FALSE; break; #endif case 'u': *** Old/sys/vms/vmstty.c Tue Dec 10 16:56:38 1996 --- sys/vms/vmstty.c Mon Jun 17 18:34:59 1996 *************** *** 129,138 **** key = (short)'\n'; } else if (kb_buf == ESC || kb_buf == CSI || kb_buf == SS3) { switch(parse_function_key((int)kb_buf)) { ! case SMG$K_TRM_UP: key = flags.num_pad ? '8' : 'k'; break; ! case SMG$K_TRM_DOWN: key = flags.num_pad ? '2' : 'j'; break; ! case SMG$K_TRM_LEFT: key = flags.num_pad ? '4' : 'h'; break; ! case SMG$K_TRM_RIGHT: key = flags.num_pad ? '6' : 'l'; break; default: key = ESC; break; } } else { --- 129,138 ---- key = (short)'\n'; } else if (kb_buf == ESC || kb_buf == CSI || kb_buf == SS3) { switch(parse_function_key((int)kb_buf)) { ! case SMG$K_TRM_UP: key = iflags.num_pad ? '8' : 'k'; break; ! case SMG$K_TRM_DOWN: key = iflags.num_pad ? '2' : 'j'; break; ! case SMG$K_TRM_LEFT: key = iflags.num_pad ? '4' : 'h'; break; ! case SMG$K_TRM_RIGHT: key = iflags.num_pad ? '6' : 'l'; break; default: key = ESC; break; } } else { *************** *** 151,160 **** if (recurse++ == 0 && kb != 0) { smg$read_keystroke(&kb, &key); switch (key) { ! case SMG$K_TRM_UP: flags.num_pad ? '8' : key = 'k'; break; ! case SMG$K_TRM_DOWN: flags.num_pad ? '2' : key = 'j'; break; ! case SMG$K_TRM_LEFT: flags.num_pad ? '4' : key = 'h'; break; ! case SMG$K_TRM_RIGHT: flags.num_pad ? '6' : key = 'l'; break; case '\r': key = '\n'; break; default: if (key > 255) key = ESC; break; --- 151,160 ---- if (recurse++ == 0 && kb != 0) { smg$read_keystroke(&kb, &key); switch (key) { ! case SMG$K_TRM_UP: iflags.num_pad ? '8' : key = 'k'; break; ! case SMG$K_TRM_DOWN: iflags.num_pad ? '2' : key = 'j'; break; ! case SMG$K_TRM_LEFT: iflags.num_pad ? '4' : key = 'h'; break; ! case SMG$K_TRM_RIGHT: iflags.num_pad ? '6' : key = 'l'; break; case '\r': key = '\n'; break; default: if (key > 255) key = ESC; break; *************** *** 325,331 **** unsigned long status, zero = 0; if (tt_chan == 0) { /* do this stuff once only */ ! flags.cbreak = OFF, flags.echo = ON; /* until setup is complete */ status = sys$assign(&tty_dsc, &tt_chan, 0, 0); if (!vms_ok(status)) { raw_print(""), err++; --- 325,331 ---- unsigned long status, zero = 0; if (tt_chan == 0) { /* do this stuff once only */ ! iflags.cbreak = OFF, iflags.echo = ON; /* until setup is complete */ status = sys$assign(&tty_dsc, &tt_chan, 0, 0); if (!vms_ok(status)) { raw_print(""), err++; *************** *** 378,385 **** #endif /* 0 (!USE_QIO_INPUT) */ if (ctrl_mask) (void) lib$enable_ctrl(&ctrl_mask, 0); ! flags.echo = ON; ! flags.cbreak = OFF; /* reset original tab, form-feed, broadcast settings */ sg.sm.tt_char = tt_char_restore; sg.sm.tt2_char = tt2_char_restore; --- 378,385 ---- #endif /* 0 (!USE_QIO_INPUT) */ if (ctrl_mask) (void) lib$enable_ctrl(&ctrl_mask, 0); ! iflags.echo = ON; ! iflags.cbreak = OFF; /* reset original tab, form-feed, broadcast settings */ sg.sm.tt_char = tt_char_restore; sg.sm.tt2_char = tt2_char_restore; *************** *** 413,420 **** init_broadcast_trapping(); } enable_broadcast_trapping(); /* no-op if !defined(MAIL) */ ! flags.cbreak = (kb != 0) ? ON : OFF; ! flags.echo = (kb != 0) ? OFF : ON; /* disable tab & form-feed expansion; prepare for broadcast trapping */ sg.sm.tt_char = tt_char_active; sg.sm.tt2_char = tt2_char_active; --- 413,420 ---- init_broadcast_trapping(); } enable_broadcast_trapping(); /* no-op if !defined(MAIL) */ ! iflags.cbreak = (kb != 0) ? ON : OFF; ! iflags.echo = (kb != 0) ? OFF : ON; /* disable tab & form-feed expansion; prepare for broadcast trapping */ sg.sm.tt_char = tt_char_active; sg.sm.tt2_char = tt2_char_active; *** Old/sys/winnt/Install.nt Tue Dec 10 16:56:44 1996 --- sys/winnt/Install.nt Mon Nov 4 09:01:07 1996 *************** *** 4,11 **** Instructions for compiling and installing NetHack 3.2 on a Windows NT or Windows 95 system ============================================================== ! (or, How to make NetHack 3.2.1 for the WIN32 Console subsystem) ! Last revision: February 23, 1996 Credit for PC versions of NetHack 3.2 goes to the PC Development team of Paul Winner, Kevin Smolkowski, Michael Allison, Yitzhak Sapir, Bill --- 4,11 ---- Instructions for compiling and installing NetHack 3.2 on a Windows NT or Windows 95 system ============================================================== ! (or, How to make NetHack 3.2.2 for the WIN32 Console subsystem) ! Last revision: October 30, 1996 Credit for PC versions of NetHack 3.2 goes to the PC Development team of Paul Winner, Kevin Smolkowski, Michael Allison, Yitzhak Sapir, Bill *************** *** 29,35 **** We have provided a Makefile for building NetHack using the following compiler: ! Microsoft Visual C++ V4.0 The Makefile was created for use with MS NMAKE which is provided with the Microsoft compiler. --- 29,35 ---- We have provided a Makefile for building NetHack using the following compiler: ! Microsoft Visual C++ V4.x The Makefile was created for use with MS NMAKE which is provided with the Microsoft compiler. *************** *** 61,67 **** they are not necessary for building the TTY version for the Win32 console subsystem. You can delete them to save space. Your distribution may contain a directory win\win32. This window port variant was a ! recent addition and was not ready for the 3.2.1 release. You may ignore it (or contribute to it). Required Directories for a Win32 Console NetHack: --- 61,67 ---- they are not necessary for building the TTY version for the Win32 console subsystem. You can delete them to save space. Your distribution may contain a directory win\win32. This window port variant was a ! recent addition and was not ready for the 3.2.2 release. You may ignore it (or contribute to it). Required Directories for a Win32 Console NetHack: *************** *** 85,92 **** If you downloaded or ftp'd the sources from a UNIX system, the lines will probably end in UNIX-style newlines, instead of the carriage return and line feed pairs used by Windows. Some programs have trouble ! with them, so you may need to convert them (with a utility like ! Rahul Dhesi's "flip" for DOS). 3. Go to the sys\winnt directory and run the nhsetup.bat batch file. The necessary Makefile movements will be accomplished for you. It --- 85,92 ---- If you downloaded or ftp'd the sources from a UNIX system, the lines will probably end in UNIX-style newlines, instead of the carriage return and line feed pairs used by Windows. Some programs have trouble ! with them, so you may need to convert them. The compiler should not ! have any problems with them however. 3. Go to the sys\winnt directory and run the nhsetup.bat batch file. The necessary Makefile movements will be accomplished for you. It *************** *** 174,186 **** drive and directory your NetHack executable resides in) each time. ! 9b. Running from a Windows shortcut or the Program Manager: ! If you will be running it by launching it from the Program Manager or from a shortcut, just use the following information when setting up the icon or shortcut. ! Description : NetHack 3.2.1 Command Line : C:\GAMES\NETHACK\NETHACK.EXE (changing the directory to the appropriate one of course) --- 174,187 ---- drive and directory your NetHack executable resides in) each time. ! 9b. Running from a Windows shortcut (win95 or NT4.x) or from the ! Program Manager (NT3.x): ! If you will be running it by launching it from program manager or from a shortcut, just use the following information when setting up the icon or shortcut. ! Description : NetHack 3.2.2 Command Line : C:\GAMES\NETHACK\NETHACK.EXE (changing the directory to the appropriate one of course) *** Old/sys/winnt/Makefile.nt Tue Dec 10 16:56:46 1996 --- sys/winnt/Makefile.nt Mon Nov 4 08:54:36 1996 *************** *** 1,10 **** ! # SCCS Id: @(#)Makefile.nt 3.2 96/03/15 # Copyright (c) NetHack PC Development Team 1993, 1994, 1995, 1996 # ! # NetHack 3.2 Makefile for MS Visual C++ V4.0 and MS NMAKE # # Win32 Compilers Tested: ! # - Microsoft 32 bit Visual C++ V4.0 # # In addition to your C compiler, # --- 1,10 ---- ! # SCCS Id: @(#)Makefile.nt 3.2 96/10/30 # Copyright (c) NetHack PC Development Team 1993, 1994, 1995, 1996 # ! # NetHack 3.2 Makefile for MS Visual C++ V4.x and MS NMAKE # # Win32 Compilers Tested: ! # - Microsoft 32 bit Visual C++ V4.x # # In addition to your C compiler, # *************** *** 20,35 **** # Michael Allison # #---------------------------------------------------------------------- ! # Do not delete the following include. # ! !include # # Set the gamedir according to your preference. It must be present prior # to compilation. GAME = NetHack # Game Name ! GAMEDIR = c:\games\nethackn # Game directory # # Source directories. Makedefs hardcodes these, don't change them. --- 20,37 ---- # Michael Allison # #---------------------------------------------------------------------- ! # Do not delete the following 3 lines. # ! TARGETOS=BOTH ! APPVER=4.0 ! !include # # Set the gamedir according to your preference. It must be present prior # to compilation. GAME = NetHack # Game Name ! GAMEDIR = \games\nethackn # Game directory # # Source directories. Makedefs hardcodes these, don't change them. *************** *** 433,446 **** WINTTY_H = $(INCL)\wintty.h WIN32API_H = $(INCL)\win32api.h WIN32_H = $(INCL)\nhwin32.h ! # ! # In the unix distribution this file is patchlevel.h, make it 8.3 here ! # to avoid an nmake warning under dos. ! # ! ! PATCHLEVEL_H = $(INCL)\patchlev.h ! # # The name of the game. --- 435,443 ---- WINTTY_H = $(INCL)\wintty.h WIN32API_H = $(INCL)\win32api.h WIN32_H = $(INCL)\nhwin32.h + PATCHLEVEL_H = $(INCL)\patchlevel.h ! DATABASE = $(DAT)\data.base # # The name of the game. *************** *** 448,458 **** GAMEFILE = $(GAMEDIR)\$(GAME).exe - # - # make data.base an 8.3 filename to prevent an nmake warning - # - - DATABASE = $(DAT)\data.bas ####################################################################### # --- 445,450 ---- *************** *** 673,685 **** ! ELSE @echo $(U)lev_comp.y has changed. @echo To update $(U)lev_yacc.c and $(INCL)\lev_comp.h run $(YACC). ! @echo. @echo For now, we will copy the prebuilt lev_yacc.c and @echo lev_comp.h from $(SYS) into $(UTIL) and use them. @copy $(SYS)\lev_yacc.c $(U)lev_yacc.c >nul @copy $(SYS)\lev_comp.h $(INCL)\lev_comp.h >nul ! @echo.>>$(U)\lev_yacc.c ! @echo.>>$(INCL)\lev_comp.h ! ENDIF $(U)lev_$(LEX).c: $(U)lev_comp.l --- 665,677 ---- ! ELSE @echo $(U)lev_comp.y has changed. @echo To update $(U)lev_yacc.c and $(INCL)\lev_comp.h run $(YACC). ! @echo ------ @echo For now, we will copy the prebuilt lev_yacc.c and @echo lev_comp.h from $(SYS) into $(UTIL) and use them. @copy $(SYS)\lev_yacc.c $(U)lev_yacc.c >nul @copy $(SYS)\lev_comp.h $(INCL)\lev_comp.h >nul ! @echo /**/ >>$(U)lev_yacc.c ! @echo /**/ >>$(INCL)\lev_comp.h ! ENDIF $(U)lev_$(LEX).c: $(U)lev_comp.l *************** *** 691,701 **** chdir $(SRC) ! ELSE @echo $(U)lev_comp.l has changed. To update $@ run $(LEX). ! @echo. @echo For now, we will copy the prebuilt lev_lex.c @echo from $(SYS) into $(UTIL) and use it. @copy $(SYS)\lev_lex.c $@ >nul ! @echo.>>$@ ! ENDIF # --- 683,693 ---- chdir $(SRC) ! ELSE @echo $(U)lev_comp.l has changed. To update $@ run $(LEX). ! @echo ----- @echo For now, we will copy the prebuilt lev_lex.c @echo from $(SYS) into $(UTIL) and use it. @copy $(SYS)\lev_lex.c $@ >nul ! @echo /**/ >>$@ ! ENDIF # *************** *** 733,745 **** ! ELSE @echo $(U)dgn_comp.y has changed. To update dgn_yacc.c and @echo $(INCL)\dgn_comp.h run $(YACC). ! @echo. @echo For now, we will copy the prebuilt $(U)dgn_yacc.c and @echo dgn_comp.h from $(SYS) into $(UTIL) and use them. @copy $(SYS)\dgn_yacc.c $(U)dgn_yacc.c >nul @copy $(SYS)\dgn_comp.h $(INCL)\dgn_comp.h >nul ! @echo.>>$(U)\dgn_yacc.c ! @echo.>>$(INCL)\dgn_comp.h ! ENDIF $(U)dgn_$(LEX).c: $(U)dgn_comp.l --- 725,737 ---- ! ELSE @echo $(U)dgn_comp.y has changed. To update dgn_yacc.c and @echo $(INCL)\dgn_comp.h run $(YACC). ! @echo ---- @echo For now, we will copy the prebuilt $(U)dgn_yacc.c and @echo dgn_comp.h from $(SYS) into $(UTIL) and use them. @copy $(SYS)\dgn_yacc.c $(U)dgn_yacc.c >nul @copy $(SYS)\dgn_comp.h $(INCL)\dgn_comp.h >nul ! @echo /**/ >>$(U)dgn_yacc.c ! @echo /**/ >>$(INCL)\dgn_comp.h ! ENDIF $(U)dgn_$(LEX).c: $(U)dgn_comp.l *************** *** 751,761 **** chdir $(SRC) ! ELSE @echo $(U)dgn_comp.l has changed. To update $@ run $(LEX). ! @echo. @echo For now, we will copy the prebuilt dgn_lex.c @echo from $(SYS) into $(UTIL) and use it. @copy $(SYS)\dgn_lex.c $@ >nul ! @echo.>>$@ ! ENDIF --- 743,753 ---- chdir $(SRC) ! ELSE @echo $(U)dgn_comp.l has changed. To update $@ run $(LEX). ! @echo --- @echo For now, we will copy the prebuilt dgn_lex.c @echo from $(SYS) into $(UTIL) and use it. @copy $(SYS)\dgn_lex.c $@ >nul ! @echo /**/ >>$@ ! ENDIF *************** *** 771,779 **** @echo CL=$(CL) ! ENDIF ! IF "$(TILEGAME)"!="" ! @echo. @echo NOTE: This build will include tile support. ! @echo. ! ENDIF # --- 763,771 ---- @echo CL=$(CL) ! ENDIF ! IF "$(TILEGAME)"!="" ! @echo ------------------------------------------- @echo NOTE: This build will include tile support. ! @echo ------------------------------------------- ! ENDIF # *************** *** 995,1001 **** @echo fakefile(int argc, char *argv[]) >>pch.c @echo { >>pch.c @echo } >>pch.c ! @echo. >>pch.c hack.pch: $(HACK_H) pch.c @echo Generating new precompiled header: hack.pch --- 987,993 ---- @echo fakefile(int argc, char *argv[]) >>pch.c @echo { >>pch.c @echo } >>pch.c ! @echo /**/ >>pch.c hack.pch: $(HACK_H) pch.c @echo Generating new precompiled header: hack.pch *************** *** 1234,1237 **** $(O)zap.o: $(PCH) $(SRC)\zap.c $(HACK_H) # end of file - --- 1226,1228 ---- *** Old/sys/winnt/nhsetup.bat Tue Dec 10 16:56:55 1996 --- sys/winnt/nhsetup.bat Mon Nov 4 09:01:07 1996 *************** *** 1,4 **** ! @REM SCCS Id: @(#)nhsetup.bat 96/02/15 @REM Copyright (c) NetHack PC Development Team 1993, 1996 @REM NetHack may be freely redistributed. See license for details. @REM Win32 setup batch file, see Install.nt for details --- 1,4 ---- ! @REM SCCS Id: @(#)nhsetup.bat 96/10/30 @REM Copyright (c) NetHack PC Development Team 1993, 1996 @REM NetHack may be freely redistributed. See license for details. @REM Win32 setup batch file, see Install.nt for details *************** *** 17,82 **** copy makefile.NT ..\..\src\Makefile >nul echo Makefile copied ok. - if exist ..\..\dat\data.bas goto long1ok - if exist ..\..\dat\data.base goto long1a - if exist ..\..\dat\data~1.bas goto long1b - goto err_data - - :long1a - echo Changing some long-named distribution file names: - echo "Copying ..\..\dat\data.base -> ..\..\dat\data.bas" - copy ..\..\dat\data.base ..\..\dat\data.bas - if exist ..\..\dat\data.old del ..\..\dat\data.old - ren ..\..\dat\data.base data.old - goto long1ok - - :long1b - echo Changing some long-named distribution file names: - echo "Copying ..\..\dat\data~1.bas -> ..\..\dat\data.bas" - copy ..\..\dat\data~1.bas ..\..\dat\data.bas - if exist ..\..\dat\data.old del ..\..\dat\data.old - ren ..\..\dat\data~1.bas data.old - :long1ok - - if exist ..\..\include\patchlev.h goto long2ok - if exist ..\..\include\patchlevel.h goto long2a - if exist ..\..\include\patchl~1.h goto long2b - goto err_plev - - :long2a - echo "Copying ..\..\include\patchlevel.h -> ..\..\include\patchlev.h" - copy ..\..\include\patchlevel.h ..\..\include\patchlev.h - if exist ..\..\include\patchlev.old del ..\..\include\patchlev.old - ren ..\..\include\patchlevel.h patchlev.old - goto long2ok - - :long2b - echo "Copying ..\..\include\patchl~1.h -> ..\..\include\patchlev.h" - copy ..\..\include\patchl~1.h ..\..\include\patchlev.h - if exist ..\..\include\patchlev.old del ..\..\include\patchlev.old - ren ..\..\include\patchl~1.h patchlev.old - :long2ok - - REM Missing guidebook is not fatal to the build process - if exist ..\..\doc\guidebook.txt goto gbdone - if exist ..\..\doc\guideboo.txt goto long3a - if exist ..\..\doc\guideb~1.txt goto long3b - echo "Warning - There is no NetHack Guidebook (..\..\doc\guideboo.txt)" - echo " included in your distribution. Build will proceed anyway." - goto gbdone - - :long3a - echo "Copying ..\..\doc\guideboo.txt -> ..\..\doc\guidebook.txt" - copy ..\..\doc\guideboo.txt ..\..\doc\guidebook.txt - goto gbdone - - :long3b - echo "Copying ..\..\doc\guideb~1.txt -> ..\..\doc\guidebook.txt" - copy ..\..\doc\guideb~1.txt ..\..\doc\guidebook.txt - goto gbdone - - :gbdone - if exist .\nethack.ico goto hasicon if exist .\nhico.uu uudecode nhico.uu >nul if NOT exist .\nethack.ico goto err_nouu --- 17,22 ---- *************** *** 85,90 **** --- 25,31 ---- echo done! echo. echo Proceed with the next step documented in Install.nt + echo. goto done :err_nouu echo Apparently you have no UUDECODE utility in your path. You need a UUDECODE *** Old/sys/winnt/nttty.c Tue Dec 10 16:57:00 1996 --- sys/winnt/nttty.c Mon Oct 21 22:14:49 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)nttty.c 3.2 95/09/06 /* Copyright (c) NetHack PC Development Team 1993 */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)nttty.c 3.2 96/10/21 /* Copyright (c) NetHack PC Development Team 1993 */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 42,55 **** COORD ntcoord; INPUT_RECORD ir; ! /* Flag for whether NetHack was launched via progman, not command line. * The reason we care at all, is so that we can get ! * a final RETURN at the end of the game when launched from progman * to prevent the scoreboard (or panic message :-|) from vanishing * immediately after it is displayed, yet not bother when started * from the command line. */ ! int ProgmanLaunched; # ifdef TEXTCOLOR int ttycolors[CLR_MAX]; --- 42,55 ---- COORD ntcoord; INPUT_RECORD ir; ! /* Flag for whether NetHack was launched via the GUI, not the command line. * The reason we care at all, is so that we can get ! * a final RETURN at the end of the game when launched from the GUI * to prevent the scoreboard (or panic message :-|) from vanishing * immediately after it is displayed, yet not bother when started * from the command line. */ ! int GUILaunched; # ifdef TEXTCOLOR int ttycolors[CLR_MAX]; *************** *** 67,73 **** erase_char = '\b'; kill_char = 21; /* cntl-U */ ! flags.cbreak = TRUE; #ifdef TEXTCOLOR init_ttycolor(); #endif --- 67,73 ---- erase_char = '\b'; kill_char = 21; /* cntl-U */ ! iflags.cbreak = TRUE; #ifdef TEXTCOLOR init_ttycolor(); #endif *************** *** 196,202 **** * left control key was pressed with the keystroke. */ if (iskeypad(scan)) { ! kpad = flags.num_pad ? numpad : keypad; if (shiftstate & SHIFT_PRESSED) { ch = kpad[scan - KEYPADLO].shift; } --- 196,202 ---- * left control key was pressed with the keystroke. */ if (iskeypad(scan)) { ! kpad = iflags.num_pad ? numpad : keypad; if (shiftstate & SHIFT_PRESSED) { ch = kpad[scan - KEYPADLO].shift; } *************** *** 275,284 **** */ hStdOut = GetStdHandle( STD_OUTPUT_HANDLE ); GetConsoleScreenBufferInfo( hStdOut, &csbi); ! ProgmanLaunched = ((csbi.dwCursorPosition.X == 0) && (csbi.dwCursorPosition.Y == 0)); if ((csbi.dwSize.X <= 0) || (csbi.dwSize.Y <= 0)) ! ProgmanLaunched = 0; /* Obtain handles for the standard Console I/O devices */ --- 275,284 ---- */ hStdOut = GetStdHandle( STD_OUTPUT_HANDLE ); GetConsoleScreenBufferInfo( hStdOut, &csbi); ! GUILaunched = ((csbi.dwCursorPosition.X == 0) && (csbi.dwCursorPosition.Y == 0)); if ((csbi.dwSize.X <= 0) || (csbi.dwSize.Y <= 0)) ! GUILaunched = 0; /* Obtain handles for the standard Console I/O devices */ *************** *** 324,330 **** VA_START(s); VA_INIT(s, const char *); /* error() may get called before tty is initialized */ ! if (flags.window_inited) end_screen(); putchar('\n'); Vprintf(s,VA_ARGS); putchar('\n'); --- 324,330 ---- VA_START(s); VA_INIT(s, const char *); /* error() may get called before tty is initialized */ ! if (iflags.window_inited) end_screen(); putchar('\n'); Vprintf(s,VA_ARGS); putchar('\n'); *************** *** 351,357 **** void tty_start_screen() { ! if (flags.num_pad) tty_number_pad(1); /* make keypad send digits */ } void --- 351,357 ---- void tty_start_screen() { ! if (iflags.num_pad) tty_number_pad(1); /* make keypad send digits */ } void *** Old/win/X11/dialogs.c Tue Dec 10 16:57:19 1996 --- win/X11/dialogs.c Sat Oct 26 14:52:42 1996 *************** *** 290,295 **** --- 290,296 ---- Dimension width, height, b_width; int x, y, max_x, max_y; Window root, child; + XSizeHints *hints; int dummyx, dummyy; unsigned int dummymask; extern Widget toplevel; *************** *** 326,329 **** --- 327,340 ---- XtSetArg(args[num_args], XtNx, x); num_args++; XtSetArg(args[num_args], XtNy, y); num_args++; XtSetValues(w, args, num_args); + + /* Some older window managers ignore XtN{x,y}; hint the same values */ + /* The {x,y} are not used by newer window managers; older ones need them */ + XtRealizeWidget(w); + hints = XAllocSizeHints(); + hints->flags = USPosition; + hints->x = x; + hints->y = y; + XSetWMNormalHints(XtDisplay(w), XtWindow(w), hints); + XFree(hints); } *** Old/win/X11/winX.c Tue Dec 10 16:57:51 1996 --- win/X11/winX.c Mon Jun 17 18:35:23 1996 *************** *** 722,728 **** if (window == WIN_MESSAGE) { wp->keep_window = TRUE; WIN_MESSAGE = WIN_ERR; ! flags.window_inited = 0; } else if (window == WIN_MAP) { wp->keep_window = TRUE; WIN_MAP = WIN_ERR; --- 722,728 ---- if (window == WIN_MESSAGE) { wp->keep_window = TRUE; WIN_MESSAGE = WIN_ERR; ! iflags.window_inited = 0; } else if (window == WIN_MAP) { wp->keep_window = TRUE; WIN_MAP = WIN_ERR; *************** *** 1879,1885 **** (void) XtAppSetErrorHandler(app_context, (XtErrorHandler) hangup); /* We can now print to the message window. */ ! flags.window_inited = 1; } --- 1879,1885 ---- (void) XtAppSetErrorHandler(app_context, (XtErrorHandler) hangup); /* We can now print to the message window. */ ! iflags.window_inited = 1; } *** Old/win/X11/winmap.c Tue Dec 10 16:57:57 1996 --- win/X11/winmap.c Mon Jun 17 18:35:28 1996 *************** *** 1220,1226 **** if (glyph_is_pet(glyph) #ifdef TEXTCOLOR ! && flags.hilite_pet #endif ) { /* draw pet annotation (a heart) */ --- 1220,1226 ---- if (glyph_is_pet(glyph) #ifdef TEXTCOLOR ! && iflags.hilite_pet #endif ) { /* draw pet annotation (a heart) */ *************** *** 1263,1269 **** struct text_map_info_t *text_map = map_info->mtype.text_map; #ifdef TEXTCOLOR ! if (flags.use_color) { register char *c_ptr; char *t_ptr; int cur_col, color, win_ystart; --- 1263,1269 ---- struct text_map_info_t *text_map = map_info->mtype.text_map; #ifdef TEXTCOLOR ! if (iflags.use_color) { register char *c_ptr; char *t_ptr; int cur_col, color, win_ystart; *** Old/win/X11/winmenu.c Tue Dec 10 16:58:01 1996 --- win/X11/winmenu.c Sat Oct 26 14:52:42 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)winmenu.c 3.2 96/05/12 */ /* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)winmenu.c 3.2 96/08/15 */ /* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 38,47 **** #include "hack.h" #include "winX.h" static void FDECL(menu_select, (Widget, XtPointer, XtPointer)); ! static void FDECL(invert_line, (struct xwindow *, x11_menu_item *, int)); static void FDECL(menu_ok, (Widget, XtPointer, XtPointer)); static void FDECL(menu_cancel, (Widget, XtPointer, XtPointer)); static void FDECL(menu_all, (Widget, XtPointer, XtPointer)); --- 38,48 ---- #include "hack.h" #include "winX.h" + #include static void FDECL(menu_select, (Widget, XtPointer, XtPointer)); ! static void FDECL(invert_line, (struct xwindow *,x11_menu_item *,int,long)); static void FDECL(menu_ok, (Widget, XtPointer, XtPointer)); static void FDECL(menu_cancel, (Widget, XtPointer, XtPointer)); static void FDECL(menu_all, (Widget, XtPointer, XtPointer)); *************** *** 64,69 **** --- 65,72 ---- static void FDECL(clear_old_menu, (struct xwindow *)); static char *FDECL(copy_of, (const char *)); + #define reset_menu_count(mi) ((mi)->counting = FALSE, (mi)->menu_count = 0L) + static const char menu_translations[] = "#override\n\ *************** *** 91,99 **** --- 94,105 ---- int i; x11_menu_item *curr; #endif + long how_many; wp = find_widget(w); menu_info = wp->menu_information; + how_many = menu_info->counting ? menu_info->menu_count : -1L; + reset_menu_count(menu_info); #ifdef USE_FWF /* if we've reached here, we've found our selected item */ *************** *** 124,130 **** /* if we've reached here, we've found our selected item */ curr->selected = !curr->selected; ! curr->str[2] = curr->selected ? '+' : '-'; XawListChange(wp->w, menu_info->curr_menu.list_pointer, 0, 0, True); #endif --- 130,142 ---- /* if we've reached here, we've found our selected item */ curr->selected = !curr->selected; ! if (curr->selected) { ! curr->str[2] = (how_many != -1L) ? '#' : '+'; ! curr->pick_count = how_many; ! } else { ! curr->str[2] = '-'; ! curr->pick_count = -1L; ! } XawListChange(wp->w, menu_info->curr_menu.list_pointer, 0, 0, True); #endif *************** *** 151,174 **** */ /*ARGSUSED*/ static void ! invert_line(wp, curr, count) struct xwindow *wp; x11_menu_item *curr; ! int count; { curr->selected = !curr->selected; if (curr->selected) { #ifdef USE_FWF ! XfwfMultiListHighlightItem((XfwfMultiListWidget)wp->w, count); #else ! curr->str[2] = '+'; #endif } else { #ifdef USE_FWF ! XfwfMultiListUnhighlightItem((XfwfMultiListWidget)wp->w, count); #else curr->str[2] = '-'; #endif } } --- 163,190 ---- */ /*ARGSUSED*/ static void ! invert_line(wp, curr, which, how_many) struct xwindow *wp; x11_menu_item *curr; ! int which; ! long how_many; { + reset_menu_count(wp->menu_information); curr->selected = !curr->selected; if (curr->selected) { #ifdef USE_FWF ! XfwfMultiListHighlightItem((XfwfMultiListWidget)wp->w, which); #else ! curr->str[2] = (how_many != -1) ? '#' : '+'; #endif + curr->pick_count = how_many; } else { #ifdef USE_FWF ! XfwfMultiListUnhighlightItem((XfwfMultiListWidget)wp->w, which); #else curr->str[2] = '-'; #endif + curr->pick_count = -1L; } } *************** *** 202,210 **** --- 218,242 ---- if (menu_info->is_active) { /* waiting for input */ ch = map_menu_cmd(ch); if (ch == '\033') { /* quit */ + if (menu_info->counting) { + /* when there's a count in progress, ESC discards it + rather than dismissing the whole menu */ + reset_menu_count(menu_info); + return; + } select_none(wp); } else if (ch == '\n' || ch == '\r') { ; /* accept */ + } else if (isdigit(ch)) { + /* special case: '0' is also the default ball class */ + if (ch == '0' && !menu_info->counting && + index(menu_info->curr_menu.gacc, ch)) + goto group_accel; + menu_info->menu_count *= 10L; + menu_info->menu_count += (long)(ch - '0'); + if (menu_info->menu_count != 0L) /* ignore leading zeros */ + menu_info->counting = TRUE; + return; } else if (ch == MENU_SEARCH) { /* search */ if (menu_info->how == PICK_ANY || menu_info->how == PICK_ONE) { char buf[BUFSZ]; *************** *** 239,250 **** X11_nhbell(); return; } else if (index(menu_info->curr_menu.gacc, ch)) { /* matched a group accelerator */ ! if (menu_info->how == PICK_ANY) { for (count = 0, curr = menu_info->curr_menu.base; curr; curr = curr->next, count++) { ! if (curr->identifier.a_void != 0 && curr->gselector == ch) ! invert_line(wp, curr, count); } #ifndef USE_FWF XawListChange(wp->w, menu_info->curr_menu.list_pointer, 0, 0, True); --- 271,289 ---- X11_nhbell(); return; } else if (index(menu_info->curr_menu.gacc, ch)) { + group_accel: /* matched a group accelerator */ ! if (menu_info->how == PICK_ANY || menu_info->how == PICK_ONE) { for (count = 0, curr = menu_info->curr_menu.base; curr; curr = curr->next, count++) { ! if (curr->identifier.a_void != 0 && curr->gselector == ch) { ! invert_line(wp, curr, count, -1L); ! /* for PICK_ONE, a group accelerator will ! only be included in gacc[] if it matches ! exactly one entry, so this must be it... */ ! if (menu_info->how == PICK_ONE) ! goto menu_done; /* pop down */ ! } } #ifndef USE_FWF XawListChange(wp->w, menu_info->curr_menu.list_pointer, 0, 0, True); *************** *** 259,265 **** if (curr->identifier.a_void != 0 && curr->selector == ch) break; if (curr) { ! invert_line(wp, curr, count); #ifndef USE_FWF XawListChange(wp->w, menu_info->curr_menu.list_pointer, 0, 0, True); #endif --- 298,305 ---- if (curr->identifier.a_void != 0 && curr->selector == ch) break; if (curr) { ! invert_line(wp, curr, count, ! menu_info->counting ? menu_info->menu_count : -1L); #ifndef USE_FWF XawListChange(wp->w, menu_info->curr_menu.list_pointer, 0, 0, True); #endif *************** *** 279,284 **** --- 319,325 ---- /* pop down on ESC */ } + menu_done: menu_popdown(wp); } *************** *** 289,294 **** --- 330,336 ---- XtPointer client_data, call_data; { struct xwindow *wp = (struct xwindow *) client_data; + menu_popdown(wp); } *************** *** 364,380 **** int count; boolean changed = FALSE; for (count = 0, curr = wp->menu_information->curr_menu.base; curr; curr = curr->next, count++) ! if (curr->identifier.a_void != 0 && !curr->selected) if (!curr->selected) { ! invert_line(wp, curr, count); changed = TRUE; } #ifndef USE_FWF if (changed) ! XawListChange(wp->w, wp->menu_information->curr_menu.list_pointer, 0, 0, True); #endif } --- 406,424 ---- int count; boolean changed = FALSE; + reset_menu_count(wp->menu_information); for (count = 0, curr = wp->menu_information->curr_menu.base; curr; curr = curr->next, count++) ! if (curr->identifier.a_void != 0) if (!curr->selected) { ! invert_line(wp, curr, count, -1L); changed = TRUE; } #ifndef USE_FWF if (changed) ! XawListChange(wp->w, wp->menu_information->curr_menu.list_pointer, ! 0, 0, True); #endif } *************** *** 386,402 **** int count; boolean changed = FALSE; for (count = 0, curr = wp->menu_information->curr_menu.base; curr; curr = curr->next, count++) ! if (curr->identifier.a_void != 0 && curr->selected) if (curr->selected) { ! invert_line(wp, curr, count); changed = TRUE; ! } #ifndef USE_FWF if (changed) ! XawListChange(wp->w, wp->menu_information->curr_menu.list_pointer, 0, 0, True); #endif } --- 430,448 ---- int count; boolean changed = FALSE; + reset_menu_count(wp->menu_information); for (count = 0, curr = wp->menu_information->curr_menu.base; curr; curr = curr->next, count++) ! if (curr->identifier.a_void != 0) if (curr->selected) { ! invert_line(wp, curr, count, -1L); changed = TRUE; ! } #ifndef USE_FWF if (changed) ! XawListChange(wp->w, wp->menu_information->curr_menu.list_pointer, ! 0, 0, True); #endif } *************** *** 407,419 **** x11_menu_item *curr; int count; for (count = 0, curr = wp->menu_information->curr_menu.base; curr; curr = curr->next, count++) if (curr->identifier.a_void != 0) ! invert_line(wp, curr, count); #ifndef USE_FWF ! XawListChange(wp->w, wp->menu_information->curr_menu.list_pointer, 0, 0, True); #endif } --- 453,467 ---- x11_menu_item *curr; int count; + reset_menu_count(wp->menu_information); for (count = 0, curr = wp->menu_information->curr_menu.base; curr; curr = curr->next, count++) if (curr->identifier.a_void != 0) ! invert_line(wp, curr, count, -1L); #ifndef USE_FWF ! XawListChange(wp->w, wp->menu_information->curr_menu.list_pointer, ! 0, 0, True); #endif } *************** *** 426,441 **** int count; boolean changed = FALSE; for (count = 0, curr = wp->menu_information->curr_menu.base; curr; curr = curr->next, count++) if (curr->identifier.a_void != 0 && strstri(curr->str, match)) { ! invert_line(wp, curr, count); changed = TRUE; } #ifndef USE_FWF if (changed) ! XawListChange(wp->w, wp->menu_information->curr_menu.list_pointer, 0, 0, True); #endif } --- 474,491 ---- int count; boolean changed = FALSE; + reset_menu_count(wp->menu_information); for (count = 0, curr = wp->menu_information->curr_menu.base; curr; curr = curr->next, count++) if (curr->identifier.a_void != 0 && strstri(curr->str, match)) { ! invert_line(wp, curr, count, -1L); changed = TRUE; } #ifndef USE_FWF if (changed) ! XawListChange(wp->w, wp->menu_information->curr_menu.list_pointer, ! 0, 0, True); #endif } *************** *** 447,459 **** x11_menu_item *curr; int count; for (count = 0, curr = wp->menu_information->curr_menu.base; curr; curr = curr->next, count++) if (curr->identifier.a_void != 0 && strstri(curr->str, match)) { if (!curr->selected) { ! invert_line(wp, curr, count); #ifndef USE_FWF ! XawListChange(wp->w, wp->menu_information->curr_menu.list_pointer, 0, 0, True); #endif } return; --- 497,511 ---- x11_menu_item *curr; int count; + reset_menu_count(wp->menu_information); for (count = 0, curr = wp->menu_information->curr_menu.base; curr; curr = curr->next, count++) if (curr->identifier.a_void != 0 && strstri(curr->str, match)) { if (!curr->selected) { ! invert_line(wp, curr, count, -1L); #ifndef USE_FWF ! XawListChange(wp->w, wp->menu_information->curr_menu.list_pointer, ! 0, 0, True); #endif } return; *************** *** 557,562 **** --- 609,615 ---- item->attr = attr; /* item->selected = preselected; */ item->selected = FALSE; + item->pick_count = -1L; if (identifier->a_void) { char buf[QBUFSZ]; *************** *** 598,607 **** winid window; const char *query; { - char gacc[QBUFSZ], *ap; - x11_menu_item *curr; - struct menu_info_t *menu_info; check_winid(window); menu_info = window_list[window].menu_information; if (!menu_info->is_menu) { --- 651,658 ---- winid window; const char *query; { struct menu_info_t *menu_info; + check_winid(window); menu_info = window_list[window].menu_information; if (!menu_info->is_menu) { *************** *** 609,624 **** return; } menu_info->new_menu.query = copy_of(query); - - /* collect the group accelerators into a string */ - for (gacc[0] = 0, ap = gacc, curr = menu_info->curr_menu.base; - curr; curr = curr->next) { - if (curr->gselector) { - *ap++ = curr->gselector; - *ap = 0; - } - } - menu_info->new_menu.gacc = copy_of(gacc); } int --- 660,665 ---- *************** *** 641,646 **** --- 682,688 ---- #ifdef USE_FWF Boolean *boolp; #endif + char gacc[QBUFSZ], *ap; *menu_list = (menu_item *) 0; check_winid(window); *************** *** 652,657 **** --- 694,725 ---- } menu_info->how = (short) how; + + /* collect group accelerators; for PICK_NONE, they're ignored; + for PICK_ONE, only those which match exactly one entry will be + accepted; for PICK_ANY, those which match any entry are okay */ + gacc[0] = '\0'; + if (menu_info->how != PICK_NONE) { + int i, n, gcnt[128]; + #define GSELIDX(c) ((c) & 127) /* guard against `signed char' */ + + for (i = 0; i < SIZE(gcnt); i++) gcnt[i] = 0; + for (n = 0, curr = menu_info->new_menu.base; curr; curr = curr->next) + if (curr->gselector) ++n, ++gcnt[GSELIDX(curr->gselector)]; + + if (n > 0) /* at least one group accelerator found */ + for (ap = gacc, curr = menu_info->new_menu.base; + curr; curr = curr->next) + if (curr->gselector && !index(gacc, curr->gselector) && + (menu_info->how == PICK_ANY || + gcnt[GSELIDX(curr->gselector)] == 1)) { + *ap++ = curr->gselector; + *ap = '\0'; /* re-terminate for index() */ + } + } + menu_info->new_menu.gacc = copy_of(gacc); + reset_menu_count(menu_info); + /* * Create a string and sensitive list for the new menu. */ *************** *** 681,686 **** --- 749,755 ---- && (window != WIN_INVEN || !flags.perm_invent)) { XtDestroyWidget(wp->popup); menu_info->valid_widgets = FALSE; + menu_info->is_up = FALSE; } if (!menu_info->valid_widgets) { *************** *** 952,958 **** for (curr = menu_info->curr_menu.base; curr; curr = curr->next) if (curr->selected) { mi->item = curr->identifier; ! mi->count = -1L; /* no counts (yet) */ mi++; } } --- 1021,1027 ---- for (curr = menu_info->curr_menu.base; curr; curr = curr->next) if (curr->selected) { mi->item = curr->identifier; ! mi->count = curr->pick_count; mi++; } } *************** *** 1049,1054 **** --- 1118,1124 ---- sizeof(struct menu_info_t)); reset_menu_to_default(&wp->menu_information->curr_menu); reset_menu_to_default(&wp->menu_information->new_menu); + reset_menu_count(wp->menu_information); wp->w = wp->popup = (Widget) 0; } *** Old/win/X11/winmesg.c Tue Dec 10 16:58:05 1996 --- win/X11/winmesg.c Mon Jun 17 18:35:31 1996 *************** *** 90,101 **** mesg_info->dirty = False; mesg_info->viewport_width = mesg_info->viewport_height = 0; ! if (flags.msg_history < appResources.message_lines) ! flags.msg_history = appResources.message_lines; ! if (flags.msg_history > MAX_HISTORY) /* a sanity check */ ! flags.msg_history = MAX_HISTORY; ! set_circle_buf(mesg_info, (int) flags.msg_history); /* Create a popup that becomes the parent. */ if (create_popup) { --- 90,101 ---- mesg_info->dirty = False; mesg_info->viewport_width = mesg_info->viewport_height = 0; ! if (iflags.msg_history < appResources.message_lines) ! iflags.msg_history = appResources.message_lines; ! if (iflags.msg_history > MAX_HISTORY) /* a sanity check */ ! iflags.msg_history = MAX_HISTORY; ! set_circle_buf(mesg_info, (int) iflags.msg_history); /* Create a popup that becomes the parent. */ if (create_popup) { *************** *** 162,168 **** get_gc(wp->w, mesg_info); ! wp->pixel_height = ((int)flags.msg_history) * mesg_info->char_height; /* If a variable spaced font, only use 2/3 of the default size */ if (mesg_info->fs->min_bounds.width != mesg_info->fs->max_bounds.width) { --- 162,168 ---- get_gc(wp->w, mesg_info); ! wp->pixel_height = ((int)iflags.msg_history) * mesg_info->char_height; /* If a variable spaced font, only use 2/3 of the default size */ if (mesg_info->fs->min_bounds.width != mesg_info->fs->max_bounds.width) { *** Old/win/tty/getline.c Tue Dec 10 16:58:54 1996 --- win/tty/getline.c Mon Jun 17 18:35:17 1996 *************** *** 133,139 **** morc = 0; while((c = tty_nhgetch()) != '\n') { ! if(flags.cbreak) { if ((s && index(s,c)) || c == x) { morc = (char) c; break; --- 133,139 ---- morc = 0; while((c = tty_nhgetch()) != '\n') { ! if(iflags.cbreak) { if ((s && index(s,c)) || c == x) { morc = (char) c; break; *** Old/win/tty/termcap.c Tue Dec 10 16:58:57 1996 --- win/tty/termcap.c Tue Sep 24 20:37:10 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)termcap.c 3.2 95/06/01 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)termcap.c 3.2 96/07/20 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 388,394 **** * Do not select NA ASCII as the primary font since people may * reasonably be using the UK character set. */ ! if (flags.DECgraphics) xputs("\033)0"); #ifdef PC9800 init_hilite(); #endif --- 388,394 ---- * Do not select NA ASCII as the primary font since people may * reasonably be using the UK character set. */ ! if (iflags.DECgraphics) xputs("\033)0"); #ifdef PC9800 init_hilite(); #endif *************** *** 426,448 **** xputs(TI); xputs(VS); #ifdef PC9800 ! if (!flags.IBMgraphics && !flags.DECgraphics) tty_ascgraphics_hilite_fixup(); /* set up callback in case option is not set yet but toggled later */ ascgraphics_mode_callback = tty_ascgraphics_hilite_fixup; # ifdef ASCIIGRAPH ! if (flags.IBMgraphics) init_hilite(); /* set up callback in case option is not set yet but toggled later */ ibmgraphics_mode_callback = init_hilite; # endif #endif /* PC9800 */ #ifdef TERMLIB ! if (flags.DECgraphics) tty_decgraphics_termcap_fixup(); /* set up callback in case option is not set yet but toggled later */ decgraphics_mode_callback = tty_decgraphics_termcap_fixup; #endif ! if (flags.num_pad) tty_number_pad(1); /* make keypad send digits */ } void --- 426,448 ---- xputs(TI); xputs(VS); #ifdef PC9800 ! if (!iflags.IBMgraphics && !iflags.DECgraphics) tty_ascgraphics_hilite_fixup(); /* set up callback in case option is not set yet but toggled later */ ascgraphics_mode_callback = tty_ascgraphics_hilite_fixup; # ifdef ASCIIGRAPH ! if (iflags.IBMgraphics) init_hilite(); /* set up callback in case option is not set yet but toggled later */ ibmgraphics_mode_callback = init_hilite; # endif #endif /* PC9800 */ #ifdef TERMLIB ! if (iflags.DECgraphics) tty_decgraphics_termcap_fixup(); /* set up callback in case option is not set yet but toggled later */ decgraphics_mode_callback = tty_decgraphics_termcap_fixup; #endif ! if (iflags.num_pad) tty_number_pad(1); /* make keypad send digits */ } void *************** *** 777,782 **** --- 777,792 ---- * In any case, treat black specially so we don't try to display black * characters on the assumed black background. */ + + /* `curses' is aptly named; various versions don't like these + macros used elsewhere within nethack; fortunately they're + not needed beyond this point, so we don't need to worry + about reconstructing them after the header file inclusion. */ + #undef delay_output + #undef TRUE + #undef FALSE + #define m_move curses_m_move /* Some curses.h decl m_move(), not used here */ + #include # ifdef COLOR_BLACK /* trust include file */ *** Old/win/tty/topl.c Tue Dec 10 16:59:00 1996 --- win/tty/topl.c Thu Oct 24 21:52:52 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)topl.c 3.2 96/02/02 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)topl.c 3.2 96/10/24 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 280,293 **** if (q == '\020') { /* ctrl-P */ if(!doprev) (void) tty_doprev_message(); /* need two initially */ (void) tty_doprev_message(); - q = (char)0; doprev = 1; continue; ! } else if(doprev) { tty_clear_nhwindow(WIN_MESSAGE); cw->maxcol = cw->maxrow; doprev = 0; addtopl(prompt); continue; } digit_ok = allow_num && digit(q); --- 280,297 ---- if (q == '\020') { /* ctrl-P */ if(!doprev) (void) tty_doprev_message(); /* need two initially */ (void) tty_doprev_message(); doprev = 1; + q = '\0'; /* force another loop iteration */ continue; ! } else if (doprev) { ! /* BUG[?]: this probably ought to check whether the ! character which has just been read is an acceptable ! response; if so, skip the reprompt and use it. */ tty_clear_nhwindow(WIN_MESSAGE); cw->maxcol = cw->maxrow; doprev = 0; addtopl(prompt); + q = '\0'; /* force another loop iteration */ continue; } digit_ok = allow_num && digit(q); *** Old/win/tty/wintty.c Tue Dec 10 16:59:03 1996 --- win/tty/wintty.c Sat Oct 26 14:53:03 1996 *************** *** 1,4 **** ! /* SCCS Id: @(#)wintty.c 3.2 96/03/16 */ /* Copyright (c) David Cohrs, 1991 */ /* NetHack may be freely redistributed. See license for details. */ --- 1,4 ---- ! /* SCCS Id: @(#)wintty.c 3.2 96/08/18 */ /* Copyright (c) David Cohrs, 1991 */ /* NetHack may be freely redistributed. See license for details. */ *************** *** 123,129 **** #endif /* CLIPPING */ #if defined(USE_TILES) && defined(MSDOS) - extern boolean tiles_on; extern void FDECL(adjust_cursor_flags, (struct WinDesc *)); #endif --- 123,128 ---- *************** *** 145,150 **** --- 144,151 ---- static void FDECL(unset_all_on_page, (winid,tty_menu_item *,tty_menu_item *)); static void FDECL(invert_all_on_page, (winid,tty_menu_item *,tty_menu_item *, CHAR_P)); static void FDECL(invert_all, (winid,tty_menu_item *,tty_menu_item *, CHAR_P)); + static void FDECL(process_menu_window, (winid,struct WinDesc *)); + static void FDECL(process_text_window, (winid,struct WinDesc *)); static tty_menu_item *FDECL(reverse, (tty_menu_item *)); static const char * FDECL(compress_str, (const char *)); static void FDECL(tty_putsym, (winid, int, int, CHAR_P)); *************** *** 197,203 **** cw->rows = ttyDisplay->rows; cw->cols = ttyDisplay->cols; ! if(flags.window_inited) { cw = wins[WIN_MESSAGE]; cw->curx = cw->cury = 0; --- 198,204 ---- cw->rows = ttyDisplay->rows; cw->cols = ttyDisplay->cols; ! if(iflags.window_inited) { cw = wins[WIN_MESSAGE]; cw->curx = cw->cury = 0; *************** *** 444,450 **** backsp(); /* \b is visible on NT */ # else # if defined(MSDOS) ! if (flags.grmode) { backsp(); } else --- 445,451 ---- backsp(); /* \b is visible on NT */ # else # if defined(MSDOS) ! if (iflags.grmode) { backsp(); } else *************** *** 466,472 **** if (ct < (int)(sizeof plname) - 1) { #if defined(MICRO) # if defined(MSDOS) ! if (flags.grmode) { (void) putchar(c); } else # endif --- 467,473 ---- if (ct < (int)(sizeof plname) - 1) { #if defined(MICRO) # if defined(MSDOS) ! if (iflags.grmode) { (void) putchar(c); } else # endif *************** *** 498,504 **** if(flags.standout) standoutbeg(); xputs("Hit "); ! xputs(flags.cbreak ? "space" : "return"); xputs(" to continue: "); if(flags.standout) standoutend(); --- 499,505 ---- if(flags.standout) standoutbeg(); xputs("Hit "); ! xputs(iflags.cbreak ? "space" : "return"); xputs(" to continue: "); if(flags.standout) standoutend(); *************** *** 543,549 **** #ifndef NO_TERMS /*(until this gets added to the window interface)*/ tty_shutdown(); /* cleanup termcap/terminfo/whatever */ #endif ! flags.window_inited = 0; } winid --- 544,550 ---- #ifndef NO_TERMS /*(until this gets added to the window interface)*/ tty_shutdown(); /* cleanup termcap/terminfo/whatever */ #endif ! iflags.window_inited = 0; } winid *************** *** 578,593 **** /* message window, 1 line long, very wide, top of screen */ newwin->offx = newwin->offy = 0; /* sanity check */ ! if(flags.msg_history < 20) flags.msg_history = 20; ! else if(flags.msg_history > 60) flags.msg_history = 60; ! newwin->maxrow = newwin->rows = flags.msg_history; newwin->maxcol = newwin->cols = 0; break; case NHW_STATUS: /* status window, 2 lines long, full width, bottom of screen */ newwin->offx = 0; #if defined(USE_TILES) && defined(MSDOS) ! if (flags.grmode) { newwin->offy = ttyDisplay->rows-2; } else #endif --- 579,594 ---- /* message window, 1 line long, very wide, top of screen */ newwin->offx = newwin->offy = 0; /* sanity check */ ! if(iflags.msg_history < 20) iflags.msg_history = 20; ! else if(iflags.msg_history > 60) iflags.msg_history = 60; ! newwin->maxrow = newwin->rows = iflags.msg_history; newwin->maxcol = newwin->cols = 0; break; case NHW_STATUS: /* status window, 2 lines long, full width, bottom of screen */ newwin->offx = 0; #if defined(USE_TILES) && defined(MSDOS) ! if (iflags.grmode) { newwin->offy = ttyDisplay->rows-2; } else #endif *************** *** 879,884 **** --- 880,1219 ---- } } + static void + process_menu_window(window, cw) + winid window; + struct WinDesc *cw; + { + tty_menu_item *page_start, *page_end, *curr; + long count; + int n, curr_page, page_lines; + boolean finished, counting, reset_count; + char *cp, *rp, resp[QBUFSZ], gacc[QBUFSZ], + *msave, morestr[QBUFSZ]; + + curr_page = page_lines = 0; + page_start = page_end = 0; + msave = cw->morestr; /* save the morestr */ + cw->morestr = morestr; + counting = FALSE; + count = 0L; + reset_count = TRUE; + finished = FALSE; + + /* collect group accelerators; for PICK_NONE, they're ignored; + for PICK_ONE, only those which match exactly one entry will be + accepted; for PICK_ANY, those which match any entry are okay */ + gacc[0] = '\0'; + if (cw->how != PICK_NONE) { + int i, gcnt[128]; + #define GSELIDX(c) (c & 127) /* guard against `signed char' */ + + for (i = 0; i < SIZE(gcnt); i++) gcnt[i] = 0; + for (n = 0, curr = cw->mlist; curr; curr = curr->next) + if (curr->gselector) ++n, ++gcnt[GSELIDX(curr->gselector)]; + + if (n > 0) /* at least one group accelerator found */ + for (rp = gacc, curr = cw->mlist; curr; curr = curr->next) + if (curr->gselector && !index(gacc, curr->gselector) && + (cw->how == PICK_ANY || + gcnt[GSELIDX(curr->gselector)] == 1)) { + *rp++ = curr->gselector; + *rp = '\0'; /* re-terminate for index() */ + } + } + + /* loop until finished */ + while (!finished) { + if (reset_count) { + counting = FALSE; + count = 0; + } else + reset_count = TRUE; + + if (!page_start) { + /* new page to be displayed */ + if (curr_page < 0 || curr_page >= cw->npages) + panic("bad menu screen page #%d", curr_page); + + /* clear screen */ + if (!cw->offx) { /* if not corner, do clearscreen */ + if(cw->offy) { + tty_curs(window, 1, 0); + cl_eos(); + } else + clear_screen(); + } + + /* collect accelerators */ + page_start = cw->plist[curr_page]; + page_end = cw->plist[curr_page + 1]; + rp = resp; + for (page_lines = 0, curr = page_start; + curr != page_end; + page_lines++, curr = curr->next) { + if (curr->selector) + *rp++ = curr->selector; + + tty_curs(window, 1, page_lines); + if (cw->offx) cl_end(); + + (void) putchar(' '); + ++ttyDisplay->curx; + /* + * Don't use xputs() because (1) under unix it calls + * tputstr() which will interpret a '*' as some kind + * of padding information and (2) it calls xputc to + * actually output the character. We're faster doing + * this. + */ + term_start_attr(curr->attr); + for (n = 0, cp = curr->str; + *cp && (int) ++ttyDisplay->curx < (int) ttyDisplay->cols; + cp++, n++) + if (n == 2 && curr->identifier.a_void != 0 && + curr->selected) { + if (curr->count == -1L) + (void) putchar('+'); /* all selected */ + else + (void) putchar('#'); /* count selected */ + } else + (void) putchar(*cp); + term_end_attr(curr->attr); + } + *rp = 0; + + /* corner window - clear extra lines from last page */ + if (cw->offx) { + for (n = page_lines + 1; n < cw->maxrow; n++) { + tty_curs(window, 1, n); + cl_end(); + } + } + + /* set extra chars.. */ + Strcat(resp, default_menu_cmds); + Strcat(resp, "0123456789\033\n\r"); /* counts, quit */ + Strcat(resp, gacc); /* group accelerators */ + Strcat(resp, mapped_menu_cmds); + + if (cw->npages > 1) + Sprintf(cw->morestr, "(%d of %d)", + curr_page + 1, (int) cw->npages); + else + Strcpy(cw->morestr, msave); + + tty_curs(window, 1, page_lines); + cl_end(); + dmore(cw, resp); + } else { + /* just put the cursor back... */ + tty_curs(window, (int) strlen(cw->morestr) + 2, page_lines); + xwaitforspace(resp); + } + + morc = map_menu_cmd(morc); + switch (morc) { + case '0': + /* special case: '0' is also the default ball class */ + if (!counting && index(gacc, morc)) goto group_accel; + /* fall through to count the zero */ + case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + count = (count * 10L) + (long) (morc - '0'); + /* + * It is debatable whether we should allow 0 to + * start a count. There is no difference if the + * item is selected. If not selected, then + * "0b" could mean: + * + * count starting zero: "zero b's" + * ignore starting zero: "select b" + * + * At present I don't know which is better. + */ + if (count != 0L) { /* ignore leading zeros */ + counting = TRUE; + reset_count = FALSE; + } + break; + case '\033': /* cancel - from counting or loop */ + if (!counting) { + /* deselect everything */ + for (curr = cw->mlist; curr; curr = curr->next) { + curr->selected = FALSE; + curr->count = -1L; + } + cw->flags |= WIN_CANCELLED; + finished = TRUE; + } + /* else only stop count */ + break; + case '\0': /* finished (commit) */ + case '\n': + case '\r': + /* only finished if we are actually picking something */ + if (cw->how != PICK_NONE) { + finished = TRUE; + break; + } + /* else fall through */ + case MENU_NEXT_PAGE: + if (curr_page != cw->npages - 1) { + curr_page++; + page_start = 0; + } else + finished = TRUE; /* questionable behavior */ + break; + case MENU_PREVIOUS_PAGE: + if (curr_page != 0) { + --curr_page; + page_start = 0; + } + break; + case MENU_FIRST_PAGE: + if (curr_page != 0) { + page_start = 0; + curr_page = 0; + } + break; + case MENU_LAST_PAGE: + if (curr_page != cw->npages - 1) { + page_start = 0; + curr_page = cw->npages - 1; + } + break; + case MENU_SELECT_PAGE: + if (cw->how == PICK_ANY) + set_all_on_page(window, page_start, page_end); + break; + case MENU_UNSELECT_PAGE: + unset_all_on_page(window, page_start, page_end); + break; + case MENU_INVERT_PAGE: + if (cw->how == PICK_ANY) + invert_all_on_page(window, page_start, page_end, 0); + break; + case MENU_SELECT_ALL: + if (cw->how == PICK_ANY) { + set_all_on_page(window, page_start, page_end); + /* set the rest */ + for (curr = cw->mlist; curr; curr = curr->next) + if (curr->identifier.a_void && !curr->selected) + curr->selected = TRUE; + } + break; + case MENU_UNSELECT_ALL: + unset_all_on_page(window, page_start, page_end); + /* unset the rest */ + for (curr = cw->mlist; curr; curr = curr->next) + if (curr->identifier.a_void && curr->selected) { + curr->selected = FALSE; + curr->count = -1; + } + break; + case MENU_INVERT_ALL: + if (cw->how == PICK_ANY) + invert_all(window, page_start, page_end, 0); + break; + default: + if (cw->how == PICK_NONE || !index(resp, morc)) { + /* unacceptable input received */ + tty_nhbell(); + break; + } else if (index(gacc, morc)) { + group_accel: + /* group accelerator; for the PICK_ONE case, we know that + it matches exactly one item in order to be in gacc[] */ + invert_all(window, page_start, page_end, morc); + if (cw->how == PICK_ONE) finished = TRUE; + break; + } + /* find, toggle, and possibly update */ + for (n = 0, curr = page_start; + curr != page_end; + n++, curr = curr->next) + if (morc == curr->selector) { + if (curr->selected) { + if (counting && count > 0) { + curr->count = count; + set_item_state(window, n, curr); + } else { /* change state */ + curr->selected = FALSE; + curr->count = -1L; + set_item_state(window, n, curr); + } + } else { /* !selected */ + if (counting && count > 0) { + curr->count = count; + curr->selected = TRUE; + set_item_state(window, n, curr); + } else if (!counting) { + curr->selected = TRUE; + set_item_state(window, n, curr); + } + /* do nothing counting&&count==0 */ + } + + if (cw->how == PICK_ONE) finished = TRUE; + break; /* from `for' loop */ + } + break; + } + + } /* while */ + cw->morestr = msave; + } + + static void + process_text_window(window, cw) + winid window; + struct WinDesc *cw; + { + int i, n, attr; + register char *cp; + + for (n = 0, i = 0; i < cw->maxrow; i++) { + if (!cw->offx && (n + cw->offy == ttyDisplay->rows - 1)) { + tty_curs(window, 1, n); + cl_end(); + dmore(cw, quitchars); + if (morc == '\033') { + cw->flags |= WIN_CANCELLED; + break; + } + if (cw->offy) { + tty_curs(window, 1, 0); + cl_eos(); + } else + clear_screen(); + n = 0; + } + tty_curs(window, 1, n++); + if (cw->offx) cl_end(); + if (cw->data[i]) { + attr = cw->data[i][0] - 1; + if (cw->offx) { + (void) putchar(' '); ++ttyDisplay->curx; + } + term_start_attr(attr); + for (cp = &cw->data[i][1]; + *cp && (int) ++ttyDisplay->curx < (int) ttyDisplay->cols; + cp++) + (void) putchar(*cp); + term_end_attr(attr); + } + } + if (i == cw->maxrow) { + tty_curs(BASE_WINDOW, (int)cw->offx + 1, + (cw->type == NHW_TEXT) ? (int) ttyDisplay->rows - 1 : n); + cl_end(); + dmore(cw, quitchars); + if (morc == '\033') + cw->flags |= WIN_CANCELLED; + } + } + /*ARGSUSED*/ void tty_display_nhwindow(window, blocking) *************** *** 886,893 **** boolean blocking; /* with ttys, all windows are blocking */ { register struct WinDesc *cw = 0; - int i, n, attr; - register char *cp; if(window == WIN_ERR || (cw = wins[window]) == (struct WinDesc *) 0) panic(winpanicstr, window); --- 1221,1226 ---- *************** *** 906,912 **** ttyDisplay->toplin = 0; cw->curx = cw->cury = 0; if(!cw->active) ! flags.window_inited = TRUE; break; case NHW_MAP: end_glyphout(); --- 1239,1245 ---- ttyDisplay->toplin = 0; cw->curx = cw->cury = 0; if(!cw->active) ! iflags.window_inited = TRUE; break; case NHW_MAP: end_glyphout(); *************** *** 920,925 **** --- 1253,1259 ---- break; case NHW_TEXT: cw->maxcol = ttyDisplay->cols; /* force full-screen mode */ + /*FALLTHRU*/ case NHW_MENU: cw->active = 1; /* avoid converting to uchar before calculations are finished */ *************** *** 940,1262 **** } else tty_clear_nhwindow(WIN_MESSAGE); ! if (cw->mlist) { ! int curr_page, page_lines; ! tty_menu_item *page_start, *page_end, *curr; ! boolean finished, counting, reset_count; ! char *rp, resp[QBUFSZ], gacc[QBUFSZ], *msave, morestr[QBUFSZ]; ! long count; ! ! curr_page = page_lines = 0; ! curr_page = 0; ! page_start = page_end = 0; ! msave = cw->morestr; /* save the morestr */ ! cw->morestr = morestr; ! counting = FALSE; ! count = 0; ! reset_count = TRUE; ! finished = FALSE; ! ! /* collect group accelerators when doing multiple pickups */ ! gacc[0] = 0; ! if (cw->how == PICK_ANY) { ! for (rp = gacc, curr = cw->mlist; curr; curr = curr->next) { ! if (curr->gselector && !index(gacc, curr->gselector)) { ! *rp++ = curr->gselector; ! *rp = 0; ! } ! } ! *rp = 0; ! } ! ! /* loop until finished */ ! while (!finished) { ! if (reset_count) { ! counting = FALSE; ! count = 0; ! } else ! reset_count = TRUE; ! ! if (!page_start) { ! /* new page to be displayed */ ! if (curr_page < 0 || curr_page >= cw->npages) ! panic("bad menu screen page #%d", curr_page); ! ! /* clear screen */ ! if (!cw->offx) { /* if not corner, do clearscreen */ ! if(cw->offy) { ! tty_curs(window, 1, 0); ! cl_eos(); ! } else ! clear_screen(); ! } ! ! /* collect accelerators */ ! page_start = cw->plist[curr_page]; ! page_end = cw->plist[curr_page+1]; ! rp = resp; ! for (page_lines = 0, curr = page_start; ! curr != page_end; page_lines++, curr = curr->next) { ! if (curr->selector) ! *rp++ = curr->selector; ! ! tty_curs(window, 1, page_lines); ! if(cw->offx) cl_end(); ! ! (void) putchar(' '); ! ++ttyDisplay->curx; ! /* ! * Don't use xputs() because (1) under unix it calls ! * tputstr() which will interpret a '*' as some kind ! * of padding information and (2) it calls xputc to ! * actually output the character. We're faster doing ! * this. ! */ ! term_start_attr(curr->attr); ! for(n = 0, cp = curr->str; *cp && ! (int)++ttyDisplay->curx < (int) ttyDisplay->cols; ! cp++, n++) ! if (n == 2 && curr->identifier.a_void != 0 && ! curr->selected) { ! if (curr->count == -1L) ! (void) putchar('+'); /* all selected */ ! else ! (void) putchar('#'); /* count selected */ ! } else ! (void) putchar(*cp); ! term_end_attr(curr->attr); ! } ! *rp = 0; ! ! /* corner window - clear extra lines from last page */ ! if (cw->offx) { ! for (n = page_lines+1; n < cw->maxrow; n++) { ! tty_curs(window, 1, n); ! cl_end(); ! } ! } ! ! /* set extra chars.. */ ! Strcat(resp, default_menu_cmds); ! Strcat(resp, "0123456789\033\n\r"); /* counts, quit */ ! Strcat(resp, gacc); /* group accelerators */ ! Strcat(resp, mapped_menu_cmds); ! ! if (cw->npages > 1) ! Sprintf(cw->morestr, "(%d of %d)", ! curr_page+1, (int) cw->npages); ! else ! Strcpy(cw->morestr, msave); ! ! tty_curs(window, 1, page_lines); ! cl_end(); ! dmore(cw, resp); ! } else { ! /* just put the cursor back... */ ! tty_curs(window, strlen(cw->morestr)+2, page_lines); ! xwaitforspace(resp); ! } ! ! morc = map_menu_cmd(morc); ! switch (morc) { ! case '0': ! /* special case: '0' is also the default ball class */ ! if (!counting && index(gacc, morc)) { ! invert_all(window, page_start, page_end, morc); ! break; ! } ! /* fall through to count the zero */ ! case '1': case '2': case '3': case '4': ! case '5': case '6': case '7': case '8': case '9': ! count = (count * 10L) + (long) (morc - '0'); ! /* ! * It is debatable whether we should allow 0 to ! * start a count. There is no difference if the ! * item is selected. If not selected, then ! * "0b" could mean: ! * ! * count starting zero: "zero b's" ! * ignore starting zero: "select b" ! * ! * At present I don't know which is better. ! */ ! if (count != 0L) { /* ignore leading zeros */ ! counting = TRUE; ! reset_count = FALSE; ! } ! break; ! case '\033': /* cancel - from counting or loop */ ! if (!counting) { ! /* deselect everything */ ! for (curr = cw->mlist; curr; curr = curr->next) { ! curr->selected = FALSE; ! curr->count = -1; ! } ! cw->flags |= WIN_CANCELLED; ! finished = TRUE; ! } ! /* else only stop count */ ! break; ! case '\0': /* finished (commit) */ ! case '\n': ! case '\r': ! /* only finished if we are actually picking something */ ! if (cw->how != PICK_NONE) { ! finished = TRUE; ! break; ! } ! /* else fall through */ ! case MENU_NEXT_PAGE: ! if (curr_page != cw->npages-1) { ! curr_page++; ! page_start = 0; ! } else ! finished = TRUE; /* questionable behavior */ ! break; ! case MENU_PREVIOUS_PAGE: ! if (curr_page != 0) { ! --curr_page; ! page_start = 0; ! } ! break; ! case MENU_FIRST_PAGE: ! if (curr_page != 0) { ! page_start = 0; ! curr_page = 0; ! } ! break; ! case MENU_LAST_PAGE: ! if (curr_page != cw->npages-1) { ! page_start = 0; ! curr_page = cw->npages-1; ! } ! break; ! case MENU_SELECT_PAGE: ! if (cw->how != PICK_ONE) ! set_all_on_page(window, page_start, page_end); ! break; ! case MENU_UNSELECT_PAGE: ! if (cw->how != PICK_ONE) ! unset_all_on_page(window, page_start, page_end); ! break; ! case MENU_INVERT_PAGE: ! if (cw->how != PICK_ONE) ! invert_all_on_page(window, page_start, page_end, 0); ! break; ! case MENU_SELECT_ALL: ! if (cw->how == PICK_ONE) break; ! ! set_all_on_page(window, page_start, page_end); ! /* set the rest */ ! for (curr = cw->mlist; curr; curr = curr->next) ! if (curr->identifier.a_void && !curr->selected) ! curr->selected = TRUE; ! break; ! case MENU_UNSELECT_ALL: ! if (cw->how == PICK_ONE) break; ! ! unset_all_on_page(window, page_start, page_end); ! /* unset the rest */ ! for (curr = cw->mlist; curr; curr = curr->next) ! if (curr->identifier.a_void && curr->selected) { ! curr->selected = FALSE; ! curr->count = -1; ! } ! break; ! case MENU_INVERT_ALL: ! if (cw->how == PICK_ONE) break; ! invert_all(window, page_start, page_end, 0); ! break; ! default: ! if (cw->how != PICK_NONE && index(resp, morc)) { ! int nn; /* nth row */ ! tty_menu_item *ncurr; ! ! if (index(gacc, morc)) { ! invert_all(window, page_start, page_end, morc); ! } else { ! /* find, toggle, and possibly update */ ! for (nn = 0, ncurr = page_start; ! ncurr != page_end; ! nn++, ncurr = ncurr->next) ! if (morc == ncurr->selector) { ! if (ncurr->selected) { ! if (counting && count > 0) { ! ncurr->count = count; ! set_item_state(window,nn,ncurr); ! } else { /* change state */ ! ncurr->selected = FALSE; ! ncurr->count = -1L; ! set_item_state(window,nn,ncurr); ! } ! } else { /* !selected */ ! if (counting && count > 0) { ! ncurr->count = count; ! ncurr->selected = TRUE; ! set_item_state(window,nn,ncurr); ! } else if (!counting) { ! ncurr->selected = TRUE; ! set_item_state(window,nn,ncurr); ! } ! /* do nothing counting&&count==0 */ ! } ! ! if (cw->how == PICK_ONE) ! finished = TRUE; ! break; ! } ! } ! } else ! tty_nhbell(); ! break; ! } ! ! } /* while */ ! cw->morestr = msave; ! ! } else { ! ! for(n=0, i=0; imaxrow; i++) { ! if(!cw->offx && (n+cw->offy == ttyDisplay->rows-1)) { ! tty_curs(window, 1, n); ! cl_end(); ! dmore(cw, quitchars); ! if(morc == '\033') { ! cw->flags |= WIN_CANCELLED; ! break; ! } ! if(cw->offy) { ! tty_curs(window, 1, 0); ! cl_eos(); ! } else ! clear_screen(); ! n = 0; ! } ! tty_curs(window, 1, n++); ! if(cw->offx) cl_end(); ! if(cw->data[i]) { ! attr = cw->data[i][0]-1; ! if(cw->offx) { ! (void) putchar(' '); ++ttyDisplay->curx; ! } ! term_start_attr(attr); ! for(cp = &cw->data[i][1]; *cp && ! (int)++ttyDisplay->curx < (int) ttyDisplay->cols; cp++) ! (void) putchar(*cp); ! term_end_attr(attr); ! } ! } ! if(i == cw->maxrow) { ! if(cw->type == NHW_TEXT) ! tty_curs(BASE_WINDOW, (int)cw->offx+1, (int)ttyDisplay->rows-1); ! else ! tty_curs(BASE_WINDOW, (int)cw->offx+1, n); ! cl_end(); ! dmore(cw, quitchars); ! if (morc == '\033') ! cw->flags |= WIN_CANCELLED; ! } ! } break; } cw->active = 1; --- 1274,1283 ---- } else tty_clear_nhwindow(WIN_MESSAGE); ! if (cw->mlist) ! process_menu_window(window, cw); ! else ! process_text_window(window, cw); break; } cw->active = 1; *************** *** 1286,1292 **** case NHW_MENU: case NHW_TEXT: if(cw->active) { ! if (flags.window_inited) { /* otherwise dismissing the text endwin after other windows * are dismissed tries to redraw the map and panics. since * the whole reason for dismissing the other windows was to --- 1307,1313 ---- case NHW_MENU: case NHW_TEXT: if(cw->active) { ! if (iflags.window_inited) { /* otherwise dismissing the text endwin after other windows * are dismissed tries to redraw the map and panics. since * the whole reason for dismissing the other windows was to *************** *** 1314,1320 **** if(cw->active) tty_dismiss_nhwindow(window); if(cw->type == NHW_MESSAGE) ! flags.window_inited = 0; if(cw->type == NHW_MAP) clear_screen(); --- 1335,1341 ---- if(cw->active) tty_dismiss_nhwindow(window); if(cw->type == NHW_MESSAGE) ! iflags.window_inited = 0; if(cw->type == NHW_MAP) clear_screen(); *************** *** 1972,1978 **** if (y<(int) cw->offy || y+clipy > ROWNO) continue; /* only refresh board */ #if defined(USE_TILES) && defined(MSDOS) ! if (tiles_on) row_refresh((xmin/2)+clipx-((int)cw->offx/2),COLNO-1,y+clipy-(int)cw->offy); else #endif --- 1993,1999 ---- if (y<(int) cw->offy || y+clipy > ROWNO) continue; /* only refresh board */ #if defined(USE_TILES) && defined(MSDOS) ! if (iflags.tile_view) row_refresh((xmin/2)+clipx-((int)cw->offx/2),COLNO-1,y+clipy-(int)cw->offy); else #endif *************** *** 2015,2021 **** register char ch = (char)in_ch; # if defined(ASCIIGRAPH) && !defined(NO_TERMS) ! if (flags.IBMgraphics) /* IBM-compatible displays don't need other stuff */ (void) putchar(ch); else if (ch & 0x80) { --- 2036,2042 ---- register char ch = (char)in_ch; # if defined(ASCIIGRAPH) && !defined(NO_TERMS) ! if (iflags.IBMgraphics) /* IBM-compatible displays don't need other stuff */ (void) putchar(ch); else if (ch & 0x80) { *************** *** 2101,2114 **** #ifdef TEXTCOLOR int color; ! #define zap_color(n) color = flags.use_color ? zapcolors[n] : NO_COLOR ! #define cmap_color(n) color = flags.use_color ? defsyms[n].color : NO_COLOR ! #define obj_color(n) color = flags.use_color ? objects[n].oc_color : NO_COLOR ! #define mon_color(n) color = flags.use_color ? mons[n].mcolor : NO_COLOR ! #define pet_color(n) color = flags.use_color ? mons[n].mcolor : \ /* If no color, try to hilite pets; black */ \ /* should be HI */ \ ! ((flags.hilite_pet && has_color(CLR_BLACK)) ? \ CLR_BLACK : NO_COLOR) # else /* no text color */ --- 2122,2135 ---- #ifdef TEXTCOLOR int color; ! #define zap_color(n) color = iflags.use_color ? zapcolors[n] : NO_COLOR ! #define cmap_color(n) color = iflags.use_color ? defsyms[n].color : NO_COLOR ! #define obj_color(n) color = iflags.use_color ? objects[n].oc_color : NO_COLOR ! #define mon_color(n) color = iflags.use_color ? mons[n].mcolor : NO_COLOR ! #define pet_color(n) color = iflags.use_color ? mons[n].mcolor : \ /* If no color, try to hilite pets; black */ \ /* should be HI */ \ ! ((iflags.hilite_pet && has_color(CLR_BLACK)) ? \ CLR_BLACK : NO_COLOR) # else /* no text color */ *************** *** 2185,2191 **** } #endif /* TEXTCOLOR */ #if defined(USE_TILES) && defined(MSDOS) ! if (flags.grmode && tiles_on) xputg(glyph,(int)ch); else #endif --- 2206,2212 ---- } #endif /* TEXTCOLOR */ #if defined(USE_TILES) && defined(MSDOS) ! if (iflags.grmode && iflags.tile_view) xputg(glyph,(int)ch); else #endif *** Old/win/win32/nhprocs.c Tue Dec 10 16:59:10 1996 --- win/win32/nhprocs.c Mon Jun 17 18:35:32 1996 *************** *** 390,396 **** winid window; boolean blocking; { ! if (window == WIN_MESSAGE) flags.window_inited = TRUE; if (blocking && wins[window]->morestr) win32_putstr(window, 1, wins[window]->morestr); --- 390,396 ---- winid window; boolean blocking; { ! if (window == WIN_MESSAGE) iflags.window_inited = TRUE; if (blocking && wins[window]->morestr) win32_putstr(window, 1, wins[window]->morestr); *** Old/win/win32/nhwin32.h Tue Dec 10 16:59:14 1996 --- win/win32/nhwin32.h Mon Jun 17 18:35:32 1996 *************** *** 69,82 **** }; #ifdef TEXTCOLOR ! #define zap_color(n) color = flags.use_color ? zapcolors[n] : NO_COLOR ! #define cmap_color(n) color = flags.use_color ? defsyms[n].color : NO_COLOR ! #define obj_color(n) color = flags.use_color ? objects[n].oc_color : NO_COLOR ! #define mon_color(n) color = flags.use_color ? mons[n].mcolor : NO_COLOR ! #define pet_color(n) color = flags.use_color ? mons[n].mcolor : \ /* If no color, try to hilite pets; black */ \ /* should be HI */ \ ! ((flags.hilite_pet && has_color(CLR_BLACK)) ? \ CLR_BLACK : NO_COLOR) # else /* no text color */ #define zap_color(n) --- 69,82 ---- }; #ifdef TEXTCOLOR ! #define zap_color(n) color = iflags.use_color ? zapcolors[n] : NO_COLOR ! #define cmap_color(n) color = iflags.use_color ? defsyms[n].color : NO_COLOR ! #define obj_color(n) color = iflags.use_color ? objects[n].oc_color : NO_COLOR ! #define mon_color(n) color = iflags.use_color ? mons[n].mcolor : NO_COLOR ! #define pet_color(n) color = iflags.use_color ? mons[n].mcolor : \ /* If no color, try to hilite pets; black */ \ /* should be HI */ \ ! ((iflags.hilite_pet && has_color(CLR_BLACK)) ? \ CLR_BLACK : NO_COLOR) # else /* no text color */ #define zap_color(n) *** Old/win/win32/nhwin32.rc Tue Dec 10 16:59:16 1996 --- win/win32/nhwin32.rc Mon Oct 21 22:17:26 1996 *************** *** 4,10 **** #include "..\include\win32api.h" #include "..\include\nhwin32.h" ! #include "..\include\patchlev.h" NHIcon ICON NetHack_.ico --- 4,10 ---- #include "..\include\win32api.h" #include "..\include\nhwin32.h" ! #include "..\include\patchlevel.h" NHIcon ICON NetHack_.ico