OSDN Git Service
(root)
/
hengbandforosx
/
hengbandosx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5d50284
)
[Refactor] #40571 Separated menu_target() from target_set()
author
Hourier
<hourier@users.sourceforge.jp>
Tue, 28 Jul 2020 10:48:21 +0000
(19:48 +0900)
committer
Hourier
<hourier@users.sourceforge.jp>
Tue, 28 Jul 2020 10:48:21 +0000
(19:48 +0900)
src/target/target-setter.c
patch
|
blob
|
history
diff --git
a/src/target/target-setter.c
b/src/target/target-setter.c
index
118c172
..
4c8aad1
100644
(file)
--- a/
src/target/target-setter.c
+++ b/
src/target/target-setter.c
@@
-140,6
+140,15
@@
static void describe_projectablity(player_type *creature_ptr, ts_type *ts_ptr)
strcat(ts_ptr->info, cheatinfo);
}
+static void menu_target(ts_type *ts_ptr)
+{
+ if (!use_menu)
+ return;
+
+ if (ts_ptr->query == '\r')
+ ts_ptr->query = 't';
+}
+
/*
* Handle "target" and "look".
*/
@@
-159,12
+168,8
@@
bool target_set(player_type *creature_ptr, target_type mode)
break;
}
+ menu_target(ts_ptr);
int d = 0;
- if (use_menu) {
- if (ts_ptr->query == '\r')
- ts_ptr->query = 't';
- }
-
switch (ts_ptr->query) {
case ESCAPE:
case 'q': {