-/* Break a brick: */
-void
-World::trybreakbrick(float x, float y, bool small)
-{
- Level* plevel = get_level();
-
- Tile* tile = gettile(x, y);
- if (tile->brick)
- {
- if (tile->data > 0)
- {
- /* Get a distro from it: */
- add_bouncy_distro(((int)(x + 1) / 32) * 32,
- (int)(y / 32) * 32);
-
- if (!counting_distros)
- {
- counting_distros = true;
- distro_counter = 50;
- }
-
- if (distro_counter <= 0)
- plevel->change(x, y, TM_IA, tile->next_tile);
-
- play_sound(sounds[SND_DISTRO], SOUND_CENTER_SPEAKER);
- score = score + SCORE_DISTRO;
- distros++;
- }
- else if (!small)
- {
- /* Get rid of it: */
- plevel->change(x, y, TM_IA, tile->next_tile);
-
- /* Replace it with broken bits: */
- add_broken_brick(tile,
- ((int)(x + 1) / 32) * 32,
- (int)(y / 32) * 32);
-
- /* Get some score: */
- play_sound(sounds[SND_BRICK], SOUND_CENTER_SPEAKER);
- score = score + SCORE_BRICK;
- }
- }
-}