diff options
Diffstat (limited to '')
-rw-r--r-- | src/levelspecial.cpp | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/src/levelspecial.cpp b/src/levelspecial.cpp index 3432002..962b87f 100644 --- a/src/levelspecial.cpp +++ b/src/levelspecial.cpp @@ -39,13 +39,18 @@ extern char SizerOn; extern char ZOrderOn; extern int GlobalStarsCollected; +extern VEC2 BGScaleFront; +extern VEC2 BGScaleBack; +extern char BGScaleEnabled; + extern u32 GameTimer; #define time *(u32*)((GameTimer) + 0x4) -float GlobalSizeFloatModifications [] = {1, 0.25, 0.5, 0.75, 1.25, 1.5, 1.75, 2, 2.5, 3, 4, 5, 6, 7, 8, 10 }; -float GlobalRiderFloatModifications [] = {1, 0.6, 0.7, 0.9, 1, 1, 1, 1.1, 1.25, 1.5, 2, 2.5, 3, 3.5, 4, 5}; +static const float GlobalSizeFloatModifications [] = {1, 0.25, 0.5, 0.75, 1.25, 1.5, 1.75, 2, 2.5, 3, 4, 5, 6, 7, 8, 10 }; +static const float GlobalRiderFloatModifications [] = {1, 0.6, 0.7, 0.9, 1, 1, 1, 1.1, 1.25, 1.5, 2, 2.5, 3, 3.5, 4, 5}; +static const float BGScaleChoices[] = {0.1f, 0.15f, 0.25f, 0.375f, 0.5f, 0.625f, 0.75f, 0.9f, 1.0f, 1.125f, 1.25f, 1.5f, 1.75f, 2.0f, 2.25f, 2.5f}; bool NoMichaelBuble = false; @@ -85,6 +90,7 @@ bool ResetAfterLevel(bool didItWork) { NoMichaelBuble = false; for (int i = 0; i < 4; i++) Player_Flags[i] &= ~4; + BGScaleEnabled = 0; return didItWork; } @@ -193,7 +199,15 @@ void LevelSpecial_Update(LevelSpecial *self) { case 8: NoMichaelBuble = true; break; - + + case 9: + BGScaleEnabled = true; + BGScaleFront.x = BGScaleChoices[(self->settings >> 20) & 15]; + BGScaleFront.y = BGScaleChoices[(self->settings >> 16) & 15]; + BGScaleBack.x = BGScaleChoices[(self->settings >> 12) & 15]; + BGScaleBack.y = BGScaleChoices[(self->settings >> 8) & 15]; + break; + default: break; } @@ -248,6 +262,10 @@ void LevelSpecial_Update(LevelSpecial *self) { case 8: NoMichaelBuble = false; break; + + case 9: + BGScaleEnabled = false; + break; default: break; |