projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix issue with action not being updated when typing grow()/fire()/etc in console...
[supertux.git]
/
src
/
object
/
rock.hpp
diff --git
a/src/object/rock.hpp
b/src/object/rock.hpp
index
28be0e6
..
86a8e0e
100644
(file)
--- a/
src/object/rock.hpp
+++ b/
src/object/rock.hpp
@@
-1,7
+1,7
@@
// $Id$
// $Id$
-//
+//
// SuperTux
// SuperTux
-// Copyright (C) 200
5
Matthias Braun <matze@braunis.de>
+// Copyright (C) 200
6
Matthias Braun <matze@braunis.de>
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
@@
-12,16
+12,15
@@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU 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
// 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.
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef __ROCK_H__
#define __ROCK_H__
#ifndef __ROCK_H__
#define __ROCK_H__
-#include "
moving_object
.hpp"
+#include "
object/moving_sprite
.hpp"
#include "physic.hpp"
#include "lisp/lisp.hpp"
#include "portable.hpp"
#include "physic.hpp"
#include "lisp/lisp.hpp"
#include "portable.hpp"
@@
-29,23
+28,26
@@
class Sprite;
class Sprite;
-class Rock : public Moving
Object, public Portable
, public Serializable
+class Rock : public Moving
Sprite, public Portable, protected UsesPhysic
, public Serializable
{
public:
{
public:
+ Rock(const Vector& pos, std::string spritename);
Rock(const lisp::Lisp& reader);
Rock(const lisp::Lisp& reader);
- virtual ~Rock();
+ Rock(const lisp::Lisp& reader, std::string spritename);
+ virtual Rock* clone() const { return new Rock(*this); }
+ void collision_solid(const CollisionHit& hit);
HitResponse collision(GameObject& other, const CollisionHit& hit);
void update(float elapsed_time);
HitResponse collision(GameObject& other, const CollisionHit& hit);
void update(float elapsed_time);
- void draw(DrawingContext& context);
void write(lisp::Writer& writer);
void write(lisp::Writer& writer);
-
- void grab(MovingObject& object, const Vector& pos);
-private:
+ void grab(MovingObject& object, const Vector& pos, Direction dir);
+ void ungrab(MovingObject& object, Direction dir);
+
+protected:
+ bool on_ground;
bool grabbed;
bool grabbed;
- Sprite* sprite;
- Physic physic;
+ Vector last_movement;
};
#endif
};
#endif