make code compatible with mingw64

This commit is contained in:
anyc 2014-05-20 12:49:27 +02:00
parent d34e2db9e1
commit 95a56b1d1e
12 changed files with 15 additions and 5 deletions

View File

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

View File

@ -23,7 +23,7 @@
#include <string.h>
#include <setjmp.h>
#include <windows.h>
#include <ShlObj.h>
#include <shlobj.h>
#include <SDL.h>
#include "addresses.h"
#include "climate.h"
@ -338,7 +338,7 @@ void get_system_info()
RCT2_GLOBAL(RCT2_ADDRESS_MEM_TOTAL_PAGEFILE, uint32) = memInfo.dwTotalPageFile;
RCT2_GLOBAL(RCT2_ADDRESS_MEM_TOTAL_VIRTUAL, uint32) = memInfo.dwTotalVirtual;
uint32 size = 80;
DWORD size = 80;
GetUserName((char*)RCT2_ADDRESS_OS_USER_NAME, &size);
size = 80;
GetComputerName((char*)RCT2_ADDRESS_OS_COMPUTER_NAME, &size);

View File

@ -44,7 +44,7 @@ typedef unsigned long long uint64;
#define sgn(x) ((x > 0) ? 1 : ((x < 0) ? -1 : 0))
#define clamp(l, x, h) (min(h, max(l, x)))
#define countof(x) _countof(x)
#define countof(x) ((sizeof(x)/sizeof(0[x])) / ((size_t)(!(sizeof(x) % sizeof(0[x])))))
void rct2_finish();

View File

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

View File

@ -111,7 +111,7 @@ int sawyercoding_read_chunk(HANDLE hFile, uint8 *buffer)
static int decode_chunk_rle(char *buffer, int length)
{
int i, j, count;
uint8 *src, *dst, rleCodeByte;
char *src, *dst, rleCodeByte;
// Backup buffer
src = malloc(length);
@ -145,7 +145,7 @@ static int decode_chunk_rle(char *buffer, int length)
static int decode_chunk_repeat(char *buffer, int length)
{
int i, j, count;
uint8 *src, *dst, *copyOffset;
char *src, *dst, *copyOffset;
// Backup buffer
src = malloc(length);

View File

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

View File

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

View File

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

View File

@ -18,7 +18,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*****************************************************************************/
#include <windows.h>
#include <string.h>
#include <limits.h>
#include "addresses.h"
#include "park.h"
#include "peep.h"

View File

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

View File

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

View File

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