Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only show supported directions for each object that has Direction #2572

Merged
merged 16 commits into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions data/images/objects/pushbutton/pushbutton.sprite
Original file line number Diff line number Diff line change
@@ -1,16 +1,27 @@
(supertux-sprite
(action
(name "off")
(name "off-up")
(hitbox 0 0 30 16)
(images "pushbutton-0.png")
)
(action
(name "on")
(name "on-up")
(hitbox 0 0 30 10)
(loops 1)
(fps 20)
(loops 1)
(fps 20)
(images "pushbutton-1.png"
"pushbutton-2.png"
"pushbutton-3.png")
"pushbutton-2.png"
"pushbutton-3.png"
)
)
(action
(name "off-down")
(hitbox 0 0 30 16)
(flip-action "off-up")
)
(action
(name "on-down")
(hitbox 0 0 30 10)
(flip-action "on-up")
)
)
Binary file added data/images/objects/switch/down-0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/objects/switch/down-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/objects/switch/down-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/objects/switch/down-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/objects/switch/down-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 0 additions & 37 deletions data/images/objects/switch/left.sprite

This file was deleted.

Binary file removed data/images/objects/switch/right-0.png
Binary file not shown.
Binary file removed data/images/objects/switch/right-1.png
Binary file not shown.
Binary file removed data/images/objects/switch/right-2.png
Binary file not shown.
Binary file removed data/images/objects/switch/right-3.png
Binary file not shown.
Binary file removed data/images/objects/switch/right-4.png
Binary file not shown.
37 changes: 0 additions & 37 deletions data/images/objects/switch/right.sprite

This file was deleted.

129 changes: 120 additions & 9 deletions data/images/objects/switch/switch.sprite
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,147 @@
(action
(name "off")
(hitbox 3 4 25 39)
(images
(images
"switch-0.png"
)
)
(action
(name "turnon")
(fps 18)
(fps 18)
(hitbox 3 4 25 39)
(images
"switch-1.png"
(images
"switch-1.png"
"switch-2.png"
"switch-3.png"
"switch-3.png"
)
)
(action
(name "on")
(hitbox 3 4 25 39)
(images
(images
"switch-4.png"
)
)
(action
(name "turnoff")
(fps 18)
(fps 18)
(hitbox 3 4 25 39)
(images
"switch-3.png"
"switch-2.png"
"switch-1.png"
"switch-1.png"
)
)
(action
(name "off-left")
(hitbox 11 2 20 44)
(images
"left-0.png"
)
)
(action
(name "turnon-left")
(fps 18)
(hitbox 11 2 20 44)
(images
"left-1.png"
"left-2.png"
"left-3.png"
)
)
(action
(name "on-left")
(hitbox 11 2 20 44)
(images
"left-4.png"
)
)
(action
(name "turnoff-left")
(fps 18)
(hitbox 11 2 20 44)
(images
"left-3.png"
"left-2.png"
"left-1.png"
)
)
(action
(name "off-right")
(hitbox 0 2 20 43)
(mirror-action "off-left")
)
(action
(name "turnon-right")
(fps 18)
(hitbox 0 2 20 43)
(mirror-action "turnon-left")
)
(action
(name "on-right")
(hitbox 0 2 20 43)
(mirror-action "on-left")
)
(action
(name "turnoff-right")
(fps 18)
(hitbox 0 2 20 43)
(mirror-action "turnoff-left")
)
(action
(name "off-down")
(hitbox 2 0 43 20)
(images
"down-0.png"
)
)
(action
(name "turnon-down")
(fps 18)
(hitbox 2 0 43 20)
(images
"down-1.png"
"down-2.png"
"down-3.png"
)
)
(action
(name "on-down")
(hitbox 2 0 43 20)
(images
"down-4.png"
)
)
(action
(name "turnoff-down")
(fps 18)
(hitbox 2 0 43 20)
(images
"down-3.png"
"down-2.png"
"down-1.png"
)
)
(action
(name "off-up")
(hitbox 2 11 44 20)
(flip-action "off-down")
)
(action
(name "turnon-up")
(fps 18)
(hitbox 2 11 44 20)
(flip-action "turnon-down")
)
(action
(name "on-up")
(hitbox 2 11 44 20)
(flip-action "on-down")
)
(action
(name "turnoff-up")
(fps 18)
(hitbox 2 11 44 20)
(flip-action "turnoff-down")
)
)

12 changes: 6 additions & 6 deletions data/images/objects/trampoline/bumper.sprite
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
(supertux-sprite
(action
(name "right-normal")
(name "normal-right")
(hitbox 0 2 18 27)
(images "right-0.png")
)
(action
(name "right-swinging")
(name "swinging-right")
(fps 24)
(hitbox 0 2 18 27)
(images "right-0.png"
Expand All @@ -17,14 +17,14 @@
)
)
(action
(name "left-normal")
(name "normal-left")
(hitbox 14 2 18 27)
(mirror-action "right-normal")
(mirror-action "normal-right")
)
(action
(name "left-swinging")
(name "swinging-left")
(fps 24)
(hitbox 14 2 18 27)
(mirror-action "right-swinging")
(mirror-action "swinging-right")
)
)
6 changes: 6 additions & 0 deletions src/badguy/angrystone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,4 +209,10 @@ AngryStone::is_flammable() const
return false;
}

std::vector<Direction>
AngryStone::get_allowed_directions() const
{
return {};
}

/* EOF */
5 changes: 4 additions & 1 deletion src/badguy/angrystone.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ class AngryStone final : public BadGuy
virtual std::string get_display_name() const override { return display_name(); }

protected:
enum AngryStoneState
virtual std::vector<Direction> get_allowed_directions() const override;

protected:
enum AngryStoneState
{
IDLE,
CHARGING,
Expand Down
Loading
Loading