-
-
Notifications
You must be signed in to change notification settings - Fork 492
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improvements to Dart and DartTrap (#2554)
Removes all hard-coded coordinates and offsets in darttrap.cpp, now the darts will always spawn in the centre of the hitbox's height (width for up and down darts). This makes it much more intuitive to create custom sprites for DartTrap. The default sprite is adjusted for this in a way that won't affect existing levels. It also makes it possible to change the sprite of the dispensed Dart from DartTrap's menu in the editor. Darts and DartTraps now also support UP and DOWN directions, in addition to LEFT and RIGHT. This PR also cleans up darttrap.cpp/hpp according to the guidelines, namely adding the m_ prefix to member variables.
- Loading branch information
Showing
19 changed files
with
181 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,73 @@ | ||
(supertux-sprite | ||
(action | ||
(hitbox 21 13 11 37) | ||
(hitbox 21 13 11 54) | ||
(name "idle-left") | ||
(loops 1) | ||
(images "d3-.png" | ||
"d3-.png" | ||
"d3-.png" | ||
"d3-.png" | ||
"d4.png" | ||
"d-idle.png") | ||
(loops 1) | ||
(images "left-3.png" | ||
"left-3.png" | ||
"left-3.png" | ||
"left-3.png" | ||
"left-4.png" | ||
"left-idle.png" | ||
) | ||
) | ||
(action | ||
(hitbox 13 21 54 11) | ||
(name "idle-down") | ||
(loops 1) | ||
(images "down-3.png" | ||
"down-3.png" | ||
"down-3.png" | ||
"down-3.png" | ||
"down-4.png" | ||
"down-idle.png" | ||
) | ||
) | ||
;; This will never show up since the editor uses the flipped down texture | ||
;; But it prevents warnings for missing actions | ||
(action | ||
(hitbox 13 21 54 11) | ||
(name "editor-up") | ||
(images "down-1.png") | ||
) | ||
(action | ||
(hitbox 21 13 11 37) | ||
(hitbox 21 13 11 54) | ||
(name "idle-right") | ||
(loops 1) | ||
(loops 1) | ||
(mirror-action "idle-left") | ||
) | ||
(action | ||
(hitbox 21 13 11 37) | ||
(hitbox 21 13 11 54) | ||
(name "loading-left") | ||
(fps 10) | ||
(fps 10) | ||
(images | ||
"left-idle.png" | ||
"left-1.png" | ||
"left-2.png" | ||
"left-3.png" | ||
"left-3.png" | ||
"left-3.png" | ||
"left-3.png" | ||
) | ||
) | ||
(action | ||
(hitbox 13 21 54 11) | ||
(name "loading-down") | ||
(fps 10) | ||
(images | ||
"d-idle.png" | ||
"d1.png" | ||
"d2.png" | ||
"d3-.png" | ||
"d3-.png" | ||
"d3-.png" | ||
"d3-.png" | ||
"down-idle.png" | ||
"down-1.png" | ||
"down-2.png" | ||
"down-3.png" | ||
"down-3.png" | ||
"down-3.png" | ||
"down-3.png" | ||
) | ||
) | ||
(action | ||
(hitbox 21 13 11 37) | ||
(hitbox 21 13 11 54) | ||
(name "loading-right") | ||
(fps 10) | ||
(fps 10) | ||
(mirror-action "loading-left") | ||
) | ||
) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.