projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* Add Airship (regular above-ground theme) and Battle (castle/boss theme) music court...
[supertux.git]
/
src
/
object_factory.cpp
diff --git
a/src/object_factory.cpp
b/src/object_factory.cpp
index
fe89724
..
cc68005
100644
(file)
--- a/
src/object_factory.cpp
+++ b/
src/object_factory.cpp
@@
-39,16
+39,18
@@
GameObject* create_object(const std::string& name, const lisp::Lisp& reader)
return i->second->create_object(reader);
}
return i->second->create_object(reader);
}
-GameObject* create_object(const std::string& name, const Vector& pos)
+GameObject* create_object(const std::string& name, const Vector& pos
, const Direction dir
)
{
std::stringstream lisptext;
{
std::stringstream lisptext;
- lisptext << "(" << name
- << " (x " << pos.x << ")"
- << " (y " << pos.y << "))";
+ lisptext << "((x " << pos.x << ")"
+ << " (y " << pos.y << ")";
+ if(dir != AUTO)
+ lisptext << " (direction " << dir << "))";
lisp::Parser parser;
const lisp::Lisp* lisp = parser.parse(lisptext, "create_object");
lisp::Parser parser;
const lisp::Lisp* lisp = parser.parse(lisptext, "create_object");
- GameObject* object = create_object(name, *
lisp
);
+ GameObject* object = create_object(name, *
(lisp->get_car())
);
return object;
}
return object;
}
+