diff options
author | Eugene Sandulenko | 2017-03-29 22:16:46 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2017-03-29 22:17:18 +0200 |
commit | e135dad5ac0897edc30586668da256323561147a (patch) | |
tree | 3f1b67ba2532780a0489712f6846ba7c8472a378 /engines/director/lingo/lingo-gr.y | |
parent | 74e923d42a36f1a20ebc2610e08402b1ae4c0fe5 (diff) | |
download | scummvm-rg350-e135dad5ac0897edc30586668da256323561147a.tar.gz scummvm-rg350-e135dad5ac0897edc30586668da256323561147a.tar.bz2 scummvm-rg350-e135dad5ac0897edc30586668da256323561147a.zip |
DIRECTOR: Lingo: Added another if statement variant
Diffstat (limited to 'engines/director/lingo/lingo-gr.y')
-rw-r--r-- | engines/director/lingo/lingo-gr.y | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/engines/director/lingo/lingo-gr.y b/engines/director/lingo/lingo-gr.y index 407b1ea914..08af780465 100644 --- a/engines/director/lingo/lingo-gr.y +++ b/engines/director/lingo/lingo-gr.y @@ -292,6 +292,16 @@ ifstmt: if cond tTHENNL stmtlist end ENDCLAUSE { checkEnd($9, "if", true); g_lingo->processIf(0, $8 - $1); } + | if cond tTHENNL stmtlist end tNLELSE begin stmtoneliner end { + inst then = 0, else1 = 0, end = 0; + WRITE_UINT32(&then, $4 - $1); + WRITE_UINT32(&else1, $7 - $1); + WRITE_UINT32(&end, $9 - $1); + (*g_lingo->_currentScript)[$1 + 1] = then; /* thenpart */ + (*g_lingo->_currentScript)[$1 + 2] = else1; /* elsepart */ + (*g_lingo->_currentScript)[$1 + 3] = end; /* end, if cond fails */ + + g_lingo->processIf(0, $9 - $1); } | if cond tTHEN begin stmtoneliner end { inst then = 0, else1 = 0, end = 0; WRITE_UINT32(&then, $4 - $1); |