GRIM: Store the message id in TextObject::_textID, not the message itself.

Fix #274
This commit is contained in:
Giulio Camuffo 2011-07-22 15:59:06 +02:00
parent ed5242ff0c
commit 39c6553e61
3 changed files with 11 additions and 10 deletions

View file

@ -479,7 +479,7 @@ void L1_SetSayLineDefaults() {
void L1_SayLine() {
int vol = 127, buffer = 64, paramId = 1, x = -1, y = -1;
bool background = true;
char msgId[50];
const char *msgId = NULL;;
Common::String msg;
lua_Object paramObj = lua_getparam(paramId++);
@ -500,14 +500,13 @@ void L1_SayLine() {
if (lua_isnumber(paramObj))
background = false;
else {
const char *tmpstr = lua_getstring(paramObj);
msg = parseMsgText(tmpstr, msgId);
msgId = lua_getstring(paramObj);
}
}
paramObj = lua_getparam(paramId++);
}
actor->sayLine(msg.c_str(), msgId, background); //background, vol, pan, x, y
actor->sayLine(msgId, background); //background, vol, pan, x, y
}
}
}