Merge branch 'master' into jgrpp

# Conflicts:
#	src/company_cmd.cpp
#	src/core/geometry_func.cpp
#	src/date.cpp
#	src/genworld_gui.cpp
#	src/gfx.cpp
#	src/object_gui.cpp
#	src/openttd.cpp
#	src/settings_type.h
#	src/video/allegro_v.cpp
#	src/video/dedicated_v.cpp
#	src/video/null_v.cpp
#	src/video/sdl2_v.cpp
#	src/video/sdl_v.cpp
#	src/video/win32_v.cpp
This commit is contained in:
Jonathan G Rennison
2021-02-19 15:38:34 +00:00
176 changed files with 4275 additions and 3826 deletions

View File

@@ -153,54 +153,44 @@
/* Stuff for MSVC */
#if defined(_MSC_VER)
# pragma once
# ifdef _WIN64
/* No 64-bit Windows below XP, so we can safely assume it as the target platform. */
# define NTDDI_VERSION NTDDI_WINXP // Windows XP
# define _WIN32_WINNT 0x501 // Windows XP
# define _WIN32_WINDOWS 0x501 // Windows XP
# define WINVER 0x0501 // Windows XP
# define _WIN32_IE_ 0x0600 // 6.0 (XP+)
# else
/* Define a win32 target platform, to override defaults of the SDK
* We need to define NTDDI version for Vista SDK, but win2k is minimum */
#define NTDDI_VERSION NTDDI_WIN2K // Windows 2000
#define _WIN32_WINNT 0x0500 // Windows 2000
#define _WIN32_WINDOWS 0x400 // Windows 95
#define WINVER 0x0400 // Windows NT 4.0 / Windows 95
#define _WIN32_IE_ 0x0401 // 4.01 (win98 and NT4SP5+)
#endif
#define NOMINMAX // Disable min/max macros in windows.h.
# define NTDDI_VERSION NTDDI_WINXP // Windows XP
# define _WIN32_WINNT 0x501 // Windows XP
# define _WIN32_WINDOWS 0x501 // Windows XP
# define WINVER 0x0501 // Windows XP
# define _WIN32_IE_ 0x0600 // 6.0 (XP+)
#pragma warning(disable: 4244) // 'conversion' conversion from 'type1' to 'type2', possible loss of data
#pragma warning(disable: 4761) // integral size mismatch in argument : conversion supplied
#pragma warning(disable: 4200) // nonstandard extension used : zero-sized array in struct/union
#pragma warning(disable: 4355) // 'this' : used in base member initializer list
# define NOMINMAX // Disable min/max macros in windows.h.
#if (_MSC_VER < 1400) // MSVC 2005 safety checks
#error "Only MSVC 2005 or higher are supported. MSVC 2003 and earlier are not! Upgrade your compiler."
#endif /* (_MSC_VER < 1400) */
#pragma warning(disable: 4291) // no matching operator delete found; memory will not be freed if initialization throws an exception (reason: our overloaded functions never throw an exception)
#pragma warning(disable: 4996) // 'function': was declared deprecated
#pragma warning(disable: 6308) // code analyzer: 'realloc' might return null pointer: assigning null pointer to 't_ptr', which is passed as an argument to 'realloc', will cause the original memory block to be leaked
#pragma warning(disable: 6011) // code analyzer: Dereferencing nullptr pointer 'pfGetAddrInfo': Lines: 995, 996, 998, 999, 1001
#pragma warning(disable: 6326) // code analyzer: potential comparison of a constant with another constant
#pragma warning(disable: 6031) // code analyzer: Return value ignored: 'ReadFile'
#pragma warning(disable: 6255) // code analyzer: _alloca indicates failure by raising a stack overflow exception. Consider using _malloca instead
#pragma warning(disable: 6246) // code analyzer: Local declaration of 'statspec' hides declaration of the same name in outer scope. For additional information, see previous declaration at ...
# pragma warning(disable: 4244) // 'conversion' conversion from 'type1' to 'type2', possible loss of data
# pragma warning(disable: 4761) // integral size mismatch in argument : conversion supplied
# pragma warning(disable: 4200) // nonstandard extension used : zero-sized array in struct/union
# pragma warning(disable: 4355) // 'this' : used in base member initializer list
#if (_MSC_VER == 1500) // Addresses item #13 on http://blogs.msdn.com/b/vcblog/archive/2008/08/11/tr1-fixes-in-vc9-sp1.aspx, for Visual Studio 2008
#define _DO_NOT_DECLARE_INTERLOCKED_INTRINSICS_IN_MEMORY
#include <intrin.h>
#endif
# if (_MSC_VER < 1400) // MSVC 2005 safety checks
# error "Only MSVC 2005 or higher are supported. MSVC 2003 and earlier are not! Upgrade your compiler."
# endif /* (_MSC_VER < 1400) */
# pragma warning(disable: 4291) // no matching operator delete found; memory will not be freed if initialization throws an exception (reason: our overloaded functions never throw an exception)
# pragma warning(disable: 4996) // 'function': was declared deprecated
# pragma warning(disable: 6308) // code analyzer: 'realloc' might return null pointer: assigning null pointer to 't_ptr', which is passed as an argument to 'realloc', will cause the original memory block to be leaked
# pragma warning(disable: 6011) // code analyzer: Dereferencing NULL pointer 'pfGetAddrInfo': Lines: 995, 996, 998, 999, 1001
# pragma warning(disable: 6326) // code analyzer: potential comparison of a constant with another constant
# pragma warning(disable: 6031) // code analyzer: Return value ignored: 'ReadFile'
# pragma warning(disable: 6255) // code analyzer: _alloca indicates failure by raising a stack overflow exception. Consider using _malloca instead
# pragma warning(disable: 6246) // code analyzer: Local declaration of 'statspec' hides declaration of the same name in outer scope. For additional information, see previous declaration at ...
#include <malloc.h> // alloca()
#define NORETURN __declspec(noreturn)
#if (_MSC_VER < 1900)
#define inline __forceinline
#endif
# if (_MSC_VER == 1500) // Addresses item #13 on http://blogs.msdn.com/b/vcblog/archive/2008/08/11/tr1-fixes-in-vc9-sp1.aspx, for Visual Studio 2008
# define _DO_NOT_DECLARE_INTERLOCKED_INTRINSICS_IN_MEMORY
# include <intrin.h>
# endif
#define CDECL _cdecl
#define WARN_FORMAT(string, args)
# include <malloc.h> // alloca()
# define NORETURN __declspec(noreturn)
# if (_MSC_VER < 1900)
# define inline __forceinline
# endif
# define CDECL _cdecl
# define WARN_FORMAT(string, args)
# ifndef __clang__
# define FINAL sealed
# else