mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-06 10:17:14 +00:00
DIRECTOR: LINGO: Add eval arg to Lingo::pop/peek
This commit is contained in:
parent
d180343a16
commit
b19569eb39
@ -192,23 +192,23 @@ void Lingo::pushVoid() {
|
||||
push(d);
|
||||
}
|
||||
|
||||
Datum Lingo::pop(void) {
|
||||
Datum Lingo::pop(bool eval) {
|
||||
assert (_stack.size() != 0);
|
||||
|
||||
Datum ret = _stack.back();
|
||||
_stack.pop_back();
|
||||
if (ret.lazy) {
|
||||
if (eval && ret.lazy) {
|
||||
ret = ret.eval();
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Datum Lingo::peek(uint offset) {
|
||||
Datum Lingo::peek(uint offset, bool eval) {
|
||||
assert (_stack.size() > offset);
|
||||
|
||||
Datum ret = _stack[_stack.size() - 1 - offset];
|
||||
if (ret.lazy) {
|
||||
if (eval && ret.lazy) {
|
||||
ret = ret.eval();
|
||||
}
|
||||
return ret;
|
||||
|
@ -437,8 +437,8 @@ private:
|
||||
|
||||
public:
|
||||
void push(Datum d);
|
||||
Datum pop(void);
|
||||
Datum peek(uint offset);
|
||||
Datum pop(bool eval = true);
|
||||
Datum peek(uint offset, bool eval = true);
|
||||
|
||||
public:
|
||||
Common::HashMap<uint32, const char *> _eventHandlerTypes;
|
||||
|
Loading…
x
Reference in New Issue
Block a user