From f1e93bcd8ffae7d3aac28af93e12a0330bc12389 Mon Sep 17 00:00:00 2001 From: Bart Trzynadlowski Date: Mon, 16 Jul 2012 02:27:55 +0000 Subject: [PATCH] - Fixed Win32 GCC Makefile. - Reverted Nik's polygon palette index change in Models.cpp. Subtracting 1 was breaking Scud Race. - Added an explicit typecast in Inputs.cpp, which GCC requires for some reason. --- Makefiles/Makefile.SDL.Win32.GCC | 3 +++ Src/Graphics/Models.cpp | 2 +- Src/Inputs/Inputs.cpp | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefiles/Makefile.SDL.Win32.GCC b/Makefiles/Makefile.SDL.Win32.GCC index 6e48dee..becc7cb 100644 --- a/Makefiles/Makefile.SDL.Win32.GCC +++ b/Makefiles/Makefile.SDL.Win32.GCC @@ -219,6 +219,9 @@ $(OBJ_DIR)/%.o: Src/CPU/Z80/%.cpp $(OBJ_DIR)/%.o: Src/Inputs/%.cpp $(CXX) $< $(CPPFLAGS) -o $(OBJ_DIR)/$(*F).o +$(OBJ_DIR)/%.o: Src/OSD/%.cpp + $(CXX) $< $(CPPFLAGS) -o $(OBJ_DIR)/$(*F).o + $(OBJ_DIR)/%.o: Src/OSD/SDL/%.cpp $(CXX) $< $(CPPFLAGS) -o $(OBJ_DIR)/$(*F).o diff --git a/Src/Graphics/Models.cpp b/Src/Graphics/Models.cpp index c2228b7..d34384f 100644 --- a/Src/Graphics/Models.cpp +++ b/Src/Graphics/Models.cpp @@ -394,7 +394,7 @@ void CRender3D::InsertVertex(ModelCache *Cache, const Vertex *V, const Poly *P, // Material color if ((P->header[1]&2) == 0) { - colorIdx = ((P->header[4]>>20)&0x7FF) - 1; + colorIdx = ((P->header[4]>>20)&0x7FF) - 0; b = (GLfloat) (polyRAM[0x400+colorIdx]&0xFF) * (1.0f/255.0f); g = (GLfloat) ((polyRAM[0x400+colorIdx]>>8)&0xFF) * (1.0f/255.0f); r = (GLfloat) ((polyRAM[0x400+colorIdx]>>16)&0xFF) * (1.0f/255.0f); diff --git a/Src/Inputs/Inputs.cpp b/Src/Inputs/Inputs.cpp index 138998e..5c80760 100644 --- a/Src/Inputs/Inputs.cpp +++ b/Src/Inputs/Inputs.cpp @@ -585,7 +585,7 @@ void CInputs::CalibrateJoystick(int joyNum) if (!joyDetails->hasAxis[axisNum]) continue; axisNumList.push_back(axisNum); - printf(" %u: %s\n", axisNumList.size(), joyDetails->axisName[axisNum]); + printf(" %u: %s\n", (unsigned) axisNumList.size(), joyDetails->axisName[axisNum]); } printf(" 0: Unsure - help me choose...\n");