diff options
Diffstat (limited to 'src/levelspecial.cpp')
-rw-r--r-- | src/levelspecial.cpp | 21 |
1 files changed, 19 insertions, 2 deletions
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 <common.h> #include <game.h> +#include <dCourse.h> 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); |