[Scummvm-cvs-logs] SF.net SVN: scummvm:[39884] residual/trunk/engine
aquadran at users.sourceforge.net
aquadran at users.sourceforge.net
Tue Apr 7 14:15:18 CEST 2009
Revision: 39884
http://scummvm.svn.sourceforge.net/scummvm/?rev=39884&view=rev
Author: aquadran
Date: 2009-04-07 12:15:12 +0000 (Tue, 07 Apr 2009)
Log Message:
-----------
ops
Modified Paths:
--------------
residual/trunk/engine/lua.cpp
residual/trunk/engine/textobject.cpp
Modified: residual/trunk/engine/lua.cpp
===================================================================
--- residual/trunk/engine/lua.cpp 2009-04-07 12:01:07 UTC (rev 39883)
+++ residual/trunk/engine/lua.cpp 2009-04-07 12:15:12 UTC (rev 39884)
@@ -2385,38 +2385,30 @@
* in the table in the LUA parameter 2.
*/
static void ChangeTextObject() {
- TextObject *modifyObject, *textObject;
+ TextObject *textObject;
lua_Object tableObj;
const char *line;
DEBUG_FUNCTION();
textObject = check_textobject(1);
- // when called in certain instances (such as don's computer)
- // the second parameter is the string and the third is the table
if (lua_isstring(lua_getparam(2))) {
tableObj = lua_getparam(3);
} else
tableObj = lua_getparam(2);
- modifyObject = TextObjectExists((char *)textObject->name());
- if (!modifyObject) {
- if (debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL)
- warning("ChangeTextObject(): Cannot find active text object");
- return;
- }
+ textObject->destroyBitmap();
- modifyObject->destroyBitmap();
-
if (lua_istable(tableObj))
- getTextObjectParams(modifyObject, tableObj);
- else if (lua_isstring(lua_getparam(2))) {
+ getTextObjectParams(textObject, tableObj);
+
+ if (lua_isstring(lua_getparam(2))) {
line = lua_getstring(lua_getparam(2));
- modifyObject->setText((char *)line);
+ textObject->setText((char *)line);
}
- modifyObject->createBitmap();
+ textObject->createBitmap();
- lua_pushnumber(modifyObject->getBitmapWidth());
- lua_pushnumber(modifyObject->getBitmapHeight());
+ lua_pushnumber(textObject->getBitmapWidth());
+ lua_pushnumber(textObject->getBitmapHeight());
}
/* Return the "text speed", this option must be handled
Modified: residual/trunk/engine/textobject.cpp
===================================================================
--- residual/trunk/engine/textobject.cpp 2009-04-07 12:01:07 UTC (rev 39883)
+++ residual/trunk/engine/textobject.cpp 2009-04-07 12:15:12 UTC (rev 39884)
@@ -156,7 +156,7 @@
}
_textBitmap = new uint8[_font->getHeight() * (_bitmapWidthPtr[j] + 1)];
- memset(_textBitmap, 0, _font->getHeight() * (_bitmapWidthPtr[j] + 1));
+ memset(_textBitmap, 0xff, _font->getHeight() * (_bitmapWidthPtr[j] + 1));
// Fill bitmap
int startOffset = 0;
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