projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Magic Blocks. (DrawingContext::get_light is not working yet.)
[supertux.git]
/
src
/
object
/
portable.hpp
diff --git
a/src/object/portable.hpp
b/src/object/portable.hpp
index
5b74e1d
..
721879d
100644
(file)
--- a/
src/object/portable.hpp
+++ b/
src/object/portable.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,15
+12,17
@@
// 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 __PORTABLE_H__
#define __PORTABLE_H__
#include "moving_object.hpp"
#ifndef __PORTABLE_H__
#define __PORTABLE_H__
#include "moving_object.hpp"
+#include "direction.hpp"
+#include "refcounter.hpp"
/**
* An object that inherits from this object is considered "portable" and can
/**
* An object that inherits from this object is considered "portable" and can
@@
-33,16
+35,18
@@
class Portable
public:
virtual ~Portable()
{ }
public:
virtual ~Portable()
{ }
-
+
/**
* called each frame when the object has been grabbed.
*/
/**
* called each frame when the object has been grabbed.
*/
- virtual void grab(MovingObject& object, const Vector& pos) = 0;
+ virtual void grab(MovingObject& object, const Vector& pos, Direction dir) = 0;
+
+ virtual void ungrab(MovingObject& , Direction )
+ {}
- /** called when object isn't grabbed anymore */
- virtual void ungrab(MovingObject& object)
+ virtual bool is_portable() const
{
{
-
(void) object
;
+
return true
;
}
};
}
};