diff options
author | Nicholas Feinberg <pleasingfung@gmail.com> | 2014-07-27 22:58:57 -0700 |
---|---|---|
committer | Nicholas Feinberg <pleasingfung@gmail.com> | 2014-07-27 22:58:57 -0700 |
commit | 47e5704136cf30ca9b2dd5d556bc5bddc3a7ada3 (patch) | |
tree | 12e59d90469668efbba7198b2ffd3e757eaa9885 | |
parent | d60393247bf21b88a7ab7f02af329e43fb6ba21a (diff) | |
download | crawl-ref-47e5704136cf30ca9b2dd5d556bc5bddc3a7ada3.tar.gz crawl-ref-47e5704136cf30ca9b2dd5d556bc5bddc3a7ada3.zip |
Create prompt.cc
46 files changed, 429 insertions, 372 deletions
diff --git a/crawl-ref/source/MSVC/crawl.vcxproj b/crawl-ref/source/MSVC/crawl.vcxproj index 62b4dbf5e5..50e1ff2213 100644 --- a/crawl-ref/source/MSVC/crawl.vcxproj +++ b/crawl-ref/source/MSVC/crawl.vcxproj @@ -94,13 +94,13 @@ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Tiles|x64'">
<OutDir>$(SolutionDir)\..\</OutDir>
<LinkIncremental>false</LinkIncremental>
- </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Tiles|Win32'"> - <PreBuildEvent> - <Message>Generating build-specific headers...</Message> - <Command>set PATH=c:\cygwin\bin%3bc:\msysgit\mingw\bin%3bc:\msysgit\bin%3bc:\mingw\bin%3b%25PATH%25 -cd $(SolutionDir)\..\ -perl.exe "util/gen_ver_msvc.pl" build.h + </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Tiles|Win32'">
+ <PreBuildEvent>
+ <Message>Generating build-specific headers...</Message>
+ <Command>set PATH=c:\cygwin\bin%3bc:\msysgit\mingw\bin%3bc:\msysgit\bin%3bc:\mingw\bin%3b%25PATH%25
+cd $(SolutionDir)\..\
+perl.exe "util/gen_ver_msvc.pl" build.h
perl.exe "util/gen-cflg.pl" compflag.h "<UNKNOWN>" "<UNKNOWN>"
</Command>
</PreBuildEvent>
@@ -123,13 +123,13 @@ perl.exe "util/gen-cflg.pl" compflag.h "<UNKNOWN>" "<UNKNOWN>" <SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
- </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Tiles|x64'"> - <PreBuildEvent> - <Message>Generating build-specific headers...</Message> - <Command>set PATH=c:\cygwin\bin%3bc:\msysgit\mingw\bin%3bc:\msysgit\bin%3bc:\mingw\bin%3b%25PATH%25 -cd $(SolutionDir)\..\ -perl.exe "util/gen_ver_msvc.pl" build.h + </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Tiles|x64'">
+ <PreBuildEvent>
+ <Message>Generating build-specific headers...</Message>
+ <Command>set PATH=c:\cygwin\bin%3bc:\msysgit\mingw\bin%3bc:\msysgit\bin%3bc:\mingw\bin%3b%25PATH%25
+cd $(SolutionDir)\..\
+perl.exe "util/gen_ver_msvc.pl" build.h
perl.exe "util/gen-cflg.pl" compflag.h "<UNKNOWN>" "<UNKNOWN>"
</Command>
</PreBuildEvent>
@@ -154,13 +154,13 @@ perl.exe "util/gen-cflg.pl" compflag.h "<UNKNOWN>" "<UNKNOWN>" <SubSystem>Windows</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
</Link>
- </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Tiles|Win32'"> - <PreBuildEvent> - <Message>Generating build-specific headers...</Message> - <Command>set PATH=c:\cygwin\bin%3bc:\msysgit\mingw\bin%3bc:\msysgit\bin%3bc:\mingw\bin%3b%25PATH%25 -cd $(SolutionDir)\..\ -perl.exe "util/gen_ver_msvc.pl" build.h + </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Tiles|Win32'">
+ <PreBuildEvent>
+ <Message>Generating build-specific headers...</Message>
+ <Command>set PATH=c:\cygwin\bin%3bc:\msysgit\mingw\bin%3bc:\msysgit\bin%3bc:\mingw\bin%3b%25PATH%25
+cd $(SolutionDir)\..\
+perl.exe "util/gen_ver_msvc.pl" build.h
perl.exe "util/gen-cflg.pl" compflag.h "<UNKNOWN>" "<UNKNOWN>"
</Command>
</PreBuildEvent>
@@ -183,13 +183,13 @@ perl.exe "util/gen-cflg.pl" compflag.h "<UNKNOWN>" "<UNKNOWN>" <EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
- </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Tiles|x64'"> - <PreBuildEvent> - <Message>Generating build-specific headers...</Message> - <Command>set PATH=c:\cygwin\bin%3bc:\msysgit\mingw\bin%3bc:\msysgit\bin%3bc:\mingw\bin%3b%25PATH%25 -cd $(SolutionDir)\..\ -perl.exe "util/gen_ver_msvc.pl" build.h + </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Tiles|x64'">
+ <PreBuildEvent>
+ <Message>Generating build-specific headers...</Message>
+ <Command>set PATH=c:\cygwin\bin%3bc:\msysgit\mingw\bin%3bc:\msysgit\bin%3bc:\mingw\bin%3b%25PATH%25
+cd $(SolutionDir)\..\
+perl.exe "util/gen_ver_msvc.pl" build.h
perl.exe "util/gen-cflg.pl" compflag.h "<UNKNOWN>" "<UNKNOWN>"
</Command>
</PreBuildEvent>
@@ -393,6 +393,7 @@ perl.exe "util/gen-cflg.pl" compflag.h "<UNKNOWN>" "<UNKNOWN>" <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release Tiles|x64'">
</PrecompiledHeader>
</ClCompile>
+ <ClCompile Include="..\prompt.cc" />
<ClCompile Include="..\libgui.cc" />
<ClCompile Include="..\libutil.cc" />
<ClCompile Include="..\libw32c.cc">
@@ -424,12 +425,12 @@ perl.exe "util/gen-cflg.pl" compflag.h "<UNKNOWN>" "<UNKNOWN>" <ClCompile Include="..\mon-gear.cc" />
<ClCompile Include="..\mon-grow.cc" />
<ClCompile Include="..\mon-info.cc" />
- <ClCompile Include="..\mon-message.cc" /> + <ClCompile Include="..\mon-message.cc" />
<ClCompile Include="..\mon-movetarget.cc" />
<ClCompile Include="..\mon-pathfind.cc" />
<ClCompile Include="..\mon-pick.cc" />
<ClCompile Include="..\mon-place.cc" />
- <ClCompile Include="..\mon-poly.cc" /> + <ClCompile Include="..\mon-poly.cc" />
<ClCompile Include="..\mon-project.cc" />
<ClCompile Include="..\mon-speak.cc" />
<ClCompile Include="..\mon-transit.cc" />
@@ -449,7 +450,7 @@ perl.exe "util/gen-cflg.pl" compflag.h "<UNKNOWN>" "<UNKNOWN>" <ClCompile Include="..\quiver.cc" />
<ClCompile Include="..\random-var.cc" />
<ClCompile Include="..\random.cc" />
- <ClCompile Include="..\ranged_attack.cc" /> + <ClCompile Include="..\ranged_attack.cc" />
<ClCompile Include="..\ray.cc" />
<ClCompile Include="..\religion.cc" />
<ClCompile Include="..\rltiles\tiledef-feat.cc" />
@@ -746,6 +747,7 @@ perl.exe "util/gen-cflg.pl" compflag.h "<UNKNOWN>" "<UNKNOWN>" <ClInclude Include="..\player-stats.h" />
<ClInclude Include="..\potion.h" />
<ClInclude Include="..\prebuilt\levcomp.tab.h" />
+ <ClInclude Include="..\prompt.h" />
<ClInclude Include="..\libgui.h" />
<ClInclude Include="..\libutil.h" />
<ClInclude Include="..\libw32c.h" />
@@ -775,12 +777,12 @@ perl.exe "util/gen-cflg.pl" compflag.h "<UNKNOWN>" "<UNKNOWN>" <ClInclude Include="..\mon-gear.h" />
<ClInclude Include="..\mon-grow.h" />
<ClInclude Include="..\mon-info.h" />
- <ClInclude Include="..\mon-message.h" /> + <ClInclude Include="..\mon-message.h" />
<ClInclude Include="..\mon-movetarget.h" />
<ClInclude Include="..\mon-pathfind.h" />
<ClInclude Include="..\mon-pick.h" />
<ClInclude Include="..\mon-place.h" />
- <ClInclude Include="..\mon-poly.h" /> + <ClInclude Include="..\mon-poly.h" />
<ClInclude Include="..\mon-project.h" />
<ClInclude Include="..\mon-speak.h" />
<ClInclude Include="..\mon-spll.h" />
@@ -807,7 +809,7 @@ perl.exe "util/gen-cflg.pl" compflag.h "<UNKNOWN>" "<UNKNOWN>" <ClInclude Include="..\random-var.h" />
<ClInclude Include="..\random-weight.h" />
<ClInclude Include="..\random.h" />
- <ClInclude Include="..\ranged_attack.h" /> + <ClInclude Include="..\ranged_attack.h" />
<ClInclude Include="..\ray.h" />
<ClInclude Include="..\religion-enum.h" />
<ClInclude Include="..\religion.h" />
@@ -930,7 +932,7 @@ perl.exe "util/gen-cflg.pl" compflag.h "<UNKNOWN>" "<UNKNOWN>" <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> - <ImportGroup Label="ExtensionTargets"> - </ImportGroup> -</Project> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
diff --git a/crawl-ref/source/MSVC/crawl.vcxproj.filters b/crawl-ref/source/MSVC/crawl.vcxproj.filters index 480bb37d2e..8068c80db7 100644 --- a/crawl-ref/source/MSVC/crawl.vcxproj.filters +++ b/crawl-ref/source/MSVC/crawl.vcxproj.filters @@ -130,11 +130,12 @@ <ClCompile Include="..\place-info.cc" />
<ClCompile Include="..\player-act.cc" />
<ClCompile Include="..\player-equip.cc" />
- <ClCompile Include="..\player-reacts.cc" /> + <ClCompile Include="..\player-reacts.cc" />
<ClCompile Include="..\player-stats.cc" />
<ClCompile Include="..\potion.cc" />
<ClCompile Include="..\prebuilt\levcomp.lex.cc" />
<ClCompile Include="..\prebuilt\levcomp.tab.cc" />
+ <ClCompile Include="..\prompt.cc" />
<ClCompile Include="..\libgui.cc" />
<ClCompile Include="..\libutil.cc" />
<ClCompile Include="..\libw32c.cc" />
@@ -161,12 +162,12 @@ <ClCompile Include="..\mon-gear.cc" />
<ClCompile Include="..\mon-grow.cc" />
<ClCompile Include="..\mon-info.cc" />
- <ClCompile Include="..\mon-message.cc" /> + <ClCompile Include="..\mon-message.cc" />
<ClCompile Include="..\mon-movetarget.cc" />
<ClCompile Include="..\mon-pathfind.cc" />
<ClCompile Include="..\mon-pick.cc" />
<ClCompile Include="..\mon-place.cc" />
- <ClCompile Include="..\mon-poly.cc" /> + <ClCompile Include="..\mon-poly.cc" />
<ClCompile Include="..\mon-project.cc" />
<ClCompile Include="..\mon-speak.cc" />
<ClCompile Include="..\mon-transit.cc" />
@@ -186,7 +187,7 @@ <ClCompile Include="..\quiver.cc" />
<ClCompile Include="..\random-var.cc" />
<ClCompile Include="..\random.cc" />
- <ClCompile Include="..\ranged_attack.cc" /> + <ClCompile Include="..\ranged_attack.cc" />
<ClCompile Include="..\ray.cc" />
<ClCompile Include="..\religion.cc" />
<ClCompile Include="..\rltiles\tiledef-feat.cc" />
@@ -433,10 +434,11 @@ <ClInclude Include="..\place-info.h" />
<ClInclude Include="..\platform.h" />
<ClInclude Include="..\player-equip.h" />
- <ClInclude Include="..\player-reacts.h" /> + <ClInclude Include="..\player-reacts.h" />
<ClInclude Include="..\player-stats.h" />
<ClInclude Include="..\potion.h" />
<ClInclude Include="..\prebuilt\levcomp.tab.h" />
+ <ClInclude Include="..\prompt.h" />
<ClInclude Include="..\libgui.h" />
<ClInclude Include="..\libutil.h" />
<ClInclude Include="..\libw32c.h" />
@@ -465,12 +467,12 @@ <ClInclude Include="..\mon-gear.h" />
<ClInclude Include="..\mon-grow.h" />
<ClInclude Include="..\mon-info.h" />
- <ClInclude Include="..\mon-message.h" /> + <ClInclude Include="..\mon-message.h" />
<ClInclude Include="..\mon-movetarget.h" />
<ClInclude Include="..\mon-pathfind.h" />
<ClInclude Include="..\mon-pick.h" />
<ClInclude Include="..\mon-place.h" />
- <ClInclude Include="..\mon-poly.h" /> + <ClInclude Include="..\mon-poly.h" />
<ClInclude Include="..\mon-project.h" />
<ClInclude Include="..\mon-speak.h" />
<ClInclude Include="..\mon-spll.h" />
@@ -496,7 +498,7 @@ <ClInclude Include="..\random-var.h" />
<ClInclude Include="..\random-weight.h" />
<ClInclude Include="..\random.h" />
- <ClInclude Include="..\ranged_attack.h" /> + <ClInclude Include="..\ranged_attack.h" />
<ClInclude Include="..\ray.h" />
<ClInclude Include="..\religion-enum.h" />
<ClInclude Include="..\religion.h" />
@@ -619,4 +621,4 @@ <ClInclude Include="..\spl-pick.h" />
<ClInclude Include="..\data-index.h" />
</ItemGroup>
-</Project> +</Project>
diff --git a/crawl-ref/source/Makefile.obj b/crawl-ref/source/Makefile.obj index d1fbe2509a..e6851dd5fa 100644 --- a/crawl-ref/source/Makefile.obj +++ b/crawl-ref/source/Makefile.obj @@ -179,6 +179,7 @@ player-reacts.o \ player-stats.o \ player.o \ potion.o \ +prompt.o \ quiver.o \ random.o \ random-var.o \ diff --git a/crawl-ref/source/ability.cc b/crawl-ref/source/ability.cc index a7338c9413..24ca158f0f 100644 --- a/crawl-ref/source/ability.cc +++ b/crawl-ref/source/ability.cc @@ -54,6 +54,7 @@ #include "player.h" #include "player-stats.h" #include "potion.h" +#include "prompt.h" #include "religion.h" #include "shout.h" #include "skills.h" diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index be4be43b05..cc7b97b2d6 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -55,6 +55,7 @@ #include "mutation.h" #include "ouch.h" #include "potion.h" +#include "prompt.h" #include "ranged_attack.h" #include "religion.h" #include "godconduct.h" diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc index d603098ad9..135a0c3d16 100644 --- a/crawl-ref/source/decks.cc +++ b/crawl-ref/source/decks.cc @@ -52,6 +52,7 @@ #include "player-equip.h" #include "player-stats.h" #include "potion.h" +#include "prompt.h" #include "religion.h" #include "godconduct.h" #include "skill_menu.h" diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc index 2cc74aeded..a923060aaa 100644 --- a/crawl-ref/source/delay.cc +++ b/crawl-ref/source/delay.cc @@ -49,6 +49,7 @@ #include "output.h" #include "player.h" #include "player-equip.h" +#include "prompt.h" #include "random.h" #include "religion.h" #include "godconduct.h" diff --git a/crawl-ref/source/dgn-overview.cc b/crawl-ref/source/dgn-overview.cc index e52bca3cb0..a16f72f7a5 100644 --- a/crawl-ref/source/dgn-overview.cc +++ b/crawl-ref/source/dgn-overview.cc @@ -25,6 +25,7 @@ #include "libutil.h" #include "menu.h" #include "message.h" +#include "prompt.h" #include "religion.h" #include "shopping.h" #include "stairs.h" diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc index 35dc8732f6..d754cf7723 100644 --- a/crawl-ref/source/directn.cc +++ b/crawl-ref/source/directn.cc @@ -45,6 +45,7 @@ #include "mon-death.h" #include "mon-info.h" #include "output.h" +#include "prompt.h" #include "shopping.h" #include "show.h" #include "showsymb.h" diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index d0f5c97d0c..ce2029dafc 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -67,6 +67,7 @@ #include "player-equip.h" #include "player-stats.h" #include "player.h" +#include "prompt.h" #include "religion.h" #include "rot.h" #include "shopping.h" diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index 3830e04e4a..f3b5f16b6c 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -33,13 +33,13 @@ #include "mon-util.h" #include "ouch.h" #include "player.h" +#include "prompt.h" #include "random-var.h" #include "religion.h" #include "shopping.h" #include "spl-miscast.h" #include "spl-summoning.h" #include "state.h" -#include "stuff.h" #include "target.h" #include "terrain.h" #include "travel.h" diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc index 2518a70859..99517a5397 100644 --- a/crawl-ref/source/files.cc +++ b/crawl-ref/source/files.cc @@ -72,6 +72,7 @@ #include "output.h" #include "place.h" #include "player.h" +#include "prompt.h" #include "random.h" #include "show.h" #include "shopping.h" diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc index f8e542a0e2..a0a9919e5a 100644 --- a/crawl-ref/source/food.cc +++ b/crawl-ref/source/food.cc @@ -45,6 +45,7 @@ #include "player-equip.h" #include "player-stats.h" #include "potion.h" +#include "prompt.h" #include "random.h" #include "religion.h" #include "godconduct.h" diff --git a/crawl-ref/source/godabil.cc b/crawl-ref/source/godabil.cc index 33742b01f7..28e097b8e2 100644 --- a/crawl-ref/source/godabil.cc +++ b/crawl-ref/source/godabil.cc @@ -57,6 +57,7 @@ #include "place.h" #include "player-stats.h" #include "potion.h" +#include "prompt.h" #include "random.h" #include "religion.h" #include "skill_menu.h" diff --git a/crawl-ref/source/godprayer.cc b/crawl-ref/source/godprayer.cc index 75b89699dc..035530780a 100644 --- a/crawl-ref/source/godprayer.cc +++ b/crawl-ref/source/godprayer.cc @@ -26,6 +26,7 @@ #include "monster.h" #include "notes.h" #include "options.h" +#include "prompt.h" #include "random.h" #include "religion.h" #include "shopping.h" diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc index 6d3715ff4c..b17f5704fc 100644 --- a/crawl-ref/source/invent.cc +++ b/crawl-ref/source/invent.cc @@ -32,6 +32,7 @@ #include "macro.h" #include "message.h" #include "player.h" +#include "prompt.h" #include "religion.h" #include "shopping.h" #include "showsymb.h" diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index d3949b4924..223204ed0c 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -44,6 +44,7 @@ #include "player-equip.h" #include "player-stats.h" #include "potion.h" +#include "prompt.h" #include "random.h" #include "religion.h" #include "rot.h" diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index 921fe36436..70adf6f1fe 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -56,6 +56,7 @@ #include "place.h" #include "player.h" #include "player-equip.h" +#include "prompt.h" #include "quiver.h" #include "religion.h" #include "rot.h" diff --git a/crawl-ref/source/l_crawl.cc b/crawl-ref/source/l_crawl.cc index ad856b67f5..08a952b19f 100644 --- a/crawl-ref/source/l_crawl.cc +++ b/crawl-ref/source/l_crawl.cc @@ -35,6 +35,7 @@ module "crawl" #include "output.h" #include "perlin.h" #include "player.h" +#include "prompt.h" #include "random.h" #include "religion.h" #include "state.h" diff --git a/crawl-ref/source/main.cc b/crawl-ref/source/main.cc index 0e5fca3055..33cf5489b9 100644 --- a/crawl-ref/source/main.cc +++ b/crawl-ref/source/main.cc @@ -107,6 +107,7 @@ #include "player-reacts.h" #include "player-stats.h" #include "player.h" +#include "prompt.h" #include "quiver.h" #include "random.h" #include "religion.h" diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index b5d0d6f161..77344d80a6 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -62,6 +62,7 @@ #include "ouch.h" #include "player.h" #include "player-stats.h" +#include "prompt.h" #include "random.h" #include "religion.h" #include "rot.h" diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc index 698030bbd7..63e3a6e1a3 100644 --- a/crawl-ref/source/ouch.cc +++ b/crawl-ref/source/ouch.cc @@ -57,6 +57,7 @@ #include "player.h" #include "player-stats.h" #include "potion.h" +#include "prompt.h" #include "random.h" #include "religion.h" #include "shopping.h" diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 3065070b33..38493491c1 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -65,6 +65,7 @@ #include "output.h" #include "player-stats.h" #include "potion.h" +#include "prompt.h" #include "quiver.h" #include "random.h" #include "religion.h" diff --git a/crawl-ref/source/prompt.cc b/crawl-ref/source/prompt.cc new file mode 100644 index 0000000000..8cd444eeaf --- /dev/null +++ b/crawl-ref/source/prompt.cc @@ -0,0 +1,312 @@ +/** + * @file + * @brief Prompts. + **/ + +#include "AppHdr.h" +#include "prompt.h" + +#include "cio.h" +#include "delay.h" +#include "libutil.h" +#include "macro.h" +#include "message.h" +#include "options.h" +#include "state.h" + +// Like yesno, but requires a full typed answer. +// Unlike yesno, prompt should have no trailing space. +// Returns true if the user typed "yes", false if something else or cancel. +bool yes_or_no(const char* fmt, ...) +{ + char buf[200]; + va_list args; + va_start(args, fmt); + vsnprintf(buf, sizeof buf, fmt, args); + va_end(args); + buf[sizeof(buf)-1] = 0; + + mprf(MSGCH_PROMPT, "%s (Confirm with \"yes\".) ", buf); + + if (cancellable_get_line(buf, sizeof buf)) + return false; + if (strcasecmp(buf, "yes") != 0) + return false; + + return true; +} + +// jmf: general helper (should be used all over in code) +// -- idea borrowed from Nethack +bool yesno(const char *str, bool safe, int safeanswer, bool clear_after, + bool interrupt_delays, bool noprompt, + const explicit_keymap *map, GotoRegion region) +{ + bool message = (region == GOTO_MSG); + if (interrupt_delays && !crawl_state.is_repeating_cmd()) + interrupt_activity(AI_FORCE_INTERRUPT); + + string prompt = make_stringf("%s ", str ? str : "Buggy prompt?"); + +#ifdef TOUCH_UI + Popup *pop = new Popup(prompt); + MenuEntry *status = new MenuEntry("", MEL_SUBTITLE); + pop->push_entry(new MenuEntry(prompt, MEL_TITLE)); + pop->push_entry(status); + MenuEntry *me = new MenuEntry("Yes", MEL_ITEM, 0, 'Y', false); + me->add_tile(tile_def(TILEG_PROMPT_YES, TEX_GUI)); + pop->push_entry(me); + me = new MenuEntry("No", MEL_ITEM, 0, 'N', false); + me->add_tile(tile_def(TILEG_PROMPT_NO, TEX_GUI)); + pop->push_entry(me); +#endif + mouse_control mc(MOUSE_MODE_YESNO); + while (true) + { + int tmp = ESCAPE; + if (!crawl_state.seen_hups) + { +#ifdef TOUCH_UI + tmp = pop->pop(); +#else + if (!noprompt) + { + if (message) + mprf(MSGCH_PROMPT, "%s", prompt.c_str()); + else + cprintf("%s", prompt.c_str()); + } + + tmp = getchm(KMC_CONFIRM); + } +#endif + + // If no safe answer exists, we still need to abort when a HUP happens. + // The caller must handle this case, preferably by issuing an uncancel + // event that can restart when the game restarts -- and ignore the + // the return value here. + if (crawl_state.seen_hups && !safeanswer) + return false; + + if (map && map->find(tmp) != map->end()) + tmp = map->find(tmp)->second; + + if (safeanswer + && (tmp == ' ' || key_is_escape(tmp) + || tmp == '\r' || tmp == '\n' || crawl_state.seen_hups)) + { + tmp = safeanswer; + } + + if (Options.easy_confirm == CONFIRM_ALL_EASY + || tmp == safeanswer + || Options.easy_confirm == CONFIRM_SAFE_EASY && safe) + { + tmp = toupper(tmp); + } + + if (clear_after && message) + clear_messages(); + + if (tmp == 'N') + return false; + else if (tmp == 'Y') + return true; + else if (!noprompt) + { + bool upper = (!safe && crawl_state.game_is_hints_tutorial()); + const string pr = make_stringf("%s[Y]es or [N]o only, please.", + upper ? "Uppercase " : ""); +#ifdef TOUCH_UI + status->text = pr; +#else + if (message) + mpr(pr.c_str()); + else + cprintf("\n%s\n", pr.c_str()); +#endif + } + } +} + +static string _list_alternative_yes(char yes1, char yes2, bool lowered = false, + bool brackets = false) +{ + string help = ""; + bool print_yes = false; + if (yes1 != 'Y') + { + if (lowered) + help += toalower(yes1); + else + help += yes1; + print_yes = true; + } + + if (yes2 != 'Y' && yes2 != yes1) + { + if (print_yes) + help += "/"; + + if (lowered) + help += toalower(yes2); + else + help += yes2; + print_yes = true; + } + + if (print_yes) + { + if (brackets) + help = " (" + help + ")"; + else + help = "/" + help; + } + + return help; +} + +static string _list_allowed_keys(char yes1, char yes2, bool lowered = false, + bool allow_all = false) +{ + string result = " ["; + result += (lowered ? "(y)es" : "(Y)es"); + result += _list_alternative_yes(yes1, yes2, lowered); + if (allow_all) + result += (lowered? "/(a)ll" : "/(A)ll"); + result += (lowered ? "/(n)o/(q)uit" : "/(N)o/(Q)uit"); + result += "]"; + + return result; +} + +// Like yesno(), but returns 0 for no, 1 for yes, and -1 for quit. +// alt_yes and alt_yes2 allow up to two synonyms for 'Y'. +// FIXME: This function is shaping up to be a monster. Help! +int yesnoquit(const char* str, bool safe, int safeanswer, bool allow_all, + bool clear_after, char alt_yes, char alt_yes2) +{ + if (!crawl_state.is_repeating_cmd()) + interrupt_activity(AI_FORCE_INTERRUPT); + + mouse_control mc(MOUSE_MODE_YESNO); + + string prompt = + make_stringf("%s%s ", str ? str : "Buggy prompt?", + _list_allowed_keys(alt_yes, alt_yes2, + safe, allow_all).c_str()); + while (true) + { + mprf(MSGCH_PROMPT, "%s", prompt.c_str()); + + int tmp = getchm(KMC_CONFIRM); + + if (key_is_escape(tmp) || tmp == 'q' || tmp == 'Q' + || crawl_state.seen_hups) + { + return -1; + } + + if ((tmp == ' ' || tmp == '\r' || tmp == '\n') && safeanswer) + tmp = safeanswer; + + if (Options.easy_confirm == CONFIRM_ALL_EASY + || tmp == safeanswer + || safe && Options.easy_confirm == CONFIRM_SAFE_EASY) + { + tmp = toupper(tmp); + } + + if (clear_after) + clear_messages(); + + if (tmp == 'N') + return 0; + else if (tmp == 'Y' || tmp == alt_yes || tmp == alt_yes2) + return 1; + else if (allow_all) + { + if (tmp == 'A') + return 2; + else + { + bool upper = (!safe && crawl_state.game_is_hints_tutorial()); + mprf("Choose %s[Y]es%s, [N]o, [Q]uit, or [A]ll!", + upper ? "uppercase " : "", + _list_alternative_yes(alt_yes, alt_yes2, false, true).c_str()); + } + } + else + { + bool upper = (!safe && crawl_state.game_is_hints_tutorial()); + mprf("%s[Y]es%s, [N]o or [Q]uit only, please.", + upper ? "Uppercase " : "", + _list_alternative_yes(alt_yes, alt_yes2, false, true).c_str()); + } + } +} + +//--------------------------------------------------------------- +// +// prompt_for_quantity +// +// Returns -1 if ; or enter is pressed (pickup all). +// Else, returns quantity. +//--------------------------------------------------------------- +int prompt_for_quantity(const char *prompt) +{ + msgwin_prompt(prompt); + + int ch = getch_ck(); + if (ch == CK_ENTER || ch == ';') + return -1; + else if (ch == CK_ESCAPE) + return 0; + + macro_buf_add(ch); + return prompt_for_int("", false); +} + +//--------------------------------------------------------------- +// +// prompt_for_int +// +// If nonneg, then it returns a non-negative number or -1 on fail +// If !nonneg, then it returns an integer, and 0 on fail +// +//--------------------------------------------------------------- +int prompt_for_int(const char *prompt, bool nonneg) +{ + char specs[80]; + + msgwin_get_line(prompt, specs, sizeof(specs)); + + if (specs[0] == '\0') + return nonneg ? -1 : 0; + + char *end; + int ret = strtol(specs, &end, 10); + + if (ret < 0 && nonneg || ret == 0 && end == specs) + ret = (nonneg ? -1 : 0); + + return ret; +} + +double prompt_for_float(const char* prompt) +{ + char specs[80]; + + msgwin_get_line(prompt, specs, sizeof(specs)); + + if (specs[0] == '\0') + return -1; + + char *end; + double ret = strtod(specs, &end); + + if (ret == 0 && end == specs) + ret = -1; + + return ret; +} diff --git a/crawl-ref/source/prompt.h b/crawl-ref/source/prompt.h new file mode 100644 index 0000000000..700a13f2ff --- /dev/null +++ b/crawl-ref/source/prompt.h @@ -0,0 +1,25 @@ +/** + * @file + * @brief Prompts. + **/ + +#ifndef PROMPT_H +#define PROMPT_H + +bool yes_or_no(PRINTF(0, )); +typedef map<int, int> explicit_keymap; +bool yesno(const char * str, bool safe, int safeanswer, + bool clear_after = true, bool interrupt_delays = true, + bool noprompt = false, + const explicit_keymap *map = NULL, + GotoRegion = GOTO_MSG); + +int yesnoquit(const char* str, bool safe = true, int safeanswer = 0, + bool allow_all = false, bool clear_after = true, + char alt_yes = 'Y', char alt_yes2 = 'Y'); + +int prompt_for_quantity(const char *prompt); +int prompt_for_int(const char *prompt, bool nonneg); +double prompt_for_float(const char* prompt); + +#endif diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 492ba9f40a..04a0addf08 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -65,6 +65,7 @@ #include "ouch.h" #include "player.h" #include "player-stats.h" +#include "prompt.h" #include "shopping.h" #include "skills.h" #include "skills2.h" diff --git a/crawl-ref/source/shopping.cc b/crawl-ref/source/shopping.cc index b538ead31b..24cb8672eb 100644 --- a/crawl-ref/source/shopping.cc +++ b/crawl-ref/source/shopping.cc @@ -31,6 +31,7 @@ #include "notes.h" #include "place.h" #include "player.h" +#include "prompt.h" #include "spl-book.h" #include "stash.h" #include "state.h" diff --git a/crawl-ref/source/spl-book.cc b/crawl-ref/source/spl-book.cc index aa7df0b978..e355964792 100644 --- a/crawl-ref/source/spl-book.cc +++ b/crawl-ref/source/spl-book.cc @@ -36,6 +36,7 @@ #include "message.h" #include "options.h" #include "player.h" +#include "prompt.h" #include "religion.h" #include "species.h" #include "spl-cast.h" diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc index 69371a68e0..0bed346bed 100644 --- a/crawl-ref/source/spl-cast.cc +++ b/crawl-ref/source/spl-cast.cc @@ -42,6 +42,7 @@ #include "mutation.h" #include "ouch.h" #include "player.h" +#include "prompt.h" #include "religion.h" #include "shout.h" #include "skills.h" diff --git a/crawl-ref/source/spl-clouds.cc b/crawl-ref/source/spl-clouds.cc index 0ed204953c..6b4de929a3 100644 --- a/crawl-ref/source/spl-clouds.cc +++ b/crawl-ref/source/spl-clouds.cc @@ -28,9 +28,9 @@ #include "mon-util.h" #include "ouch.h" #include "player.h" +#include "prompt.h" #include "random-pick.h" #include "spl-util.h" -#include "stuff.h" #include "target.h" #include "terrain.h" #include "transform.h" diff --git a/crawl-ref/source/spl-damage.cc b/crawl-ref/source/spl-damage.cc index 7ef522f82f..ce0336e850 100644 --- a/crawl-ref/source/spl-damage.cc +++ b/crawl-ref/source/spl-damage.cc @@ -39,6 +39,7 @@ #include "ouch.h" #include "options.h" #include "player-equip.h" +#include "prompt.h" #include "shout.h" #include "spl-summoning.h" #include "spl-util.h" diff --git a/crawl-ref/source/spl-summoning.cc b/crawl-ref/source/spl-summoning.cc index cc32fbd20b..78a2dd8f34 100644 --- a/crawl-ref/source/spl-summoning.cc +++ b/crawl-ref/source/spl-summoning.cc @@ -46,6 +46,7 @@ #include "options.h" #include "player-equip.h" #include "player-stats.h" +#include "prompt.h" #include "religion.h" #include "shout.h" #include "spl-util.h" diff --git a/crawl-ref/source/spl-tornado.cc b/crawl-ref/source/spl-tornado.cc index 8c8ce67c7f..dc5e315b6c 100644 --- a/crawl-ref/source/spl-tornado.cc +++ b/crawl-ref/source/spl-tornado.cc @@ -16,9 +16,9 @@ #include "message.h" #include "mon-behv.h" #include "ouch.h" +#include "prompt.h" #include "shout.h" #include "spl-cast.h" -#include "stuff.h" #include "terrain.h" #include "transform.h" diff --git a/crawl-ref/source/spl-transloc.cc b/crawl-ref/source/spl-transloc.cc index e5f28391f9..0441b8697b 100644 --- a/crawl-ref/source/spl-transloc.cc +++ b/crawl-ref/source/spl-transloc.cc @@ -33,6 +33,7 @@ #include "mon-behv.h" #include "mon-util.h" #include "orb.h" +#include "prompt.h" #include "random.h" #include "shout.h" #include "spl-util.h" diff --git a/crawl-ref/source/spl-wpnench.cc b/crawl-ref/source/spl-wpnench.cc index a0d4add111..eb32c52888 100644 --- a/crawl-ref/source/spl-wpnench.cc +++ b/crawl-ref/source/spl-wpnench.cc @@ -13,11 +13,11 @@ #include "itemprop.h" #include "makeitem.h" #include "message.h" +#include "prompt.h" #include "religion.h" #include "shout.h" #include "skills2.h" #include "spl-miscast.h" -#include "stuff.h" // We need to know what brands equate with what missile brands to know if // we should disallow temporary branding or not. diff --git a/crawl-ref/source/stairs.cc b/crawl-ref/source/stairs.cc index edb8168cda..653c69e6a3 100644 --- a/crawl-ref/source/stairs.cc +++ b/crawl-ref/source/stairs.cc @@ -32,6 +32,7 @@ #include "ouch.h" #include "output.h" #include "place.h" +#include "prompt.h" #include "random.h" #include "religion.h" #include "spl-clouds.h" @@ -40,7 +41,6 @@ #include "spl-transloc.h" #include "stash.h" #include "state.h" -#include "stuff.h" #include "terrain.h" #ifdef USE_TILE_LOCAL #include "tilepick.h" diff --git a/crawl-ref/source/stuff.cc b/crawl-ref/source/stuff.cc index d8d0934309..b921b904b1 100644 --- a/crawl-ref/source/stuff.cc +++ b/crawl-ref/source/stuff.cc @@ -1,4 +1,3 @@ - /** * @file * @brief Misc stuff. @@ -387,241 +386,7 @@ int stepdown_value(int base_value, int stepping, int first_step, int div_round_up(int num, int den) { return num / den + (num % den != 0); -} - -// Like yesno, but requires a full typed answer. -// Unlike yesno, prompt should have no trailing space. -// Returns true if the user typed "yes", false if something else or cancel. -bool yes_or_no(const char* fmt, ...) -{ - char buf[200]; - va_list args; - va_start(args, fmt); - vsnprintf(buf, sizeof buf, fmt, args); - va_end(args); - buf[sizeof(buf)-1] = 0; - - mprf(MSGCH_PROMPT, "%s (Confirm with \"yes\".) ", buf); - - if (cancellable_get_line(buf, sizeof buf)) - return false; - if (strcasecmp(buf, "yes") != 0) - return false; - - return true; -} - -// jmf: general helper (should be used all over in code) -// -- idea borrowed from Nethack -bool yesno(const char *str, bool safe, int safeanswer, bool clear_after, - bool interrupt_delays, bool noprompt, - const explicit_keymap *map, GotoRegion region) -{ - bool message = (region == GOTO_MSG); - if (interrupt_delays && !crawl_state.is_repeating_cmd()) - interrupt_activity(AI_FORCE_INTERRUPT); - - string prompt = make_stringf("%s ", str ? str : "Buggy prompt?"); - -#ifdef TOUCH_UI - Popup *pop = new Popup(prompt); - MenuEntry *status = new MenuEntry("", MEL_SUBTITLE); - pop->push_entry(new MenuEntry(prompt, MEL_TITLE)); - pop->push_entry(status); - MenuEntry *me = new MenuEntry("Yes", MEL_ITEM, 0, 'Y', false); - me->add_tile(tile_def(TILEG_PROMPT_YES, TEX_GUI)); - pop->push_entry(me); - me = new MenuEntry("No", MEL_ITEM, 0, 'N', false); - me->add_tile(tile_def(TILEG_PROMPT_NO, TEX_GUI)); - pop->push_entry(me); -#endif - mouse_control mc(MOUSE_MODE_YESNO); - while (true) - { - int tmp = ESCAPE; - if (!crawl_state.seen_hups) - { -#ifdef TOUCH_UI - tmp = pop->pop(); -#else - if (!noprompt) - { - if (message) - mprf(MSGCH_PROMPT, "%s", prompt.c_str()); - else - cprintf("%s", prompt.c_str()); - } - - tmp = getchm(KMC_CONFIRM); - } -#endif - - // If no safe answer exists, we still need to abort when a HUP happens. - // The caller must handle this case, preferably by issuing an uncancel - // event that can restart when the game restarts -- and ignore the - // the return value here. - if (crawl_state.seen_hups && !safeanswer) - return false; - - if (map && map->find(tmp) != map->end()) - tmp = map->find(tmp)->second; - - if (safeanswer - && (tmp == ' ' || key_is_escape(tmp) - || tmp == '\r' || tmp == '\n' || crawl_state.seen_hups)) - { - tmp = safeanswer; - } - - if (Options.easy_confirm == CONFIRM_ALL_EASY - || tmp == safeanswer - || Options.easy_confirm == CONFIRM_SAFE_EASY && safe) - { - tmp = toupper(tmp); - } - - if (clear_after && message) - clear_messages(); - - if (tmp == 'N') - return false; - else if (tmp == 'Y') - return true; - else if (!noprompt) - { - bool upper = (!safe && crawl_state.game_is_hints_tutorial()); - const string pr = make_stringf("%s[Y]es or [N]o only, please.", - upper ? "Uppercase " : ""); -#ifdef TOUCH_UI - status->text = pr; -#else - if (message) - mpr(pr.c_str()); - else - cprintf("\n%s\n", pr.c_str()); -#endif - } - } -} - -static string _list_alternative_yes(char yes1, char yes2, bool lowered = false, - bool brackets = false) -{ - string help = ""; - bool print_yes = false; - if (yes1 != 'Y') - { - if (lowered) - help += toalower(yes1); - else - help += yes1; - print_yes = true; - } - - if (yes2 != 'Y' && yes2 != yes1) - { - if (print_yes) - help += "/"; - - if (lowered) - help += toalower(yes2); - else - help += yes2; - print_yes = true; - } - - if (print_yes) - { - if (brackets) - help = " (" + help + ")"; - else - help = "/" + help; - } - - return help; -} - -static string _list_allowed_keys(char yes1, char yes2, bool lowered = false, - bool allow_all = false) -{ - string result = " ["; - result += (lowered ? "(y)es" : "(Y)es"); - result += _list_alternative_yes(yes1, yes2, lowered); - if (allow_all) - result += (lowered? "/(a)ll" : "/(A)ll"); - result += (lowered ? "/(n)o/(q)uit" : "/(N)o/(Q)uit"); - result += "]"; - - return result; -} - -// Like yesno(), but returns 0 for no, 1 for yes, and -1 for quit. -// alt_yes and alt_yes2 allow up to two synonyms for 'Y'. -// FIXME: This function is shaping up to be a monster. Help! -int yesnoquit(const char* str, bool safe, int safeanswer, bool allow_all, - bool clear_after, char alt_yes, char alt_yes2) -{ - if (!crawl_state.is_repeating_cmd()) - interrupt_activity(AI_FORCE_INTERRUPT); - - mouse_control mc(MOUSE_MODE_YESNO); - - string prompt = - make_stringf("%s%s ", str ? str : "Buggy prompt?", - _list_allowed_keys(alt_yes, alt_yes2, - safe, allow_all).c_str()); - while (true) - { - mprf(MSGCH_PROMPT, "%s", prompt.c_str()); - - int tmp = getchm(KMC_CONFIRM); - - if (key_is_escape(tmp) || tmp == 'q' || tmp == 'Q' - || crawl_state.seen_hups) - { - return -1; - } - - if ((tmp == ' ' || tmp == '\r' || tmp == '\n') && safeanswer) - tmp = safeanswer; - - if (Options.easy_confirm == CONFIRM_ALL_EASY - || tmp == safeanswer - || safe && Options.easy_confirm == CONFIRM_SAFE_EASY) - { - tmp = toupper(tmp); - } - - if (clear_after) - clear_messages(); - - if (tmp == 'N') - return 0; - else if (tmp == 'Y' || tmp == alt_yes || tmp == alt_yes2) - return 1; - else if (allow_all) - { - if (tmp == 'A') - return 2; - else - { - bool upper = (!safe && crawl_state.game_is_hints_tutorial()); - mprf("Choose %s[Y]es%s, [N]o, [Q]uit, or [A]ll!", - upper ? "uppercase " : "", - _list_alternative_yes(alt_yes, alt_yes2, false, true).c_str()); - } - } - else - { - bool upper = (!safe && crawl_state.game_is_hints_tutorial()); - mprf("%s[Y]es%s, [N]o or [Q]uit only, please.", - upper ? "Uppercase " : "", - _list_alternative_yes(alt_yes, alt_yes2, false, true).c_str()); - } - } -} - -char index_to_letter(int the_index) +}char index_to_letter(int the_index) { ASSERT_RANGE(the_index, 0, ENDOFPACK); return the_index + ((the_index < 26) ? 'a' : ('A' - 26)); @@ -662,68 +427,3 @@ bool tobool(maybe_bool mb, bool def) return def; } } - -//--------------------------------------------------------------- -// -// prompt_for_quantity -// -// Returns -1 if ; or enter is pressed (pickup all). -// Else, returns quantity. -//--------------------------------------------------------------- -int prompt_for_quantity(const char *prompt) -{ - msgwin_prompt(prompt); - - int ch = getch_ck(); - if (ch == CK_ENTER || ch == ';') - return -1; - else if (ch == CK_ESCAPE) - return 0; - - macro_buf_add(ch); - return prompt_for_int("", false); -} - -//--------------------------------------------------------------- -// -// prompt_for_int -// -// If nonneg, then it returns a non-negative number or -1 on fail -// If !nonneg, then it returns an integer, and 0 on fail -// -//--------------------------------------------------------------- -int prompt_for_int(const char *prompt, bool nonneg) -{ - char specs[80]; - - msgwin_get_line(prompt, specs, sizeof(specs)); - - if (specs[0] == '\0') - return nonneg ? -1 : 0; - - char *end; - int ret = strtol(specs, &end, 10); - - if (ret < 0 && nonneg || ret == 0 && end == specs) - ret = (nonneg ? -1 : 0); - - return ret; -} - -double prompt_for_float(const char* prompt) -{ - char specs[80]; - - msgwin_get_line(prompt, specs, sizeof(specs)); - - if (specs[0] == '\0') - return -1; - - char *end; - double ret = strtod(specs, &end); - - if (ret == 0 && end == specs) - ret = -1; - - return ret; -} diff --git a/crawl-ref/source/stuff.h b/crawl-ref/source/stuff.h index 115dcbf570..f30b6d8b23 100644 --- a/crawl-ref/source/stuff.h +++ b/crawl-ref/source/stuff.h @@ -45,24 +45,6 @@ class game_ended_condition : public exception { }; -// prompts - -bool yes_or_no(PRINTF(0, )); -typedef map<int, int> explicit_keymap; // doesn't need to be public -bool yesno(const char * str, bool safe, int safeanswer, - bool clear_after = true, bool interrupt_delays = true, - bool noprompt = false, - const explicit_keymap *map = NULL, - GotoRegion = GOTO_MSG); - -int yesnoquit(const char* str, bool safe = true, int safeanswer = 0, - bool allow_all = false, bool clear_after = true, - char alt_yes = 'Y', char alt_yes2 = 'Y'); - -int prompt_for_quantity(const char *prompt); -int prompt_for_int(const char *prompt, bool nonneg); -double prompt_for_float(const char* prompt); - // letter <-> index mapping char index_to_letter(int the_index); diff --git a/crawl-ref/source/transform.cc b/crawl-ref/source/transform.cc index a64ab8c237..a07732a71a 100644 --- a/crawl-ref/source/transform.cc +++ b/crawl-ref/source/transform.cc @@ -32,6 +32,7 @@ #include "player.h" #include "player-equip.h" #include "player-stats.h" +#include "prompt.h" #include "random.h" #include "religion.h" #include "skills2.h" diff --git a/crawl-ref/source/traps.cc b/crawl-ref/source/traps.cc index 39da0b2c4b..ffdd24ff0a 100644 --- a/crawl-ref/source/traps.cc +++ b/crawl-ref/source/traps.cc @@ -41,6 +41,7 @@ #include "mon-util.h" #include "ouch.h" #include "player.h" +#include "prompt.h" #include "religion.h" #include "shout.h" #include "skills.h" diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc index a742c6ec95..6c03136b56 100644 --- a/crawl-ref/source/travel.cc +++ b/crawl-ref/source/travel.cc @@ -42,6 +42,7 @@ #include "options.h" #include "place.h" #include "player.h" +#include "prompt.h" #include "religion.h" #include "stairs.h" #include "stash.h" diff --git a/crawl-ref/source/wiz-dgn.cc b/crawl-ref/source/wiz-dgn.cc index 937fd154c9..0503755ba1 100644 --- a/crawl-ref/source/wiz-dgn.cc +++ b/crawl-ref/source/wiz-dgn.cc @@ -30,6 +30,7 @@ #include "options.h" #include "place.h" #include "player.h" +#include "prompt.h" #include "religion.h" #include "stairs.h" #include "state.h" diff --git a/crawl-ref/source/wiz-item.cc b/crawl-ref/source/wiz-item.cc index 2b996518af..d03060ad3d 100644 --- a/crawl-ref/source/wiz-item.cc +++ b/crawl-ref/source/wiz-item.cc @@ -32,13 +32,13 @@ #include "mon-death.h" #include "options.h" #include "output.h" +#include "prompt.h" #include "player-equip.h" #include "religion.h" #include "skills2.h" #include "spl-book.h" #include "spl-util.h" #include "stash.h" -#include "stuff.h" #include "terrain.h" #ifdef WIZARD diff --git a/crawl-ref/source/wiz-mon.cc b/crawl-ref/source/wiz-mon.cc index 7c0dd1878e..83d0d5500b 100644 --- a/crawl-ref/source/wiz-mon.cc +++ b/crawl-ref/source/wiz-mon.cc @@ -38,6 +38,7 @@ #include "mon-speak.h" #include "mon-util.h" #include "output.h" +#include "prompt.h" #include "religion.h" #include "shout.h" #include "spl-miscast.h" diff --git a/crawl-ref/source/wiz-you.cc b/crawl-ref/source/wiz-you.cc index 039ef90c66..c9215a74cb 100644 --- a/crawl-ref/source/wiz-you.cc +++ b/crawl-ref/source/wiz-you.cc @@ -22,6 +22,7 @@ #include "newgame.h" #include "ng-setup.h" #include "player.h" +#include "prompt.h" #include "religion.h" #include "skills.h" #include "skills2.h" diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc index 4dc8d8b9b7..80a9fda1f0 100644 --- a/crawl-ref/source/xom.cc +++ b/crawl-ref/source/xom.cc @@ -51,6 +51,7 @@ #include "player-equip.h" #include "player-stats.h" #include "potion.h" +#include "prompt.h" #include "religion.h" #include "shout.h" #include "skills2.h" |