diff --git a/projects/language/language.vcxproj b/projects/language/language.vcxproj
index 232d4f6509..fe2b874ec2 100644
--- a/projects/language/language.vcxproj
+++ b/projects/language/language.vcxproj
@@ -22,20 +22,20 @@
Utility
true
- v120
+ v140
MultiByte
Utility
false
- v120
+ v140
true
MultiByte
Utility
false
- v120
+ v140
true
MultiByte
diff --git a/projects/libs/libs.vcxproj b/projects/libs/libs.vcxproj
index 5a518056a2..3229d76be9 100644
--- a/projects/libs/libs.vcxproj
+++ b/projects/libs/libs.vcxproj
@@ -22,20 +22,20 @@
StaticLibrary
true
- v120
+ v140
MultiByte
StaticLibrary
false
- v120
+ v140
true
MultiByte
StaticLibrary
false
- v120
+ v140
true
MultiByte
diff --git a/projects/openrct2.vcxproj b/projects/openrct2.vcxproj
index 0a6c0becc1..156eefd8f4 100644
--- a/projects/openrct2.vcxproj
+++ b/projects/openrct2.vcxproj
@@ -284,20 +284,20 @@
DynamicLibrary
true
- v120
+ v140
MultiByte
DynamicLibrary
false
- v120
+ v140
true
MultiByte
DynamicLibrary
false
- v120
+ v140
true
MultiByte
diff --git a/src/audio/audio.c b/src/audio/audio.c
index 8dc38f7744..1c8779ad40 100644
--- a/src/audio/audio.c
+++ b/src/audio/audio.c
@@ -18,7 +18,6 @@
* along with this program. If not, see .
*****************************************************************************/
-#include
#include "../addresses.h"
#include "../config.h"
#include "../interface/viewport.h"
diff --git a/src/audio/mixer.cpp b/src/audio/mixer.cpp
index 17dc692d4f..4927d5ea9e 100644
--- a/src/audio/mixer.cpp
+++ b/src/audio/mixer.cpp
@@ -18,14 +18,11 @@
* along with this program. If not, see .
*****************************************************************************/
-#include
-#include
-
extern "C" {
#include "../config.h"
#include "../platform/platform.h"
- #include "audio.h"
#include "../localisation/localisation.h"
+ #include "audio.h"
}
#include "mixer.h"
diff --git a/src/cmdline_sprite.c b/src/cmdline_sprite.c
index 12691d8709..01990e7b9f 100644
--- a/src/cmdline_sprite.c
+++ b/src/cmdline_sprite.c
@@ -1,5 +1,4 @@
#include
-#include
#include "cmdline.h"
#include "drawing/drawing.h"
#include "platform/platform.h"
@@ -433,7 +432,7 @@ int cmdline_for_sprite(const char **argv, int argc)
printf("height: %d\n", g1->height);
printf("x offset: %d\n", g1->x_offset);
printf("y offset: %d\n", g1->y_offset);
- printf("data offset: 0x%X\n", g1->offset);
+ printf("data offset: 0x%X\n", (uint32)g1->offset);
sprite_file_close();
return 1;
@@ -648,7 +647,7 @@ int cmdline_for_sprite(const char **argv, int argc)
} while (file != NULL);
- fprintf(stderr, "Finished\n", imagePath);
+ fprintf(stderr, "Finished\n");
return 1;
} else {
fprintf(stderr, "Unknown sprite command.");
diff --git a/src/drawing/scrolling_text.c b/src/drawing/scrolling_text.c
index 8932a9e8f3..ec2a71ba75 100644
--- a/src/drawing/scrolling_text.c
+++ b/src/drawing/scrolling_text.c
@@ -1,4 +1,3 @@
-#include
#include "../addresses.h"
#include "../config.h"
#include "../localisation/localisation.h"
diff --git a/src/drawing/string.c b/src/drawing/string.c
index 79474eab7e..d42b7a6a00 100644
--- a/src/drawing/string.c
+++ b/src/drawing/string.c
@@ -18,7 +18,6 @@
* along with this program. If not, see .
*****************************************************************************/
-#include
#include "../addresses.h"
#include "../localisation/localisation.h"
#include "../sprites.h"
diff --git a/src/openrct2.c b/src/openrct2.c
index da1f3cad48..d0142abcfe 100644
--- a/src/openrct2.c
+++ b/src/openrct2.c
@@ -392,3 +392,17 @@ void openrct2_reset_object_tween_locations()
_spritelocations1[i].z = _spritelocations2[i].z = g_sprite_list[i].unknown.z;
}
}
+
+#if _MSC_VER >= 1900
+/**
+ * Temporary fix for libraries not compiled with VS2015
+ */
+FILE **__iob_func()
+{
+ static FILE* streams[3];
+ streams[0] = stdin;
+ streams[1] = stdout;
+ streams[2] = stderr;
+ return streams;
+}
+#endif
diff --git a/src/platform/platform.h b/src/platform/platform.h
index 685e057af3..9cb61afb41 100644
--- a/src/platform/platform.h
+++ b/src/platform/platform.h
@@ -21,6 +21,8 @@
#ifndef _PLATFORM_H_
#define _PLATFORM_H_
+#define HAVE_MATH_H
+
#include
#include "../common.h"
diff --git a/src/platform/shared.c b/src/platform/shared.c
index c267291d62..053dc00040 100644
--- a/src/platform/shared.c
+++ b/src/platform/shared.c
@@ -18,8 +18,6 @@
* along with this program. If not, see .
*****************************************************************************/
-#include
-#include
#include "../addresses.h"
#include "../config.h"
#include "../cursors.h"
@@ -791,18 +789,6 @@ static void platform_load_cursors()
RCT2_GLOBAL(0x14241BC, uint32) = 0;
}
-/**
- *
- * rct2: 0x00407D80
- */
-int platform_get_cursor_pos(int* x, int* y)
-{
- POINT point;
- GetCursorPos(&point);
- *x = point.x;
- *y = point.y;
-}
-
void platform_refresh_video()
{
int width = RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_WIDTH, uint16);
diff --git a/src/rct2.h b/src/rct2.h
index c1279de446..3fed27792a 100644
--- a/src/rct2.h
+++ b/src/rct2.h
@@ -21,8 +21,14 @@
#ifndef _RCT2_H_
#define _RCT2_H_
+#ifndef _USE_MATH_DEFINES
+ #define _USE_MATH_DEFINES
+#endif
+#undef M_PI
+
#include
#include
+#include
#include
#include
#include
diff --git a/src/windows/options.c b/src/windows/options.c
index 31c6ce51a4..e2f1229606 100644
--- a/src/windows/options.c
+++ b/src/windows/options.c
@@ -26,7 +26,6 @@
* Padding between the widgets and the window needs reducing, an artifact from originally being inside group boxes.
*/
-#include
#include "../addresses.h"
#include "../audio/audio.h"
#include "../audio/mixer.h"
diff --git a/src/world/mapgen.c b/src/world/mapgen.c
index b71fd3c6ca..d6364dfd0c 100644
--- a/src/world/mapgen.c
+++ b/src/world/mapgen.c
@@ -18,10 +18,6 @@
* along with this program. If not, see .
*****************************************************************************/
-#ifndef _USE_MATH_DEFINES
- #define _USE_MATH_DEFINES
-#endif
-#include
#include
#include "../addresses.h"
#include "../object.h"