c = current_level.ia_tiles[yy][xx];
}
else
- c = '.';
+ c = 0;
return(c);
}
/* Empty a box: */
-
void tryemptybox(float x, float y, int col_side)
{
Tile* tile = gettile(x,y);
return;
// according to the collision side, set the upgrade direction
-
if(col_side == LEFT)
col_side = RIGHT;
else
col_side = LEFT;
- // FIXME: Content of boxes must be handled otherwise
switch(tile->data)
{
case 1: //'A': /* Box with a distro! */
score = score + SCORE_DISTRO;
distros++;
break;
+
case 2: // 'B': /* Add an upgrade! */
if (tux.size == SMALL) /* Tux is small, add mints! */
add_upgrade((int)((x + 1) / 32) * 32, (int)(y / 32) * 32 - 32, col_side, UPGRADE_MINTS);
add_upgrade((int)((x + 1) / 32) * 32, (int)(y / 32) * 32 - 32, col_side, UPGRADE_COFFEE);
play_sound(sounds[SND_UPGRADE], SOUND_CENTER_SPEAKER);
break;
+
case 3:// '!': /* Add a golden herring */
add_upgrade((int)((x + 1) / 32) * 32, (int)(y / 32) * 32 - 32, col_side, UPGRADE_HERRING);
break;
level_change(¤t_level,x, y, TM_IA, tile->next_tile);
}
-
/* Try to grab a distro: */
-
void trygrabdistro(float x, float y, int bounciness)
{
Tile* tile = gettile(x, y);
}
/* Try to bump a bad guy from below: */
-
void trybumpbadguy(float x, float y)
{
- unsigned int i;
-
/* Bad guys: */
- for (i = 0; i < bad_guys.size(); i++)
+ for (unsigned int i; i = 0; i < bad_guys.size(); i++)
{
if (bad_guys[i].base.x >= x - 32 && bad_guys[i].base.x <= x + 32 &&
bad_guys[i].base.y >= y - 16 && bad_guys[i].base.y <= y + 16)
/* Upgrades: */
- for (i = 0; i < upgrades.size(); i++)
+ for (unsigned int i = 0; i < upgrades.size(); i++)
{
if (upgrades[i].base.height == 32 &&
upgrades[i].base.x >= x - 32 && upgrades[i].base.x <= x + 32 &&
if (fi == NULL)
{
fprintf(stderr, "Warning: I could not open the slot file ");
-
}
else
{