summaryrefslogtreecommitdiff
path: root/src/bossBridgeBowser.cpp
diff options
context:
space:
mode:
authorColin Noga <Tempus@chronometry.ca>2012-07-11 02:34:29 -0500
committerColin Noga <Tempus@chronometry.ca>2012-07-11 02:34:29 -0500
commitc6461149389ec807371b9692b7484ab108e2a068 (patch)
tree5d2624e4d61ab5f4e8c1472fcb6733d612d4e071 /src/bossBridgeBowser.cpp
parentab412589662152c99c1653be980136912bcde4f3 (diff)
downloadkamek-c6461149389ec807371b9692b7484ab108e2a068.tar.gz
kamek-c6461149389ec807371b9692b7484ab108e2a068.zip
Plenty of bugfixes, and bowser improvements
Diffstat (limited to 'src/bossBridgeBowser.cpp')
-rw-r--r--src/bossBridgeBowser.cpp53
1 files changed, 44 insertions, 9 deletions
diff --git a/src/bossBridgeBowser.cpp b/src/bossBridgeBowser.cpp
index cafcc98..d0f505a 100644
--- a/src/bossBridgeBowser.cpp
+++ b/src/bossBridgeBowser.cpp
@@ -10,20 +10,55 @@ extern "C" void *ForceMarioExitDemoMode(void *, unsigned int);
extern "C" void *BowserFireballCollision(dEn_c *, ActivePhysics *, ActivePhysics *);
extern "C" void *BowserDamageAnmClr(dEn_c *);
extern "C" void *BowserDamageStepTwo(dEn_c *);
-extern "C" void *BowserDamageStepThree(dEn_c *);
+extern "C" void *BowserDamageNormal(dEn_c *);
+extern "C" void *BowserDamageKill(dEn_c *);
+extern "C" void *BowserDamageEnd(dEn_c *);
+int HP = 2;
void BowserDoomSpriteCollision(dEn_c *bowser, ActivePhysics *apThis, ActivePhysics *apOther) {
// If you collide with something or other, call the fireball collision
if (apOther->owner->name == 674) {
- OSReport("AnmClr");
- BowserDamageAnmClr(bowser);
- OSReport("Damage Step 2");
- BowserDamageStepTwo(bowser);
- OSReport("Damage Step 3");
- BowserDamageStepThree(bowser);
- OSReport("Damage Done");
+
+ // void * bowserClass = (void*)(((u32)bowser) + 0x5F8);
+ // int HP = *(int*)(((u32)bowserClass) + 4);
+
+ OSReport("HP: %d", HP);
+
+ if (HP <= 0) {
+ HP = 0;
+
+ *(int*)(((u32)bowser) + 0x540) = 0x28;
+
+ BowserDamageAnmClr(bowser);
+
+ BowserDamageStepTwo(bowser);
+ BowserDamageKill(bowser);
+
+ // WeirdLevelEndClass->sub_8005CB60(*otherActor->returnPtrToField38D());
+
+ // this->vf300(otherActor);
+ BowserDamageEnd(bowser);
+
+ // daBossKoopaDemo_c *BowserDemo = (daBossKoopaDemo_c*)FindActorByType(BOSS_KOOPA_DEMO, 0);
+ daBossKoopaDemo_c *BowserDemo = (daBossKoopaDemo_c*)bowser;
+ OSReport("Koopa Controller: %x", BowserDemo);
+ BowserDemo->doStateChange(&daBossKoopaDemo_c::StateID_Struggle);
+ dFlagMgr_c::instance->set(3, 0, true, false, false);
+
+ HP = 2;
+
+ }
+ else {
+ *(int*)(((u32)bowser) + 0x540) = 0x28;
+
+ BowserDamageAnmClr(bowser);
+ BowserDamageNormal(bowser);
+
+ HP -= 1;
+ }
+
dEn_c * bomb = (dEn_c*)apOther->owner;
bomb->kill();
}
@@ -34,7 +69,7 @@ void BowserDoomSpriteCollision(dEn_c *bowser, ActivePhysics *apThis, ActivePhysi
void BowserDoomStart(dStageActor_c *Controller) {
OSReport("Here we go!");
- dEn_c *Bowser = (dEn_c*)FindActorByType(EN_BOSS_KOOPA, (Actor*)Controller);
+ dEn_c *Bowser = (dEn_c*)FindActorByType(EN_BOSS_KOOPA, 0);
Bowser->Delete(1);
}