mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-16 22:58:09 +00:00
HDB: Add getStringOffStack()
This commit is contained in:
parent
79023f0f9e
commit
a9a2ee0479
@ -960,4 +960,14 @@ void LuaScript::checkParameters(const char *func, int params) {
|
||||
}
|
||||
}
|
||||
|
||||
const char *LuaScript::getStringOffStack() {
|
||||
if (!_systemInit) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const char *string = lua_tostring(_state, 1);
|
||||
lua_remove(_state, 1);
|
||||
return string;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -44,6 +44,8 @@ public:
|
||||
bool executeFile(const Common::String &filename);
|
||||
void checkParameters(const char *func, int params);
|
||||
|
||||
const char *getStringOffStack();
|
||||
|
||||
private:
|
||||
lua_State *_state;
|
||||
int _pcallErrorhandlerRegistryIndex;
|
||||
@ -56,7 +58,6 @@ private:
|
||||
bool executeChunk(Common::String &chunk, uint chunkSize, const Common::String &chunkName) const;
|
||||
void stripComments(char *chunk);
|
||||
void addPatches(Common::String &chunk, const char *scriptName);
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user