Skip to content
Browse files

Moves define outside of macro, since windows compiler doesn't like ne…

…sted defines.
  • Loading branch information...
1 parent dad48c9 commit f08c12fc16db39cb75c8f603262d40879768972e @rapiscan rapiscan committed with Jun 29, 2010
Showing with 5 additions and 3 deletions.
  1. +5 −3 src/intensity/script_engine_embedding.h
View
8 src/intensity/script_engine_embedding.h
@@ -1423,16 +1423,17 @@ V8_FUNC_ddd(__script__physicsAddCapsule, {
V8_RETURN_INT(ret);
});
+#define GET_VEC(letter, v) \
+ scriptVec = scriptTris->getProperty(Utility::toString(i))->getProperty(letter); \
+ v = vec(scriptVec->getPropertyFloat("x"), scriptVec->getPropertyFloat("y"), scriptVec->getPropertyFloat("z"));
+
V8_FUNC_do(__script__physicsAddMesh, {
ScriptValuePtr scriptTris(new V8Value(ScriptEngineManager::getEngine(), arg2));
std::vector<triangle> tris;
int num = scriptTris->getPropertyInt("length");
for (int i = 0; i < num; i++)
{
ScriptValuePtr scriptVec;
- #define GET_VEC(letter, v) \
- scriptVec = scriptTris->getProperty(Utility::toString(i))->getProperty(letter); \
- v = vec(scriptVec->getPropertyFloat("x"), scriptVec->getPropertyFloat("y"), scriptVec->getPropertyFloat("z"));
vec a; vec b; vec c;
GET_VEC("a", a);
GET_VEC("b", b);
@@ -1445,6 +1446,7 @@ V8_FUNC_do(__script__physicsAddMesh, {
V8_RETURN_INT(ret);
});
+
V8_FUNC_i(__script__physicsRemoveBody, {
PhysicsManager::getEngine()->removeBody(arg1);
});

0 comments on commit f08c12f

Please sign in to comment.
Something went wrong with that request. Please try again.