;; src/tile.cpp, unisolid is 3 not 2
(supertux-tiles
(tile
+ (id 3037)
+ (images
+ "objects/bonus_block/full-0.png"
+ "objects/bonus_block/full-1.png"
+ "objects/bonus_block/full-2.png"
+ "objects/bonus_block/full-3.png"
+ "objects/bonus_block/full-4.png"
+ "objects/bonus_block/full-3.png"
+ "objects/bonus_block/full-2.png"
+ "objects/bonus_block/full-1.png"
+ "objects/bonus_block/full-0.png"
+ "objects/bonus_block/full-0.png"
+ "objects/bonus_block/full-0.png"
+ )
+ (solid #t)
+ (fullbox #t)
+ (next-tile 84)
+ (editor-images "objects/bonus_block/bonus-levelflip.png")
+ (data 12)
+ (fps 15)
+ )
+
+ (tile
(id 2948)
(images
"objects/bonus_block/full-0.png"
)
(tilegroup
(name "Block")
- (tiles 27 28 29 47 48 50 49 211 77 51 52 212 78 62 61 213 44 83 2947 2948 84 102 140 103 104 105 112 128 2943 2944 2945 2946 1311 2153)
+ (tiles 27 28 29 47 48 50 49 211 77 51 52 212 78 62 61 213 44 83 2947 2948 84 102 140 103 104 105 112 128 3037 2943 2944 2945 2946 1311 2153)
)
(tilegroup
(name "Background")
(image "tiles/pole/diagonals.png")
)
-;; next-id: 3037
+;; next-id: 3038
)
sound_manager->preload("sounds/switch.ogg");
lightsprite=Surface::create("/images/objects/lightmap_light/bonusblock_light.png");
break;
- case 7: contents = CONTENT_TRAMPOLINE; break;
- case 8: contents = CONTENT_PORTTRAMPOLINE; break;
- case 9: contents = CONTENT_ROCK; break;
+ case 7: contents = CONTENT_TRAMPOLINE;
+ //object = new Trampoline(get_pos(), false); //needed if this is to be moved to custom
+ break;
+ case 8: contents = CONTENT_CUSTOM;
+ object = new Trampoline(get_pos(), true);
+ break;
+ case 9: contents = CONTENT_CUSTOM;
+ object = new Rock(get_pos(), "images/objects/rock/rock.sprite");
+ break;
case 10: contents = CONTENT_RAIN; break;
case 11: contents = CONTENT_EXPLODE; break;
+ case 12: contents = CONTENT_CUSTOM;
+ object = new PowerUp(get_pos(), "images/powerups/potions/red-potion.sprite");
+ break;
default:
log_warning << "Invalid box contents" << std::endl;
contents = CONTENT_COIN;
sprite = sprite_manager->create(sprite_name);
} else if(token == "count") {
iter.value()->get(hit_counter);
- } else if(token == "script") { // use when bonusblock is to contain ONLY a script
+ } else if(token == "script") {
iter.value()->get(script);
} else if(token == "contents") {
std::string contentstring;
contents = CONTENT_1UP;
} else if(contentstring == "custom") {
contents = CONTENT_CUSTOM;
- } else if(contentstring == "script") {
+ } else if(contentstring == "script") { // use when bonusblock is to contain ONLY a script
contents = CONTENT_SCRIPT;
} else if(contentstring == "light") {
contents = CONTENT_LIGHT;
sound_manager->preload("sounds/switch.ogg");
} else if(contentstring == "trampoline") {
contents = CONTENT_TRAMPOLINE;
- } else if(contentstring == "porttrampoline") {
- contents = CONTENT_PORTTRAMPOLINE;
- } else if(contentstring == "rock") {
- contents = CONTENT_ROCK;
} else if(contentstring == "rain") {
contents = CONTENT_RAIN;
} else if(contentstring == "explode") {
case CONTENT_STAR:
{
sector->add_object(new Star(get_pos() + Vector(0, -32), direction));
+ sound_manager->play("sounds/upgrade.wav");
break;
}
case CONTENT_1UP:
{
sector->add_object(new OneUp(get_pos(), direction));
+ sound_manager->play("sounds/upgrade.wav");
break;
}
sound_manager->play("sounds/upgrade.wav");
break;
}
- case CONTENT_PORTTRAMPOLINE:
- {
- SpecialRiser* riser = new SpecialRiser(get_pos(), new Trampoline(get_pos(), true));
- sector->add_object(riser);
- sound_manager->play("sounds/upgrade.wav");
- break;
- }
- case CONTENT_ROCK:
- {
- SpecialRiser* riser = new SpecialRiser(get_pos(),
- new Rock(get_pos(), "images/objects/rock/rock.sprite"));
- sector->add_object(riser);
- sound_manager->play("sounds/upgrade.wav");
- break;
- }
-
case CONTENT_RAIN:
{
hit_counter = 1; // multiple hits of coin rain is not allowed
case CONTENT_EXPLODE:
{
hit_counter = 1; // multiple hits of coin explode is not allowed
- Sector::current()->add_object(new CoinExplode(get_pos() + Vector (0, -40), 1));
+ Sector::current()->add_object(new CoinExplode(get_pos() + Vector (0, -40)));
sound_manager->play("sounds/upgrade.wav");
break;
}
case CONTENT_STAR:
{
sector->add_object(new Star(get_pos() + Vector(0, 32), direction));
+ sound_manager->play("sounds/upgrade.wav");
break;
}
case CONTENT_1UP:
{
sector->add_object(new OneUp(get_pos(), DOWN));
+ sound_manager->play("sounds/upgrade.wav");
break;
}
case CONTENT_CUSTOM:
{
- //TODO: confirm this works
+ //TODO: non-portable trampolines could be moved to CONTENT_CUSTOM, but they should not drop
object->set_pos(get_pos() + Vector(0, 32));
sector->add_object(object);
object = 0;
try_open(player);
break;
}
- case CONTENT_PORTTRAMPOLINE:
- {
- Sector::current()->add_object(new Trampoline(get_pos() + Vector (0, 32), true));
- sound_manager->play("sounds/upgrade.wav");
- break;
- }
- case CONTENT_ROCK:
- {
- Sector::current()->add_object(new Rock(get_pos() + Vector (0, 32), "images/objects/rock/rock.sprite"));
- sound_manager->play("sounds/upgrade.wav");
- break;
- }
-
case CONTENT_RAIN:
{
try_open(player);
case CONTENT_EXPLODE:
{
hit_counter = 1; // multiple hits of coin explode is not allowed
- Sector::current()->add_object(new CoinExplode(get_pos() + Vector (0, 40), -1));
+ Sector::current()->add_object(new CoinExplode(get_pos() + Vector (0, 40)));
sound_manager->play("sounds/upgrade.wav");
break;
}