diff -c -r angband-283-old/lib/help/option.txt foo/angband-283/lib/help/option.txt *** angband-283-old/lib/help/option.txt Sun Feb 8 03:33:07 1998 --- foo/angband-283/lib/help/option.txt Wed Feb 11 06:30:27 1998 *************** *** 65,100 **** discounts. The resulting stack keeps the largest discount. This option may cause you to lose "value", but will give you optimal pack usage. ! Show labels in object lists [show_labels] ! Display the "labels" for objects in the "equipment" list, and in any ! "special" window which is displaying the "equipment". These labels ! indicate what the player is "using" the object for, such as "wielding" ! or "wearing" (in a given location). After you have played for a while, ! this information is no longer useful, and can be annoying. ! ! Show weights in object lists [show_weights] ! Display the weights of objects in the "inventory" and "equipment" lists, ! and in "stores", and in any "special" window which is displaying objects. ! ! Show choices in certain sub-windows [show_choices] ! Display "choices" in any sub-windows which are being used to display ! your inventory or equipment. Also, if exactly one sub-window is being ! used to display your inventory or equipment, then it will (temporarily) ! be toggled as needed to always show the "appropriate" set of objects. ! ! Show details in certain sub-windows [show_details] ! Display extra details in any sub-windows (and the main screen) which ! are being used to display monster recall. These details include the ! number of monsters killed and the textual descriptions. Audible bell (on errors, etc) [ring_bell] Attempt to make a "bell" noise when various "errors" occur. - Use color for inventory listings [inventory_colors] - Use color for object descriptions whenever the inventory, equipment, - or store contents are being displayed. The colors are based on object - types, not on actual object colors. - === Option Set 2 -- Disturbance === --- 65,97 ---- discounts. The resulting stack keeps the largest discount. This option may cause you to lose "value", but will give you optimal pack usage. ! Show labels in equipment listings [show_labels] ! Display "labels" (what an object is being used for) for objects in all ! "equipment" listings. ! ! Show weights in all object listings [show_weights] ! Display "weights" (in pounds) of objects in all "inventory", "equipment", ! "store items", and "home items" listings. ! ! Show choices in inven/equip listings [show_choices] ! Display "choices" (legal responses) in any sub-windows which are being ! used to display your inventory or equipment. Also, if one sub-window ! is being used to display your inventory or equipment, then this option ! will cause it to be (temporarily) toggled as needed to always show the ! "appropriate" set of objects (inventory or equipment). ! ! Show details in monster descriptions [show_details] ! Display "details" (including number of monsters killed, and textual ! descriptions) in monster descriptions. ! are displaying the monster. ! ! Show flavors in object descriptions [show_flavors] ! Display "flavors" (color or variety) in object descriptions, even for ! objects whose type is known. This does not affect objects in stores. Audible bell (on errors, etc) [ring_bell] Attempt to make a "bell" noise when various "errors" occur. === Option Set 2 -- Disturbance === *************** *** 234,241 **** option is extremely slow, but can produce viciously smart monsters. Monsters chase recent locations (v.slow) [flow_by_smell] ! As above, but also allow monsters to take advantage of "old" trails ! that you may have left in the dungeon. Monsters learn from their mistakes [smart_learn] Allow monsters to learn what spell attacks you are resistant to, --- 231,238 ---- option is extremely slow, but can produce viciously smart monsters. Monsters chase recent locations (v.slow) [flow_by_smell] ! Allow monsters to take advantage of "old" trails that you may have left ! in the dungeon. This has no effect unless "flow_by_sound" is also set. Monsters learn from their mistakes [smart_learn] Allow monsters to learn what spell attacks you are resistant to, *************** *** 439,456 **** at which the player is warned that he may die. It is also used as the cut-off for using red to display both hitpoints and mana. ! The "delay_factor" value, if non-zero, is used to "slow down" the game, which is ! useful to allow you to "observe" the temporal effects of bolt, beam, and ball ! attacks. The actual delay is equal to "delay_factor" cubed, in milliseconds. ! The "preserve" flag, if set when the character was created, cancels all level feelings of the "special" variety, but allows "missed" artifacts to be "saved" by wandering monsters and found again at a later time. This only works for ! non-identified artifacts. ! The "maximize" flag, if set when the character was created, causes the "race" and "class" stat bonuses to be applied as "equipment" bonuses. This usually makes the character harder at the beginning of the game, but easier later on, ! since the stats are no longer limited to a "natural" value of "18/100". --- 436,455 ---- at which the player is warned that he may die. It is also used as the cut-off for using red to display both hitpoints and mana. ! The "delay_factor" value, if non-zero, will slow down the visual effects used ! for missile, bolt, beam, and ball attacks. The actual time delay is equal to ! "delay_factor" cubed, in milliseconds. ! The "preserve" flag (specified when a character is created) cancels all level feelings of the "special" variety, but allows "missed" artifacts to be "saved" by wandering monsters and found again at a later time. This only works for ! non-identified artifacts. The character description screen shows the value ! of this flag. ! The "maximize" flag (specified when a character is created) causes the "race" and "class" stat bonuses to be applied as "equipment" bonuses. This usually makes the character harder at the beginning of the game, but easier later on, ! since the stats are no longer limited to a "natural" value of "18/100". The ! character description screen shows the value of this flag. diff -c -r angband-283-old/lib/user/graf-xxx.prf foo/angband-283/lib/user/graf-xxx.prf *** angband-283-old/lib/user/graf-xxx.prf Mon Feb 9 03:47:04 1998 --- foo/angband-283/lib/user/graf-xxx.prf Wed Feb 11 06:30:27 1998 *************** *** 7,21 **** # # This file is included by any platform which uses the "standard" Angband # bitmap file (a 32x32 collection of 8x8 bitmaps), including "pref-ami.prf", ! # "pref-mac.prf", and "pref-win.prf". # # Adapted from the file "graf-ami.prf", provided, along with the original # pixmap file itself, by Lars Haugseth . # ##### Special attr/char values ##### ## # Unused (@) ## S:0x00:0x00/0x40 ## S:0x01:0x01/0x40 --- 7,23 ---- # # This file is included by any platform which uses the "standard" Angband # bitmap file (a 32x32 collection of 8x8 bitmaps), including "pref-ami.prf", ! # "pref-mac.prf", "pref-win.prf", "pref-dos.prf", and "pref-x11.prf". # # Adapted from the file "graf-ami.prf", provided, along with the original # pixmap file itself, by Lars Haugseth . # + ##### Special attr/char values ##### + ## # Unused (@) ## S:0x00:0x00/0x40 ## S:0x01:0x01/0x40 *************** *** 305,311 **** S:0xFF:0x8B/0x81 ! ### Feature attr/char definitions # nothing F:0:0x81/0x80 --- 307,315 ---- S:0xFF:0x8B/0x81 ! ! ##### Feature attr/char definitions ##### ! # nothing F:0:0x81/0x80 *************** *** 501,507 **** ! ### Object attr/char definitions # something K:0:0x01/0x20 --- 505,512 ---- ! ##### Object attr/char definitions ##### ! # something K:0:0x01/0x20 *************** *** 1813,1819 **** ! ### Monster attr/char definitions # Player R:0:0x8C/0x80 --- 1818,1825 ---- ! ##### Monster attr/char definitions ##### ! # Player R:0:0x8C/0x80 *************** *** 3460,3463 **** --- 3466,3471 ---- R:547:0x92/0x9E + # Load the special player pictures + %:xtra-xxx.prf diff -c -r angband-283-old/lib/user/pref-emx.prf foo/angband-283/lib/user/pref-emx.prf *** angband-283-old/lib/user/pref-emx.prf Fri Jan 30 00:48:13 1998 --- foo/angband-283/lib/user/pref-emx.prf Wed Feb 11 06:18:29 1998 *************** *** 1,163 **** # File: pref-emx.prf # ! # This file is used by Angband (when it was compiled using "main-emx.c") ! # to specify various "user preferences". This file specifies some visual ! # attr/char remappings, which allow the use of some of OS/2's built in ! # pseudo-graphic pictures for walls and such. This file defines some basic ! # macros, which allow the use of the "keypad", alone, and with the shift or ! # control modifier keys. All "special" keys are translated by "main-emx.c" ! # into special "macro triggers" of the encoded form "^_SSS\r", where the ! # two digit decimal scan code of the keypress is stored in "SSS", see ! # "main-emx.c" for info. # ! # This file is only used by the VIO (text mode) version of Angband. The PM (graphical) ! # version uses *ibm.prf. The macro triggers of these two versions are not ! # compatible or interchangable. # ! ! ! ! ### Terrain Features ### ! ! ! # ! # Floors (white / centered dot) ! # ! ! F:1:1/-7 ! # ! # Invis traps (white / centered dot) ! # ! ! F:2:1/-7 ! ! ! # ! # Magma (slate / special solid block) ! # ! ! F:50:2/-80 ! F:52:2/-80 ! ! # - # Quartz (light slate / special solid block) - # - - F:51:9/-80 - F:53:9/-80 - - - # - # Secret door (white / solid block) - # - - F:48:1/-79 - - # - # Granite walls (white / solid block) - # - - F:56:1/-79 - F:57:1/-79 - F:58:1/-79 - F:59:1/-79 - - # - # Permanent rock (white / solid block) - # - - F:60:1/-79 - F:61:1/-79 - F:62:1/-79 - F:63:1/-79 - - - - ### Basic Macros ### - - - # - # Keypad (7,8,9,-,4,5,6,+,1,2,3,0,.) - # - - A:7 - P:^_071\r - - A:8 - P:^_072\r - - A:9 - P:^_073\r - - A:- - P:^_074\r - - A:4 - P:^_075\r - - A:5 - P:^_076\r - - A:6 - P:^_077\r - - A:+ - P:^_078\r - - A:1 - P:^_079\r - - A:2 - P:^_080\r - - A:3 - P:^_081\r - - A:0 - P:^_082\r - - A:. - P:^_083\r - - - # - # Shift-Keypad-8, for example, is exactly '8', so these cannot be used for macros - # - - # - # Control + Keypad (1,2,3,4,5,6,7,8,9) - # - # Run, Run, Run, Run, Run, Run, Run, Run, RUN! - # - - A:\e\e\\.1 - P:^_117\r - - A:\e\e\\.2 - P:^_145\r - - A:\e\e\\.3 - P:^_118\r - - A:\e\e\\.4 - P:^_115\r - - A:\e\e\\.5 - P:^_143\r - - A:\e\e\\.6 - P:^_116\r - - A:\e\e\\.7 - P:^_119\r - - A:\e\e\\.8 - P:^_141\r ! A:\e\e\\.9 ! P:^_132\r --- 1,16 ---- # File: pref-emx.prf # ! # Include "pref-ibm.prf" to get the default macros. # ! # Note that, while most key-to-trigger mappings are the same as DOS/Win, ! # some few odd keys will be different or not available at all. # ! # Examples: Ctrl-Escape, Alt-PrintScreen # ! # What's NOT working: color palette redefinitions. # ! %:pref-win.prf diff -c -r angband-283-old/src/Makefile.emx foo/angband-283/src/Makefile.emx *** angband-283-old/src/Makefile.emx Fri Feb 6 04:08:39 1998 --- foo/angband-283/src/Makefile.emx Wed Feb 11 06:17:46 1998 *************** *** 3,11 **** # Purpose: Makefile support for "main-emx.c" # Note: Use 'dmake -B -r -f makefile.emx' to compile (see "main-emx.c" for details). - # Since "dmake" does not demand "hard" tab stops as delimiters, - # don't bother to add them. - # # Use 'dmake -B -r -f makefile.emx install' to install the executables # and the batch file used for multiple VIO windows in the parent directory. # --- 3,8 ---- *************** *** 18,24 **** # all changed files (diff -c). "..\exp\patches.uue" will # contain the same file gziped and uuencodes. "..\exp\files.uue" # will contain the three emx-specific files tared, gziped and ! # uuencoded. Needs 4OS2. # # 'export': The file "..\exp\$(EXPORT)" is created so that it # can directly be uploaded as an official distribution archive. --- 15,21 ---- # all changed files (diff -c). "..\exp\patches.uue" will # contain the same file gziped and uuencodes. "..\exp\files.uue" # will contain the three emx-specific files tared, gziped and ! # uuencoded. Needs 4OS2. # # 'export': The file "..\exp\$(EXPORT)" is created so that it # can directly be uploaded as an official distribution archive. *************** *** 28,40 **** VERSION = 279v5 EXPORT = angband-$(VERSION).os2.zip ! CC = gcc AR = ar ! CFLAGS = -MMD -O3 -DUSE_EMX -Zmt ! LFLAGS = -lvideo # Uncomment this if you have nice installed ! NICE = nice -i -n -30 ################################################################################### --- 25,37 ---- VERSION = 279v5 EXPORT = angband-$(VERSION).os2.zip ! CC = gcc AR = ar ! CFLAGS = -MMD -O3 -DUSE_EMX -Zmt ! LFLAGS = -lvideo # Uncomment this if you have nice installed ! NICE = nice -i -n -30 ################################################################################### *************** *** 45,57 **** install: ..\angband.exe ..\aclient.exe ..\startwnd.cmd clean: ! -+@ del angband.exe ! -+@ del aclient.exe ! -+@ del depends ! -+@ del _state.mk ! -+@ del *.a ! -+@ del *.d ! -+@ del *.o patches: ..\patches.txt ..\exp\patches.uue ..\exp\files.uue --- 42,54 ---- install: ..\angband.exe ..\aclient.exe ..\startwnd.cmd clean: ! -+@ del angband.exe ! -+@ del aclient.exe ! -+@ del depends ! -+@ del _state.mk ! -+@ del *.a ! -+@ del *.d ! -+@ del *.o patches: ..\patches.txt ..\exp\patches.uue ..\exp\files.uue *************** *** 62,139 **** #################################################################################### OBJS = \ ! z-util.o z-virt.o z-form.o z-rand.o z-term.o \ ! variable.o tables.o util.o cave.o \ ! object1.o object2.o monster1.o monster2.o \ ! xtra1.o xtra2.o spells1.o spells2.o \ ! melee1.o melee2.o save.o files.o \ ! cmd1.o cmd2.o cmd3.o cmd4.o cmd5.o cmd6.o \ ! store.o birth.o load1.o load2.o \ ! wizard1.o wizard2.o \ ! generate.o dungeon.o init1.o init2.o .c.o: ! $(NICE) $(CC) $(CFLAGS) -c $*.c all .PHONY: angband.exe aclient.exe ! +@echo. ! +@echo Now type ! +@echo. ! +@echo '$(MAKECMD) $(MFLAGS) $(MAKEFILE) install' ! +@echo. ! +@echo to install Angband in the parent directory, and/or ! +@echo. ! +@echo '$(MAKECMD) $(MFLAGS) $(MAKEFILE) clean' ! +@echo. ! +@echo to remove a bunch of temporary files used during compilation! ! +@echo You may want to remove the src subdirectory, now that you have ! +@echo working executables. ! +@echo. EXPFILES = angband.exe;aclient.exe;patches.txt;readme;startwnd.cmd ..\exp\$(EXPORT) .PHONY .IGNORE: install patches # Needs 4OS2! ! +@ md ..\exp >& nul ^ \ ! md ..\exp\tmpdir >& nul ^ \ ! cd ..\exp\tmpdir ^ \ ! copy ...\$(EXPFILES) > nul ^ \ ! md lib ^ \ ! copy ...\lib\ lib\ /s >& nul ^ \ ! del lib\save\player >& nul ^ \ ! zip -m -r $(EXPORT) * > nul ^ \ ! move $(EXPORT) .. ^ \ ! cd .. ^ \ ! del tmpdir /xsqy >& nul ! PATCHFILES = *.c *.h makefile* ..\lib\user\pref-emx.prf # Needs 4OS2! ..\patches.txt .PHONY .IGNORE: ! +@ echo These are the changes to the original source > ..\patches.txt ^ \ ! echo archive ($(VERSION)). You don't need to apply them >> ..\patches.txt ^ \ ! echo if you can get the latest archive, which will >> ..\patches.txt ^ \ ! echo have them applied already. >> ..\patches.txt ^ \ ! echo. >> ..\patches.txt ^ \ ! except (*~) for %a in ($(PATCHFILES)) \ ! do (diff -c ..\old\src\%a %a >> ..\patches.txt) # Needs 4OS2! ..\exp\patches.uue: ..\patches.txt ! +@ md ..\exp >& nul ^ \ ! cd ..\exp ^ \ ! copy ..\patches.txt patches-$(VERSION).os2 ^ \ ! gzip -f patches-$(VERSION).os2 ^ \ ! uuencode patches-$(VERSION).os2.gz >& nul ^ \ ! del patches-$(VERSION).os2.gz ^ \ ! move patches-$(VERSION).os2.gz.uue patches.uue FILES = main-emx.c makefile.emx ..\lib\user\pref-emx.prf FILESP = main-emx.c makefile.emx pref-emx.prf # Needs 4OS2! ..\exp\files.uue: $(FILES) ! +@ md ..\exp >& nul ^ \ cd ..\exp ^ \ for %a in ($(FILES)) copy ..\src\%a > nul ^ \ tar -cvf files.tar $(FILESP) ^ \ --- 59,136 ---- #################################################################################### OBJS = \ ! z-util.o z-virt.o z-form.o z-rand.o z-term.o \ ! variable.o tables.o util.o cave.o \ ! object1.o object2.o monster1.o monster2.o \ ! xtra1.o xtra2.o spells1.o spells2.o \ ! melee1.o melee2.o save.o files.o \ ! cmd1.o cmd2.o cmd3.o cmd4.o cmd5.o cmd6.o \ ! store.o birth.o load1.o load2.o \ ! wizard1.o wizard2.o \ ! generate.o dungeon.o init1.o init2.o .c.o: ! $(NICE) $(CC) $(CFLAGS) -c $*.c all .PHONY: angband.exe aclient.exe ! +@echo. ! +@echo Now type ! +@echo. ! +@echo '$(MAKECMD) $(MFLAGS) $(MAKEFILE) install' ! +@echo. ! +@echo to install Angband in the parent directory, and/or ! +@echo. ! +@echo '$(MAKECMD) $(MFLAGS) $(MAKEFILE) clean' ! +@echo. ! +@echo to remove a bunch of temporary files used during compilation! ! +@echo You may want to remove the src subdirectory, now that you have ! +@echo working executables. ! +@echo. EXPFILES = angband.exe;aclient.exe;patches.txt;readme;startwnd.cmd ..\exp\$(EXPORT) .PHONY .IGNORE: install patches # Needs 4OS2! ! +@ md ..\exp >& nul ^ \ ! md ..\exp\tmpdir >& nul ^ \ ! cd ..\exp\tmpdir ^ \ ! copy ...\$(EXPFILES) > nul ^ \ ! md lib ^ \ ! copy ...\lib\ lib\ /s >& nul ^ \ ! del lib\save\player >& nul ^ \ ! zip -m -r $(EXPORT) * > nul ^ \ ! move $(EXPORT) .. ^ \ ! cd .. ^ \ ! del tmpdir /xsqy >& nul ! PATCHFILES = *.c *.h makefile* ..\lib\user\pref-emx.prf # Needs 4OS2! ..\patches.txt .PHONY .IGNORE: ! +@ echo These are the changes to the original source > ..\patches.txt ^ \ ! echo archive ($(VERSION)). You don't need to apply them >> ..\patches.txt ^ \ ! echo if you can get the latest archive, which will >> ..\patches.txt ^ \ ! echo have them applied already. >> ..\patches.txt ^ \ ! echo. >> ..\patches.txt ^ \ ! except (*~) for %a in ($(PATCHFILES)) \ ! do (diff -c ..\old\src\%a %a >> ..\patches.txt) # Needs 4OS2! ..\exp\patches.uue: ..\patches.txt ! +@ md ..\exp >& nul ^ \ ! cd ..\exp ^ \ ! copy ..\patches.txt patches-$(VERSION).os2 ^ \ ! gzip -f patches-$(VERSION).os2 ^ \ ! uuencode patches-$(VERSION).os2.gz >& nul ^ \ ! del patches-$(VERSION).os2.gz ^ \ ! move patches-$(VERSION).os2.gz.uue patches.uue FILES = main-emx.c makefile.emx ..\lib\user\pref-emx.prf FILESP = main-emx.c makefile.emx pref-emx.prf # Needs 4OS2! ..\exp\files.uue: $(FILES) ! +@ md ..\exp >& nul ^ \ cd ..\exp ^ \ for %a in ($(FILES)) copy ..\src\%a > nul ^ \ tar -cvf files.tar $(FILESP) ^ \ *************** *** 144,202 **** move files.tar.gz.uue files.uue depends .IGNORE: $(OBJS) ! + echo. > depends ! + for %a in (*.d) type %a >> depends ..\angband.exe: angband.exe ! + copy angband.exe .. ! emxbind -s ..\angband.exe ..\aclient.exe: aclient.exe ! + copy aclient.exe .. ! emxbind -s ..\aclient.exe EC=+@ echo ECF=>> ..\startwnd.cmd ..\startwnd.cmd: ! $(EC) @echo off > ..\startwnd.cmd ! $(EC) REM This file starts up Angband and up to three other views. The $(ECF) ! $(EC) REM optional number behind the name sets the number of lines for $(ECF) ! $(EC) REM that screen. $(ECF) ! $(EC) REM $(ECF) ! $(EC) REM The function of the three views: $(ECF) ! $(EC) REM $(ECF) ! $(EC) REM recall window - display monster recall info $(ECF) ! $(EC) REM choice window - display equipment and inventory $(ECF) ! $(EC) REM mirror window - display both of them as new information $(ECF) ! $(EC) REM pops up - use this if you've got a small $(ECF) ! $(EC) REM screen that doesn't comfortably allow for $(ECF) ! $(EC) REM three windows. $(ECF) ! $(EC). $(ECF) ! $(EC) start /win /n aclient recall 10 $(ECF) ! $(EC) start /win /n aclient choice $(ECF) ! $(EC) rem start /win /n aclient mirror $(ECF) ! $(EC) delay $(ECF) ! $(EC) angband %1 %2 %3 %4 %5 %6 %7 %8 %9 $(ECF) angband.exe: angband.a main.o main-emx.o main-epm.o ! $(CC) -o angband.exe main.o main-emx.o angband.a $(LFLAGS) angband.a: $(OBJS) ! $(AR) r angband.a $(OBJS) aclient.exe: main-emx.c ! $(NICE) $(CC) $(CFLAGS) -Wall -D__EMX__CLIENT__ -o aclient.exe main-emx.c -lvideo main-emx.o: main-emx.c ! $(NICE) $(CC) $(CFLAGS) -Wall -c main-emx.c -o main-emx.o main-epm.o: main-emx.c ! $(NICE) $(CC) $(CFLAGS) -Wall -DEMXPM -c main-emx.c -o main-epm.o # Forgive me :) ":-)": ! +@echo. .INCLUDE .IGNORE: depends --- 141,191 ---- move files.tar.gz.uue files.uue depends .IGNORE: $(OBJS) ! + echo. > depends ! + for %a in (*.d) type %a >> depends ..\angband.exe: angband.exe ! + copy angband.exe .. ! emxbind -s ..\angband.exe ..\aclient.exe: aclient.exe ! + copy aclient.exe .. ! emxbind -s ..\aclient.exe EC=+@ echo ECF=>> ..\startwnd.cmd ..\startwnd.cmd: ! $(EC) @echo off > ..\startwnd.cmd ! $(EC) REM This file starts up Angband and up to seven other views. The $(ECF) ! $(EC) REM optional number behind the name sets the number of lines for $(ECF) ! $(EC) REM that screen. Choose contents for each via the game options. $(ECF) ! $(EC) REM $(ECF) ! $(EC). $(ECF) ! $(EC) start /win /n aclient Term-1 $(ECF) ! $(EC) start /win /n aclient Term-2 10 $(ECF) ! $(EC) rem start /win /n aclient Term-3 24 $(ECF) ! $(EC) delay $(ECF) ! $(EC) angband %1 %2 %3 %4 %5 %6 %7 %8 %9 $(ECF) angband.exe: angband.a main.o main-emx.o main-epm.o ! $(CC) -o angband.exe main.o main-emx.o angband.a $(LFLAGS) angband.a: $(OBJS) ! $(AR) r angband.a $(OBJS) aclient.exe: main-emx.c ! $(NICE) $(CC) $(CFLAGS) -Wall -D__EMX__CLIENT__ -o aclient.exe main-emx.c -lvideo main-emx.o: main-emx.c ! $(NICE) $(CC) $(CFLAGS) -Wall -c main-emx.c -o main-emx.o main-epm.o: main-emx.c ! $(NICE) $(CC) $(CFLAGS) -Wall -DEMXPM -c main-emx.c -o main-epm.o # Forgive me :) ":-)": ! +@echo. .INCLUDE .IGNORE: depends diff -c -r angband-283-old/src/Makefile.std foo/angband-283/src/Makefile.std *** angband-283-old/src/Makefile.std Fri Feb 6 04:08:39 1998 --- foo/angband-283/src/Makefile.std Wed Feb 11 06:30:28 1998 *************** *** 32,39 **** # with special compilers. # # If you are able to construct "main-xxx.c" and/or "Makefile.xxx" ! # files for a currently unsupported system, please send them to me ! # (benh@voicenet.com) for inclusion in future versions. # # This Makefile comes with "default" dependancies that may be obsolete. # --- 32,39 ---- # with special compilers. # # If you are able to construct "main-xxx.c" and/or "Makefile.xxx" ! # files for a currently unsupported system, please send them to ! # Ben Harrison (benh@phial.com) for inclusion in future versions. # # This Makefile comes with "default" dependancies that may be obsolete. # diff -c -r angband-283-old/src/cmd1.c foo/angband-283/src/cmd1.c *** angband-283-old/src/cmd1.c Fri Feb 6 04:10:31 1998 --- foo/angband-283/src/cmd1.c Wed Feb 11 06:30:28 1998 *************** *** 517,523 **** p_ptr->redraw |= (PR_GOLD); /* Window stuff */ ! p_ptr->window |= (PW_SPELL | PW_PLAYER); /* Delete the gold */ delete_object_idx(this_o_idx); --- 517,523 ---- p_ptr->redraw |= (PR_GOLD); /* Window stuff */ ! p_ptr->window |= (PW_PLAYER_0 | PW_PLAYER_1); /* Delete the gold */ delete_object_idx(this_o_idx); diff -c -r angband-283-old/src/cmd3.c foo/angband-283/src/cmd3.c *** angband-283-old/src/cmd3.c Mon Feb 9 01:48:15 1998 --- foo/angband-283/src/cmd3.c Wed Feb 11 06:30:28 1998 *************** *** 269,275 **** p_ptr->update |= (PU_MANA); /* Window stuff */ ! p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_SPELL | PW_PLAYER); } --- 269,275 ---- p_ptr->update |= (PU_MANA); /* Window stuff */ ! p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER_0 | PW_PLAYER_1); } *************** *** 999,1006 **** } } ! /* Recenter map */ ! verify_panel(); /* Handle stuff */ handle_stuff(); --- 999,1006 ---- } } ! /* Verify panel */ ! p_ptr->update |= (PU_PANEL); /* Handle stuff */ handle_stuff(); diff -c -r angband-283-old/src/cmd4.c foo/angband-283/src/cmd4.c *** angband-283-old/src/cmd4.c Mon Feb 9 04:08:03 1998 --- foo/angband-283/src/cmd4.c Wed Feb 11 06:30:28 1998 *************** *** 55,67 **** p_ptr->update |= (PU_FORGET_VIEW | PU_UPDATE_VIEW | PU_MONSTERS); /* Redraw everything */ ! p_ptr->redraw |= (PR_WIPE | PR_BASIC | PR_EXTRA | PR_MAP); /* Window stuff */ ! p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_SPELL | PW_PLAYER); /* Window stuff */ p_ptr->window |= (PW_MESSAGE | PW_OVERHEAD | PW_MONSTER | PW_OBJECT); /* Hack -- update */ handle_stuff(); --- 55,70 ---- p_ptr->update |= (PU_FORGET_VIEW | PU_UPDATE_VIEW | PU_MONSTERS); /* Redraw everything */ ! p_ptr->redraw |= (PR_BASIC | PR_EXTRA | PR_MAP); /* Window stuff */ ! p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER_0 | PW_PLAYER_1); /* Window stuff */ p_ptr->window |= (PW_MESSAGE | PW_OVERHEAD | PW_MONSTER | PW_OBJECT); + + /* Clear screen */ + Term_clear(); /* Hack -- update */ handle_stuff(); diff -c -r angband-283-old/src/cmd5.c foo/angband-283/src/cmd5.c *** angband-283-old/src/cmd5.c Mon Feb 9 00:28:10 1998 --- foo/angband-283/src/cmd5.c Wed Feb 11 06:30:28 1998 *************** *** 31,37 **** byte spells[64]; ! bool flag, redraw, okay, ask; char choice; magic_type *s_ptr; --- 31,39 ---- byte spells[64]; ! int ver; ! ! bool flag, redraw, okay; char choice; magic_type *s_ptr; *************** *** 134,143 **** /* Note verify */ ! ask = (isupper(choice)); /* Lowercase */ ! if (ask) choice = tolower(choice); /* Extract request */ i = (islower(choice) ? A2I(choice) : -1); --- 136,145 ---- /* Note verify */ ! ver = (isupper(choice)); /* Lowercase */ ! choice = tolower(choice); /* Extract request */ i = (islower(choice) ? A2I(choice) : -1); *************** *** 161,167 **** } /* Verify it */ ! if (ask) { char tmp_val[160]; --- 163,169 ---- } /* Verify it */ ! if (ver) { char tmp_val[160]; *************** *** 1099,1105 **** p_ptr->redraw |= (PR_MANA); /* Window stuff */ ! p_ptr->window |= (PW_SPELL | PW_PLAYER); } --- 1101,1107 ---- p_ptr->redraw |= (PR_MANA); /* Window stuff */ ! p_ptr->window |= (PW_PLAYER_0 | PW_PLAYER_1); } *************** *** 1719,1724 **** p_ptr->redraw |= (PR_MANA); /* Window stuff */ ! p_ptr->window |= (PW_SPELL | PW_PLAYER); } --- 1721,1726 ---- p_ptr->redraw |= (PR_MANA); /* Window stuff */ ! p_ptr->window |= (PW_PLAYER_0 | PW_PLAYER_1); } diff -c -r angband-283-old/src/cmd6.c foo/angband-283/src/cmd6.c *** angband-283-old/src/cmd6.c Fri Feb 6 04:10:31 1998 --- foo/angband-283/src/cmd6.c Wed Feb 11 06:30:28 1998 *************** *** 713,719 **** p_ptr->csp_frac = 0; msg_print("Your feel your head clear."); p_ptr->redraw |= (PR_MANA); ! p_ptr->window |= (PW_SPELL | PW_PLAYER); ident = TRUE; } break; --- 713,719 ---- p_ptr->csp_frac = 0; msg_print("Your feel your head clear."); p_ptr->redraw |= (PR_MANA); ! p_ptr->window |= (PW_PLAYER_0 | PW_PLAYER_1); ident = TRUE; } break; *************** *** 955,961 **** p_ptr->update |= (PU_MANA); /* Window stuff */ ! p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_SPELL | PW_PLAYER); } return (TRUE); --- 955,961 ---- p_ptr->update |= (PU_MANA); /* Window stuff */ ! p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER_0 | PW_PLAYER_1); } return (TRUE); *************** *** 1019,1025 **** p_ptr->update |= (PU_MANA); /* Window stuff */ ! p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_SPELL | PW_PLAYER); } /* Notice */ --- 1019,1025 ---- p_ptr->update |= (PU_MANA); /* Window stuff */ ! p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER_0 | PW_PLAYER_1); } /* Notice */ *************** *** 1714,1720 **** ident = TRUE; msg_print("Your feel your head clear."); p_ptr->redraw |= (PR_MANA); ! p_ptr->window |= (PW_SPELL | PW_PLAYER); } break; } --- 1714,1720 ---- ident = TRUE; msg_print("Your feel your head clear."); p_ptr->redraw |= (PR_MANA); ! p_ptr->window |= (PW_PLAYER_0 | PW_PLAYER_1); } break; } diff -c -r angband-283-old/src/config.h foo/angband-283/src/config.h *** angband-283-old/src/config.h Fri Feb 6 04:10:31 1998 --- foo/angband-283/src/config.h Wed Feb 11 06:30:28 1998 *************** *** 436,457 **** /* - * OPTION: For some brain-dead computers with no command line interface, - * namely Macintosh, there has to be some way of "naming" your savefiles. - * The current "Macintosh" hack is to make it so whenever the character - * name changes, the savefile is renamed accordingly. But on normal - * machines, once you manage to "load" a savefile, it stays that way. - * Macintosh is particularly weird because you can load savefiles that - * are not contained in the "lib:save:" folder, and if you change the - * player's name, it will then save the savefile elsewhere. Note that - * this also gives a method of "bypassing" the "VERIFY_TIMESTAMP" code. - */ - #if defined(MACINTOSH) || defined(WINDOWS) || defined(AMIGA) - # define SAVEFILE_MUTABLE - #endif - - - /* * OPTION: Capitalize the "user_name" (for "default" player name) * This option is only relevant on SET_UID machines. */ --- 436,441 ---- *************** *** 462,468 **** /* * OPTION: Person to bother if something goes wrong. */ ! #define MAINTAINER "benh@voicenet.com" /* --- 446,452 ---- /* * OPTION: Person to bother if something goes wrong. */ ! #define MAINTAINER "benh@phial.com" /* diff -c -r angband-283-old/src/defines.h foo/angband-283/src/defines.h *** angband-283-old/src/defines.h Mon Feb 9 02:25:13 1998 --- foo/angband-283/src/defines.h Wed Feb 11 06:30:28 1998 *************** *** 1674,1680 **** /* xxx (many) */ #define PU_MONSTERS 0x10000000L /* Update monsters */ #define PU_DISTANCE 0x20000000L /* Update distances */ ! /* xxx (many) */ /* --- 1674,1681 ---- /* xxx (many) */ #define PU_MONSTERS 0x10000000L /* Update monsters */ #define PU_DISTANCE 0x20000000L /* Update distances */ ! /* xxx */ ! #define PU_PANEL 0x80000000L /* Update panel */ /* *************** *** 1706,1725 **** /* xxx */ #define PR_EXTRA 0x01000000L /* Display Extra Info */ #define PR_BASIC 0x02000000L /* Display Basic Info */ - #define PR_MAP 0x04000000L /* Display Map */ - #define PR_WIPE 0x08000000L /* Hack -- Total Redraw */ - /* xxx */ - /* xxx */ - /* xxx */ /* xxx */ /* * Bit flags for the "p_ptr->window" variable (etc) */ #define PW_INVEN 0x00000001L /* Display inven/equip */ #define PW_EQUIP 0x00000002L /* Display equip/inven */ ! #define PW_SPELL 0x00000004L /* Display spell list */ ! #define PW_PLAYER 0x00000008L /* Display character */ /* xxx */ /* xxx */ #define PW_MESSAGE 0x00000040L /* Display messages */ --- 1707,1723 ---- /* xxx */ #define PR_EXTRA 0x01000000L /* Display Extra Info */ #define PR_BASIC 0x02000000L /* Display Basic Info */ /* xxx */ + #define PR_MAP 0x08000000L /* Display Map */ + /* xxx (many) */ /* * Bit flags for the "p_ptr->window" variable (etc) */ #define PW_INVEN 0x00000001L /* Display inven/equip */ #define PW_EQUIP 0x00000002L /* Display equip/inven */ ! #define PW_PLAYER_0 0x00000004L /* Display player (basic) */ ! #define PW_PLAYER_1 0x00000008L /* Display player (extra) */ /* xxx */ /* xxx */ #define PW_MESSAGE 0x00000040L /* Display messages */ *************** *** 2267,2273 **** #define OPT_use_old_target 4 #define OPT_always_pickup 5 #define OPT_always_repeat 6 ! #define OPT_show_flavors 7 #define OPT_stack_force_notes 8 #define OPT_stack_force_costs 9 #define OPT_show_labels 10 --- 2265,2271 ---- #define OPT_use_old_target 4 #define OPT_always_pickup 5 #define OPT_always_repeat 6 ! #define OPT_depth_in_feet 7 #define OPT_stack_force_notes 8 #define OPT_stack_force_costs 9 #define OPT_show_labels 10 *************** *** 2275,2281 **** #define OPT_show_choices 12 #define OPT_show_details 13 #define OPT_ring_bell 14 ! #define OPT_inventory_colors 15 #define OPT_run_ignore_stairs 16 #define OPT_run_ignore_doors 17 #define OPT_run_cut_corners 18 --- 2273,2279 ---- #define OPT_show_choices 12 #define OPT_show_details 13 #define OPT_ring_bell 14 ! #define OPT_show_flavors 15 #define OPT_run_ignore_stairs 16 #define OPT_run_ignore_doors 17 #define OPT_run_cut_corners 18 *************** *** 2337,2343 **** #define use_old_target op_ptr->opt[OPT_use_old_target] #define always_pickup op_ptr->opt[OPT_always_pickup] #define always_repeat op_ptr->opt[OPT_always_repeat] ! #define show_flavors op_ptr->opt[OPT_show_flavors] #define stack_force_notes op_ptr->opt[OPT_stack_force_notes] #define stack_force_costs op_ptr->opt[OPT_stack_force_costs] #define show_labels op_ptr->opt[OPT_show_labels] --- 2335,2341 ---- #define use_old_target op_ptr->opt[OPT_use_old_target] #define always_pickup op_ptr->opt[OPT_always_pickup] #define always_repeat op_ptr->opt[OPT_always_repeat] ! #define depth_in_feet op_ptr->opt[OPT_depth_in_feet] #define stack_force_notes op_ptr->opt[OPT_stack_force_notes] #define stack_force_costs op_ptr->opt[OPT_stack_force_costs] #define show_labels op_ptr->opt[OPT_show_labels] *************** *** 2345,2351 **** #define show_choices op_ptr->opt[OPT_show_choices] #define show_details op_ptr->opt[OPT_show_details] #define ring_bell op_ptr->opt[OPT_ring_bell] ! #define inventory_colors op_ptr->opt[OPT_inventory_colors] #define run_ignore_stairs op_ptr->opt[OPT_run_ignore_stairs] #define run_ignore_doors op_ptr->opt[OPT_run_ignore_doors] #define run_cut_corners op_ptr->opt[OPT_run_cut_corners] --- 2343,2349 ---- #define show_choices op_ptr->opt[OPT_show_choices] #define show_details op_ptr->opt[OPT_show_details] #define ring_bell op_ptr->opt[OPT_ring_bell] ! #define show_flavors op_ptr->opt[OPT_show_flavors] #define run_ignore_stairs op_ptr->opt[OPT_run_ignore_stairs] #define run_ignore_doors op_ptr->opt[OPT_run_ignore_doors] #define run_cut_corners op_ptr->opt[OPT_run_cut_corners] diff -c -r angband-283-old/src/dungeon.c foo/angband-283/src/dungeon.c *** angband-283-old/src/dungeon.c Fri Feb 6 04:10:31 1998 --- foo/angband-283/src/dungeon.c Wed Feb 11 06:30:28 1998 *************** *** 319,325 **** p_ptr->redraw |= (PR_HP); /* Window stuff */ ! p_ptr->window |= (PW_SPELL | PW_PLAYER); } } --- 319,325 ---- p_ptr->redraw |= (PR_HP); /* Window stuff */ ! p_ptr->window |= (PW_PLAYER_0 | PW_PLAYER_1); } } *************** *** 365,371 **** p_ptr->redraw |= (PR_MANA); /* Window stuff */ ! p_ptr->window |= (PW_SPELL | PW_PLAYER); } } --- 365,371 ---- p_ptr->redraw |= (PR_MANA); /* Window stuff */ ! p_ptr->window |= (PW_PLAYER_0 | PW_PLAYER_1); } } *************** *** 2329,2348 **** character_xtra++; ! /* Window stuff */ ! p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_SPELL | PW_PLAYER); - /* Window stuff */ - p_ptr->window |= (PW_MONSTER); - - /* Redraw dungeon */ - p_ptr->redraw |= (PR_WIPE | PR_BASIC | PR_EXTRA); - - /* Redraw map */ - p_ptr->redraw |= (PR_MAP); - - /* Window stuff */ - p_ptr->window |= (PW_OVERHEAD); /* Update stuff */ p_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS); --- 2329,2337 ---- character_xtra++; ! /* Clear */ ! Term_clear(); /* Update stuff */ p_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS); *************** *** 2353,2363 **** /* Update stuff */ update_stuff(); - /* Redraw stuff */ - redraw_stuff(); - - /* Redraw stuff */ - window_stuff(); /* Fully update the visuals (and monster distances) */ p_ptr->update |= (PU_FORGET_VIEW | PU_UPDATE_VIEW | PU_DISTANCE); --- 2342,2347 ---- *************** *** 2365,2376 **** --- 2349,2375 ---- /* Fully update the flow */ p_ptr->update |= (PU_FORGET_FLOW | PU_UPDATE_FLOW); + /* Redraw dungeon */ + p_ptr->redraw |= (PR_BASIC | PR_EXTRA | PR_MAP); + + /* Window stuff */ + p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER_0 | PW_PLAYER_1); + + /* Window stuff */ + p_ptr->window |= (PW_MONSTER); + + /* Window stuff */ + p_ptr->window |= (PW_OVERHEAD); + /* Update stuff */ update_stuff(); /* Redraw stuff */ redraw_stuff(); + /* Redraw stuff */ + window_stuff(); + /* Hack -- Decrease "xtra" depth */ character_xtra--; *************** *** 2592,2599 **** /* Process old character */ if (!new_game) { - /* Process the player name */ - process_player_name(FALSE); } /* Init RNG */ --- 2591,2596 ---- *************** *** 2640,2645 **** --- 2637,2653 ---- turn = 1; } + /* Normal machine (process player name) */ + if (savefile[0]) + { + process_player_name(FALSE); + } + + /* Weird machine (process player name, pick savefile name) */ + else + { + process_player_name(TRUE); + } /* Flash a message */ prt("Please wait...", 0, 0); *************** *** 2660,2666 **** /* Window stuff */ ! p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_SPELL | PW_PLAYER); /* Window stuff */ p_ptr->window |= (PW_MONSTER); --- 2668,2674 ---- /* Window stuff */ ! p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER_0 | PW_PLAYER_1); /* Window stuff */ p_ptr->window |= (PW_MONSTER); diff -c -r angband-283-old/src/files.c foo/angband-283/src/files.c *** angband-283-old/src/files.c Mon Feb 9 05:57:26 1998 --- foo/angband-283/src/files.c Wed Feb 11 06:30:28 1998 *************** *** 659,666 **** /* Other */ else { ! /* Scan (accept identifiers and dollar signs) */ ! while (isalnum(*s) || (*s == '_') || (*s == '$')) s++; /* Extract final and Terminate */ if ((f = *s) != '\0') *s++ = '\0'; --- 659,666 ---- /* Other */ else { ! /* Accept all printables except spaces and brackets */ ! while (isprint(*s) && !strchr(" []", *s)) ++s; /* Extract final and Terminate */ if ((f = *s) != '\0') *s++ = '\0'; *************** *** 1337,1343 **** /* Shots */ ! sprintf(buf, "%d/turn", p_ptr->num_blow); Term_putstr(col, 15, -1, TERM_WHITE, "Shots"); Term_putstr(col+5, 15, -1, TERM_L_BLUE, format("%13s", buf)); --- 1337,1343 ---- /* Shots */ ! sprintf(buf, "%d/turn", p_ptr->num_fire); Term_putstr(col, 15, -1, TERM_WHITE, "Shots"); Term_putstr(col+5, 15, -1, TERM_L_BLUE, format("%13s", buf)); *************** *** 1760,1766 **** /* Indicate natural maximum */ if (p_ptr->stat_max[i] == 18+100) { ! put_str("!", row+i, 3); } /* Internal "natural" maximum value */ --- 1760,1766 ---- /* Indicate natural maximum */ if (p_ptr->stat_max[i] == 18+100) { ! put_str("!", row+i, col+3); } /* Internal "natural" maximum value */ *************** *** 2522,2534 **** /* ! * Process the player name. ! * Extract a clean "base name". ! * Build the savefile name if needed. */ void process_player_name(bool sf) { ! int i, k = 0; /* Cannot be too long */ --- 2522,2538 ---- /* ! * Process the player name and extract a clean "base name". ! * ! * If "sf" is TRUE, then we initialize "savefile" based on player name. ! * ! * Some platforms (Windows, Macintosh, Amiga) leave the "savefile" empty ! * when a new character is created, and then when the character is done ! * being created, they call this function to choose a new savefile name. */ void process_player_name(bool sf) { ! int i; /* Cannot be too long */ *************** *** 2538,2608 **** quit_fmt("The name '%s' is too long!", op_ptr->full_name); } ! /* Cannot contain "icky" characters */ for (i = 0; op_ptr->full_name[i]; i++) { /* No control characters */ ! if (iscntrl(op_ptr->full_name[i])) { /* Illegal characters */ ! quit_fmt("The name '%s' contains control chars!", op_ptr->full_name); } - } - - - #ifdef MACINTOSH - - /* Extract "useful" letters */ - for (i = 0; op_ptr->full_name[i]; i++) - { - char c = op_ptr->full_name[i]; - - /* Convert "colon" and "period" */ - if ((c == ':') || (c == '.')) c = '_'; - - /* Accept all the letters */ - op_ptr->base_name[k++] = c; - } - - #else ! /* Extract "useful" letters */ ! for (i = 0; op_ptr->full_name[i]; i++) ! { ! char c = op_ptr->full_name[i]; ! /* Accept some letters */ ! if (isalpha(c) || isdigit(c)) op_ptr->base_name[k++] = c; ! ! /* Convert space, dot, and underscore to underscore */ ! else if (strchr(". _", c)) op_ptr->base_name[k++] = '_'; } - #endif - - #if defined(WINDOWS) || defined(MSDOS) ! /* Hack -- max length */ ! if (k > 8) k = 8; #endif /* Terminate */ ! op_ptr->base_name[k] = '\0'; /* Require a "base" name */ ! if (!op_ptr->base_name[0]) strcpy(op_ptr->base_name, "PLAYER"); ! ! ! #ifdef SAVEFILE_MUTABLE - /* Accept */ - sf = TRUE; ! #endif ! ! /* Change the savefile name */ if (sf) { char temp[128]; --- 2542,2584 ---- quit_fmt("The name '%s' is too long!", op_ptr->full_name); } ! /* Process the player name */ for (i = 0; op_ptr->full_name[i]; i++) { + char c = op_ptr->full_name[i]; + /* No control characters */ ! if (iscntrl(c)) { /* Illegal characters */ ! quit_fmt("Illegal control char (0x%02X) in player name", c); } ! /* Convert all non-alphanumeric symbols */ ! if (!isalpha(c) && !isdigit(c)) c = '_'; ! /* Build "base_name" */ ! op_ptr->base_name[i] = c; } #if defined(WINDOWS) || defined(MSDOS) ! /* Max length */ ! if (i > 8) i = 8; #endif /* Terminate */ ! op_ptr->base_name[i] = '\0'; /* Require a "base" name */ ! if (!op_ptr->base_name[0]) ! { ! strcpy(op_ptr->base_name, "PLAYER"); ! } ! /* Pick savefile name if needed */ if (sf) { char temp[128]; *************** *** 3085,3093 **** /* Acquire inventory color */ attr = tval_to_attr[o_ptr->tval & 0x7F]; - /* Disable inventory colors */ - if (!inventory_colors) attr = TERM_WHITE; - /* Display the object */ c_put_str(attr, o_name, j+2, 7); } --- 3061,3066 ---- *************** *** 3428,3439 **** /* Open the binary high score file, for reading */ highscore_fd = fd_open(buf, O_RDONLY); - /* Paranoia -- No score file */ - if (highscore_fd < 0) quit("Score file unavailable."); - /* Clear screen */ Term_clear(); /* Display the scores */ display_scores_aux(from, to, -1, NULL); --- 3401,3412 ---- /* Open the binary high score file, for reading */ highscore_fd = fd_open(buf, O_RDONLY); /* Clear screen */ Term_clear(); + /* Title */ + put_str(" Angband Hall of Fame", 0, 0); + /* Display the scores */ display_scores_aux(from, to, -1, NULL); *************** *** 3442,3447 **** --- 3415,3425 ---- /* Forget the high score fd */ highscore_fd = -1; + + /* Wait for response */ + prt("[Press any key to quit.]", 23, 17); + (void)inkey(); + prt("", 23, 0); /* Quit */ quit(NULL); diff -c -r angband-283-old/src/main-emx.c foo/angband-283/src/main-emx.c *** angband-283-old/src/main-emx.c Mon Feb 9 06:01:22 1998 --- foo/angband-283/src/main-emx.c Wed Feb 11 06:07:30 1998 *************** *** 8,26 **** * are included in all such copies. */ /* - * This file helps Angband work with OS/2 EMX computers. - * - * - * Author: ekraemer@pluto.camelot.de (Ekkehard Kraemer) - * - * - * This file is *known* to be out of date. It needs some work. XXX XXX XXX - * - * A newer version of this file is available in my email. XXX XXX XXX XXX - * - * * === Instructions for using Angband 2.7.X with OS/2 === * * The patches (file "main-emx.c") to compile Angband 2.7.X under OS/2 --- 8,23 ---- * are included in all such copies. */ + /* Purpose: Support for OS/2 EMX Angband */ + + /* Author: ekraemer@pluto.camelot.de (Ekkehard Kraemer) */ + + /* Current maintainer: silasd@psyber.com (Silas Dunsmore) */ + /* Unless somebody else wants it.... */ + + #ifdef USE_EMX /* * === Instructions for using Angband 2.7.X with OS/2 === * * The patches (file "main-emx.c") to compile Angband 2.7.X under OS/2 *************** *** 66,72 **** * Introduced __EMX__CLIENT__ hack * * 15.12.95 EK 2.7.9 Updated for 2.7.9 ! * beta Added mirror view * Added number of line support in aclient * * 25.12.95 EK 2.7.9 Added 'install' target --- 63,69 ---- * Introduced __EMX__CLIENT__ hack * * 15.12.95 EK 2.7.9 Updated for 2.7.9 ! * beta Added third view * Added number of line support in aclient * * 25.12.95 EK 2.7.9 Added 'install' target *************** *** 88,109 **** * * 9.03.96 EK 2.7.9 Adjustable background color (PM) * v5 Added map window - */ - - ! #ifdef USE_EMX #include #include #include #include #include #include #include #include "angband.h" /* * Prototypes! */ --- 85,133 ---- * * 9.03.96 EK 2.7.9 Adjustable background color (PM) * v5 Added map window ! * 3 Dec 97 SWD 282 Brought key-handling, macros in sync with DOS. ! * Hacked on sub-window code -- it compiles, but ! * doesn't link. ! * ! * 23 Jan 98 SWD 282 Hacked more on sub-windows. Now links, with ! * warnings. Seems to work. ! */ #include #include #include #include #include + #define INCL_KBD 1 #include #include #include "angband.h" + + /* + * Maximum windows + */ + #define MAX_TERM_DATA 8 + + + /* + * Keypress input modifier flags (copied from main-ibm.c) + * + * SWD: these could be changed to the definitions in , which are + * direct bitmasks instead of shift-counts. + */ + #define K_RSHIFT 0 /* Right shift key down */ + #define K_LSHIFT 1 /* Left shift key down */ + #define K_CTRL 2 /* Ctrl key down */ + #define K_ALT 3 /* Alt key down */ + #define K_SCROLL 4 /* Scroll lock on */ + #define K_NUM 5 /* Num lock on */ + #define K_CAPS 6 /* Caps lock on */ + #define K_INSERT 7 /* Insert on */ + + /* * Prototypes! */ *************** *** 221,230 **** --- 245,275 ---- */ static void Term_init_emx(term *t) { + struct _KBDINFO kbdinfo; /* see structure description ?somewhere? */ + v_init(); v_getctype(&curs_start, &curs_end); + /* hide cursor (?) XXX XXX XXX */ v_clear(); + /* the documentation I (SWD) have implies, in passing, that setting */ + /* "binary mode" on the keyboard device will prevent the O/S from */ + /* acting on keys such as ^S (pause) and ^P (printer echo). */ + + /* note also that "KbdSetStatus is ignored for a Vio-windowed application." */ + /* so there may well be problems with running this in a window. Damnit. */ + + /* this is kind of a nasty structure, as you can't just flip a bit */ + /* to change binary/ASCII mode, or echo on/off mode... nor can you */ + /* clear the whole thing -- certain bits need to be preserved. */ + + KbdGetStatus(&kbdinfo, (HKBD)0); + kbdinfo.fsMask &= ~ (KEYBOARD_ECHO_ON| /* clear lowest four bits */ + KEYBOARD_ECHO_OFF|KEYBOARD_BINARY_MODE|KEYBOARD_ASCII_MODE); + kbdinfo.fsMask |= (KEYBOARD_BINARY_MODE); /* set bit two */ + KbdSetStatus(&kbdinfo, (HKBD)0); + + #if 1 /* turn off for debug */ signal(SIGHUP, SIG_IGN); signal(SIGINT, SIG_IGN); signal(SIGQUIT, SIG_IGN); *************** *** 243,248 **** --- 288,295 ---- signal(SIGUSR2, SIG_IGN); signal(SIGCHLD, SIG_IGN); signal(SIGBREAK, SIG_IGN); + #endif + } /* *************** *** 287,297 **** /* * The screens */ ! static termPipe term_screen_main, ! term_screen_recall, ! term_screen_choice, ! term_screen_mirror, ! term_screen_map; /* * Check for events -- called by "Term_scan_emx()" --- 334,341 ---- /* * The screens */ ! static termPipe term_screen[MAX_TERM_DATA]; ! /* * Check for events -- called by "Term_scan_emx()" *************** *** 299,365 **** * Note -- this is probably NOT the most efficient way * to "wait" for a keypress (TERM_XTRA_EVENT). * - * _read_kbd(0,0,0) does this: - * - if no key is available, return -1 - * - if extended key available, return 0 - * - normal key available, return ASCII value (1 ... 255) * ! * _read_kbd(0,1,0) waits on a key and then returns ! * - 0, if it's an extended key ! * - the ASCII value, if it's a normal key * ! * *If* _read_kbd() returns 0, *then*, and only then, the next ! * call to _read_kbd() will return the extended scan code. * - * See "main-ibm.c" for a "better" use of "macro sequences". * ! * Note that this file does *NOT* currently extract modifiers ! * (such as Control and Shift). See "main-ibm.c" for a method. * - * The "key handling" really needs to be fixed. XXX XXX XXX - * See "main-ibm.c" for more information about "macro encoding". */ static errr CheckEvents(int returnImmediately) { ! int k = 0, ke = 0; ! /* Get key */ ! k=_read_kbd(0, returnImmediately?0:1, 0); ! /* Nothing ready */ ! if (k < 0) return (1); - /* Get an extended scan code */ - if (!k) ke = _read_kbd(0, 1, 0); ! /* Normal keypresses */ ! if (k) { ! /* Enqueue the key */ Term_keypress(k); /* Success */ return (0); } ! /* Hack -- introduce a macro sequence */ ! Term_keypress(31); ! /* We're not able to extract shift/ctrl/alt key information here. */ ! /* That is ridiculous. What kind of operating system is this? XXX */ ! /* Hack -- send the key sequence */ ! Term_keypress(I2D((ke % 1000) / 100)); ! Term_keypress(I2D((ke % 100) / 10)); ! Term_keypress(I2D((ke % 10))); ! /* Hack -- end the macro sequence */ Term_keypress(13); /* Success */ return (0); } /* * Do a special thing (beep, flush, etc) */ --- 343,593 ---- * Note -- this is probably NOT the most efficient way * to "wait" for a keypress (TERM_XTRA_EVENT). * * ! * This code was ripped from "main-ibm.c" -- consult it to ! * figure out what's going on. * ! * See "main-ibm.c" for more information about "macro encoding". * * ! * The following documentation was cut&pasted from ! * the OS/2 Programming Reference, PRCP.INF ! * ! ------------------------------------------------------------------------------- ! ! ! This call returns a character data record from the keyboard. ! ! KbdCharIn (CharData, IOWait, KbdHandle) ! ! CharData (PKBDKEYINFO) - output ! Address of the character data structure: ! ! asciicharcode (UCHAR) ! ASCII character code. The scan code received from the keyboard is ! translated to the ASCII character code. ! ! scancode (UCHAR) ! Code received from the keyboard. The scan code received from the ! keyboard is translated to the ASCII character code. ! ! status (UCHAR) ! State of the keystroke event: ! ! Bit Description ! ! 7-6 00 = Undefined ! ! 01 = Final character, interim character flag off ! ! 10 = Interim character ! ! 11 = Final character, interim character flag on. ! ! 5 1 = Immediate conversion requested. ! ! 4-2 Reserved. ! ! 1 0 = Scan code is a character. ! ! 1 = Scan code is not a character; is an extended key code ! from the keyboard. ! ! 0 1 = Shift status returned without character. ! ! reserved (UCHAR) ! NLS shift status. Reserved, set to zero. ! ! shiftkeystat (USHORT) ! Shift key status. ! ! Bit Description ! 15 SysReq key down ! 14 CapsLock key down ! 13 NumLock key down ! 12 ScrollLock key down ! 11 Right Alt key down ! 10 Right Ctrl key down ! 9 Left Alt key down ! 8 Left Ctrl key down ! 7 Insert on ! 6 CapsLock on ! 5 NumLock on ! 4 ScrollLock on ! 3 Either Alt key down ! 2 Either Ctrl key down ! 1 Left Shift key down ! 0 Right Shift key down ! ! time (ULONG) ! Time stamp indicating when a key was pressed. It is specified in ! milliseconds from the time the system was started. ! ! IOWait (USHORT) - input ! Wait if a character is not available. ! ! Value Definition ! 0 Requestor waits for a character if one is not available. ! 1 Requestor gets an immediate return if no character is ! available. ! ! KbdHandle (HKBD) - input ! Default keyboard or the logical keyboard. ! ! rc (USHORT) - return ! Return code descriptions are: ! ! 0 NO_ERROR ! 375 ERROR_KBD_INVALID_IOWAIT ! 439 ERROR_KBD_INVALID_HANDLE ! 445 ERROR_KBD_FOCUS_REQUIRED ! 447 ERROR_KBD_KEYBOARD_BUSY ! 464 ERROR_KBD_DETACHED ! 504 ERROR_KBD_EXTENDED_SG ! ! Remarks ! ! On an enhanced keyboard, the secondary enter key returns the normal ! character 0DH and a scan code of E0H. ! ! Double-byte character codes (DBCS) require two function calls to obtain ! the entire code. ! ! If shift report is set with KbdSetStatus, the CharData record returned ! reflects changed shift information only. ! ! Extended ASCII codes are identified with the status byte, bit 1 on and the ! ASCII character code being either 00H or E0H. Both conditions must be ! satisfied for the character to be an extended keystroke. For extended ! ASCII codes, the scan code byte returned is the second code (extended ! code). Usually the extended ASCII code is the scan code of the primary ! key that was pressed. ! ! A thread in the foreground session that repeatedly polls the keyboard ! with KbdCharIn (with no wait), can prevent all regular priority class ! threads from executing. If polling must be used and a minimal amount of ! other processing is being performed, the thread should periodically yield to ! the CPU by issuing a DosSleep call for an interval of at least 5 ! milliseconds. ! ! ! Family API Considerations ! ! Some options operate differently in the DOS mode than in the OS /2 mode. ! Therefore, the following restrictions apply to KbdCharIn when coding in ! the DOS mode: ! ! o The CharData structure includes everything except the time stamp. ! o Interim character is not supported ! o Status can be 0 or 40H ! o KbdHandle is ignored. ! ! ! ------------------------------------------------------------------------------- ! ! ! typedef struct _KBDKEYINFO { / * kbci * / ! UCHAR chChar; / * ASCII character code * / ! UCHAR chScan; / * Scan Code * / ! UCHAR fbStatus; / * State of the character * / ! UCHAR bNlsShift; / * Reserved (set to zero) * / ! USHORT fsState; / * State of the shift keys * / ! ULONG time; / * Time stamp of keystroke (ms since ipl) * / ! }KBDKEYINFO; ! ! #define INCL_KBD ! ! USHORT rc = KbdCharIn(CharData, IOWait, KbdHandle); ! ! PKBDKEYINFO CharData; / * Buffer for data * / ! USHORT IOWait; / * Indicate if wait * / ! HKBD KbdHandle; / * Keyboard handle * / ! ! USHORT rc; / * return code * / ! ! ! ------------------------------------------------------------------------------- * */ static errr CheckEvents(int returnImmediately) { ! int i, k, s; ! bool mc = FALSE; ! bool ms = FALSE; ! bool ma = FALSE; ! /* start OS/2 specific section */ ! ! struct _KBDKEYINFO keyinfo; /* see structure description above */ ! ! /* Check (and possibly wait) for a keypress */ ! /* see function description above */ ! KbdCharIn( &keyinfo, returnImmediately, (HKBD)0 ); ! ! #if 0 ! printf("AC:%x SC:%x ST:%x R1:%x SH:%x TI:%ld\n", /* OS/2 debug */ ! keyinfo.chChar, ! keyinfo.chScan, ! keyinfo.fbStatus, ! keyinfo.bNlsShift, ! keyinfo.fsState, ! keyinfo.time ); ! #endif ! ! /* If there wasn't a key, leave now. */ ! if ((keyinfo.fbStatus & 0xC0) == 0) return(1); ! ! ! /* by a set of lucky coincidences, the data maps directly over. */ ! k = keyinfo.chChar; ! s = keyinfo.chScan; ! i = (keyinfo.fsState & 0xFF); ! ! /* end OS/2 specific section */ ! /* Process "normal" keys */ ! if ( k != 0 && ((s <= 58) || (s == 0xE0)) ) /* Tweak: allow for ALT-keys */ { ! /* Enqueue it */ Term_keypress(k); /* Success */ return (0); } ! /* Extract the modifier flags */ ! if (i & (1 << K_CTRL)) mc = TRUE; ! if (i & (1 << K_LSHIFT)) ms = TRUE; ! if (i & (1 << K_RSHIFT)) ms = TRUE; ! if (i & (1 << K_ALT)) ma = TRUE; ! ! /* Begin a "macro trigger" */ ! Term_keypress(31); ! /* Hack -- Send the modifiers */ ! if (mc) Term_keypress('C'); ! if (ms) Term_keypress('S'); ! if (ma) Term_keypress('A'); ! ! /* Introduce the hexidecimal scan code */ ! Term_keypress('x'); ! ! /* Encode the hexidecimal scan code */ ! Term_keypress(hexsym[s/16]); ! Term_keypress(hexsym[s%16]); ! /* End the "macro trigger" */ Term_keypress(13); /* Success */ return (0); } + + /* * Do a special thing (beep, flush, etc) */ *************** *** 541,556 **** */ errr init_emx(void) { term *t; /* Initialize the pipe windows */ ! initPipeTerm(&term_screen_recall, "recall", &term_recall); ! initPipeTerm(&term_screen_choice, "choice", &term_choice); ! initPipeTerm(&term_screen_mirror, "mirror", &term_mirror); ! initPipeTerm(&term_screen_map, "map", &term_map); /* Initialize main window */ ! t = (term*)(&term_screen_main); /* Initialize the term -- big key buffer */ term_init(t, 80, 24, 1024); --- 769,787 ---- */ errr init_emx(void) { + int i; + term *t; /* Initialize the pipe windows */ ! for (i = MAX_TERM_DATA-1; i > 0; --i) ! { ! const char *name = angband_term_name[i]; ! initPipeTerm(&term_screen[i], name, &angband_term[i]); ! } /* Initialize main window */ ! t = (term*)(&term_screen[0]); /* Initialize the term -- big key buffer */ term_init(t, 80, 24, 1024); *************** *** 602,608 **** /* Check command line */ if (argc!=2 && argc!=3) { ! printf("Usage: %s choice|recall|mirror [number of lines]\n" "Start this before angband.exe\n", argv[0]); exit(1); } --- 833,839 ---- /* Check command line */ if (argc!=2 && argc!=3) { ! printf("Usage: %s Term-1|...|Term-7 [number of lines]\n" "Start this before angband.exe\n", argv[0]); exit(1); } *************** *** 816,826 **** /* * The screens */ ! static termWindow term_screen_main, ! term_screen_recall, ! term_screen_choice, ! term_screen_mirror, ! term_screen_map; /* * Check for events -- called by "Term_scan_emx()" --- 1047,1053 ---- /* * The screens */ ! static termWindow term_screen[MAX_TERM_DATA]; /* * Check for events -- called by "Term_scan_emx()" *************** *** 911,925 **** */ errr init_emx(void) { /* Initialize the windows */ ! emx_init_term(&term_screen_main, NULL, &term_screen, 0); ! emx_init_term(&term_screen_recall, term_screen_main.instance, &term_recall, 1); ! emx_init_term(&term_screen_choice, term_screen_main.instance, &term_choice, 2); ! emx_init_term(&term_screen_mirror, term_screen_main.instance, &term_mirror, 3); ! emx_init_term(&term_screen_map, term_screen_main.instance, &term_map, 4); /* Activate main window */ ! Term_activate(term_screen); /* Success */ return (0); --- 1138,1155 ---- */ errr init_emx(void) { + int i; + /* Initialize the windows */ ! emx_init_term(&term_screen[0], NULL, &angband_term[0], 0); ! ! for (i = 1; i < MAX_TERM_DATA; ++i) ! { ! emx_init_term(&term_screen[i], term_screen[0].instance, &angband_term[i], i); ! } /* Activate main window */ ! Term_activate(angband_term[0]); /* Success */ return (0); *************** *** 945,987 **** static void quit_hook(cptr s) { ! /* Shut down the term windows */ ! if (term_choice) ! { ! term_nuke(term_choice); ! emx_nuke(((termWindow*)term_choice)->instance); ! } ! if (term_recall) ! { ! term_nuke(term_recall); ! emx_nuke(((termWindow*)term_recall)->instance); ! } ! if (term_mirror) ! { ! term_nuke(term_mirror); ! emx_nuke(((termWindow*)term_mirror)->instance); ! } ! if (term_map) ! { ! term_nuke(term_map); ! emx_nuke(((termWindow*)term_map)->instance); ! } ! if (term_screen) { ! term_nuke(term_screen); ! emx_nuke(((termWindow*)term_screen)->instance); ! } /* Shut down window system - doesn't return */ emx_endPM(s); } void angbandThread(void *arg) { bool new_game = FALSE; int show_score = 0; /* Save the "program name" */ argv0 = (char*)arg; --- 1175,1205 ---- static void quit_hook(cptr s) { ! int i; ! ! for (i = MAX_TERM_DATA - 1; i >= 0; --i) { ! /* Shut down the term windows */ ! if (angband_term[i]) ! { ! term_nuke(angband_term[i]); ! emx_nuke(((termWindow*)angband_term[i])->instance); ! } ! ] /* Shut down window system - doesn't return */ emx_endPM(s); } + void angbandThread(void *arg) { bool new_game = FALSE; int show_score = 0; + char player_name[32]; + /* Save the "program name" */ argv0 = (char*)arg; *************** *** 1001,1006 **** --- 1219,1227 ---- &arg_wizard, player_name)) quit(NULL); + /* XXX XXX XXX (?) */ + strcpy(op_ptr->full_name, player_name); + /* Process the player name */ process_player_name(TRUE); *************** *** 1013,1023 **** /* Catch nasty signals */ signals_init(); ! /* Display the 'news' file */ ! show_news(); ! ! /* Initialize the arrays */ ! init_some_arrays(); /* Wait for response */ pause_line(23); --- 1234,1241 ---- /* Catch nasty signals */ signals_init(); ! /* Initialize */ ! init_angband(); /* Wait for response */ pause_line(23); *************** *** 1033,1260 **** #endif /* USE_EMX */ ! ! ! #if 0 ! ! ! From: Dr James Denholm-Price ! Organization: Dept. Applied Maths, University of Sheffield ! ! ! Dear Ben, ! ! I have hacked together a modified version of 'main-emx.c' to support all ! of your your multiple Term windows (thanks to Ekkehard for making it an ! easy job!). I've attached the diffs to 'main-emx.c' from the 2.8.0/2.8.1 ! distribution & hope you can incorporate these changes into the archive. ! I'll also upload them plus the new 'main-emx.c' to the site as: ! ! export.andrew.cmu.edu/angband/Incoming/ang281-os2-mods.zip ! ! I've been in touch with Ekkehard, who lacks the time @ present to spend ! much time with Angband (or programming in general) & he seems happy with ! the changes. It seems he u/l'd patches for 2.8.0 to you some time ago, ! but I guess they must have gotten lost somewhere... ! ! It's not my intention to 'take over' as OS/2 maintainer (my 'C' ain't up ! to much!) but I _do_ like the new windows & guess that others do too! ! ! Cheers, ! James ! ! PS: diffs attached using Netscape's MIME - I hope that's OK... ! ! -- ! --------------------------------------------------------- ! Dr James Denholm-Price j.c.w.price@shef.ac.uk ! Team-OS/2 ! ! *** old/main-emx.c Wed Apr 2 10:18:36 1997 ! --- main-emx.c Wed Apr 2 10:17:10 1997 ! *************** ! *** 3,16 **** ! /* Purpose: Support for OS/2 EMX Angband */ ! ! /* Author: ekraemer@pluto.camelot.de (Ekkehard Kraemer) */ ! ! #ifdef USE_EMX ! ! /* ! ! * === Instructions for using Angband 2.7.X with OS/2 === ! * ! ! * The patches (file "main-emx.c") to compile Angband 2.7.X under OS/2 ! ! * were written by ekraemer@pluto.camelot.de (Ekkehard Kraemer). ! * ! * TO COMPILE: ! * ! --- 3,17 ---- ! /* Purpose: Support for OS/2 EMX Angband */ ! ! /* Author: ekraemer@pluto.camelot.de (Ekkehard Kraemer) */ ! + /* Modified for Angband v2.8.1 by j.c.w.price@shef.ac.uk (James Denholm-Price) */ ! ! #ifdef USE_EMX ! ! /* ! ! * === Instructions for using Angband 2.8.1 with OS/2 === ! * ! ! * The patches (file "main-emx.c") to compile Angband 2.8.1 under OS/2 ! ! * were written mainly by ekraemer@pluto.camelot.de (Ekkehard Kraemer). ! * ! * TO COMPILE: ! * ! *************** ! *** 74,81 **** ! * ! * 9.03.96 EK 2.7.9 Adjustable background color (PM) ! * v5 Added map window ! */ ! - ! #include ! #include ! #include ! --- 75,84 ---- ! * ! * 9.03.96 EK 2.7.9 Adjustable background color (PM) ! * v5 Added map window ! + * ! + * 1.04.97 JCWP 2.8.1 Added Ben's new multiple windows -- ! + * just shows how good EKs stuff was :) ! */ ! #include ! #include ! #include ! *************** ! *** 205,210 **** ! --- 208,217 ---- ! { ! v_init(); ! v_getctype(&curs_start, &curs_end); ! + ! + /* Hack cursor remove */ ! + v_hidecursor(); ! + ! v_clear(); ! ! signal(SIGHUP, SIG_IGN); ! *************** ! *** 266,279 **** ! */ ! errr init_emx(void); ! ! ! /* ! ! * The screens ! ! */ ! ! static termPipe term_screen_main, ! ! term_screen_recall, ! ! term_screen_choice, ! ! term_screen_mirror, ! ! term_screen_map; ! ! /* ! * Check for events -- called by "Term_scan_emx()" ! --- 273,281 ---- ! */ ! errr init_emx(void); ! ! ! #define MAX_TERM_DATA 8 ! ! /* Screen array -- pretty pointless? */ ! ! static termPipe angband_screen[MAX_TERM_DATA]; ! ! /* ! * Check for events -- called by "Term_scan_emx()" ! *************** ! *** 523,537 **** ! errr init_emx(void) ! { ! term *t; ! ! ! /* Initialize the pipe windows */ ! ! initPipeTerm(&term_screen_recall, "recall", &term_recall); ! ! initPipeTerm(&term_screen_choice, "choice", &term_choice); ! ! initPipeTerm(&term_screen_mirror, "mirror", &term_mirror); ! ! initPipeTerm(&term_screen_map, "map", &term_map); ! ! /* Initialize main window */ ! ! t = (term*)(&term_screen_main); ! ! /* Initialize the term -- big key buffer */ ! term_init(t, 80, 24, 1024); ! --- 525,541 ---- ! errr init_emx(void) ! { ! term *t; ! + USHORT i; ! ! ! /* Initialize the windows */ ! ! for (i = 0; i < MAX_TERM_DATA; i++) ! ! { ! ! cptr name = angband_term_name[i]; ! ! initPipeTerm(&angband_screen[i], name, &angband_term[i]); ! ! } ! ! /* Initialize main window */ ! ! t = (term*)(&angband_screen[0]); ! ! /* Initialize the term -- big key buffer */ ! term_init(t, 80, 24, 1024); ! *************** ! *** 583,589 **** ! /* Check command line */ ! if (argc!=2 && argc!=3) ! { ! ! printf("Usage: %s choice|recall|mirror [number of lines]\n" ! "Start this before angband.exe\n", argv[0]); ! exit(1); ! } ! --- 587,593 ---- ! /* Check command line */ ! if (argc!=2 && argc!=3) ! { ! ! printf("Usage: %s choice|recall|mirror|term[4-7] [number of lines]\n" ! "Start this before angband.exe\n", argv[0]); ! exit(1); ! } ! *************** ! *** 897,903 **** ! emx_init_term(&term_screen_recall, term_screen_main.instance, &term_recall, 1); ! emx_init_term(&term_screen_choice, term_screen_main.instance, &term_choice, 2); ! emx_init_term(&term_screen_mirror, term_screen_main.instance, &term_mirror, 3); ! - emx_init_term(&term_screen_map, term_screen_main.instance, &term_map, 4); ! ! /* Activate main window */ ! Term_activate(term_screen); ! --- 901,906 ---- ! *************** ! *** 942,952 **** ! term_nuke(term_mirror); ! emx_nuke(((termWindow*)term_mirror)->instance); ! } ! - if (term_map) ! - { ! - term_nuke(term_map); ! - emx_nuke(((termWindow*)term_map)->instance); ! - } ! if (term_screen) ! { ! term_nuke(term_screen); ! --- 945,950 ---- ! *************** ! *** 972,980 **** ! ! /* Get the file paths */ ! init_stuff(); ! - ! - /* Assume "Wizard" permission */ ! - can_be_wizard = TRUE; ! ! if (!emx_options((char**)&ANGBAND_DIR_USER, ! (char**)&ANGBAND_DIR_SAVE, ! --- 970,975 ---- ! ! ! #endif ! ! --- 1251,1260 ---- #endif /* USE_EMX */ ! /* ! * Local Variables: ! * comment-column: 45 ! * End: ! * ! */ diff -c -r angband-283-old/src/main-mac.c foo/angband-283/src/main-mac.c *** angband-283-old/src/main-mac.c Mon Feb 9 06:02:08 1998 --- foo/angband-283/src/main-mac.c Wed Feb 11 06:30:28 1998 *************** *** 2214,2220 **** game_in_progress = 1; /* Flush input */ ! flush(); /* Play a game */ play_game(TRUE); --- 2214,2220 ---- game_in_progress = 1; /* Flush input */ ! Term_flush(); /* Play a game */ play_game(TRUE); diff -c -r angband-283-old/src/main-x11.c foo/angband-283/src/main-x11.c *** angband-283-old/src/main-x11.c Sat Feb 7 21:22:59 1998 --- foo/angband-283/src/main-x11.c Wed Feb 11 06:30:28 1998 *************** *** 841,847 **** Window tmp_win; XWindowAttributes xwa; ! int x, y, w, h, b, d; /* Assign stuff */ iwin->win = xid; --- 841,848 ---- Window tmp_win; XWindowAttributes xwa; ! int x, y; ! unsigned int w, h, b, d; /* Assign stuff */ iwin->win = xid; diff -c -r angband-283-old/src/main.c foo/angband-283/src/main.c *** angband-283-old/src/main.c Fri Feb 6 04:10:31 1998 --- foo/angband-283/src/main.c Wed Feb 11 06:30:28 1998 *************** *** 636,642 **** if (!done) quit("Unable to prepare any 'display module'!"); ! /* If requested, display scores and quit */ if (show_score > 0) display_scores(0, show_score); --- 636,642 ---- if (!done) quit("Unable to prepare any 'display module'!"); ! /* Hack -- If requested, display scores and quit */ if (show_score > 0) display_scores(0, show_score); diff -c -r angband-283-old/src/melee1.c foo/angband-283/src/melee1.c *** angband-283-old/src/melee1.c Fri Feb 6 04:10:31 1998 --- foo/angband-283/src/melee1.c Wed Feb 11 06:30:28 1998 *************** *** 583,589 **** p_ptr->redraw |= (PR_GOLD); /* Window stuff */ ! p_ptr->window |= (PW_SPELL | PW_PLAYER); /* Blink away */ blinked = TRUE; --- 583,589 ---- p_ptr->redraw |= (PR_GOLD); /* Window stuff */ ! p_ptr->window |= (PW_PLAYER_0 | PW_PLAYER_1); /* Blink away */ blinked = TRUE; diff -c -r angband-283-old/src/melee2.c foo/angband-283/src/melee2.c *** angband-283-old/src/melee2.c Sun Feb 8 03:25:22 1998 --- foo/angband-283/src/melee2.c Wed Feb 11 06:30:28 1998 *************** *** 1027,1033 **** p_ptr->redraw |= (PR_MANA); /* Window stuff */ ! p_ptr->window |= (PW_SPELL | PW_PLAYER); /* Heal the monster */ if (m_ptr->hp < m_ptr->maxhp) --- 1027,1033 ---- p_ptr->redraw |= (PR_MANA); /* Window stuff */ ! p_ptr->window |= (PW_PLAYER_0 | PW_PLAYER_1); /* Heal the monster */ if (m_ptr->hp < m_ptr->maxhp) diff -c -r angband-283-old/src/monster1.c foo/angband-283/src/monster1.c *** angband-283-old/src/monster1.c Mon Feb 9 02:25:51 1998 --- foo/angband-283/src/monster1.c Wed Feb 11 06:30:29 1998 *************** *** 430,437 **** } else if (r_ptr->r_tkills) { ! roff(format("%^s is normally found on dungeon level %d", ! wd_he[msex], r_ptr->level)); old = TRUE; } --- 430,445 ---- } else if (r_ptr->r_tkills) { ! if (depth_in_feet) ! { ! roff(format("%^s is normally found at depths of %d feet", ! wd_he[msex], r_ptr->level * 50)); ! } ! else ! { ! roff(format("%^s is normally found on dungeon level %d", ! wd_he[msex], r_ptr->level)); ! } old = TRUE; } diff -c -r angband-283-old/src/monster2.c foo/angband-283/src/monster2.c *** angband-283-old/src/monster2.c Fri Feb 6 04:10:31 1998 --- foo/angband-283/src/monster2.c Wed Feb 11 06:30:29 1998 *************** *** 1217,1224 **** p_ptr->py = y2; p_ptr->px = x2; ! /* Check for new panel (redraw map) */ ! verify_panel(); /* Update the visuals (and monster distances) */ p_ptr->update |= (PU_UPDATE_VIEW | PU_DISTANCE); --- 1217,1224 ---- p_ptr->py = y2; p_ptr->px = x2; ! /* Update the panel */ ! p_ptr->update |= (PU_PANEL); /* Update the visuals (and monster distances) */ p_ptr->update |= (PU_UPDATE_VIEW | PU_DISTANCE); *************** *** 1250,1257 **** p_ptr->py = y1; p_ptr->px = x1; ! /* Check for new panel (redraw map) */ ! verify_panel(); /* Update the visuals (and monster distances) */ p_ptr->update |= (PU_UPDATE_VIEW | PU_DISTANCE); --- 1250,1257 ---- p_ptr->py = y1; p_ptr->px = x1; ! /* Update the panel */ ! p_ptr->update |= (PU_PANEL); /* Update the visuals (and monster distances) */ p_ptr->update |= (PU_UPDATE_VIEW | PU_DISTANCE); diff -c -r angband-283-old/src/object1.c foo/angband-283/src/object1.c *** angband-283-old/src/object1.c Mon Feb 9 06:02:33 1998 --- foo/angband-283/src/object1.c Wed Feb 11 06:30:29 1998 *************** *** 2913,2921 **** /* Acquire inventory color */ attr = tval_to_attr[o_ptr->tval & 0x7F]; - /* Disable inventory colors */ - if (!inventory_colors) attr = TERM_WHITE; - /* Display the entry itself */ Term_putstr(3, i, n, attr, o_name); --- 2913,2918 ---- *************** *** 2986,2994 **** /* Acquire inventory color */ attr = tval_to_attr[o_ptr->tval & 0x7F]; - /* Disable inventory colors */ - if (!inventory_colors) attr = TERM_WHITE; - /* Display the entry itself */ Term_putstr(3, i - INVEN_WIELD, n, attr, o_name); --- 2983,2988 ---- *************** *** 3088,3096 **** /* Acquire inventory color */ out_color[k] = tval_to_attr[o_ptr->tval & 0x7F]; - /* Disable inventory colors */ - if (!inventory_colors) out_color[k] = TERM_WHITE; - /* Save the object description */ strcpy(out_desc[k], o_name); --- 3082,3087 ---- *************** *** 3196,3204 **** /* Acquire inventory color */ out_color[k] = tval_to_attr[o_ptr->tval & 0x7F]; - - /* Disable inventory colors */ - if (!inventory_colors) out_color[k] = TERM_WHITE; /* Save the description */ strcpy(out_desc[k], o_name); --- 3187,3192 ---- diff -c -r angband-283-old/src/object2.c foo/angband-283/src/object2.c *** angband-283-old/src/object2.c Mon Feb 9 05:32:05 1998 --- foo/angband-283/src/object2.c Wed Feb 11 06:30:29 1998 *************** *** 4085,4091 **** p_ptr->update |= (PU_MANA); /* Window stuff */ ! p_ptr->window |= (PW_EQUIP | PW_SPELL | PW_PLAYER); } } --- 4085,4091 ---- p_ptr->update |= (PU_MANA); /* Window stuff */ ! p_ptr->window |= (PW_EQUIP | PW_PLAYER_0 | PW_PLAYER_1); } } diff -c -r angband-283-old/src/spells1.c foo/angband-283/src/spells1.c *** angband-283-old/src/spells1.c Mon Feb 9 03:36:10 1998 --- foo/angband-283/src/spells1.c Wed Feb 11 06:30:29 1998 *************** *** 451,457 **** p_ptr->redraw |= (PR_HP); /* Window stuff */ ! p_ptr->window |= (PW_SPELL | PW_PLAYER); /* Dead player */ if (p_ptr->chp < 0) --- 451,457 ---- p_ptr->redraw |= (PR_HP); /* Window stuff */ ! p_ptr->window |= (PW_PLAYER_0 | PW_PLAYER_1); /* Dead player */ if (p_ptr->chp < 0) *************** *** 832,838 **** p_ptr->update |= (PU_BONUS); /* Window stuff */ ! p_ptr->window |= (PW_EQUIP | PW_SPELL | PW_PLAYER); /* Item was damaged */ return (TRUE); --- 832,838 ---- p_ptr->update |= (PU_BONUS); /* Window stuff */ ! p_ptr->window |= (PW_EQUIP | PW_PLAYER_0 | PW_PLAYER_1); /* Item was damaged */ return (TRUE); *************** *** 1233,1239 **** p_ptr->update |= (PU_BONUS); /* Window stuff */ ! p_ptr->window |= (PW_EQUIP | PW_SPELL | PW_PLAYER); /* Notice */ return (TRUE); --- 1233,1239 ---- p_ptr->update |= (PU_BONUS); /* Window stuff */ ! p_ptr->window |= (PW_EQUIP | PW_PLAYER_0 | PW_PLAYER_1); /* Notice */ return (TRUE); diff -c -r angband-283-old/src/spells2.c foo/angband-283/src/spells2.c *** angband-283-old/src/spells2.c Fri Feb 6 04:10:31 1998 --- foo/angband-283/src/spells2.c Wed Feb 11 06:30:29 1998 *************** *** 36,42 **** p_ptr->redraw |= (PR_HP); /* Window stuff */ ! p_ptr->window |= (PW_SPELL | PW_PLAYER); /* Heal 0-4 */ if (num < 5) --- 36,42 ---- p_ptr->redraw |= (PR_HP); /* Window stuff */ ! p_ptr->window |= (PW_PLAYER_0 | PW_PLAYER_1); /* Heal 0-4 */ if (num < 5) *************** *** 242,247 **** --- 242,256 ---- object_aware(o_ptr); object_known(o_ptr); } + + /* Recalculate bonuses */ + p_ptr->update |= (PU_BONUS); + + /* Combine / Reorder the pack (later) */ + p_ptr->notice |= (PN_COMBINE | PN_REORDER); + + /* Window stuff */ + p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER_0 | PW_PLAYER_1); } *************** *** 898,904 **** p_ptr->notice |= (PN_COMBINE | PN_REORDER); /* Window stuff */ ! p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_SPELL | PW_PLAYER); /* Mega-Hack -- Forget the map */ wiz_dark(); --- 907,913 ---- p_ptr->notice |= (PN_COMBINE | PN_REORDER); /* Window stuff */ ! p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER_0 | PW_PLAYER_1); /* Mega-Hack -- Forget the map */ wiz_dark(); *************** *** 1709,1715 **** p_ptr->notice |= (PN_COMBINE | PN_REORDER); /* Window stuff */ ! p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_SPELL | PW_PLAYER); /* Success */ return (TRUE); --- 1718,1724 ---- p_ptr->notice |= (PN_COMBINE | PN_REORDER); /* Window stuff */ ! p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER_0 | PW_PLAYER_1); /* Success */ return (TRUE); *************** *** 1831,1837 **** p_ptr->notice |= (PN_COMBINE | PN_REORDER); /* Window stuff */ ! p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_SPELL | PW_PLAYER); /* Description */ object_desc(o_name, o_ptr, TRUE, 3); --- 1840,1846 ---- p_ptr->notice |= (PN_COMBINE | PN_REORDER); /* Window stuff */ ! p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER_0 | PW_PLAYER_1); /* Description */ object_desc(o_name, o_ptr, TRUE, 3); *************** *** 1907,1913 **** p_ptr->notice |= (PN_COMBINE | PN_REORDER); /* Window stuff */ ! p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_SPELL | PW_PLAYER); /* Handle stuff */ handle_stuff(); --- 1916,1922 ---- p_ptr->notice |= (PN_COMBINE | PN_REORDER); /* Window stuff */ ! p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER_0 | PW_PLAYER_1); /* Handle stuff */ handle_stuff(); diff -c -r angband-283-old/src/store.c foo/angband-283/src/store.c *** angband-283-old/src/store.c Mon Feb 9 07:06:34 1998 --- foo/angband-283/src/store.c Wed Feb 11 06:30:29 1998 *************** *** 1370,1378 **** /* Acquire inventory color */ attr = tval_to_attr[o_ptr->tval & 0x7F]; - /* Disable inventory colors */ - if (!inventory_colors) attr = TERM_WHITE; - /* Display the object */ c_put_str(attr, o_name, y, 3); --- 1370,1375 ---- *************** *** 1404,1412 **** /* Acquire inventory color */ attr = tval_to_attr[o_ptr->tval & 0x7F]; - /* Disable inventory colors */ - if (!inventory_colors) attr = TERM_WHITE; - /* Display the object */ c_put_str(attr, o_name, y, 3); --- 1401,1406 ---- *************** *** 2413,2418 **** --- 2407,2415 ---- /* Buying an object makes you aware of it */ object_aware(i_ptr); + /* Combine / Reorder the pack (later) */ + p_ptr->notice |= (PN_COMBINE | PN_REORDER); + /* Clear the "fixed" flag from the object */ i_ptr->ident &= ~(IDENT_FIXED); *************** *** 2709,2715 **** p_ptr->notice |= (PN_COMBINE | PN_REORDER); /* Window stuff */ ! p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_SPELL | PW_PLAYER); /* Get local object */ i_ptr = &object_type_body; --- 2706,2712 ---- p_ptr->notice |= (PN_COMBINE | PN_REORDER); /* Window stuff */ ! p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER_0 | PW_PLAYER_1); /* Get local object */ i_ptr = &object_type_body; diff -c -r angband-283-old/src/tables.c foo/angband-283/src/tables.c *** angband-283-old/src/tables.c Mon Feb 9 06:54:40 1998 --- foo/angband-283/src/tables.c Wed Feb 11 06:30:29 1998 *************** *** 2532,2539 **** { "Display inven/equip", "Display equip/inven", ! "Display player flags", ! "Display player screen", NULL, NULL, "Display messages", --- 2532,2539 ---- { "Display inven/equip", "Display equip/inven", ! "Display player (basic)", ! "Display player (extra)", NULL, NULL, "Display messages", *************** *** 2577,2583 **** "use_old_target", /* OPT_use_old_target */ "always_pickup", /* OPT_always_pickup */ "always_repeat", /* OPT_always_repeat */ ! "show_flavors", /* OPT_show_flavors */ "stack_force_notes", /* OPT_stack_force_notes */ "stack_force_costs", /* OPT_stack_force_costs */ "show_labels", /* OPT_show_labels */ --- 2577,2583 ---- "use_old_target", /* OPT_use_old_target */ "always_pickup", /* OPT_always_pickup */ "always_repeat", /* OPT_always_repeat */ ! "depth_in_feet", /* OPT_depth_in_feet */ "stack_force_notes", /* OPT_stack_force_notes */ "stack_force_costs", /* OPT_stack_force_costs */ "show_labels", /* OPT_show_labels */ *************** *** 2585,2591 **** "show_choices", /* OPT_show_choices */ "show_details", /* OPT_show_details */ "ring_bell", /* OPT_ring_bell */ ! "inventory_colors", /* OPT_inventory_colors */ "run_ignore_stairs", /* OPT_run_ignore_stairs */ "run_ignore_doors", /* OPT_run_ignore_doors */ "run_cut_corners", /* OPT_run_cut_corners */ --- 2585,2591 ---- "show_choices", /* OPT_show_choices */ "show_details", /* OPT_show_details */ "ring_bell", /* OPT_ring_bell */ ! "show_flavors", /* OPT_flavors */ "run_ignore_stairs", /* OPT_run_ignore_stairs */ "run_ignore_doors", /* OPT_run_ignore_doors */ "run_cut_corners", /* OPT_run_cut_corners */ *************** *** 2649,2663 **** "Use old target by default", /* OPT_use_old_target */ "Pick things up by default", /* OPT_always_pickup */ "Repeat obvious commands", /* OPT_always_repeat */ ! "Always display object flavors", /* OPT_show_flacors */ "Merge inscriptions when stacking", /* OPT_stack_force_notes */ "Merge discounts when stacking", /* OPT_stack_force_costs */ ! "Show labels in object listings", /* OPT_show_labels */ ! "Show weights in object listings", /* OPT_show_weights */ ! "Show choices in certain sub-windows", /* OPT_show_choices */ ! "Show details in certain sub-windows", /* OPT_show_details */ "Audible bell (on errors, etc)", /* OPT_ring_bell */ ! "Use color for inventory listings", /* OPT_inventory_colors */ "When running, ignore stairs", /* OPT_run_ignore_stairs */ "When running, ignore doors", /* OPT_run_ignore_doors */ "When running, cut corners", /* OPT_run_cut_corners */ --- 2649,2663 ---- "Use old target by default", /* OPT_use_old_target */ "Pick things up by default", /* OPT_always_pickup */ "Repeat obvious commands", /* OPT_always_repeat */ ! "Show dungeon level in feet", /* OPT_depth_in_feet */ "Merge inscriptions when stacking", /* OPT_stack_force_notes */ "Merge discounts when stacking", /* OPT_stack_force_costs */ ! "Show labels in equipment listings", /* OPT_show_labels */ ! "Show weights in all object listings", /* OPT_show_weights */ ! "Show choices in inven/equip windows", /* OPT_show_choices */ ! "Show details in monster descriptions", /* OPT_show_details */ "Audible bell (on errors, etc)", /* OPT_ring_bell */ ! "Show flavors in object descriptions", /* OPT_show_flacors */ "When running, ignore stairs", /* OPT_run_ignore_stairs */ "When running, ignore doors", /* OPT_run_ignore_doors */ "When running, cut corners", /* OPT_run_cut_corners */ *************** *** 2698,2704 **** "Flush input whenever disturbed", /* OPT_flush_disturb */ NULL, /* xxx */ "Flush output before every command", /* OPT_fresh_before */ ! "Flush output after various things", /* OPT_fresh_after */ NULL, /* xxx */ "Compress messages in savefiles", /* OPT_compress_savefile */ "Hilite the player with the cursor", /* OPT_hilite_player */ --- 2698,2704 ---- "Flush input whenever disturbed", /* OPT_flush_disturb */ NULL, /* xxx */ "Flush output before every command", /* OPT_fresh_before */ ! "Flush output after various things", /* OPT_fresh_after */ NULL, /* xxx */ "Compress messages in savefiles", /* OPT_compress_savefile */ "Hilite the player with the cursor", /* OPT_hilite_player */ *************** *** 2721,2727 **** FALSE, /* OPT_use_old_target */ TRUE, /* OPT_always_pickup */ FALSE, /* OPT_always_repeat */ ! FALSE, /* OPT_show_flavors */ FALSE, /* OPT_stack_force_notes */ FALSE, /* OPT_stack_force_costs */ TRUE, /* OPT_show_labels */ --- 2721,2727 ---- FALSE, /* OPT_use_old_target */ TRUE, /* OPT_always_pickup */ FALSE, /* OPT_always_repeat */ ! FALSE, /* OPT_depth_in_feet */ FALSE, /* OPT_stack_force_notes */ FALSE, /* OPT_stack_force_costs */ TRUE, /* OPT_show_labels */ *************** *** 2729,2735 **** TRUE, /* OPT_show_choices */ TRUE, /* OPT_show_details */ TRUE, /* OPT_ring_bell */ ! TRUE, /* OPT_inventory_colors */ TRUE, /* OPT_run_ignore_stairs */ TRUE, /* OPT_run_ignore_doors */ TRUE, /* OPT_run_cut_corners */ --- 2729,2735 ---- TRUE, /* OPT_show_choices */ TRUE, /* OPT_show_details */ TRUE, /* OPT_ring_bell */ ! TRUE, /* OPT_show_flavors */ TRUE, /* OPT_run_ignore_stairs */ TRUE, /* OPT_run_ignore_doors */ TRUE, /* OPT_run_cut_corners */ *************** *** 2796,2810 **** OPT_use_old_target, OPT_always_pickup, OPT_always_repeat, ! OPT_show_flavors, OPT_stack_force_notes, OPT_stack_force_costs, OPT_show_labels, OPT_show_weights, OPT_show_choices, OPT_show_details, ! OPT_ring_bell, ! OPT_inventory_colors }, /*** Disturbance ***/ --- 2796,2810 ---- OPT_use_old_target, OPT_always_pickup, OPT_always_repeat, ! OPT_depth_in_feet, OPT_stack_force_notes, OPT_stack_force_costs, OPT_show_labels, OPT_show_weights, OPT_show_choices, OPT_show_details, ! OPT_show_flavors, ! OPT_ring_bell }, /*** Disturbance ***/ diff -c -r angband-283-old/src/util.c foo/angband-283/src/util.c *** angband-283-old/src/util.c Mon Feb 9 04:42:58 1998 --- foo/angband-283/src/util.c Wed Feb 11 06:30:29 1998 *************** *** 2220,2226 **** */ void msg_print(cptr msg) { ! static p = 0; int n; --- 2220,2226 ---- */ void msg_print(cptr msg) { ! static int p = 0; int n; diff -c -r angband-283-old/src/wizard2.c foo/angband-283/src/wizard2.c *** angband-283-old/src/wizard2.c Fri Feb 6 04:10:31 1998 --- foo/angband-283/src/wizard2.c Wed Feb 11 06:30:29 1998 *************** *** 643,649 **** p_ptr->notice |= (PN_COMBINE | PN_REORDER); /* Window stuff */ ! p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_SPELL | PW_PLAYER); } } --- 643,649 ---- p_ptr->notice |= (PN_COMBINE | PN_REORDER); /* Window stuff */ ! p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER_0 | PW_PLAYER_1); } } *************** *** 966,972 **** p_ptr->notice |= (PN_COMBINE | PN_REORDER); /* Window stuff */ ! p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_SPELL | PW_PLAYER); } /* Ignore change */ --- 966,972 ---- p_ptr->notice |= (PN_COMBINE | PN_REORDER); /* Window stuff */ ! p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER_0 | PW_PLAYER_1); } /* Ignore change */ *************** *** 1183,1189 **** p_ptr->redraw |= (PR_HP); /* Window stuff */ ! p_ptr->window |= (PW_SPELL | PW_PLAYER); /* Handle stuff */ handle_stuff(); --- 1183,1189 ---- p_ptr->redraw |= (PR_HP); /* Window stuff */ ! p_ptr->window |= (PW_PLAYER_0 | PW_PLAYER_1); /* Handle stuff */ handle_stuff(); diff -c -r angband-283-old/src/xtra1.c foo/angband-283/src/xtra1.c *** angband-283-old/src/xtra1.c Mon Feb 9 05:58:29 1998 --- foo/angband-283/src/xtra1.c Wed Feb 11 06:30:29 1998 *************** *** 333,338 **** --- 333,342 ---- { strcpy(depths, "Town"); } + else if (depth_in_feet) + { + sprintf(depths, "%d ft", p_ptr->depth * 50); + } else { sprintf(depths, "Lev %d", p_ptr->depth); *************** *** 898,906 **** /* ! * Hack -- display flags in sub-windows */ ! static void fix_pflags(void) { int j; --- 902,910 ---- /* ! * Hack -- display player in sub-windows (mode 0) */ ! static void fix_player_0(void) { int j; *************** *** 913,925 **** if (!angband_term[j]) continue; /* No relevant flags */ ! if (!(op_ptr->window_flag[j] & (PW_SPELL))) continue; /* Activate */ Term_activate(angband_term[j]); ! /* Display flags */ ! display_player(1); /* Fresh */ Term_fresh(); --- 917,929 ---- if (!angband_term[j]) continue; /* No relevant flags */ ! if (!(op_ptr->window_flag[j] & (PW_PLAYER_0))) continue; /* Activate */ Term_activate(angband_term[j]); ! /* Display player */ ! display_player(0); /* Fresh */ Term_fresh(); *************** *** 930,939 **** } /* ! * Hack -- display character in sub-windows */ ! static void fix_player(void) { int j; --- 934,944 ---- } + /* ! * Hack -- display player in sub-windows (mode 1) */ ! static void fix_player_1(void) { int j; *************** *** 946,958 **** if (!angband_term[j]) continue; /* No relevant flags */ ! if (!(op_ptr->window_flag[j] & (PW_PLAYER))) continue; /* Activate */ Term_activate(angband_term[j]); ! /* Display player */ ! display_player(0); /* Fresh */ Term_fresh(); --- 951,963 ---- if (!angband_term[j]) continue; /* No relevant flags */ ! if (!(op_ptr->window_flag[j] & (PW_PLAYER_1))) continue; /* Activate */ Term_activate(angband_term[j]); ! /* Display flags */ ! display_player(1); /* Fresh */ Term_fresh(); *************** *** 963,969 **** } - /* * Hack -- display recent messages in sub-windows * --- 968,973 ---- *************** *** 1495,1501 **** p_ptr->redraw |= (PR_MANA); /* Window stuff */ ! p_ptr->window |= (PW_SPELL | PW_PLAYER); } --- 1499,1505 ---- p_ptr->redraw |= (PR_MANA); /* Window stuff */ ! p_ptr->window |= (PW_PLAYER_0 | PW_PLAYER_1); } *************** *** 1575,1581 **** p_ptr->redraw |= (PR_HP); /* Window stuff */ ! p_ptr->window |= (PW_SPELL | PW_PLAYER); } } --- 1579,1585 ---- p_ptr->redraw |= (PR_HP); /* Window stuff */ ! p_ptr->window |= (PW_PLAYER_0 | PW_PLAYER_1); } } *************** *** 2416,2422 **** p_ptr->redraw |= (PR_STATS); /* Window stuff */ ! p_ptr->window |= (PW_SPELL | PW_PLAYER); } /* Notice changes */ --- 2420,2426 ---- p_ptr->redraw |= (PR_STATS); /* Window stuff */ ! p_ptr->window |= (PW_PLAYER_0 | PW_PLAYER_1); } /* Notice changes */ *************** *** 2426,2432 **** p_ptr->redraw |= (PR_STATS); /* Window stuff */ ! p_ptr->window |= (PW_SPELL | PW_PLAYER); } /* Notice changes */ --- 2430,2436 ---- p_ptr->redraw |= (PR_STATS); /* Window stuff */ ! p_ptr->window |= (PW_PLAYER_0 | PW_PLAYER_1); } /* Notice changes */ *************** *** 2486,2492 **** p_ptr->redraw |= (PR_ARMOR); /* Window stuff */ ! p_ptr->window |= (PW_SPELL | PW_PLAYER); } /* Hack -- handle "xtra" mode */ --- 2490,2496 ---- p_ptr->redraw |= (PR_ARMOR); /* Window stuff */ ! p_ptr->window |= (PW_PLAYER_0 | PW_PLAYER_1); } /* Hack -- handle "xtra" mode */ *************** *** 2669,2674 **** --- 2673,2685 ---- p_ptr->update &= ~(PU_MONSTERS); update_monsters(FALSE); } + + + if (p_ptr->update & (PU_PANEL)) + { + p_ptr->update &= ~(PU_PANEL); + verify_panel(); + } } *************** *** 2690,2704 **** - /* Hack -- clear the screen */ - if (p_ptr->redraw & (PR_WIPE)) - { - p_ptr->redraw &= ~(PR_WIPE); - msg_print(NULL); - Term_clear(); - } - - if (p_ptr->redraw & (PR_MAP)) { p_ptr->redraw &= ~(PR_MAP); --- 2701,2706 ---- *************** *** 2907,2924 **** fix_equip(); } ! /* Display pflags */ ! if (p_ptr->window & (PW_SPELL)) { ! p_ptr->window &= ~(PW_SPELL); ! fix_pflags(); } ! /* Display player */ ! if (p_ptr->window & (PW_PLAYER)) { ! p_ptr->window &= ~(PW_PLAYER); ! fix_player(); } /* Display overhead view */ --- 2909,2926 ---- fix_equip(); } ! /* Display player (mode 0) */ ! if (p_ptr->window & (PW_PLAYER_0)) { ! p_ptr->window &= ~(PW_PLAYER_0); ! fix_player_0(); } ! /* Display player (mode 1) */ ! if (p_ptr->window & (PW_PLAYER_1)) { ! p_ptr->window &= ~(PW_PLAYER_1); ! fix_player_1(); } /* Display overhead view */ diff -c -r angband-283-old/src/xtra2.c foo/angband-283/src/xtra2.c *** angband-283-old/src/xtra2.c Fri Feb 6 04:10:31 1998 --- foo/angband-283/src/xtra2.c Wed Feb 11 06:30:29 1998 *************** *** 1696,1702 **** p_ptr->redraw |= (PR_LEV | PR_TITLE); /* Window stuff */ ! p_ptr->window |= (PW_SPELL | PW_PLAYER); /* Handle stuff */ handle_stuff(); --- 1696,1702 ---- p_ptr->redraw |= (PR_LEV | PR_TITLE); /* Window stuff */ ! p_ptr->window |= (PW_PLAYER_0 | PW_PLAYER_1); /* Handle stuff */ handle_stuff(); *************** *** 1727,1733 **** p_ptr->redraw |= (PR_LEV | PR_TITLE); /* Window stuff */ ! p_ptr->window |= (PW_SPELL | PW_PLAYER); /* Handle stuff */ handle_stuff(); --- 1727,1733 ---- p_ptr->redraw |= (PR_LEV | PR_TITLE); /* Window stuff */ ! p_ptr->window |= (PW_PLAYER_0 | PW_PLAYER_1); /* Handle stuff */ handle_stuff();