diff options
author | Treeki <treeki@gmail.com> | 2013-05-12 22:53:28 +0200 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2013-05-12 22:53:28 +0200 |
commit | 712180ba86839aa0c7b50bca41ed385dd6405772 (patch) | |
tree | f0630a644a7e2f70aa3a6bbb74d18a9b628d09bd /src | |
parent | cb7cc05946dc0b43066f479e42afdcf03895655c (diff) | |
download | kamek-712180ba86839aa0c7b50bca41ed385dd6405772.tar.gz kamek-712180ba86839aa0c7b50bca41ed385dd6405772.zip |
unbubble sprite fixes
Diffstat (limited to 'src')
-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); |