diff options
author | Mike Buland <eichlan@xagasoft.com> | 2011-12-30 11:00:04 -0700 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2011-12-30 11:00:04 -0700 |
commit | 59f94f34ea25ce8613849bad43faf022b9ed5f5d (patch) | |
tree | 987aaeab8fbe4635018be1d2d31ea5c21e2edb69 /src/gamebuilder.cpp | |
parent | 9e6dc529833d17374a73bae1f30c7970f936f7cc (diff) | |
download | stage-59f94f34ea25ce8613849bad43faf022b9ed5f5d.tar.gz stage-59f94f34ea25ce8613849bad43faf022b9ed5f5d.tar.bz2 stage-59f94f34ea25ce8613849bad43faf022b9ed5f5d.tar.xz stage-59f94f34ea25ce8613849bad43faf022b9ed5f5d.zip |
Looks like commands work, mostly.
Diffstat (limited to 'src/gamebuilder.cpp')
-rw-r--r-- | src/gamebuilder.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/gamebuilder.cpp b/src/gamebuilder.cpp index 87389ff..e84d8f7 100644 --- a/src/gamebuilder.cpp +++ b/src/gamebuilder.cpp | |||
@@ -62,8 +62,7 @@ void GameBuilder::endFunctionParams() | |||
62 | for( Bu::StringList::iterator i = lRev.begin(); i; i++ ) | 62 | for( Bu::StringList::iterator i = lRev.begin(); i; i++ ) |
63 | { | 63 | { |
64 | addVarRef( *i, sidLocal ); | 64 | addVarRef( *i, sidLocal ); |
65 | addNode( AstNode::tSwap ); | 65 | addNode( AstNode::tStoreRev ); |
66 | addNode( AstNode::tStore ); | ||
67 | } | 66 | } |
68 | } | 67 | } |
69 | 68 | ||
@@ -171,6 +170,17 @@ void GameBuilder::addCommandParam( const Bu::String &sValue ) | |||
171 | pCurCmd->addParam( sValue ); | 170 | pCurCmd->addParam( sValue ); |
172 | } | 171 | } |
173 | 172 | ||
173 | void GameBuilder::endCommandParams() | ||
174 | { | ||
175 | Bu::StringList lParams = pCurCmd->getParamList(); | ||
176 | |||
177 | for( Bu::StringList::iterator i = lParams.begin(); i; i++ ) | ||
178 | { | ||
179 | addVarRef( *i, sidLocal ); | ||
180 | addNode( AstNode::tStoreRev ); | ||
181 | } | ||
182 | } | ||
183 | |||
174 | void GameBuilder::closeCommand() | 184 | void GameBuilder::closeCommand() |
175 | { | 185 | { |
176 | pCurCmd->setAst( pCurRoot ); | 186 | pCurCmd->setAst( pCurRoot ); |
@@ -182,7 +192,7 @@ void GameBuilder::closeCommand() | |||
182 | } | 192 | } |
183 | else | 193 | else |
184 | { | 194 | { |
185 | delete pCurCmd; | 195 | pCurSit->csLocal.addCommand( pCurCmd ); |
186 | } | 196 | } |
187 | pCurCmd = NULL; | 197 | pCurCmd = NULL; |
188 | } | 198 | } |