aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL/src/LuaSL_compile.c
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-02-04 23:02:04 +1000
committerDavid Walter Seikel2012-02-04 23:02:04 +1000
commit1ba092a0c394ac5cf5d4d8ab1ea280b29ff9742d (patch)
tree52c1ff36d3e2cdc0507cf5529f33031271017c9b /LuaSL/src/LuaSL_compile.c
parentComment new problem - dot operator not mixing too well with unplain assignments. (diff)
downloadSledjHamr-1ba092a0c394ac5cf5d4d8ab1ea280b29ff9742d.zip
SledjHamr-1ba092a0c394ac5cf5d4d8ab1ea280b29ff9742d.tar.gz
SledjHamr-1ba092a0c394ac5cf5d4d8ab1ea280b29ff9742d.tar.bz2
SledjHamr-1ba092a0c394ac5cf5d4d8ab1ea280b29ff9742d.tar.xz
Fix up rotation and vector subscripts in expressions and non plain assignments.
Diffstat (limited to 'LuaSL/src/LuaSL_compile.c')
-rw-r--r--LuaSL/src/LuaSL_compile.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/LuaSL/src/LuaSL_compile.c b/LuaSL/src/LuaSL_compile.c
index 610753a..16e1c1d 100644
--- a/LuaSL/src/LuaSL_compile.c
+++ b/LuaSL/src/LuaSL_compile.c
@@ -1,13 +1,6 @@
1#include "LuaSL.h" 1#include "LuaSL.h"
2 2
3/* TODO - problem dejour 3/* TODO - problem de jour
4
5 RefPos.z += (float) Zoffset / 100.;
6
7Gets converted to -
8
9 RefPos.z --[[+=]] = RefPos + --[[float]] Zoffset/100.;
10
11*/ 4*/
12 5
13static LSL_Leaf *evaluateFloatToken(LSL_Leaf *content, LSL_Leaf *left, LSL_Leaf *right); 6static LSL_Leaf *evaluateFloatToken(LSL_Leaf *content, LSL_Leaf *left, LSL_Leaf *right);
@@ -1696,7 +1689,10 @@ else
1696 } 1689 }
1697 if ((LSL_ASSIGNMENT & leaf->toKen->flags) && (LSL_ASSIGNMENT_PLAIN != leaf->toKen->type)) 1690 if ((LSL_ASSIGNMENT & leaf->toKen->flags) && (LSL_ASSIGNMENT_PLAIN != leaf->toKen->type))
1698 { 1691 {
1699 fprintf(file, " --[[%s]] = %s %.1s ", leaf->toKen->toKen, leaf->left->value.identifierValue->name.text, leaf->toKen->toKen); 1692 if (leaf->left->value.identifierValue->sub)
1693 fprintf(file, " --[[%s]] = %s.%s %.1s ", leaf->toKen->toKen, leaf->left->value.identifierValue->name.text, leaf->left->value.identifierValue->sub, leaf->toKen->toKen);
1694 else
1695 fprintf(file, " --[[%s]] = %s %.1s ", leaf->toKen->toKen, leaf->left->value.identifierValue->name.text, leaf->toKen->toKen);
1700 } 1696 }
1701 else if (LSL_TYPE & leaf->toKen->flags) 1697 else if (LSL_TYPE & leaf->toKen->flags)
1702 { 1698 {