From 6d1aa4d527bc3d824bb668cd910430b688ff5879 Mon Sep 17 00:00:00 2001 From: Ian Curtis Date: Tue, 3 May 2016 18:38:06 +0000 Subject: [PATCH] fix compilation --- Src/Graphics/Legacy3D/Models.cpp | 2 +- Src/Model3/Model3.cpp | 2 +- Src/Util/BMPFile.h | 4 ++-- VS2008/Supermodel.vcxproj | 1 - VS2008/Supermodel.vcxproj.filters | 3 --- 5 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Src/Graphics/Legacy3D/Models.cpp b/Src/Graphics/Legacy3D/Models.cpp index 31c346e..422a5f5 100644 --- a/Src/Graphics/Legacy3D/Models.cpp +++ b/Src/Graphics/Legacy3D/Models.cpp @@ -949,7 +949,7 @@ struct VBORef *CLegacy3D::CacheModel(ModelCache *Cache, int lutIdx, UINT16 texOf P.Vert[j].n[2] = (GLfloat)(INT8)(iz&0xFF); P.Vert[j].u = (GLfloat) ((UINT16)(it>>16)) * uvScale; // TO-DO: might these be signed? P.Vert[j].v = (GLfloat) ((UINT16)(it&0xFFFF)) * uvScale; - P.Vert[j].intensity = GLfloat((ix + 128) & 0xFF) / 255.0; // signed (-0.5 -> black, +0.5 -> white) + P.Vert[j].intensity = GLfloat((ix + 128) & 0xFF) / 255.0f; // signed (-0.5 -> black, +0.5 -> white) //if ((P.header[1] & 0x20) && !(P.header[1] & 0x08)) // printf("%02x %02x %02x\n", ix&0xff, iy&0xff, iz&0xff); data += 4; diff --git a/Src/Model3/Model3.cpp b/Src/Model3/Model3.cpp index f8ff6dd..f2e5748 100644 --- a/Src/Model3/Model3.cpp +++ b/Src/Model3/Model3.cpp @@ -1911,7 +1911,7 @@ void CModel3::LoadState(CBlockFile *SaveState) SaveState->Read(&midiCtrlPort, sizeof(midiCtrlPort)); int32_t securityFirstRead; SaveState->Write(&securityFirstRead, sizeof(securityFirstRead)); - m_securityFirstRead = securityFirstRead; + m_securityFirstRead = securityFirstRead != 0; // All devices... GPU.LoadState(SaveState); diff --git a/Src/Util/BMPFile.h b/Src/Util/BMPFile.h index 6d03fdc..8f3b2cd 100644 --- a/Src/Util/BMPFile.h +++ b/Src/Util/BMPFile.h @@ -74,7 +74,7 @@ namespace Util struct RGBA8 { - static constexpr const unsigned bytes_per_pixel = 4; + static const unsigned bytes_per_pixel = 4; static inline uint8_t GetRed(const uint8_t *pixel) { return pixel[0]; @@ -95,7 +95,7 @@ namespace Util struct A1RGB5 { - static constexpr const unsigned bytes_per_pixel = 2; + static const unsigned bytes_per_pixel = 2; static inline uint8_t GetRed(const uint8_t *pixel) { return uint8_t((255.0f / 31.0f) * float((*reinterpret_cast(pixel) >> 10) & 0x1f)); diff --git a/VS2008/Supermodel.vcxproj b/VS2008/Supermodel.vcxproj index 7e07ede..adb0a86 100644 --- a/VS2008/Supermodel.vcxproj +++ b/VS2008/Supermodel.vcxproj @@ -444,7 +444,6 @@ xcopy /D /Y "$(ProjectDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDi true true - diff --git a/VS2008/Supermodel.vcxproj.filters b/VS2008/Supermodel.vcxproj.filters index d6c510a..7150f52 100644 --- a/VS2008/Supermodel.vcxproj.filters +++ b/VS2008/Supermodel.vcxproj.filters @@ -425,9 +425,6 @@ Source Files\Util - - Source Files\Util -