mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-14 08:31:23 +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 APIENTRY
|
||||||
#define APIENTRYP *
|
#define APIENTRYP *
|
||||||
#endif // __APPLE__
|
#endif // __unix__ || __APPLE__
|
||||||
|
|
||||||
#ifndef __EXTERN
|
#ifndef __EXTERN
|
||||||
#define __EXTERN extern
|
#define __EXTERN extern
|
||||||
|
|
|
@ -110,6 +110,7 @@ void AdjustSpriteOffsets()
|
||||||
FScanner sc;
|
FScanner sc;
|
||||||
sc.OpenLumpNum(lump);
|
sc.OpenLumpNum(lump);
|
||||||
GLRenderer->FlushTextures();
|
GLRenderer->FlushTextures();
|
||||||
|
int ofslumpno = Wads.GetLumpFile(lump);
|
||||||
while (sc.GetString())
|
while (sc.GetString())
|
||||||
{
|
{
|
||||||
int x,y;
|
int x,y;
|
||||||
|
@ -124,11 +125,11 @@ void AdjustSpriteOffsets()
|
||||||
FTexture * tex = TexMan[texno];
|
FTexture * tex = TexMan[texno];
|
||||||
|
|
||||||
int lumpnum = tex->GetSourceLump();
|
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())
|
if (lumpnum >= 0 && lumpnum < Wads.GetNumLumps())
|
||||||
{
|
{
|
||||||
int wadno = Wads.GetLumpFile(lumpnum);
|
int wadno = Wads.GetLumpFile(lumpnum);
|
||||||
if (wadno==FWadCollection::IWAD_FILENUM)
|
if (wadno==FWadCollection::IWAD_FILENUM || wadno == ofslumpno)
|
||||||
{
|
{
|
||||||
tex->LeftOffset=x;
|
tex->LeftOffset=x;
|
||||||
tex->TopOffset=y;
|
tex->TopOffset=y;
|
||||||
|
|
|
@ -66,14 +66,18 @@
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
|
//GL headers
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
#include <GL/glew.h>
|
#include <GL/glew.h>
|
||||||
#include <OpenGL/OpenGL.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/gl.h>
|
||||||
#include <GL/glu.h>
|
#include <GL/glu.h>
|
||||||
#include "gl/api/glext.h" // use the local copy
|
#include "gl/api/glext.h"
|
||||||
#endif // __APPLE__
|
#endif
|
||||||
#include "gl/api/gl_api.h"
|
#include "gl/api/gl_api.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
Loading…
Reference in a new issue