projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* Comment out resizable flag because it blue-screens on Windows
[supertux.git]
/
src
/
object
/
scripted_object.hpp
diff --git
a/src/object/scripted_object.hpp
b/src/object/scripted_object.hpp
index
e1bc666
..
e7d6f9d
100644
(file)
--- a/
src/object/scripted_object.hpp
+++ b/
src/object/scripted_object.hpp
@@
-22,24
+22,25
@@
#include <string>
#include "physic.hpp"
#include <string>
#include "physic.hpp"
-#include "sprite/sprite.hpp"
#include "lisp/lisp.hpp"
#include "lisp/lisp.hpp"
-#include "
moving_object
.hpp"
+#include "
object/moving_sprite
.hpp"
#include "script_interface.hpp"
#include "scripting/scripted_object.hpp"
#include "script_interface.hpp"
#include "scripting/scripted_object.hpp"
-class ScriptedObject : public Moving
Object, public Scripting::ScriptedObject
,
- public ScriptInterface
+class ScriptedObject : public Moving
Sprite, public UsesPhysic
,
+ public Script
ing::ScriptedObject, public Script
Interface
{
public:
ScriptedObject(const lisp::Lisp& lisp);
{
public:
ScriptedObject(const lisp::Lisp& lisp);
- virtual
~ScriptedObject();
+ virtual
ScriptedObject* clone() const { return new ScriptedObject(*this); }
- virtual void expose(HSQUIRRELVM vm,
int
table_idx);
- virtual void unexpose(HSQUIRRELVM vm,
int
table_idx);
+ virtual void expose(HSQUIRRELVM vm,
SQInteger
table_idx);
+ virtual void unexpose(HSQUIRRELVM vm,
SQInteger
table_idx);
void update(float elapsed_time);
void draw(DrawingContext& context);
void update(float elapsed_time);
void draw(DrawingContext& context);
+
+ void collision_solid(const CollisionHit& hit);
HitResponse collision(GameObject& other, const CollisionHit& hit);
// --- Scripting Interface stuff ---
HitResponse collision(GameObject& other, const CollisionHit& hit);
// --- Scripting Interface stuff ---
@@
-56,6
+57,8
@@
public:
float get_velocity_y();
void set_visible(bool visible);
bool is_visible();
float get_velocity_y();
void set_visible(bool visible);
bool is_visible();
+ void set_solid(bool solid);
+ bool is_solid();
std::string get_name();
std::string get_name();
@@
-65,11
+68,7
@@
private:
bool physic_enabled;
bool visible;
bool new_vel_set;
bool physic_enabled;
bool visible;
bool new_vel_set;
- int z_pos;
Vector new_vel;
Vector new_vel;
- Physic physic;
- Sprite* sprite;
};
#endif
};
#endif
-