aboutsummaryrefslogtreecommitdiff
path: root/engines/director/lingo/lingo-gr.y
diff options
context:
space:
mode:
authorEugene Sandulenko2016-07-04 16:21:02 +0200
committerEugene Sandulenko2016-08-03 23:40:36 +0200
commit97e80a0c7a376817b4304c57a355ebfe30e4ee12 (patch)
tree3ed42356811fa40ad1938f9b06d6f21ac3d71724 /engines/director/lingo/lingo-gr.y
parent05f89c2a1b8f0ce5c068725059d50a0a60a3709c (diff)
downloadscummvm-rg350-97e80a0c7a376817b4304c57a355ebfe30e4ee12.tar.gz
scummvm-rg350-97e80a0c7a376817b4304c57a355ebfe30e4ee12.tar.bz2
scummvm-rg350-97e80a0c7a376817b4304c57a355ebfe30e4ee12.zip
DIRECTOR: Lingo: Added support for two line if/else
Diffstat (limited to 'engines/director/lingo/lingo-gr.y')
-rw-r--r--engines/director/lingo/lingo-gr.y8
1 files changed, 8 insertions, 0 deletions
diff --git a/engines/director/lingo/lingo-gr.y b/engines/director/lingo/lingo-gr.y
index c0ec6292be..2b3f0cf7e3 100644
--- a/engines/director/lingo/lingo-gr.y
+++ b/engines/director/lingo/lingo-gr.y
@@ -177,6 +177,14 @@ stmtoneliner: if cond tTHEN begin stmt end {
WRITE_UINT32(&end, $6);
(*g_lingo->_currentScript)[$1 + 1] = then; /* thenpart */
(*g_lingo->_currentScript)[$1 + 3] = end; } /* end, if cond fails */
+ | if cond tTHEN begin stmt end '\n' tELSE begin stmt end '\n' {
+ inst then = 0, else1 = 0, end = 0;
+ WRITE_UINT32(&then, $4);
+ WRITE_UINT32(&else1, $9);
+ WRITE_UINT32(&end, $11);
+ (*g_lingo->_currentScript)[$1 + 1] = then; /* thenpart */
+ (*g_lingo->_currentScript)[$1 + 2] = else1; /* elsepart */
+ (*g_lingo->_currentScript)[$1 + 3] = end; } /* end, if cond fails */
;
ifstmt: if cond tTHEN stmtlist end tEND tIF {