/* * $Id: objects_c.h,v 1.3 2002/09/14 01:49:01 aeneas Exp $ * Copyright (c) 2002, Dominik Schnitzer * * JFK - JFK Fucking Killerz, a massive multiplayer 2d shoot'em-up game * http://relax.ath.cx/jfk/ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef JFK_OBJECTS_C_H #define JFK_OBJECTS_C_H #include #include "object.h" #include "weapon.h" #include "person.h" #include "obstacle.h" #include "bullet.h" #include "explosion.h" #include "item.h" #include "sprite.h" using namespace std; using namespace JFK::client; namespace JFK { enum object_type { OBJECT_WEAPON, OBJECT_PERSON, OBJECT_ITEM, OBJECT_EXPLOSION, OBJECT_BULLET, OBJECT_OBSTACLE, OBJECT_MAX }; namespace client { class level; /* The base object */ class object : public virtual JFK::object { public: object(level *lvl) ; /* Draw the object on the given output layer */ virtual void draw(); protected: /* The with the object associated level */ level *lv; /* The current image, which is drawn with the next call of draw() */ sprite *image; }; /* The weapon class */ class weapon : public virtual object, public virtual JFK::weapon { public: weapon(level *lvl, int type); weapon(level *lvl, const string data); }; /* The person class */ class person : public virtual object, public virtual JFK::person { public: person(level *lvl, const string data); void draw(); }; /* The obstacle class */ class obstacle : public virtual object, public virtual JFK::obstacle { public: obstacle(level *lvl, int type); obstacle(level *lvl, const string data); }; /* The item class */ class item : public virtual object, public virtual JFK::item { public: item(level *lvl, int type); item(level *lvl, const string data); }; /* The explosion class */ class explosion : public virtual object, public virtual JFK::explosion { public: explosion(level *lvl); explosion(level *lvl, const string data); }; /* The bullet class */ class bullet : public virtual object, public virtual JFK::bullet { public: bullet(level *lvl, int type); bullet(level *lvl, const string data); }; } } #endif