/* * Copyright (c) 2002, Stefan Farfeleder * $Id: explosion.cc,v 1.1.1.1 2002/08/18 17:28:50 aeneas Exp $ */ #include #include #include "explosion.h" #include "object.h" #include "parse.h" using namespace JFK; using std::string; explosion::explosion() { w = 0.063; /* XXX: explosion rotate to allow the client to draw them */ } string explosion::tostring() const { std::ostringstream oss; oss << "x=" << x << " y=" << y; return oss.str(); } void explosion::fromstring(const string& s) { int index = 0; string arg = argument(0, s); while (arg.length() > 0) { string id = identifier(arg); if (id == "x") x = strtodbl(value(arg)); if (id == "y") y = strtodbl(value(arg)); index++; arg = argument(index, s); } } string explosion::classname() const { return "explosion"; }