summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Noga <Tempus@chronometry.ca>2012-03-14 00:35:51 -0500
committerColin Noga <Tempus@chronometry.ca>2012-03-14 00:35:51 -0500
commitc50be3fc02212aab84a9687f05b1ed5aa5695c78 (patch)
tree5744e5d3b55ddf3b214d4a2574e42ac58818bee2
parent90024c1ccea34513a80ec07749d12ff56c613ac0 (diff)
downloadkamek-c50be3fc02212aab84a9687f05b1ed5aa5695c78.tar.gz
kamek-c50be3fc02212aab84a9687f05b1ed5aa5695c78.zip
fixed up collisions, added a bunch of boss improvements TAKE TWO
-rw-r--r--kamek_pal.x1
-rw-r--r--src/bossPodouble.cpp33
2 files changed, 23 insertions, 11 deletions
diff --git a/kamek_pal.x b/kamek_pal.x
index c3ad2d7..7446d34 100644
--- a/kamek_pal.x
+++ b/kamek_pal.x
@@ -53,6 +53,7 @@ SECTIONS {
modifyPlayerPropertiesWithRollingObject = 0x80057820;
EN_LandbarrelPlayerCollision = 0x80A582A0;
+ GetCountofActivePlayers = 0x8005FFB0;
/* Boss Related */
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) {