Windows/msvc lockstep changes
This commit is contained in:
parent
6a2c3c6c36
commit
6a47bc1e28
|
@ -24,6 +24,7 @@
|
|||
<ClCompile Include="..\..\..\src\EntityManager.cpp" />
|
||||
<ClCompile Include="..\..\..\src\GameEngine.cpp" />
|
||||
<ClCompile Include="..\..\..\src\main.cpp" />
|
||||
<ClCompile Include="..\..\..\src\McRFPy_API.cpp" />
|
||||
<ClCompile Include="..\..\..\src\MenuScene.cpp" />
|
||||
<ClCompile Include="..\..\..\src\Scene.cpp" />
|
||||
<ClCompile Include="..\..\..\src\UIMenu.cpp" />
|
||||
|
@ -34,6 +35,7 @@
|
|||
<ClInclude Include="..\..\..\src\ActionCode.h" />
|
||||
<ClInclude Include="..\..\..\src\Common.h" />
|
||||
<ClInclude Include="..\..\..\src\Components.h" />
|
||||
<ClInclude Include="..\platform.h" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
|
@ -155,7 +157,7 @@
|
|||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<AdditionalIncludeDirectories>C:\Users\jpm68\Share\McRogueFace\deps_windows\posix-stub;C:\Users\jpm68\Share\McRogueFace\platform\windows;C:\Users\jpm68\Share\McRogueFace\deps_windows\SFML-2.5.1\include;C:\Users\jpm68\Share\McRogueFace\deps_windows\Python-3.11.1\Include;C:\Users\jpm68\Share\McRogueFace\deps_windows\Python-3.11.1\PC;C:\Users\jpm68\Share\McRogueFace\deps_windows\libtcod-1.23.1-x86_64-msvc\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
|
|
|
@ -45,6 +45,9 @@
|
|||
<ClCompile Include="..\..\..\src\VectorShape.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\McRFPy_API.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\src\ActionCode.h">
|
||||
|
@ -56,5 +59,8 @@
|
|||
<ClInclude Include="..\..\..\src\Components.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\platform.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -12,10 +12,28 @@ std::wstring executable_path()
|
|||
return exec_path.substr(0, path_index);
|
||||
}
|
||||
|
||||
std::wstring executable_filename()
|
||||
{
|
||||
wchar_t buffer[MAX_PATH];
|
||||
GetModuleFileName(NULL, buffer, MAX_PATH);
|
||||
std::wstring exec_path = buffer;
|
||||
return exec_path;
|
||||
}
|
||||
|
||||
std::wstring working_path()
|
||||
{
|
||||
auto cwd = std::filesystem::current_path();
|
||||
return cwd.wstring();
|
||||
}
|
||||
|
||||
std::string narrow_string(std::wstring convertme)
|
||||
{
|
||||
//setup converter
|
||||
using convert_type = std::codecvt_utf8<wchar_t>;
|
||||
std::wstring_convert<convert_type, wchar_t> converter;
|
||||
|
||||
//use converter (.to_bytes: wstr->str, .from_bytes: str->wstr)
|
||||
return converter.to_bytes(convertme);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue