From c50be3fc02212aab84a9687f05b1ed5aa5695c78 Mon Sep 17 00:00:00 2001 From: Colin Noga Date: Wed, 14 Mar 2012 00:35:51 -0500 Subject: fixed up collisions, added a bunch of boss improvements TAKE TWO --- src/bossPodouble.cpp | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) (limited to 'src/bossPodouble.cpp') diff --git a/src/bossPodouble.cpp b/src/bossPodouble.cpp index 1d105e6..4470cda 100644 --- a/src/bossPodouble.cpp +++ b/src/bossPodouble.cpp @@ -82,6 +82,7 @@ daPodouble *daPodouble::build() { // Externs and States /////////////////////// extern "C" int SmoothRotation(short* rot, u16 amt, int unk2); + extern "C" int GetCountofActivePlayers(); CREATE_STATE(daPodouble, Bounce); CREATE_STATE(daPodouble, Spit); @@ -366,19 +367,29 @@ int daPodouble::onDraw() { bool ret; ret = GrowBoss(this, Kameck, 1.0, 3.5, 18, this->timer); - if (this->timer == 380) { - Vec tempPos = (Vec){this->pos.x - 80.0, this->pos.y + 120.0, 3564.0}; - create(AC_YOSHI_EGG, 0x01050000, &tempPos, &(S16Vec){0,0,0}, 0); - } + if (this->timer == 382) { - if (this->timer == 400) { - Vec tempPos = (Vec){this->pos.x - 120.0, this->pos.y + 120.0, 3564.0}; - create(AC_YOSHI_EGG, 0x02030000, &tempPos, &(S16Vec){0,0,0}, 0); - } + int players = GetCountofActivePlayers(); + + Vec tempPos = (Vec){this->pos.x - 190.0, this->pos.y + 120.0, 3564.0}; + dStageActor_c *spawner = create(AC_YOSHI_EGG, 0x71010000, &tempPos, &(S16Vec){0,0,0}, 0); + spawner->speed.x = spawner->speed.x / 2.0; + + if (players > 1) { + tempPos = (Vec){this->pos.x - 190.0, this->pos.y + 120.0, 3564.0}; + spawner = create(AC_YOSHI_EGG, 0xF1010000, &tempPos, &(S16Vec){0,0,0}, 0); + spawner->speed.x = spawner->speed.x / 2.0; + } + + if (players > 2) { + tempPos = (Vec){this->pos.x - 190.0, this->pos.y + 120.0, 3564.0}; + spawner->create(AC_YOSHI_EGG, 0x71010000, &tempPos, &(S16Vec){0,0,0}, 0); + } - if (this->timer == 400) { - Vec tempPos = (Vec){this->pos.x - 120.0, this->pos.y + 120.0, 3564.0}; - create(AC_YOSHI_EGG, 0x82050110, &tempPos, &(S16Vec){0,0,0}, 0); + if (players > 3) { + tempPos = (Vec){this->pos.x - 190.0, this->pos.y + 120.0, 3564.0}; + create(AC_YOSHI_EGG, 0xF1010000, &tempPos, &(S16Vec){0,0,0}, 0); + } } if (ret) { -- cgit v1.2.3