diff options
Diffstat (limited to '')
-rw-r--r-- | src/bossBombDrop.cpp | 7 | ||||
-rw-r--r-- | src/bossBridgeBowser.cpp | 4 | ||||
-rw-r--r-- | src/bossCaptainBowser.cpp | 4 | ||||
-rw-r--r-- | src/bossPlayerClown.cpp | 38 |
4 files changed, 47 insertions, 6 deletions
diff --git a/src/bossBombDrop.cpp b/src/bossBombDrop.cpp index b8e4204..f96c557 100644 --- a/src/bossBombDrop.cpp +++ b/src/bossBombDrop.cpp @@ -199,6 +199,8 @@ dBombDrop *dBombDrop::build() { } +bool HackyBombDropVariable = false; + int dBombDrop::onCreate() { int t = this->settings & 0xF; @@ -215,11 +217,12 @@ int dBombDrop::onCreate() { dFlagMgr_c::instance->set(eventA, 0, false, false, false); dFlagMgr_c::instance->set(eventB, 0, false, false, false); + + HackyBombDropVariable = false; return true; } - int dBombDrop::onDelete() { return true; } int dBombDrop::onDraw() { return true; } @@ -230,6 +233,7 @@ int dBombDrop::onExecute() { active = dFlagMgr_c::instance->active(eventA); if (active) { create(WM_SMALLCLOUD, 0, &pos , &rot, 0); + HackyBombDropVariable = true; dFlagMgr_c::instance->set(eventA, 0, false, false, false); dFlagMgr_c::instance->set(eventA+1, 0, true, false, false); } @@ -237,6 +241,7 @@ int dBombDrop::onExecute() { active = dFlagMgr_c::instance->active(eventB); if (active) { create(WM_SMALLCLOUD, 0, &pos, &rot, 0); + HackyBombDropVariable = true; dFlagMgr_c::instance->set(eventB, 0, false, false, false); dFlagMgr_c::instance->set(eventB+1, 0, true, false, false); } diff --git a/src/bossBridgeBowser.cpp b/src/bossBridgeBowser.cpp index 9663882..d4bda5d 100644 --- a/src/bossBridgeBowser.cpp +++ b/src/bossBridgeBowser.cpp @@ -17,12 +17,16 @@ extern "C" void *BowserDamageEnd(dEn_c *); int HP = 2; int lastBomb = 0; +extern bool HackyBombDropVariable; + 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) { if (lastBomb == apOther->owner->id) { return; } + if (!HackyBombDropVariable) return; + HackyBombDropVariable = false; // void * bowserClass = (void*)(((u32)bowser) + 0x5F8); // int HP = *(int*)(((u32)bowserClass) + 4); diff --git a/src/bossCaptainBowser.cpp b/src/bossCaptainBowser.cpp index 2c397da..4867afb 100644 --- a/src/bossCaptainBowser.cpp +++ b/src/bossCaptainBowser.cpp @@ -194,7 +194,7 @@ int daCaptainBowser::onCreate() { this->shipFile.data = getResource("KoopaShip", "g3d/KoopaShip.brres"); nw4r::g3d::ResMdl mdlShip = this->shipFile.GetResMdl("KoopaShip"); shipModel.setup(mdlShip, &allocator, 0x224, 1, 0); - // SetupTextures_MapObj(&shipModel, 0); + SetupTextures_MapObj(&shipModel, 0); nw4r::g3d::ResAnmChr anmChrShip = this->shipFile.GetResAnmChr("KoopaShip"); this->shipAnm.setup(mdlShip, anmChrShip, &this->allocator, 0); @@ -478,7 +478,7 @@ int daCaptainBowser::onDraw() { void daCaptainBowser::executeState_Throw() { if (this->chrAnimation.getCurrentFrame() == 60.0) { // throw back - int num = GenerateRandomNumber(5); + int num = GenerateRandomNumber(4); CreateActor(0x29F, 0x101 + ((num + 1) * 0x10), (Vec){pos.x-146.0, pos.y+122.0, pos.z}, 0, 0); } diff --git a/src/bossPlayerClown.cpp b/src/bossPlayerClown.cpp index c213872..3bf1119 100644 --- a/src/bossPlayerClown.cpp +++ b/src/bossPlayerClown.cpp @@ -112,6 +112,10 @@ void CConExecuteMove(dEn_c *clown) { cTimer++; + float leftBound = ClassWithCameraInfo::instance->screenLeft + 12.0f; + if (clown->pos.x < leftBound) + clown->pos.x = leftBound; + // run normal move PClownCarMove(clown); } @@ -211,9 +215,9 @@ int daClownShot::onCreate() { _324 = 0.0f; // These structs tell stupid collider what to collide with - these are from koopa troopa - static const lineSensor_s below(12<<12, 4<<12, 0<<12); - static const pointSensor_s above(0<<12, 12<<12); - static const lineSensor_s adjacent(6<<12, 9<<12, 6<<12); + static const lineSensor_s below(SENSOR_BREAK_BRICK | SENSOR_BREAK_BLOCK, 12<<12, 4<<12, 0<<12); + static const pointSensor_s above(SENSOR_BREAK_BRICK | SENSOR_BREAK_BLOCK, 0<<12, 12<<12); + static const lineSensor_s adjacent(SENSOR_BREAK_BRICK | SENSOR_BREAK_BLOCK, 6<<12, 9<<12, 6<<12); collMgr.init(this, &below, &above, &adjacent); collMgr.calculateBelowCollisionWithSmokeEffect(); @@ -260,3 +264,31 @@ int daClownShot::onExecute() { +// This is for making clown shots able to kill other shit + +extern "C" bool Amp_NewPreSpriteCollision(ActivePhysics *apThis, ActivePhysics *apOther) { + // apThis = amp, apOther = other thing + dEn_c *amp = (dEn_c*)apThis->owner; + + if (apOther->info.category2 == 9) { + if (amp->collisionCat9_RollingObject(apThis, apOther)) + return true; + } else if (apOther->owner->name == WM_PAKKUN) { + amp->killByDieFall(apOther->owner); + return true; + } + + return false; +} + +extern "C" void KazanRock_Explode(void *kazanRock); +extern "C" void KazanRock_OriginalCollisionCallback(ActivePhysics *apThis, ActivePhysics *apOther); +extern "C" void KazanRock_CollisionCallback(ActivePhysics *apThis, ActivePhysics *apOther) { + if (apOther->owner->name == WM_PAKKUN) { + apThis->someFlagByte |= 2; + KazanRock_Explode(apThis->owner); + } else { + KazanRock_OriginalCollisionCallback(apThis, apOther); + } +} + |