- if(tux.dying != DYING_NOT) return;
-
- // CO_BADGUY & CO_PLAYER check
- for(unsigned int i = 0; i < bad_guys.size(); ++i)
- {
- if(bad_guys[i].dying != DYING_NOT)
- continue;
-
- if(rectcollision_offset(&bad_guys[i].base,&tux.base,0,0))
- {
- // We have detected a collision and now call the collision
- // functions of the collided objects.
- if (tux.previous_base.y < tux.base.y &&
- tux.previous_base.y + tux.previous_base.height < bad_guys[i].base.y + bad_guys[i].base.height/2)
- {
- bad_guys[i].collision(&tux, CO_PLAYER, COLLISION_SQUISH);
- }
- else
- {
- tux.collision(&bad_guys[i], CO_BADGUY);
- }
- }
- }
+bool isice(float x, float y)
+{
+ Tile* tile = gettile(x,y);
+ return tile && (tile->attributes & Tile::ICE);
+}