Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Bonusblock enhancements: sprite changable, multi-hit, can contain scr…
…ipts, added sprites and test level (bug 838)
- Loading branch information
Showing
12 changed files
with
286 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
(supertux-sprite | ||
(action | ||
(name "empty") | ||
(images "empty.png")) | ||
(action | ||
(name "normal") | ||
(images "invisible.png")) | ||
) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
(supertux-sprite | ||
(action | ||
(fps 15) | ||
(name "normal") | ||
(images "purple_0.png" | ||
"purple_1.png" | ||
"purple_2.png" | ||
"purple_3.png" | ||
"purple_4.png" | ||
"purple_2.png" | ||
"purple_1.png" | ||
"purple_0.png" | ||
"purple_0.png" | ||
"purple_0.png" | ||
)) | ||
(action | ||
(name "empty") | ||
(images "purple_empty.png")) | ||
) |
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 |
---|---|---|
@@ -0,0 +1,222 @@ | ||
(supertux-level | ||
(version 2) | ||
(name (_ "Bonusblock Test")) | ||
(author "LMH") | ||
(license "GPL 2 / CC-by-sa 3.0" ) | ||
(sector (name "main" ) | ||
(ambient-light 1 1 1 ) | ||
(camera (mode "normal" )) | ||
(init-script " lightson <- true; ") | ||
|
||
(spawnpoint (name "main" ) | ||
(x 80 )(y 704 )) | ||
|
||
(tilemap (name "Interactive" ) | ||
(z-pos 0 )(solid #t ) | ||
(width 42 )(height 30 ) | ||
(tiles ; 160 192 224 256 288 320 352 384 416 448 480 512 544 576 608 640 672 704 736 768 800 832 864 896 928 960 992 1024 1056 1088 1120 1152 1184 1216 1248 1280 1312 | ||
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 | ||
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; 32 | ||
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; 64 | ||
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; 96 | ||
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; 128 | ||
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; 160 | ||
0 0 0 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; 544 | ||
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; 576 | ||
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; 608 | ||
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; 640 | ||
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; 672 | ||
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; 704 | ||
8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 ; 736 | ||
14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 ; 768 | ||
11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 ; 800 | ||
11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 ; 832 | ||
11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 ; 864 | ||
11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 ; 896 | ||
11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 ; 928 | ||
)) | ||
|
||
(bonusblock | ||
(x 256 ) | ||
(y 640 ) | ||
(contents "coin" ) | ||
(count 3 ) | ||
) | ||
|
||
(bonusblock | ||
(x 384 ) | ||
(y 640 ) | ||
(contents "firegrow" ) | ||
(sprite "images/objects/bonus_block/brick.sprite" ) | ||
) | ||
|
||
(bonusblock | ||
(x 512 ) | ||
(y 640 ) | ||
(contents "1up" ) | ||
(sprite "images/objects/bonus_block/hiddenbonus.sprite" ) | ||
) | ||
|
||
(bonusblock | ||
(x 640 ) | ||
(y 640 ) | ||
(contents "script" ) | ||
(script " | ||
vineA.goto_node(8); | ||
vineB.goto_node(8); | ||
vineC.goto_node(8); | ||
vineD.goto_node(8); | ||
vineE.goto_node(8); | ||
vineF.goto_node(8); | ||
vineG.goto_node(8); | ||
vineH.goto_node(8); | ||
") | ||
) | ||
|
||
(bonusblock | ||
(x 768 ) | ||
(y 640 ) | ||
(contents "script" ) | ||
(sprite "images/objects/bonus_block/hiddenbonus.sprite" ) | ||
(count 0 ) | ||
(script " | ||
if(lightson){ | ||
lightson <- false; | ||
settings.set_ambient_light(0, 0, 0); | ||
cover.fade(0,0); | ||
} else { | ||
lightson <- true; | ||
settings.set_ambient_light(1, 1, 1); | ||
cover.fade(1,0); | ||
} | ||
") | ||
) | ||
(candle (x 768 )(y 640 )) | ||
|
||
(tilemap (name "cover" )(alpha 1 ) | ||
(z-pos -100 )(solid #f ) | ||
(path (node (x 767 )(y 640 )) ) | ||
(width 1 )(height 1 ) | ||
(tiles 131 )) | ||
(tilemap | ||
(z-pos -200 )(solid #f ) | ||
(path (node (x 767 )(y 640 )) ) | ||
(width 1 )(height 1 ) | ||
(tiles 61 )) | ||
|
||
(tilemap (name "vineA" ) | ||
(z-pos -50 )(solid #t ) | ||
(path (node (x 640 )(y 640 )(time 0.25 )) | ||
(node (x 640 )(y 608 )(time 0.25 )) | ||
(node (x 640 )(y 576 )(time 0.25 )) | ||
(node (x 640 )(y 544 )(time 0.25 )) | ||
(node (x 640 )(y 512 )(time 0.25 )) | ||
(node (x 640 )(y 480 )(time 0.25 )) | ||
(node (x 640 )(y 448 )(time 0.25 )) | ||
(node (x 640 )(y 416 )(time 0.25 )) | ||
(node (x 640 )(y 384 )(time 0.25 )) ) | ||
(width 1 )(height 1 ) | ||
(tiles 2163 )) | ||
(tilemap (name "vineB" ) | ||
(z-pos -50 )(solid #t ) | ||
(path (node (x 640 )(y 640 )(time 0.25 )) | ||
(node (x 640 )(y 640 )(time 0.25 )) | ||
(node (x 640 )(y 608 )(time 0.25 )) | ||
(node (x 640 )(y 576 )(time 0.25 )) | ||
(node (x 640 )(y 544 )(time 0.25 )) | ||
(node (x 640 )(y 512 )(time 0.25 )) | ||
(node (x 640 )(y 480 )(time 0.25 )) | ||
(node (x 640 )(y 448 )(time 0.25 )) | ||
(node (x 640 )(y 416 )(time 0.25 )) ) | ||
(width 1 )(height 1 ) | ||
(tiles 2162 )) | ||
(tilemap (name "vineC" ) | ||
(z-pos -50 )(solid #t ) | ||
(path (node (x 640 )(y 640 )(time 0.25 )) | ||
(node (x 640 )(y 640 )(time 0.25 )) | ||
(node (x 640 )(y 640 )(time 0.25 )) | ||
(node (x 640 )(y 608 )(time 0.25 )) | ||
(node (x 640 )(y 576 )(time 0.25 )) | ||
(node (x 640 )(y 544 )(time 0.25 )) | ||
(node (x 640 )(y 512 )(time 0.25 )) | ||
(node (x 640 )(y 480 )(time 0.25 )) | ||
(node (x 640 )(y 448 )(time 0.25 )) ) | ||
(width 1 )(height 1 ) | ||
(tiles 2162 )) | ||
(tilemap (name "vineD" ) | ||
(z-pos -50 )(solid #t ) | ||
(path (node (x 640 )(y 640 )(time 0.25 )) | ||
(node (x 640 )(y 640 )(time 0.25 )) | ||
(node (x 640 )(y 640 )(time 0.25 )) | ||
(node (x 640 )(y 640 )(time 0.25 )) | ||
(node (x 640 )(y 608 )(time 0.25 )) | ||
(node (x 640 )(y 576 )(time 0.25 )) | ||
(node (x 640 )(y 544 )(time 0.25 )) | ||
(node (x 640 )(y 512 )(time 0.25 )) | ||
(node (x 640 )(y 480 )(time 0.25 )) ) | ||
(width 1 )(height 1 ) | ||
(tiles 2162 )) | ||
(tilemap (name "vineE" ) | ||
(z-pos -50 )(solid #t ) | ||
(path (node (x 640 )(y 640 )(time 0.25 )) | ||
(node (x 640 )(y 640 )(time 0.25 )) | ||
(node (x 640 )(y 640 )(time 0.25 )) | ||
(node (x 640 )(y 640 )(time 0.25 )) | ||
(node (x 640 )(y 640 )(time 0.25 )) | ||
(node (x 640 )(y 608 )(time 0.25 )) | ||
(node (x 640 )(y 576 )(time 0.25 )) | ||
(node (x 640 )(y 544 )(time 0.25 )) | ||
(node (x 640 )(y 512 )(time 0.25 )) ) | ||
(width 1 )(height 1 ) | ||
(tiles 2163 )) | ||
(tilemap (name "vineF" ) | ||
(z-pos -50 )(solid #t ) | ||
(path (node (x 640 )(y 640 )(time 0.25 )) | ||
(node (x 640 )(y 640 )(time 0.25 )) | ||
(node (x 640 )(y 640 )(time 0.25 )) | ||
(node (x 640 )(y 640 )(time 0.25 )) | ||
(node (x 640 )(y 640 )(time 0.25 )) | ||
(node (x 640 )(y 640 )(time 0.25 )) | ||
(node (x 640 )(y 608 )(time 0.25 )) | ||
(node (x 640 )(y 576 )(time 0.25 )) | ||
(node (x 640 )(y 544 )(time 0.25 )) ) | ||
(width 1 )(height 1 ) | ||
(tiles 2162 )) | ||
(tilemap (name "vineG" ) | ||
(z-pos -50 )(solid #t ) | ||
(path (node (x 640 )(y 640 )(time 0.25 )) | ||
(node (x 640 )(y 640 )(time 0.25 )) | ||
(node (x 640 )(y 640 )(time 0.25 )) | ||
(node (x 640 )(y 640 )(time 0.25 )) | ||
(node (x 640 )(y 640 )(time 0.25 )) | ||
(node (x 640 )(y 640 )(time 0.25 )) | ||
(node (x 640 )(y 640 )(time 0.25 )) | ||
(node (x 640 )(y 608 )(time 0.25 )) | ||
(node (x 640 )(y 576 )(time 0.25 )) ) | ||
(width 1 )(height 1 ) | ||
(tiles 2162 )) | ||
(tilemap (name "vineH" ) | ||
(z-pos -50 )(solid #t ) | ||
(path (node (x 640 )(y 640 )(time 0.25 )) | ||
(node (x 640 )(y 640 )(time 0.25 )) | ||
(node (x 640 )(y 640 )(time 0.25 )) | ||
(node (x 640 )(y 640 )(time 0.25 )) | ||
(node (x 640 )(y 640 )(time 0.25 )) | ||
(node (x 640 )(y 640 )(time 0.25 )) | ||
(node (x 640 )(y 640 )(time 0.25 )) | ||
(node (x 640 )(y 640 )(time 0.25 )) | ||
(node (x 640 )(y 608 )(time 0.25 )) ) | ||
(width 1 )(height 1 ) | ||
(tiles 2162 )) | ||
)) |
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