diff options
Diffstat (limited to 'src/core/entity.cc')
-rw-r--r-- | src/core/entity.cc | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/core/entity.cc b/src/core/entity.cc index ebf9723..1e90b2a 100644 --- a/src/core/entity.cc +++ b/src/core/entity.cc @@ -335,4 +335,37 @@ void EntityControlable::set_direction(float direction) } } +/*----- EntityGlobe ------------------------------------------------ */ + +EntityGlobe::EntityGlobe(unsigned int flags) : + Entity(flags) +{ + entity_texture_id = 0; + entity_shape = Sphere; +} + +EntityGlobe::EntityGlobe(std::istream & is) : + Entity(is) +{ + std::string n; + char c; + while ( (is.get(c)) && (c != '"')); + while ( (is.get(c)) && (c != '"')) + n += c; + entity_texture = n; + n.clear(); + +} + +EntityGlobe::~EntityGlobe() +{ +} + +void EntityGlobe::serialize(std::ostream & os) const +{ + Entity::serialize(os); + os << " \"" << entity_texture << "\""; } + +} + |