From 2cf6d213e26c134ef4411e57608954ddd2aa5b73 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 12 Dec 2018 01:27:04 +0100 Subject: [PATCH] - fixed compile bugs --- src/r_data/r_canvastexture.h | 3 +-- src/tarray.h | 2 +- src/textures/hires/hirestex.cpp | 2 +- src/textures/texture.cpp | 2 +- src/textures/textures.h | 15 +-------------- 5 files changed, 5 insertions(+), 19 deletions(-) diff --git a/src/r_data/r_canvastexture.h b/src/r_data/r_canvastexture.h index 8a82eb6e7..b69c46687 100644 --- a/src/r_data/r_canvastexture.h +++ b/src/r_data/r_canvastexture.h @@ -4,7 +4,6 @@ class FCanvasTexture; // This list keeps track of the cameras that draw into canvas textures. struct FCanvasTextureEntry { - FCanvasTextureInfo *Next; TObjPtr Viewpoint; FCanvasTexture *Texture; FTextureID PicNum; @@ -22,4 +21,4 @@ struct FCanvasTextureInfo void Serialize(FSerializer &arc); void Mark(); -}; \ No newline at end of file +}; diff --git a/src/tarray.h b/src/tarray.h index f580ae3e4..524c0942e 100644 --- a/src/tarray.h +++ b/src/tarray.h @@ -272,7 +272,7 @@ public: return i; } - template const + template unsigned int FindEx(Func compare) const { unsigned int i; diff --git a/src/textures/hires/hirestex.cpp b/src/textures/hires/hirestex.cpp index d18735fa7..3ba988eda 100644 --- a/src/textures/hires/hirestex.cpp +++ b/src/textures/hires/hirestex.cpp @@ -399,11 +399,11 @@ bool FTexture::LoadHiresTexture(FTextureBuffer &texbuffer, bool checkonly) if (dwdata[i] == 0xffffff00 || dwdata[i] == 0xffff00ff) dwdata[i] = 0; } } + texbuffer.mBuffer = buffer; } FContentIdBuilder contentId; contentId.id = 0; contentId.imageID = HiresTexture->GetImage()->GetId(); - texbuffer.mBuffer = buffer; texbuffer.mWidth = w; texbuffer.mHeight = h; texbuffer.mContentId = contentId.id; diff --git a/src/textures/texture.cpp b/src/textures/texture.cpp index f6ee5a8da..d760296ec 100644 --- a/src/textures/texture.cpp +++ b/src/textures/texture.cpp @@ -673,7 +673,7 @@ FTextureBuffer FTexture::CreateTexBuffer(int translation, int flags) if (flags & CTF_CheckHires) { // No image means that this cannot be checked, - if (GetImage() && LoadHiresTexture(result)) return result; + if (GetImage() && LoadHiresTexture(result, checkonly)) return result; } int exx = !!(flags & CTF_Expand); diff --git a/src/textures/textures.h b/src/textures/textures.h index 6fdf6dbc2..279fe9bac 100644 --- a/src/textures/textures.h +++ b/src/textures/textures.h @@ -337,7 +337,6 @@ public: FSoftwareTexture *GetSoftwareTexture(); protected: - //int16_t LeftOffset, TopOffset; DVector2 Scale; @@ -435,19 +434,7 @@ protected: // Interfaces for the different renderers. Everything that needs to check renderer-dependent offsets // should use these, so that if changes are needed, this is the only place to edit. - // For the original software renderer - int GetLeftOffsetSW() { return _LeftOffset[r_spriteadjustSW]; } - int GetTopOffsetSW() { return _TopOffset[r_spriteadjustSW]; } - int GetScaledLeftOffsetSW() { return GetScaledLeftOffset(r_spriteadjustSW); } - int GetScaledTopOffsetSW() { return GetScaledTopOffset(r_spriteadjustSW); } - - // For the softpoly renderer, in case it wants adjustment - int GetLeftOffsetPo() { return _LeftOffset[r_spriteadjustSW]; } - int GetTopOffsetPo() { return _TopOffset[r_spriteadjustSW]; } - int GetScaledLeftOffsetPo() { return GetScaledLeftOffset(r_spriteadjustSW); } - int GetScaledTopOffsetPo() { return GetScaledTopOffset(r_spriteadjustSW); } - - // For the hardware renderer + // For the hardware renderer. The software renderer's have been offloaded to FSoftwareTexture int GetLeftOffsetHW() { return _LeftOffset[r_spriteadjustHW]; } int GetTopOffsetHW() { return _TopOffset[r_spriteadjustHW]; }