upgrade to VS2015 compiler

This commit is contained in:
IntelOrca 2015-08-03 23:16:30 +01:00
parent 36b579ad66
commit cac0f2ab52
14 changed files with 34 additions and 38 deletions

View File

@ -22,20 +22,20 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release with Tests|Win32'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>

View File

@ -22,20 +22,20 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release with Tests|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>

View File

@ -284,20 +284,20 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release with Tests|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>

View File

@ -18,7 +18,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*****************************************************************************/
#include <SDL.h>
#include "../addresses.h"
#include "../config.h"
#include "../interface/viewport.h"

View File

@ -18,14 +18,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*****************************************************************************/
#include <math.h>
#include <SDL.h>
extern "C" {
#include "../config.h"
#include "../platform/platform.h"
#include "audio.h"
#include "../localisation/localisation.h"
#include "audio.h"
}
#include "mixer.h"

View File

@ -1,5 +1,4 @@
#include <lodepng/lodepng.h>
#include <math.h>
#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.");

View File

@ -1,4 +1,3 @@
#include <SDL_ttf.h>
#include "../addresses.h"
#include "../config.h"
#include "../localisation/localisation.h"

View File

@ -18,7 +18,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*****************************************************************************/
#include <SDL_ttf.h>
#include "../addresses.h"
#include "../localisation/localisation.h"
#include "../sprites.h"

View File

@ -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

View File

@ -21,6 +21,8 @@
#ifndef _PLATFORM_H_
#define _PLATFORM_H_
#define HAVE_MATH_H
#include <SDL.h>
#include "../common.h"

View File

@ -18,8 +18,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*****************************************************************************/
#include <math.h>
#include <SDL.h>
#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);

View File

@ -21,8 +21,14 @@
#ifndef _RCT2_H_
#define _RCT2_H_
#ifndef _USE_MATH_DEFINES
#define _USE_MATH_DEFINES
#endif
#undef M_PI
#include <assert.h>
#include <ctype.h>
#include <math.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>

View File

@ -26,7 +26,6 @@
* Padding between the widgets and the window needs reducing, an artifact from originally being inside group boxes.
*/
#include <math.h>
#include "../addresses.h"
#include "../audio/audio.h"
#include "../audio/mixer.h"

View File

@ -18,10 +18,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*****************************************************************************/
#ifndef _USE_MATH_DEFINES
#define _USE_MATH_DEFINES
#endif
#include <math.h>
#include <time.h>
#include "../addresses.h"
#include "../object.h"