use more widely used preprocessor defines for MinGW

The code still uses a lot of WIN32 preprocessor variables which aren't defined
in strict C++-11 mode. But the preprocessor variable _WIN32 seems to be defined
in all modes of MinGW

4d8c50a0db
This commit is contained in:
zilmar 2015-10-14 10:01:07 +11:00
parent 8bc33bc4d9
commit 989c8cbc4d
5 changed files with 10 additions and 10 deletions

View File

@ -70,7 +70,7 @@ int grid = 0;
static const char *tri_type[4] = { "TRIANGLE", "TEXRECT", "FILLRECT", "BACKGROUND" };
//Platform-specific stuff
#ifndef WIN32
#ifndef _WIN32
typedef struct dbgPOINT {
int x;
int y;

View File

@ -106,7 +106,7 @@ typedef unsigned char boolean;
#define GLIDE64_CATCH catch (...)
#endif
#ifndef WIN32
#ifndef _WIN32
typedef void* HWND;
#endif

View File

@ -24,7 +24,7 @@
#ifndef __EXT_TXFILTER_H__
#define __EXT_TXFILTER_H__
#ifdef WIN32
#ifdef _WIN32
#include <windows.h>
#define TXHMODULE HMODULE
#define DLOPEN(a) LoadLibraryW(a)

View File

@ -625,7 +625,7 @@ TxFilter::dmptx(uint8 *src, int width, int height, int rowStridePixel, uint16 gf
} else {
tmpbuf.SetNameExtension(stdstr_f("%ls#%08X#%01X#%01X_all.png",_ident.c_str(),(uint32)(r_crc64 & 0xffffffff),(n64fmt >> 8),(n64fmt & 0xf)).c_str());
}
#ifdef WIN32
#ifdef _WIN32
if ((fp = fopen(tmpbuf, "wb")) != NULL) {
#else
char cbuf[MAX_PATH];

View File

@ -24,7 +24,7 @@
/* 2007 Gonetz <gonetz(at)ngs.ru>
* Added callback to display hires texture info. */
#ifdef WIN32
#ifdef _WIN32
#pragma warning(disable: 4786)
#endif
@ -225,12 +225,12 @@ boolean TxHiResCache::loadHiResTextures(LPCSTR dir_path, boolean replace)
/* XXX case sensitivity fiasco!
* files must use _a, _rgb, _all, _allciByRGBA, _ciByRGBA, _ci
* and file extensions must be in lower case letters! */
#ifdef WIN32
#ifdef _WIN32
{
unsigned int i;
for (i = 0; i < strlen(fname); i++) fname[i] = (char)tolower(fname[i]);
}
#endif
#endif
ident.assign(fname);
/* read in Rice's file naming convention */
@ -240,12 +240,12 @@ boolean TxHiResCache::loadHiResTextures(LPCSTR dir_path, boolean replace)
/* XXX case sensitivity fiasco!
* files must use _a, _rgb, _all, _allciByRGBA, _ciByRGBA, _ci
* and file extensions must be in lower case letters! */
#ifdef WIN32
#ifdef _WIN32
{
unsigned int i;
for (i = 0; i < strlen(fname); i++) fname[i] = (char)tolower(fname[i]);
}
#endif
#endif
pfname = fname + strlen(fname) - 4;
if (!(pfname == strstr(fname, ".png") ||
pfname == strstr(fname, ".bmp") ||
@ -451,7 +451,7 @@ boolean TxHiResCache::loadHiResTextures(LPCSTR dir_path, boolean replace)
*/
if (pfname == strstr(fname, "_all.png") ||
pfname == strstr(fname, "_all.dds") ||
#ifdef WIN32
#ifdef _WIN32
pfname == strstr(fname, "_allcibyrgba.png") ||
pfname == strstr(fname, "_allcibyrgba.dds") ||
pfname == strstr(fname, "_cibyrgba.png") ||