mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +00:00
- Linux compile fix.
This commit is contained in:
parent
fd767233aa
commit
3b5d379fa4
3 changed files with 12 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -66,14 +66,18 @@
|
|||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
//GL headers
|
||||
#if defined(__APPLE__)
|
||||
#include <GL/glew.h>
|
||||
#include <OpenGL/OpenGL.h>
|
||||
#else // !__APPLE__
|
||||
#elif defined(__unix__)
|
||||
#include <GL/glew.h>
|
||||
#include "gl/api/glext.h"
|
||||
#else // !__APPLE__ && !__unix__
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
#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
|
||||
|
|
Loading…
Reference in a new issue