From 712180ba86839aa0c7b50bca41ed385dd6405772 Mon Sep 17 00:00:00 2001 From: Treeki Date: Sun, 12 May 2013 22:53:28 +0200 Subject: unbubble sprite fixes --- src/levelspecial.cpp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/levelspecial.cpp b/src/levelspecial.cpp index ba8539c..8b37d5e 100644 --- a/src/levelspecial.cpp +++ b/src/levelspecial.cpp @@ -1,5 +1,6 @@ #include #include +#include struct LevelSpecial { u32 id; // 0x00 @@ -92,14 +93,30 @@ bool ResetAfterLevel(bool didItWork) { ZOrderOn = 0; GlobalStarsCollected = 0; NoMichaelBuble = false; - for (int i = 0; i < 4; i++) - Player_Flags[i] &= ~4; BGScaleEnabled = 0; CameraLockEnabled = 0; isLockPlayerRotation = false; return didItWork; } +void FuckinBubbles() { + dCourse_c *course = dCourseFull_c::instance->get(GetAreaNum()); + bool thing = false; + + int zone = GetZoneNum(); + for (int i = 0; i < course->zoneSpriteCount[zone]; i++) { + dCourse_c::sprite_s *spr = &course->zoneFirstSprite[zone][i]; + if (spr->type == 246 && (spr->settings & 0xFFFFFF) == 2) + thing = true; + } + + if (thing) { + OSReport("DISABLING EXISTING BUBBLES.\n"); + for (int i = 0; i < 4; i++) + Player_Flags[i] &= ~4; + } +} + bool LevelSpecial_Create(LevelSpecial *self) { char eventNum = (self->settings >> 24) & 0xFF; self->eventFlag = (u64)1 << (eventNum - 1); -- cgit v1.2.3