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
/
pushbutton.cpp
diff --git
a/src/object/pushbutton.cpp
b/src/object/pushbutton.cpp
index
89ccb0e
..
3630cf6
100644
(file)
--- a/
src/object/pushbutton.cpp
+++ b/
src/object/pushbutton.cpp
@@
-27,6
+27,7
@@
#include "sprite/sprite_manager.hpp"
#include "sector.hpp"
#include "log.hpp"
#include "sprite/sprite_manager.hpp"
#include "sector.hpp"
#include "log.hpp"
+#include "sprite/sprite.hpp"
namespace {
const std::string BUTTON_SOUND = "sounds/switch.ogg";
namespace {
const std::string BUTTON_SOUND = "sounds/switch.ogg";
@@
-34,7
+35,7
@@
namespace {
}
PushButton::PushButton(const lisp::Lisp& lisp)
}
PushButton::PushButton(const lisp::Lisp& lisp)
- : MovingSprite(lisp, "images/objects/pushbutton/pushbutton.sprite", LAYER_BACKGROUNDTILES+1, COLGROUP_MOVING), state(OFF)
+
: MovingSprite(lisp, "images/objects/pushbutton/pushbutton.sprite", LAYER_BACKGROUNDTILES+1, COLGROUP_MOVING), state(OFF)
{
sound_manager->preload(BUTTON_SOUND);
set_action("off", -1);
{
sound_manager->preload(BUTTON_SOUND);
set_action("off", -1);
@@
-44,7
+45,7
@@
PushButton::PushButton(const lisp::Lisp& lisp)
}
void
}
void
-PushButton::update(float
elapsed_time
)
+PushButton::update(float
/*elapsed_time*/
)
{
}
{
}
@@
-71,7
+72,7
@@
PushButton::collision(GameObject& other, const CollisionHit& hit)
// play sound
sound_manager->play(BUTTON_SOUND);
// play sound
sound_manager->play(BUTTON_SOUND);
-
+
// run script
std::istringstream stream(script);
Sector::current()->run_script(stream, "PushButton");
// run script
std::istringstream stream(script);
Sector::current()->run_script(stream, "PushButton");
@@
-80,4
+81,3
@@
PushButton::collision(GameObject& other, const CollisionHit& hit)
}
IMPLEMENT_FACTORY(PushButton, "pushbutton");
}
IMPLEMENT_FACTORY(PushButton, "pushbutton");
-