- if (kind == UPGRADE_GROWUP)
- texture_draw_part(&img_growup,0,0,dest.x,dest.y,dest.w,dest.h);
- else if (kind == UPGRADE_ICEFLOWER)
- texture_draw_part(&img_iceflower,0,0,dest.x,dest.y,dest.w,dest.h);
- else if (kind == UPGRADE_HERRING)
- texture_draw_part(&img_golden_herring,0,0,dest.x,dest.y,dest.w,dest.h);
- else if (kind == UPGRADE_1UP)
- texture_draw_part(&img_1up, 0, 0, dest.x, dest.y, dest.w, dest.h);
- }
+ sound_manager->play_sound(sounds[SND_BUMP_UPGRADE], Vector(base.x, base.y));
+
+ // determine new direction
+ Direction old_dir = dir;
+ if (player->base.x + player->base.width/2 > base.x + base.width/2)
+ dir = LEFT;