(supertux-sprite
(action
+ (hitbox 0 0 87.8 87.8)
(name "idle")
(images "idle-0.png"))
(action
+ (hitbox 0 0 87.8 87.8)
(name "charging")
(images "charging-0.png"))
(action
+ (hitbox 0 0 87.8 87.8)
(name "attacking")
(images "attacking-0.png")))
(supertux-sprite
(action
(name "left")
- (hitbox 1 0 0 0)
+ (hitbox 1 0 31.8 31.8)
(images "left-0.png"
"left-1.png"
"left-2.png"
(action
(name "right")
- (hitbox 1 0 0 0)
+ (hitbox 1 0 31.8 31.8)
(mirror-action "left"))
(action
(name "squished")
- (hitbox 1 -19 0 0)
+ (hitbox 1 -19 31.8 31.8)
(images "../snowball/squished-left.png"))
)
(supertux-sprite
(action
(name "flying-left")
- (hitbox 3 3 0 0)
+ (hitbox 3 3 9 1)
(images "flying.png")
)
(action
(name "flying-right")
- (hitbox 3 3 0 0)
+ (hitbox 3 3 9 1)
(mirror-action "flying-left")
)
)
(supertux-sprite
(action
+ (hitbox 0 0 11 37)
(name "idle-left")
(images "idle.png")
)
(action
+ (hitbox 0 0 11 37)
(name "idle-right")
(mirror-action "idle-left")
)
(action
+ (hitbox 0 0 11 37)
(name "loading-left")
(images
"idle.png"
)
)
(action
+ (hitbox 0 0 11 37)
(name "loading-right")
(mirror-action "loading-left")
)
(supertux-sprite
(action
(name "dropper")
- (hitbox 0 0 0 0)
+ (hitbox 0 0 32 32)
(images "dropper.png"))
(action
(name "working-left")
- (hitbox 0 0 0 0)
+ (hitbox 0 0 32 32)
(images "working.png"))
(action
(name "broken-left")
- (hitbox 0 0 0 0)
+ (hitbox 0 0 32 32)
(images "broken.png"))
(action
(name "working-right")
- (hitbox 0 0 0 0)
+ (hitbox 0 0 32 32)
(mirror-action "working-left"))
(action
(name "broken-right")
- (hitbox 0 0 0 0)
+ (hitbox 0 0 32 32)
(mirror-action "broken-left"))
)
(supertux-sprite
(action
(name "normal")
- (hitbox 2 3 0 0)
+ (hitbox 2 3 31.8 31.8)
(images "left-0.png"
"left-1.png"))
(action
(name "down")
- (hitbox 2 11 0 0)
+ (hitbox 2 11 31.8 31.8)
(images "down.png"))
(action
(name "iced")
- (hitbox 2 3 0 0)
+ (hitbox 2 3 31.8 31.8)
(images "iced-left.png"))
(action
(name "iced-down")
- (hitbox 2 11 0 0)
+ (hitbox 2 11 31.8 31.8)
(images "iced-down.png"))
)
(supertux-sprite
(action
+ (hitbox 0 0 31.8 31.8)
(name "normal")
(images "flame-0.png"
"flame-1.png"))
(supertux-sprite
(action
(name "left")
- (hitbox 4 3 0 0)
+ (hitbox 4 3 31.8 31.8)
(images "left-0.png"
"left-1.png"))
(action
(name "right")
- (hitbox 4 3 0 0)
+ (hitbox 4 3 31.8 31.8)
(mirror-action "left"))
(action
(name "squished-left")
- (hitbox 4 -12 0 0)
+ (hitbox 4 -12 31.8 31.8)
(images "squished-left.png"))
(action
(name "squished-right")
- (hitbox 4 -12 0 0)
+ (hitbox 4 -12 31.8 31.8)
(mirror-action "squished-left"))
)
(action
(name "left-up")
- (hitbox 7 8 0 0)
+ (hitbox 7 8 31.8 31.8)
(images "left-up.png"))
(action
(name "right-up")
- (hitbox 7 8 0 0)
+ (hitbox 7 8 31.8 31.8)
(mirror-action "left-up"))
(action
(name "left-down")
- (hitbox 7 8 0 0)
+ (hitbox 7 8 31.8 31.8)
(images "left-down.png"))
(action
(name "right-down")
- (hitbox 7 8 0 0)
+ (hitbox 7 8 31.8 31.8)
(mirror-action "left-down"))
(action
(name "left-middle")
- (hitbox 7 8 0 0)
+ (hitbox 7 8 31.8 31.8)
(images "left-middle.png"))
(action
(name "right-middle")
- (hitbox 7 8 0 0)
+ (hitbox 7 8 31.8 31.8)
(mirror-action "left-middle"))
(action
(name "left-iced")
- (hitbox 7 8 0 0)
+ (hitbox 7 8 31.8 31.8)
(images "iced-left-up.png"))
(action
(name "right-iced")
- (hitbox 7 8 0 0)
+ (hitbox 7 8 31.8 31.8)
(mirror-action "left-iced"))
)
(supertux-sprite
(action
(name "falling")
- (hitbox 0 0 0 0)
+ (hitbox 0 0 63.8 63.8)
(images "falling-0.png"
"falling-1.png"
"falling-2.png"))
(action
(name "flying")
- (hitbox 0 0 0 0)
+ (hitbox 0 0 63.8 63.8)
(images "flying-0.png"
"flying-1.png"
"flying-2.png"))
(action
(name "pop")
- (hitbox 0 0 0 0)
+ (hitbox 0 0 63.8 63.8)
(fps 20)
(images "pop-0.png"
"pop-1.png"
(action
(name "ticking-left")
(fps 15.0)
- (hitbox 3 8 0 0)
+ (hitbox 3 8 31.8 31.8)
(images "exploding-left-0.png"
"exploding-left-1.png"))
(action
(name "ticking-right")
(fps 15.0)
- (hitbox 10 8 0 0)
+ (hitbox 10 8 31.8 31.8)
(mirror-action "ticking-left"))
(action
(name "explosion")
(fps 15.0)
- (hitbox 32 32 0 0)
+ (hitbox 32 32 31.8 31.8)
(images "explosion-0.png"
"explosion-1.png"))
)
(action
(name "left")
(fps 10.0)
- (hitbox 3 12 0 0)
+ (hitbox 3 12 31.8 31.8)
(images "left-0.png"
"left-1.png"
"left-2.png"
(action
(name "right")
(fps 10.0)
- (hitbox 7 12 0 0)
+ (hitbox 7 12 31.8 31.8)
(mirror-action "left"))
(action
(name "iced-left")
- (hitbox 3 12 0 0)
+ (hitbox 3 12 31.8 31.8)
(images "iced-left.png"))
(action
(name "iced-right")
- (hitbox 7 12 0 0)
+ (hitbox 7 12 31.8 31.8)
(mirror-action "iced-left"))
)
(supertux-sprite
(action
(name "left")
- (hitbox 2 3 0 0)
+ (hitbox 2 3 31.8 31.8)
(images "left-0.png"
"left-1.png"
"left-2.png"
"left-1.png"))
(action (name "right")
- (hitbox 2 3 0 0)
+ (hitbox 2 3 31.8 31.8)
(mirror-action "left"))
(action (name "falling-left")
- (hitbox 2 3 0 0)
+ (hitbox 2 3 31.8 31.8)
(images "flat-left.png"))
(action (name "falling-right")
- (hitbox 2 3 0 0)
+ (hitbox 2 3 31.8 31.8)
(mirror-action "falling-left"))
(action (name "flat-left")
- (hitbox 2 3 0 0)
+ (hitbox 2 3 31.8 31.8)
(images "flat-left.png"))
(action (name "flat-right")
- (hitbox 2 3 0 0)
+ (hitbox 2 3 31.8 31.8)
(mirror-action "falling-left")))
(action
(name "explosion-left")
(fps 15.0)
- (hitbox 0 32 0 0)
+ (hitbox 0 32 31.8 31.8)
(images "explosion-0.png"
"explosion-1.png")
)
(action
(name "explosion-right")
(fps 15.0)
- (hitbox 0 32 0 0)
+ (hitbox 0 32 31.8 31.8)
(mirror-action "explosion-left")
)
)
(action
(name "left")
(fps 15.0)
- (hitbox 3 12 0 0)
+ (hitbox 3 12 31.8 31.8)
(images "flying-0.png"
"flying-1.png"
"flying-2.png"
(action
(name "right")
(fps 10.0)
- (hitbox 7 12 0 0)
+ (hitbox 7 12 31.8 31.8)
(mirror-action "left")
)
(action
(name "squished-left")
- (hitbox 7 0 0 0)
+ (hitbox 7 0 31.8 31.8)
(images "squished.png")
)
(action
(name "squished-right")
- (hitbox 7 0 0 0)
+ (hitbox 7 0 31.8 31.8)
(mirror-action "squished-left"))
(action
(name "collision-left")
- (hitbox 3 12 0 0)
+ (hitbox 3 12 31.8 31.8)
(images "collision.png"))
(action
(name "collision-right")
- (hitbox 3 12 0 0)
+ (hitbox 3 12 31.8 31.8)
(mirror-action "squished-left")
)
)
(action
(name "left")
(fps 6)
- (hitbox 0 40 0 0)
+ (hitbox 0 40 31.8 63.8)
(images "walk-0.png"
"walk-1.png"
"walk-2.png"
(action
(name "right")
(fps 6)
- (hitbox 0 40 0 0)
+ (hitbox 0 40 31.8 63.8)
(mirror-action "left")
)
(action
(name "stand")
- (hitbox 0 40 0 0)
+ (hitbox 0 40 31.8 63.8)
(images "walk-0.png")
)
(action
(name "throw")
(fps 6)
- (hitbox 0 40 0 0)
+ (hitbox 0 40 31.8 63.8)
(images "jump-0.png"
)
)
(action
(name "jump")
- (hitbox 0 40 0 0)
+ (hitbox 0 40 31.8 63.8)
(images "jump-0.png"
"jump-1.png"
)
(action
(name "dead")
- (hitbox 0 0 0 0)
+ (hitbox 0 0 31.8 63.8)
(images "throw-0.png")
)
)
(supertux-sprite
(action
(name "left")
- (hitbox 6 10 0 0)
+ (hitbox 6 10 31.8 31.8)
(images "left-0.png"
"left-1.png"
"left-2.png"))
(action
(name "right")
- (hitbox 6 10 0 0)
+ (hitbox 6 10 31.8 31.8)
(mirror-action "left"))
(action
(name "iced-left")
- (hitbox 6 10 0 0)
+ (hitbox 6 10 31.8 31.8)
(images "iced-left.png"))
(action
(name "iced-right")
- (hitbox 6 10 0 0)
+ (hitbox 6 10 31.8 31.8)
(mirror-action "iced-left")
)
(action
(name "sleeping-left")
- (hitbox 6 10 0 0)
+ (hitbox 6 10 31.8 31.8)
(images "sleeping-left.png"))
(action
(name "sleeping-right")
- (hitbox 6 10 0 0)
+ (hitbox 6 10 31.8 31.8)
(mirror-action "sleeping-left"))
(action
(name "waking-left")
- (hitbox 6 10 0 0)
+ (hitbox 6 10 31.8 31.8)
(fps 6.0)
(images "waking-left-0.png"
"waking-left-1.png"
(action
(name "waking-right")
(fps 6.0)
- (hitbox 6 10 0 0)
+ (hitbox 6 10 31.8 31.8)
(mirror-action "waking-left"))
)
(supertux-sprite
(action
(name "left")
- (hitbox 2 4 0 0)
+ (hitbox 2 4 31.8 31.8)
(images "left-0.png"
"left-1.png"
"left-2.png"))
(action
(name "right")
- (hitbox 2 4 0 0)
+ (hitbox 2 4 31.8 31.8)
(mirror-action "left"))
(action
(name "squished-left")
- (hitbox 0 3 0 0)
+ (hitbox 0 3 31.8 31.8)
(images "squished.png"))
(action
(name "squished-right")
- (hitbox 0 3 0 0)
+ (hitbox 0 3 31.8 31.8)
(mirror-action "squished-left")
)
)
(supertux-sprite
(action
(name "standing-left")
- (hitbox 0 0 0 0)
+ (hitbox 0 0 33.8 43.8)
(images "standing-0.png"))
(action
(name "standing-right")
- (hitbox 0 0 0 0)
+ (hitbox 0 0 33.8 43.8)
(mirror-action "standing-left"))
(action
(name "charging-left")
- (hitbox 0 0 0 0)
+ (hitbox 0 0 33.8 43.8)
(fps 10.0)
(images "charging-0.png"
"charging-1.png"))
(action
(name "charging-right")
(fps 10.0)
- (hitbox 0 0 0 0)
+ (hitbox 0 0 33.8 43.8)
(mirror-action "charging-left"))
(action
(name "jumping-left")
- (hitbox 0 0 0 0)
+ (hitbox 0 0 33.8 43.8)
(images "jumping-0.png"))
(action
(name "jumping-right")
- (hitbox 0 0 0 0)
+ (hitbox 0 0 33.8 43.8)
(mirror-action "jumping-left"))
(action
(name "squished-left")
- (hitbox 0 -14 0 0)
+ (hitbox 0 -14 33.8 43.8)
(images "squished-0.png"))
(action
(name "squished-right")
- (hitbox 0 -14 0 0)
+ (hitbox 0 -14 33.8 43.8)
(mirror-action "squished-left")))
(supertux-sprite
(action
(name "left")
- (hitbox 2 3 0 0)
+ (hitbox 2 3 31.8 31.8)
(images "snowsnail1.png"
"snowsnail2.png"
"snowsnail3.png"
))
(action (name "right")
- (hitbox 2 3 0 0)
+ (hitbox 2 3 31.8 31.8)
(mirror-action "left"))
(action (name "falling-left")
- (hitbox 2 3 0 0)
+ (hitbox 2 3 31.8 31.8)
(images "snowsnail_flip1.png"
"snowsnail_flip2.png"
"snowsnail_flip3.png"
))
(action (name "falling-right")
- (hitbox 2 3 0 0)
+ (hitbox 2 3 31.8 31.8)
(mirror-action "falling-left"))
(action (name "flat-left")
- (hitbox 2 3 0 0)
+ (hitbox 2 3 31.8 31.8)
(images "snowsnail_flip1.png"
"snowsnail_flip2.png"
"snowsnail_flip3.png"
))
(action (name "flat-right")
- (hitbox 2 3 0 0)
+ (hitbox 2 3 31.8 31.8)
(mirror-action "falling-left")))
(supertux-sprite
(action
(name "left")
- (hitbox 2 4 0 0)
+ (hitbox 2 4 31.8 31.8)
(images "left-0.png"
"left-1.png"
"left-2.png")
)
(action
(name "right")
- (hitbox 2 4 0 0)
+ (hitbox 2 4 31.8 31.8)
(mirror-action "left")
)
(action
(name "squished-left")
- (hitbox 1 -19 0 0)
+ (hitbox 1 -19 31.8 31.8)
(images "squished-left.png")
)
(action
(name "squished-right")
- (hitbox 1 -19 0 0)
+ (hitbox 1 -19 31.8 31.8)
(mirror-action "squished-left")
)
)
(supertux-sprite
(action
(name "left")
- (hitbox 4 3 0 0)
+ (hitbox 4 3 31.8 31.8)
(images "spidermite.png"
"spidermite0.png"
"spidermite1.png"
"spidermite0.png"))
(action
(name "right")
- (hitbox 4 3 0 0)
+ (hitbox 4 3 31.8 31.8)
(mirror-action "left"))
(action
(name "squished-left")
- (hitbox 4 -12 0 0)
+ (hitbox 4 -12 31.8 31.8)
(images "spidermite-squish.png"))
(action
(name "squished-right")
- (hitbox 4 -12 0 0)
+ (hitbox 4 -12 31.8 31.8)
(mirror-action "squished-left")))
(supertux-sprite
(action
(name "left")
- (hitbox 6 10 0 0)
+ (hitbox 6 10 31.8 31.8)
(images "left-0.png"
"left-1.png"
"left-2.png"))
(action
(name "right")
- (hitbox 6 10 0 0)
+ (hitbox 6 10 31.8 31.8)
(mirror-action "left"))
(action
(name "iced-left")
- (hitbox 6 10 0 0)
+ (hitbox 6 10 31.8 31.8)
(images "iced-left.png"))
(action
(name "iced-right")
- (hitbox 6 10 0 0)
+ (hitbox 6 10 31.8 31.8)
(mirror-action "iced-left")
)
(action
(name "sleeping-left")
- (hitbox 6 10 0 0)
+ (hitbox 6 10 31.8 31.8)
(images "sleeping-left.png"))
(action
(name "sleeping-right")
- (hitbox 6 10 0 0)
+ (hitbox 6 10 31.8 31.8)
(mirror-action "sleeping-left"))
(action
(name "waking-left")
- (hitbox 6 10 0 0)
+ (hitbox 6 10 31.8 31.8)
(fps 6.0)
(images "waking-left-0.png"
"waking-left-1.png"
(action
(name "waking-right")
(fps 6.0)
- (hitbox 6 10 0 0)
+ (hitbox 6 10 31.8 31.8)
(mirror-action "waking-left"))
)
(supertux-sprite
(action
(name "left")
- (hitbox 6 10 0 0)
+ (hitbox 6 10 31.8 31.8)
(images "left-0.png"
"left-1.png"
"left-2.png"))
(action
(name "right")
- (hitbox 6 10 0 0)
+ (hitbox 6 10 31.8 31.8)
(mirror-action "left"))
(action
(name "iced-left")
- (hitbox 6 10 0 0)
+ (hitbox 6 10 31.8 31.8)
(images "iced-left.png"))
(action
(name "iced-right")
- (hitbox 6 10 0 0)
+ (hitbox 6 10 31.8 31.8)
(mirror-action "iced-left")
)
)
(supertux-sprite
(action
(name "normal")
- (hitbox 0 0 0 0)
+ (hitbox 0 0 31.8 31.8)
(images "falling.png"))
(action
(name "squished")
- (hitbox 0 16 0 0)
+ (hitbox 0 16 31.8 31.8)
(images "broken.png")))
(supertux-sprite
(action
+ (hitbox 0 0 48 49)
(name "walking-left")
(images "walking1.png" "walking2.png" "walking3.png" "walking4.png")
)
(action
+ (hitbox 0 0 48 49)
(name "walking-right")
(mirror-action "walking-left")
)
(action
+ (hitbox 0 0 48 49)
(name "stacked-left")
(images "stacked.png")
)
(action
+ (hitbox 0 0 48 49)
(name "stacked-right")
(mirror-action "stacked-left")
)
(action
+ (hitbox 0 0 48 45)
(name "squished-left")
(images "squished.png")
)
(action
+ (hitbox 0 0 48 45)
(name "squished-right")
(mirror-action "squished-left")
)
(supertux-sprite
(action
+ (hitbox 0 0 31.8 31.8)
(name "idle")
(images
"idle-0.png"
)
)
(action
+ (hitbox 0 0 31.8 31.8)
(name "vanishing")
(images
"vanishing-0.png"
)
)
(action
+ (hitbox 0 0 31.8 31.8)
(name "warping")
(images
"warping-0.png"
(action
(name "run-right")
(fps 4.0)
- (hitbox 17 12 0 0)
+ (hitbox 17 12 60 90)
(images
"y1.png"
"y2.png"
(name "run-left")
(mirror-action "run-right")
(fps 4.0)
- (hitbox 17 12 0 0)
+ (hitbox 17 12 60 90)
)
(action
(name "jump-right")
(images
"yeti_jump.png"
)
- (hitbox 17 12 0 0)
+ (hitbox 17 12 60 90)
)
(action
(name "jump-left")
(mirror-action "jump-right")
- (hitbox 17 12 0 0)
+ (hitbox 17 12 60 90)
)
(action
(name "stand-right")
(images
"y.png"
)
- (hitbox 17 12 0 0)
+ (hitbox 17 12 60 90)
)
(action
(name "stand-left")
(mirror-action "stand-right")
- (hitbox 17 12 0 0)
+ (hitbox 17 12 60 90)
)
(action
(name "stomp-right")
(images
"y-jump.png"
)
- (hitbox 17 12 0 0)
+ (hitbox 17 12 60 90)
)
(action
(name "stomp-left")
(mirror-action "stomp-right")
- (hitbox 17 12 0 0)
+ (hitbox 17 12 60 90)
)
(action
(name "dead")
"busted2.png"
)
- (hitbox 300 400 0 0)
+ (hitbox 300 400 60 90)
)
)
(supertux-sprite
(action
(name "left")
- (hitbox 2 4 0 0)
+ (hitbox 2 4 63.8 50.8)
(images "left-0.png"
"left-1.png"
"left-2.png"
"left-3.png"))
(action
(name "right")
- (hitbox 2 4 0 0)
+ (hitbox 2 4 63.8 50.8)
(mirror-action "left"))
(action
(name "squished-left")
- (hitbox 2 -19 0 0)
+ (hitbox 2 -19 63.8 50.8)
(images "squished.png"))
(action
(name "squished-right")
- (hitbox 2 -19 0 0)
+ (hitbox 2 -19 63.8 50.8)
(mirror-action "squished-left"))
(action
(name "diving-left")
- (hitbox 2 4 0 0)
+ (hitbox 2 4 63.8 50.8)
(images "diving.png"))
(action
(name "diving-right")
- (hitbox 2 4 0 0)
+ (hitbox 2 4 63.8 50.8)
(mirror-action "diving-left")
)
)
{
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("images/creatures/angrystone/angrystone.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
state = IDLE;
}
{
start_position = pos;
bbox.set_pos(pos);
- bbox.set_size(31.8, 31.8);
sprite = sprite_manager->create("images/creatures/mr_bomb/bomb.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
state = STATE_TICKING;
timer.start(TICKINGTIME);
this->dir = dir;
{
reader.get("x", start_position.x);
reader.get("y", start_position.y);
- bbox.set_size(31.8, 31.8);
sprite = sprite_manager->create("images/creatures/bouncing_snowball/bouncing_snowball.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
set_direction = false;
}
{
start_position.x = pos_x;
start_position.y = pos_y;
- bbox.set_size(31.8, 31.8);
sprite = sprite_manager->create("images/creatures/bouncing_snowball/bouncing_snowball.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
set_direction = true;
initial_direction = d;
}
{
reader.get("x", start_position.x);
reader.get("y", start_position.y);
- bbox.set_size(9, 1);
sprite = sprite_manager->create("images/creatures/dart/dart.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
physic.enable_gravity(false);
countMe = false;
}
{
start_position.x = pos_x;
start_position.y = pos_y;
- bbox.set_size(9, 1);
sprite = sprite_manager->create("images/creatures/dart/dart.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
physic.enable_gravity(false);
countMe = false;
}
reader.get("initial-delay", initial_delay);
reader.get("fire-delay", fire_delay);
reader.get("ammo", ammo);
- bbox.set_size(11, 37);
sprite = sprite_manager->create("images/creatures/darttrap/darttrap.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
countMe = false;
}
reader.get("y", start_position.y);
reader.get("cycle", cycle);
reader.get("badguy", badguy);
- bbox.set_size(32, 32);
sprite = sprite_manager->create("images/creatures/dispenser/dispenser.sprite");
if (badguy == "mrrocket") {
sprite->set_action(dir == LEFT ? "working-left" : "working-right");
}
else {sprite->set_action("dropper");}
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
countMe = false;
}
{
reader.get("x", start_position.x);
reader.get("y", start_position.y);
- bbox.set_size(31.8, 31.8);
sprite = sprite_manager->create("images/creatures/fish/fish.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
physic.enable_gravity(true);
}
{
start_position.x = pos_x;
start_position.y = pos_y;
- bbox.set_size(31.8, 31.8);
sprite = sprite_manager->create("images/creatures/fish/fish.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
physic.enable_gravity(true);
}
reader.get("speed", speed);
bbox.set_pos(Vector(start_position.x + cos(angle) * radius,
start_position.y + sin(angle) * radius));
- bbox.set_size(32, 32);
sprite = sprite_manager->create("images/creatures/flame/flame.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
countMe = false;
layer = LAYER_FLOATINGOBJECTS;
}
{
reader.get("x", start_position.x);
reader.get("y", start_position.y);
- bbox.set_size(31.8, 31.8);
sprite = sprite_manager->create("images/creatures/flying_snowball/flying_snowball.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
physic.enable_gravity(false);
}
{
start_position.x = pos_x;
start_position.y = pos_y;
- bbox.set_size(31.8, 31.8);
sprite = sprite_manager->create("images/creatures/flying_snowball/flying_snowball.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
physic.enable_gravity(false);
}
{
reader.get("x", start_position.x);
reader.get("y", start_position.y);
- bbox.set_size(31.8, 31.8);
sprite = sprite_manager->create("images/creatures/jumpy/jumpy.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
}
void
{
reader.get("x", start_position.x);
start_position.y = 0; //place above visible area
- bbox.set_size(63.8, 63.8);
sprite = sprite_manager->create("images/creatures/kugelblitz/kugelblitz.sprite");
sprite->set_action("falling");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
physic.enable_gravity(false);
}
{
reader.get("x", start_position.x);
reader.get("y", start_position.y);
- bbox.set_size(31.8, 31.8);
sprite = sprite_manager->create("images/creatures/mr_bomb/mr_bomb.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
set_direction = false;
}
{
start_position.x = pos_x;
start_position.y = pos_y;
- bbox.set_size(31.8, 31.8);
sprite = sprite_manager->create("images/creatures/mr_bomb/mr_bomb.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
set_direction = true;
initial_direction = d;
}
{
reader.get("x", start_position.x);
reader.get("y", start_position.y);
- bbox.set_size(31.8, 31.8);
sprite = sprite_manager->create("images/creatures/mr_iceblock/mr_iceblock.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
set_direction = false;
}
{
start_position.x = pos_x;
start_position.y = pos_y;
- bbox.set_size(31.8, 31.8);
sprite = sprite_manager->create("images/creatures/mr_iceblock/mr_iceblock.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
set_direction = true;
initial_direction = d;
}
else
flags &= ~FLAG_PORTABLE;
- if(ice_state == ICESTATE_KICKED) {
- bbox.set_size(31.8, 31.8);
- }
-
switch(state) {
case ICESTATE_NORMAL:
physic.set_velocity_x(dir == LEFT ? -WALKSPEED : WALKSPEED);
{
reader.get("x", start_position.x);
reader.get("y", start_position.y);
- bbox.set_size(31.8, 31.8);
sprite = sprite_manager->create("images/creatures/mr_rocket/mr_rocket.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
set_direction = false;
}
{
start_position.x = pos_x;
start_position.y = pos_y;
- bbox.set_size(31.8, 31.8);
sprite = sprite_manager->create("images/creatures/mr_rocket/mr_rocket.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
set_direction = true;
initial_direction = d;
}
{
reader.get("x", start_position.x);
reader.get("y", start_position.y);
- bbox.set_size(31.8, 63.8);
sprite = sprite_manager->create("images/creatures/nolok/nolok.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
countMe = false;
}
{
start_position.x = pos_x;
start_position.y = pos_y;
- bbox.set_size(31.8, 63.8);
sprite = sprite_manager->create("images/creatures/nolok/nolok.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
countMe = false;
}
{
reader.get("x", start_position.x);
reader.get("y", start_position.y);
- bbox.set_size(31.8, 31.8);
sprite = sprite_manager->create("images/creatures/plant/plant.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
state = PLANT_SLEEPING;
}
{
reader.get("x", start_position.x);
reader.get("y", start_position.y);
- bbox.set_size(31.8, 31.8);
sprite = sprite_manager->create("images/creatures/poison_ivy/poison_ivy.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
set_direction = false;
}
{
start_position.x = pos_x;
start_position.y = pos_y;
- bbox.set_size(31.8, 31.8);
sprite = sprite_manager->create("images/creatures/poison_ivy/poison_ivy.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
set_direction = true;
initial_direction = d;
}
{
start_position = pos;
bbox.set_pos(pos);
- bbox.set_size(31.8, 31.8);
sprite = sprite_manager->create("images/creatures/mr_rocket/explosion.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
this->dir = dir;
countMe = false;
explode();
{
reader.get("x", start_position.x);
reader.get("y", start_position.y);
- bbox.set_size(33.8, 43.8); //sprite is 34x44
sprite = sprite_manager->create("images/creatures/skullyhop/skullyhop.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
has_initial_direction = false;
}
{
start_position.x = pos_x;
start_position.y = pos_y;
- bbox.set_size(33.8, 43.8); //sprite is 34x44
sprite = sprite_manager->create("images/creatures/skullyhop/skullyhop.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
has_initial_direction = true;
initial_direction = d;
}
{
reader.get("x", start_position.x);
reader.get("y", start_position.y);
- bbox.set_size(31.8, 31.8);
sprite = sprite_manager->create("images/creatures/snail/snail.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
set_direction = false;
}
{
start_position.x = pos_x;
start_position.y = pos_y;
- bbox.set_size(31.8, 31.8);
sprite = sprite_manager->create("images/creatures/snail/snail.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
set_direction = true;
initial_direction = d;
}
//This is for a hidden badguy :)
fluffy = false;
reader.get("fluffy",fluffy);
- bbox.set_size(31.8, 31.8);
if (fluffy) sprite = sprite_manager->create("images/creatures/fluffy/fluffy.sprite");
else sprite = sprite_manager->create("images/creatures/snowball/snowball.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
set_direction = false;
}
{
start_position.x = pos_x;
start_position.y = pos_y;
- bbox.set_size(31.8, 31.8);
sprite = sprite_manager->create("images/creatures/snowball/snowball.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
set_direction = true;
initial_direction = d;
}
{
reader.get("x", start_position.x);
reader.get("y", start_position.y);
- bbox.set_size(31.8, 31.8);
sprite = sprite_manager->create("images/creatures/spidermite/spidermite.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
physic.enable_gravity(false);
}
{
start_position.x = pos_x;
start_position.y = pos_y;
- bbox.set_size(31.8, 31.8);
sprite = sprite_manager->create("images/creatures/spidermite/spidermite.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
physic.enable_gravity(false);
}
{
reader.get("x", start_position.x);
reader.get("y", start_position.y);
- bbox.set_size(31.8, 31.8);
sprite = sprite_manager->create("images/creatures/spiky/spiky.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
}
void
{
reader.get("x", start_position.x);
reader.get("y", start_position.y);
- bbox.set_size(31.8, 31.8);
sprite = sprite_manager->create("images/creatures/spiky/sleepingspiky.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
state = SSPIKY_SLEEPING;
}
{
lisp.get("x", start_position.x);
lisp.get("y", start_position.y);
- bbox.set_size(31.8, 31.8);
sprite = sprite_manager->create("images/creatures/stalactite/stalactite.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
state = STALACTITE_HANGING;
countMe = false;
}
{
carrying = 0;
carried_by = 0;
- bbox.set_size(48, 49);
reader.get("x", start_position.x);
reader.get("y", start_position.y);
sprite = sprite_manager->create("images/creatures/totem/totem.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
}
Totem::~Totem()
}
sprite->set_action(dir == LEFT ? "squished-left" : "squished-right");
- this->bbox.set_size(48, 45);
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
+
kill_squished(player);
return true;
}
target->carrying = this;
this->carried_by = target;
- this->bbox.set_size(48, 45);
this->activate();
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
this->synchronize_with(target);
}
carried_by->carrying = 0;
this->carried_by = 0;
- this->bbox.set_size(48, 49);
this->activate();
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
+
physic.set_velocity_y(JUMP_OFF_SPEED_Y);
}
}
Vector pos = base->get_pos();
- pos.y -= 45;
+ pos.y -= sprite->get_current_hitbox_height();
set_pos(pos);
physic.set_velocity_x(base->physic.get_velocity_x());
reader.get("sector", target_sector);
reader.get("spawnpoint", target_spawnpoint);
- bbox.set_size(32, 32);
sprite = sprite_manager->create("images/creatures/willowisp/willowisp.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
countMe = false;
layer = LAYER_FLOATINGOBJECTS;
}
{
reader.get("x", start_position.x);
reader.get("y", start_position.y);
- bbox.set_size(60, 90);
sprite = sprite_manager->create("images/creatures/yeti/yeti.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
hit_points = INITIAL_HITPOINTS;
reader.get("dead-script", dead_script);
countMe = false;
{
reader.get("x", start_position.x);
reader.get("y", start_position.y);
- bbox.set_size(31.8, 31.8);
sprite = sprite_manager->create("images/creatures/zeekling/zeekling.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
set_direction = false;
state = FLYING;
}
{
start_position.x = pos_x;
start_position.y = pos_y;
- bbox.set_size(63.8, 50.8);
sprite = sprite_manager->create("images/creatures/zeekling/zeekling.sprite");
+ bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
set_direction = true;
initial_direction = d;
state = FLYING;