diff --git a/.gitmodules b/.gitmodules
index 656289c2b..b8cbba76a 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -11,3 +11,6 @@
[submodule "deps/fix-rpaths"]
path = deps/fix-rpaths
url = https://gist.github.com/NQNStudios/7145bcf6621891f5176c8caa165d6b93
+[submodule "deps/fmtlib"]
+ path = deps/fmtlib
+ url = http://github.com/fmtlib/fmt
diff --git a/SConstruct b/SConstruct
index 19a9fce5f..855faaed5 100644
--- a/SConstruct
+++ b/SConstruct
@@ -84,7 +84,7 @@ print('C++ compiler:', cxx)
env.VariantDir('#build/obj', 'src')
env.VariantDir('#build/obj/test', 'test')
-env.VariantDir('#build/obj/test/deps', 'deps')
+env.VariantDir('#build/obj/deps', 'deps')
if not env['release']:
if platform in ['posix', 'darwin']:
@@ -236,7 +236,7 @@ elif platform == "win32":
include_paths=[path.join(vcpkg_installed, 'include')] + vcpkg_other_includes
env.Append(
LINKFLAGS=['/SUBSYSTEM:WINDOWS','/ENTRY:mainCRTStartup',f'/MACHINE:X{arch_short}'],
- CXXFLAGS=['/EHsc','/MD','/FIglobal.hpp'],
+ CXXFLAGS=['/EHsc','/MD','/FIglobal.hpp','/utf-8'],
CPPPATH=include_paths,
LIBPATH=[path.join(vcpkg_installed, 'lib')] + vcpkg_other_libs + vcpkg_other_bins,
LIBS=Split("""
@@ -411,6 +411,12 @@ if not env.GetOption('clean'):
env.Append(CPPPATH=[path.join(os.getcwd(), 'deps/cppcodec')])
+ # Make sure fmtlib is cloned
+ if not path.exists('deps/fmtlib/fmt/format.h'):
+ subprocess.call(["git", "submodule", "update", "--init", "deps/fmtlib"])
+
+ env.Append(CPPPATH=[path.join(os.getcwd(), 'deps/fmtlib/include')])
+
# On Linux, build TGUI from the subtree if necessary
if platform == 'posix':
def check_tgui(conf, second_attempt=False):
diff --git a/deps/fmtlib b/deps/fmtlib
new file mode 160000
index 000000000..814f51eab
--- /dev/null
+++ b/deps/fmtlib
@@ -0,0 +1 @@
+Subproject commit 814f51eab67a9bf0a7c3f9354fad75b610660719
diff --git a/proj/vs2013/Common/Common.vcxproj b/proj/vs2013/Common/Common.vcxproj
index 2307fbff6..0737b0376 100644
--- a/proj/vs2013/Common/Common.vcxproj
+++ b/proj/vs2013/Common/Common.vcxproj
@@ -283,6 +283,8 @@
+
+
@@ -428,9 +430,9 @@
Level3
Disabled
MSBUILD_GITREV;WIN32;_WINDOWS;TIXML_USE_TICPP;%(PreprocessorDefinitions);_DEBUG
- $(SolutionDir)..\..\deps\cppcodec;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src
+ $(SolutionDir)..\..\deps\cppcodec;$(SolutionDir)..\..\deps\fmtlib\include;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src
false
- /FS %(AdditionalOptions)
+ /FS %(AdditionalOptions) /utf-8
4800;4290;4244;4996;4018
@@ -457,9 +459,10 @@
true
true
MSBUILD_GITREV;WIN32;_WINDOWS;TIXML_USE_TICPP;%(PreprocessorDefinitions);NDEBUG
- $(SolutionDir)..\..\deps\cppcodec;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src
+ $(SolutionDir)..\..\deps\cppcodec;$(SolutionDir)..\..\deps\fmtlib\include;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src
+ /utf-8
4800;4290;4244;4996;4018
$(SolutionDir)..\..\src\global.hpp
diff --git a/proj/vs2013/Common/Common.vcxproj.filters b/proj/vs2013/Common/Common.vcxproj.filters
index c435cdb1b..b2ab60bae 100644
--- a/proj/vs2013/Common/Common.vcxproj.filters
+++ b/proj/vs2013/Common/Common.vcxproj.filters
@@ -831,6 +831,8 @@
Scenario
+
+
diff --git a/proj/vs2013/Game/Blades of Exile.vcxproj b/proj/vs2013/Game/Blades of Exile.vcxproj
index ade01991f..6780d1937 100644
--- a/proj/vs2013/Game/Blades of Exile.vcxproj
+++ b/proj/vs2013/Game/Blades of Exile.vcxproj
@@ -56,7 +56,8 @@
MSBUILD_GITREV;WIN32;_WINDOWS;TIXML_USE_TICPP;%(PreprocessorDefinitions);_DEBUG
- $(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src;$(SolutionDir)..\..\rsrc\menus
+ /utf-8
+ $(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\deps\fmtlib\include;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src;$(SolutionDir)..\..\rsrc\menus
4800;4290;4244;4996;4018
$(SolutionDir)..\..\src\global.hpp
@@ -77,8 +78,9 @@
MaxSpeed
true
true
+ /utf-8
MSBUILD_GITREV;WIN32;_WINDOWS;TIXML_USE_TICPP;%(PreprocessorDefinitions);NDEBUG
- $(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src;$(SolutionDir)..\..\rsrc\menus
+ $(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\deps\fmtlib\include;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src;$(SolutionDir)..\..\rsrc\menus
4800;4290;4244;4996;4018
@@ -167,4 +169,4 @@
-
\ No newline at end of file
+
diff --git a/proj/vs2013/OBoE Tests/OBoE Tests.vcxproj b/proj/vs2013/OBoE Tests/OBoE Tests.vcxproj
index 3d9d7d5bb..e663378fb 100644
--- a/proj/vs2013/OBoE Tests/OBoE Tests.vcxproj
+++ b/proj/vs2013/OBoE Tests/OBoE Tests.vcxproj
@@ -46,8 +46,9 @@
Level3
Disabled
+ /utf-8
$(SolutionDir)..\..\src\global.hpp
- $(SolutionDir)..\..\deps\Catch2\include;$(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src
+ $(SolutionDir)..\..\deps\Catch2\include;$(SolutionDir)..\..\deps\fmtlib\include;$(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src
WIN32;NDEBUG;_WINDOWS;TIXML_USE_TICPP;%(PreprocessorDefinitions)
4800;4290;4244;4996;4018
@@ -63,7 +64,8 @@
MaxSpeed
true
true
- $(SolutionDir)..\..\deps\Catch2\include;$(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src
+ /utf-8
+ $(SolutionDir)..\..\deps\Catch2\include;$(SolutionDir)..\..\deps\fmtlib\include;$(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src
$(SolutionDir)..\..\src\global.hpp
WIN32;NDEBUG;_WINDOWS;TIXML_USE_TICPP;%(PreprocessorDefinitions)
4800;4290;4244;4996;4018
@@ -81,7 +83,7 @@
Level3
Disabled
$(SolutionDir)..\..\src\global.hpp
- $(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src
+ $(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\deps\fmtlib\include;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src
WIN32;NDEBUG;_WINDOWS;TIXML_USE_TICPP;%(PreprocessorDefinitions)
4800;4290;4244;4996;4018
@@ -97,7 +99,8 @@
MaxSpeed
true
true
- $(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src
+ /utf-8
+ $(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\deps\fmtlib\include;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src
$(SolutionDir)..\..\src\global.hpp
WIN32;NDEBUG;_WINDOWS;TIXML_USE_TICPP;%(PreprocessorDefinitions)
4800;4290;4244;4996;4018
@@ -107,6 +110,7 @@
true
true
true
+ /utf-8
opengl32.lib;sfml-system.lib;sfml-window.lib;sfml-graphics.lib;sfml-audio.lib;libboost_filesystem-vc120-mt-*.lib;libboost_system-vc120-mt-*.lib;libboost_thread-vc120-mt-*.lib;zlib.lib;%(AdditionalDependencies)
diff --git a/proj/vs2013/PcEdit/Char Editor.vcxproj b/proj/vs2013/PcEdit/Char Editor.vcxproj
index 326998d65..af26fb84b 100644
--- a/proj/vs2013/PcEdit/Char Editor.vcxproj
+++ b/proj/vs2013/PcEdit/Char Editor.vcxproj
@@ -58,11 +58,12 @@
Level3
Disabled
WIN32;_DEBUG;_WINDOWS;TIXML_USE_TICPP;%(PreprocessorDefinitions)
- $(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src;$(SolutionDir)..\..\rsrc\menus
+ $(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\deps\fmtlib\include;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src;$(SolutionDir)..\..\rsrc\menus
4800;4290;4244;4996;4018
$(SolutionDir)..\..\src\global.hpp
+ /utf-8
Windows
@@ -82,11 +83,12 @@
true
true
WIN32;NDEBUG;_WINDOWS;TIXML_USE_TICPP;%(PreprocessorDefinitions)
- $(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src;$(SolutionDir)..\..\rsrc\menus
+ $(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\deps\fmtlib\include;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src;$(SolutionDir)..\..\rsrc\menus
4800;4290;4244;4996;4018
$(SolutionDir)..\..\src\global.hpp
+ /utf-8
Windows
@@ -135,4 +137,4 @@
-
\ No newline at end of file
+
diff --git a/proj/vs2013/ScenEdit/Scen Editor.vcxproj b/proj/vs2013/ScenEdit/Scen Editor.vcxproj
index 0c485a18f..43196e244 100644
--- a/proj/vs2013/ScenEdit/Scen Editor.vcxproj
+++ b/proj/vs2013/ScenEdit/Scen Editor.vcxproj
@@ -58,11 +58,12 @@
Level3
Disabled
WIN32;_DEBUG;_WINDOWS;TIXML_USE_TICPP;%(PreprocessorDefinitions)
- $(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src;$(SolutionDir)..\..\rsrc\menus
+ $(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\deps\fmtlib\include;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src;$(SolutionDir)..\..\rsrc\menus
4800;4290;4244;4996;4018
$(SolutionDir)..\..\src\global.hpp
+ /utf-8
Windows
@@ -82,11 +83,12 @@
true
true
WIN32;NDEBUG;_WINDOWS;TIXML_USE_TICPP;%(PreprocessorDefinitions)
- $(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src;$(SolutionDir)..\..\rsrc\menus
+ $(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\deps\fmtlib\include;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src;$(SolutionDir)..\..\rsrc\menus
4800;4290;4244;4996;4018
$(SolutionDir)..\..\src\global.hpp
+ /utf-8
Windows
@@ -148,4 +150,4 @@
-
\ No newline at end of file
+
diff --git a/proj/vs2017/Blades of Exile.vcxproj b/proj/vs2017/Blades of Exile.vcxproj
index e6ae5f501..a76ac68d0 100644
--- a/proj/vs2017/Blades of Exile.vcxproj
+++ b/proj/vs2017/Blades of Exile.vcxproj
@@ -81,8 +81,9 @@
Level3
EditAndContinue
Disabled
- $(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src;$(SolutionDir)..\..\rsrc\menus
+ $(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\deps\fmtlib\include;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src;$(SolutionDir)..\..\rsrc\menus
$(SolutionDir)..\..\src\global.hpp
+ /utf-8
@@ -99,8 +100,9 @@
MultiThreadedDLL
Level3
ProgramDatabase
- $(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src;$(SolutionDir)..\..\rsrc\menus
+ $(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\deps\fmtlib\include;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src;$(SolutionDir)..\..\rsrc\menus
$(SolutionDir)..\..\src\global.hpp
+ /utf-8
MachineX86
@@ -115,8 +117,9 @@
$(SolutionDir)..\..\src\global.hpp
- $(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src;$(SolutionDir)..\..\rsrc\menus
+ $(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\deps\fmtlib\include;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src;$(SolutionDir)..\..\rsrc\menus
$(SolutionDir)..\..\src\global.hpp
+ /utf-8
Level3
MSBUILD_GITREV;WIN32;_WINDOWS;BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE;TIXML_USE_TICPP;%(PreprocessorDefinitions)
false
@@ -134,8 +137,9 @@
$(SolutionDir)..\..\src\global.hpp
- $(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src;$(SolutionDir)..\..\rsrc\menus
+ $(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\deps\fmtlib\include;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src;$(SolutionDir)..\..\rsrc\menus
$(SolutionDir)..\..\src\global.hpp
+ /utf-8
false
Level3
MSBUILD_GITREV;WIN32;_WINDOWS;BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE;TIXML_USE_TICPP;%(PreprocessorDefinitions)
@@ -218,4 +222,4 @@
-
\ No newline at end of file
+
diff --git a/proj/vs2017/Character Editor/Character Editor.vcxproj b/proj/vs2017/Character Editor/Character Editor.vcxproj
index 8a576c4ca..fc0f2e53e 100644
--- a/proj/vs2017/Character Editor/Character Editor.vcxproj
+++ b/proj/vs2017/Character Editor/Character Editor.vcxproj
@@ -82,7 +82,8 @@
Level3
Disabled
true
- $(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src;$(SolutionDir)..\..\rsrc\menus
+ /utf-8
+ $(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\deps\fmtlib\include;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src;$(SolutionDir)..\..\rsrc\menus
$(SolutionDir)..\..\src\global.hpp
@@ -98,7 +99,8 @@
MultiThreadedDebugDLL
Level3
Disabled
- $(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src;$(SolutionDir)..\..\rsrc\menus
+ /utf-8
+ $(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\deps\fmtlib\include;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src;$(SolutionDir)..\..\rsrc\menus
$(SolutionDir)..\..\src\global.hpp
true
@@ -118,7 +120,8 @@
true
true
true
- $(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src;$(SolutionDir)..\..\rsrc\menus
+ /utf-8
+ $(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\deps\fmtlib\include;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src;$(SolutionDir)..\..\rsrc\menus
$(SolutionDir)..\..\src\global.hpp
@@ -139,7 +142,8 @@
MaxSpeed
true
true
- $(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src;$(SolutionDir)..\..\rsrc\menus
+ /utf-8
+ $(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\deps\fmtlib\include;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src;$(SolutionDir)..\..\rsrc\menus
$(SolutionDir)..\..\src\global.hpp
true
@@ -184,4 +188,4 @@
-
\ No newline at end of file
+
diff --git a/proj/vs2017/Common/Common.vcxproj b/proj/vs2017/Common/Common.vcxproj
index d2c0b4f87..1e490b342 100644
--- a/proj/vs2017/Common/Common.vcxproj
+++ b/proj/vs2017/Common/Common.vcxproj
@@ -89,9 +89,10 @@
MSBUILD_GITREV;WIN32;_WINDOWS;BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE;TIXML_USE_TICPP;%(PreprocessorDefinitions);NOMINMAX
+ /utf-8
- $(SolutionDir)..\..\deps\cppcodec;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src
+ $(SolutionDir)..\..\deps\cppcodec;$(SolutionDir)..\..\deps\fmtlib\include;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src
MachineX86
@@ -106,7 +107,8 @@
true
MultiThreadedDebugDLL
MSBUILD_GITREV;WIN32;_WINDOWS;BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE;TIXML_USE_TICPP;%(PreprocessorDefinitions);NOMINMAX
- $(SolutionDir)..\..\deps\cppcodec;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src
+ /utf-8
+ $(SolutionDir)..\..\deps\cppcodec;$(SolutionDir)..\..\deps\fmtlib\include;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src
$(SolutionDir)..\..\src\global.hpp
@@ -127,9 +129,10 @@
MSBUILD_GITREV;WIN32;_WINDOWS;BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE;TIXML_USE_TICPP;%(PreprocessorDefinitions);NOMINMAX
+ /utf-8
- $(SolutionDir)..\..\deps\cppcodec;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src
+ $(SolutionDir)..\..\deps\cppcodec;$(SolutionDir)..\..\deps\fmtlib\include;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src
MachineX86
@@ -149,7 +152,8 @@
true
MultiThreadedDLL
MSBUILD_GITREV;WIN32;_WINDOWS;BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE;TIXML_USE_TICPP;%(PreprocessorDefinitions);NOMINMAX
- $(SolutionDir)..\..\deps\cppcodec;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src
+ /utf-8
+ $(SolutionDir)..\..\deps\cppcodec;$(SolutionDir)..\..\deps\fmtlib\include;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src
$(SolutionDir)..\..\src\global.hpp
@@ -439,6 +443,8 @@
+
+
diff --git a/proj/vs2017/Common/Common.vcxproj.filters b/proj/vs2017/Common/Common.vcxproj.filters
index 30cb6bea4..cec5bfb77 100644
--- a/proj/vs2017/Common/Common.vcxproj.filters
+++ b/proj/vs2017/Common/Common.vcxproj.filters
@@ -824,6 +824,8 @@
Scenario
+
+
diff --git a/proj/vs2017/Scenario Editor/Scenario Editor.vcxproj b/proj/vs2017/Scenario Editor/Scenario Editor.vcxproj
index 08809b003..e12562c76 100644
--- a/proj/vs2017/Scenario Editor/Scenario Editor.vcxproj
+++ b/proj/vs2017/Scenario Editor/Scenario Editor.vcxproj
@@ -80,8 +80,9 @@
Level3
Disabled
true
+ /utf-8
$(SolutionDir)..\..\src\global.hpp
- $(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src;$(SolutionDir)..\..\rsrc\menus
+ $(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\deps\fmtlib\include;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src;$(SolutionDir)..\..\rsrc\menus
4996
@@ -97,8 +98,9 @@
MultiThreadedDebugDLL
Level3
Disabled
+ /utf-8
$(SolutionDir)..\..\src\global.hpp
- $(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src;$(SolutionDir)..\..\rsrc\menus
+ $(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\deps\fmtlib\include;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src;$(SolutionDir)..\..\rsrc\menus
$(SolutionDir)..\..\src\global.hpp
true
@@ -118,8 +120,9 @@
true
true
true
+ /utf-8
$(SolutionDir)..\..\src\global.hpp
- $(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src;$(SolutionDir)..\..\rsrc\menus
+ $(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\deps\fmtlib\include;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src;$(SolutionDir)..\..\rsrc\menus
4996
@@ -140,7 +143,8 @@
MaxSpeed
true
true
- $(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src;$(SolutionDir)..\..\rsrc\menus
+ /utf-8
+ $(SolutionDir)..\..\deps\Catch2\include\external;$(SolutionDir)..\..\deps\fmtlib\include;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src;$(SolutionDir)..\..\rsrc\menus
$(SolutionDir)..\..\src\global.hpp
true
@@ -201,4 +205,4 @@
-
\ No newline at end of file
+
diff --git a/proj/vs2017/Tests/Tests.vcxproj b/proj/vs2017/Tests/Tests.vcxproj
index 1387c442b..2d6ac77d9 100644
--- a/proj/vs2017/Tests/Tests.vcxproj
+++ b/proj/vs2017/Tests/Tests.vcxproj
@@ -97,7 +97,8 @@
MultiThreadedDebugDLL
Level3
Disabled
- $(SolutionDir)..\..\deps\Catch2\single_include\catch2;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src
+ /utf-8
+ $(SolutionDir)..\..\deps\Catch2\single_include\catch2;$(SolutionDir)..\..\deps\fmtlib\include;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src
true
stdafx.h
$(IntDir)$(TargetName).pch
@@ -117,7 +118,8 @@
MultiThreadedDebugDLL
Level3
Disabled
- $(SolutionDir)..\..\deps\Catch2\single_include\catch2;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src
+ /utf-8
+ $(SolutionDir)..\..\deps\Catch2\single_include\catch2;$(SolutionDir)..\..\deps\fmtlib\include;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src
true
@@ -139,7 +141,8 @@
MaxSpeed
true
true
- $(SolutionDir)..\..\deps\Catch2\single_include\catch2;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src
+ /utf-8
+ $(SolutionDir)..\..\deps\Catch2\single_include\catch2;$(SolutionDir)..\..\deps\fmtlib\include;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src
true
stdafx.h
$(IntDir)$(TargetName).pch
@@ -164,7 +167,8 @@
MaxSpeed
true
true
- $(SolutionDir)..\..\deps\Catch2\single_include\catch2;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src
+ /utf-8
+ $(SolutionDir)..\..\deps\Catch2\single_include\catch2;$(SolutionDir)..\..\deps\fmtlib\include;$(SolutionDir)..\..\src\fileio\gzstream;$(SolutionDir)..\..\src\fileio\xml-parser;$(SolutionDir)..\..\src\fileio\resmgr;$(SolutionDir)..\..\src\dialogxml\widgets;$(SolutionDir)..\..\src\dialogxml\dialogs;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\tools;$(SolutionDir)..\..\src\scenario;$(SolutionDir)..\..\src\universe;$(SolutionDir)..\..\src\fileio;$(SolutionDir)..\..\src\dialogxml;$(SolutionDir)..\..\src\gfx;$(SolutionDir)..\..\src
%(PreprocessorDefinitions)
true
@@ -227,4 +231,4 @@
-
\ No newline at end of file
+
diff --git a/proj/vscode/oboe.code-workspace b/proj/vscode/oboe.code-workspace
index be39ebdda..9d41a7336 100644
--- a/proj/vscode/oboe.code-workspace
+++ b/proj/vscode/oboe.code-workspace
@@ -104,6 +104,89 @@
"pattern": "rsrc/scenarios/*/dialogs/*.xml",
"systemId": "${workspaceFolder}/rsrc/schemas/dialog.xsd"
}
- ]
+ ],
+ "files.associations": {
+ "__bit_reference": "cpp",
+ "__config": "cpp",
+ "__debug": "cpp",
+ "__errc": "cpp",
+ "__functional_base": "cpp",
+ "__hash_table": "cpp",
+ "__locale": "cpp",
+ "__mutex_base": "cpp",
+ "__node_handle": "cpp",
+ "__nullptr": "cpp",
+ "__split_buffer": "cpp",
+ "__string": "cpp",
+ "__threading_support": "cpp",
+ "__tree": "cpp",
+ "__tuple": "cpp",
+ "algorithm": "cpp",
+ "any": "cpp",
+ "array": "cpp",
+ "atomic": "cpp",
+ "bit": "cpp",
+ "bitset": "cpp",
+ "cctype": "cpp",
+ "cfenv": "cpp",
+ "charconv": "cpp",
+ "chrono": "cpp",
+ "cmath": "cpp",
+ "codecvt": "cpp",
+ "complex": "cpp",
+ "condition_variable": "cpp",
+ "cstdarg": "cpp",
+ "cstddef": "cpp",
+ "cstdint": "cpp",
+ "cstdio": "cpp",
+ "cstdlib": "cpp",
+ "cstring": "cpp",
+ "ctime": "cpp",
+ "cwchar": "cpp",
+ "cwctype": "cpp",
+ "deque": "cpp",
+ "exception": "cpp",
+ "fstream": "cpp",
+ "functional": "cpp",
+ "future": "cpp",
+ "initializer_list": "cpp",
+ "iomanip": "cpp",
+ "ios": "cpp",
+ "iosfwd": "cpp",
+ "iostream": "cpp",
+ "istream": "cpp",
+ "iterator": "cpp",
+ "limits": "cpp",
+ "list": "cpp",
+ "locale": "cpp",
+ "map": "cpp",
+ "memory": "cpp",
+ "mutex": "cpp",
+ "new": "cpp",
+ "numeric": "cpp",
+ "optional": "cpp",
+ "ostream": "cpp",
+ "queue": "cpp",
+ "random": "cpp",
+ "ratio": "cpp",
+ "regex": "cpp",
+ "set": "cpp",
+ "sstream": "cpp",
+ "stack": "cpp",
+ "stdexcept": "cpp",
+ "streambuf": "cpp",
+ "string_view": "cpp",
+ "string": "cpp",
+ "system_error": "cpp",
+ "tuple": "cpp",
+ "type_traits": "cpp",
+ "typeindex": "cpp",
+ "typeinfo": "cpp",
+ "unordered_map": "cpp",
+ "unordered_set": "cpp",
+ "utility": "cpp",
+ "variant": "cpp",
+ "vector": "cpp"
+ }
}
}
\ No newline at end of file
diff --git a/proj/xc12/BoE.xcodeproj/project.pbxproj b/proj/xc12/BoE.xcodeproj/project.pbxproj
index 3642036e6..c8a6baba7 100755
--- a/proj/xc12/BoE.xcodeproj/project.pbxproj
+++ b/proj/xc12/BoE.xcodeproj/project.pbxproj
@@ -161,6 +161,8 @@
917823821B2F33F5007F3444 /* FLAC.framework in Copy Libraries and Frameworks */ = {isa = PBXBuildFile; fileRef = 9178237C1B2F33E9007F3444 /* FLAC.framework */; };
91870F84190C90980081C150 /* scenedit.xib in Resources */ = {isa = PBXBuildFile; fileRef = 914CA49F190C4E9200B6ADD1 /* scenedit.xib */; };
919145FC18E3AB1B005CF3A4 /* boe.appleevents.mm in Sources */ = {isa = PBXBuildFile; fileRef = 919145FB18E3A32F005CF3A4 /* boe.appleevents.mm */; };
+ 9191E3B12D8AFD5800AF6D01 /* os.cc in Sources */ = {isa = PBXBuildFile; fileRef = 9191E3AE2D8AFD5800AF6D01 /* os.cc */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; };
+ 9191E3B32D8AFD5800AF6D01 /* format.cc in Sources */ = {isa = PBXBuildFile; fileRef = 9191E3B02D8AFD5800AF6D01 /* format.cc */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; };
9192C12018F2745C0088A580 /* game.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9192C11E18F271920088A580 /* game.xib */; };
919B13A21BBCDF14009905A4 /* monst_legacy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 919B13A11BBCDE18009905A4 /* monst_legacy.cpp */; };
919B13A41BBD8854009905A4 /* item_legacy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 919B13A31BBD8849009905A4 /* item_legacy.cpp */; };
@@ -791,6 +793,8 @@
919145FF18E63B70005CF3A4 /* winutil.mac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = winutil.mac.mm; sourceTree = ""; };
9191460018E63D8E005CF3A4 /* scrollbar.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = scrollbar.cpp; sourceTree = ""; };
9191460118E6591F005CF3A4 /* boe.menus.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = boe.menus.hpp; sourceTree = ""; };
+ 9191E3AE2D8AFD5800AF6D01 /* os.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = os.cc; sourceTree = ""; };
+ 9191E3B02D8AFD5800AF6D01 /* format.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = format.cc; sourceTree = ""; };
9192C11E18F271920088A580 /* game.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = game.xib; path = ../rsrc/menus/game.xib; sourceTree = ""; };
919B13A11BBCDE18009905A4 /* monst_legacy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = monst_legacy.cpp; sourceTree = ""; };
919B13A31BBD8849009905A4 /* item_legacy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = item_legacy.cpp; sourceTree = ""; };
@@ -1400,6 +1404,7 @@
91F06E8F1A2EBEE70038E902 /* special_parse.hpp */,
919F2E72287E4E0500F47750 /* tagfile.hpp */,
91BFA3D91902ADD5001686E4 /* tarball.hpp */,
+ 9191E3A82D8AFCF000AF6D01 /* fmtlib */,
91BFA3DC19033E00001686E4 /* gzstream */,
912DFE8718E24B0B00B00D75 /* resmgr */,
910BBA190FB8C43E001E34EA /* xml-parser */,
@@ -1444,6 +1449,16 @@
path = ../../src;
sourceTree = "";
};
+ 9191E3A82D8AFCF000AF6D01 /* fmtlib */ = {
+ isa = PBXGroup;
+ children = (
+ 9191E3B02D8AFD5800AF6D01 /* format.cc */,
+ 9191E3AE2D8AFD5800AF6D01 /* os.cc */,
+ );
+ name = fmtlib;
+ path = ../../deps/fmtlib/src;
+ sourceTree = "";
+ };
91B3EECD0F969B7000BF5B67 /* ScenEd */ = {
isa = PBXGroup;
children = (
@@ -2211,6 +2226,8 @@
91EC1F0523DDFF9D00271891 /* res_font.cpp in Sources */,
91EC1F0623DDFF9D00271891 /* res_image.cpp in Sources */,
91EC1F0723DDFF9D00271891 /* res_sound.cpp in Sources */,
+ 9191E3B32D8AFD5800AF6D01 /* format.cc in Sources */,
+ 9191E3B12D8AFD5800AF6D01 /* os.cc in Sources */,
91EC1F0823DDFF9D00271891 /* res_strings.cpp in Sources */,
91F3205023E65EA3009650AF /* framerate_limiter.cpp in Sources */,
91FE0E3823F084B70084CA6B /* drawable_manager.cpp in Sources */,
@@ -2461,6 +2478,7 @@
"$(PROJECT_DIR)/../../src/fileio/xml-parser",
"$(PROJECT_DIR)/../../src/tools",
"$(PROJECT_DIR)/../../deps/Catch2/include/external",
+ "$(PROJECT_DIR)/../../deps/fmtlib/include",
);
LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks";
LIBRARY_SEARCH_PATHS = (
@@ -2577,6 +2595,7 @@
"$(PROJECT_DIR)/../../src/tools",
"$(PROJECT_DIR)/../../deps/Catch2/include/external",
"/usr/local/opt/boost@1.85/include",
+ "$(PROJECT_DIR)/../../deps/fmtlib/include",
);
LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks";
LIBRARY_SEARCH_PATHS = (
diff --git a/src/game/SConscript b/src/game/SConscript
index 3b2e14e58..dc3c8b9aa 100644
--- a/src/game/SConscript
+++ b/src/game/SConscript
@@ -24,6 +24,8 @@ game_sources = Split("""
../pcedit/pc.editors.cpp
../fileio/fileio_party.cpp
../view_dialogs.cpp
+ ../deps/fmtlib/src/format.cc
+ ../deps/fmtlib/src/os.cc
""")
if str(platform) == "darwin":
diff --git a/src/game/boe.actions.cpp b/src/game/boe.actions.cpp
index 77368b150..8bb52761f 100644
--- a/src/game/boe.actions.cpp
+++ b/src/game/boe.actions.cpp
@@ -2,6 +2,7 @@
#include
#include
#include
+#include
#include "boe.global.hpp"
#include "tools/replay.hpp"
@@ -833,7 +834,7 @@ void handle_talk(location destination, bool& did_something, bool& need_redraw, b
if(small_talk > 1000 && small_talk < 1000 + univ.scenario.spec_strs.size())
str = univ.scenario.spec_strs[small_talk - 1000];
// TODO: Come up with a set of pre-cooked responses.
- add_string_to_buf("Talk: " + str, 4);
+ add_string_to_buf(fmt::format("Talk: {}", str), 4);
} else if(univ.town.monst[i].is_alive()) {
start_talk_mode(i,univ.town.monst[i].personality,univ.town.monst[i].number,univ.town.monst[i].facial_pic);
did_something = false;
@@ -1006,7 +1007,7 @@ void handle_switch_pc(short which_pc, bool& need_redraw, bool& need_reprint) {
cPlayer& pc = univ.party[which_pc];
if(!prime_time() && overall_mode != MODE_SHOPPING && overall_mode != MODE_TALKING && overall_mode != MODE_ITEM_TARGET)
- add_string_to_buf("Set active: " + FINISH_FIRST);
+ add_string_to_buf(fmt::format("Set active: {}", FINISH_FIRST));
else if(is_combat()) {
if(univ.debug_mode && pc.ap <= 0){
pc.ap = 4;
@@ -1031,7 +1032,7 @@ void handle_switch_pc(short which_pc, bool& need_redraw, bool& need_reprint) {
store_cur_pc = -1;
set_stat_window_for_pc(which_pc);
- add_string_to_buf("Now " + std::string(overall_mode == MODE_SHOPPING ? "shopping" : "active") + ": " + pc.name);
+ add_string_to_buf(fmt::format(overall_mode == MODE_SHOPPING ? "Now shopping: {}" : "Now active: {}", pc.name));
adjust_spell_menus();
need_redraw = true;
}
@@ -1045,14 +1046,14 @@ void handle_switch_pc_items(short which_pc, bool& need_redraw) {
cPlayer& pc = univ.party[which_pc];
if(!prime_time() && overall_mode != MODE_TALKING && overall_mode != MODE_SHOPPING)
- add_string_to_buf("Set active: " + FINISH_FIRST);
+ add_string_to_buf(fmt::format("Set active: {}", FINISH_FIRST));
else {
if(!is_combat()) {
if(pc.main_status != eMainStatus::ALIVE && (overall_mode != MODE_SHOPPING || active_shop.getType() != eShopType::ALLOW_DEAD))
add_string_to_buf("Set active: PC must be here & active.");
else {
univ.cur_pc = which_pc;
- add_string_to_buf("Now active: " + pc.name);
+ add_string_to_buf(fmt::format("Now active: {}", pc.name));
adjust_spell_menus();
need_redraw = true;
}
@@ -1083,7 +1084,7 @@ void handle_equip_item(short item_hit, bool& need_redraw) {
} else if(stat_screen_mode > MODE_SHOP) {
// TODO: For some reason, the game didn't do anything at all in this case.
// I'm not sure why; maybe it intended to forward to the sell button?
- } else add_string_to_buf("Equip: " + FINISH_FIRST);
+ } else add_string_to_buf(fmt::format("Equip: {}", FINISH_FIRST));
}
void handle_use_item(short item_hit, bool& did_something, bool& need_redraw) {
@@ -1092,7 +1093,7 @@ void handle_use_item(short item_hit, bool& did_something, bool& need_redraw) {
}
if(!prime_time()) {
- add_string_to_buf("Use item: " + FINISH_FIRST);
+ add_string_to_buf(fmt::format("Use item: {}", FINISH_FIRST));
return;
}
use_item(stat_window, item_hit);
@@ -1108,7 +1109,7 @@ void handle_give_item(short item_hit, bool& did_something, bool& need_redraw) {
}
if(!prime_time()) {
- add_string_to_buf("Give item: " + FINISH_FIRST);
+ add_string_to_buf(fmt::format("Give item: {}", FINISH_FIRST));
return;
}
give_thing(stat_window, item_hit);
@@ -1126,7 +1127,7 @@ void handle_drop_item(short item_hit, bool& need_redraw) {
add_string_to_buf("Drop item: Cancelled");
overall_mode = is_town() ? MODE_TOWN : MODE_COMBAT;
} else if(!prime_time())
- add_string_to_buf("Drop item: " + FINISH_FIRST);
+ add_string_to_buf(fmt::format("Drop item: {}", FINISH_FIRST));
else if(is_out())
drop_item(stat_window,item_hit,univ.party.out_loc);
else {
@@ -1226,7 +1227,7 @@ void handle_alchemy(bool& need_redraw, bool& need_reprint) {
}
else if(is_combat()) add_string_to_buf("Alchemy: Not in combat.");
else if(!is_town()) add_string_to_buf("Alchemy: Only in town.");
- else add_string_to_buf("Alchemy: " + FINISH_FIRST);
+ else add_string_to_buf(fmt::format("Alchemy: {}", FINISH_FIRST));
}
static void handle_town_wait(bool& need_redraw, bool& need_reprint) {
@@ -1297,7 +1298,7 @@ void handle_wait(bool& did_something, bool& need_redraw, bool& need_reprint) {
handle_stand_ready(need_redraw, need_reprint);
advance_time(did_something, need_redraw, need_reprint);
} else {
- add_string_to_buf("Wait: " + FINISH_FIRST);
+ add_string_to_buf(fmt::format("Wait: {}", FINISH_FIRST));
print_buf();
}
}
@@ -1506,7 +1507,7 @@ void handle_trade_places(int which_pc, bool& need_reprint) {
record_action("handle_trade_places", boost::lexical_cast(which_pc));
}
if(!prime_time())
- add_string_to_buf("Trade places: " + FINISH_FIRST, 2);
+ add_string_to_buf(fmt::format("Trade places: {}", FINISH_FIRST), 2);
else if(is_combat())
add_string_to_buf("Trade places: Can't do this in combat.");
else {
@@ -1994,7 +1995,7 @@ void handle_menu_spell(eSpell spell_picked) {
eSkill spell_type = (*spell_picked).type;
if(!prime_time()) {
- ASB("Cast: " + FINISH_FIRST);
+ ASB(fmt::format("Cast: {}", FINISH_FIRST));
print_buf();
return;
}
@@ -2162,11 +2163,11 @@ void debug_give_item() {
bool given = univ.current_pc().give_item(univ.scenario.scen_items[i], GIVE_DO_PRINT | GIVE_ALLOW_OVERLOAD) == eBuyStatus::OK;
if(!given){
- ASB("Debug: can't give to " + univ.current_pc().name);
+ ASB(fmt::format("Debug: can't give to {}", univ.current_pc().name));
given = univ.party.give_item(univ.scenario.scen_items[i], GIVE_DO_PRINT | GIVE_ALLOW_OVERLOAD);
}
if(!given)
- ASB("Debug: can't give anyone " + univ.scenario.scen_items[i].full_name);
+ ASB(fmt::format("Debug: can't give anyone {}", univ.scenario.scen_items[i].full_name));
univ.scenario.scen_items[i].ident = was_ident;
print_buf();
@@ -2186,9 +2187,9 @@ void debug_overburden() {
// Give the PC very heavy objects that do nothing:
while(pc.give_item(item, GIVE_ALLOW_OVERLOAD) == eBuyStatus::OK){}
if(pc.has_space()){
- ASB("Debug: failed to fill " + pc.name + "'s inventory.");
+ ASB(fmt::format("Debug: failed to fill {}'s inventory.", pc.name));
}else{
- ASB("Debug: filled " + pc.name + "'s inventory.");
+ ASB(fmt::format("Debug: filled {}'s inventory.", pc.name));
}
print_buf();
stat_window = eItemWinMode(univ.cur_pc);
@@ -3009,7 +3010,7 @@ bool handle_keystroke(const sf::Event& event, cFramerateLimiter& fps_limiter){
else if(is_out())
ASB("Use: not outdoors");
else
- ASB("Use: " + FINISH_FIRST);
+ ASB(fmt::format("Use: {}", FINISH_FIRST));
break;
case 'b': // Bash door
@@ -3020,7 +3021,7 @@ bool handle_keystroke(const sf::Event& event, cFramerateLimiter& fps_limiter){
else if(is_out())
ASB("Bash Door: not outdoors");
else
- ASB("Bash Door: " + FINISH_FIRST);
+ ASB(fmt::format("Bash Door: {}", FINISH_FIRST));
break;
case 'L': // Pick lock
@@ -3031,7 +3032,7 @@ bool handle_keystroke(const sf::Event& event, cFramerateLimiter& fps_limiter){
else if(is_out())
ASB("Pick Lock: not outdoors");
else
- ASB("Pick Lock: " + FINISH_FIRST);
+ ASB(fmt::format("Pick Lock: {}", FINISH_FIRST));
break;
case 'A': // Alchemy
@@ -3605,7 +3606,7 @@ void handle_drop_pc() {
record_action("handle_drop_pc", "");
}
if(!prime_time()) {
- ASB("Delete PC: " + FINISH_FIRST);
+ ASB(fmt::format("Delete PC: {}", FINISH_FIRST));
print_buf();
}else if(is_combat()){
add_string_to_buf("Delete PC: Not in combat.");
@@ -3874,7 +3875,7 @@ static void run_waterfalls(short mode){ // mode 0 - town, 1 - outdoors
if(lost >= ter.flag3) {
lost = ter.flag3;
add_string_to_buf(" (Many supplies lost.)");
- } else add_string_to_buf(" (" + std::to_string(lost) + " supplies lost.)");
+ } else add_string_to_buf(fmt::format(" ({} supplies lost.)", lost));
univ.party.food -= lost;
}
put_pc_screen();
@@ -4074,7 +4075,7 @@ bool outd_move_party(location destination,bool forced) {
univ.party.i_w_c.x = (univ.party.out_loc.x > 47) ? 1 : 0;
univ.party.i_w_c.y = (univ.party.out_loc.y > 47) ? 1 : 0;
univ.party.loc_in_sec = global_to_local(univ.party.out_loc);
- add_string_to_buf("Moved: " + dir_str);
+ add_string_to_buf(fmt::format("Moved: {}", dir_str));
move_sound(univ.out[real_dest.x][real_dest.y],num_out_moves);
num_out_moves++;
@@ -4096,7 +4097,7 @@ bool outd_move_party(location destination,bool forced) {
return true;
}
else {
- add_string_to_buf("Blocked: " + dir_str);
+ add_string_to_buf(fmt::format("Blocked: {}", dir_str));
return false;
}
}
@@ -4203,7 +4204,7 @@ bool town_move_party(location destination,short forced) {
}
univ.party.town_loc = destination;
- add_string_to_buf("Moved: " + dir_str);
+ add_string_to_buf(fmt::format("Moved: {}", dir_str));
// place_treasure(destination,5,3);
move_sound(univ.town->terrain(destination.x,destination.y),(short) univ.party.age);
@@ -4359,7 +4360,7 @@ void preview_every_dialog_xml() {
std::string confirm = dlog.show();
if(confirm == "yes"){
std::for_each(dialog_paths.begin(), dialog_paths.end(), [](fs::path path) {
- LOG("Previewing dialog: " + path.stem().string());
+ LOG(fmt::format("Previewing dialog: {}", path.stem().string()));
preview_dialog_xml(path);
});
}
diff --git a/src/game/boe.combat.cpp b/src/game/boe.combat.cpp
index d93a044d1..94c2f2f0b 100644
--- a/src/game/boe.combat.cpp
+++ b/src/game/boe.combat.cpp
@@ -1,5 +1,6 @@
#include
+#include
#include "boe.global.hpp"
@@ -459,67 +460,67 @@ static void apply_weapon_status(eStatus status, int how_much, int dmg, iLiving&
switch(status) {
case eStatus::MAIN: break; // Not a valid status
case eStatus::INVISIBLE:
- add_string_to_buf(" " + weap_type + " leaks an odd-coloured aura.");
+ add_string_to_buf(fmt::format(" {} leaks an odd-coloured aura.", weap_type));
which_m.apply_status(eStatus::INVISIBLE, how_much / -2);
break;
case eStatus::MAGIC_RESISTANCE:
- add_string_to_buf(" " + weap_type + " leaks an odd-coloured aura.");
+ add_string_to_buf(fmt::format(" {} leaks an odd-coloured aura.", weap_type));
which_m.apply_status(eStatus::MAGIC_RESISTANCE, how_much / -2);
break;
case eStatus::INVULNERABLE:
- add_string_to_buf(" " + weap_type + " leaks an odd-coloured aura.");
+ add_string_to_buf(fmt::format(" {} leaks an odd-coloured aura.", weap_type));
which_m.apply_status(eStatus::INVULNERABLE, how_much / -2);
break;
case eStatus::POISONED_WEAPON:
- add_string_to_buf(" " + weap_type + " leaks an odd-coloured aura.");
+ add_string_to_buf(fmt::format(" {} leaks an odd-coloured aura.", weap_type));
which_m.apply_status(eStatus::POISONED_WEAPON, how_much / -2);
break;
case eStatus::POISON:
- add_string_to_buf(" " + weap_type + " drips venom.");
+ add_string_to_buf(fmt::format(" {} drips venom.", weap_type));
which_m.poison(how_much / 2);
break;
case eStatus::ACID:
- add_string_to_buf(" " + weap_type + " drips acid.");
+ add_string_to_buf(fmt::format(" {} drips acid.", weap_type));
which_m.acid(how_much / 2);
break;
case eStatus::BLESS_CURSE:
- add_string_to_buf(" " + weap_type + " leaks a dark aura.");
+ add_string_to_buf(fmt::format(" {} leaks a dark aura.", weap_type));
which_m.curse(how_much / 2);
break;
case eStatus::HASTE_SLOW:
- add_string_to_buf(" " + weap_type + " leaks a smoky aura.");
+ add_string_to_buf(fmt::format(" {} leaks a smoky aura.", weap_type));
which_m.slow(how_much / 2);
break;
case eStatus::WEBS:
- add_string_to_buf(" " + weap_type + " drips goo.");
+ add_string_to_buf(fmt::format(" {} drips goo.", weap_type));
which_m.web(how_much / 2);
break;
case eStatus::DISEASE:
- add_string_to_buf(" " + weap_type + " drips bile.");
+ add_string_to_buf(fmt::format(" {} drips bile.", weap_type));
which_m.disease(how_much / 2);
break;
case eStatus::DUMB:
- add_string_to_buf(" " + weap_type + " leaks a misty aura.");
+ add_string_to_buf(fmt::format(" {} leaks a misty aura.", weap_type));
which_m.dumbfound(how_much / 2);
break;
case eStatus::ASLEEP:
- add_string_to_buf(" " + weap_type + " emits coruscating lights.");
+ add_string_to_buf(fmt::format(" {} emits coruscating lights.", weap_type));
which_m.sleep(eStatus::ASLEEP, how_much / 2, 20 + dmg);
break;
case eStatus::PARALYZED:
- add_string_to_buf(" " + weap_type + " emits a purple flash.");
+ add_string_to_buf(fmt::format(" {} emits a purple flash.", weap_type));
which_m.sleep(eStatus::PARALYZED, how_much / 2, 20 + dmg);
break;
case eStatus::CHARM:
- add_string_to_buf(" " + weap_type + " leaks a bright aura.");
+ add_string_to_buf(fmt::format(" {} leaks a bright aura.", weap_type));
which_m.sleep(eStatus::CHARM, 0, 20 + dmg - how_much / 2);
break;
case eStatus::FORCECAGE:
- add_string_to_buf(" " + weap_type + " emits a green flash.");
+ add_string_to_buf(fmt::format(" {} emits a green flash.", weap_type));
which_m.sleep(eStatus::FORCECAGE, how_much, dmg - how_much / 2);
break;
case eStatus::MARTYRS_SHIELD:
- add_string_to_buf(" " + weap_type + " leaks an odd-coloured aura.");
+ add_string_to_buf(fmt::format(" {} leaks an odd-coloured aura.", weap_type));
which_m.apply_status(eStatus::MARTYRS_SHIELD, how_much / -2);
break;
}
@@ -656,16 +657,7 @@ void pc_attack_weapon(short who_att,iLiving& target,short hit_adj,short dam_adj,
if(bonus_dam)
inflicted_bonus_damage = damage_target(target, bonus_dam, dmg_tp, 0, false, who_att, race);
- if(inflicted_weapon_damage || inflicted_special_damage || inflicted_bonus_damage){
- if(cCreature* monst = dynamic_cast(&target)) {
- monst->damaged_msg(inflicted_weapon_damage, inflicted_special_damage + inflicted_bonus_damage);
- } else if(cPlayer* who = dynamic_cast(&target)) {
- std::string msg = " " + who->name + " takes " + std::to_string(inflicted_weapon_damage);
- if(inflicted_special_damage + inflicted_bonus_damage)
- msg += '+' + std::to_string(inflicted_special_damage + inflicted_bonus_damage);
- add_string_to_buf(msg + '.');
- }
- }
+ target.damaged_msg(inflicted_weapon_damage, inflicted_special_damage + inflicted_bonus_damage);
if(do_poison) {
// poison
if(attacker.status[eStatus::POISONED_WEAPON] > 0) {
@@ -708,8 +700,7 @@ void pc_attack_weapon(short who_att,iLiving& target,short hit_adj,short dam_adj,
}
else {
draw_terrain(2);
- create_line = " " + attacker.name + " misses.";
- add_string_to_buf(create_line);
+ add_string_to_buf(fmt::format(" {} misses.", attacker.name));
if(weap.weap_type == eSkill::POLE_WEAPONS)
play_sound(19);
else play_sound(2);
@@ -1183,7 +1174,7 @@ void do_combat_cast(location target) {
}
break;
default:
- add_string_to_buf(" Error: Summoning spell " + (*spell_being_cast).name() + " not implemented for combat mode.", 4);
+ add_string_to_buf(fmt::format(" Error: Summoning spell {} not implemented for combat mode.", (*spell_being_cast).name()), 4);
break;
}
break;
@@ -1398,7 +1389,7 @@ void do_combat_cast(location target) {
store_sound = 24;
break;
default:
- add_string_to_buf(" Error: Spell " + (*spell_being_cast).name() + " not implemented for combat mode.", 4);
+ add_string_to_buf(fmt::format(" Error: Spell not implemented for combat mode. {}", (*spell_being_cast).name()), 4);
break;
}
if(store_m_type >= 0) {
@@ -1667,19 +1658,14 @@ void fire_missile(location target) {
inflicted_weapon_damage = damage_monst(*monst, univ.cur_pc, r2, eDamageType::WEAPON,13,false);
if(spec_dam > 0)
inflicted_special_damage = damage_monst(*monst, univ.cur_pc, spec_dam, dmg_tp, 0,false);
- if(inflicted_weapon_damage || inflicted_special_damage)
- monst->damaged_msg(inflicted_weapon_damage, inflicted_special_damage);
+ monst->damaged_msg(inflicted_weapon_damage, inflicted_special_damage);
} else if(cPlayer* who = dynamic_cast(victim)) {
// TODO: Should the race really be included here? Maybe it's meant for melee attacks only.
eRace race = missile_firer.race;
inflicted_weapon_damage = damage_pc(*who, r2, eDamageType::WEAPON, race, 0, false);
if(spec_dam > 0)
inflicted_special_damage = damage_pc(*who, spec_dam, dmg_tp, race, 0, false);
- if(inflicted_weapon_damage || inflicted_special_damage) {
- std::string msg = " " + who->name + " takes " + std::to_string(inflicted_weapon_damage);
- if(spec_dam) msg += '+' + std::to_string(inflicted_special_damage);
- add_string_to_buf(msg + '.');
- }
+ who->damaged_msg(inflicted_weapon_damage, inflicted_special_damage);
}
// poison
if(missile_firer.status[eStatus::POISONED_WEAPON] > 0 && missile_firer.weap_poisoned.slot == ammo_inv_slot) {
@@ -2156,7 +2142,7 @@ void do_monster_turn() {
if(cur_monst->summon_time == 1) {
cur_monst->active = eCreatureStatus::DEAD;
cur_monst->ap = 0;
- cur_monst->spell_note(17);
+ cur_monst->spell_note(eSpellNote::DISAPPEARS);
}
move_to_zero(cur_monst->summon_time);
}
@@ -2529,7 +2515,7 @@ void do_monster_turn() {
if(what_summon) r1 = get_ran(1, abil.summon.min, abil.summon.max);
else r1 = 0;
if(r1 && summon_monster(what_summon, cur_monst->cur_loc,abil.summon.len,cur_monst->attitude,cur_monst->is_friendly())) {
- cur_monst->spell_note(33);
+ cur_monst->spell_note(eSpellNote::SUMMONS);
play_sound(61);
bool failed = false;
while(--r1 && !failed) {
@@ -2578,7 +2564,7 @@ void do_monster_turn() {
}
if(cur_monst->status[eStatus::ASLEEP] == 1)
- cur_monst->spell_note(29);
+ cur_monst->spell_note(eSpellNote::AWAKE);
move_to_zero(cur_monst->status[eStatus::ASLEEP]);
move_to_zero(cur_monst->status[eStatus::PARALYZED]);
move_to_zero(cur_monst->status[eStatus::INVISIBLE]);
@@ -2660,7 +2646,7 @@ void monster_attack(short who_att,iLiving* target) {
for(const auto& att : attacker->a)
if(att.dice != 0) {
- attacker->print_attacks(target);
+ attacker->print_attacks(*target);
break;
}
@@ -2900,47 +2886,26 @@ void monst_fire_missile(short m_num,short bless,std::pair a
case eMonstMissile::BOLT:
case eMonstMissile::RAPID_ARROW:
snd = 12;
- if(pc_target != nullptr)
- add_string_to_buf(" Shoots at " + pc_target->name + '.');
- else if(m_target != nullptr)
- m_target->spell_note(12);
+ target->spell_note(eSpellNote::SHOOTS);
break;
case eMonstMissile::SPEAR:
- if(pc_target != nullptr)
- add_string_to_buf(" Throws spear at " + pc_target->name + '.');
- else if(m_target != nullptr)
- m_target->spell_note(13);
+ target->spell_note(eSpellNote::THROWS_SPEAR);
break;
case eMonstMissile::RAZORDISK:
- if(pc_target != nullptr)
- add_string_to_buf(" Throws razordisk at " + pc_target->name + '.');
- else if(m_target != nullptr)
- m_target->spell_note(15);
+ target->spell_note(eSpellNote::THROWS_RAZORDISK);
break;
case eMonstMissile::SPINE:
- if(pc_target != nullptr)
- add_string_to_buf(" Fires spines at " + pc_target->name + '.');
- else if(m_target != nullptr)
- m_target->spell_note(32);
+ target->spell_note(eSpellNote::SPINES);
break;
case eMonstMissile::DART:
- if(pc_target != nullptr)
- add_string_to_buf(" Throws dart at " + pc_target->name + '.');
- else if(m_target != nullptr)
- m_target->spell_note(53);
+ target->spell_note(eSpellNote::THROWS_DART);
break;
case eMonstMissile::ROCK:
case eMonstMissile::BOULDER:
- if(pc_target != nullptr)
- add_string_to_buf(" Throws rock at " + pc_target->name + '.');
- else if(m_target != nullptr)
- m_target->spell_note(14);
+ target->spell_note(eSpellNote::THROWS_ROCK);
break;
case eMonstMissile::KNIFE:
- if(pc_target != nullptr)
- add_string_to_buf(" Throws knife at " + pc_target->name + '.');
- else if(m_target != nullptr)
- m_target->spell_note(54);
+ target->spell_note(eSpellNote::THROWS_KNIFE);
break;
}
if(abil.second.missile.type == eMonstMissile::ARROW || abil.second.missile.type == eMonstMissile::RAPID_ARROW || abil.second.missile.type == eMonstMissile::BOLT)
@@ -2967,19 +2932,15 @@ void monst_fire_missile(short m_num,short bless,std::pair a
size_t i_monst = univ.get_target_i(*target);
if(r1 <= hit_chance[abil.second.missile.skill]) {
r2 = get_ran(abil.second.missile.dice,1,abil.second.missile.sides) + min(10,bless);
+ target->spell_note(eSpellNote::HITS);
if(pc_target != nullptr) {
- add_string_to_buf(" Hits " + pc_target->name + '.');
// TODO: Should we pass in the monster's actual race here?
damage_pc(*pc_target,r2,eDamageType::WEAPON,eRace::UNKNOWN,13);
} else if(m_target != nullptr) {
- m_target->spell_note(16);
damage_monst(*m_target,7,r2,eDamageType::WEAPON,13);
}
} else {
- if(pc_target != nullptr)
- add_string_to_buf(" Misses " + pc_target->name + '.');
- else if(m_target != nullptr)
- m_target->spell_note(18);
+ target->spell_note(eSpellNote::MISSES);
}
if(pc_target != nullptr) {
if(cInvenSlot spec_item = pc_target->has_abil_equip(eItemAbil::HIT_CALL_SPECIAL)) {
@@ -3002,16 +2963,11 @@ void monst_fire_missile(short m_num,short bless,std::pair a
univ.town.monst[m_num].ap += abil.second.get_ap_cost(abil.first);
}
} else if(abil.first == eMonstAbil::MISSILE_WEB) {
- if(pc_target != nullptr)
- add_string_to_buf(" Throws web at " + pc_target->name + '.');
- else if(m_target != nullptr)
- m_target->spell_note(58);
+ target->spell_note(eSpellNote::THROWS_WEB);
run_a_missile(source, targ_space, 8, 0, 14, 0, 0, 100);
web_space(targ_space.x, targ_space.y);
} else if(abil.first == eMonstAbil::RAY_HEAT) {
- if(pc_target != nullptr) add_string_to_buf(" Hits " + pc_target->name + " with heat ray!");
- else if(m_target != nullptr)
- m_target->spell_note(55);
+ target->spell_note(eSpellNote::HEAT_RAY);
run_a_missile(source, targ_space, 13, 0, 51, 0, 0, 100);
uAbility proxy = {true};
proxy.gen.strength = abil.second.special.extra3;
@@ -3060,32 +3016,20 @@ void monst_fire_missile(short m_num,short bless,std::pair a
case eMonstGen::TOUCH: return; // never reached
case eMonstGen::RAY:
snd = 51;
- if(pc_target != nullptr)
- add_string_to_buf(" Fires ray at " + pc_target->name + '.');
- else if(m_target != nullptr)
- m_target->spell_note(55);
+ target->spell_note(eSpellNote::FIRES_RAY);
break;
case eMonstGen::GAZE:
snd = 43;
- if(pc_target != nullptr)
- add_string_to_buf(" Gazes at " + pc_target->name + '.');
- else if(m_target != nullptr)
- m_target->spell_note(56);
+ target->spell_note(eSpellNote::GAZES2);
break;
case eMonstGen::BREATH:
snd = 44;
- if(pc_target != nullptr)
- add_string_to_buf(" Breathes on " + pc_target->name + '.');
- else if(m_target != nullptr)
- m_target->spell_note(57);
+ target->spell_note(eSpellNote::BREATHES_ON);
break;
case eMonstGen::SPIT:
path_type = 1;
snd = 64;
- if(pc_target != nullptr)
- add_string_to_buf(" Spits at " + pc_target->name + '.');
- else if(m_target != nullptr)
- m_target->spell_note(59);
+ target->spell_note(eSpellNote::SPITS);
break;
}
if(abil.second.gen.pic < 0) play_sound(snd);
@@ -3184,11 +3128,10 @@ void monst_basic_abil(short m_num, std::pair abil, iLiving*
petrify_monst(*m_target, i);
break;
case eMonstAbil::DRAIN_SP:
+ target->spell_note(eSpellNote::DRAINS);
if(pc_target != nullptr) {
- add_string_to_buf(" Drains " + pc_target->name + '.');
pc_target->cur_sp = percent(pc_target->cur_sp, abil.second.gen.strength);
} else {
- m_target->spell_note(11);
// TODO: If mp < 4 it used to set monster's skill to 1. Should that be restored?
m_target->mp = percent(m_target->mp, abil.second.gen.strength);
}
@@ -3246,7 +3189,7 @@ bool monst_breathe(cCreature *caster,location targ_space,uAbility abil) {
run_a_missile(l,targ_space,abil.gen.pic,0,44,0,0,100);
else play_sound(44);
- caster->breathe_note();
+ caster->spell_note(eSpellNote::BREATHES);
short level = get_ran(abil.gen.strength,1,8);
if(!is_combat())
level = level / 3;
@@ -3577,7 +3520,7 @@ bool monst_cast_mage(cCreature *caster,short targ) {
do_shockwave(caster->cur_loc);
break;
default:
- add_string_to_buf(" Error: Mage spell " + (*spell).name() + " not implemented for monsters.", 4);
+ add_string_to_buf(fmt::format(" Error: Mage spell {} not implemented for monsters.", (*spell).name()), 4);
break;
}
}
@@ -3836,7 +3779,7 @@ bool monst_cast_priest(cCreature *caster,short targ) {
case eSpell::HEAL_MAJOR: r1 = get_ran(5,1,6) + 3; break;
case eSpell::HEAL_ALL: r1 = 50; break;
default:
- add_string_to_buf(" Error: Healing spell " + (*spell).name() + " not implemented for monsters.", 4);
+ add_string_to_buf(fmt::format(" Error: Healing spell {} not implemented for monsters.", (*spell).name()), 4);
break;
}
caster->heal(r1);
@@ -3873,7 +3816,7 @@ bool monst_cast_priest(cCreature *caster,short targ) {
break;
case eSpell::AVATAR:
play_sound(24);
- caster->spell_note(26);
+ caster->spell_note(eSpellNote::AVATAR);
caster->avatar();
break;
case eSpell::DIVINE_THUD:
@@ -3886,7 +3829,7 @@ bool monst_cast_priest(cCreature *caster,short targ) {
// doesn't describe fire or combustion, only force.
break;
default:
- add_string_to_buf(" Error: Priest spell " + (*spell).name() + " not implemented for monsters.", 4);
+ add_string_to_buf(fmt::format(" Error: Priest spell {} not implemented for monsters.", (*spell).name()), 4);
break;
}
@@ -4472,7 +4415,7 @@ void handle_disease() {
adjust_spell_menus();
break;
case 9: case 10:
- add_string_to_buf(" " + pc.name + " unaffected.");
+ add_string_to_buf(fmt::format(" {} unaffected.", pc.name));
break;
}
r1 = get_ran(1,0,7);
@@ -4670,32 +4613,32 @@ void combat_immed_mage_cast(short current_pc, eSpell spell_num, bool freebie) {
if(!freebie)
caster.cur_sp -= (*spell_num).cost;
play_sound(4);
- std::string c_line = " " + target_pc.name;
+ std::string c_line;
switch(spell_num) {
case eSpell::ENVENOM:
- c_line += " receives venom.";
+ c_line += " {} receives venom.";
poison_weapon(target,3 + bonus,true);
store_m_type = 11;
break;
case eSpell::STRENGTH:
- c_line += " stronger.";
+ c_line += " {} stronger.";
target_pc.curse(-3);
store_m_type = 8;
break;
case eSpell::RESIST_MAGIC:
- c_line += " resistant.";
+ c_line += " {} resistant.";
target_pc.status[eStatus::MAGIC_RESISTANCE] += 5 + bonus;
store_m_type = 15;
break;
default:
target_pc.slow((spell_num == eSpell::HASTE_MINOR) ? -2 : -max(2,level / 2 + bonus));
- c_line += " hasted.";
+ c_line += " {} hasted.";
store_m_type = 8;
break;
}
- add_string_to_buf(c_line);
+ add_string_to_buf(fmt::format(c_line, target_pc.name));
add_missile(target_pc.combat_pos,store_m_type,0,0,0);
}
break;
@@ -4739,7 +4682,7 @@ void combat_immed_mage_cast(short current_pc, eSpell spell_num, bool freebie) {
case eSpell::PARALYSIS_MASS: add_string_to_buf(" Enemy paralyzed:"); break;
case eSpell::SLEEP_MASS: add_string_to_buf(" Enemy drowsy:"); break;
default:
- add_string_to_buf(" Error: Mage group spell " + (*spell_num).name() + " not implemented for combat mode.", 4);
+ add_string_to_buf(fmt::format(" Error: Mage group spell {} not implemented for combat mode.", (*spell_num).name()), 4);
break;
}
for(short i = 0; i < univ.town.monst.size(); i++) {
@@ -4784,7 +4727,7 @@ void combat_immed_mage_cast(short current_pc, eSpell spell_num, bool freebie) {
place_spell_pattern(PAT_OPENSQ, caster.combat_pos, eDamageType::FIRE, 6, current_pc);
break;
default:
- add_string_to_buf(" Error: Mage spell " + (*spell_num).name() + " not implemented for combat mode.", 4);
+ add_string_to_buf(fmt::format(" Error: Mage spell {} not implemented for combat mode.", (*spell_num).name()), 4);
break;
}
if(num_opp < 10)
@@ -4882,7 +4825,7 @@ void combat_immed_priest_cast(short current_pc, eSpell spell_num, bool freebie)
case eSpell::AVATAR:
if(!freebie)
caster.cur_sp -= (*spell_num).cost;
- add_string_to_buf(" " + caster.name + " is an avatar!");
+ add_string_to_buf(fmt::format(" {} is an avatar!", caster.name));
caster.avatar();
break;
@@ -4914,7 +4857,7 @@ void combat_immed_priest_cast(short current_pc, eSpell spell_num, bool freebie)
store_m_type = 0;
break;
default:
- add_string_to_buf(" Error: Priest group spell " + (*spell_num).name() + " not implemented for combat mode.", 4);
+ add_string_to_buf(fmt::format(" Error: Priest group spell {} not implemented for combat mode.", (*spell_num).name()), 4);
break;
}
num_opp++;
@@ -4949,7 +4892,7 @@ void combat_immed_priest_cast(short current_pc, eSpell spell_num, bool freebie)
}
break;
default:
- add_string_to_buf(" Error: Priest spell " + (*spell_num).name() + " not implemented for combat mode.", 4);
+ add_string_to_buf(fmt::format(" Error: Priest spell {} not implemented for combat mode.", (*spell_num).name()), 4);
break;
}
if(num_opp < 10)
@@ -4997,7 +4940,7 @@ void start_spell_targeting(eSpell num, bool freebie, int spell_range, eSpellPat
default:
pat = PAT_SINGLE;
if((*num).refer != REFER_TARGET)
- add_string_to_buf(" Error: Entered targeting for non-targeted spell " + (*num).name(), 4);
+ add_string_to_buf(fmt::format(" Error: Entered targeting for non-targeted spell {}", (*num).name()), 4);
break;
}
@@ -5067,7 +5010,7 @@ void start_fancy_spell_targeting(eSpell num, bool freebie, int spell_range, eSpe
default:
if((*num).refer == REFER_FANCY)
std::cout << " Warning: Spell " << (*num).name() << " didn't assign target shape and count." << std::endl;
- else add_string_to_buf(" Error: Entered fancy targeting for non-fancy-targeted spell " + (*num).name(), 4);
+ else add_string_to_buf(fmt::format(" Error: Entered fancy targeting for non-fancy-targeted spell {}", (*num).name()), 4);
pat = PAT_SINGLE;
break;
}
@@ -5121,7 +5064,7 @@ void process_force_cage(location loc, short i, short adjust) {
if(!which_m.is_friendly() && get_ran(1,1,100) < which_m.mu * 10 + which_m.cl * 4 + 5 + adjust) {
// TODO: This sound is not right
play_sound(60);
- which_m.spell_note(50);
+ which_m.spell_note(eSpellNote::BREAKS_FORCECAGE);
break_force_cage(loc);
}
} else if(i < 0) {
@@ -5141,7 +5084,7 @@ void process_force_cage(location loc, short i, short adjust) {
short bonus = 5 + who.skill(eSkill::MAGE_LORE) + adjust;
if(get_ran(1,1,100) < who.skill(eSkill::MAGE_SPELLS)*10 + who.skill(eSkill::PRIEST_SPELLS)*4 + bonus) {
play_sound(60);
- add_string_to_buf(" " + who.name + " breaks force cage.");
+ add_string_to_buf(fmt::format(" {} breaks force cage.", who.name));
break_force_cage(loc);
}
}
diff --git a/src/game/boe.dlgutil.cpp b/src/game/boe.dlgutil.cpp
index 67368eceb..c99ba0722 100644
--- a/src/game/boe.dlgutil.cpp
+++ b/src/game/boe.dlgutil.cpp
@@ -4,6 +4,9 @@
#include
#include
#include
+#include
+#include
+#include
#include "boe.global.hpp"
@@ -772,15 +775,15 @@ static void fill_job_bank(cDialog& me, job_bank_t& bank, std::string) {
std::string id = std::to_string(i + 1);
if(bank.jobs[i] >= 0 && bank.jobs[i] < univ.scenario.quests.size()) {
cQuest& quest = univ.scenario.quests[bank.jobs[i]];
- std::string description = quest.descr;
+ std::vector lines{quest.descr};
if(quest.deadline > 0) {
if(quest.deadline_is_relative)
- description += " Must be completed in " + std::to_string(quest.deadline) + " days.";
- else description += " Must be completed by day " + std::to_string(quest.deadline) + ".";
+ lines.push_back(fmt::format("Must be completed in {} days.", quest.deadline));
+ else lines.push_back(fmt::format("Must be completed by day {}.", quest.deadline));
}
- description += " Pay is " + std::to_string(quest.gold) + " gold.";
+ lines.push_back(fmt::format("Pay is {} gold.", quest.gold));
me["take" + id].show();
- me["job" + id].setText(description);
+ me["job" + id].setText(fmt::format("{}", fmt::join(lines, " ")));
} else {
me["take" + id].hide();
me["job" + id].setText("");
@@ -1736,6 +1739,13 @@ void tip_of_day() {
}
+static const auto scen_descr_tmpl = FMT_COMPILE(""
+ "{name} v{version_major}.{version_minor}.{version_patch} - |"
+ " Difficulty: {difficulty}, Rating: {rating} |"
+ "{teaser1}|"
+ "{teaser2}"
+);
+
class cChooseScenario {
cDialog me{*ResMgr::dialogs.get("pick-scenario")};
std::vector scen_headers;
@@ -1755,16 +1765,18 @@ class cChooseScenario {
if(scen_headers.size() > (page * 3 + i)) {
me["pic" + n].show();
dynamic_cast(me["pic" + n]).setPict(scen_headers[page * 3 + i].intro_pic);
- clear_sstr(sout);
- sout << scen_headers[page * 3 + i].name;
- sout << " v" << int(scen_headers[page * 3 + i].ver[0]);
- sout << '.' << int(scen_headers[page * 3 + i].ver[1]);
- sout << '.' << int(scen_headers[page * 3 + i].ver[2]);
- sout << " - | Difficulty: " << difficulty[scen_headers[page * 3 + i].difficulty];
- sout << ", Rating: " << scen_headers[page * 3 + i].rating;
- sout << " |" << scen_headers[page * 3 + i].teaser1;
- sout << " |" << scen_headers[page * 3 + i].teaser2;
- me["desc" + n].setText(sout.str());
+ auto& header = scen_headers[page * 3 + i];
+ std::string description = fmt::format(scen_descr_tmpl,
+ fmt::arg("name", header.name),
+ fmt::arg("version_major", header.ver[0]),
+ fmt::arg("version_minor", header.ver[1]),
+ fmt::arg("version_patch", header.ver[2]),
+ fmt::arg("difficuly", difficulty[header.difficulty]),
+ fmt::arg("rating", header.rating),
+ fmt::arg("teaser1", header.teaser1),
+ fmt::arg("teaser2", header.teaser2)
+ );
+ me["desc" + n].setText(description);
me["start" + n].show();
} else {
me["pic" + n].hide();
diff --git a/src/game/boe.fileio.cpp b/src/game/boe.fileio.cpp
index 4e0e9d28b..a53c900de 100644
--- a/src/game/boe.fileio.cpp
+++ b/src/game/boe.fileio.cpp
@@ -23,6 +23,7 @@
#include "replay.hpp"
#include
#include
+#include
#define DONE_BUTTON_ITEM 1
@@ -468,12 +469,12 @@ bool load_scenario_header(fs::path file,scen_header_type& scen_head){
// V2 meta display: By {Author}, Contact: {Contact}|{Teaser!}
else{
if(!temp_scenario.contact_info[0].empty()){
- scen_head.teaser1 = "By " + temp_scenario.contact_info[0];
+ scen_head.teaser1 = fmt::format("By {}", temp_scenario.contact_info[0]);
}
if(!temp_scenario.contact_info[1].empty()){
if(!scen_head.teaser1.empty()) scen_head.teaser1 += ", ";
- scen_head.teaser1 += "Contact: " + temp_scenario.contact_info[1];
+ scen_head.teaser1 += fmt::format("Contact: {}", temp_scenario.contact_info[1]);
}
if(scen_head.teaser1.empty())
scen_head.teaser1 = temp_scenario.teaser_text[0];
@@ -544,4 +545,4 @@ void try_auto_save(std::string reason) {
ASB("Autosave: Save not completed");
}
print_buf();
-}
\ No newline at end of file
+}
diff --git a/src/game/boe.graphics.cpp b/src/game/boe.graphics.cpp
index 7d76df26b..d960a7bbd 100644
--- a/src/game/boe.graphics.cpp
+++ b/src/game/boe.graphics.cpp
@@ -39,6 +39,7 @@
#include "tools/prefs.hpp"
#include "replay.hpp"
#include
+#include
#ifndef MSBUILD_GITREV
@@ -375,36 +376,35 @@ void draw_startup_stats() {
}
style.pointSize = 12;
pc_rect.offset(12,16);
- std::string status = "Level " + std::to_string(univ.party[i].level);
+ std::string status = "Level {} {}", raceName;
switch(univ.party[i].main_status) {
case eMainStatus::ALIVE:
switch(univ.party[i].race) {
- case eRace::HUMAN: status += " Human"; break;
- case eRace::NEPHIL: status += " Nephilim"; break;
- case eRace::SLITH: status += " Slithzerikai"; break;
- case eRace::VAHNATAI: status += " Vahnatai"; break;
- case eRace::REPTILE: status += " Reptile"; break;
- case eRace::BEAST: status += " Beast"; break;
- case eRace::IMPORTANT: status += " V.I.P."; break;
- case eRace::MAGE: status += " Human Mage"; break;
- case eRace::PRIEST: status += " Human Priest"; break;
- case eRace::HUMANOID: status += " Humanoid"; break;
- case eRace::DEMON: status += " Demon"; break;
- case eRace::UNDEAD: status += " Undead"; break;
- case eRace::GIANT: status += " Giant"; break;
- case eRace::SLIME: status += " Slime"; break;
- case eRace::STONE: status += " Golem"; break;
- case eRace::BUG: status += " Bug"; break;
- case eRace::DRAGON: status += " Dragon"; break;
- case eRace::MAGICAL: status += " Magical Creature"; break;
- case eRace::PLANT: status += " Plant"; break;
- case eRace::BIRD: status += " Bird"; break;
- default: status += " *ERROR INVALID RACE*"; break;
+ case eRace::HUMAN: raceName += "Human"; break;
+ case eRace::NEPHIL: raceName += "Nephilim"; break;
+ case eRace::SLITH: raceName += "Slithzerikai"; break;
+ case eRace::VAHNATAI: raceName += "Vahnatai"; break;
+ case eRace::REPTILE: raceName += "Reptile"; break;
+ case eRace::BEAST: raceName += "Beast"; break;
+ case eRace::IMPORTANT: raceName += "V.I.P."; break;
+ case eRace::MAGE: raceName += "Human Mage"; break;
+ case eRace::PRIEST: raceName += "Human Priest"; break;
+ case eRace::HUMANOID: raceName += "Humanoid"; break;
+ case eRace::DEMON: raceName += "Demon"; break;
+ case eRace::UNDEAD: raceName += "Undead"; break;
+ case eRace::GIANT: raceName += "Giant"; break;
+ case eRace::SLIME: raceName += "Slime"; break;
+ case eRace::STONE: raceName += "Golem"; break;
+ case eRace::BUG: raceName += "Bug"; break;
+ case eRace::DRAGON: raceName += "Dragon"; break;
+ case eRace::MAGICAL: raceName += "Magical Creature"; break;
+ case eRace::PLANT: raceName += "Plant"; break;
+ case eRace::BIRD: raceName += "Bird"; break;
+ default: status += "*ERROR INVALID RACE*"; break;
}
- win_draw_string(mainPtr(),pc_rect,status,eTextMode::WRAP,style);
+ win_draw_string(mainPtr(),pc_rect,fmt::format(status, univ.party[i].level, raceName),eTextMode::WRAP,style);
pc_rect.offset(0,13);
- status = "Health " + std::to_string(univ.party[i].max_health);
- status += ", Spell pts. " + std::to_string(univ.party[i].max_sp);
+ status = fmt::format("Health {}, Spell pts. {}", univ.party[i].max_health, univ.party[i].max_sp);
break;
case eMainStatus::DEAD:
status = "Dead";
diff --git a/src/game/boe.infodlg.cpp b/src/game/boe.infodlg.cpp
index 059bd0cdd..e88971f1b 100644
--- a/src/game/boe.infodlg.cpp
+++ b/src/game/boe.infodlg.cpp
@@ -30,6 +30,7 @@
#include "tools/cursors.hpp"
#include "utility.hpp"
#include "replay.hpp"
+#include
short mage_spell_pos = 0,priest_spell_pos = 0,skill_pos = 0;
@@ -636,7 +637,7 @@ static void fill_journal(cDialog& me) {
std::string n = boost::lexical_cast(i + 1);
if((long)univ.party.journal.size() > i + (store_page_on * 3)) {
me["str" + n].setText(univ.party.journal[i].the_str);
- me["day" + n].setText("Day: " + std::to_string(univ.party.journal[i].day));
+ me["day" + n].setText(fmt::format("Day: {}", univ.party.journal[i].day));
}
else{
me["str" + n].setText("");
@@ -684,12 +685,12 @@ void put_quest_info(short which_i) {
quest_dlg["name"].setText(quest.name);
quest_dlg["descr"].setText(quest.descr);
int start = univ.party.active_quests[which_i].start;
- quest_dlg["start"].setText("Day " + std::to_string(start));
+ quest_dlg["start"].setText(fmt::format("Day {}", start));
if(quest.deadline > 0)
- quest_dlg["chop"].setText("Day " + std::to_string(quest.deadline + int(quest.deadline_is_relative) * start));
+ quest_dlg["chop"].setText(fmt::format("Day {}", quest.deadline + int(quest.deadline_is_relative) * start));
else quest_dlg["chop"].setText("None");
if(quest.gold > 0)
- quest_dlg["pay"].setText(std::to_string(quest.gold) + " gold");
+ quest_dlg["pay"].setText(fmt::format("{} gold", quest.gold));
else quest_dlg["pay"].setText("Unknown");
quest_dlg["done"].attachClickHandler(std::bind(&cDialog::toast, &quest_dlg, false));
quest_dlg.run();
diff --git a/src/game/boe.items.cpp b/src/game/boe.items.cpp
index 4e9cc41c5..6e59dfe43 100644
--- a/src/game/boe.items.cpp
+++ b/src/game/boe.items.cpp
@@ -30,6 +30,7 @@
#include "tools/cursors.hpp"
#include "fileio/resmgr/res_dialog.hpp"
#include "gfx/render_shapes.hpp"
+#include
extern short which_combat_type;
extern eGameMode overall_mode;
@@ -415,7 +416,7 @@ static void put_item_graphics(cDialog& me, size_t& first_item_shown, short& curr
pic.setPict(item.graphic_num - 1000, PIC_CUSTOM_ITEM);
else pic.setPict(item.graphic_num, PIC_ITEM);
me[detail].setText(item.interesting_string());
- me[weight].setText("Weight: " + std::to_string(item.item_weight()));
+ me[weight].setText(fmt::format("Weight: {}", item.item_weight()));
me[key].setText(key_stash);
} else { // erase the spot
me[pict].hide();
@@ -427,10 +428,8 @@ static void put_item_graphics(cDialog& me, size_t& first_item_shown, short& curr
}
if(current_getting_pc < 6) {
- std::ostringstream sout;
- sout << univ.party[current_getting_pc].name << " is carrying ";
- sout << univ.party[current_getting_pc].cur_weight() << " out of " << univ.party[current_getting_pc].max_weight() << '.';
- me["prompt"].setText(sout.str());
+ auto& who = univ.party[current_getting_pc];
+ me["prompt"].setText(fmt::format("{} is carrying {} out of {}.", who.name, who.cur_weight(), who.max_weight()));
}
for(short i = 0; i < 6; i++)
@@ -651,7 +650,7 @@ short get_num_of_items(short max_num) {
numPanel["extra-led"].hide();
numPanel.attachClickHandlers(get_num_of_items_event_filter, {"okay", "cancel"});
- numPanel["prompt"].setText("How many? (0-" + std::to_string(max_num) + ") ");
+ numPanel["prompt"].setText(fmt::format("How many? ({}-{})", 0, max_num));
numPanel["number"].setTextToNum(max_num);
numPanel.run();
@@ -974,7 +973,7 @@ short select_pc(eSelectPC mode, std::string title, eSkill highlight_highest, boo
const cItem& picks = *pick_slot;
std::string pick_name = picks.name;
if(picks.ident) pick_name = picks.full_name;
- extra_info = pick_name + " x " + std::to_string(picks.charges);
+ extra_info = fmt::format("{} x{}", pick_name, picks.charges);
}
}break;
// Suppress a compiler warning:
diff --git a/src/game/boe.main.cpp b/src/game/boe.main.cpp
index 9eb4aa3f8..2a5142992 100644
--- a/src/game/boe.main.cpp
+++ b/src/game/boe.main.cpp
@@ -7,6 +7,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -134,7 +135,7 @@ struct cParseEntrance {
boost::optional& opt;
cParseEntrance(boost::optional& opt) : opt(opt) {}
ParserResult operator()(std::string v) const {
- ParserResult error = ParserResult::logicError( "Invalid entrance: '" + v + "'. Try N, S, E, or W.");
+ ParserResult error = ParserResult::logicError(fmt::format("Invalid entrance: '{}'. Try N, S, E, or W.", v));
if(v.size() == 1){
switch(v.at(0)){
case 'N': case 'n': case '0':
@@ -166,7 +167,7 @@ struct cParseLocation {
opt = boost::lexical_cast(v);
return ParserResult::ok( ParseResultType::Matched );
}catch(boost::bad_lexical_cast){
- return ParserResult::logicError( "Invalid location: '" + v + "'. Try 'x,y' format.");
+ return ParserResult::logicError(fmt::format("Invalid location: '{}'. Try 'x,y' format.", v));
}
}
};
@@ -1052,8 +1053,8 @@ static void replay_feature_flags() {
std::string version = next_version->GetText();
// The game build needs to support the feature version that the replay had
if(!has_feature_flag(flag, version)){
- std::string error = "This replay requires a feature that is not supported in your version of Blades of Exile: " + flag + " should support '" + version + "'";
- throw error;
+ static const std::string error = "This replay requires a feature that is not supported in your version of Blades of Exile: {} should support '{}'";
+ throw fmt::format(error, flag, version);
}
supported_versions.push_back(version);
next_version = next_version->NextSiblingElement(false);
diff --git a/src/game/boe.monster.cpp b/src/game/boe.monster.cpp
index 52320bd4a..5db2d17b2 100644
--- a/src/game/boe.monster.cpp
+++ b/src/game/boe.monster.cpp
@@ -1,5 +1,6 @@
#include
+#include
#include "boe.global.hpp"
@@ -850,7 +851,7 @@ void monst_inflict_fields(short which_monst) {
break;
}
if(univ.town.is_web(where_check.x,where_check.y) && which_m->m_type != eRace::BUG) {
- which_m->spell_note(19);
+ which_m->spell_note(eSpellNote::WEBBED);
r1 = get_ran(1,2,3);
which_m->web(r1);
univ.town.set_web(where_check.x,where_check.y,false);
@@ -967,7 +968,7 @@ static bool monst_check_one_special_terrain(location where_check,short mode,shor
// Monster breaks the barrier
// TODO: Are these barrier sounds right?
play_sound(60);
- which_m->spell_note(49);
+ which_m->spell_note(eSpellNote::BREAKS_BARRIER);
univ.town.set_fire_barr(where_check.x,where_check.y,false);
}
else {
@@ -982,7 +983,7 @@ static bool monst_check_one_special_terrain(location where_check,short mode,shor
&& (!univ.town->strong_barriers)) {
// Monster breaks the barrier
play_sound(60);
- which_m->spell_note(49);
+ which_m->spell_note(eSpellNote::BREAKS_BARRIER);
univ.town.set_force_barr(where_check.x,where_check.y,false);
}
else can_enter = false;
@@ -1094,11 +1095,11 @@ void record_monst(cCreature* which_m, bool forced) {
// TODO: Are these two sounds right?
else if(r1 > cCreature::charm_odds[which_m->level / 2] || which_m->abil[eMonstAbil::SPLITS].active
|| which_m->m_type == eRace::IMPORTANT) {
- which_m->spell_note(10);
+ which_m->spell_note(eSpellNote::RESISTS);
play_sound(68);
}
else {
- which_m->spell_note(24);
+ which_m->spell_note(eSpellNote::RECORDED);
r1 = get_ran(1,0,univ.party.imprisoned_monst.size() - 1);
if(univ.party.imprisoned_monst[r1] == 0)
univ.party.imprisoned_monst[r1] = which_m->number;
@@ -1107,7 +1108,7 @@ void record_monst(cCreature* which_m, bool forced) {
univ.party.imprisoned_monst[r1] = which_m->number;
}
ASB("Capture Soul: Success!");
- add_string_to_buf(" Caught in slot " + std::to_string(r1 + 1) + ".");
+ add_string_to_buf(fmt::format(" Caught in slot {}.", r1 + 1));
play_sound(53);
}
}
@@ -1183,7 +1184,7 @@ bool summon_monster(mon_num_t which,location where,short duration,eAttitude give
univ.town.monst[spot].summon_time = duration;
univ.town.monst[spot].party_summoned = by_party;
- univ.town.monst[spot].spell_note(21);
+ univ.town.monst[spot].spell_note(eSpellNote::SUMMONED);
return true;
}
diff --git a/src/game/boe.newgraph.cpp b/src/game/boe.newgraph.cpp
index b978b3a02..f192cf752 100644
--- a/src/game/boe.newgraph.cpp
+++ b/src/game/boe.newgraph.cpp
@@ -34,6 +34,7 @@
#include "tools/enum_map.hpp"
#include "replay.hpp"
#include
+#include
short monsters_faces[190] = {
0,1,2,3,4,5,6,7,8,9,
@@ -824,11 +825,11 @@ void draw_shop_graphics(bool item_pressed, bool item_help_pressed, rectangle cli
} break;
case eShopItemType::MAGE_SPELL:
spell = cSpell::fromNum(eSkill::MAGE_SPELLS, base_item.item_level);
- cur_info_str = "Level: " + std::to_string((*spell).level) + " SP: " + std::to_string((*spell).cost);
+ cur_info_str = fmt::format("Level: {} SP: {}", (*spell).level, (*spell).cost);
break;
case eShopItemType::PRIEST_SPELL:
spell = cSpell::fromNum(eSkill::PRIEST_SPELLS, base_item.item_level);
- cur_info_str = "Level: " + std::to_string((*spell).level) + " SP: " + std::to_string((*spell).cost);
+ cur_info_str = fmt::format("Level: {} SP: {}", (*spell).level, (*spell).cost);
break;
case eShopItemType::SKILL:
cur_info_str = "Increase skill by 1";
@@ -1101,4 +1102,4 @@ void handle_target_mode(eGameMode target_mode, int range, eSpell spell) {
draw_terrain();
}
}
-}
\ No newline at end of file
+}
diff --git a/src/game/boe.party.cpp b/src/game/boe.party.cpp
index 95262d51b..7c4bf839e 100644
--- a/src/game/boe.party.cpp
+++ b/src/game/boe.party.cpp
@@ -5,6 +5,7 @@
#include
#include