images/powerups/1up
images/powerups/egg
images/powerups/star
- images/powerups/ice_flower
- images/powerups/fire_flower
+ images/powerups/iceflower
+ images/powerups/fireflower
images/engine
images/engine/menu
images/engine/fonts
--- /dev/null
+(supertux-sprite
+ (action
+ (images "1up.png")))
--- /dev/null
+(supertux-sprite
+ (action
+ (images "egg.png")))
--- /dev/null
+(supertux-sprite
+ (action
+ (images "fire_flower-0.png"
+ "fire_flower-1.png"
+ "fire_flower-2.png"
+ "fire_flower-3.png"
+ "fire_flower-2.png"
+ "fire_flower-1.png")))
--- /dev/null
+(supertux-sprite
+ (action
+ (images "ice_flower-0.png"
+ "ice_flower-1.png"
+ "ice_flower-2.png")))
--- /dev/null
+(supertux-sprite
+ (action
+ (images "star-0.png"
+ "star-1.png"
+ "star-2.png"
+ "star-3.png"
+ "star-4.png"
+ "star-3.png"
+ "star-2.png"
+ "star-1.png")))
;; Bad Guys are in separate .sprite files
-;; Game elements follow
-
- (sprite (name "egg")
- (action
- (images "powerups/egg/egg.png")))
- (sprite (name "1up")
- (action
- (images "powerups/1up/1up.png")))
- (sprite (name "star")
- (action
- (images "powerups/star/star-0.png"
- "powerups/star/star-1.png"
- "powerups/star/star-2.png"
- "powerups/star/star-3.png"
- "powerups/star/star-4.png"
- "powerups/star/star-3.png"
- "powerups/star/star-2.png"
- "powerups/star/star-1.png")))
- (sprite (name "fireflower")
- (action
- (images "powerups/fire_flower/fire_flower-0.png"
- "powerups/fire_flower/fire_flower-1.png"
- "powerups/fire_flower/fire_flower-2.png"
- "powerups/fire_flower/fire_flower-3.png"
- "powerups/fire_flower/fire_flower-2.png"
- "powerups/fire_flower/fire_flower-1.png")))
- (sprite (name "iceflower")
- (action
- (images "powerups/ice_flower/ice_flower-0.png"
- "powerups/ice_flower/ice_flower-1.png"
- "powerups/ice_flower/ice_flower-2.png")))
+;; Game elements are in separate .sprite files
;; Game Objects follow
(image "images/background/arctis.jpg")
(speed 0.500000)
)
- (powerup (x 135) (y 600) (sprite "egg"))
+ (powerup (x 135) (y 600) (sprite "images/powerups/egg/egg.sprite"))
(spawnpoint (name "main") (x 33) (y 160))
(infoblock (x 128) (y 800)
(message (_ "-Info
(mriceblock (x 439) (y 159) (stay-on-platform #t))
(mriceblock (x 479) (y 159) (stay-on-platform #f))
(zeekling (x 1000) (y 140))
- (powerup (x 900) (y 140) (sprite "star"))
- (powerup (x 940) (y 140) (sprite "fireflower"))
- (powerup (x 980) (y 140) (sprite "egg"))
- (powerup (x 1020) (y 140) (sprite "1up"))
+ (powerup (x 900) (y 140) (sprite "images/powerups/star/star.sprite"))
+ (powerup (x 940) (y 140) (sprite "images/powerups/fireflower/fireflower.sprite"))
+ (powerup (x 980) (y 140) (sprite "images/powerups/egg/egg.sprite"))
+ (powerup (x 1020) (y 140) (sprite "images/powerups/1up/1up.sprite"))
(powerup (x 1400) (y 140)
(sprite "images/powerups/potions/red-potion.sprite")
(contents "custom")
(platform (use_path "path2") (x 424) (y 650) (type "block2"))
(platform (use_path "path1") (x 456) (y 850) (type "block2"))
(platform (use_path "path1") (x 488) (y 850) (type "block3"))
- (powerup (x 100) (y 700) (sprite "egg"))
+ (powerup (x 100) (y 700) (sprite "images/powerups/egg/egg.sprite"))
(jumpy (x 140) (y 750))
(spawnpoint (name "main") (x 340) (y 800))
)
(bonusblock (x 160) (y 160)
(contents "custom")
(powerup
- (sprite "images/powerups/potions/images/powerups/potions/red-potion.sprite.sprite")
+ (sprite "images/powerups/potions/red-potion.sprite")
(script "
function wait(time) {
set_wakeup_time(time);
"#The egg makes Tux grow\n"
"#larger.\n"
"\n"
-"!images/powerups/fire_flower/fire_flower-0.png\n"
+"!images/powerups/fireflower/fire_flower-0.png\n"
"#The fire flower gives\n"
"#Tux the ability to\n"
"#shoot fireballs.\n"
"!images/powerups/egg/egg.png\n"
"#Vejce Tuxe nechá vyrůst.\n"
"\n"
-"!images/powerups/fire_flower/fire_flower-0.png\n"
+"!images/powerups/fireflower/fire_flower-0.png\n"
"#Ohnivá květina dá Tuxovi\n"
"#schopnost střílení\n"
"#ohnivých koulí.\n"
#The egg makes Tux grow
#larger.
-!images/powerups/fire_flower/fire_flower-0.png
+!images/powerups/fireflower/fire_flower-0.png
#The fire flower gives
#Tux the ability to
#shoot fireballs.
(distance_bias 100.0)
(volume 1))
(powerup (x 192) (y 2496)
- (sprite "fireflower")
+ (sprite "images/powerups/fireflower/fireflower.sprite")
)
(zeekling (x 1614) (y 665))
(zeekling (x 3744) (y 779))
reader.get("x", start_position.x);
reader.get("y", start_position.y);
bbox.set_size(87.8, 87.8); // sprite is (88px, 88px)
- sprite = sprite_manager->create("angrystone");
+ sprite = sprite_manager->create("images/creatures/angrystone/angrystone.sprite");
state = IDLE;
}
fluffy = false;
reader.get("fluffy",fluffy);
bbox.set_size(31.8, 31.8);
- if (fluffy) sprite = sprite_manager->create("fluffy");
+ if (fluffy) sprite = sprite_manager->create("images/creatures/fluffy/fluffy.sprite");
else sprite = sprite_manager->create("images/creatures/snowball/snowball.sprite");
set_direction = false;
}
bbox.set_size(32, 32);
if(_type == FIREFLOWER)
- sprite = sprite_manager->create("fireflower");
+ sprite = sprite_manager->create("images/powerups/fireflower/fireflower.sprite");
else
- sprite = sprite_manager->create("iceflower");
+ sprite = sprite_manager->create("images/powerups/iceflower/iceflower.sprite");
set_group(COLGROUP_TOUCHABLE);
}
{
bbox.set_size(32, 32);
- sprite = sprite_manager->create("egg");
+ sprite = sprite_manager->create("images/powerups/egg/egg.sprite");
physic.enable_gravity(true);
physic.set_velocity_x(100);
set_group(COLGROUP_MOVING);
{
bbox.set_pos(pos);
bbox.set_size(32, 32);
- sprite = sprite_manager->create("1up");
+ sprite = sprite_manager->create("images/powerups/1up/1up.sprite");
physic.set_velocity(100, 400);
set_group(COLGROUP_TOUCHABLE);
}
PowerUp::PowerUp(const lisp::Lisp& lisp)
{
- std::string sprite_name;
lisp.get("x", bbox.p1.x);
lisp.get("y", bbox.p1.y);
lisp.get("sprite", sprite_name);
script);
return ABORT_MOVE;
}
-
+
// some defaults if no script has been set
- if (sprite->get_name() == "egg") {
+ if (sprite_name == "images/powerups/egg/egg.sprite") {
player->set_bonus(GROWUP_BONUS, true);
sound_manager->play("sounds/grow.wav");
- } else if (sprite->get_name() == "fireflower") {
+ } else if (sprite_name == "images/powerups/fireflower/fireflower.sprite") {
player->set_bonus(FIRE_BONUS, true);
sound_manager->play("sounds/fire-flower.wav");
- } else if (sprite->get_name() == "star") {
+ } else if (sprite_name == "images/powerups/star/star.sprite") {
player->make_invincible();
- } else if (sprite->get_name() == "1up") {
+ } else if (sprite_name == "images/powerups/1up/1up.sprite") {
player->get_status()->incLives();
}
return ABORT_MOVE;
virtual HitResponse collision(GameObject& other, const CollisionHit& hit);
private:
+ std::string sprite_name;
Sprite* sprite;
Physic physic;
std::string script;
{
bbox.set_pos(pos);
bbox.set_size(32, 32);
- sprite = sprite_manager->create("star");
+ sprite = sprite_manager->create("images/powerups/star/star.sprite");
physic.set_velocity(SPEED, INITIALJUMP);
set_group(COLGROUP_MOVING);