* Added a "flip" cheat to flip the level vertically.
* Added the --disable-sfx and --disable-music commandline args.
SVN-Revision: 2937
(supertux-sprite
(action
(name "right")
- (images "iceyeti_0.png"
+ (images "iceyeti_0.png"
"iceyeti_1.png"
"iceyeti_2.png"
- "iceyeti_1.png")
+ "iceyeti_1.png")
)
(action
(name "left")
(name "jump-left")
(mirror-action "jump-right")
)
+ (action
+ (name "stand-right")
+ (images "iceyeti_1.png")
+ )
+ (action
+ (name "stand-left")
+ (mirror-action "stand-right")
+ )
)
-
// jump
sound_manager->play("sounds/yeti_gna.wav");
physic.set_velocity_y(JUMP_VEL1);
+ if (side == LEFT) // on the left, facing Tux who is on the right
+ sprite->set_action("jump-right");
+ else
+ sprite->set_action("jump-left");
}
break;
default:
Yeti::go_right()
{
// jump and move right
+ sprite->set_action("right");
physic.set_velocity_y(JUMP_VEL1);
physic.set_velocity_x(RUN_SPEED);
state = GO_RIGHT;
void
Yeti::go_left()
{
+ sprite->set_action("left");
physic.set_velocity_y(JUMP_VEL1);
physic.set_velocity_x(-RUN_SPEED);
state = GO_LEFT;
} else if(state == GO_LEFT && !timer.started()) {
side = LEFT;
summon_snowball();
- sprite->set_action("right");
+ sprite->set_action("stand-right");
angry_jumping();
} else if(state == GO_RIGHT && !timer.started()) {
side = RIGHT;
summon_snowball();
- sprite->set_action("left");
+ sprite->set_action("stand-left");
angry_jumping();
} else if(state == ANGRY_JUMPING) {
if(!timer.started()) {
// we just landed
- // FixME need help here setting the walk,stand,jump image states
- sprite->set_action("jump-right");
+ if (side == LEFT) // standing on the left, facing Tux who is on the right
+ sprite->set_action("stand-right");
+ else
+ sprite->set_action("stand-left");
jumpcount++;
// make a stalactite falling down and shake camera a bit
Sector::current()->camera->shake(.1, 0, 10);
#include "gameconfig.hpp"
#include "gettext.hpp"
#include "exceptions.hpp"
+#include "flip_level_transformer.hpp"
// the engine will be run with a logical framerate of 64fps.
// We chose 64fps here because it is a power of 2, so 1/64 gives an "even"
currentsector->camera->reset(
Vector(tux.get_pos().x, tux.get_pos().y));
}
+ if(main_controller->check_cheatcode("flip")) {
+ FlipLevelTransformer flip_transformer;
+ flip_transformer.transform(GameSession::current()->get_current_level());
+ }
if(main_controller->check_cheatcode("finish")) {
// finish current sector
exit_status = ES_LEVEL_FINISHED;
" -f, --fullscreen Run in fullscreen mode\n"
" -w, --window Run in window mode\n"
" -g, --geometry WIDTHxHEIGHT Run SuperTux in given resolution\n"
+ " --disable-sfx Disable sound effects\n"
+ " --disable-music Disable music\n"
" --help Show this help message\n"
" --version Display SuperTux version and quit\n"
" --show-fps Display framerate in levels\n"
}
} else if(arg == "--show-fps") {
config->show_fps = true;
+ } else if(arg == "--disable-sfx") {
+ config->sound_enabled = false;
+ } else if(arg == "--disable-music") {
+ config->music_enabled = false;
} else if(arg == "--play-demo") {
if(i+1 >= argc) {
print_usage(argv[0]);