Includes overhaul, fix some compiler warnings

This commit is contained in:
erorcun
2021-01-16 16:44:59 +03:00
committed by shfil
parent 357b67e3f5
commit 5a47379bf5
42 changed files with 105 additions and 146 deletions

View File

@@ -11,17 +11,34 @@
#include <string.h>
#include <math.h>
#if defined _WIN32 && defined WITHWINDOWS
#if !defined RW_D3D9 && defined LIBRW
#undef WITHD3D
#undef WITHDINPUT
#endif
#if (defined WITHD3D && !defined LIBRW)
#define WITHWINDOWS
#endif
#if defined _WIN32 && defined WITHWINDOWS && !defined _INC_WINDOWS
#include <windows.h>
#endif
#if defined _WIN32 && defined WITHD3D
#include <windows.h>
#ifndef USE_D3D9
#include <d3d8types.h>
#else
#include <d3d9types.h>
#ifdef WITHD3D
#ifdef LIBRW
#define WITH_D3D // librw includes d3d9 itself via this right now
#else
#ifndef USE_D3D9
#include <d3d8types.h>
#else
#include <d3d9types.h>
#endif
#endif
#endif
#ifdef WITHDINPUT
#define DIRECTINPUT_VERSION 0x0800
#include <dinput.h>
#endif
#include <rwcore.h>
@@ -52,14 +69,6 @@
#define rwVENDORID_ROCKSTAR 0x0253F2
// Get rid of bullshit windows definitions, we're not running on an 8086
#ifdef far
#undef far
#endif
#ifdef near
#undef near
#endif
#define Max(a,b) ((a) > (b) ? (a) : (b))
#define Min(a,b) ((a) < (b) ? (a) : (b))