mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 14:18:37 +00:00
GRIM: Reduce scope of some variables in ChangeTextObject
This commit is contained in:
parent
bf49a3145d
commit
245ba3aa06
@ -53,11 +53,10 @@ void Lua_V1::KillTextObject() {
|
||||
* in the table in the LUA parameter 2.
|
||||
*/
|
||||
void Lua_V1::ChangeTextObject() {
|
||||
const char *line;
|
||||
lua_Object textObj = lua_getparam(1);
|
||||
int paramId = 2;
|
||||
if (lua_isuserdata(textObj) && lua_tag(textObj) == MKTAG('T', 'E', 'X', 'T')) {
|
||||
TextObject *textObject = gettextobject(textObj);
|
||||
int paramId = 2;
|
||||
for (;;) {
|
||||
lua_Object paramObj = lua_getparam(paramId++);
|
||||
if (!paramObj)
|
||||
@ -69,7 +68,7 @@ void Lua_V1::ChangeTextObject() {
|
||||
textObject->reposition();
|
||||
textObject->destroy();
|
||||
} else {
|
||||
line = lua_getstring(paramObj);
|
||||
const char *line = lua_getstring(paramObj);
|
||||
textObject->setText(line);
|
||||
lua_getstring(paramObj);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user