diff --git a/src/gl/api/gl_api.h b/src/gl/api/gl_api.h index bcb03c416..3ed1a2efd 100644 --- a/src/gl/api/gl_api.h +++ b/src/gl/api/gl_api.h @@ -1,7 +1,7 @@ -#if defined(__APPLE__) +#if defined(__unix__) || defined(__APPLE__) #define APIENTRY #define APIENTRYP * -#endif // __APPLE__ +#endif // __unix__ || __APPLE__ #ifndef __EXTERN #define __EXTERN extern diff --git a/src/gl/data/gl_data.cpp b/src/gl/data/gl_data.cpp index 20ec8a3a7..e0bb5ee6b 100644 --- a/src/gl/data/gl_data.cpp +++ b/src/gl/data/gl_data.cpp @@ -110,6 +110,7 @@ void AdjustSpriteOffsets() FScanner sc; sc.OpenLumpNum(lump); GLRenderer->FlushTextures(); + int ofslumpno = Wads.GetLumpFile(lump); while (sc.GetString()) { int x,y; @@ -124,11 +125,11 @@ void AdjustSpriteOffsets() FTexture * tex = TexMan[texno]; int lumpnum = tex->GetSourceLump(); - // We only want to change texture offsets for sprites in the IWAD! + // We only want to change texture offsets for sprites in the IWAD or the file this lump originated from. if (lumpnum >= 0 && lumpnum < Wads.GetNumLumps()) { int wadno = Wads.GetLumpFile(lumpnum); - if (wadno==FWadCollection::IWAD_FILENUM) + if (wadno==FWadCollection::IWAD_FILENUM || wadno == ofslumpno) { tex->LeftOffset=x; tex->TopOffset=y; diff --git a/src/gl/system/gl_system.h b/src/gl/system/gl_system.h index 8a0c307fc..222fb44f1 100644 --- a/src/gl/system/gl_system.h +++ b/src/gl/system/gl_system.h @@ -66,14 +66,18 @@ #include #include +//GL headers #if defined(__APPLE__) #include #include -#else // !__APPLE__ +#elif defined(__unix__) +#include +#include "gl/api/glext.h" +#else // !__APPLE__ && !__unix__ #include #include -#include "gl/api/glext.h" // use the local copy -#endif // __APPLE__ +#include "gl/api/glext.h" +#endif #include "gl/api/gl_api.h" #ifdef _WIN32