Changeset 698
- Timestamp:
- 02/08/08 08:12:45 (8 months ago)
- Files:
-
- trunk/src/Makefile.inc (modified) (1 diff)
- trunk/src/Makefile.src (modified) (1 diff)
- trunk/src/birth.c (modified) (16 diffs)
- trunk/src/button.c (added)
- trunk/src/cave.c (modified) (1 diff)
- trunk/src/cmd0.c (modified) (1 diff)
- trunk/src/cmd3.c (modified) (8 diffs)
- trunk/src/cmd5.c (modified) (1 diff)
- trunk/src/defines.h (modified) (1 diff)
- trunk/src/dungeon.c (modified) (1 diff)
- trunk/src/externs.h (modified) (1 diff)
- trunk/src/game-event.h (modified) (1 diff)
- trunk/src/init2.c (modified) (1 diff)
- trunk/src/obj-ui.c (modified) (10 diffs)
- trunk/src/option.c (modified) (2 diffs)
- trunk/src/option.h (modified) (2 diffs)
- trunk/src/spells2.c (modified) (2 diffs)
- trunk/src/types.h (modified) (1 diff)
- trunk/src/util.c (modified) (6 diffs)
- trunk/src/xtra1.c (modified) (1 diff)
- trunk/src/xtra3.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/Makefile.inc
r667 r698 16 16 attack.o: attack.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 17 17 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 18 defines.h option.h types.h ui.h z-type.h externs.h object.h18 defines.h option.h types.h ui.h z-type.h object.h externs.h 19 19 birth.o: birth.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 20 20 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 21 option.h types.h ui.h z-type.h externs.h object.h cmds.h ui-menu.h 21 option.h types.h ui.h z-type.h object.h externs.h cmds.h ui-menu.h 22 button.o: button.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 23 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 24 defines.h option.h types.h ui.h z-type.h object.h externs.h 22 25 cave.o: cave.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 23 26 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 24 option.h types.h ui.h z-type.h externs.h object.h game-event.h27 option.h types.h ui.h z-type.h object.h externs.h game-event.h 25 28 compress.o: compress.c compress.h h-basic.h 26 29 cmd0.o: cmd0.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 27 30 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 28 option.h types.h ui.h z-type.h externs.h object.h wizard.h cmds.h \31 option.h types.h ui.h z-type.h object.h externs.h wizard.h cmds.h \ 29 32 ui-menu.h 30 33 cmd1.o: cmd1.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 31 34 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 32 option.h types.h ui.h z-type.h externs.h object.h cmds.h35 option.h types.h ui.h z-type.h object.h externs.h cmds.h 33 36 cmd2.o: cmd2.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 34 37 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 35 option.h types.h ui.h z-type.h externs.h object.h38 option.h types.h ui.h z-type.h object.h externs.h 36 39 cmd3.o: cmd3.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 37 40 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 38 option.h types.h ui.h z-type.h externs.h object.h41 option.h types.h ui.h z-type.h object.h externs.h 39 42 cmd4.o: cmd4.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 40 43 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 41 option.h types.h ui.h z-type.h externs.h object.h ui-menu.h44 option.h types.h ui.h z-type.h object.h externs.h ui-menu.h 42 45 cmd5.o: cmd5.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 43 46 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 44 option.h types.h ui.h z-type.h externs.h object.h47 option.h types.h ui.h z-type.h object.h externs.h 45 48 cmd6.o: cmd6.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 46 49 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 47 option.h types.h ui.h z-type.h externs.h object.h cmds.h effects.h50 option.h types.h ui.h z-type.h object.h externs.h cmds.h effects.h 48 51 cmd-obj.o: cmd-obj.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 49 52 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 50 defines.h option.h types.h ui.h z-type.h externs.h object.h cmds.h53 defines.h option.h types.h ui.h z-type.h object.h externs.h cmds.h 51 54 death.o: death.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 52 55 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 53 option.h types.h ui.h z-type.h externs.h object.h ui-menu.h56 option.h types.h ui.h z-type.h object.h externs.h ui-menu.h 54 57 debug.o: debug.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 55 58 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 56 option.h types.h ui.h z-type.h externs.h object.h debug.h59 option.h types.h ui.h z-type.h object.h externs.h debug.h 57 60 dungeon.o: dungeon.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 58 61 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 59 defines.h option.h types.h ui.h z-type.h externs.h object.h cmds.h62 defines.h option.h types.h ui.h z-type.h object.h externs.h cmds.h 60 63 effects.o: effects.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 61 64 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 62 defines.h option.h types.h ui.h z-type.h externs.h object.h effects.h65 defines.h option.h types.h ui.h z-type.h object.h externs.h effects.h 63 66 files.o: files.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 64 67 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 65 option.h types.h ui.h z-type.h externs.h object.h ui-menu.h cmds.h68 option.h types.h ui.h z-type.h object.h externs.h ui-menu.h cmds.h 66 69 game-cmd.o: game-cmd.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 67 70 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 68 defines.h option.h types.h ui.h z-type.h externs.h object.h game-cmd.h71 defines.h option.h types.h ui.h z-type.h object.h externs.h game-cmd.h 69 72 game-event.o: game-event.c z-virt.h h-basic.h game-event.h 70 73 generate.o: generate.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 71 74 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 72 defines.h option.h types.h ui.h z-type.h externs.h object.h75 defines.h option.h types.h ui.h z-type.h object.h externs.h 73 76 history.o: history.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 74 77 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 75 defines.h option.h types.h ui.h z-type.h externs.h object.h78 defines.h option.h types.h ui.h z-type.h object.h externs.h 76 79 init1.o: init1.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 77 80 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 78 option.h types.h ui.h z-type.h externs.h object.h effects.h init.h81 option.h types.h ui.h z-type.h object.h externs.h effects.h init.h 79 82 init2.o: init2.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 80 83 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 81 option.h types.h ui.h z-type.h externs.h object.h init.h cmds.h \84 option.h types.h ui.h z-type.h object.h externs.h init.h cmds.h \ 82 85 game-event.h game-cmd.h 83 86 load.o: load.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 84 87 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 85 option.h types.h ui.h z-type.h externs.h object.h88 option.h types.h ui.h z-type.h object.h externs.h 86 89 loadsave.o: loadsave.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 87 90 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 88 defines.h option.h types.h ui.h z-type.h externs.h object.h \91 defines.h option.h types.h ui.h z-type.h object.h externs.h \ 89 92 z-blockfile.h z-smap.h 90 93 melee1.o: melee1.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 91 94 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 92 defines.h option.h types.h ui.h z-type.h externs.h object.h95 defines.h option.h types.h ui.h z-type.h object.h externs.h 93 96 melee2.o: melee2.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 94 97 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 95 defines.h option.h types.h ui.h z-type.h externs.h object.h98 defines.h option.h types.h ui.h z-type.h object.h externs.h 96 99 monster1.o: monster1.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 97 100 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 98 defines.h option.h types.h ui.h z-type.h externs.h object.h101 defines.h option.h types.h ui.h z-type.h object.h externs.h 99 102 monster2.o: monster2.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 100 103 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 101 defines.h option.h types.h ui.h z-type.h externs.h object.h104 defines.h option.h types.h ui.h z-type.h object.h externs.h 102 105 obj-desc.o: obj-desc.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 103 106 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 104 defines.h option.h types.h ui.h z-type.h externs.h object.h107 defines.h option.h types.h ui.h z-type.h object.h externs.h 105 108 obj-info.o: obj-info.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 106 109 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 107 defines.h option.h types.h ui.h z-type.h externs.h object.h effects.h \110 defines.h option.h types.h ui.h z-type.h object.h externs.h effects.h \ 108 111 cmds.h 109 112 obj-make.o: obj-make.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 110 113 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 111 defines.h option.h types.h ui.h z-type.h externs.h object.h114 defines.h option.h types.h ui.h z-type.h object.h externs.h 112 115 obj-ui.o: obj-ui.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 113 116 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 114 defines.h option.h types.h ui.h z-type.h externs.h object.h117 defines.h option.h types.h ui.h z-type.h object.h externs.h 115 118 obj-util.o: obj-util.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 116 119 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 117 defines.h option.h types.h ui.h z-type.h externs.h object.h randname.h120 defines.h option.h types.h ui.h z-type.h object.h externs.h randname.h 118 121 option.o: option.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 119 122 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 120 defines.h option.h types.h ui.h z-type.h externs.h object.h123 defines.h option.h types.h ui.h z-type.h object.h externs.h 121 124 randart.o: randart.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 122 125 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 123 defines.h option.h types.h ui.h z-type.h externs.h object.h init.h \126 defines.h option.h types.h ui.h z-type.h object.h externs.h init.h \ 124 127 randname.h 125 128 randname.o: randname.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 126 129 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 127 defines.h option.h types.h ui.h z-type.h externs.h object.h randname.h130 defines.h option.h types.h ui.h z-type.h object.h externs.h randname.h 128 131 pathfind.o: pathfind.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 129 132 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 130 defines.h option.h types.h ui.h z-type.h externs.h object.h133 defines.h option.h types.h ui.h z-type.h object.h externs.h 131 134 score.o: score.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 132 135 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 133 option.h types.h ui.h z-type.h externs.h object.h136 option.h types.h ui.h z-type.h object.h externs.h 134 137 signals.o: signals.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 135 138 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 136 defines.h option.h types.h ui.h z-type.h externs.h object.h139 defines.h option.h types.h ui.h z-type.h object.h externs.h 137 140 save.o: save.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 138 141 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 139 option.h types.h ui.h z-type.h externs.h object.h142 option.h types.h ui.h z-type.h object.h externs.h 140 143 spells1.o: spells1.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 141 144 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 142 defines.h option.h types.h ui.h z-type.h externs.h object.h145 defines.h option.h types.h ui.h z-type.h object.h externs.h 143 146 spells2.o: spells2.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 144 147 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 145 defines.h option.h types.h ui.h z-type.h externs.h object.h148 defines.h option.h types.h ui.h z-type.h object.h externs.h 146 149 squelch.o: squelch.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 147 150 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 148 defines.h option.h types.h ui.h z-type.h externs.h object.h cmds.h \151 defines.h option.h types.h ui.h z-type.h object.h externs.h cmds.h \ 149 152 ui-menu.h 150 153 store.o: store.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 151 154 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 152 option.h types.h ui.h z-type.h externs.h object.h cmds.h ui-menu.h155 option.h types.h ui.h z-type.h object.h externs.h cmds.h ui-menu.h 153 156 tables.o: tables.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 154 157 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 155 defines.h option.h types.h ui.h z-type.h externs.h object.h 158 defines.h option.h types.h ui.h z-type.h object.h externs.h 159 target.o: target.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 160 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 161 defines.h option.h types.h ui.h z-type.h object.h externs.h 156 162 trap.o: trap.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 157 163 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 158 option.h types.h ui.h z-type.h externs.h object.h164 option.h types.h ui.h z-type.h object.h externs.h 159 165 ui.o: ui.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 160 166 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 161 option.h types.h ui.h z-type.h externs.h object.h167 option.h types.h ui.h z-type.h object.h externs.h 162 168 ui-event.o: ui-event.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 163 169 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 164 defines.h option.h types.h ui.h z-type.h externs.h object.h170 defines.h option.h types.h ui.h z-type.h object.h externs.h 165 171 ui-menu.o: ui-menu.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 166 172 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 167 defines.h option.h types.h ui.h z-type.h externs.h object.h ui-menu.h173 defines.h option.h types.h ui.h z-type.h object.h externs.h ui-menu.h 168 174 util.o: util.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 169 175 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 170 option.h types.h ui.h z-type.h externs.h object.h randname.h176 option.h types.h ui.h z-type.h object.h externs.h randname.h 171 177 variable.o: variable.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 172 178 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 173 defines.h option.h types.h ui.h z-type.h externs.h object.h179 defines.h option.h types.h ui.h z-type.h object.h externs.h 174 180 wiz-spoil.o: wiz-spoil.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 175 181 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 176 defines.h option.h types.h ui.h z-type.h externs.h object.h cmds.h182 defines.h option.h types.h ui.h z-type.h object.h externs.h cmds.h 177 183 wiz-stats.o: wiz-stats.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 178 184 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 179 defines.h option.h types.h ui.h z-type.h externs.h object.h wizard.h185 defines.h option.h types.h ui.h z-type.h object.h externs.h wizard.h 180 186 wizard.o: wizard.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 181 187 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 182 defines.h option.h types.h ui.h z-type.h externs.h object.h wizard.h \188 defines.h option.h types.h ui.h z-type.h object.h externs.h wizard.h \ 183 189 cmds.h 184 190 x-spell.o: x-spell.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 185 191 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 186 defines.h option.h types.h ui.h z-type.h externs.h object.h192 defines.h option.h types.h ui.h z-type.h object.h externs.h 187 193 xtra1.o: xtra1.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 188 194 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 189 option.h types.h ui.h z-type.h externs.h object.h game-event.h195 option.h types.h ui.h z-type.h object.h externs.h game-event.h 190 196 xtra2.o: xtra2.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 191 197 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 192 option.h types.h ui.h z-type.h externs.h object.h cmds.h198 option.h types.h ui.h z-type.h object.h externs.h cmds.h 193 199 xtra3.o: xtra3.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 194 200 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 195 option.h types.h ui.h z-type.h externs.h object.h game-event.h201 option.h types.h ui.h z-type.h object.h externs.h game-event.h 196 202 z-file.o: z-file.c z-file.h h-basic.h z-virt.h z-util.h z-form.h 197 203 z-form.o: z-form.c z-form.h h-basic.h z-type.h z-util.h z-virt.h trunk/src/Makefile.src
r670 r698 51 51 attack.o \ 52 52 birth.o \ 53 button.o \ 53 54 cave.o \ 54 55 compress.o \ trunk/src/birth.c
r691 r698 1115 1115 1116 1116 char ch; 1117 ui_event_data ke; 1117 1118 1118 1119 char buf[80]; … … 1223 1224 prt(buf, 0, 0); 1224 1225 1226 /* Buttons */ 1227 clear_from(Term->hgt - 2); 1228 button_kill_all(); 1229 button_add("[Back]", ESCAPE); 1230 button_add("[Done]", '\r'); 1231 button_add("[Up]", '8'); 1232 button_add("[Down]", '2'); 1233 button_add("[Incr]", '6'); 1234 button_add("[Decr]", '4'); 1235 redraw_stuff(); 1236 1225 1237 /* Place cursor just after cost of current stat */ 1226 1238 Term_gotoxy(col + 36, row + stat); 1227 1239 1228 1240 /* Get key */ 1229 ch = inkey(); 1241 ke = inkey_ex(); 1242 ch = ke.key; 1230 1243 1231 1244 if (ch == KTRL('X')) … … 1274 1287 1275 1288 1289 /* Kill buttons */ 1290 button_kill_all(); 1291 redraw_stuff(); 1292 1276 1293 /* Done - advance a step*/ 1277 1294 return +1; … … 1301 1318 1302 1319 char ch; 1320 ui_event_data ke; 1303 1321 1304 1322 char b1 = '['; … … 1548 1566 1549 1567 /* Check for a keypress */ 1550 if ( inkey()) break;1568 if (anykey()) break; 1551 1569 } 1552 1570 } … … 1598 1616 /* Display the player */ 1599 1617 display_player(0); 1618 1619 /* Add buttons */ 1620 button_add("[ESC]", ESCAPE); 1621 button_add("[Enter]", '\r'); 1622 button_add("[r]", 'r'); 1623 if (prev) button_add("[p]", 'p'); 1624 clear_from(Term->hgt - 2); 1625 redraw_stuff(); 1600 1626 1601 1627 /* Prepare a prompt (must squeeze everything in) */ … … 1608 1634 1609 1635 /* Prompt and get a command */ 1610 ch = inkey(); 1636 ke = inkey_ex(); 1637 ch = ke.key; 1611 1638 1612 1639 /* Go back to the start of the step, or the previous step */ … … 1614 1641 if (ch == ESCAPE) 1615 1642 { 1643 button_kill('r'); 1644 button_kill('p'); 1616 1645 if (autoroll) 1617 1646 return 0; … … 1646 1675 bell("Illegal auto-roller command!"); 1647 1676 } 1677 1678 /* Kill buttons */ 1679 button_kill(ESCAPE); 1680 button_kill('\r'); 1681 button_kill('r'); 1682 button_kill('p'); 1683 redraw_stuff(); 1648 1684 1649 1685 /* Are we done? */ … … 1682 1718 static void player_birth_aux(void) 1683 1719 { 1684 char ch;1720 ui_event_data ke; 1685 1721 cptr prompt = "['ESC' to step back, 'S' to start over, or any other key to continue]"; 1686 1722 birth_stages state = BIRTH_QUESTIONS; … … 1742 1778 prt(prompt, Term->hgt - 1, Term->wid / 2 - strlen(prompt) / 2); 1743 1779 1780 /* Buttons */ 1781 button_kill_all(); 1782 button_add("[Continue]", 'q'); 1783 button_add("[ESC]", ESCAPE); 1784 button_add("[S]", 'S'); 1785 redraw_stuff(); 1786 1744 1787 /* Get a key */ 1745 ch = inkey();1788 ke = inkey_ex(); 1746 1789 1747 1790 /* Start over */ 1748 if ( ch== 'S')1791 if (ke.key == 'S') 1749 1792 state = BIRTH_RESTART; 1750 1793 1751 if ( ch== KTRL('X'))1794 if (ke.key == KTRL('X')) 1752 1795 quit(NULL); 1753 1796 1754 if ( ch== ESCAPE)1797 if (ke.key == ESCAPE) 1755 1798 state--; 1756 1799 else 1757 1800 state++; 1758 1801 1802 /* Buttons */ 1803 button_kill_all(); 1804 redraw_stuff(); 1805 1759 1806 /* Clear prompt */ 1760 1807 clear_from(23); … … 1780 1827 static bool player_birth_quick(void) 1781 1828 { 1782 char ch;1829 ui_event_data ke; 1783 1830 int i; 1784 1831 birther old_char; … … 1874 1921 prt("['CTRL-X' to quit, 'ESC' to start over, or any other key to continue]", 23, 5); 1875 1922 1923 /* Buttons */ 1924 button_kill_all(); 1925 button_add("[Continue]", 'q'); 1926 button_add("[ESC]", ESCAPE); 1927 button_add("[Exit]", KTRL('X')); 1928 redraw_stuff(); 1929 1876 1930 /* Get a key */ 1877 ch = inkey();1931 ke = inkey_ex(); 1878 1932 1879 1933 /* Quit */ 1880 if ( ch== KTRL('X')) quit(NULL);1934 if (ke.key == KTRL('X')) quit(NULL); 1881 1935 1882 1936 /* Start over */ 1883 if ( ch== ESCAPE) return (FALSE);1937 if (ke.key == ESCAPE) return (FALSE); 1884 1938 1885 1939 /* Accept */ … … 1898 1952 { 1899 1953 bool quickstart = FALSE; 1900 char ch;1954 ui_event_data ke; 1901 1955 1902 1956 /* … … 1911 1965 1912 1966 put_str("Quick-start character based on previous one (y/n)? ", 2, 2); 1913 ch = inkey(); 1914 1915 if (ch == KTRL('X')) 1967 1968 /* Buttons */ 1969 button_kill_all(); 1970 button_add("[Exit]", KTRL('X')); 1971 button_add("[ESC]", ESCAPE); 1972 button_add("[y]", 'y'); 1973 button_add("[n]", 'n'); 1974 button_add("[Help]", '?'); 1975 1976 ke = inkey_ex(); 1977 1978 if (ke.key == KTRL('X')) 1916 1979 quit(NULL); 1917 else if (( ch == ESCAPE) || strchr("YyNn\r\n", ch))1980 else if ((ke.key == ESCAPE) || strchr("YyNn\r\n", ke.key)) 1918 1981 break; 1919 else if ( ch== '?')1982 else if (ke.key == '?') 1920 1983 (void)show_file("birth.hlp", NULL, 0, 0); 1921 1984 else … … 1924 1987 1925 1988 /* Quick generation */ 1926 if (( ch == 'y') || (ch== 'Y'))1989 if ((ke.key == 'y') || (ke.key == 'Y')) 1927 1990 { 1928 1991 if (player_birth_quick()) quickstart = TRUE; trunk/src/cave.c
r638 r698 1637 1637 1638 1638 /* Get any key */ 1639 (void) inkey();1639 (void)anykey(); 1640 1640 1641 1641 /* Load screen */ trunk/src/cmd0.c
r595 r698 390 390 391 391 /* Wait */ 392 inkey();392 anykey(); 393 393 394 394 /* Return */ trunk/src/cmd3.c
r678 r698 835 835 { 836 836 int i, n, r_idx; 837 char sym , query;837 char sym; 838 838 char buf[128]; 839 840 ui_event_data query; 839 841 840 842 bool all = FALSE; … … 917 919 } 918 920 921 /* Buttons */ 922 button_add("[y]", 'y'); 923 button_add("[k]", 'k'); 924 /* Don't collide with the repeat button */ 925 button_add("[n]", 'q'); 926 redraw_stuff(); 919 927 920 928 /* Prompt */ … … 922 930 923 931 /* Query */ 924 query = inkey ();932 query = inkey_ex(); 925 933 926 934 /* Restore */ 927 935 prt(buf, 0, 0); 928 936 937 /* Buttons */ 938 button_kill('y'); 939 button_kill('k'); 940 button_kill('q'); 941 redraw_stuff(); 942 929 943 /* Interpret the response */ 930 if (query == 'k')944 if (query.key == 'k') 931 945 { 932 946 /* Sort by kills (and level) */ 933 947 why = 4; 934 948 } 935 else if (query == 'y' || query == 'p')949 else if (query.key == 'y' || query.key == 'p') 936 950 { 937 951 /* Sort by level; accept 'p' as legacy */ … … 958 972 /* Start at the end */ 959 973 i = n - 1; 974 975 /* Button */ 976 button_add("[r]", 'r'); 977 button_add("[-]", '-'); 978 button_add("[+]", '+'); 979 redraw_stuff(); 960 980 961 981 /* Scan the monster memory */ … … 994 1014 995 1015 /* Command */ 996 query = inkey ();1016 query = inkey_ex(); 997 1017 998 1018 /* Unrecall */ … … 1004 1024 1005 1025 /* Normal commands */ 1006 if (query != 'r') break;1026 if (query.key != 'r') break; 1007 1027 1008 1028 /* Toggle recall */ … … 1011 1031 1012 1032 /* Stop scanning */ 1013 if (query == ESCAPE) break;1033 if (query.key == ESCAPE) break; 1014 1034 1015 1035 /* Move to "prev" monster */ 1016 if (query == '-')1036 if (query.key == '-') 1017 1037 { 1018 1038 if (++i == n) … … 1028 1048 } 1029 1049 1050 /* Button */ 1051 button_kill('r'); 1052 button_kill('-'); 1053 button_kill('+'); 1054 redraw_stuff(); 1030 1055 1031 1056 /* Re-display the identity */ trunk/src/cmd5.c
r526 r698 482 482 483 483 /* Wait for input */ 484 (void) inkey();484 (void)anykey(); 485 485 486 486 /* Load screen */ trunk/src/defines.h
r689 r698 1628 1628 #define PR_OBJECT 0x00800000L /* Display object recall */ 1629 1629 #define PR_MONLIST 0x01000000L /* Display monster list */ 1630 #define PR_BUTTONS 0x02000000L /* Display mouse buttons */ 1630 1631 1631 1632 /* Display Basic Info */ trunk/src/dungeon.c
r676 r698 1526 1526 /* Combine / Reorder the pack */ 1527 1527 p_ptr->notice |= (PN_COMBINE | PN_REORDER); 1528 1529 /* Make basic mouse buttons */ 1530 (void) button_add("[ESC]", ESCAPE); 1531 (void) button_add("[Ret]", '\r'); 1532 (void) button_add("[Spc]", ' '); 1533 (void) button_add("[Rpt]", 'n'); 1534 (void) button_add("[Std]", ','); 1535 1536 /* Redraw buttons */ 1537 p_ptr->redraw |= (PR_BUTTONS); 1528 1538 1529 1539 /* Notice stuff */ trunk/src/externs.h
r695 r698 265 265 extern void player_birth(void); 266 266 267 /* button.c */ 268 int button_add_text(const char *label, unsigned char keypress); 269 int button_add(char *label, unsigned char keypress); 270 void button_backup_all(void); 271 void button_restore(void); 272 int button_kill_text(unsigned char keypress); 273 int button_kill(unsigned char keypress); 274 void button_kill_all(void); 275 void button_init(button_add_f add, button_kill_f kill); 276 char button_get_key(int x, int y); 277 size_t button_print(int row, int col); 278 267 279 /* cave.c */ 268 280 extern int distance(int y1, int x1, int y2, int x2); trunk/src/game-event.h
r541 r698 25 25 EVENT_STATE, /* The three 'R's: Resting, Repeating and 26 26 Searching */ 27 EVENT_MOUSEBUTTONS, /* Displayed mouse buttons need changing */ 27 28 28 29 EVENT_PLAYERMOVED, trunk/src/init2.c
r617 r698 1079 1079 1080 1080 1081 /*** Prepare mouse buttons ***/ 1082 1083 button_init(button_add_text, button_kill_text); 1084 1085 1081 1086 /*** Prepare quest array ***/ 1082 1087 trunk/src/obj-ui.c
r665 r698 750 750 int px = p_ptr->px; 751 751 752 charwhich;752 ui_event_data which; 753 753 754 754 int j, k; … … 981 981 982 982 /* Indicate ability to "view" */ 983 if (!p_ptr->command_see) my_strcat(out_val, " * to see,", sizeof(out_val)); 983 if (!p_ptr->command_see) 984 { 985 my_strcat(out_val, " * to see,", sizeof(out_val)); 986 button_add("[*]", '*'); 987 } 984 988 985 989 /* Indicate legality of "toggle" */ 986 if (use_equip) my_strcat(out_val, " / for Equip,", sizeof(out_val)); 990 if (use_equip) 991 { 992 my_strcat(out_val, " / for Equip,", sizeof(out_val)); 993 button_add("[/]", '/'); 994 } 987 995 988 996 /* Indicate legality of the "floor" */ 989 if (allow_floor) my_strcat(out_val, " - for floor,", sizeof(out_val)); 997 if (allow_floor) 998 { 999 my_strcat(out_val, " - for floor,", sizeof(out_val)); 1000 button_add("[-]", '-'); 1001 } 990 1002 991 1003 /* Indicate that squelched items can be selected */ 992 if (can_squelch) my_strcat(out_val, " ! for squelched,", sizeof(out_val)); 1004 if (can_squelch) 1005 { 1006 my_strcat(out_val, " ! for squelched,", sizeof(out_val)); 1007 button_add("[!]", '!'); 1008 } 993 1009 } 994 1010 … … 1014 1030 1015 1031 /* Indicate ability to "view" */ 1016 if (!p_ptr->command_see) my_strcat(out_val, " * to see,", sizeof(out_val)); 1032 if (!p_ptr->command_see) 1033 { 1034 my_strcat(out_val, " * to see,", sizeof(out_val)); 1035 button_add("[*]", '*'); 1036 } 1017 1037 1018 1038 /* Indicate legality of "toggle" */ 1019 if (use_inven) my_strcat(out_val, " / for Inven,", sizeof(out_val)); 1039 if (use_inven) 1040 { 1041 my_strcat(out_val, " / for Inven,", sizeof(out_val)); 1042 button_add("[/]", '/'); 1043 } 1020 1044 1021 1045 /* Indicate legality of the "floor" */ 1022 if (allow_floor) my_strcat(out_val, " - for floor,", sizeof(out_val)); 1046 if (allow_floor) 1047 { 1048 my_strcat(out_val, " - for floor,", sizeof(out_val)); 1049 button_add("[!]", '!'); 1050 } 1023 1051 } 1024 1052 … … 1043 1071 1044 1072 /* Indicate ability to "view" */ 1045 if (!p_ptr->command_see) my_strcat(out_val, " * to see,", sizeof(out_val)); 1073 if (!p_ptr->command_see) 1074 { 1075 my_strcat(out_val, " * to see,", sizeof(out_val)); 1076 button_add("[*]", '*'); 1077 } 1046 1078 1047 1079 /* Append */ 1048 if (use_inven) my_strcat(out_val, " / for Inven,", sizeof(out_val)); 1080 if (use_inven) 1081 { 1082 my_strcat(out_val, " / for Inven,", sizeof(out_val)); 1083 button_add("[/]", '/'); 1084 } 1049 1085 1050 1086 /* Append */ 1051 else if (use_equip) my_strcat(out_val, " / for Equip,", sizeof(out_val)); 1087 else if (use_equip) 1088 { 1089 my_strcat(out_val, " / for Equip,", sizeof(out_val)); 1090 button_add("[/]", '/'); 1091 } 1052 1092 1053 1093 /* Indicate that squelched items can be selected */ 1054 if (can_squelch) my_strcat(out_val, " ! for squelched,", sizeof(out_val)); 1055 } 1094 if (can_squelch) 1095 { 1096 my_strcat(out_val, " ! for squelched,", sizeof(out_val)); 1097 button_add("[!]", '!'); 1098 } 1099 } 1100 1101 redraw_stuff(); 1056 1102 1057 1103 /* Finish the prompt */ … … 1066 1112 1067 1113 /* Get a key */ 1068 which = inkey ();1114 which = inkey_ex(); 1069 1115 1070 1116 /* Parse it */ 1071 switch (which )1117 switch (which.key) 1072 1118 { 1073 1119 case ESCAPE: … … 1218 1264 { 1219 1265 /* Look up the tag */ 1220 if (!get_tag(&k, which ))1266 if (!get_tag(&k, which.key)) 1221 1267 { 1222 1268 bell("Illegal object choice (tag)!"); … … 1331 1377 1332 1378 /* Note verify */ 1333 verify = (isupper((unsigned char)which ) ? TRUE : FALSE);1379 verify = (isupper((unsigned char)which.key) ? TRUE : FALSE); 1334 1380
