GRIM/EMI: Fix compile warnings

This commit is contained in:
Christian Krause 2013-12-31 15:30:15 +01:00
parent cc2cc0fdf8
commit 446f56eb67
4 changed files with 10 additions and 9 deletions

View file

@ -438,13 +438,13 @@ void Lua_V2::NewLayer() {
lua_Object param3 = lua_getparam(3);
const char *til = NULL;
int sortorder = 0, zero = 0;
int sortorder = 0; // zero = 0;
if (lua_isstring(param1) && lua_isnumber(param2) && lua_isnumber(param3)) {
til = lua_getstring(param1);
sortorder = (int)lua_getnumber(param2);
//This one is always specified, but also always 0...
zero = (int)lua_getnumber(param3);
//zero = (int)lua_getnumber(param3);
Layer *layer = new Layer(til, sortorder);

View file

@ -641,12 +641,13 @@ bool Lua_V2::findCostume(lua_Object costumeObj, Actor *actor, Costume **costume)
return (*costume != NULL);
}
// TODO: Implement, verify, and rename unknown 5th parameter
void Lua_V2::PlayActorChore() {
lua_Object actorObj = lua_getparam(1);
lua_Object choreObj = lua_getparam(2);
lua_Object costumeObj = lua_getparam(3);
lua_Object modeObj = lua_getparam(4);
lua_Object paramObj = lua_getparam(5);
/* lua_Object paramObj = */ lua_getparam(5);
if (!lua_isuserdata(actorObj) || lua_tag(actorObj) != MKTAG('A','C','T','R'))
return;
@ -657,14 +658,14 @@ void Lua_V2::PlayActorChore() {
lua_pushnil();
bool mode = false;
float param = 0.0;
// float param = 0.0;
if (!lua_isnil(modeObj)) {
if (lua_getnumber(modeObj) != 0.0)
mode = true;
if (!lua_isnil(paramObj))
if (lua_isnumber(paramObj))
param = lua_getnumber(paramObj);
//if (!lua_isnil(paramObj))
// if (lua_isnumber(paramObj))
// param = lua_getnumber(paramObj);
}
const char *choreName = lua_getstring(choreObj);

View file

@ -402,7 +402,7 @@ void GfxOpenGL::getBoundingBoxPos(const EMIModel *model, int *x1, int *y1, int *
glGetDoublev(GL_PROJECTION_MATRIX, projection);
glGetIntegerv(GL_VIEWPORT, viewPort);
for (int i = 0; i < model->_numFaces; i++) {
for (uint i = 0; i < model->_numFaces; i++) {
int *indices = (int *)model->_faces[i]._indexes;
for (uint j = 0; j < model->_faces[i]._faceLength * 3; j++) {

View file

@ -534,7 +534,7 @@ void GfxTinyGL::getBoundingBoxPos(const EMIModel *model, int *x1, int *y1, int *
tglGetFloatv(TGL_PROJECTION_MATRIX, projection);
tglGetIntegerv(TGL_VIEWPORT, viewPort);
for (int i = 0; i < model->_numFaces; i++) {
for (uint i = 0; i < model->_numFaces; i++) {
int *indices = (int *)model->_faces[i]._indexes;
for (uint j = 0; j < model->_faces[i]._faceLength * 3; j++) {