summaryrefslogtreecommitdiff
path: root/src/bossCaptainBowser.cpp
diff options
context:
space:
mode:
authorColin Noga <Tempus@chronometry.ca>2012-03-20 17:03:19 -0500
committerColin Noga <Tempus@chronometry.ca>2012-03-20 17:03:19 -0500
commita550f21ec661ddd8771a9c779f2b784209fee1f9 (patch)
treeb6afe90fa01765019f0aad4e8068970c2ec36ae8 /src/bossCaptainBowser.cpp
parent58b4ab236f6e4b0b5c4cf8384a3a8be299c86623 (diff)
downloadkamek-a550f21ec661ddd8771a9c779f2b784209fee1f9.tar.gz
kamek-a550f21ec661ddd8771a9c779f2b784209fee1f9.zip
Added challenge star, clown car junk, bowser improvements, some fixes here and there, and a roll your own model sprite for skawo.
Diffstat (limited to 'src/bossCaptainBowser.cpp')
-rw-r--r--src/bossCaptainBowser.cpp81
1 files changed, 76 insertions, 5 deletions
diff --git a/src/bossCaptainBowser.cpp b/src/bossCaptainBowser.cpp
index 710af77..6152b42 100644
--- a/src/bossCaptainBowser.cpp
+++ b/src/bossCaptainBowser.cpp
@@ -5,12 +5,34 @@
#include <stage.h>
#include "boss.h"
+
+
+const char* effects_name_list [] = {
+ "Wm_jr_electricline", // cool
+ "Wm_jr_fireattack", // cool
+ "Wm_jr_firehit", // cool
+ "Wm_jr_fireplace", // cool
+ "Wm_jr_fireplace_ind", // cool
+ "Wm_jr_shot",
+ "Wm_jr_sweat",
+ "Wm_ko_fireattack", // cool
+ "Wm_ko_firehit", // cool
+ "Wm_ko_firehitdie01", // cool
+ "Wm_ko_firehitdie02", // cool
+ "Wm_ko_firehitdie03", // cool
+ "Wm_ko_magmapocha",
+ "Wm_ko_magmapochabig",
+ "Wm_ko_shout", // cool
+ "Wm_ko_shout02", // cool
+ "Wm_seacloudout", // cool
+};
+
+
+
void ShipPhysicsCallback(daBoss *self, dStageActor_c *other) {
- OSReport("Physics");
if (other->name == EN_CANNON_BULLET) {
}
-
}
@@ -32,9 +54,12 @@ public:
m3d::anmChr_c shipAnm;
Physics ShipPhysics;
+ ActivePhysics Roar;
+ mEf::es2 effect;
char isAngry;
char isInvulnerable;
+ float scaleIncreaser;
// int isInvulnerableCountdown;
// int isTurningCountdown;
// char charging;
@@ -182,6 +207,25 @@ int daCaptainBowser::onCreate() {
this->aPhysics.addToList();
+
+ // Roar Physics!
+ ActivePhysics::Info RoarStruct;
+ RoarStruct.xDistToCenter = -186.0;
+ RoarStruct.yDistToCenter = 138.0;
+
+ RoarStruct.xDistToEdge = 20.0;
+ RoarStruct.yDistToEdge = 20.0;
+
+ RoarStruct.category1 = 0x3;
+ RoarStruct.category2 = 0x0;
+ RoarStruct.bitfield1 = 0x4F;
+ RoarStruct.bitfield2 = 0x8028E;
+ RoarStruct.unkShort1C = 0;
+ RoarStruct.callback = &dEn_c::collisionCallback;
+
+ this->Roar.initWithStruct(this, &RoarStruct);
+
+
// State Changers
doStateChange(&StateID_Wait);
@@ -196,6 +240,8 @@ int daCaptainBowser::onExecute() {
acState.execute();
this->ShipPhysics.update();
+ PlaySound(this, SE_BOSS_SHIP_PRPL);
+
bodyModel._vf1C();
shipModel._vf1C();
@@ -265,6 +311,9 @@ int daCaptainBowser::onDraw() {
if (num == 0) {
doStateChange(&StateID_Fire);
}
+ else if (num == 1) {
+ doStateChange(&StateID_Roar);
+ }
else{
doStateChange(&StateID_Throw);
}
@@ -320,8 +369,9 @@ int daCaptainBowser::onDraw() {
}
void daCaptainBowser::executeState_Fire() {
- if (this->chrAnimation.getCurrentFrame() == 70) { // spit fire
- CreateActor(KOOPA_FIRE, 0x30, (Vec){pos.x-156.0, pos.y+128.0, pos.z}, 0, 0); // Seems like nyb 5 has a setting, 2 bits long, maybe.
+ if (this->chrAnimation.getCurrentFrame() == 70.5) { // spit fire
+ PlaySound(this, SE_BOSS_KOOPA_L_FIRE_SHOT);
+ CreateActor(WM_ANTLION, 0, (Vec){pos.x-172.0, pos.y+152.0, pos.z}, 0, 0);
}
if (this->chrAnimation.isAnimationDone()) {
@@ -349,11 +399,30 @@ int daCaptainBowser::onDraw() {
void daCaptainBowser::beginState_Roar() {
bindAnimChr_and_setUpdateRate("kp_roar3", 1, 0.0, 1.0);
this->isInvulnerable = 1;
+ this->timer = 0;
+ this->scaleIncreaser = 0.5;
+
+ this->Roar.info.xDistToEdge = 70.0 * scaleIncreaser;
+ this->Roar.info.yDistToEdge = 70.0 * scaleIncreaser;
+ this->Roar.addToList();
}
void daCaptainBowser::executeState_Roar() {
+
if (this->chrAnimation.getCurrentFrame() == 53.0) { // This is where the smackdown starts
- SpawnEffect("Wm_ob_itemget_ring", 0, &this->pos, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0});
+ PlaySound(this, SE_VOC_KP_L_SHOUT);
+ }
+
+ if (this->chrAnimation.getCurrentFrame() > 53.0) { // This is where the smackdown starts
+ scaleIncreaser += 0.014285;
+ effect.spawn("Wm_ko_shout", 0, &(Vec){pos.x-186.0+(scaleIncreaser*16.0), pos.y+138.0+(scaleIncreaser*16.0), pos.z}, &(S16Vec){0,0,0}, &(Vec){scaleIncreaser, scaleIncreaser, scaleIncreaser});
+
+ this->Roar.info.xDistToEdge = 70.0 * scaleIncreaser;
+ this->Roar.info.yDistToEdge = 70.0 * scaleIncreaser;
+ }
+
+ if (this->chrAnimation.getCurrentFrame() == 197.0) { // This is where the smackdown ends
+ this->Roar.removeFromList();
}
if (this->chrAnimation.isAnimationDone()) {
@@ -375,6 +444,8 @@ int daCaptainBowser::onDraw() {
bindAnimChr_and_setUpdateRate("grow_big", 1, 0.0, 1.0);
this->isInvulnerable = 1;
this->chrAnimation.setCurrentFrame(9.0);
+
+ PlaySound(this, SE_VOC_KP_DAMAGE_HPDP);
}
void daCaptainBowser::executeState_Damage() {