diff --git a/msvc140/Cataclysm.sln b/msvc140/Cataclysm.sln
new file mode 100644
index 0000000000000..bf47d50be5c9a
--- /dev/null
+++ b/msvc140/Cataclysm.sln
@@ -0,0 +1,71 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 14
+VisualStudioVersion = 14.0.22310.1
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Cataclysm", "Cataclysm.vcxproj", "{FE1372AC-5F90-447E-BBCA-1B253836EB77}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug Localized|Win32 = Debug Localized|Win32
+ Debug Localized|Win64 = Debug Localized|Win64
+ Debug SDL Localized|Win32 = Debug SDL Localized|Win32
+ Debug SDL Localized|Win64 = Debug SDL Localized|Win64
+ Debug SDL|Win32 = Debug SDL|Win32
+ Debug SDL|Win64 = Debug SDL|Win64
+ Debug TILES Localized|Win32 = Debug TILES Localized|Win32
+ Debug TILES Localized|Win64 = Debug TILES Localized|Win64
+ Debug TILES|Win32 = Debug TILES|Win32
+ Debug TILES|Win64 = Debug TILES|Win64
+ Debug|Win32 = Debug|Win32
+ Debug|Win64 = Debug|Win64
+ Release Localized|Win32 = Release Localized|Win32
+ Release Localized|Win64 = Release Localized|Win64
+ Release SDL Localized|Win32 = Release SDL Localized|Win32
+ Release SDL Localized|Win64 = Release SDL Localized|Win64
+ Release SDL|Win32 = Release SDL|Win32
+ Release SDL|Win64 = Release SDL|Win64
+ Release TILES Localized|Win32 = Release TILES Localized|Win32
+ Release TILES Localized|Win64 = Release TILES Localized|Win64
+ Release|Win32 = Release|Win32
+ Release|Win64 = Release|Win64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {FE1372AC-5F90-447E-BBCA-1B253836EB77}.Debug Localized|Win32.ActiveCfg = Debug Localized|Win32
+ {FE1372AC-5F90-447E-BBCA-1B253836EB77}.Debug Localized|Win32.Build.0 = Debug Localized|Win32
+ {FE1372AC-5F90-447E-BBCA-1B253836EB77}.Debug Localized|Win64.ActiveCfg = Debug Localized|Win32
+ {FE1372AC-5F90-447E-BBCA-1B253836EB77}.Debug SDL Localized|Win32.ActiveCfg = Debug SDL Localized|Win32
+ {FE1372AC-5F90-447E-BBCA-1B253836EB77}.Debug SDL Localized|Win32.Build.0 = Debug SDL Localized|Win32
+ {FE1372AC-5F90-447E-BBCA-1B253836EB77}.Debug SDL Localized|Win64.ActiveCfg = Debug SDL Localized|Win32
+ {FE1372AC-5F90-447E-BBCA-1B253836EB77}.Debug SDL|Win32.ActiveCfg = Debug SDL|Win32
+ {FE1372AC-5F90-447E-BBCA-1B253836EB77}.Debug SDL|Win32.Build.0 = Debug SDL|Win32
+ {FE1372AC-5F90-447E-BBCA-1B253836EB77}.Debug SDL|Win64.ActiveCfg = Debug SDL|Win32
+ {FE1372AC-5F90-447E-BBCA-1B253836EB77}.Debug TILES Localized|Win32.ActiveCfg = Debug TILES Localized|Win32
+ {FE1372AC-5F90-447E-BBCA-1B253836EB77}.Debug TILES Localized|Win32.Build.0 = Debug TILES Localized|Win32
+ {FE1372AC-5F90-447E-BBCA-1B253836EB77}.Debug TILES Localized|Win64.ActiveCfg = Debug TILES Localized|Win32
+ {FE1372AC-5F90-447E-BBCA-1B253836EB77}.Debug TILES|Win32.ActiveCfg = Debug TILES|Win32
+ {FE1372AC-5F90-447E-BBCA-1B253836EB77}.Debug TILES|Win32.Build.0 = Debug TILES|Win32
+ {FE1372AC-5F90-447E-BBCA-1B253836EB77}.Debug TILES|Win64.ActiveCfg = Debug TILES|Win32
+ {FE1372AC-5F90-447E-BBCA-1B253836EB77}.Debug|Win32.ActiveCfg = Debug|Win32
+ {FE1372AC-5F90-447E-BBCA-1B253836EB77}.Debug|Win32.Build.0 = Debug|Win32
+ {FE1372AC-5F90-447E-BBCA-1B253836EB77}.Debug|Win64.ActiveCfg = Debug|Win32
+ {FE1372AC-5F90-447E-BBCA-1B253836EB77}.Release Localized|Win32.ActiveCfg = Release Localized|Win32
+ {FE1372AC-5F90-447E-BBCA-1B253836EB77}.Release Localized|Win32.Build.0 = Release Localized|Win32
+ {FE1372AC-5F90-447E-BBCA-1B253836EB77}.Release Localized|Win64.ActiveCfg = Release Localized|Win32
+ {FE1372AC-5F90-447E-BBCA-1B253836EB77}.Release SDL Localized|Win32.ActiveCfg = Release SDL Localized|Win32
+ {FE1372AC-5F90-447E-BBCA-1B253836EB77}.Release SDL Localized|Win32.Build.0 = Release SDL Localized|Win32
+ {FE1372AC-5F90-447E-BBCA-1B253836EB77}.Release SDL Localized|Win64.ActiveCfg = Release SDL Localized|Win32
+ {FE1372AC-5F90-447E-BBCA-1B253836EB77}.Release SDL|Win32.ActiveCfg = Release SDL|Win32
+ {FE1372AC-5F90-447E-BBCA-1B253836EB77}.Release SDL|Win32.Build.0 = Release SDL|Win32
+ {FE1372AC-5F90-447E-BBCA-1B253836EB77}.Release SDL|Win64.ActiveCfg = Release SDL|Win32
+ {FE1372AC-5F90-447E-BBCA-1B253836EB77}.Release TILES Localized|Win32.ActiveCfg = Release TILES Localized|Win32
+ {FE1372AC-5F90-447E-BBCA-1B253836EB77}.Release TILES Localized|Win32.Build.0 = Release TILES Localized|Win32
+ {FE1372AC-5F90-447E-BBCA-1B253836EB77}.Release TILES Localized|Win64.ActiveCfg = Release TILES Localized|Win32
+ {FE1372AC-5F90-447E-BBCA-1B253836EB77}.Release|Win32.ActiveCfg = Release|Win32
+ {FE1372AC-5F90-447E-BBCA-1B253836EB77}.Release|Win32.Build.0 = Release|Win32
+ {FE1372AC-5F90-447E-BBCA-1B253836EB77}.Release|Win64.ActiveCfg = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/msvc140/Cataclysm.vcxproj b/msvc140/Cataclysm.vcxproj
new file mode 100644
index 0000000000000..d35bc0841159d
--- /dev/null
+++ b/msvc140/Cataclysm.vcxproj
@@ -0,0 +1,1215 @@
+
+
+
+
+ Debug Localized
+ Win32
+
+
+ Debug Localized
+ x64
+
+
+ Debug SDL Localized
+ Win32
+
+
+ Debug SDL Localized
+ x64
+
+
+ Debug SDL
+ Win32
+
+
+ Debug SDL
+ x64
+
+
+ Debug TILES Localized
+ Win32
+
+
+ Debug TILES Localized
+ x64
+
+
+ Debug TILES
+ Win32
+
+
+ Debug TILES
+ x64
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release Localized
+ Win32
+
+
+ Release Localized
+ x64
+
+
+ Release SDL Localized
+ Win32
+
+
+ Release SDL Localized
+ x64
+
+
+ Release SDL
+ Win32
+
+
+ Release SDL
+ x64
+
+
+ Release TILES Localized
+ Win32
+
+
+ Release TILES Localized
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CppCode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {FE1372AC-5F90-447E-BBCA-1B253836EB77}
+ Cataclysm
+ Cataclysm
+
+
+
+ Application
+ true
+ v140
+ MultiByte
+
+
+ Application
+ true
+ v140
+ MultiByte
+
+
+ Application
+ true
+ v140
+ MultiByte
+
+
+ Application
+ true
+ v140
+ MultiByte
+
+
+ Application
+ true
+ v140
+ MultiByte
+
+
+ Application
+ true
+ v140
+ MultiByte
+
+
+ Application
+ false
+ v140
+ true
+ MultiByte
+
+
+ Application
+ false
+ v140
+ true
+ MultiByte
+
+
+ Application
+ false
+ v140
+ true
+ MultiByte
+
+
+ Application
+ false
+ v140
+ true
+ MultiByte
+
+
+ Application
+ false
+ v140
+ true
+ MultiByte
+
+
+ Application
+ false
+ v140
+ true
+ MultiByte
+
+
+ Application
+ false
+ v140
+ true
+ MultiByte
+
+
+ Application
+ false
+ v140
+ true
+ MultiByte
+
+
+ Application
+ false
+ v140
+ true
+ MultiByte
+
+
+ Application
+ false
+ v140
+ true
+ MultiByte
+
+
+ Application
+ false
+ v140
+ true
+ MultiByte
+
+
+ Application
+ false
+ v140
+ true
+ MultiByte
+
+
+ Application
+ false
+ v140
+ true
+ MultiByte
+
+
+ Application
+ false
+ v140
+ true
+ MultiByte
+
+
+ Application
+ false
+ v140
+ true
+ MultiByte
+
+
+ Application
+ false
+ v140
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ..\
+
+
+ ..\
+
+
+ ..\
+
+
+ ..\
+
+
+ ..\
+
+
+ ..\
+
+
+ ..\
+
+
+ ..\
+
+
+ ..\
+
+
+ ..\
+
+
+ ..\
+
+
+ ..\
+
+
+ ..\
+
+
+ ..\
+
+
+ ..\
+
+
+ ..\
+
+
+ ..\
+
+
+ ..\
+
+
+ ..\
+
+
+ ..\
+
+
+ ..\
+
+
+ ..\
+
+
+
+ TurnOffAllWarnings
+ Disabled
+ false
+ 4100;4127;4996
+ _MBCS;_USE_MATH_DEFINES;%(PreprocessorDefinitions)
+ true
+ false
+ /Zc:inline /Zc:rvalueCast /Zc:strictStrings %(AdditionalOptions)
+
+
+ true
+ Windows
+ mainCRTStartup
+ winmm.lib;%(AdditionalDependencies)
+ true
+ true
+
+
+ getversion.cmd
+
+
+ Generate version.h
+
+
+
+
+ TurnOffAllWarnings
+ Disabled
+ false
+ 4100;4127;4996
+ _MBCS;_USE_MATH_DEFINES;TILES;%(PreprocessorDefinitions)
+ true
+ false
+
+
+ true
+ Windows
+ mainCRTStartup
+ winmm.lib;SDLMain.lib;SDL.lib;SDL_ttf.lib;SDL_image.lib;%(AdditionalDependencies)
+
+
+ getversion.cmd
+
+
+ Generate version.h
+
+
+
+
+ TurnOffAllWarnings
+ Disabled
+ false
+ 4100;4127;4996
+ _MBCS;_USE_MATH_DEFINES;LOCALIZE;%(PreprocessorDefinitions)
+ true
+
+
+ true
+ Windows
+ mainCRTStartup
+ winmm.lib;intl.lib;iconv.lib;%(AdditionalDependencies)
+
+
+ getversion.cmd
+
+
+ Generate version.h
+
+
+
+
+ TurnOffAllWarnings
+ Disabled
+ false
+ 4100;4127;4996
+ _MBCS;_USE_MATH_DEFINES;%(PreprocessorDefinitions)
+ true
+ /Zc:inline /Zc:rvalueCast /Zc:strictStrings %(AdditionalOptions)
+
+
+ true
+ winmm.lib;%(AdditionalDependencies)
+
+
+ getversion.cmd
+
+
+ Generate version.h
+
+
+
+
+ TurnOffAllWarnings
+ Disabled
+ false
+ 4100;4127;4996
+ _MBCS;_USE_MATH_DEFINES;TILES;%(PreprocessorDefinitions)
+ true
+
+
+ true
+ winmm.lib;libSDL.dll.lib;SDL_ttf.lib;%(AdditionalDependencies)
+
+
+ getversion.cmd
+
+
+ Generate version.h
+
+
+
+
+ TurnOffAllWarnings
+ Disabled
+ false
+ 4100;4127;4996
+ _MBCS;_USE_MATH_DEFINES;LOCALIZE;%(PreprocessorDefinitions)
+ true
+
+
+ true
+ winmm.lib;intl.lib;iconv.lib;%(AdditionalDependencies)
+
+
+ getversion.cmd
+
+
+ Generate version.h
+
+
+
+
+ TurnOffAllWarnings
+ MaxSpeed
+ true
+ true
+ false
+ 4100;4127;4996
+ _MBCS;_USE_MATH_DEFINES;%(PreprocessorDefinitions)
+ true
+
+
+ true
+ true
+ true
+ mainCRTStartup
+ Windows
+ winmm.lib;%(AdditionalDependencies)
+
+
+ getversion.cmd
+
+
+ Generate version.h
+
+
+
+
+ TurnOffAllWarnings
+ MaxSpeed
+ true
+ true
+ false
+ 4100;4127;4996
+ _MBCS;_USE_MATH_DEFINES;LOCALIZE;TILES;%(PreprocessorDefinitions)
+ true
+
+
+ true
+ true
+ true
+ mainCRTStartup
+ Windows
+ winmm.lib;intl.lib;iconv.lib;libSDL.dll.lib;SDL_ttf.lib;%(AdditionalDependencies)
+
+
+ getversion.cmd
+
+
+ Generate version.h
+
+
+
+
+ TurnOffAllWarnings
+ MaxSpeed
+ true
+ true
+ false
+ 4100;4127;4996
+ _MBCS;_USE_MATH_DEFINES;TILES;%(PreprocessorDefinitions)
+ true
+
+
+ true
+ true
+ true
+ mainCRTStartup
+ Windows
+ winmm.lib;SDLMain.lib;SDL.lib;SDL_ttf.lib;SDL_image.lib;%(AdditionalDependencies)
+
+
+ getversion.cmd
+
+
+ Generate version.h
+
+
+
+
+ TurnOffAllWarnings
+ MaxSpeed
+ true
+ true
+ false
+ 4100;4127;4996
+ _MBCS;_USE_MATH_DEFINES;LOCALIZE;%(PreprocessorDefinitions)
+ true
+
+
+ true
+ true
+ true
+ mainCRTStartup
+ Windows
+ winmm.lib;libintl.lib;libiconv.lib;%(AdditionalDependencies)
+
+
+ getversion.cmd
+
+
+ Generate version.h
+
+
+
+
+ TurnOffAllWarnings
+ MaxSpeed
+ true
+ true
+ false
+ 4100;4127;4996
+ _MBCS;_USE_MATH_DEFINES;LOCALIZE;TILES;%(PreprocessorDefinitions)
+ true
+
+
+ true
+ true
+ true
+ mainCRTStartup
+ Windows
+ winmm.lib;libintl.lib;libiconv.lib;SDLMain.lib;SDL.lib;SDL_ttf.lib;SDL_image.lib;%(AdditionalDependencies)
+
+
+ getversion.cmd
+
+
+ Generate version.h
+
+
+
+
+ TurnOffAllWarnings
+ MaxSpeed
+ true
+ true
+ false
+ 4100;4127;4996
+ _MBCS;_USE_MATH_DEFINES;LOCALIZE;TILES;SDLTILES;%(PreprocessorDefinitions)
+ true
+
+
+ true
+ true
+ true
+ mainCRTStartup
+ Windows
+ winmm.lib;libintl.lib;libiconv.lib;SDLMain.lib;SDL.lib;SDL_ttf.lib;SDL_image.lib;%(AdditionalDependencies)
+
+
+ getversion.cmd
+
+
+ Generate version.h
+
+
+
+
+ TurnOffAllWarnings
+ Disabled
+ true
+ true
+ false
+ 4100;4127;4996
+ _MBCS;_USE_MATH_DEFINES;LOCALIZE;TILES;SDLTILES;%(PreprocessorDefinitions)
+ true
+
+
+ true
+ true
+ true
+ mainCRTStartup
+ Windows
+ winmm.lib;libintl.lib;libiconv.lib;SDLMain.lib;SDL.lib;SDL_ttf.lib;SDL_image.lib;%(AdditionalDependencies)
+
+
+ getversion.cmd
+
+
+ Generate version.h
+
+
+
+
+ TurnOffAllWarnings
+ Disabled
+ true
+ true
+ false
+
+
+ _MBCS;_USE_MATH_DEFINES;TILES;SDLTILES;%(PreprocessorDefinitions)
+ true
+ CompileAsCpp
+ false
+ MultiThreadedDebugDLL
+
+
+ true
+ mainCRTStartup
+ Windows
+ winmm.lib;SDL2Main.lib;SDL2.lib;SDL2_ttf.lib;SDL2_image.lib;%(AdditionalDependencies)
+
+
+ getversion.cmd
+
+
+ Generate version.h
+
+
+
+
+ TurnOffAllWarnings
+ MaxSpeed
+ true
+ true
+ false
+ 4100;4127;4996
+ _MBCS;_USE_MATH_DEFINES;%(PreprocessorDefinitions)
+ true
+
+
+ true
+ true
+ true
+ Windows
+ mainCRTStartup
+ winmm.lib;%(AdditionalDependencies)
+
+
+ getversion.cmd
+
+
+ Generate version.h
+
+
+
+
+ TurnOffAllWarnings
+ MaxSpeed
+ true
+ true
+ false
+ 4100;4127;4996
+ _MBCS;_USE_MATH_DEFINES;LOCALIZE;TILES;%(PreprocessorDefinitions)
+ true
+
+
+ true
+ true
+ true
+ Windows
+ mainCRTStartup
+ winmm.lib;intl.lib;iconv.lib;libSDL.dll.lib;SDL_ttf.lib;%(AdditionalDependencies)
+
+
+ getversion.cmd
+
+
+ Generate version.h
+
+
+
+
+ TurnOffAllWarnings
+ MaxSpeed
+ true
+ true
+ false
+ 4100;4127;4996
+ _MBCS;_USE_MATH_DEFINES;TILES;%(PreprocessorDefinitions)
+ true
+
+
+ true
+ true
+ true
+ Windows
+ mainCRTStartup
+ winmm.lib;libSDL.dll.lib;SDL_ttf.lib;%(AdditionalDependencies)
+
+
+ getversion.cmd
+
+
+ Generate version.h
+
+
+
+
+ TurnOffAllWarnings
+ MaxSpeed
+ true
+ true
+ false
+ 4100;4127;4996
+ _MBCS;_USE_MATH_DEFINES;LOCALIZE;%(PreprocessorDefinitions)
+ true
+
+
+ true
+ true
+ true
+ Windows
+ mainCRTStartup
+ winmm.lib;intl.lib;iconv.lib;%(AdditionalDependencies)
+
+
+ getversion.cmd
+
+
+ Generate version.h
+
+
+
+
+ TurnOffAllWarnings
+ MaxSpeed
+ true
+ true
+ false
+ 4100;4127;4996
+ _MBCS;_USE_MATH_DEFINES;LOCALIZE;TILES;%(PreprocessorDefinitions)
+ true
+
+
+ true
+ true
+ true
+ Windows
+ mainCRTStartup
+ winmm.lib;intl.lib;iconv.lib;libSDL.dll.lib;SDL_ttf.lib;%(AdditionalDependencies)
+
+
+ getversion.cmd
+
+
+ Generate version.h
+
+
+
+
+ TurnOffAllWarnings
+ MaxSpeed
+ true
+ true
+ false
+ 4100;4127;4996
+ _MBCS;_USE_MATH_DEFINES;LOCALIZE;SDLTILES;%(PreprocessorDefinitions)
+ true
+
+
+ true
+ true
+ true
+ Windows
+ mainCRTStartup
+ winmm.lib;intl.lib;iconv.lib;libSDL.dll.lib;SDL_ttf.lib;SDL_image.lib;SDL_image.lib;%(AdditionalDependencies)
+
+
+ getversion.cmd
+
+
+ Generate version.h
+
+
+
+
+ TurnOffAllWarnings
+ MaxSpeed
+ true
+ true
+ false
+ 4100;4127;4996
+ _MBCS;_USE_MATH_DEFINES;LOCALIZE;SDLTILES;%(PreprocessorDefinitions)
+ true
+
+
+ true
+ true
+ true
+ Windows
+ mainCRTStartup
+ winmm.lib;intl.lib;iconv.lib;libSDL.dll.lib;SDL_ttf.lib;SDL_image.lib;SDL_image.lib;%(AdditionalDependencies)
+
+
+ getversion.cmd
+
+
+ Generate version.h
+
+
+
+
+ TurnOffAllWarnings
+ MaxSpeed
+ true
+ true
+ false
+
+
+ _MBCS;_USE_MATH_DEFINES;SDLTILES;%(PreprocessorDefinitions)
+ true
+ CompileAsCpp
+ MultiThreadedDebugDLL
+
+
+ true
+ Windows
+ mainCRTStartup
+ winmm.lib;intl.lib;iconv.lib;libSDL.dll.lib;SDL_ttf.lib;SDL_image.lib;SDL_image.lib;%(AdditionalDependencies)
+
+
+ getversion.cmd
+
+
+ Generate version.h
+
+
+
+
+
+
\ No newline at end of file
diff --git a/msvc140/common.props b/msvc140/common.props
new file mode 100644
index 0000000000000..788f2cbdbd7dd
--- /dev/null
+++ b/msvc140/common.props
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+ WIN32;_DEBUG;_MBCS;WIN32_LEAN_AND_MEAN;NOMINMAX;_WIN32_WINNT=0x0601;%(PreprocessorDefinitions)
+ /Zc:inline /Zc:rvalueCast /Zc:strictStrings %(AdditionalOptions)
+
+
+
+
\ No newline at end of file
diff --git a/msvc140/getversion.cmd b/msvc140/getversion.cmd
new file mode 100644
index 0000000000000..c94cacd174c3b
--- /dev/null
+++ b/msvc140/getversion.cmd
@@ -0,0 +1,5 @@
+@echo off
+SETLOCAL
+echo Generating "version.h"...
+for /F "tokens=*" %%i in ('git describe --tags --always --dirty --match "[0-9]*.[0-9]*"') do set VERSION=%%i
+>..\src\version.h echo #define VERSION "%VERSION%"
diff --git a/src/advanced_inv.cpp b/src/advanced_inv.cpp
index 99a2b1d867498..5231159e1e80b 100644
--- a/src/advanced_inv.cpp
+++ b/src/advanced_inv.cpp
@@ -32,7 +32,7 @@ advanced_inventory::advanced_inventory()
, dest( right )
, filter_edit( false )
// panes don't need initialization, they are recalculated immediately
- , squares { {
+ , squares ({ {
{ AIM_INVENTORY, 2, 25, 0, 0, _( "Inventory" ), _( "IN" ) },
{ AIM_SOUTHWEST, 3, 30, -1, 1, _( "South West" ), _( "SW" ) },
{ AIM_SOUTH, 3, 33, 0, 1, _( "South" ), _( "S" ) },
@@ -47,7 +47,7 @@ advanced_inventory::advanced_inventory()
{ AIM_DRAGED, 1, 25, 0, 0, _( "Grabbed Vehicle" ), _( "GR" ) },
{ AIM_CONTAINER, 1, 22, 0, 0, _( "Container" ), _( "CN" ) }
}
-}
+})
, head( nullptr )
, left_window( nullptr )
, right_window( nullptr )
diff --git a/src/catacharset.cpp b/src/catacharset.cpp
index 286acf374f150..1809e7b7043d1 100644
--- a/src/catacharset.cpp
+++ b/src/catacharset.cpp
@@ -2,7 +2,7 @@
#include
#include "debug.h"
#include "cursesdef.h"
-#include "wcwidth.c"
+#include "wcwidth.h"
//copied from SDL2_ttf code
unsigned UTF8_getch(const char **src, int *srclen)
diff --git a/src/debug.cpp b/src/debug.cpp
index 2a1e74b4360a5..8bdf96154f6fb 100644
--- a/src/debug.cpp
+++ b/src/debug.cpp
@@ -247,18 +247,59 @@ std::ostream &operator<<( std::ostream &out, DebugClass cl )
return out;
}
+struct time_info {
+ int hours;
+ int minutes;
+ int seconds;
+ int mseconds;
+
+ template
+ friend Stream& operator<<(Stream& out, time_info const& t) {
+ using char_t = typename Stream::char_type;
+ using base = std::basic_ostream;
+
+ static_assert(std::is_base_of::value, "");
+
+ out << t.hours << ':' << t.minutes << ':'
+ << t.seconds << '.' << t.mseconds;
+
+ return out;
+ }
+};
+
+#ifdef _MSC_VER
+inline time_info get_time() noexcept {
+ SYSTEMTIME time {};
+
+ GetLocalTime(&time);
+
+ return time_info {
+ static_cast(time.wHour)
+ , static_cast(time.wMinute)
+ , static_cast(time.wSecond)
+ , static_cast(time.wMilliseconds)
+ };
+}
+#else
+inline time_info get_time() noexcept {
+ timeval tv {};
+ gettimeofday( &tv, nullptr );
+
+ auto const tt = tv.tv_sec;
+ auto const current = localtime( &tt );
+
+ return time_info {
+ current->tm_hour
+ , current->tm_min
+ , current->tm_sec
+ , static_cast(tv.tv_usec / 1000 + 0.5)
+ };
+}
+#endif
+
std::ofstream &DebugFile::currentTime()
{
- struct tm *current;
- timeval tv;
- time_t tt;
- gettimeofday( &tv, NULL );
- tt = tv.tv_sec;
- current = localtime( &tt );
-
- file << current->tm_hour << ":" << current->tm_min << ":" <<
- current->tm_sec << "." << int( tv.tv_usec / 1000 + 0.5 );
- return file;
+ return (file << get_time());
}
std::ostream &DebugLog( DebugLevel lev, DebugClass cl )
diff --git a/src/game.cpp b/src/game.cpp
index 14f75cb8b4777..af864ca1bfa43 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -4132,7 +4132,7 @@ void game::update_scent()
sum_3_scent_y[y][x] = 0;
squares_used_y[y][x] = 0;
for (int i = y - 1; i <= y + 1; ++i) {
- if (not blocks_scent[x][i]) {
+ if (! blocks_scent[x][i]) {
if (reduces_scent[x][i]) {
// only 20% of scent can diffuse on REDUCE_SCENT squares
sum_3_scent_y[y][x] += 2 * grscent[x][i];
@@ -4147,7 +4147,7 @@ void game::update_scent()
}
for (int x = scentmap_minx; x <= scentmap_maxx; ++x) {
for (int y = scentmap_miny; y <= scentmap_maxy; ++y) {
- if (not blocks_scent[x][y]) {
+ if (! blocks_scent[x][y]) {
// to how many neighboring squares do we diffuse out? (include our own square
// since we also include our own square when diffusing in)
int squares_used = squares_used_y[y][x - 1]
@@ -4155,7 +4155,7 @@ void game::update_scent()
+ squares_used_y[y][x + 1];
int this_diffusivity;
- if (not reduces_scent[x][y]) {
+ if (! reduces_scent[x][y]) {
this_diffusivity = diffusivity;
} else {
this_diffusivity = diffusivity / 5; //less air movement for REDUCE_SCENT square
diff --git a/src/options.cpp b/src/options.cpp
index 8426b1fa173dc..4d263ee927093 100644
--- a/src/options.cpp
+++ b/src/options.cpp
@@ -567,24 +567,24 @@ void initOptions()
// TODO: scan for languages like we do for tilesets.
optionNames[""] = _("System language");
// Note: language names are in their own language and are *not* translated at all.
- optionNames["cs"] = "Čeština";
- optionNames["en"] = "English";
- optionNames["fi"] = "Suomi";
- optionNames["fr_FR"] = "Français (France)";
- optionNames["de_DE"] = "Deutsch (Deutschland)";
- optionNames["it"] = "Italiano";
- optionNames["es_AR"] = "Español (Argentina)";
- optionNames["es_ES"] = "Español (España)";
- optionNames["ja"] = "日本語";
- optionNames["ko"] = "한국어";
- optionNames["pl"] = "Polski";
- optionNames["pt_BR"] = "Português (Brasil)";
- optionNames["pt_PT"] = "Português (Portugal)";
- optionNames["ru"] = "Русский";
- optionNames["sr"] = "Srpski";
- optionNames["vi"] = "Tiếng Việt";
- optionNames["zh_CN"] = "中文(天朝)";
- optionNames["zh_TW"] = "中文(台灣)";
+ optionNames["cs"] = R"(Čeština)";
+ optionNames["en"] = R"(English)";
+ optionNames["fi"] = R"(Suomi)";
+ optionNames["fr_FR"] = R"(Français (France))";
+ optionNames["de_DE"] = R"(Deutsch (Deutschland))";
+ optionNames["it"] = R"(Italiano)";
+ optionNames["es_AR"] = R"(Español (Argentina))";
+ optionNames["es_ES"] = R"(Español (España))";
+ optionNames["ja"] = R"(日本語)";
+ optionNames["ko"] = R"(한국어)";
+ optionNames["pl"] = R"(Polski)";
+ optionNames["pt_BR"] = R"(Português (Brasil))";
+ optionNames["pt_PT"] = R"(Português (Portugal))";
+ optionNames["ru"] = R"(Русский)";
+ optionNames["sr"] = R"(Srpski)";
+ optionNames["vi"] = R"(Tiếng Việt)";
+ optionNames["zh_CN"] = R"(中文(天朝))";
+ optionNames["zh_TW"] = R"(中文(台灣))";
OPTIONS["USE_LANG"] = cOpt("interface", _("Language"), _("Switch Language. Requires restart."),
",cs,en,fi,fr_FR,de_DE,it_IT,es_AR,es_ES,ja,ko,pl,pt_BR,pt_PT,ru,sr,vi,zh_CN,zh_TW",
""
diff --git a/src/posix_time.h b/src/posix_time.h
index b1d118b47a7a6..3d6cad2b5c59d 100644
--- a/src/posix_time.h
+++ b/src/posix_time.h
@@ -16,7 +16,8 @@ extern "C" {
# endif
// Apparently this is defined by pthread.h, if that header had been included.
-#ifndef _TIMESPEC_DEFINED
+// _INC_TIME is defined in time.h for MSVC
+#if !defined(_TIMESPEC_DEFINED) && !defined(_INC_TIME)
#define _TIMESPEC_DEFINED
struct timespec
{
diff --git a/src/wcwidth.c b/src/wcwidth.h
similarity index 100%
rename from src/wcwidth.c
rename to src/wcwidth.h