Update project to vs 2013. Clean compile warnings

This commit is contained in:
Ian Curtis 2016-03-22 12:30:23 +00:00
parent ce99c47f8a
commit 93f6b01e0b
11 changed files with 37 additions and 50 deletions

View file

@ -581,7 +581,7 @@ static bool IsDynamicModel(const UINT32 *data)
unsigned numVerts = (data[0]&0x40 ? 4 : 3); unsigned numVerts = (data[0]&0x40 ? 4 : 3);
// Deduct number of reused verts // Deduct number of reused verts
numVerts -= sharedVerts[data[0]&0xf]; numVerts -= sharedVerts[data[0]&0xf];
done = data[1]&4; done = data[1] & 4 > 0;
// Skip header and vertices to next polygon // Skip header and vertices to next polygon
data += 7 + numVerts * 4; data += 7 + numVerts * 4;
} }

View file

@ -753,7 +753,7 @@ struct VBORef *CLegacy3D::CacheModel(ModelCache *Cache, int lutIdx, UINT16 texOf
bool validPoly = (P.header[0] & 0x300) != 0x300; bool validPoly = (P.header[0] & 0x300) != 0x300;
// Obtain basic polygon parameters // Obtain basic polygon parameters
done = P.header[1]&4; // last polygon? done = P.header[1] & 4 > 0; // last polygon?
P.numVerts = (P.header[0]&0x40)?4:3; P.numVerts = (P.header[0]&0x40)?4:3;
// Texture data // Texture data

View file

@ -1,2 +0,0 @@
namespace New3D {
} // New3D

View file

@ -1,2 +0,0 @@
namespace New3D {
} // New3D

View file

@ -300,11 +300,11 @@ UINT64 PolyHeader::Hash(int textureXOffset, int textureYOffset)
UINT64 hash = 0; UINT64 hash = 0;
hash |= (header[2] & 3); // bits 0-1 uv mirror bits hash |= (header[2] & 3); // bits 0-1 uv mirror bits
hash |= ((header[3] >> 0) & 7) << 2; // bits 2-4 tex height hash |= (UINT64)((header[3] >> 0) & 7) << 2; // bits 2-4 tex height
hash |= ((header[3] >> 3) & 7) << 5; // bits 5-7 tex width hash |= (UINT64)((header[3] >> 3) & 7) << 5; // bits 5-7 tex width
hash |= X(textureXOffset) << 8; // bits 8-17 x offset hash |= (UINT64)X(textureXOffset) << 8; // bits 8-17 x offset
hash |= Y(textureYOffset) << 18; // bits 18-27 y offset hash |= (UINT64)Y(textureYOffset) << 18; // bits 18-27 y offset
hash |= TexFormat() << 28; // bits 28-30 tex format hash |= (UINT64)TexFormat() << 28; // bits 28-30 tex format
hash |= (UINT64)TexEnabled() << 31; // bits 31 textures enabled hash |= (UINT64)TexEnabled() << 31; // bits 31 textures enabled
hash |= (UINT64)LightEnabled() << 32; // bits 32 light enabled hash |= (UINT64)LightEnabled() << 32; // bits 32 light enabled
hash |= (UINT64)DoubleSided() << 33; // bits 33 double sided hash |= (UINT64)DoubleSided() << 33; // bits 33 double sided

View file

@ -372,7 +372,7 @@ void CRender2D::DrawTileLine8BitNoClip(UINT32 *buf, UINT16 tile, int tileLine, c
void CRender2D::DrawLine(UINT32 *dest, int layerNum, int y, const UINT16 *nameTableBase, const UINT32 *pal) void CRender2D::DrawLine(UINT32 *dest, int layerNum, int y, const UINT16 *nameTableBase, const UINT32 *pal)
{ {
// Determine the layer color depth (4 or 8-bit pixels) // Determine the layer color depth (4 or 8-bit pixels)
bool is4Bit = regs[0x20/4] & (1<<(12+layerNum)); bool is4Bit = (regs[0x20 / 4] & (1 << (12 + layerNum))) > 0;
// Compute offsets due to vertical scrolling // Compute offsets due to vertical scrolling
int vScroll = (regs[0x60/4+layerNum]>>16)&0x1FF; int vScroll = (regs[0x60/4+layerNum]>>16)&0x1FF;
@ -551,7 +551,7 @@ bool CRender2D::DrawTilemaps(UINT32 *destBottom, UINT32 *destTop)
// Load horizontal full-screen scroll values and scroll mode // Load horizontal full-screen scroll values and scroll mode
hFullScroll[i] = regs[0x60/4+i]&0x3FF; hFullScroll[i] = regs[0x60/4+i]&0x3FF;
lineScrollMode[i] = regs[0x60/4+i]&0x8000; lineScrollMode[i] = (regs[0x60 / 4 + i] & 0x8000)>0;
} }
/* /*

View file

@ -326,7 +326,7 @@ bool CINIFile::Get(string SectionName, string SettingName, bool& value)
if (Get(SectionName, SettingName, intVal) == FAIL) if (Get(SectionName, SettingName, intVal) == FAIL)
return FAIL; return FAIL;
value = (bool)intVal; value = intVal > 0;
return OKAY; return OKAY;
} }

View file

@ -1896,7 +1896,7 @@ bool CInputSystem::DetectJoystickAxis(unsigned joyNum, unsigned &axisNum, const
} }
if (maxRange > 3000) if (maxRange > 3000)
printf("Detected\n", joyDetails->axisName[axisNum]); printf("Detected %i\n", (int)joyDetails->axisName[axisNum]);
else else
{ {
cancelled = true; cancelled = true;

View file

@ -2981,7 +2981,6 @@ static void Reverse32(UINT8 *buf, unsigned size)
static void ReadCROMDirectly(UINT8 *crom, char *fileName[4], unsigned combinedSize) static void ReadCROMDirectly(UINT8 *crom, char *fileName[4], unsigned combinedSize)
{ {
FILE *fp[4] = { NULL, NULL, NULL, NULL }; FILE *fp[4] = { NULL, NULL, NULL, NULL };
long size[4];
// Open all files // Open all files
for (int i = 0; i < 4; i++) for (int i = 0; i < 4; i++)

View file

@ -249,11 +249,6 @@ static bool CreateGLScreen(const char *caption, unsigned *xOffsetPtr, unsigned *
static bool ResizeGLScreen(unsigned *xOffsetPtr, unsigned *yOffsetPtr, unsigned *xResPtr, unsigned *yResPtr, unsigned *totalXResPtr, unsigned *totalYResPtr, bool keepAspectRatio, bool fullScreen) static bool ResizeGLScreen(unsigned *xOffsetPtr, unsigned *yOffsetPtr, unsigned *xResPtr, unsigned *yResPtr, unsigned *totalXResPtr, unsigned *totalYResPtr, bool keepAspectRatio, bool fullScreen)
{ {
const SDL_VideoInfo *VideoInfo;
GLenum err;
float model3Ratio, ratio;
float xRes, yRes;
// Set video mode // Set video mode
if (SDL_SetVideoMode(*xResPtr,*yResPtr,0,SDL_OPENGL|(fullScreen?SDL_FULLSCREEN|SDL_HWSURFACE:0)) == NULL) if (SDL_SetVideoMode(*xResPtr,*yResPtr,0,SDL_OPENGL|(fullScreen?SDL_FULLSCREEN|SDL_HWSURFACE:0)) == NULL)
{ {

View file

@ -1,20 +1,17 @@
 
Microsoft Visual Studio Solution File, Format Version 10.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2008 # Visual Studio 2013
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Supermodel", "Supermodel.vcproj", "{B114BBD9-8AEA-4DAE-B367-A66A804CB3DD}" VisualStudioVersion = 12.0.40629.0
ProjectSection(ProjectDependencies) = postProject MinimumVisualStudioVersion = 10.0.40219.1
{1248CF7C-B122-461C-9624-196AEFAE5046} = {1248CF7C-B122-461C-9624-196AEFAE5046} Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Supermodel", "Supermodel.vcxproj", "{B114BBD9-8AEA-4DAE-B367-A66A804CB3DD}"
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}
{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}
EndProjectSection
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDLmain", "SDLmain\SDLmain.vcproj", "{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDLmain", "SDLmain\SDLmain.vcxproj", "{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL", "SDL\SDL.vcproj", "{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL", "SDL\SDL.vcxproj", "{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZLib", "ZLib\ZLib.vcproj", "{248D61E0-2E9B-4C73-8839-A31FBCB7D109}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZLib", "ZLib\ZLib.vcxproj", "{248D61E0-2E9B-4C73-8839-A31FBCB7D109}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Musashi68K", "Musashi68K\Musashi68K.vcproj", "{1248CF7C-B122-461C-9624-196AEFAE5046}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Musashi68K", "Musashi68K\Musashi68K.vcxproj", "{1248CF7C-B122-461C-9624-196AEFAE5046}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution