diff --git a/src/gl/models/gl_models_md2.cpp b/src/gl/models/gl_models_md2.cpp index 95a344c6e..1ff98629d 100644 --- a/src/gl/models/gl_models_md2.cpp +++ b/src/gl/models/gl_models_md2.cpp @@ -176,7 +176,7 @@ bool FDMDModel::Load(const char * path, int, const char * buffer, int length) // Translate each vertex. for(k = 0, pVtx = pfr->vertices; k < info.numVertices; k++, pVtx++) { - UnpackVector(USHORT(pVtx->normal), frame->normals[k].xyz); + UnpackVector((unsigned short)(pVtx->normal), frame->normals[k].xyz); for(c = 0; c < 3; c++) { frame->vertices[k].xyz[axis[c]] = @@ -208,7 +208,7 @@ bool FDMDModel::Load(const char * path, int, const char * buffer, int length) for(i = 0; i < info.numLODs; i++) for(k = 0; k < lodInfo[i].numTriangles; k++) for(c = 0; c < 3; c++) - vertexUsage[SHORT(triangles[i][k].vertexIndices[c])] |= 1 << i; + vertexUsage[short(triangles[i][k].vertexIndices[c])] |= 1 << i; loaded=true; return true; diff --git a/src/gl/system/gl_interface.h b/src/gl/system/gl_interface.h index 8766ebcfa..3d54bf8f6 100644 --- a/src/gl/system/gl_interface.h +++ b/src/gl/system/gl_interface.h @@ -5,6 +5,11 @@ #define APIENTRY #endif // __APPLE__ +#include "basictypes.h" +#ifndef _WIN32 +typedef bool BOOL; +#endif + #ifndef PFNGLMULTITEXCOORD2FPROC typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t); #endif diff --git a/src/gl/system/gl_system.h b/src/gl/system/gl_system.h index d48b55976..5dc6cf5b5 100644 --- a/src/gl/system/gl_system.h +++ b/src/gl/system/gl_system.h @@ -88,7 +88,6 @@ inline T max( T a, T b) { return (((a)>(b)) ? (a) : (b)); } #define _access(a,b) access(a,b) #endif #ifndef _WIN32 -#include "platform.h" #include #endif #include "gl/system/gl_interface.h" diff --git a/src/gl/system/gl_wipe.cpp b/src/gl/system/gl_wipe.cpp index f9f73a4ea..83f5abd82 100644 --- a/src/gl/system/gl_wipe.cpp +++ b/src/gl/system/gl_wipe.cpp @@ -56,6 +56,19 @@ #include "gl/textures/gl_material.h" #include "gl/utility/gl_templates.h" +#ifndef _WIN32 +struct POINT { + SDWORD x; + SDWORD y; +}; +struct RECT { + SDWORD left; + SDWORD top; + SDWORD right; + SDWORD bottom; +}; +#endif + EXTERN_CVAR(Bool, gl_vid_compatibility) //=========================================================================== diff --git a/src/gl/textures/gl_hirestex.cpp b/src/gl/textures/gl_hirestex.cpp index 423a783fb..b7824bf11 100644 --- a/src/gl/textures/gl_hirestex.cpp +++ b/src/gl/textures/gl_hirestex.cpp @@ -56,8 +56,8 @@ #include "d_main.h" #include "zstring.h" -#ifdef __GNUC__ -#include "Linux/platform.h" /* Without this it would fail on _access on line 374 (378 now) */ +#ifndef _WIN32 +#define _access(a,b) access(a,b) #endif static int Doom2Wad = -1;