Good old warning fixes...how I missed thee.

This commit is contained in:
Jason Felds
2011-06-12 03:30:57 -04:00
parent 720675637e
commit 4bb0b28fc8
6 changed files with 12 additions and 3 deletions
+3 -1
View File
@@ -11,6 +11,8 @@
#include "PrefsManager.h"
#include "Model.h"
int Neg1OrPos1();
#define DC_X( choice ) THEME->GetMetricF("DancingCharacters",ssprintf("2DCharacterXP%d",choice+1))
#define DC_Y( choice ) THEME->GetMetricF("DancingCharacters",ssprintf("2DCharacterYP%d",choice+1))
@@ -344,7 +346,7 @@ void DancingCharacters::DrawPrimitives()
ambient,
diffuse,
specular,
RageVector3(-3, -7.5, +9) );
RageVector3(-3, -7.5f, +9) );
if( PREFSMAN->m_bCelShadeModels )
{
+3
View File
@@ -57,6 +57,7 @@ namespace Enum
const RString &EnumToString( int iVal, int iMax, const char **szNameArray, auto_ptr<RString> *pNameCache ); // XToString helper
#define XToString(X) \
const RString& X##ToString(X x); \
COMPILE_ASSERT( NUM_##X == ARRAYLEN(X##Names) ); \
const RString& X##ToString( X x ) \
{ \
@@ -66,6 +67,7 @@ const RString &EnumToString( int iVal, int iMax, const char **szNameArray, auto_
namespace StringConversion { template<> RString ToString<X>( const X &value ) { return X##ToString(value); } }
#define XToLocalizedString(X) \
const RString &X##ToLocalizedString(X x); \
const RString &X##ToLocalizedString( X x ) \
{ \
static auto_ptr<LocalizedString> g_##X##Name[NUM_##X]; \
@@ -80,6 +82,7 @@ const RString &EnumToString( int iVal, int iMax, const char **szNameArray, auto_
}
#define StringToX(X) \
X StringTo##X(const RString&); \
X StringTo##X( const RString& s ) \
{ \
for( unsigned i = 0; i < ARRAYLEN(X##Names); ++i ) \
+2
View File
@@ -220,9 +220,11 @@ inline bool MyLua_checkintboolean( lua_State *L, int iArg )
#define FArg(n) ((float) luaL_checknumber(L,(n)))
#define LuaFunction( func, expr ) \
int LuaFunc_##func( lua_State *L ); \
int LuaFunc_##func( lua_State *L ) { \
LuaHelpers::Push( L, expr ); return 1; \
} \
void LuaFunc_Register_##func( lua_State *L ); \
void LuaFunc_Register_##func( lua_State *L ) { lua_register( L, #func, LuaFunc_##func ); } \
REGISTER_WITH_LUA_FUNCTION( LuaFunc_Register_##func );
+1 -1
View File
@@ -112,7 +112,7 @@ public:
bpp(0), rate(0), vsync(false), interlaced(false),
bSmoothLines(false), bTrilinearFiltering(false),
bAnisotropicFiltering(false), sWindowTitle(RString()),
sIconFile(RString()), PAL(false), fDisplayAspectRatio(0.0) {}
sIconFile(RString()), PAL(false), fDisplayAspectRatio(0.0f) {}
bool windowed;
int width;
+1 -1
View File
@@ -2561,7 +2561,7 @@ RString RageDisplay_Legacy::GetTextureDiagnostics(unsigned iTexture) const
void RageDisplay_Legacy::SetAlphaTest(bool b)
{
// Previously this was 0.01, rather than 0x01.
glAlphaFunc(GL_GREATER, 0.00390625 /* 1/256 */);
glAlphaFunc(GL_GREATER, 0.00390625f /* 1/256 */);
if (b)
glEnable(GL_ALPHA_TEST);
else
+2
View File
@@ -16,6 +16,8 @@
#include <sys/stat.h>
#include <math.h>
bool HexToBinary(const RString&, RString&);
RandomGen g_RandomNumberGenerator;
MersenneTwister::MersenneTwister( int iSeed ) : m_iNext(0)