fix level 1 msvc compiling warnings + initialize debugFlags

This commit is contained in:
jacob1 2014-10-08 00:15:51 -04:00
parent a78bd78bfc
commit c16caed5dd
5 changed files with 7 additions and 3 deletions

View File

@ -1644,7 +1644,7 @@ void GameSave::readPSv(char * data, int dataLength)
} }
if (ver < 88) //fix air blowing stickmen if (ver < 88) //fix air blowing stickmen
if ((particles[i-1].type == PT_STKM || particles[i-1].type == PT_STKM2 || particles[i-1].type == PT_FIGH) && particles[i-1].ctype == OLD_SPC_AIR) if ((particles[i-1].type == PT_STKM || particles[i-1].type == PT_STKM2 || particles[i-1].type == PT_FIGH) && particles[i-1].ctype == OLD_SPC_AIR)
particles[i-1].ctype == SPC_AIR; particles[i-1].ctype = SPC_AIR;
if (ver < 89) if (ver < 89)
{ {
if (particles[i-1].type == PT_FILT) if (particles[i-1].type == PT_FILT)

View File

@ -130,7 +130,8 @@ GameController::GameController():
localBrowser(NULL), localBrowser(NULL),
foundSign(NULL), foundSign(NULL),
HasDone(false), HasDone(false),
firstTick(true) firstTick(true),
debugFlags(0)
{ {
gameView = new GameView(); gameView = new GameView();
gameModel = new GameModel(); gameModel = new GameModel();

View File

@ -833,7 +833,7 @@ bool GameModel::GetPaused()
void GameModel::SetDecoration(bool decorationState) void GameModel::SetDecoration(bool decorationState)
{ {
if (ren->decorations_enable != decorationState) if (ren->decorations_enable != (decorationState?1:0))
{ {
ren->decorations_enable = decorationState?1:0; ren->decorations_enable = decorationState?1:0;
notifyDecorationChanged(); notifyDecorationChanged();

View File

@ -436,6 +436,7 @@ int LuaScriptInterface::tpt_newIndex(lua_State *l)
//if not a special key, set a value in the table //if not a special key, set a value in the table
return lua_rawset(l, 1), 1; return lua_rawset(l, 1), 1;
} }
return 0;
} }
//// Begin Interface API //// Begin Interface API

View File

@ -41,7 +41,9 @@ static inline int resampler_range_check(int v, int h) { (void)h; resampler_asser
#define RESAMPLER_DEBUG 0 #define RESAMPLER_DEBUG 0
#ifndef M_PI
#define M_PI 3.14159265358979323846 #define M_PI 3.14159265358979323846
#endif
// Float to int cast with truncation. // Float to int cast with truncation.
static inline int cast_to_int(Resample_Real i) static inline int cast_to_int(Resample_Real i)