[Scummvm-cvs-logs] SF.net SVN: scummvm:[34665] residual/trunk/engine
aquadran at users.sourceforge.net
aquadran at users.sourceforge.net
Sun Sep 28 17:23:16 CEST 2008
Revision: 34665
http://scummvm.svn.sourceforge.net/scummvm/?rev=34665&view=rev
Author: aquadran
Date: 2008-09-28 15:23:15 +0000 (Sun, 28 Sep 2008)
Log Message:
-----------
remove \n from warning() and error() funcs
Modified Paths:
--------------
residual/trunk/engine/actor.cpp
residual/trunk/engine/backend/platform/sdl/driver_gl.cpp
residual/trunk/engine/bitmap.cpp
residual/trunk/engine/colormap.h
residual/trunk/engine/costume.cpp
residual/trunk/engine/engine.cpp
residual/trunk/engine/font.cpp
residual/trunk/engine/keyframe.cpp
residual/trunk/engine/lipsynch.cpp
residual/trunk/engine/localize.cpp
residual/trunk/engine/lua.cpp
residual/trunk/engine/material.cpp
residual/trunk/engine/model.cpp
residual/trunk/engine/resource.cpp
residual/trunk/engine/smush/smush.cpp
residual/trunk/engine/textobject.cpp
residual/trunk/engine/textsplit.cpp
residual/trunk/engine/tinygl/light.cpp
residual/trunk/engine/tinygl/misc.cpp
residual/trunk/engine/tinygl/specbuf.cpp
residual/trunk/engine/tinygl/vertex.cpp
residual/trunk/engine/walkplane.cpp
Modified: residual/trunk/engine/actor.cpp
===================================================================
--- residual/trunk/engine/actor.cpp 2008-09-27 23:27:01 UTC (rev 34664)
+++ residual/trunk/engine/actor.cpp 2008-09-28 15:23:15 UTC (rev 34665)
@@ -260,12 +260,12 @@
_rightTurnChore = right_chore;
if ((left_chore >= 0 && right_chore < 0) || (left_chore < 0 && right_chore >= 0))
- error("Unexpectedly got only one turn chore\n");
+ error("Unexpectedly got only one turn chore");
}
void Actor::setTalkChore(int index, int chore, Costume *cost) {
if (index < 1 || index > 10)
- error("Got talk chore index out of range (%d)\n", index);
+ error("Got talk chore index out of range (%d)", index);
index--;
Modified: residual/trunk/engine/backend/platform/sdl/driver_gl.cpp
===================================================================
--- residual/trunk/engine/backend/platform/sdl/driver_gl.cpp 2008-09-27 23:27:01 UTC (rev 34664)
+++ residual/trunk/engine/backend/platform/sdl/driver_gl.cpp 2008-09-28 15:23:15 UTC (rev 34665)
@@ -588,7 +588,7 @@
if (bitmap->_currImage - 1 < bitmap->_numImages) {
drawDepthBitmap(bitmap->_x, bitmap->_y, bitmap->_width, bitmap->_height, bitmap->_data[bitmap->_currImage - 1]);
} else {
- warning("zbuffer image has index out of bounds! %d/%d\n", bitmap->_currImage, bitmap->_numImages);
+ warning("zbuffer image has index out of bounds! %d/%d", bitmap->_currImage, bitmap->_numImages);
}
}
}
@@ -654,7 +654,7 @@
void DriverGL::drawDepthBitmap(int x, int y, int w, int h, char *data) {
// if (num != 0) {
- // warning("Animation not handled yet in GL texture path !\n");
+ // warning("Animation not handled yet in GL texture path !");
// }
if (y + h == 480) {
glRasterPos2i(x, _screenHeight - 1);
Modified: residual/trunk/engine/bitmap.cpp
===================================================================
--- residual/trunk/engine/bitmap.cpp 2008-09-27 23:27:01 UTC (rev 34664)
+++ residual/trunk/engine/bitmap.cpp 2008-09-28 15:23:15 UTC (rev 34665)
@@ -41,7 +41,7 @@
if (len < 8 || memcmp(data, "BM F\0\0\0", 8) != 0) {
if (debugLevel == DEBUG_BITMAPS || debugLevel == DEBUG_ERROR || debugLevel == DEBUG_ALL)
- error("Invalid magic loading bitmap\n");
+ error("Invalid magic loading bitmap");
}
strcpy(_filename, filename);
Modified: residual/trunk/engine/colormap.h
===================================================================
--- residual/trunk/engine/colormap.h 2008-09-27 23:27:01 UTC (rev 34664)
+++ residual/trunk/engine/colormap.h 2008-09-28 15:23:15 UTC (rev 34665)
@@ -38,7 +38,7 @@
CMap(const char *filename, const char *data, int len) :
Resource(filename) {
if (len < 4 || std::memcmp(data, "CMP ", 4) != 0)
- error("Invalid magic loading colormap\n");
+ error("Invalid magic loading colormap");
std::memcpy(_colors, data + 64, sizeof(_colors));
}
Modified: residual/trunk/engine/costume.cpp
===================================================================
--- residual/trunk/engine/costume.cpp 2008-09-27 23:27:01 UTC (rev 34664)
+++ residual/trunk/engine/costume.cpp 2008-09-28 15:23:15 UTC (rev 34665)
@@ -195,14 +195,14 @@
// as a different case then they were stored (tu_0_dorcu_door_open versus
// TU_0_DORCU_door_open), which was causing problems in the string comparison.
if(debugLevel == DEBUG_BITMAPS || debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL)
- warning("Missing scene bitmap: %s\n", bitmap);
+ warning("Missing scene bitmap: %s", bitmap);
/* In case you feel like drawing the missing bitmap anyway...
// Assume that all objects the scene file forgot about are OBJSTATE_STATE class
state = new ObjectState(0, ObjectState::OBJSTATE_STATE, bitmap, NULL, true);
if (!state) {
if (debugLevel == DEBUG_BITMAPS || debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL)
- warning("Couldn't find bitmap %s in current scene\n", _filename.c_str());
+ warning("Couldn't find bitmap %s in current scene", _filename.c_str());
return;
}
g_engine->currScene()->addObjectState(state);
@@ -244,7 +244,7 @@
// a valid colormap
if (!cmap) {
if (debugLevel == DEBUG_MODEL || debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL)
- warning("No colormap specified for %s, using %s\n", _filename.c_str(), DEFAULT_COLORMAP);
+ warning("No colormap specified for %s, using %s", _filename.c_str(), DEFAULT_COLORMAP);
cmap = g_resourceloader->loadColormap(DEFAULT_COLORMAP);
}
@@ -266,7 +266,7 @@
if (mc)
mc->node()->addChild(_hier);
else if (debugLevel == DEBUG_MODEL || debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL)
- warning("Parent of model %s wasn't a mesh\n", _filename.c_str());
+ warning("Parent of model %s wasn't a mesh", _filename.c_str());
}
}
@@ -445,7 +445,7 @@
break;
default:
if (debugLevel == DEBUG_MODEL || debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL)
- warning("Unknown key %d for keyframe %s\n", val, _keyf->filename());
+ warning("Unknown key %d for keyframe %s", val, _keyf->filename());
}
}
@@ -480,7 +480,7 @@
break;
default:
if (debugLevel == DEBUG_MODEL || debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL)
- warning("Unknown repeat mode %d for keyframe %s\n", _repeatMode, _keyf->filename());
+ warning("Unknown repeat mode %d for keyframe %s", _repeatMode, _keyf->filename());
}
}
_keyf->animate(_hier, _currTime / 1000.0, _priority1, _priority2);
@@ -492,7 +492,7 @@
_hier = mc->hierarchy();
else {
if (debugLevel == DEBUG_MODEL || debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL)
- warning("Parent of %s was not a model\n", _keyf->filename());
+ warning("Parent of %s was not a model", _keyf->filename());
_hier = NULL;
}
}
@@ -500,7 +500,7 @@
MeshComponent::MeshComponent(Costume::Component *parent, int parentID, const char *name, tag32 tag) :
Costume::Component(parent, parentID, tag), _name(name), _node(NULL) {
if (std::sscanf(name, "mesh %d", &_num) < 1)
- error("Couldn't parse mesh name %s\n", name);
+ error("Couldn't parse mesh name %s", name);
}
@@ -510,7 +510,7 @@
_node = mc->hierarchy() + _num;
else {
if (debugLevel == DEBUG_MODEL || debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL)
- warning("Parent of mesh %d was not a model\n", _num);
+ warning("Parent of mesh %d was not a model", _num);
_node = NULL;
}
}
@@ -533,7 +533,7 @@
_num(0) {
if (debugLevel == DEBUG_MODEL || debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL)
- warning("Constructing MaterialComponent %s\n", filename);
+ warning("Constructing MaterialComponent %s", filename);
}
void MaterialComponent::init() {
@@ -542,7 +542,7 @@
if (!cmap) {
// Use the default colormap if we're still drawing a blank
if (debugLevel == DEBUG_MODEL || debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL)
- warning("MaterialComponent::init on %s\n", _filename.c_str());
+ warning("MaterialComponent::init on %s", _filename.c_str());
cmap = g_resourceloader->loadColormap(DEFAULT_COLORMAP);
}
@@ -623,7 +623,7 @@
break;
default:
if (debugLevel == DEBUG_MODEL || debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL)
- warning("Unknown key %d for sound %s\n", val, _soundName.c_str());
+ warning("Unknown key %d for sound %s", val, _soundName.c_str());
}
}
@@ -663,7 +663,7 @@
Component *prevComponent = NULL;
if (std::sscanf(line, " %d %d %d %d %n", &id, &tagID, &hash, &parentID, &namePos) < 4)
- error("Bad component specification line: `%s'\n", line);
+ error("Bad component specification line: `%s'", line);
ts.nextLine();
// A Parent ID of "-1" indicates that the component should
@@ -904,7 +904,7 @@
char t[4];
std::memcpy(t, &tag, sizeof(tag32));
- error("loadComponent: Unknown tag '%c%c%c%c', name '%s'\n", t[0], t[1], t[2], t[3], name);
+ error("loadComponent: Unknown tag '%c%c%c%c', name '%s'", t[0], t[1], t[2], t[3], name);
return NULL;
}
Modified: residual/trunk/engine/engine.cpp
===================================================================
--- residual/trunk/engine/engine.cpp 2008-09-27 23:27:01 UTC (rev 34664)
+++ residual/trunk/engine/engine.cpp 2008-09-28 15:23:15 UTC (rev 34665)
@@ -845,7 +845,7 @@
}
Block *b = g_resourceloader->getFileBlock(name);
if (!b)
- warning("Could not find scene file %s\n", name);
+ warning("Could not find scene file %s", name);
_currScene = new Scene(name, b->data(), b->len());
registerScene(_currScene);
_currScene->setSoundParameters(20, 127);
Modified: residual/trunk/engine/font.cpp
===================================================================
--- residual/trunk/engine/font.cpp 2008-09-27 23:27:01 UTC (rev 34664)
+++ residual/trunk/engine/font.cpp 2008-09-28 15:23:15 UTC (rev 34665)
@@ -47,7 +47,7 @@
// Read character indexes - are the key/value reversed?
_charIndex = new uint16[_numChars];
if (!_charIndex)
- error("Could not load font %s. Out of memory\n", filename);
+ error("Could not load font %s. Out of memory", filename);
for (uint i = 0; i < _numChars; ++i) {
_charIndex[i] = READ_LE_UINT16(data + 2 * i);
}
@@ -57,7 +57,7 @@
// Read character headers
_charHeaders = new CharHeader[_numChars];
if (!_charHeaders)
- error("Could not load font %s. Out of memory\n", filename);
+ error("Could not load font %s. Out of memory", filename);
for (uint i = 0; i < _numChars; ++i) {
_charHeaders[i].offset = READ_LE_UINT32(data);
_charHeaders[i].width = *(int8 *)(data + 4);
@@ -70,7 +70,7 @@
// Read font data
_fontData = new byte[_dataSize];
if (!_fontData)
- error("Could not load font %s. Out of memory\n", filename);
+ error("Could not load font %s. Out of memory", filename);
memcpy(_fontData, data, _dataSize);
}
@@ -105,7 +105,7 @@
return i;
}
if (debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL)
- warning("The requsted character (code 0x%x) does not correspond to anything in the font data!\n", c2);
+ warning("The requsted character (code 0x%x) does not correspond to anything in the font data!", c2);
// If we couldn't find the character then default to
// the first character in the font so that something
// gets loaded to prevent the game from crashing
Modified: residual/trunk/engine/keyframe.cpp
===================================================================
--- residual/trunk/engine/keyframe.cpp 2008-09-27 23:27:01 UTC (rev 34664)
+++ residual/trunk/engine/keyframe.cpp 2008-09-28 15:23:15 UTC (rev 34665)
@@ -51,7 +51,7 @@
memcpy(filebuf, data + 4, 36);
filebuf[36] = 0;
- printf("Loading Keyframe '%s'.\n", filebuf);
+ printf("Loading Keyframe '%s'.", filebuf);
}
// Next four bytes are the flags
_flags = READ_LE_UINT32(data + 40);
Modified: residual/trunk/engine/lipsynch.cpp
===================================================================
--- residual/trunk/engine/lipsynch.cpp 2008-09-27 23:27:01 UTC (rev 34664)
+++ residual/trunk/engine/lipsynch.cpp 2008-09-28 15:23:15 UTC (rev 34665)
@@ -40,7 +40,7 @@
int j;
if (std::memcmp(data, "LIP!", 4) != 0) {
- error("Invalid file format in %s\n", filename);
+ error("Invalid file format in %s", filename);
} else {
_numEntries = (len - 8) / 4;
@@ -61,7 +61,7 @@
// Look for the animation corresponding to the phoneme
for (j = 0; j < _animTableSize && readPhoneme != _animTable[j].phoneme; j++);
if (readPhoneme != _animTable[j].phoneme) {
- warning("Unknown phoneme: 0x%X in file %s\n", readPhoneme, filename);
+ warning("Unknown phoneme: 0x%X in file %s", readPhoneme, filename);
_entries[i].anim = 1;
} else
_entries[i].anim = _animTable[j].anim;
Modified: residual/trunk/engine/localize.cpp
===================================================================
--- residual/trunk/engine/localize.cpp 2008-09-27 23:27:01 UTC (rev 34664)
+++ residual/trunk/engine/localize.cpp 2008-09-28 15:23:15 UTC (rev 34665)
@@ -64,7 +64,7 @@
f.close();
if (filesize < 4 || std::memcmp(data, "RCNE", 4) != 0)
- error("Invalid magic reading grim.tab\n");
+ error("Invalid magic reading grim.tab");
// Decode the data
for (int i = 4; i < filesize; i++)
Modified: residual/trunk/engine/lua.cpp
===================================================================
--- residual/trunk/engine/lua.cpp 2008-09-27 23:27:01 UTC (rev 34664)
+++ residual/trunk/engine/lua.cpp 2008-09-28 15:23:15 UTC (rev 34665)
@@ -217,11 +217,11 @@
if (lua_isnil(lua_getparam(param))) {
result = a->currentCostume();
if (!result && (debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL))
- warning("Actor %s has no costume [%s]\n", a->name(), called_from);
+ warning("Actor %s has no costume [%s]", a->name(), called_from);
} else {
result = a->findCostume(luaL_check_string(param));
if (!result && (debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL))
- warning("Actor %s has no costume %s [%s]\n", a->name(), lua_getstring(lua_getparam(param)), called_from);
+ warning("Actor %s has no costume %s [%s]", a->name(), lua_getstring(lua_getparam(param)), called_from);
}
return result;
}
@@ -428,7 +428,7 @@
// If the call to "next" fails then register an error
if (lua_call("next") != 0) {
- error("SetSayLineDefaults failed to get next key!\n");
+ error("SetSayLineDefaults failed to get next key!");
return;
}
key = lua_getresult(1);
@@ -439,7 +439,7 @@
if (strmatch(key_text, "font"))
sayLineDefaults.font = check_font(2);
else
- error("Unknown SetSayLineDefaults key %s\n", key_text);
+ error("Unknown SetSayLineDefaults key %s", key_text);
}
}
@@ -938,7 +938,7 @@
if (!c) {
lua_pushnil();
if (debugLevel == DEBUG_NORMAL || debugLevel == DEBUG_ALL)
- printf("GetActorCostume() on '%s' when actor has no costume!\n", act->name());
+ printf("GetActorCostume() on '%s' when actor has no costume!", act->name());
return;
}
lua_pushstring(const_cast<char *>(c->filename()));
@@ -1108,7 +1108,7 @@
if (lua_isnil(x)) {
if (act->isLookAtVectorZero()) {
if (debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL)
- warning("Actor requested to look at nothing, already looking at nothing!\n");
+ warning("Actor requested to look at nothing, already looking at nothing!");
return;
}
@@ -1630,7 +1630,7 @@
lua_pushnil();
// If the call to "next" fails then register an error
if (lua_call("next") != 0) {
- error("SayLine failed to get next key!\n");
+ error("SayLine failed to get next key!");
return;
}
key = lua_getresult(1);
@@ -1643,7 +1643,7 @@
else if (strmatch(key_text, "y"))
int y = atoi(lua_getstring(lua_getresult(2)));
else
- error("Unknown SayLine key '%s'\n", key_text);
+ error("Unknown SayLine key '%s'", key_text);
}
} else {
error("SayLine() unknown type of param");
@@ -2028,7 +2028,7 @@
default:
lua_pushnil();
if (debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL)
- warning("ImSetParam() Unimplemented %d, %d\n", param, value);
+ warning("ImSetParam() Unimplemented %d, %d", param, value);
}
}
@@ -2049,7 +2049,7 @@
default:
lua_pushnil();
if (debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL)
- warning("ImGetParam() Unimplemented %d\n", param);
+ warning("ImGetParam() Unimplemented %d", param);
}
}
@@ -2302,7 +2302,7 @@
// If the call to "next" fails then register an error
if (lua_call("next") != 0) {
- error("getTextObjectParams failed to get next key!\n");
+ error("getTextObjectParams failed to get next key!");
return;
}
key = lua_getresult(1);
@@ -2335,7 +2335,7 @@
else if (strmatch(key_text, "rjustify"))
textObject->setJustify(3);
else
- error("Unknown getTextObjectParams key '%s'\n", key_text);
+ error("Unknown getTextObjectParams key '%s'", key_text);
}
}
@@ -3856,7 +3856,7 @@
// Don't print warnings on Scripts\foo.lua,
// d:\grimFandango\Scripts\foo.lua
if (!std::strstr(filename, "Scripts\\") && (debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL))
- warning("Cannot find script %s\n", filename);
+ warning("Cannot find script %s", filename);
return 2;
}
@@ -3897,7 +3897,7 @@
lua_Object key = LUA_NOOBJECT;
if (!lua_istable(table)) {
- error("getTableValue(): Parameter not a table!\n");
+ error("getTableValue(): Parameter not a table!");
return 0;
}
@@ -3912,7 +3912,7 @@
// that it doesn't understand then an infinite loop
// will be set up repeating the same error.
if (lua_call("next") != 0) {
- error("getTableValue could not find the next key!\n");
+ error("getTableValue could not find the next key!");
return 0;
}
key = lua_getresult(1);
@@ -3937,7 +3937,7 @@
lua_Object getIndexedTableValue(lua_Object table, int index) {
if (!lua_istable(table)) {
- error("getIndexedTableValue(): Parameter not a table!\n");
+ error("getIndexedTableValue(): Parameter not a table!");
return 0;
}
lua_pushobject(table);
@@ -3947,7 +3947,7 @@
lua_pushnumber(index - 1);
// If the call to "next" fails then register an error
if (lua_call("next") != 0) {
- error("getIndexedTableValue failed to get next key!\n");
+ error("getIndexedTableValue failed to get next key!");
return 0;
}
return lua_getresult(2);
Modified: residual/trunk/engine/material.cpp
===================================================================
--- residual/trunk/engine/material.cpp 2008-09-27 23:27:01 UTC (rev 34664)
+++ residual/trunk/engine/material.cpp 2008-09-28 15:23:15 UTC (rev 34665)
@@ -34,7 +34,7 @@
Material::Material(const char *filename, const char *data, int len, const CMap &cmap) :
Resource(filename), _cmap((CMap *) &cmap) {
if (len < 4 || memcmp(data, "MAT ", 4) != 0)
- error("invalid magic loading texture\n");
+ error("invalid magic loading texture");
_numImages = READ_LE_UINT32(data + 12);
_currImage = 0;
@@ -43,7 +43,7 @@
if (_width == 0 || _height == 0) {
if (debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL)
- warning("skip load texture: bad texture size (%dx%d) for texture %s\n", _width, _height, filename);
+ warning("skip load texture: bad texture size (%dx%d) for texture %s", _width, _height, filename);
return;
}
Modified: residual/trunk/engine/model.cpp
===================================================================
--- residual/trunk/engine/model.cpp 2008-09-27 23:27:01 UTC (rev 34664)
+++ residual/trunk/engine/model.cpp 2008-09-28 15:23:15 UTC (rev 34665)
@@ -335,7 +335,7 @@
}
if (!ts.eof() && (debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL))
- warning("Unexpected junk at end of model text\n");
+ warning("Unexpected junk at end of model text");
}
void Model::Geoset::changeMaterials(ResPtr<Material> *materials) {
@@ -366,7 +366,7 @@
if (std::sscanf(ts.currentLine(), "shadow %d", &_shadow) < 1) {
_shadow = 0;
if (debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL)
- warning("Missing shadow directive in model\n");
+ warning("Missing shadow directive in model");
} else
ts.nextLine();
ts.scanString("geometrymode %d", 1, &_geometryMode);
@@ -417,10 +417,10 @@
int readlen;
if (ts.eof())
- error("Expected face data, got EOF\n");
+ error("Expected face data, got EOF");
if (std::sscanf(ts.currentLine(), " %d: %d %i %d %d %d %f %d%n", &num, &materialid, &type, &geo, &light, &tex, &extralight, &verts, &readlen) < 8)
- error("Expected face data, got `%s'\n", ts.currentLine());
+ error("Expected face data, got '%s'", ts.currentLine());
_materialid[num] = materialid;
_faces[num]._material = materials[_materialid[num]];
@@ -436,7 +436,7 @@
int readlen2;
if (std::sscanf(ts.currentLine() + readlen, " %d, %d%n", _faces[num]._vertices + j, _faces[num]._texVertices + j, &readlen2) < 2)
- error("Could not read vertex indices in line `%s'\n",
+ error("Could not read vertex indices in line '%s'",
ts.currentLine());
readlen += readlen2;
Modified: residual/trunk/engine/resource.cpp
===================================================================
--- residual/trunk/engine/resource.cpp 2008-09-27 23:27:01 UTC (rev 34664)
+++ residual/trunk/engine/resource.cpp 2008-09-28 15:23:15 UTC (rev 34665)
@@ -146,7 +146,7 @@
Block *b = getFileBlock(filename);
if (!b) { // Grim sometimes asks for non-existant bitmaps (eg, ha_overhead)
if (debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL)
- warning("Could not find bitmap %s\n", filename);
+ warning("Could not find bitmap %s", filename);
return NULL;
}
@@ -167,7 +167,7 @@
Block *b = getFileBlock(filename);
if (!b)
- error("Could not find colormap %s\n", filename);
+ error("Could not find colormap %s", filename);
CMap *result = new CMap(filename, b->data(), b->len());
delete b;
_cache[fname] = result;
@@ -179,7 +179,7 @@
makeLower(fname);
Block *b = getFileBlock(filename);
if (!b)
- error("Could not find costume %s\n", filename);
+ error("Could not find costume %s", filename);
Costume *result = new Costume(filename, b->data(), b->len(), prevCost);
delete b;
return result;
@@ -195,7 +195,7 @@
Block *b = getFileBlock(filename);
if (!b)
- error("Could not find font file %s\n", filename);
+ error("Could not find font file %s", filename);
Font *result = new Font(filename, b->data(), b->len());
delete b;
_cache[fname] = result;
@@ -212,7 +212,7 @@
Block *b = getFileBlock(filename);
if (!b)
- error("Could not find keyframe file %s\n", filename);
+ error("Could not find keyframe file %s", filename);
KeyframeAnim *result = new KeyframeAnim(filename, b->data(), b->len());
delete b;
_cache[fname] = result;
@@ -232,7 +232,7 @@
Block *b = getFileBlock(filename);
if (!b) {
if (debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL)
- warning("Could not find lipsynch file %s\n", filename);
+ warning("Could not find lipsynch file %s", filename);
result = NULL;
} else {
result = new LipSynch(filename, b->data(), b->len());
@@ -260,7 +260,7 @@
Block *b = getFileBlock(filename);
if (!b)
- error("Could not find material %s\n", filename);
+ error("Could not find material %s", filename);
Material *result = new Material(fname.c_str(), b->data(), b->len(), c);
delete b;
_cache[fname] = result;
@@ -277,7 +277,7 @@
Block *b = getFileBlock(filename);
if (!b)
- error("Could not find model %s\n", filename);
+ error("Could not find model %s", filename);
Model *result = new Model(filename, b->data(), b->len(), c);
delete b;
_cache[fname] = result;
Modified: residual/trunk/engine/smush/smush.cpp
===================================================================
--- residual/trunk/engine/smush/smush.cpp 2008-09-27 23:27:01 UTC (rev 34664)
+++ residual/trunk/engine/smush/smush.cpp 2008-09-28 15:23:15 UTC (rev 34665)
@@ -504,7 +504,7 @@
}
if (result != Z_OK || fileEOF) {
if (debugLevel == DEBUG_SMUSH || debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL)
- warning("zlibFile::read() Unknown decomp result: %d/%d\n", result, fileEOF);
+ warning("zlibFile::read() Unknown decomp result: %d/%d", result, fileEOF);
_fileDone = true;
break;
}
Modified: residual/trunk/engine/textobject.cpp
===================================================================
--- residual/trunk/engine/textobject.cpp 2008-09-27 23:27:01 UTC (rev 34664)
+++ residual/trunk/engine/textobject.cpp 2008-09-28 15:23:15 UTC (rev 34665)
@@ -52,7 +52,7 @@
if (strlen(text) < sizeof(_textID))
strcpy(_textID, text);
else {
- error("Text ID exceeded maximum length (%d): %s\n", sizeof(_textID), text);
+ error("Text ID exceeded maximum length (%d): %s", sizeof(_textID), text);
// this should be good enough to still be unique
// but for debug purposes lets make this crash the program so we know about it
strncpy(_textID, text, sizeof(_textID));
@@ -152,8 +152,7 @@
_bitmapWidthPtr[j] = 0;
for (int i = 0; currentLine[i] != '\0'; ++i) {
- _bitmapWidthPtr[j] += MAX(_font->getCharWidth(currentLine[i]),
- _font->getCharDataWidth(currentLine[i]));
+ _bitmapWidthPtr[j] += MAX(_font->getCharWidth(currentLine[i]), _font->getCharDataWidth(currentLine[i]));
}
_textBitmap = new uint8[_font->getHeight() * (_bitmapWidthPtr[j] + 1)];
@@ -172,7 +171,7 @@
for (int r = 0; r < charDataWidth; r++) {
const byte pixel = *(_font->getCharData(ch) + r + (charDataWidth * line));
byte *dst = _textBitmap + offset + startingCol + r;
- if ((*dst == 0) && (pixel != 0))
+ if (*dst == 0 && pixel != 0)
_textBitmap[offset + startingCol + r] = pixel;
}
if (line + startingLine >= _font->getHeight())
Modified: residual/trunk/engine/textsplit.cpp
===================================================================
--- residual/trunk/engine/textsplit.cpp 2008-09-27 23:27:01 UTC (rev 34664)
+++ residual/trunk/engine/textsplit.cpp 2008-09-28 15:23:15 UTC (rev 34665)
@@ -107,15 +107,15 @@
void TextSplitter::expectString(const char *expected) {
if (!_currLine)
- error("Expected `%s', got EOF\n", expected);
+ error("Expected `%s', got EOF", expected);
if (std::strcmp(currentLine(), expected) != 0)
- error("Expected `%s', got `%s'\n", expected, currentLine());
+ error("Expected `%s', got '%s'", expected, currentLine());
nextLine();
}
void TextSplitter::scanString(const char *fmt, int field_count, ...) {
if (!_currLine)
- error("Expected line of format `%s', got EOF\n", fmt);
+ error("Expected line of format '%s', got EOF", fmt);
std::va_list va;
@@ -126,7 +126,7 @@
#else
if (vsscanf(currentLine(), fmt, va) < field_count)
#endif
- error("Expected line of format `%s', got `%s'\n", fmt, currentLine());
+ error("Expected line of format '%s', got '%s'", fmt, currentLine());
va_end(va);
nextLine();
Modified: residual/trunk/engine/tinygl/light.cpp
===================================================================
--- residual/trunk/engine/tinygl/light.cpp 2008-09-27 23:27:01 UTC (rev 34664)
+++ residual/trunk/engine/tinygl/light.cpp 2008-09-28 15:23:15 UTC (rev 34665)
@@ -149,7 +149,7 @@
c->light_model_two_side = (int)v[0];
break;
default:
- tgl_warning("glopLightModel: illegal pname: 0x%x\n", pname);
+ tgl_warning("glopLightModel: illegal pname: 0x%x", pname);
//assert(0);
break;
}
Modified: residual/trunk/engine/tinygl/misc.cpp
===================================================================
--- residual/trunk/engine/tinygl/misc.cpp 2008-09-27 23:27:01 UTC (rev 34664)
+++ residual/trunk/engine/tinygl/misc.cpp 2008-09-28 15:23:15 UTC (rev 34665)
@@ -28,7 +28,7 @@
gl_fatal_error("glViewport: size too small");
}
- tgl_trace("glViewport: %d %d %d %d\n", xmin, ymin, xsize, ysize);
+ tgl_trace("glViewport: %d %d %d %d", xmin, ymin, xsize, ysize);
c->viewport.xmin = xmin;
c->viewport.ymin = ymin;
c->viewport.xsize = xsize;
@@ -95,7 +95,7 @@
if (code >= TGL_LIGHT0 && code < TGL_LIGHT0 + T_MAX_LIGHTS) {
gl_enable_disable_light(c, code - TGL_LIGHT0, v);
} else {
- //fprintf(stderr, "glEnableDisable: 0x%X not supported.\n", code);
+ //tgl_warning("glEnableDisable: 0x%X not supported.", code);
}
break;
}
Modified: residual/trunk/engine/tinygl/specbuf.cpp
===================================================================
--- residual/trunk/engine/tinygl/specbuf.cpp 2008-09-27 23:27:01 UTC (rev 34664)
+++ residual/trunk/engine/tinygl/specbuf.cpp 2008-09-28 15:23:15 UTC (rev 34665)
@@ -40,7 +40,7 @@
return buf;
}
//overwrite the lru buffer
- //tgl_trace("overwriting spec buffer :(\n");
+ //tgl_trace("overwriting spec buffer :(");
oldest->shininess_i = shininess_i;
oldest->last_used = c->specbuf_used_counter++;
calc_buf(oldest, shininess);
Modified: residual/trunk/engine/tinygl/vertex.cpp
===================================================================
--- residual/trunk/engine/tinygl/vertex.cpp 2008-09-27 23:27:01 UTC (rev 34664)
+++ residual/trunk/engine/tinygl/vertex.cpp 2008-09-28 15:23:15 UTC (rev 34665)
@@ -205,7 +205,7 @@
c->vertex_max <<= 1; // just double size
newarray = (GLVertex *)gl_malloc(sizeof(GLVertex) * c->vertex_max);
if (!newarray) {
- gl_fatal_error("unable to allocate GLVertex array.\n");
+ gl_fatal_error("unable to allocate GLVertex array.");
}
memcpy(newarray, c->vertex, n * sizeof(GLVertex));
gl_free(c->vertex);
@@ -319,7 +319,7 @@
case TGL_POLYGON:
break;
default:
- gl_fatal_error("glBegin: type %x not handled\n", c->begin_type);
+ gl_fatal_error("glBegin: type %x not handled", c->begin_type);
}
c->vertex_n = n;
Modified: residual/trunk/engine/walkplane.cpp
===================================================================
--- residual/trunk/engine/walkplane.cpp 2008-09-27 23:27:01 UTC (rev 34664)
+++ residual/trunk/engine/walkplane.cpp 2008-09-28 15:23:15 UTC (rev 34665)
@@ -70,7 +70,7 @@
else if (strcmp(buf, "invisible") == 0)
_visible = false;
else
- error("Invalid visibility spec: %s\n", buf);
+ error("Invalid visibility spec: %s", buf);
ts.scanString(" height %f", 1, &_height);
ts.scanString(" numvertices %d", 1, &_numVertices);
_vertices = new Vector3d[_numVertices + 1];
@@ -144,7 +144,7 @@
Vector3d Sector::projectToPlane(Vector3d point) const {
if (_normal.z() == 0)
- error("Trying to walk along vertical plane\n");
+ error("Trying to walk along vertical plane");
// Formula: return p - (n . (p - v_0))/(n . k) k
Vector3d result = point;
@@ -154,7 +154,7 @@
Vector3d Sector::projectToPuckVector(Vector3d v) const {
if (_normal.z() == 0)
- error("Trying to walk along vertical plane\n");
+ error("Trying to walk along vertical plane");
Vector3d result = v;
result.z() -= dot(_normal, v) / _normal.z();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list