Changeset 1417
- Timestamp:
- 05/31/09 11:15:34 (9 months ago)
- Location:
- trunk/src
- Files:
-
- 1 removed
- 30 modified
-
Makefile.inc (modified) (1 diff)
-
Makefile.src (modified) (1 diff)
-
attack.c (modified) (7 diffs)
-
birth.c (modified) (8 diffs)
-
cmd-obj.c (modified) (16 diffs)
-
cmd0.c (modified) (19 diffs)
-
cmd1.c (modified) (2 diffs)
-
cmd2.c (modified) (42 diffs)
-
cmd3.c (modified) (5 diffs)
-
cmd5.c (modified) (2 diffs)
-
cmd6.c (deleted)
-
cmds.h (modified) (4 diffs)
-
dungeon.c (modified) (1 diff)
-
externs.h (modified) (4 diffs)
-
files.c (modified) (3 diffs)
-
game-cmd.c (modified) (7 diffs)
-
game-cmd.h (modified) (5 diffs)
-
gtk/main-gtk.c (modified) (2 diffs)
-
main-crb.c (modified) (1 diff)
-
main-sdl.c (modified) (1 diff)
-
main-win.c (modified) (3 diffs)
-
object/obj-ui.c (modified) (1 diff)
-
object/obj-util.c (modified) (2 diffs)
-
object/object.h (modified) (1 diff)
-
spells2.c (modified) (5 diffs)
-
store.c (modified) (8 diffs)
-
target.c (modified) (3 diffs)
-
textui.h (modified) (1 diff)
-
ui-birth.c (modified) (3 diffs)
-
wizard.c (modified) (1 diff)
-
xtra3.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Makefile.inc
r1319 r1417 20 20 ./attack.o: attack.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 21 21 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 22 defines.h option.h types.h object/ types.h object/object.h \23 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \24 externs.h object/tvalsval.h22 defines.h option.h types.h object/constants.h object/types.h \ 23 object/object.h monster/types.h player/types.h player/player.h store.h \ 24 ui.h z-type.h externs.h object/tvalsval.h game-cmd.h 25 25 ./birth.o: birth.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 26 26 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 27 option.h types.h object/ types.h object/object.h monster/types.h \28 player/types.h player/player.h store.h ui.h z-type.h externs.h \29 object/tvalsval.h cmds.h game-event.h game-cmd.h ui-menu.h27 option.h types.h object/constants.h object/types.h object/object.h \ 28 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 29 externs.h object/tvalsval.h cmds.h game-cmd.h game-event.h ui-menu.h 30 30 ./button.o: button.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 31 31 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 32 defines.h option.h types.h object/ types.h object/object.h \33 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \34 externs.h32 defines.h option.h types.h object/constants.h object/types.h \ 33 object/object.h monster/types.h player/types.h player/player.h store.h \ 34 ui.h z-type.h externs.h 35 35 ./cave.o: cave.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 36 36 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 37 option.h types.h object/ types.h object/object.h monster/types.h \38 player/types.h player/player.h store.h ui.h z-type.h externs.h \39 object/tvalsval.h game-event.h37 option.h types.h object/constants.h object/types.h object/object.h \ 38 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 39 externs.h object/tvalsval.h game-event.h 40 40 ./cmd0.o: cmd0.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 41 41 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 42 option.h types.h object/ types.h object/object.h monster/types.h \43 player/types.h player/player.h store.h ui.h z-type.h externs.h wizard.h \44 cmds.h ui-menu.h42 option.h types.h object/constants.h object/types.h object/object.h \ 43 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 44 externs.h wizard.h cmds.h game-cmd.h ui-menu.h 45 45 ./cmd1.o: cmd1.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 46 46 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 47 option.h types.h object/ types.h object/object.h monster/types.h \48 player/types.h player/player.h store.h ui.h z-type.h externs.h \49 object/tvalsval.h cmds.h47 option.h types.h object/constants.h object/types.h object/object.h \ 48 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 49 externs.h object/tvalsval.h cmds.h game-cmd.h 50 50 ./cmd2.o: cmd2.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 51 51 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 52 option.h types.h object/ types.h object/object.h monster/types.h \53 player/types.h player/player.h store.h ui.h z-type.h externs.h \54 object/tvalsval.h cmds.h52 option.h types.h object/constants.h object/types.h object/object.h \ 53 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 54 externs.h object/tvalsval.h cmds.h game-cmd.h 55 55 ./cmd3.o: cmd3.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 56 56 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 57 option.h types.h object/ types.h object/object.h monster/types.h \58 player/types.h player/player.h store.h ui.h z-type.h externs.h \59 object/tvalsval.h cmds.h57 option.h types.h object/constants.h object/types.h object/object.h \ 58 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 59 externs.h object/tvalsval.h cmds.h game-cmd.h 60 60 ./cmd4.o: cmd4.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 61 61 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 62 option.h types.h object/ types.h object/object.h monster/types.h \63 player/types.h player/player.h store.h ui.h z-type.h externs.h \64 object/tvalsval.h cmds.h ui-menu.h62 option.h types.h object/constants.h object/types.h object/object.h \ 63 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 64 externs.h object/tvalsval.h cmds.h game-cmd.h ui-menu.h 65 65 ./cmd5.o: cmd5.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 66 66 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 67 option.h types.h object/types.h object/object.h monster/types.h \ 68 player/types.h player/player.h store.h ui.h z-type.h externs.h \ 69 object/tvalsval.h 70 ./cmd6.o: cmd6.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 71 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 72 option.h types.h object/types.h object/object.h monster/types.h \ 73 player/types.h player/player.h store.h ui.h z-type.h externs.h \ 74 object/tvalsval.h cmds.h effects.h list-effects.h 67 option.h types.h object/constants.h object/types.h object/object.h \ 68 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 69 externs.h object/tvalsval.h game-cmd.h 75 70 ./cmd-know.o: cmd-know.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 76 71 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 77 defines.h option.h types.h object/ types.h object/object.h \78 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \79 externs.h object/tvalsval.h ui-menu.h72 defines.h option.h types.h object/constants.h object/types.h \ 73 object/object.h monster/types.h player/types.h player/player.h store.h \ 74 ui.h z-type.h externs.h object/tvalsval.h ui-menu.h 80 75 ./cmd-obj.o: cmd-obj.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 81 76 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 82 defines.h option.h types.h object/types.h object/object.h \ 83 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 84 externs.h object/tvalsval.h cmds.h 77 defines.h option.h types.h object/constants.h object/types.h \ 78 object/object.h monster/types.h player/types.h player/player.h store.h \ 79 ui.h z-type.h externs.h object/tvalsval.h game-cmd.h cmds.h effects.h \ 80 list-effects.h 85 81 ./death.o: death.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 86 82 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 87 option.h types.h object/ types.h object/object.h monster/types.h \88 player/types.h player/player.h store.h ui.h z-type.h externs.h \89 ui-menu.h cmds.h wizard.h83 option.h types.h object/constants.h object/types.h object/object.h \ 84 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 85 externs.h ui-menu.h cmds.h game-cmd.h wizard.h 90 86 ./debug.o: debug.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 91 87 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 92 option.h types.h object/types.h object/object.h monster/types.h \ 93 player/types.h player/player.h store.h ui.h z-type.h externs.h debug.h 88 option.h types.h object/constants.h object/types.h object/object.h \ 89 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 90 externs.h debug.h 94 91 ./dungeon.o: dungeon.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 95 92 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 96 defines.h option.h types.h object/types.h object/object.h \ 97 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 98 externs.h object/tvalsval.h cmds.h game-event.h 93 defines.h option.h types.h object/constants.h object/types.h \ 94 object/object.h monster/types.h player/types.h player/player.h store.h \ 95 ui.h z-type.h externs.h object/tvalsval.h cmds.h game-cmd.h \ 96 game-event.h 99 97 ./effects.o: effects.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 100 98 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 object/ types.h object/object.h \102 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \103 externs.h effects.h list-effects.h99 defines.h option.h types.h object/constants.h object/types.h \ 100 object/object.h monster/types.h player/types.h player/player.h store.h \ 101 ui.h z-type.h externs.h effects.h list-effects.h 104 102 ./files.o: files.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 105 103 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 106 option.h types.h object/ types.h object/object.h monster/types.h \107 player/types.h player/player.h store.h ui.h z-type.h externs.h \108 object/tvalsval.h ui-menu.h cmds.h104 option.h types.h object/constants.h object/types.h object/object.h \ 105 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 106 externs.h object/tvalsval.h ui-menu.h game-cmd.h cmds.h 109 107 ./game-cmd.o: game-cmd.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 110 108 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 object/ types.h object/object.h \112 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \113 externs.h game-cmd.h109 defines.h option.h types.h object/constants.h object/types.h \ 110 object/object.h monster/types.h player/types.h player/player.h store.h \ 111 ui.h z-type.h externs.h game-cmd.h cmds.h 114 112 ./game-event.o: game-event.c z-virt.h h-basic.h game-event.h 115 113 ./generate.o: generate.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 116 114 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 object/ types.h object/object.h \118 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \119 externs.h object/tvalsval.h115 defines.h option.h types.h object/constants.h object/types.h \ 116 object/object.h monster/types.h player/types.h player/player.h store.h \ 117 ui.h z-type.h externs.h object/tvalsval.h 120 118 ./history.o: history.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 121 119 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 122 defines.h option.h types.h object/types.h object/object.h \ 120 defines.h option.h types.h object/constants.h object/types.h \ 121 object/object.h monster/types.h player/types.h player/player.h store.h \ 122 ui.h z-type.h externs.h 123 ./init1.o: init1.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 124 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 125 option.h types.h object/constants.h object/types.h object/object.h \ 126 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 127 externs.h object/tvalsval.h effects.h list-effects.h \ 128 monster/constants.h init.h 129 ./init2.o: init2.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 130 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 131 option.h types.h object/constants.h object/types.h object/object.h \ 132 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 133 externs.h init.h cmds.h game-cmd.h game-event.h 134 ./load.o: load.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 135 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 136 option.h types.h object/constants.h object/types.h object/object.h \ 137 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 138 externs.h object/tvalsval.h savefile.h 139 ./load-old.o: load-old.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 140 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 141 defines.h option.h types.h object/constants.h object/types.h \ 142 object/object.h monster/types.h player/types.h player/player.h store.h \ 143 ui.h z-type.h externs.h object/tvalsval.h 144 ./monster/melee1.o: monster/melee1.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 145 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 146 defines.h option.h types.h object/constants.h object/types.h \ 147 object/object.h monster/types.h player/types.h player/player.h store.h \ 148 ui.h z-type.h externs.h object/tvalsval.h 149 ./monster/melee2.o: monster/melee2.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 150 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 151 defines.h option.h types.h object/constants.h object/types.h \ 152 object/object.h monster/types.h player/types.h player/player.h store.h \ 153 ui.h z-type.h externs.h bitflag.h object/tvalsval.h monster/constants.h 154 ./monster/monster1.o: monster/monster1.c angband.h h-basic.h z-file.h z-form.h \ 155 z-util.h z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h \ 156 config.h defines.h option.h types.h object/constants.h object/types.h \ 157 object/object.h monster/types.h player/types.h player/player.h store.h \ 158 ui.h z-type.h externs.h object/tvalsval.h 159 ./monster/monster2.o: monster/monster2.c angband.h h-basic.h z-file.h z-form.h \ 160 z-util.h z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h \ 161 config.h defines.h option.h types.h object/constants.h object/types.h \ 162 object/object.h monster/types.h player/types.h player/player.h store.h \ 163 ui.h z-type.h externs.h object/tvalsval.h 164 ./object/identify.o: object/identify.c angband.h h-basic.h z-file.h z-form.h \ 165 z-util.h z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h \ 166 config.h defines.h option.h types.h object/constants.h object/types.h \ 167 object/object.h monster/types.h player/types.h player/player.h store.h \ 168 ui.h z-type.h externs.h object/tvalsval.h 169 ./object/obj-desc.o: object/obj-desc.c angband.h h-basic.h z-file.h z-form.h \ 170 z-util.h z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h \ 171 config.h defines.h option.h types.h object/constants.h object/types.h \ 172 object/object.h monster/types.h player/types.h player/player.h store.h \ 173 ui.h z-type.h externs.h object/tvalsval.h 174 ./object/obj-info.o: object/obj-info.c angband.h h-basic.h z-file.h z-form.h \ 175 z-util.h z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h \ 176 config.h defines.h option.h types.h object/constants.h object/types.h \ 177 object/object.h monster/types.h player/types.h player/player.h store.h \ 178 ui.h z-type.h externs.h effects.h list-effects.h cmds.h game-cmd.h \ 179 object/tvalsval.h 180 ./object/obj-make.o: object/obj-make.c angband.h h-basic.h z-file.h z-form.h \ 181 z-util.h z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h \ 182 config.h defines.h option.h types.h object/constants.h object/types.h \ 183 object/object.h monster/types.h player/types.h player/player.h store.h \ 184 ui.h z-type.h externs.h object/tvalsval.h 185 ./object/obj-power.o: object/obj-power.c angband.h h-basic.h z-file.h z-form.h \ 186 z-util.h z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h \ 187 config.h defines.h option.h types.h object/constants.h object/types.h \ 188 object/object.h monster/types.h player/types.h player/player.h store.h \ 189 ui.h z-type.h externs.h object/tvalsval.h init.h effects.h \ 190 list-effects.h 191 ./object/obj-ui.o: object/obj-ui.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 192 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 193 defines.h option.h types.h object/constants.h object/types.h \ 194 object/object.h monster/types.h player/types.h player/player.h store.h \ 195 ui.h z-type.h externs.h object/tvalsval.h 196 ./object/obj-util.o: object/obj-util.c angband.h h-basic.h z-file.h z-form.h \ 197 z-util.h z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h \ 198 config.h defines.h option.h types.h object/constants.h object/types.h \ 199 object/object.h monster/types.h player/types.h player/player.h store.h \ 200 ui.h z-type.h externs.h randname.h object/tvalsval.h effects.h \ 201 list-effects.h 202 ./object/randart.o: object/randart.c angband.h h-basic.h z-file.h z-form.h \ 203 z-util.h z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h \ 204 config.h defines.h option.h types.h object/constants.h object/types.h \ 205 object/object.h monster/types.h player/types.h player/player.h store.h \ 206 ui.h z-type.h externs.h object/tvalsval.h init.h randname.h 207 ./option.o: option.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 208 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 209 defines.h option.h types.h object/constants.h object/types.h \ 210 object/object.h monster/types.h player/types.h player/player.h store.h \ 211 ui.h z-type.h externs.h 212 ./randname.o: randname.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 213 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 214 defines.h option.h types.h object/constants.h object/types.h \ 215 object/object.h monster/types.h player/types.h player/player.h store.h \ 216 ui.h z-type.h externs.h randname.h 217 ./pathfind.o: pathfind.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 218 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 219 defines.h option.h types.h object/constants.h object/types.h \ 220 object/object.h monster/types.h player/types.h player/player.h store.h \ 221 ui.h z-type.h externs.h 222 ./prefs.o: prefs.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 223 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 224 option.h types.h object/constants.h object/types.h object/object.h \ 123 225 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 124 226 externs.h 125 ./init1.o: init1.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 126 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 127 option.h types.h object/types.h object/object.h monster/types.h \ 128 player/types.h player/player.h store.h ui.h z-type.h externs.h \ 129 object/tvalsval.h effects.h list-effects.h monster/constants.h init.h 130 ./init2.o: init2.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 131 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 132 option.h types.h object/types.h object/object.h monster/types.h \ 133 player/types.h player/player.h store.h ui.h z-type.h externs.h init.h \ 134 cmds.h game-event.h game-cmd.h 135 ./load.o: load.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 136 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 137 option.h types.h object/types.h object/object.h monster/types.h \ 138 player/types.h player/player.h store.h ui.h z-type.h externs.h \ 139 object/tvalsval.h savefile.h 140 ./load-old.o: load-old.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 141 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 object/types.h object/object.h \ 143 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 144 externs.h object/tvalsval.h 145 ./monster/melee1.o: monster/melee1.c angband.h h-basic.h z-file.h h-basic.h \ 146 z-form.h h-basic.h z-util.h h-basic.h z-virt.h h-basic.h z-rand.h \ 147 h-basic.h z-term.h h-basic.h ui-event.h z-quark.h z-msg.h h-basic.h \ 148 config.h defines.h option.h types.h object/types.h object/object.h \ 149 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 150 externs.h object/tvalsval.h 151 ./monster/melee2.o: monster/melee2.c angband.h h-basic.h z-file.h h-basic.h \ 152 z-form.h h-basic.h z-util.h h-basic.h z-virt.h h-basic.h z-rand.h \ 153 h-basic.h z-term.h h-basic.h ui-event.h z-quark.h z-msg.h h-basic.h \ 154 config.h defines.h option.h types.h object/types.h object/object.h \ 155 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 156 externs.h bitflag.h object/tvalsval.h monster/constants.h 157 ./monster/monster1.o: monster/monster1.c angband.h h-basic.h z-file.h h-basic.h \ 158 z-form.h h-basic.h z-util.h h-basic.h z-virt.h h-basic.h z-rand.h \ 159 h-basic.h z-term.h h-basic.h ui-event.h z-quark.h z-msg.h h-basic.h \ 160 config.h defines.h option.h types.h object/types.h object/object.h \ 161 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 162 externs.h object/tvalsval.h 163 ./monster/monster2.o: monster/monster2.c angband.h h-basic.h z-file.h h-basic.h \ 164 z-form.h h-basic.h z-util.h h-basic.h z-virt.h h-basic.h z-rand.h \ 165 h-basic.h z-term.h h-basic.h ui-event.h z-quark.h z-msg.h h-basic.h \ 166 config.h defines.h option.h types.h object/types.h object/object.h \ 167 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 168 externs.h object/tvalsval.h 169 ./object/identify.o: object/identify.c angband.h h-basic.h z-file.h h-basic.h \ 170 z-form.h h-basic.h z-util.h h-basic.h z-virt.h h-basic.h z-rand.h \ 171 h-basic.h z-term.h h-basic.h ui-event.h z-quark.h z-msg.h h-basic.h \ 172 config.h defines.h option.h types.h object/types.h object/object.h \ 173 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 174 externs.h object/tvalsval.h 175 ./object/obj-desc.o: object/obj-desc.c angband.h h-basic.h z-file.h h-basic.h \ 176 z-form.h h-basic.h z-util.h h-basic.h z-virt.h h-basic.h z-rand.h \ 177 h-basic.h z-term.h h-basic.h ui-event.h z-quark.h z-msg.h h-basic.h \ 178 config.h defines.h option.h types.h object/types.h object/object.h \ 179 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 180 externs.h object/tvalsval.h 181 ./object/obj-info.o: object/obj-info.c angband.h h-basic.h z-file.h h-basic.h \ 182 z-form.h h-basic.h z-util.h h-basic.h z-virt.h h-basic.h z-rand.h \ 183 h-basic.h z-term.h h-basic.h ui-event.h z-quark.h z-msg.h h-basic.h \ 184 config.h defines.h option.h types.h object/types.h object/object.h \ 185 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 186 externs.h effects.h list-effects.h cmds.h object/tvalsval.h 187 ./object/obj-make.o: object/obj-make.c angband.h h-basic.h z-file.h h-basic.h \ 188 z-form.h h-basic.h z-util.h h-basic.h z-virt.h h-basic.h z-rand.h \ 189 h-basic.h z-term.h h-basic.h ui-event.h z-quark.h z-msg.h h-basic.h \ 190 config.h defines.h option.h types.h object/types.h object/object.h \ 191 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 192 externs.h object/tvalsval.h 193 ./object/obj-power.o: object/obj-power.c angband.h h-basic.h z-file.h h-basic.h \ 194 z-form.h h-basic.h z-util.h h-basic.h z-virt.h h-basic.h z-rand.h \ 195 h-basic.h z-term.h h-basic.h ui-event.h z-quark.h z-msg.h h-basic.h \ 196 config.h defines.h option.h types.h object/types.h object/object.h \ 197 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 198 externs.h object/tvalsval.h init.h h-basic.h 199 ./object/obj-ui.o: object/obj-ui.c angband.h h-basic.h z-file.h h-basic.h z-form.h \ 200 h-basic.h z-util.h h-basic.h z-virt.h h-basic.h z-rand.h h-basic.h \ 201 z-term.h h-basic.h ui-event.h z-quark.h z-msg.h h-basic.h config.h \ 202 defines.h option.h types.h object/types.h object/object.h \ 203 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 204 externs.h object/tvalsval.h 205 ./object/obj-util.o: object/obj-util.c angband.h h-basic.h z-file.h h-basic.h \ 206 z-form.h h-basic.h z-util.h h-basic.h z-virt.h h-basic.h z-rand.h \ 207 h-basic.h z-term.h h-basic.h ui-event.h z-quark.h z-msg.h h-basic.h \ 208 config.h defines.h option.h types.h object/types.h object/object.h \ 209 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 210 externs.h randname.h object/tvalsval.h 211 ./object/randart.o: object/randart.c angband.h h-basic.h z-file.h h-basic.h \ 212 z-form.h h-basic.h z-util.h h-basic.h z-virt.h h-basic.h z-rand.h \ 213 h-basic.h z-term.h h-basic.h ui-event.h z-quark.h z-msg.h h-basic.h \ 214 config.h defines.h option.h types.h object/types.h object/object.h \ 215 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 216 externs.h object/tvalsval.h init.h h-basic.h randname.h 217 ./option.o: option.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 218 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 219 defines.h option.h types.h object/types.h object/object.h \ 227 ./player/calcs.o: player/calcs.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 228 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 229 defines.h option.h types.h object/constants.h object/types.h \ 230 object/object.h monster/types.h player/types.h player/player.h store.h \ 231 ui.h z-type.h externs.h game-event.h object/tvalsval.h 232 ./player/timed.o: player/timed.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 233 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 234 defines.h option.h types.h object/constants.h object/types.h \ 235 object/object.h monster/types.h player/types.h player/player.h store.h \ 236 ui.h z-type.h externs.h 237 ./player/util.o: player/util.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 238 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 239 defines.h option.h types.h object/constants.h object/types.h \ 240 object/object.h monster/types.h player/types.h player/player.h store.h \ 241 ui.h z-type.h externs.h 242 ./score.o: score.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 243 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 244 option.h types.h object/constants.h object/types.h object/object.h \ 220 245 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 221 246 externs.h 222 ./randname.o: randname.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 223 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 224 defines.h option.h types.h object/types.h object/object.h \ 225 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 226 externs.h randname.h 227 ./pathfind.o: pathfind.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 228 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 229 defines.h option.h types.h object/types.h object/object.h \ 247 ./signals.o: signals.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 248 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 249 defines.h option.h types.h object/constants.h object/types.h \ 250 object/object.h monster/types.h player/types.h player/player.h store.h \ 251 ui.h z-type.h externs.h 252 ./save.o: save.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 253 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 254 option.h types.h object/constants.h object/types.h object/object.h \ 255 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 256 externs.h savefile.h 257 ./savefile.o: savefile.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 258 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 259 defines.h option.h types.h object/constants.h object/types.h \ 260 object/object.h monster/types.h player/types.h player/player.h store.h \ 261 ui.h z-type.h externs.h savefile.h 262 ./spells1.o: spells1.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 263 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 264 defines.h option.h types.h object/constants.h object/types.h \ 265 object/object.h monster/types.h player/types.h player/player.h store.h \ 266 ui.h z-type.h externs.h object/tvalsval.h monster/constants.h 267 ./spells2.o: spells2.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 268 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 269 defines.h option.h types.h object/constants.h object/types.h \ 270 object/object.h monster/types.h player/types.h player/player.h store.h \ 271 ui.h z-type.h externs.h object/tvalsval.h 272 ./squelch.o: squelch.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 273 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 274 defines.h option.h types.h object/constants.h object/types.h \ 275 object/object.h monster/types.h player/types.h player/player.h store.h \ 276 ui.h z-type.h externs.h cmds.h game-cmd.h ui-menu.h object/tvalsval.h 277 ./store.o: store.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 278 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 279 option.h types.h object/constants.h object/types.h object/object.h \ 280 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 281 externs.h cmds.h game-cmd.h ui-menu.h game-event.h object/tvalsval.h 282 ./tables.o: tables.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 283 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 284 defines.h option.h types.h object/constants.h object/types.h \ 285 object/object.h monster/types.h player/types.h player/player.h store.h \ 286 ui.h z-type.h externs.h object/tvalsval.h 287 ./target.o: target.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 288 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 289 defines.h option.h types.h object/constants.h object/types.h \ 290 object/object.h monster/types.h player/types.h player/player.h store.h \ 291 ui.h z-type.h externs.h game-cmd.h 292 ./trap.o: trap.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 293 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 294 option.h types.h object/constants.h object/types.h object/object.h \ 230 295 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 231 296 externs.h 232 ./prefs.o: prefs.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 233 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 234 option.h types.h object/types.h object/object.h monster/types.h \ 235 player/types.h player/player.h store.h ui.h z-type.h externs.h 236 ./player/calcs.o: player/calcs.c angband.h h-basic.h z-file.h h-basic.h z-form.h \ 237 h-basic.h z-util.h h-basic.h z-virt.h h-basic.h z-rand.h h-basic.h \ 238 z-term.h h-basic.h ui-event.h z-quark.h z-msg.h h-basic.h config.h \ 239 defines.h option.h types.h object/types.h object/object.h \ 240 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 241 externs.h game-event.h object/tvalsval.h 242 ./player/timed.o: player/timed.c angband.h h-basic.h z-file.h h-basic.h z-form.h \ 243 h-basic.h z-util.h h-basic.h z-virt.h h-basic.h z-rand.h h-basic.h \ 244 z-term.h h-basic.h ui-event.h z-quark.h z-msg.h h-basic.h config.h \ 245 defines.h option.h types.h object/types.h object/object.h \ 297 ./ui.o: ui.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 298 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 299 option.h types.h object/constants.h object/types.h object/object.h \ 246 300 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 247 301 externs.h 248 ./player/util.o: player/util.c angband.h h-basic.h z-file.h h-basic.h z-form.h \249 h-basic.h z-util.h h-basic.h z-virt.h h-basic.h z-rand.h h-basic.h \250 z-term.h h-basic.h ui-event.h z-quark.h z-msg.h h-basic.h config.h \251 defines.h option.h types.h object/types.h object/object.h \252 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \253 externs.h254 ./score.o: score.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \255 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \256 option.h types.h object/types.h object/object.h monster/types.h \257 player/types.h player/player.h store.h ui.h z-type.h externs.h258 ./signals.o: signals.c angband.h h-basic.h z-file.h z-form.h z-util.h \259 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \260 defines.h option.h types.h object/types.h object/object.h \261 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \262 externs.h263 ./save.o: save.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \264 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \265 option.h types.h object/types.h object/object.h monster/types.h \266 player/types.h player/player.h store.h ui.h z-type.h externs.h \267 savefile.h268 ./savefile.o: savefile.c angband.h h-basic.h z-file.h z-form.h z-util.h \269 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \270 defines.h option.h types.h object/types.h object/object.h \271 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \272 externs.h savefile.h273 ./spells1.o: spells1.c angband.h h-basic.h z-file.h z-form.h z-util.h \274 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \275 defines.h option.h types.h object/types.h object/object.h \276 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \277 externs.h object/tvalsval.h monster/constants.h278 ./spells2.o: spells2.c angband.h h-basic.h z-file.h z-form.h z-util.h \279 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \280 defines.h option.h types.h object/types.h object/object.h \281 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \282 externs.h object/tvalsval.h283 ./squelch.o: squelch.c angband.h h-basic.h z-file.h z-form.h z-util.h \284 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \285 defines.h option.h types.h object/types.h object/object.h \286 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \287 externs.h cmds.h ui-menu.h object/tvalsval.h288 ./store.o: store.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \289 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \290 option.h types.h object/types.h object/object.h monster/types.h \291 player/types.h player/player.h store.h ui.h z-type.h externs.h cmds.h \292 ui-menu.h game-event.h object/tvalsval.h293 ./tables.o: tables.c angband.h h-basic.h z-file.h z-form.h z-util.h \294 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \295 defines.h option.h types.h object/types.h object/object.h \296 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \297 externs.h object/tvalsval.h298 ./target.o: target.c angband.h h-basic.h z-file.h z-form.h z-util.h \299 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \300 defines.h option.h types.h object/types.h object/object.h \301 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \302 externs.h cmds.h303 ./trap.o: trap.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \304 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \305 option.h types.h object/types.h object/object.h monster/types.h \306 player/types.h player/player.h store.h ui.h z-type.h externs.h307 ./ui.o: ui.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \308 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \309 option.h types.h object/types.h object/object.h monster/types.h \310 player/types.h player/player.h store.h ui.h z-type.h externs.h311 302 ./ui-birth.o: ui-birth.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 312 303 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 313 defines.h option.h types.h object/types.h object/object.h \ 314 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 315 externs.h ui-menu.h ui-birth.h game-event.h game-cmd.h 304 defines.h option.h types.h object/constants.h object/types.h \ 305 object/object.h monster/types.h player/types.h player/player.h store.h \ 306 ui.h z-type.h externs.h ui-menu.h ui-birth.h game-event.h game-cmd.h \ 307 cmds.h 316 308 ./ui-event.o: ui-event.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 317 309 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 318 defines.h option.h types.h object/ types.h object/object.h \319 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \320 externs.h310 defines.h option.h types.h object/constants.h object/types.h \ 311 object/object.h monster/types.h player/types.h player/player.h store.h \ 312 ui.h z-type.h externs.h 321 313 ./ui-menu.o: ui-menu.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 322 314 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 323 defines.h option.h types.h object/ types.h object/object.h \324 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \325 externs.h ui-menu.h315 defines.h option.h types.h object/constants.h object/types.h \ 316 object/object.h monster/types.h player/types.h player/player.h store.h \ 317 ui.h z-type.h externs.h ui-menu.h 326 318 ./util.o: util.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 327 319 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 328 option.h types.h object/ types.h object/object.h monster/types.h \329 player/types.h player/player.h store.h ui.h z-type.h externs.h \330 game-event.h randname.h320 option.h types.h object/constants.h object/types.h object/object.h \ 321 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 322 externs.h game-event.h randname.h 331 323 ./variable.o: variable.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 332 324 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 333 defines.h option.h types.h object/ types.h object/object.h \334 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \335 externs.h325 defines.h option.h types.h object/constants.h object/types.h \ 326 object/object.h monster/types.h player/types.h player/player.h store.h \ 327 ui.h z-type.h externs.h 336 328 ./wiz-spoil.o: wiz-spoil.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 337 329 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 338 defines.h option.h types.h object/ types.h object/object.h \339 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \340 externs.h wizard.h cmds.h object/tvalsval.h330 defines.h option.h types.h object/constants.h object/types.h \ 331 object/object.h monster/types.h player/types.h player/player.h store.h \ 332 ui.h z-type.h externs.h wizard.h cmds.h game-cmd.h object/tvalsval.h 341 333 ./wiz-stats.o: wiz-stats.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 342 334 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 343 defines.h option.h types.h object/ types.h object/object.h \344 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \345 externs.h cmds.h wizard.h object/tvalsval.h335 defines.h option.h types.h object/constants.h object/types.h \ 336 object/object.h monster/types.h player/types.h player/player.h store.h \ 337 ui.h z-type.h externs.h cmds.h game-cmd.h wizard.h object/tvalsval.h 346 338 ./wizard.o: wizard.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 347 339 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 348 defines.h option.h types.h object/ types.h object/object.h \349 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \350 externs.h wizard.h cmds.h object/tvalsval.h340 defines.h option.h types.h object/constants.h object/types.h \ 341 object/object.h monster/types.h player/types.h player/player.h store.h \ 342 ui.h z-type.h externs.h wizard.h cmds.h game-cmd.h object/tvalsval.h 351 343 ./x-spell.o: x-spell.c angband.h h-basic.h z-file.h z-form.h z-util.h \ 352 344 z-virt.h z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h \ 353 defines.h option.h types.h object/ types.h object/object.h \354 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \355 externs.h effects.h list-effects.h object/tvalsval.h345 defines.h option.h types.h object/constants.h object/types.h \ 346 object/object.h monster/types.h player/types.h player/player.h store.h \ 347 ui.h z-type.h externs.h effects.h list-effects.h object/tvalsval.h 356 348 ./xtra2.o: xtra2.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 357 349 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 358 option.h types.h object/ types.h object/object.h monster/types.h \359 player/types.h player/player.h store.h ui.h z-type.h externs.h cmds.h \360 object/tvalsval.h350 option.h types.h object/constants.h object/types.h object/object.h \ 351 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 352 externs.h cmds.h game-cmd.h object/tvalsval.h 361 353 ./xtra3.o: xtra3.c angband.h h-basic.h z-file.h z-form.h z-util.h z-virt.h \ 362 354 z-rand.h z-term.h ui-event.h z-quark.h z-msg.h config.h defines.h \ 363 option.h types.h object/ types.h object/object.h monster/types.h \364 player/types.h player/player.h store.h ui.h z-type.h externs.h \365 game-event.h ui-birth.h object/tvalsval.h355 option.h types.h object/constants.h object/types.h object/object.h \ 356 monster/types.h player/types.h player/player.h store.h ui.h z-type.h \ 357 externs.h game-event.h game-cmd.h textui.h ui-birth.h object/tvalsval.h 366 358 ./z-file.o: z-file.c z-file.h h-basic.h z-virt.h z-util.h z-form.h 367 359 ./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
r1319 r1417 63 63 cmd4.o \ 64 64 cmd5.o \ 65 cmd6.o \66 65 cmd-know.o \ 67 66 cmd-obj.o \ -
trunk/src/attack.c
r1383 r1417 20 20 #include "object/object.h" 21 21 #include "object/tvalsval.h" 22 22 #include "game-cmd.h" 23 23 24 24 /** … … 465 465 * for the damage multiplier. 466 466 */ 467 void do_cmd_fire( void)467 void do_cmd_fire(cmd_code code, cmd_arg args[]) 468 468 { 469 469 int dir, item; … … 489 489 u16b path_g[256]; 490 490 491 cptr q, s;492 493 491 int msec = op_ptr->delay_factor * op_ptr->delay_factor; 494 492 495 496 /* Get the "bow" (if any) */ 493 /* Get item to fire and direction to fire in. */ 494 item = args[0].item; 495 dir = args[1].direction; 496 497 /* Get the object for the ammo */ 498 o_ptr = object_from_item_idx(item); 499 500 /* Get the "bow" */ 497 501 j_ptr = &inventory[INVEN_BOW]; 498 499 /* Require a usable launcher */500 if (!j_ptr->tval || !p_ptr->state.ammo_tval)501 {502 msg_print("You have nothing to fire with.");503 return;504 }505 506 507 /* Require proper missile */508 item_tester_tval = p_ptr->state.ammo_tval;509 510 /* Get an item */511 q = "Fire which item? ";512 s = "You have nothing to fire.";513 if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return;514 515 /* Get the object */516 if (item >= 0)517 {518 o_ptr = &inventory[item];519 }520 else521 {522 o_ptr = &o_list[0 - item];523 }524 525 /* Get a direction (or cancel) */526 if (!get_aim_dir(&dir)) return;527 502 528 503 /* Base range XXX XXX */ … … 760 735 } 761 736 762 737 void textui_cmd_fire(void) 738 { 739 object_type *j_ptr, *o_ptr; 740 int item; 741 int dir; 742 cptr q, s; 743 744 745 /* Get the "bow" (if any) */ 746 j_ptr = &inventory[INVEN_BOW]; 747 748 /* Require a usable launcher */ 749 if (!j_ptr->tval || !p_ptr->state.ammo_tval) 750 { 751 msg_print("You have nothing to fire with."); 752 return; 753 } 754 755 /* Require proper missile */ 756 item_tester_tval = p_ptr->state.ammo_tval; 757 758 /* Get an item */ 759 q = "Fire which item? "; 760 s = "You have nothing to fire."; 761 if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return; 762 763 /* Get the object */ 764 o_ptr = object_from_item_idx(item); 765 766 /* Get a direction (or cancel) */ 767 if (!get_aim_dir(&dir)) return; 768 769 cmd_insert(CMD_FIRE, item, dir); 770 } 763 771 764 772 /* … … 771 779 * the item to be destroyed? Should it do any damage at all? 772 780 */ 773 void do_cmd_throw( void)781 void do_cmd_throw(cmd_code code, cmd_arg args[]) 774 782 { 775 783 int dir, item; … … 794 802 u16b path_g[256]; 795 803 796 cptr q, s;797 798 804 int msec = op_ptr->delay_factor * op_ptr->delay_factor; 799 805 800 801 /* Get an item */ 802 q = "Throw which item? "; 803 s = "You have nothing to throw."; 804 if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return; 806 /* Get item to throw and direction in which to throw it. */ 807 item = args[0].item; 808 dir = args[1].direction; 805 809 806 810 /* Get the object */ 807 if (item >= 0) 808 { 809 o_ptr = &inventory[item]; 810 } 811 else 812 { 813 o_ptr = &o_list[0 - item]; 814 } 815 816 817 /* Get a direction (or cancel) */ 818 if (!get_aim_dir(&dir)) return; 819 811 o_ptr = object_from_item_idx(item); 820 812 821 813 /* Get local object */ … … 1047 1039 drop_near(i_ptr, j, y, x); 1048 1040 } 1041 1042 void textui_cmd_throw(void) 1043 { 1044 int item, dir; 1045 cptr q, s; 1046 1047 /* Get an item */ 1048 q = "Throw which item? "; 1049 s = "You have nothing to throw."; 1050 if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return; 1051 1052 /* Get a direction (or cancel) */ 1053 if (!get_aim_dir(&dir)) return; 1054 1055 cmd_insert(CMD_THROW, item, dir); 1056 } -
trunk/src/birth.c
r1401 r1417 1001 1001 { 1002 1002 int i; 1003 game_command cmd = { CMD_NULL, 0, { 0} };1003 game_command cmd = { CMD_NULL, 0, {{0}} }; 1004 1004 1005 1005 int stats[A_MAX]; … … 1060 1060 else if (cmd.command == CMD_CHOOSE_SEX) 1061 1061 { 1062 p_ptr->psex = cmd. params.choice;1062 p_ptr->psex = cmd.args[0].choice; 1063 1063 generate_player(); 1064 1064 } 1065 1065 else if (cmd.command == CMD_CHOOSE_RACE) 1066 1066 { 1067 p_ptr->prace = cmd. params.choice;1067 p_ptr->prace = cmd.args[0].choice; 1068 1068 generate_player(); 1069 1069 … … 1074 1074 else if (cmd.command == CMD_CHOOSE_CLASS) 1075 1075 { 1076 p_ptr->pclass = cmd. params.choice;1076 p_ptr->pclass = cmd.args[0].choice; 1077 1077 generate_player(); 1078 1078 … … 1085 1085 /* .choice is the stat to buy */ 1086 1086 if (!rolled_stats) 1087 buy_stat(cmd. params.choice, stats, points_spent, &points_left);1087 buy_stat(cmd.args[0].choice, stats, points_spent, &points_left); 1088 1088 } 1089 1089 else if (cmd.command == CMD_SELL_STAT) … … 1091 1091 /* .choice is the stat to sell */ 1092 1092 if (!rolled_stats) 1093 sell_stat(cmd. params.choice, stats, points_spent, &points_left);1093 sell_stat(cmd.args[0].choice, stats, points_spent, &points_left); 1094 1094 } 1095 1095 else if (cmd.command == CMD_RESET_STATS) … … 1098 1098 reset_stats(stats, points_spent, &points_left); 1099 1099 1100 if (cmd. params.choice)1100 if (cmd.args[0].choice) 1101 1101 generate_stats(stats, points_spent, &points_left); 1102 1102 … … 1157 1157 { 1158 1158 /* Set player name */ 1159 my_strcpy(op_ptr->full_name, cmd. params.string,1159 my_strcpy(op_ptr->full_name, cmd.args[0].string, 1160 1160 sizeof(op_ptr->full_name)); 1161 1161 1162 string_free((void *) cmd. params.string);1162 string_free((void *) cmd.args[0].string); 1163 1163 1164 1164 /* Don't change savefile name. If the UI … … 1167 1167 } 1168 1168 /* Various not-specific-to-birth commands. */ 1169 else if (cmd.command == CMD_OPTIONS)1170 {1171 /* TODO: Change this to use whatever sort of message passing1172 system we eventually decide on for options. That might1173 still be calling do_cmd_option. :) */1174 do_cmd_options();1175 }1176 1169 else if (cmd.command == CMD_HELP) 1177 1170 { -
trunk/src/cmd-obj.c
r1346 r1417 19 19 #include "angband.h" 20 20 #include "object/tvalsval.h" 21 #include "object/object.h" 22 #include "game-cmd.h" 21 23 #include "cmds.h" 24 #include "effects.h" 25 26 /*** Utility bits and bobs ***/ 27 /* 28 * Check to see if the player can use a rod/wand/staff/activatable object. 29 */ 30 static int check_devices(object_type *o_ptr) 31 { 32 int lev, chance; 33 const char *msg; 34 const char *what = NULL; 35 36 /* Get the right string */ 37 switch (o_ptr->tval) 38 { 39 case TV_ROD: msg = "zap the rod"; break; 40 case TV_WAND: msg = "use the wand"; what = "wand"; break; 41 case TV_STAFF: msg = "use the staff"; what = "staff"; break; 42 default: msg = "activate it"; break; 43 } 44 45 /* Extract the item level */ 46 if (artifact_p(o_ptr)) 47 lev = a_info[o_ptr->name1].level; 48 else 49 lev = k_info[o_ptr->k_idx].level; 50 51 /* Base chance of success */ 52 chance = p_ptr->state.skills[SKILL_DEVICE]; 53 54 /* Confusion hurts skill */ 55 if (p_ptr->timed[TMD_CONFUSED] || p_ptr->timed[TMD_AMNESIA]) 56 chance = chance / 2; 57 58 /* High level objects are harder */ 59 chance -= MIN(lev, 50); 60 61 /* Give everyone a (slight) chance */ 62 if ((chance < USE_DEVICE) && one_in_(USE_DEVICE - chance + 1)) 63 { 64 chance = USE_DEVICE; 65 } 66 67 /* Roll for usage */ 68 if ((chance < USE_DEVICE) || (randint1(chance) < USE_DEVICE)) 69 { 70 if (OPT(flush_failure)) flush(); 71 msg_format("You failed to %s properly.", msg); 72 return FALSE; 73 } 74 75 /* Notice empty staffs */ 76 if (what && o_ptr->pval <= 0) 77 { 78 if (OPT(flush_failure)) flush(); 79 msg_format("The %s has no charges left.", what); 80 o_ptr->ident |= (IDENT_EMPTY); 81 return FALSE; 82 } 83 84 return TRUE; 85 } 86 87 /* 88 * Return the chance of an effect beaming, given a tval. 89 */ 90 static int beam_chance(int tval) 91 { 92 switch (tval) 93 { 94 case TV_WAND: return 20; 95 case TV_ROD: return 10; 96 } 97 98 return 0; 99 } 100 101 102 typedef enum { 103 ART_TAG_NONE, 104 ART_TAG_NAME, 105 ART_TAG_KIND, 106 ART_TAG_VERB, 107 ART_TAG_VERB_IS 108 } art_tag_t; 109 110 static art_tag_t art_tag_lookup(const char *tag) 111 { 112 if (strncmp(tag, "name", 4) == 0) 113 return ART_TAG_NAME; 114 else if (strncmp(tag, "kind", 4) == 0) 115 return ART_TAG_KIND; 116 else if (strncmp(tag, "s", 1) == 0) 117 return ART_TAG_VERB; 118 else if (strncmp(tag, "is", 2) == 0) 119 return ART_TAG_VERB_IS; 120 else 121 return ART_TAG_NONE; 122 } 123 124 /* 125 * Print an artifact activation message. 126 * 127 * In order to support randarts, with scrambled names, we re-write 128 * the message to replace instances of {name} with the artifact name 129 * and instances of {kind} with the type of object. 130 * 131 * This code deals with plural and singular forms of verbs correctly 132 * when encountering {s}, though in fact both names and kinds are 133 * always singular in the current code (gloves are "Set of" and boots 134 * are "Pair of") 135 */ 136 static void activation_message(object_type *o_ptr, const char *message) 137 { 138 char buf[1024] = "\0"; 139 const char *next; 140 const char *s; 141 const char *tag; 142 const char *in_cursor; 143 size_t end = 0; 144 145 in_cursor = message; 146 147 next = strchr(in_cursor, '{'); 148 while (next) 149 { 150 /* Copy the text leading up to this { */ 151 strnfcat(buf, 1024, &end, "%.*s", next - in_cursor, in_cursor); 152 153 s = next + 1; 154 while (*s && isalpha((unsigned char) *s)) s++; 155 156 if (*s == '}') /* Valid tag */ 157 { 158 tag = next + 1; /* Start the tag after the { */ 159 in_cursor = s + 1; 160 161 switch(art_tag_lookup(tag)) 162 { 163 case ART_TAG_NAME: 164 end += object_desc(buf, 1024, o_ptr, TRUE, ODESC_BASE); 165 break; 166 case ART_TAG_KIND: 167 object_kind_name(&buf[end], 1024-end, o_ptr->k_idx, TRUE); 168 end += strlen(&buf[end]); 169 break; 170 case ART_TAG_VERB: 171 strnfcat(buf, 1024, &end, "s"); 172 break; 173 case ART_TAG_VERB_IS: 174 if((end > 2) && (buf[end-2] == 's')) 175 strnfcat(buf, 1024, &end, "are"); 176 else 177 strnfcat(buf, 1024, &end, "is"); 178 default: 179 break; 180 } 181 } 182 else /* An invalid tag, skip it */ 183 { 184 in_cursor = next + 1; 185 } 186 187 next = strchr(in_cursor, '{'); 188 } 189 strnfcat(buf, 1024, &end, in_cursor); 190 191 msg_print(buf); 192 } 193 22 194 23 195 24 196 /*** Inscriptions ***/ 25 197 26 /* Can has inscrip pls */27 static bool obj_has_inscrip(const object_type *o_ptr)28 {29 return (o_ptr->note ? TRUE : FALSE);30 }31 32 198 /* Remove inscription */ 33 static void obj_uninscribe(object_type *o_ptr, int item) 34 { 199 void do_cmd_uninscribe(cmd_code code, cmd_arg args[]) 200 { 201 object_type *o_ptr = object_from_item_idx(args[0].item); 202 35 203 o_ptr->note = 0; 36 204 msg_print("Inscription removed."); … … 41 209 42 210 /* Add inscription */ 211 void do_cmd_inscribe(cmd_code code, cmd_arg args[]) 212 { 213 object_type *o_ptr = object_from_item_idx(args[0].item); 214 215 o_ptr->note = quark_add(args[1].string); 216 217 p_ptr->notice |= (PN_COMBINE | PN_SQUELCH); 218 p_ptr->redraw |= (PR_INVEN | PR_EQUIP); 219 } 220 43 221 static void obj_inscribe(object_type *o_ptr, int item) 44 222 { … … 57 235 if (get_string("Inscription: ", tmp, sizeof(tmp))) 58 236 { 59 o_ptr->note = quark_add(tmp); 60 61 p_ptr->notice |= (PN_COMBINE | PN_SQUELCH); 62 p_ptr->redraw |= (PR_INVEN | PR_EQUIP); 237 cmd_insert(CMD_INSCRIBE, item, tmp); 63 238 } 64 239 } … … 85 260 /*** Taking off/putting on ***/ 86 261 87 /* Can only take off non-cursed items */88 static bool obj_can_takeoff(const object_type *o_ptr)89 {90 return !cursed_p(o_ptr);91 }92 93 /* Can only put on wieldable items */94 static bool obj_can_wear(const object_type *o_ptr)95 {96 return (wield_slot(o_ptr) >= INVEN_WIELD);97 }98 99 100 262 /* Take off an item */ 101 static void obj_takeoff(object_type *o_ptr, int item) 102 { 263 void do_cmd_takeoff(cmd_code code, cmd_arg args[]) 264 { 265 int item = args[0].item; 266 103 267 (void)inven_takeoff(item, 255); 104 268 p_ptr->energy_use = 50; … … 106 270 107 271 /* Wield or wear an item */ 108 static void obj_wear(object_type *o_ptr, int item)272 void do_cmd_wield(cmd_code code, cmd_arg args[]) 109 273 { 110 274 int slot; … … 114 278 115 279 unsigned n; 280 281 int item = args[0].item; 282 283 object_type *o_ptr = object_from_item_idx(item); 116 284 117 285 /* Check the slot */ … … 149 317 150 318 /* Drop an item */ 151 static void obj_drop(object_type *o_ptr, int item) 152 { 319 void do_cmd_drop(cmd_code code, cmd_arg args[]) 320 { 321 int item = args[0].item; 322 object_type *o_ptr = object_from_item_idx(item); 153 323 int amt; 154 324 … … 170 340 /*** Casting and browsing ***/ 171 341 172 static bool obj_can_browse(const object_type *o_ptr)173 {174 if (o_ptr->tval != cp_ptr->spell_book) return FALSE;175 return TRUE;176 }177 178 179 342 static bool obj_cast_pre(void) 180 343 { … … 226 389 static void obj_study(object_type *o_ptr, int item) 227 390 { 228 int spell;229 230 391 /* Track the object kind */ 231 392 object_kind_track(o_ptr->k_idx); 232 393 handle_stuff(); 233 394 234 /* Choose a spell to study */ 235 spell = spell_choose_new(o_ptr); 236 if (spell < 0) return; 237 238 /* Learn the spell */ 239 spell_learn(spell); 240 p_ptr->energy_use = 100; 395 /* Mage -- Choose a spell to study */ 396 if (cp_ptr->flags & CF_CHOOSE_SPELLS) 397 { 398 int spell = get_spell(o_ptr, "study", FALSE, FALSE); 399 if (spell >= 0) 400 cmd_insert(CMD_STUDY_SPELL, spell); 401 } 402 /* Priest -- Choose a book to study */ 403 else 404 { 405 cmd_insert(CMD_STUDY_BOOK, item); 406 } 241 407 } 242 408 243 409 /* Cast a spell from a book */ 410 void do_cmd_cast(cmd_code code, cmd_arg args[]) 411 { 412 int spell = args[0].choice; 413 414 /* Cast a spell */ 415 if (spell_cast(spell)) 416 p_ptr->energy_use = 100; 417 } 418 244 419 static void obj_cast(object_type *o_ptr, int item) 245 420 { … … 261 436 } 262 437 263 /* Cast a spell */ 264 if (spell_cast(spell)) 265 p_ptr->energy_use = 100; 438 cmd_insert(CMD_CAST, spell); 266 439 } 267 440 … … 299 472 } 300 473 301 /* Basic tval testers */ 302 static bool obj_is_staff(const object_type *o_ptr) { return o_ptr->tval == TV_STAFF; } 303 static bool obj_is_wand(const object_type *o_ptr) { return o_ptr->tval == TV_WAND; } 304 static bool obj_is_potion(const object_type *o_ptr) { return o_ptr->tval == TV_POTION; } 305 static bool obj_is_scroll(const object_type *o_ptr) { return o_ptr->tval == TV_SCROLL; } 306 static bool obj_is_food(const object_type *o_ptr) { return o_ptr->tval == TV_FOOD; } 307 308 /* Determine if an object is zappable */ 309 static bool obj_can_zap(const object_type *o_ptr) 310 { 311 const object_kind *k_ptr = &k_info[o_ptr->k_idx]; 312 if (o_ptr->tval != TV_ROD) return FALSE; 313 314 /* All still charging? */ 315 if (o_ptr->number <= (o_ptr->timeout + (k_ptr->time_base - 1)) / k_ptr->time_base) return FALSE; 316 317 /* Otherwise OK */ 318 return TRUE; 319 } 320 321 /* Determine if an object is activatable */ 322 static bool obj_can_activate(const object_type *o_ptr) 323 { 324 u32b f[OBJ_FLAG_N]; 325 326 /* Not known */ 327 if (!object_known_p(o_ptr)) return (FALSE); 328 329 /* Check the recharge */ 330 if (o_ptr->timeout) return (FALSE); 331 332 /* Extract the flags */ 333 object_flags(o_ptr, f); 334 335 /* Check activation flag */ 336 return (f[2] & TR2_ACTIVATE) ? TRUE : FALSE; 337 } 338 339 340 /* Use a staff */ 341 static void obj_use_staff(object_type *o_ptr, int item) 342 { 343 do_cmd_use(o_ptr, item, MSG_USE_STAFF, USE_CHARGE); 344 } 345 346 /* Aim a wand */ 347 static void obj_use_wand(object_type *o_ptr, int item) 348 { 349 do_cmd_use(o_ptr, item, MSG_ZAP_ROD, USE_CHARGE); 350 } 351 352 /* Zap a rod */ 353 static void obj_use_rod(object_type *o_ptr, int item) 354 { 355 do_cmd_use(o_ptr, item, MSG_ZAP_ROD, USE_TIMEOUT); 356 } 357 358 /* Activate a wielded object */ 359 static void obj_activate(object_type *o_ptr, int item) 360 { 361 do_cmd_use(o_ptr, item, MSG_ACT_ARTIFACT, USE_TIMEOUT); 362 } 363 364 /* Eat some food */ 365 static void obj_use_food(object_type *o_ptr, int item) 366 { 367 do_cmd_use(o_ptr, item, MSG_EAT, USE_SINGLE); 368 } 369 370 /* Quaff a potion (from the pack or the floor) */ 371 static void obj_use_potion(object_type *o_ptr, int item) 372 { 373 do_cmd_use(o_ptr, item, MSG_QUAFF, USE_SINGLE); 374 } 375 376 /* Read a scroll (from the pack or floor) */ 377 static void obj_use_scroll(object_type *o_ptr, int item) 378 { 379 do_cmd_use(o_ptr, item, MSG_GENERIC, USE_SINGLE); 474 475 /* 476 * Use an object the right way. 477 * 478 * There may be a BIG problem with any "effect" that can cause "changes" 479 * to the inventory. For example, a "scroll of recharging" can cause 480 * a wand/staff to "disappear", moving the inventory up. Luckily, the 481 * scrolls all appear BEFORE the staffs/wands, so this is not a problem. 482 * But, for example, a "staff of recharging" could cause MAJOR problems. 483 * In such a case, it will be best to either (1) "postpone" the effect 484 * until the end of the function, or (2) "change" the effect, say, into 485 * giving a staff "negative" charges, or "turning a staff into a stick". 486 * It seems as though a "rod of recharging" might in fact cause problems. 487 * The basic problem is that the act of recharging (and destroying) an 488 * item causes the inducer of that action to "move", causing "o_ptr" to 489 * no longer point at the correct item, with horrifying results. 490 */ 491 void do_cmd_use(cmd_code code, cmd_arg args[]) 492 { 493 int item = args[0].item; 494 object_type *o_ptr = object_from_item_idx(item); 495 int effect; 496 bool ident = FALSE, used; 497 bool was_aware = object_aware_p(o_ptr); 498 int dir = 5; 499 int px = p_ptr->px, py = p_ptr->py; 500 int snd; 501 use_type use; 502 503 /* Determine how this item is used. */ 504 if (obj_is_rod(o_ptr)) 505 { 506 use = USE_TIMEOUT; 507 snd = MSG_ZAP_ROD; 508 } 509 else if (obj_is_wand(o_ptr)) 510 { 511 use = USE_CHARGE; 512 snd = MSG_ZAP_ROD; 513 } 514 else if (obj_is_staff(o_ptr)) 515 { 516 use = USE_CHARGE; 517 snd = MSG_ZAP_ROD; 518 } 519 else if (obj_is_food(o_ptr)) 520 { 521 use = USE_SINGLE; 522 snd = MSG_EAT; 523 } 524 else if (obj_is_potion(o_ptr)) 525 { 526 use = USE_SINGLE; 527 snd = MSG_QUAFF; 528 } 529 else if (obj_is_scroll(o_ptr)) 530 { 531 use = USE_SINGLE; 532 snd = MSG_GENERIC; 533 } 534 else if (obj_can_activate(o_ptr)) 535 { 536 use = USE_TIMEOUT; 537 snd = MSG_ACT_ARTIFACT; 538 } 539 540 /* Figure out effect to use */ 541 if (o_ptr->name1) 542 effect = a_info[o_ptr->name1].effect; 543 else 544 effect = k_info[o_ptr->k_idx].effect; 545 546 /* If the item requires a direction, get one (allow cancelling) */ 547 if (obj_needs_aim(o_ptr)) 548 { 549 /* Get a direction, allow cancel */ 550 if (!get_aim_dir(&dir)) 551 return; 552 } 553 554 /* Use energy regardless of failure */ 555 p_ptr->energy_use = 100; 556 557 /* Check for use */ 558 if (use == USE_CHARGE || use == USE_TIMEOUT) 559 { 560 if (!check_devices(o_ptr)) 561 return; 562 } 563 564 /* Special message for artifacts */ 565 if (artifact_p(o_ptr)) 566 { 567 message(snd, 0, "You activate it."); 568 activation_message(o_ptr, a_text + a_info[o_ptr->name1].effect_msg); 569 } 570 else 571 { 572 /* Make a noise! */ 573 sound(snd); 574 } 575 576 /* A bit of a hack to make ID work better. 577 -- Check for "obvious" effects beforehand. */ 578 if (effect_obvious(effect)) object_aware(o_ptr); 579 580 /* Do effect */ 581 used = effect_do(effect, &ident, was_aware, dir, beam_chance(o_ptr->tval)); 582 583 /* Food feeds the player */ 584 if (o_ptr->tval == TV_FOOD || o_ptr->tval == TV_POTION) 585 (void)set_food(p_ptr->food + o_ptr->pval); 586 587 if (!used && !ident) return; 588 589 /* Mark as tried and redisplay */ 590 p_ptr->notice |= (PN_COMBINE | PN_REORDER); 591 p_ptr->redraw |= (PR_INVEN | PR_EQUIP); 592 593 594 /* 595 * If the player becomes aware of the item's function, then mark it as 596 * aware and reward the player with some experience. Otherwise, mark 597 * it as "tried". 598 */ 599 if (ident && !was_aware) 600 { 601 /* Object level */ 602 int lev = k_info[o_ptr->k_idx].level; 603 604 object_aware(o_ptr); 605 if (o_ptr->tval == TV_ROD) object_known(o_ptr); 606 gain_exp((lev + (p_ptr->lev / 2)) / p_ptr->lev); 607 p_ptr->notice |= PN_SQUELCH; 608 } 609 else 610 { 611 object_tried(o_ptr); 612 } 613 614 /* Chargeables act differently to single-used items when not used up */ 615 if (used && use == USE_CHARGE) 616 { 617 /* Use a single charge */ 618 o_ptr->pval--; 619 620 /* Describe charges */ 621 if (item >= 0) 622 inven_item_charges(item); 623 else 624 floor_item_charges(0 - item); 625 } 626 else if (used && use == USE_TIMEOUT) 627 { 628 /* Artifacts use their own special field */ 629 if (o_ptr->name1) 630 { 631 const artifact_type *a_ptr = &a_info[o_ptr->name1]; 632 o_ptr->timeout = a_ptr->time_base + damroll(a_ptr->time_dice, a_ptr->time_sides); 633 } 634 else 635 { 636 const object_kind *k_ptr = &k_info[o_ptr->k_idx]; 637 o_ptr->timeout += k_ptr->time_base + damroll(k_ptr->time_dice, k_ptr->time_sides); 638 } 639 } 640 else if (used && use == USE_SINGLE) 641 { 642 /* Destroy a potion in the pack */ 643 if (item >= 0) 644 { 645 inven_item_increase(item, -1); 646 inven_item_describe(item); 647 inven_item_optimize(item); 648 } 649 650 /* Destroy a potion on the floor */ 651 else 652 { 653 floor_item_increase(0 - item, -1); 654 floor_item_describe(0 - item); 655 floor_item_optimize(0 - item); 656 } 657 } 658 659 /* Hack to make Glyph of Warding work properly */ 660 if (cave_feat[py][px] == FEAT_GLYPH) 661 { 662 /* Shift any objects to further away */ 663 for (o_ptr = get_first_object(py, px); o_ptr; o_ptr = get_next_object(o_ptr)) 664 { 665 drop_near(o_ptr, 0, py, px); 666 } 667 668 /* Delete the "moved" objects from their original position */ 669 delete_object(py, px); 670 } 671 672 380 673 } 381 674 … … 405 698 } 406 699 407 static bool obj_can_refill(const object_type *o_ptr) 408 { 409 u32b f[OBJ_FLAG_N]; 410 const object_type *j_ptr = &inventory[INVEN_LITE]; 411 412 /* Get flags */ 413 object_flags(o_ptr, f); 414 415 if (j_ptr->sval == SV_LITE_LANTERN) 416 { 417 /* Flasks of oil are okay */ 418 if (o_ptr->tval == TV_FLASK) return (TRUE); 419 } 420 421 /* Non-empty, non-everburning sources are okay */ 422 if ((o_ptr->tval == TV_LITE) && 423 (o_ptr->sval == j_ptr->sval) && 424 (o_ptr->timeout > 0) && 425 !(f[2] & TR2_NO_FUEL)) 426 { 427 return (TRUE); 428 } 429 430 /* Assume not okay */ 431 return (FALSE); 432 } 433 434 static void obj_refill(object_type *o_ptr, int item) 700 void do_cmd_refill(cmd_code code, cmd_arg args[]) 435 701 { 436 702 object_type *j_ptr = &inventory[INVEN_LITE]; 703 int item = args[0].item; 704 object_type *o_ptr = object_from_item_idx(item); 437 705 p_ptr->energy_use = 50; 438 706 … … 448 716 449 717 450 451 718 /*** Handling bits ***/ 452 719 … … 455 722 { 456 723 void (*action)(object_type *, int); 724 cmd_code command; 457 725 const char *desc; 458 726 … … 472 740 * dangerous command to not be prompted, later. 473 741 */ 474 { obj_uninscribe, "uninscribe",742 { NULL, CMD_UNINSCRIBE, "uninscribe", 475 743 "Un-inscribe which item? ", "You have nothing to un-inscribe.", 476 744 obj_has_inscrip, (USE_EQUIP | USE_INVEN | USE_FLOOR), NULL }, 477 745 478 { obj_inscribe, "inscribe",746 { obj_inscribe, CMD_NULL, "inscribe", 479 747 "Inscribe which item? ", "You have nothing to inscribe.", 480 748 NULL, (USE_EQUIP | USE_INVEN | USE_FLOOR | IS_HARMLESS), NULL }, 481 749 482 { obj_examine, "examine",750 { obj_examine, CMD_NULL, "examine", 483 751 "Examine which item? ", "You have nothing to examine.", 484 752 NULL, (USE_EQUIP | USE_INVEN | USE_FLOOR | IS_HARMLESS), NULL }, 485 753 486 754 /*** Takeoff/drop/wear ***/ 487 { obj_takeoff, "takeoff",755 { NULL, CMD_TAKEOFF, "takeoff", 488 756 "Take off which item? ", "You are not wearing anything you can take off.", 489 757 obj_can_takeoff, USE_EQUIP, NULL }, 490 758 491 { obj_wear, "wield",759 { NULL, CMD_WIELD, "wield", 492 760 "Wear/Wield which item? ", "You have nothing you can wear or wield.", 493 761 obj_can_wear, (USE_INVEN | USE_FLOOR), NULL }, 494 762 495 { obj_drop, "drop",763 { NULL, CMD_DROP, "drop", 496 764 "Drop which item? ", "You have nothing to drop.", 497 765 NULL, (USE_EQUIP | USE_INVEN), NULL }, 498 766 499 767 /*** Spellbooks ***/ 500 { obj_browse, "browse",768 { obj_browse, CMD_NULL, "browse", 501 769 "Browse which book? ", "You have no books that you can read.", 502 770 obj_can_browse, (USE_INVEN | USE_FLOOR | IS_HARMLESS), NULL }, 503 771 504 { obj_study, "study",772 { obj_study, CMD_NULL, "study", 505 773 "Study which book? ", "You have no books that you can read.", 506 774 obj_can_browse, (USE_INVEN | USE_FLOOR), obj_study_pre }, 507 775 508 { obj_cast, "cast",776 { obj_cast, CMD_NULL, "cast", 509 777 "Use which book? ", "You have no books that you can read.", 510 778 obj_can_browse, (USE_INVEN | USE_FLOOR), obj_cast_pre }, 511 779 512 780 /*** Item usage ***/ 513 { obj_use_staff, "use",781 { NULL, CMD_USE_STAFF, "use", 514 782 "Use which staff? ", "You have no staff to use.", 515 783 obj_is_staff, (USE_INVEN | USE_FLOOR), NULL }, 516 784 517 { obj_use_wand, "aim",785 { NULL, CMD_USE_WAND, "aim", 518 786 "Aim which wand? ", "You have no wand to aim.", 519 787 obj_is_wand, (USE_INVEN | USE_FLOOR), NULL }, 520 788 521 { obj_use_rod, "zap",789 { NULL, CMD_USE_ROD, "zap", 522 790 "Zap which rod? ", "You have no charged rods to zap.", 523 791 obj_can_zap, (USE_INVEN | USE_FLOOR), NULL }, 524 792 525 { obj_activate, "activate",793 { NULL, CMD_ACTIVATE, "activate", 526 794 "Activate which item? ", "You have nothing to activate.", 527 795 obj_can_activate, USE_EQUIP, NULL }, 528 796 529 { obj_use_food, "eat",797 { NULL, CMD_EAT, "eat", 530 798 "Eat which item? ", "You have nothing to eat.", 531 799 obj_is_food, (USE_INVEN | USE_FLOOR), NULL }, 532 800 533 { obj_use_potion, "quaff",801 { NULL, CMD_QUAFF, "quaff", 534 802 "Quaff which potion? ", "You have no potions to quaff.", 535 803 obj_is_potion, (USE_INVEN | USE_FLOOR), NULL }, 536 804 537 { obj_use_scroll, "read",805 { NULL, CMD_READ_SCROLL, "read", 538 806 "Read which scroll? ", "You have no scrolls to read.", 539 807 obj_is_scroll, (USE_INVEN | USE_FLOOR), obj_read_pre }, 540 808 541 { obj_refill, "refill",809 { NULL, CMD_REFILL, "refill", 542 810 "Refuel with what fuel source? ", "You have nothing to refuel with.", 543 811 obj_can_refill, (USE_INVEN | USE_FLOOR), obj_refill_pre }, … … 594 862 595 863 /* Get the item */ 596 if (item >= 0) 597 o_ptr = &inventory[item]; 864 o_ptr = object_from_item_idx(item); 865 866 if (item_actions[act].action != NULL) 867 item_actions[act].action(o_ptr, item); 598 868 else 599 o_ptr = &o_list[0 - item]; 600 601 item_actions[act].action(o_ptr, item); 869 cmd_insert(item_actions[act].command, item); 602 870 } 603 871 604 872 /* Wrappers */ 605 void do_cmd_uninscribe(void) { do_item(ACTION_UNINSCRIBE); }606 void do_cmd_inscribe(void) { do_item(ACTION_INSCRIBE); }873 void textui_cmd_uninscribe(void) { do_item(ACTION_UNINSCRIBE); } 874 void textui_cmd_inscribe(void) { do_item(ACTION_INSCRIBE); } 607 875 void do_cmd_observe(void) { do_item(ACTION_EXAMINE); } 608 void do_cmd_takeoff(void) { do_item(ACTION_TAKEOFF); }609 void do_cmd_wield(void) { do_item(ACTION_WIELD); }610 void do_cmd_drop(void) { do_item(ACTION_DROP); }876 void textui_cmd_takeoff(void) { do_item(ACTION_TAKEOFF); } 877 void textui_cmd_wield(void) { do_item(ACTION_WIELD); } 878 void textui_cmd_drop(void) { do_item(ACTION_DROP); } 611 879 void do_cmd_browse(void) { do_item(ACTION_BROWSE); } 612 void do_cmd_study(void) { do_item(ACTION_STUDY); }613 void do_cmd_cast(void) { do_item(ACTION_CAST); }614 void do_cmd_pray(void) { do_item(ACTION_CAST); }615 void do_cmd_use_staff(void) { do_item(ACTION_USE_STAFF); }616 void do_cmd_aim_wand(void) { do_item(ACTION_AIM_WAND); }617 void do_cmd_zap_rod(void) { do_item(ACTION_ZAP_ROD); }618 void do_cmd_activate(void) { do_item(ACTION_ACTIVATE); }619 void do_cmd_eat_food(void) { do_item(ACTION_EAT_FOOD); }620 void do_cmd_quaff_potion(void) { do_item(ACTION_QUAFF_POTION); }621 void do_cmd_read_scroll(void) { do_item(ACTION_READ_SCROLL); }622 void do_cmd_refill(void) { do_item(ACTION_REFILL); }880 void textui_cmd_study(void) { do_item(ACTION_STUDY); } 881 void textui_cmd_cast(void) { do_item(ACTION_CAST); } 882 void textui_cmd_pray(void) { do_item(ACTION_CAST); } 883 void textui_cmd_use_staff(void) { do_item(ACTION_USE_STAFF); } 884 void textui_cmd_aim_wand(void) { do_item(ACTION_AIM_WAND); } 885 void textui_cmd_zap_rod(void) { do_item(ACTION_ZAP_ROD); } 886 void textui_cmd_activate(void) { do_item(ACTION_ACTIVATE); } 887 void textui_cmd_eat_food(void) { do_item(ACTION_EAT_FOOD); } 888 void textui_cmd_quaff_potion(void) { do_item(ACTION_QUAFF_POTION); } 889 void textui_cmd_read_scroll(void) { do_item(ACTION_READ_SCROLL); } 890 void textui_cmd_refill(void) { do_item(ACTION_REFILL); } -
trunk/src/cmd0.c
r1249 r1417 20 20 #include "cmds.h" 21 21 #include "ui-menu.h" 22 22 #include "game-cmd.h" 23 23 24 24 /* … … 40 40 /* Forward declare these, because they're really defined later */ 41 41 static do_cmd_type do_cmd_wizard, do_cmd_try_debug, 42 do_cmd_ quit, do_cmd_mouseclick, do_cmd_port,42 do_cmd_mouseclick, do_cmd_port, 43 43 do_cmd_xxx_options, do_cmd_menu, do_cmd_monlist, do_cmd_itemlist; 44 44 … … 48 48 49 49 /* 50 * Holds a generic command. 50 * Holds a generic command - if cmd is set to other than CMD_NULL 51 * it simply pushes that command to the game, otherwise the hook 52 * function will be called. 51 53 */ 52 54 typedef struct … … 54 56 const char *desc; 55 57 unsigned char key; 58 cmd_code cmd; 56 59 do_cmd_type *hook; 57 60 } command_type; 58 61 59 60 62 /* Magic use */ 61 63 static command_type cmd_magic[] = 62 64 { 63 { "Gain new spells or prayers", 'G', do_cmd_study },64 { "Browse a book", 'b', do_cmd_browse },65 { "Cast a spell", 'm', do_cmd_cast },66 { "Pray a prayer", 'p', do_cmd_pray }65 { "Gain new spells or prayers", 'G', CMD_NULL, textui_cmd_study }, 66 { "Browse a book", 'b', CMD_NULL, do_cmd_browse }, 67 { "Cast a spell", 'm', CMD_NULL, textui_cmd_cast }, 68 { "Pray a prayer", 'p', CMD_NULL, textui_cmd_pray } 67 69 }; 68 70 … … 70 72 static command_type cmd_action[] = 71 73 { 72 { "Search for traps/doors", 's', do_cmd_search},73 { "Disarm a trap or chest", 'D', do_cmd_disarm },74 { "Rest for a while", 'R', do_cmd_rest },75 { "Look around", 'l', do_cmd_look },76 { "Target monster or location", '*', do_cmd_target },77 { "Dig a tunnel", 'T', do_cmd_tunnel },78 { "Go up staircase", '<', do_cmd_go_up},79 { "Go down staircase", '>', do_cmd_go_down},80 { "Toggle search mode", 'S', do_cmd_toggle_search},81 { "Open a door or a chest", 'o', do_cmd_open },82 { "Close a door", 'c', do_cmd_close },83 { "Jam a door shut", 'j', do_cmd_spike },84 { "Bash a door open", 'B', do_cmd_bash }74 { "Search for traps/doors", 's', CMD_SEARCH, NULL }, 75 { "Disarm a trap or chest", 'D', CMD_NULL, textui_cmd_disarm }, 76 { "Rest for a while", 'R', CMD_NULL, textui_cmd_rest }, 77 { "Look around", 'l', CMD_NULL, do_cmd_look }, 78 { "Target monster or location", '*', CMD_NULL, do_cmd_target }, 79 { "Dig a tunnel", 'T', CMD_NULL, textui_cmd_tunnel }, 80 { "Go up staircase", '<', CMD_GO_UP, NULL }, 81 { "Go down staircase", '>', CMD_GO_DOWN, NULL }, 82 { "Toggle search mode", 'S', CMD_TOGGLE_SEARCH, NULL }, 83 { "Open a door or a chest", 'o', CMD_NULL, textui_cmd_open }, 84 { "Close a door", 'c', CMD_NULL, textui_cmd_close }, 85 { "Jam a door shut", 'j', CMD_NULL, textui_cmd_spike }, 86 { "Bash a door open", 'B', CMD_NULL, textui_cmd_bash } 85 87 }; 86 88 … … 88 90 static command_type cmd_item_use[] = 89 91 { 90 { "Read a scroll", 'r', do_cmd_read_scroll },91 { "Quaff a potion", 'q', do_cmd_quaff_potion },92 { "Use a staff", 'u', do_cmd_use_staff },93 { "Aim a wand", 'a', do_cmd_aim_wand },94 { "Zap a rod", 'z', do_cmd_zap_rod },95 { "Activate an object", 'A', do_cmd_activate },96 { "Eat some food", 'E', do_cmd_eat_food },97 { "Fuel your light source", 'F', do_cmd_refill },98 { "Fire your missile weapon", 'f', do_cmd_fire },99 { "Throw an item", 'v', do_cmd_throw }92 { "Read a scroll", 'r', CMD_NULL, textui_cmd_read_scroll }, 93 { "Quaff a potion", 'q', CMD_NULL, textui_cmd_quaff_potion }, 94 { "Use a staff", 'u', CMD_NULL, textui_cmd_use_staff }, 95 { "Aim a wand", 'a', CMD_NULL, textui_cmd_aim_wand }, 96 { "Zap a rod", 'z', CMD_NULL, textui_cmd_zap_rod }, 97 { "Activate an object", 'A', CMD_NULL, textui_cmd_activate }, 98 { "Eat some food", 'E', CMD_NULL, textui_cmd_eat_food }, 99 { "Fuel your light source", 'F', CMD_NULL, textui_cmd_refill }, 100 { "Fire your missile weapon", 'f', CMD_NULL, textui_cmd_fire }, 101 { "Throw an item", 'v', CMD_NULL, textui_cmd_throw } 100 102 }; 101 103 102 104 /* Item management commands */ 103 static command_type cmd_item_manage[] =104 { 105 { "Display equipment listing", 'e', do_cmd_equip },106 { "Display inventory listing", 'i', do_cmd_inven },107 { "Pick up objects", 'g', do_cmd_pickup},108 { "Wear/wield an item", 'w', do_cmd_wield },109 { "Take/unwield off an item", 't', do_cmd_takeoff },110 { "Drop an item", 'd', do_cmd_drop },111 { "Destroy an item", 'k', do_cmd_destroy },112 { "Examine an item", 'I', do_cmd_observe },113 { "Inscribe an object", '{', do_cmd_inscribe },114 { "Uninscribe an object", '}', do_cmd_uninscribe }105 static command_type cmd_item_manage[] = 106 { 107 { "Display equipment listing", 'e', CMD_NULL, do_cmd_equip }, 108 { "Display inventory listing", 'i', CMD_NULL, do_cmd_inven }, 109 { "Pick up objects", 'g', CMD_PICKUP, NULL }, 110 { "Wear/wield an item", 'w', CMD_NULL, textui_cmd_wield }, 111 { "Take/unwield off an item", 't', CMD_NULL, textui_cmd_takeoff }, 112 { "Drop an item", 'd', CMD_NULL, textui_cmd_drop }, 113 { "Destroy an item", 'k', CMD_NULL, textui_cmd_destroy }, 114 { "Examine an item", 'I', CMD_NULL, do_cmd_observe }, 115 { "Inscribe an object", '{', CMD_NULL, textui_cmd_inscribe }, 116 { "Uninscribe an object", '}', CMD_NULL, textui_cmd_uninscribe } 115 117 }; 116 118 … … 118 120 static command_type cmd_info[] = 119 121 { 120 { "Full dungeon map", 'M', do_cmd_view_map },121 { "Display visible item list", ']', do_cmd_itemlist },122 { "Display visible monster list", '[', do_cmd_monlist },123 { "Locate player on map", 'L', do_cmd_locate },124 { "Help", '?', do_cmd_help },125 { "Identify symbol", '/', do_cmd_query_symbol },126 { "Character description", 'C', do_cmd_change_name },127 { "Check knowledge", '~', do_cmd_knowledge },128 { "Repeat level feeling", KTRL('F'), do_cmd_feeling },129 { "Show previous message", KTRL('O'), do_cmd_message_one },130 { "Show previous messages", KTRL('P'), do_cmd_messages }122 { "Full dungeon map", 'M', CMD_NULL, do_cmd_view_map }, 123 { "Display visible item list", ']', CMD_NULL, do_cmd_itemlist }, 124 { "Display visible monster list", '[', CMD_NULL, do_cmd_monlist }, 125 { "Locate player on map", 'L', CMD_NULL, do_cmd_locate }, 126 { "Help", '?', CMD_NULL, do_cmd_help }, 127 { "Identify symbol", '/', CMD_NULL, do_cmd_query_symbol }, 128 { "Character description", 'C', CMD_NULL, do_cmd_change_name }, 129 { "Check knowledge", '~', CMD_NULL, do_cmd_knowledge }, 130 { "Repeat level feeling", KTRL('F'), CMD_NULL, do_cmd_feeling }, 131 { "Show previous message", KTRL('O'), CMD_NULL, do_cmd_message_one }, 132 { "Show previous messages", KTRL('P'), CMD_NULL, do_cmd_messages } 131 133 }; 132 134 … … 134 136 static command_type cmd_util[] = 135 137 { 136 { "Interact with options", '=', do_cmd_xxx_options },137 { "Port-specific preferences", '!', do_cmd_port },138 139 { "Save and don't quit", KTRL('S'), do_cmd_save_game},140 { "Save and quit", KTRL('X'), do_cmd_quit},141 { "Quit (commit suicide)", 'Q', do_cmd_suicide },142 { "Redraw the screen", KTRL('R'), do_cmd_redraw },143 144 { "Load \"screen dump\"", '(', do_cmd_load_screen },145 { "Save \"screen dump\"", ')', do_cmd_save_screen }138 { "Interact with options", '=', CMD_NULL, do_cmd_xxx_options }, 139 { "Port-specific preferences", '!', CMD_NULL, do_cmd_port }, 140 141 { "Save and don't quit", KTRL('S'), CMD_SAVE, NULL }, 142 { "Save and quit", KTRL('X'), CMD_QUIT, NULL }, 143 { "Quit (commit suicide)", 'Q', CMD_NULL, textui_cmd_suicide }, 144 { "Redraw the screen", KTRL('R'), CMD_NULL, do_cmd_redraw }, 145 146 { "Load \"screen dump\"", '(', CMD_NULL, do_cmd_load_screen }, 147 { "Save \"screen dump\"", ')', CMD_NULL, do_cmd_save_screen } 146 148 }; 147 149 … … 149 151 static command_type cmd_hidden[] = 150 152 { 151 { "Take notes", ':', do_cmd_note },152 { "Version info", 'V', do_cmd_version },153 { "Load a single pref line", '"', do_cmd_pref },154 { "Mouse click", '\xff', do_cmd_mouseclick },155 { "Enter a store", '_', do_cmd_store},156 { "Toggle windows", KTRL('E'), toggle_inven_equip }, /* XXX */157 { "Alter a grid", '+', do_cmd_alter },158 { "Walk", ';', do_cmd_walk },159 { "Jump into a trap", '-', do_cmd_jump },160 { "Start running", '.', do_cmd_run },161 { "Stand still", ',', do_cmd_hold},162 { "Check knowledge", '|', do_cmd_knowledge },163 { "Display menu of actions", '\n', do_cmd_menu },164 { "Display menu of actions", '\r', do_cmd_menu },165 166 { "Toggle wizard mode", KTRL('W'), do_cmd_wizard },153 { "Take notes", ':', CMD_NULL, do_cmd_note }, 154 { "Version info", 'V', CMD_NULL, do_cmd_version }, 155 { "Load a single pref line", '"', CMD_NULL, do_cmd_pref }, 156 { "Mouse click", '\xff', CMD_NULL, do_cmd_mouseclick }, 157 { "Enter a store", '_', CMD_ENTER_STORE, NULL }, 158 { "Toggle windows", KTRL('E'), CMD_NULL, toggle_inven_equip }, /* XXX */ 159 { "Alter a grid", '+', CMD_NULL, textui_cmd_alter }, 160 { "Walk", ';', CMD_NULL, textui_cmd_walk }, 161 { "Jump into a trap", '-', CMD_NULL, textui_cmd_jump }, 162 { "Start running", '.', CMD_NULL, textui_cmd_run }, 163 { "Stand still", ',', CMD_HOLD, NULL }, 164 { "Check knowledge", '|', CMD_NULL, do_cmd_knowledge }, 165 { "Display menu of actions", '\n', CMD_NULL, do_cmd_menu }, 166 { "Display menu of actions", '\r', CMD_NULL, do_cmd_menu }, 167 168 { "Toggle wizard mode", KTRL('W'), CMD_NULL, do_cmd_wizard }, 167 169 168 170 #ifdef ALLOW_DEBUG 169 { "Debug mode commands", KTRL('A'), do_cmd_try_debug },171 { "Debug mode commands", KTRL('A'), CMD_NULL, do_cmd_try_debug }, 170 172 #endif 171 173 #ifdef ALLOW_BORG 172 { "Borg commands", KTRL('Z'), do_cmd_try_borg }174 { "Borg commands", KTRL('Z'), CMD_NULL, do_cmd_try_borg } 173 175 #endif 174 176 }; … … 308 310 * Quit the game. 309 311 */ 310 static void do_cmd_quit(void)312 void do_cmd_quit(cmd_code code, cmd_arg args[]) 311 313 { 312 314 /* Stop playing */ … … 336 338 if ((p_ptr->py == y) && (p_ptr->px == x) /* && (p_ptr->command_cmd_ex.mousebutton) */) 337 339 { 338 do_cmd_rest();340 textui_cmd_rest(); 339 341 } 340 342 else /* if (p_ptr->command_cmd_ex.mousebutton == 1) */ … … 342 344 if (p_ptr->timed[TMD_CONFUSED]) 343 345 { 344 do_cmd_walk();346 cmd_insert(CMD_WALK, DIR_UNKNOWN); 345 347 } 346 348 else 347 349 { 348 do_cmd_pathfind(y, x);350 cmd_insert(CMD_PATHFIND, y, x); 349 351 } 350 352 } … … 426 428 427 429 /* List indexed by char */ 428 do_cmd_type *converted_list[UCHAR_MAX+1]; 430 struct { 431 do_cmd_type *hook; 432 cmd_code cmd; 433 } converted_list[UCHAR_MAX+1]; 429 434 430 435 … … 552 557 ui_event_data evt; 553 558 int cursor = 0; 554 command_type chosen_command = { NULL , 0, NULL};559 command_type chosen_command = { NULL }; 555 560 556 561 /* Set up the menu */ … … 572 577 573 578 /* If a command was chosen, do it. */ 574 if (chosen_command.hook) 579 if (chosen_command.cmd != CMD_NULL) 580 { 581 cmd_insert(chosen_command.cmd); 582 } 583 else if (chosen_command.hook) 575 584 { 576 585 chosen_command.hook(); … … 600 609 /* Note: at present converted_list is UCHAR_MAX + 1 601 610 large, so 'key' is always a valid index. */ 602 converted_list[key] = commands[i].hook; 611 converted_list[key].hook = commands[i].hook; 612 converted_list[key].cmd = commands[i].cmd; 603 613 } 604 614 } … … 619 629 default: 620 630 { 621 if (!converted_list[i]) 622 converted_list[i] = do_cmd_unknown; 631 if (!converted_list[i].hook && !converted_list[i].cmd) 632 { 633 converted_list[i].hook = do_cmd_unknown; 634 converted_list[i].cmd = CMD_NULL; 635 } 623 636 } 624 637 } … … 631 644 * Give "Warning" on illegal commands. 632 645 */ 633 void process_command(bool no_request)646 void textui_process_command(bool no_request) 634 647 { 635 648 if (!no_request) … … 648 661 /* Within these boundaries, the cast to unsigned char will have the desired effect */ 649 662 assert(p_ptr->command_cmd >= CHAR_MIN && p_ptr->command_cmd <= CHAR_MAX); 650 651 663 /* Execute the command */ 652 if (converted_list[(unsigned char) p_ptr->command_cmd]) 653 converted_list[(unsigned char) p_ptr->command_cmd](); 654 } 655 } 664 if (converted_list[(unsigned char) p_ptr->command_cmd].cmd != CMD_NULL) 665 cmd_insert(converted_list[(unsigned char) p_ptr->command_cmd].cmd); 666 667 else if (converted_list[(unsigned char) p_ptr->command_cmd].hook) 668 converted_list[(unsigned char) p_ptr->command_cmd].hook(); 669 } 670 } -
trunk/src/cmd1.c
r1349 r1417 573 573 } 574 574 575 do_cmd_alter ();575 do_cmd_alter_aux(dir); 576 576 } 577 577 … … 673 673 /* Disturb */ 674 674 disturb(0, 0); 675 676 /* Hack -- Enter store */ 677 p_ptr->command_new = '_'; 675 cmd_insert(CMD_ENTER_STORE); 678 676 } 679 677 -
trunk/src/cmd2.c
r1380 r1417 20 20 21 21 #include "cmds.h" 22 #include "game-cmd.h" 22 23 23 24 /* 24 25 * Go up one level 25 26 */ 26 void do_cmd_go_up( void)27 void do_cmd_go_up(cmd_code code, cmd_arg args[]) 27 28 { 28 29 /* Verify stairs */ … … 58 59 * Go down one level 59 60 */ 60 void do_cmd_go_down( void)61 void do_cmd_go_down(cmd_code code, cmd_arg args[]) 61 62 { 62 63 /* Verify stairs */ … … 86 87 * Simple command to "search" for one turn 87 88 */ 88 void do_cmd_search( void)89 void do_cmd_search(cmd_code code, cmd_arg args[]) 89 90 { 90 91 /* Allow repeated command */ … … 102 103 * Hack -- toggle search mode 103 104 */ 104 void do_cmd_toggle_search( void)105 void do_cmd_toggle_search(cmd_code code, cmd_arg args[]) 105 106 { 106 107 /* Stop searching */ … … 730 731 * Unlocking a locked door/chest is worth one experience point. 731 732 */ 732 void do_cmd_open( void)733 void do_cmd_open(cmd_code code, cmd_arg args[]) 733 734 { 734 735 int y, x, dir; … … 738 739 bool more = FALSE; 739 740 740 741 /* Easy Open */ 742 if (OPT(easy_open)) 743 { 744 int num_doors, num_chests; 745 746 /* Count closed doors */ 747 num_doors = count_feats(&y, &x, is_closed, FALSE); 748 749 /* Count chests (locked) */ 750 num_chests = count_chests(&y, &x, FALSE); 751 752 /* See if only one target */ 753 if ((num_doors + num_chests) == 1) 754 { 755 p_ptr->command_dir = coords_to_dir(y, x); 756 } 757 } 758 759 /* Get a direction (or abort) */ 760 if (!get_rep_dir(&dir)) return; 741 dir = args[0].direction; 761 742 762 743 /* Get location */ … … 818 799 } 819 800 801 void textui_cmd_open(void) 802 { 803 int y, x, dir = DIR_UNKNOWN; 804 805 /* Easy Open */ 806 if (OPT(easy_open)) 807 { 808 int num_doors, num_chests; 809 810 /* Count closed doors */ 811 num_doors = count_feats(&y, &x, is_closed, FALSE); 812 813 /* Count chests (locked) */ 814 num_chests = count_chests(&y, &x, FALSE); 815 816 /* See if only one target */ 817 if ((num_doors + num_chests) == 1) 818 { 819 dir = coords_to_dir(y, x); 820 } 821 } 822 823 cmd_insert(CMD_OPEN, dir); 824 } 825 820 826 821 827 /* … … 861 867 bool more = FALSE; 862 868 863 864 869 /* Verify legality */ 865 870 if (!do_cmd_close_test(y, x)) return (FALSE); 866 871 867 868 872 /* Broken door */ 869 873 if (cave_feat[y][x] == FEAT_BROKEN) … … 894 898 * Close an open door. 895 899 */ 896 void do_cmd_close( void)900 void do_cmd_close(cmd_code code, cmd_arg args[]) 897 901 { 898 902 int y, x, dir; … … 900 904 bool more = FALSE; 901 905 902 903 /* Easy Close */ 904 if (OPT(easy_open)) 905 { 906 /* Count open doors */ 907 if (count_feats(&y, &x, is_open, FALSE) == 1) 908 { 909 p_ptr->command_dir = coords_to_dir(y, x); 910 } 911 } 912 913 /* Get a direction (or abort) */ 914 if (!get_rep_dir(&dir)) return; 906 dir = args[0].direction; 915 907 916 908 /* Get location */ … … 918 910 x = p_ptr->px + ddx[dir]; 919 911 920 921 912 /* Verify legality */ 922 913 if (!do_cmd_close_test(y, x)) return; 923 924 914 925 915 /* Take a turn */ … … 959 949 } 960 950 951 void textui_cmd_close(void) 952 { 953 int y, x, dir = DIR_UNKNOWN; 954 955 /* Easy Close */ 956 if (OPT(easy_open)) 957 { 958 /* Count open doors */ 959 if (count_feats(&y, &x, is_open, FALSE) == 1) 960 { 961 dir = coords_to_dir(y, x); 962 } 963 } 964 965 cmd_insert(CMD_CLOSE, dir); 966 } 961 967 962 968 … … 1222 1228 * accomplished by strong players using heavy weapons. 1223 1229 */ 1224 void do_cmd_tunnel( void)1230 void do_cmd_tunnel(cmd_code code, cmd_arg args[]) 1225 1231 { 1226 1232 int y, x, dir; 1227 1228 1233 bool more = FALSE; 1229 1234 1230 1231 /* Get a direction (or abort) */ 1232 if (!get_rep_dir(&dir)) return; 1235 dir = args[0].direction; 1233 1236 1234 1237 /* Get location */ … … 1277 1280 } 1278 1281 1282 void textui_cmd_tunnel(void) 1283 { 1284 cmd_insert(CMD_TUNNEL, DIR_UNKNOWN); 1285 } 1286 1279 1287 1280 1288 /* … … 1397 1405 * Disarms a trap, or a chest 1398 1406 */ 1399 void do_cmd_disarm( void)1407 void do_cmd_disarm(cmd_code code, cmd_arg args[]) 1400 1408 { 1401 1409 int y, x, dir; … … 1405 1413 bool more = FALSE; 1406 1414 1407 1408 /* Easy Disarm */ 1409 if (OPT(easy_open)) 1410 { 1411 int num_traps, num_chests; 1412 1413 /* Count visible traps */ 1414 num_traps = count_feats(&y, &x, is_trap, TRUE); 1415 1416 /* Count chests (trapped) */ 1417 num_chests = count_chests(&y, &x, TRUE); 1418 1419 /* See if only one target */ 1420 if (num_traps || num_chests) 1421 { 1422 if (num_traps + num_chests <= 1) 1423 p_ptr->command_dir = coords_to_dir(y, x); 1424 } 1425 } 1426 1427 /* Get a direction (or abort) */ 1428 if (!get_rep_dir(&dir)) return; 1415 dir = args[0].direction; 1429 1416 1430 1417 /* Get location */ … … 1486 1473 } 1487 1474 1475 void textui_cmd_disarm(void) 1476 { 1477 int y, x, dir; 1478 1479 dir = DIR_UNKNOWN; 1480 1481 /* Easy Disarm */ 1482 if (OPT(easy_open)) 1483 { 1484 int num_traps, num_chests; 1485 1486 /* Count visible traps */ 1487 num_traps = count_feats(&y, &x, is_trap, TRUE); 1488 1489 /* Count chests (trapped) */ 1490 num_chests = count_chests(&y, &x, TRUE); 1491 1492 /* See if only one target */ 1493 if (num_traps || num_chests) 1494 { 1495 if (num_traps + num_chests <= 1) 1496 dir = coords_to_dir(y, x); 1497 } 1498 } 1499 1500 cmd_insert(CMD_DISARM, dir); 1501 } 1488 1502 1489 1503 /* … … 1614 1628 * Creatures can also open or bash doors, see elsewhere. 1615 1629 */ 1616 void do_cmd_bash( void)1630 void do_cmd_bash(cmd_code code, cmd_arg args[]) 1617 1631 { 1618 1632 int y, x, dir; 1619 1633 1620 1621 /* Get a direction (or abort) */ 1622 if (!get_rep_dir(&dir)) return; 1634 dir = args[0].direction; 1623 1635 1624 1636 /* Get location */ … … 1668 1680 } 1669 1681 1682 void textui_cmd_bash(void) 1683 { 1684 cmd_insert(CMD_BASH, DIR_UNKNOWN); 1685 } 1686 1670 1687 1671 1688 … … 1681 1698 * is confused, and it must be verified against the new grid. 1682 1699 */ 1683 void do_cmd_alter (void)1684 { 1685 int y, x , dir;1700 void do_cmd_alter_aux(int dir) 1701 { 1702 int y, x; 1686 1703 1687 1704 int feat; 1688 1705 1689 1706 bool more = FALSE; 1690 1691 1692 /* Get a direction */1693 if (!get_rep_dir(&dir)) return;1694 1707 1695 1708 /* Get location */ … … 1777 1790 } 1778 1791 1792 void do_cmd_alter(cmd_code code, cmd_arg args[]) 1793 { 1794 do_cmd_alter_aux(args[0].direction); 1795 } 1796 1797 void textui_cmd_alter(void) 1798 { 1799 cmd_insert(CMD_ALTER, DIR_UNKNOWN); 1800 } 1779 1801 1780 1802 /* … … 1847 1869 * This command may NOT be repeated 1848 1870 */ 1849 void do_cmd_spike( void)1871 void do_cmd_spike(cmd_code code, cmd_arg args[]) 1850 1872 { 1851 1873 int y, x, dir, item = 0; 1852 1874 1875 dir = args[0].direction; 1853 1876 1854 1877 /* Get a spike */ … … 1861 1884 return; 1862 1885 } 1863 1864 1865 /* Get a direction (or abort) */1866 if (!get_rep_dir(&dir)) return;1867 1886 1868 1887 /* Get location */ … … 1925 1944 } 1926 1945 1946 void textui_cmd_spike(void) 1947 { 1948 cmd_insert(CMD_JAM, DIR_UNKNOWN); 1949 } 1927 1950 1928 1951 … … 1996 2019 1997 2020 /* 1998 * Helper function for the "walk" command.1999 */ 2000 static void walk(void)2021 * Walk in the given direction. 2022 */ 2023 void do_cmd_walk(cmd_code code, cmd_arg args[]) 2001 2024 { 2002 2025 int y, x, dir; 2003 2026 2004 /* Get a direction (or abort) */ 2005 if (!get_rep_dir(&dir)) return; 2027 dir = args[0].direction; 2006 2028 2007 2029 /* Get location */ … … 2038 2060 2039 2061 /* 2040 * Walk. 2041 */ 2042 void do_cmd_walk(void) 2043 { 2044 walk(); 2045 } 2062 * Tell the game we want to walk - in future we might want to supply 2063 * directions here rather than rely on keymap/macro things. 2064 */ 2065 void textui_cmd_walk(void) 2066 { 2067 cmd_insert(CMD_WALK, DIR_UNKNOWN); 2068 } 2069 2046 2070 2047 2071 /* … … 2050 2074 * What a horrible concept. 2051 2075 */ 2052 void do_cmd_jump( void)2076 void do_cmd_jump(cmd_code code, cmd_arg args[]) 2053 2077 { 2054 2078 bool old_easy_alter; … … 2058 2082 OPT(easy_alter) = FALSE; 2059 2083 2060 walk();2084 do_cmd_walk(code, args); 2061 2085 2062 2086 /* Restore OPT(easy_alter) */ … … 2064 2088 } 2065 2089 2090 void textui_cmd_jump(void) 2091 { 2092 cmd_insert(CMD_JUMP, DIR_UNKNOWN); 2093 } 2066 2094 2067 2095 … … 2071 2099 * Note that running while confused is not allowed. 2072 2100 */ 2073 void do_cmd_run( void)2101 void do_cmd_run(cmd_code code, cmd_arg args[]) 2074 2102 { 2075 2103 int y, x, dir; 2076 2104 2105 dir = args[0].direction; 2077 2106 2078 2107 /* Hack XXX XXX XXX */ … … 2082 2111 return; 2083 2112 } 2084 2085 2086 /* Get a direction (or abort) */2087 if (!get_rep_dir(&dir)) return;2088 2113 2089 2114 /* Get location */ … … 2100 2125 } 2101 2126 2127 void textui_cmd_run(void) 2128 { 2129 cmd_insert(CMD_RUN, DIR_UNKNOWN); 2130 } 2131 2102 2132 /* 2103 2133 * Start running with pathfinder. … … 2105 2135 * Note that running while confused is not allowed. 2106 2136 */ 2107 void do_cmd_pathfind( int y, int x)2137 void do_cmd_pathfind(cmd_code code, cmd_arg args[]) 2108 2138 { 2109 2139 /* Hack XXX XXX XXX */ … … 2114 2144 } 2115 2145 2116 if (findpath( y,x))2146 if (findpath(args[0].point.y, args[0].point.x)) 2117 2147 { 2118 2148 p_ptr->running = 1000; … … 2130 2160 * Pick up treasure if "pickup" is true. 2131 2161 */ 2132 void do_cmd_hold( void)2162 void do_cmd_hold(cmd_code code, cmd_arg args[]) 2133 2163 { 2134 2164 /* Allow repeated command */ … … 2161 2191 disturb(0, 0); 2162 2192 2163 /* Hack -- enter store */ 2164 p_ptr->command_new = '_'; 2193 cmd_insert(CMD_ENTER_STORE); 2165 2194 2166 2195 /* Free turn XXX XXX XXX */ … … 2174 2203 * Pick up objects on the floor beneath you. -LM- 2175 2204 */ 2176 void do_cmd_pickup( void)2205 void do_cmd_pickup(cmd_code code, cmd_arg args[]) 2177 2206 { 2178 2207 int energy_cost; … … 2193 2222 * Rest (restores hit points and mana and such) 2194 2223 */ 2195 void do_cmd_rest(void) 2196 { 2197 /* Prompt for time if needed */ 2224 void do_cmd_rest(cmd_code code, cmd_arg args[]) 2225 { 2226 /* Save the rest code */ 2227 switch (args[0].choice) 2228 { 2229 case REST_ALL: 2230 { 2231 p_ptr->resting = -2; 2232 break; 2233 } 2234 2235 case REST_ALL_POINTS: 2236 { 2237 p_ptr->resting = -1; 2238 break; 2239 } 2240 2241 case REST_SOME_POINTS: 2242 { 2243 p_ptr->resting = -3; 2244 break; 2245 } 2246 2247 default: 2248 { 2249 p_ptr->resting = p_ptr->command_arg; 2250 } 2251 } 2252 2253 /* Take a turn XXX XXX XXX (?) */ 2254 p_ptr->energy_use = 100; 2255 2256 /* Cancel the arg */ 2257 p_ptr->command_arg = 0; 2258 2259 /* Cancel searching */ 2260 p_ptr->searching = FALSE; 2261 2262 /* Recalculate bonuses */ 2263 p_ptr->update |= (PU_BONUS); 2264 2265 /* Redraw the state */ 2266 p_ptr->redraw |= (PR_STATE); 2267 2268 /* Handle stuff */ 2269 handle_stuff(); 2270 2271 /* Refresh XXX XXX XXX */ 2272 Term_fresh(); 2273 } 2274 2275 2276 void textui_cmd_rest(void) 2277 { 2278 /* Prompt for time if needed */ 2198 2279 if (p_ptr->command_arg <= 0) 2199 2280 { … … 2208 2289 if (out_val[0] == '&') 2209 2290 { 2210 p_ptr->command_arg = (-2);2291 cmd_insert(CMD_REST, REST_ALL); 2211 2292 } 2212 2293 … … 2214 2295 else if (out_val[0] == '*') 2215 2296 { 2216 p_ptr->command_arg = (-1);2297 cmd_insert(CMD_REST, REST_ALL_POINTS); 2217 2298 } 2218 2299 … … 2220 2301 else if (out_val[0] == '!') 2221 2302 { 2222 p_ptr->command_arg = (-3);2303 cmd_insert(CMD_REST, REST_SOME_POINTS); 2223 2304 } 2224 2305 … … 2228 2309 p_ptr->command_arg = atoi(out_val); 2229 2310 if (p_ptr->command_arg <= 0) return; 2230 } 2231 } 2232 2233 2234 /* Paranoia */ 2235 if (p_ptr->command_arg > 9999) p_ptr->command_arg = 9999; 2236 2237 2238 /* Take a turn XXX XXX XXX (?) */ 2239 p_ptr->energy_use = 100; 2240 2241 /* Save the rest code */ 2242 p_ptr->resting = p_ptr->command_arg; 2243 2244 /* Cancel the arg */ 2245 p_ptr->command_arg = 0; 2246 2247 /* Cancel searching */ 2248 p_ptr->searching = FALSE; 2249 2250 /* Recalculate bonuses */ 2251 p_ptr->update |= (PU_BONUS); 2252 2253 /* Redraw the state */ 2254 p_ptr->redraw |= (PR_STATE); 2255 2256 /* Handle stuff */ 2257 handle_stuff(); 2258 2259 /* Refresh XXX XXX XXX */ 2260 Term_fresh(); 2261 } 2311 if (p_ptr->command_arg > 9999) p_ptr->command_arg = 9999; 2312 2313 cmd_insert(CMD_REST, REST_TURNS); 2314 } 2315 } 2316 } 2317 2318 2319 /* 2320 * Hack -- commit suicide 2321 */ 2322 void do_cmd_suicide(cmd_code code, cmd_arg args[]) 2323 { 2324 /* Commit suicide */ 2325 p_ptr->is_dead = TRUE; 2326 2327 /* Stop playing */ 2328 p_ptr->playing = FALSE; 2329 2330 /* Leaving */ 2331 p_ptr->leaving = TRUE; 2332 2333 /* Cause of death */ 2334 my_strcpy(p_ptr->died_from, "Quitting", sizeof(p_ptr->died_from)); 2335 } 2336 2337 2338 void textui_cmd_suicide(void) 2339 { 2340 /* Flush input */ 2341 flush(); 2342 2343 /* Verify Retirement */ 2344 if (p_ptr->total_winner) 2345 { 2346 /* Verify */ 2347 if (!get_check("Do you want to retire? ")) return; 2348 } 2349 2350 /* Verify Suicide */ 2351 else 2352 { 2353 char ch; 2354 2355 /* Verify */ 2356 if (!get_check("Do you really want to commit suicide? ")) return; 2357 2358 /* Special Verification for suicide */ 2359 prt("Please verify SUICIDE by typing the '@' sign: ", 0, 0); 2360 flush(); 2361 ch = inkey(); 2362 prt("", 0, 0); 2363 if (ch != '@') return; 2364 } 2365 2366 cmd_insert(CMD_SUICIDE); 2367 } 2368 2369 void do_cmd_save_game(cmd_code code, cmd_arg args[]) 2370 { 2371 save_game(); 2372 } 2373 -
trunk/src/cmd3.c
r1411 r1417 198 198 * Destroy an item 199 199 */ 200 void do_cmd_destroy(void) 200 void do_cmd_destroy(cmd_code code, cmd_arg args[]) 201 { 202 int item, amt; 203 204 object_type *o_ptr; 205 206 object_type *i_ptr; 207 object_type object_type_body; 208 209 char o_name[120]; 210 211 item = args[0].item; 212 amt = args[1].number; 213 214 /* Destroying squelched items is easy. */ 215 if (item == ALL_SQUELCHED) 216 {
