summaryrefslogtreecommitdiff
path: root/src/levelspecial.cpp
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2011-06-17 04:14:18 +0200
committerTreeki <treeki@gmail.com>2011-06-17 04:14:18 +0200
commit6e72f2c302a4ff0658afb29d9b7799768ca4baf6 (patch)
tree27c23aba3b2693a0d3f9c730d6267fefbd06468c /src/levelspecial.cpp
parente74f7b687c4d4196979933d73aaf54747fd0de85 (diff)
downloadkamek-6e72f2c302a4ff0658afb29d9b7799768ca4baf6.tar.gz
kamek-6e72f2c302a4ff0658afb29d9b7799768ca4baf6.zip
merged Tempus's changes into the master branch
Diffstat (limited to 'src/levelspecial.cpp')
-rw-r--r--src/levelspecial.cpp69
1 files changed, 64 insertions, 5 deletions
diff --git a/src/levelspecial.cpp b/src/levelspecial.cpp
index 245dc87..5fd900d 100644
--- a/src/levelspecial.cpp
+++ b/src/levelspecial.cpp
@@ -28,6 +28,8 @@ extern EventTable_t *EventTable;
extern u16 TimeStopFlag;
extern u32 TimerBranch;
+extern u32 AlwaysDrawFlag;
+extern u32 AlwaysDrawBranch;
extern float MarioDescentRate;
extern float MarioJumpMax;
@@ -35,6 +37,16 @@ extern float MarioJumpArc;
extern float MiniMarioJumpArc;
extern float MarioSize;
+extern float GlobalSpriteSize;
+extern float GlobalSpriteSpeed;
+extern float GlobalRiderSize;
+extern char SizerOn;
+
+
+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};
+
+
extern "C" void GetSpecificPlayerActor(int number);
void LevelSpecial_Update(LevelSpecial *self);
@@ -55,6 +67,12 @@ bool ResetAfterLevel(void) {
MarioJumpArc = 2.5;
MiniMarioJumpArc = 2.5;
MarioSize = 1.0;
+ GlobalSpriteSize = 1.0;
+ GlobalSpriteSpeed = 1.0;
+ GlobalRiderSize = 1.0;
+ SizerOn = 0;
+ AlwaysDrawFlag = 0x9421FFF0;
+ AlwaysDrawBranch = 0x7C0802A6;
return true;
}
@@ -133,6 +151,33 @@ void LevelSpecial_Update(LevelSpecial *self) {
else //Half-Pint
MarioSize = 0.25;
break;
+
+
+ case 5: // Global Enemy Size
+ SizerOn = 3;
+
+ GlobalSpriteSize = GlobalSizeFloatModifications[self->effect];
+ GlobalRiderSize = GlobalRiderFloatModifications[self->effect];
+ GlobalSpriteSpeed = GlobalRiderFloatModifications[self->effect];
+
+ AlwaysDrawFlag = 0x38600001;
+ AlwaysDrawBranch = 0x4E800020;
+ break;
+
+ case 6: // Individual Enemy Size
+ AlwaysDrawFlag = 0x38600001;
+ AlwaysDrawBranch = 0x4E800020;
+
+ if (self->effect == 0)
+ {
+ SizerOn = 1; // Nyb 5
+ }
+ else
+ {
+ SizerOn = 2; // Nyb 7
+ }
+ break;
+
default:
break;
@@ -165,6 +210,24 @@ void LevelSpecial_Update(LevelSpecial *self) {
MarioSize = 1.0;
break;
+ case 5: // Global Enemy Size
+ SizerOn = 0;
+
+ GlobalSpriteSize = 1.0;
+ GlobalRiderSize = 1.0;
+ GlobalSpriteSpeed = 1.0;
+
+ AlwaysDrawFlag = 0x9421FFF0;
+ AlwaysDrawBranch = 0x7C0802A6;
+ break;
+
+ case 6: // Individual Enemy Size
+ SizerOn = 0;
+
+ AlwaysDrawFlag = 0x9421FFF0;
+ AlwaysDrawBranch = 0x7C0802A6;
+ break;
+
default:
break;
}
@@ -178,8 +241,4 @@ void LevelSpecial_Update(LevelSpecial *self) {
self->lastEvState = newEvState;
-}
-
-
-
-
+}