summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--bossCaptainBowser.yaml4
-rwxr-xr-xinclude/game.h257
-rw-r--r--src/bossCaptainBowser.cpp11
-rw-r--r--src/bossKoopaThrow.cpp46
-rw-r--r--src/shyguy.cpp8
5 files changed, 170 insertions, 156 deletions
diff --git a/bossCaptainBowser.yaml b/bossCaptainBowser.yaml
index 5ac6970..5ef0ea0 100644
--- a/bossCaptainBowser.yaml
+++ b/bossCaptainBowser.yaml
@@ -21,7 +21,7 @@ hooks:
type: patch
addr_pal: 0x8030A4D0
# [010] ( 16, 16) ( 0, 0 32: 32) 64? 64? 0? 0? | [0:No Flags]
- data: '000A 0000 00000010 00000010 00000000 00000000 00000020 00000020 0040 0040 0000 0000 0000 0000'
+ data: '029F 0000 00000010 00000010 00000000 00000000 00000020 00000020 0040 0040 0000 0000 0000 0000'
# 0x8030A340 + sprite num * 0x28 == offset
- name: KFlameThrowerBuild
@@ -33,5 +33,5 @@ hooks:
type: patch
addr_pal: 0x8030A4F8
# [011] ( 16, 16) ( 0, 0 32: 32) 64? 64? 0? 0? | [0:No Flags]
- data: '000B 0000 00000010 00000010 00000000 00000000 00000020 00000020 0040 0040 0000 0000 0000 0000'
+ data: '0271 0000 00000010 00000010 00000000 00000000 00000020 00000020 0040 0040 0000 0000 0000 0000'
# 0x8030A340 + sprite num * 0x28 == offset
diff --git a/include/game.h b/include/game.h
index efd62bd..b8cfc70 100755
--- a/include/game.h
+++ b/include/game.h
@@ -2706,149 +2706,150 @@ class dEffectBreakMgr_c {
void cleanupAll();
};
+namespace EGG {
+ class Effect7C {
+ public:
+ virtual ~Effect7C();
+ virtual void clear();
-class EGG::Effect7C {
- public:
- virtual ~Effect7C();
- virtual void clear();
-
- u8 data[0x94];
-};
-
-class EGG::Effect {
- public:
- Effect(); // 802D7D90
- virtual ~Effect();
+ u8 data[0x94];
+ };
- char effectName[32];
- u32 secondVarFromSpawnFunc;
- u32 flags; // 1 = has translation, 2 = matrix was set, 4 = ?
+ class Effect {
+ public:
+ Effect(); // 802D7D90
+ virtual ~Effect();
- float _2C, _30, _34;
- Vec translate;
- Mtx matrix;
+ char effectName[32];
+ u32 secondVarFromSpawnFunc;
+ u32 flags; // 1 = has translation, 2 = matrix was set, 4 = ?
- u32 HandleBase_00, HandleBase_04;
-
- Effect7C ef7C;
-
- virtual bool _vf0C();
- virtual void _vf10(); // related to RetireEmitterAll?
- virtual void _vf14(); // also related to RetireEmitterAll?
- virtual void _vf18(); // related to RetireEmitterAll and RetireParticleAll?
- virtual void _vf1C(bool flag); // sets or clears some flag
- virtual void _vf20(bool flag); // sets or clears another flag
- virtual void _vf24(bool flag); // sets or clears both of those flags
-
- // all these functions have a strange purpose
- // _vf54 is the one sole exception to everything written below!
- //
- // they all call through to ef7C methods, which modify two bitfields stored in it:
- // void EGG::Effect7C::modifyBitfields(u32 mask, u32 flagBit) {
- // if (flagBit & 1)
- // this->_04 |= mask;
- // else
- // this->_04 &= ~mask;
- // if (flagBit & 2)
- // this->_08 |= mask;
- // else
- // this->_08 &= ~mask;
- // }
- // after that, the methods set value(s) passed by the caller
- virtual void _vf28(u16 unk, u32 flagBit); // flag is 1, value stored to its 0xC
- virtual void _vf2C(float unk, u32 flagBit); // flag is 2, value stored to its 0x10
- virtual void _vf30(u16 unk, u32 flagBit); // flag is 4, value stored to its 0x14
- virtual void _vf34(u16 unk, u32 flagBit); // flag is 8, value stored to its 0x16
- virtual void _vf38(char unk, u32 flagBit); // flag is 0x10, value stored to its 0x18
- virtual void _vf3C(float unk, u32 flagBit); // flag is 0x20, value stored to its 0x1C
- virtual void _vf40(float unk, u32 flagBit); // flag is 0x40, value stored to its 0x20
- virtual void _vf44(float unk, u32 flagBit); // flag is 0x80, value stored to its 0x24
- virtual void _vf48(float unk, u32 flagBit); // flag is 0x100, value stored to its 0x28
- virtual void _vf4C(Vec *unk, u32 flagBit); // flag is 0x200, values stored at its 0x2C
- virtual void _vf50(Vec *unk, u32 flagBit); // flag is 0x400, values stored at its 0x38
- virtual void _vf54(Vec *unk);
- virtual void _vf58(u8 r, u8 g, u8 b, u8 a, u32 flagBit); // flag is 0x1000, value stored to its 0x44
-
- // this one is similar, but it stores two colours into an array at 0x48
- // alpha values are ignored
- // valid indices are 0 and 1 afaics?
- // flag is 0x2000 << index (so, 0x2000 or 0x4000)
- virtual void _vf5C(GXColor one, GXColor two, int index, u32 flagBit);
-
- // this one sets the alpha for those colours
- // flag is 0x8000 or 0x10000
- virtual void _vf60(u8 one, u8 two, int index, u32 flagBit);
-
- virtual void _vf64(Vec2 *vec, u32 flagBit); // flag is 0x20000, values stored at its 0x58
- virtual void _vf68(Vec2 *vec, u32 flagBit); // flag is 0x40000, values stored at its 0x60
- virtual void _vf6C(Vec *vec, u32 flagBit); // flag is 0x80000, values stored at its 0x68
- virtual void _vf70(Vec *vec, u32 flagBit); // flag is 0x100000, values stored at its 0x74
-
- // a bit of a special case: this one will set/clear 0x10000000 depending on flagBit
- // but it'll also set 0x20000000 if anotherFlag is true
- // if anotherFlag is false, it'll clear 0x20000000 even if flagBit is set
- // values stored at ef7C's 0x80
- virtual void _vf74(Vec *vec, bool anotherFlag, u32 flagBit);
-
- virtual void _vf78(Vec *vec, u32 flagBit); // flag is 0x40000000, values stored at its 0x8C
-
- virtual void _vf7C(Vec *one, Vec2 *two=0); // sets transformation vals and calls vf68
-
- // stores to _2C, _30, _34
- virtual void setXformValsFromParams(float one, float two, float three);
- virtual void setXformValsFromVEC3(Vec *vec);
-
- virtual void setTranslationFromVEC3(Vec *vec);
- virtual void setMatrix(Mtx *mtx);
-
- virtual void _vf90(/* ??? */); // absolutely zero idea what this does
-
- virtual void makeItHappen(); // for internal use?
-
- virtual void clear(); // resets all properties, etc
-};
+ float _2C, _30, _34;
+ Vec translate;
+ Mtx matrix;
-namespace mEf;
-class mEf::effect_c : public EGG::Effect {
- public:
- ~effect_c();
+ u32 HandleBase_00, HandleBase_04;
+
+ Effect7C ef7C;
+
+ virtual bool _vf0C();
+ virtual void _vf10(); // related to RetireEmitterAll?
+ virtual void _vf14(); // also related to RetireEmitterAll?
+ virtual void _vf18(); // related to RetireEmitterAll and RetireParticleAll?
+ virtual void _vf1C(bool flag); // sets or clears some flag
+ virtual void _vf20(bool flag); // sets or clears another flag
+ virtual void _vf24(bool flag); // sets or clears both of those flags
+
+ // all these functions have a strange purpose
+ // _vf54 is the one sole exception to everything written below!
+ //
+ // they all call through to ef7C methods, which modify two bitfields stored in it:
+ // void EGG::Effect7C::modifyBitfields(u32 mask, u32 flagBit) {
+ // if (flagBit & 1)
+ // this->_04 |= mask;
+ // else
+ // this->_04 &= ~mask;
+ // if (flagBit & 2)
+ // this->_08 |= mask;
+ // else
+ // this->_08 &= ~mask;
+ // }
+ // after that, the methods set value(s) passed by the caller
+ virtual void _vf28(u16 unk, u32 flagBit); // flag is 1, value stored to its 0xC
+ virtual void _vf2C(float unk, u32 flagBit); // flag is 2, value stored to its 0x10
+ virtual void _vf30(u16 unk, u32 flagBit); // flag is 4, value stored to its 0x14
+ virtual void _vf34(u16 unk, u32 flagBit); // flag is 8, value stored to its 0x16
+ virtual void _vf38(char unk, u32 flagBit); // flag is 0x10, value stored to its 0x18
+ virtual void _vf3C(float unk, u32 flagBit); // flag is 0x20, value stored to its 0x1C
+ virtual void _vf40(float unk, u32 flagBit); // flag is 0x40, value stored to its 0x20
+ virtual void _vf44(float unk, u32 flagBit); // flag is 0x80, value stored to its 0x24
+ virtual void _vf48(float unk, u32 flagBit); // flag is 0x100, value stored to its 0x28
+ virtual void _vf4C(Vec *unk, u32 flagBit); // flag is 0x200, values stored at its 0x2C
+ virtual void _vf50(Vec *unk, u32 flagBit); // flag is 0x400, values stored at its 0x38
+ virtual void _vf54(Vec *unk);
+ virtual void _vf58(u8 r, u8 g, u8 b, u8 a, u32 flagBit); // flag is 0x1000, value stored to its 0x44
+
+ // this one is similar, but it stores two colours into an array at 0x48
+ // alpha values are ignored
+ // valid indices are 0 and 1 afaics?
+ // flag is 0x2000 << index (so, 0x2000 or 0x4000)
+ virtual void _vf5C(GXColor one, GXColor two, int index, u32 flagBit);
+
+ // this one sets the alpha for those colours
+ // flag is 0x8000 or 0x10000
+ virtual void _vf60(u8 one, u8 two, int index, u32 flagBit);
+
+ virtual void _vf64(Vec2 *vec, u32 flagBit); // flag is 0x20000, values stored at its 0x58
+ virtual void _vf68(Vec2 *vec, u32 flagBit); // flag is 0x40000, values stored at its 0x60
+ virtual void _vf6C(Vec *vec, u32 flagBit); // flag is 0x80000, values stored at its 0x68
+ virtual void _vf70(Vec *vec, u32 flagBit); // flag is 0x100000, values stored at its 0x74
+
+ // a bit of a special case: this one will set/clear 0x10000000 depending on flagBit
+ // but it'll also set 0x20000000 if anotherFlag is true
+ // if anotherFlag is false, it'll clear 0x20000000 even if flagBit is set
+ // values stored at ef7C's 0x80
+ virtual void _vf74(Vec *vec, bool anotherFlag, u32 flagBit);
+
+ virtual void _vf78(Vec *vec, u32 flagBit); // flag is 0x40000000, values stored at its 0x8C
+
+ virtual void _vf7C(Vec *one, Vec2 *two=0); // sets transformation vals and calls vf68
+
+ // stores to _2C, _30, _34
+ virtual void setXformValsFromParams(float one, float two, float three);
+ virtual void setXformValsFromVEC3(Vec *vec);
+
+ virtual void setTranslationFromVEC3(Vec *vec);
+ virtual void setMatrix(Mtx *mtx);
+
+ virtual void _vf90(/* ??? */); // absolutely zero idea what this does
+
+ virtual void makeItHappen(); // for internal use?
+
+ virtual void clear(); // resets all properties, etc
+ };
+}
- void clear();
+namespace mEf {
+ class effect_c : public EGG::Effect {
+ public:
+ ~effect_c();
- virtual bool probablyCreateWithName(const char *name, u32 unk);
- virtual bool spawn(const char *name, u32 unk, Vec *pos=0, S16Vec *rot=0, Vec *scale=0);
- virtual bool spawnWithMatrix(const char *name, u32 unk, Mtx *mtx);
+ void clear();
- // these two deal with mEf::effectCB_c and crap. absolutely no idea.
- virtual bool _vfA8(/* tons and tons of params */);
- virtual bool _vfAC(/* a slightly smaller amount of params */);
+ virtual bool probablyCreateWithName(const char *name, u32 unk);
+ virtual bool spawn(const char *name, u32 unk, Vec *pos=0, S16Vec *rot=0, Vec *scale=0);
+ virtual bool spawnWithMatrix(const char *name, u32 unk, Mtx *mtx);
- virtual bool _vfB0(Vec *pos=0, S16Vec *rot=0, Vec *scale=0);
- virtual bool _vfB4(Mtx *mtx);
-};
+ // these two deal with mEf::effectCB_c and crap. absolutely no idea.
+ virtual bool _vfA8(/* tons and tons of params */);
+ virtual bool _vfAC(/* a slightly smaller amount of params */);
-class mEf::es2 : public EGG::Effect {
- public:
- // vtable: 80329CA0
- ~es2();
+ virtual bool _vfB0(Vec *pos=0, S16Vec *rot=0, Vec *scale=0);
+ virtual bool _vfB4(Mtx *mtx);
+ };
- void _vf10();
- void _vf18();
+ class es2 : public EGG::Effect {
+ public:
+ // vtable: 80329CA0
+ ~es2();
- void makeItHappen();
- bool probablyCreateWithName(const char *name, u32 unk);
- bool spawn(const char *name, u32 unk, Vec *pos=0, S16Vec *rot=0, Vec *scale=0);
- bool spawnWithMatrix(const char *name, u32 unk, Mtx *mtx);
- bool _vfB0(Vec *pos=0, S16Vec *rot=0, Vec *scale=0);
- bool _vfB4(Mtx *mtx);
+ void _vf10();
+ void _vf18();
- virtual u8 returnField11D(); // does exactly what it says on the tin
+ void makeItHappen();
+ bool probablyCreateWithName(const char *name, u32 unk);
+ bool spawn(const char *name, u32 unk, Vec *pos=0, S16Vec *rot=0, Vec *scale=0);
+ bool spawnWithMatrix(const char *name, u32 unk, Mtx *mtx);
+ bool _vfB0(Vec *pos=0, S16Vec *rot=0, Vec *scale=0);
+ bool _vfB4(Mtx *mtx);
- u32 _114, _118;
- u8 _11C, _11D;
- u32 _120, _124;
-};
+ virtual u8 returnField11D(); // does exactly what it says on the tin
+ u32 _114, _118;
+ u8 _11C, _11D;
+ u32 _120, _124;
+ };
+}
struct SSM { short width, height; float xScale, yScale; };
extern SSM ScreenSizesAndMultipliers[3];
diff --git a/src/bossCaptainBowser.cpp b/src/bossCaptainBowser.cpp
index ce85f29..710af77 100644
--- a/src/bossCaptainBowser.cpp
+++ b/src/bossCaptainBowser.cpp
@@ -99,7 +99,6 @@ daCaptainBowser *daCaptainBowser::build() {
else if (this->damage > 20) { doStateChange(&StateID_Outro); }
else { doStateChange(&StateID_Damage); }
}
- else { dEn_c::spriteCollision(apThis, apOther); }
}
void daCaptainBowser::playerCollision(ActivePhysics *apThis, ActivePhysics *apOther) {
@@ -250,10 +249,10 @@ int daCaptainBowser::onDraw() {
//////////////////
void daCaptainBowser::beginState_Wait() {
if (this->isAngry == 0) {
- bindAnimChr_and_setUpdateRate("kp_wait", 1, 0.0, 1.0);
+ bindAnimChr_and_setUpdateRate("kp_wait", 1, 0.0, 1.5);
}
else {
- bindAnimChr_and_setUpdateRate("kp_wait", 1, 0.0, 1.5);
+ bindAnimChr_and_setUpdateRate("kp_wait", 1, 0.0, 2.0);
}
}
void daCaptainBowser::executeState_Wait() {
@@ -286,12 +285,12 @@ int daCaptainBowser::onDraw() {
if (this->chrAnimation.getCurrentFrame() == 60.0) { // throw back
int num = GenerateRandomNumber(5);
- CreateActor(10, 0x100 + ((num + 1) * 0x10), this->pos, 0, 0);
+ CreateActor(0x29F, 0x101 + ((num + 1) * 0x10), (Vec){pos.x-146.0, pos.y+122.0, pos.z}, 0, 0);
}
if (this->chrAnimation.getCurrentFrame() == 126.0) { // throw front
int num = GenerateRandomNumber(4);
- CreateActor(10, (num + 1) * 0x10, this->pos, 0, 0);
+ CreateActor(0x29F, ((num + 1) * 0x10) + 1, (Vec){pos.x-146.0, pos.y+122.0, pos.z}, 0, 0);
}
if (this->chrAnimation.isAnimationDone()) {
@@ -322,7 +321,7 @@ int daCaptainBowser::onDraw() {
void daCaptainBowser::executeState_Fire() {
if (this->chrAnimation.getCurrentFrame() == 70) { // spit fire
- CreateActor(KOOPA_FIRE, 0, this->pos, 0, 0); // Seems like nyb 5 has a setting, 2 bits long, maybe.
+ 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.isAnimationDone()) {
diff --git a/src/bossKoopaThrow.cpp b/src/bossKoopaThrow.cpp
index 8c6d4ee..19beadd 100644
--- a/src/bossKoopaThrow.cpp
+++ b/src/bossKoopaThrow.cpp
@@ -20,12 +20,12 @@ struct TypeInfo {
};
static const TypeInfo types[6] = {
- {"choropoo", "g3d/choropoo.brres", "spanner", "Wm_en_hit", 0, SE_BOSS_JR_FLOOR_BREAK, 0, 8.0f, 2.0f, 0, 0, 0x1000},
- {"choropoo", "g3d/choropoo.brres", "spanner", "Wm_en_burst_s", 0, SE_BOSS_JR_BOMB_BURST, 0, 8.0f, 2.0f, 0, 0, 0x1000},
- {"koopa_clown_bomb", "g3d/koopa_clown_bomb.brres", "koopa_clown_bomb", "Wm_en_burst_s", SE_BOSS_JR_BOMB_BOUND, SE_BOSS_JR_BOMB_BURST, 0, 8.0f, 1.0f, 0x200, 0x800, 0x1000},
- {"bros", "g3d/t00.brres", "bros_hammer", "Wm_en_hit", 0, SE_OBJ_HAMMER_HIT_BOTH, SE_EMY_MEGA_BROS_HAMMER, 8.0f, 2.0f, 0, 0, 0x1000},
- {"dossun", "g3d/t00.brres", "dossun", "Wm_en_hit", SE_EMY_DOSSUN, SE_EMY_DOSSUN_DEAD, 0, 8.0f, 1.0f, 0x100, 0x1000, 0x1000},
- {"KoopaShip", "g3d/present.brres", "PresentBox_penguin", "Wm_dm_presentopen",SE_EMY_DOSSUN, SE_EMY_DOSSUN_DEAD, 0, 8.0f, 1.0f, 0x20, 0x40, 0x200}
+ {"choropoo", "g3d/choropoo.brres", "spanner", "Wm_en_hit", 0, SE_BOSS_JR_FLOOR_BREAK, 0, 8.0f, 2.0f, 0, 0, 0x1000},
+ {"choropoo", "g3d/choropoo.brres", "spanner", "Wm_en_burst_s", 0, SE_BOSS_JR_BOMB_BURST, 0, 8.0f, 2.0f, 0, 0, 0x1000},
+ {"koopa_clown_bomb", "g3d/koopa_clown_bomb.brres", "koopa_clown_bomb", "Wm_en_burst_s", SE_BOSS_JR_BOMB_BOUND, SE_BOSS_JR_BOMB_BURST, 0, 16.0f, 0.8f, 0x200, 0x800, 0x1000},
+ {"bros", "g3d/t00.brres", "bros_hammer", "Wm_en_hit", 0, SE_OBJ_HAMMER_HIT_BOTH, SE_EMY_MEGA_BROS_HAMMER, 16.0f, 2.0f, 0, 0, 0x1000},
+ {"dossun", "g3d/t00.brres", "dossun", "Wm_en_hit", SE_EMY_DOSSUN, SE_EMY_DOSSUN_DEAD, 0, 16.0f, 1.0f, 0x100, 0x100, 0x100},
+ {"KoopaShip", "g3d/present.brres", "PresentBox_penguin", "Wm_dm_presentopen",SE_DEMO_OP_PRESENT_THROW_2400f, SE_DEMO_OP_PRESENT_BOX_BURST, 0, 12.0f, 1.0f, 0x20, 0x40, 0x200}
};
@@ -52,6 +52,7 @@ class daKoopaThrow : public dEn_c {
void updateModelMatrices();
void playerCollision(ActivePhysics *apThis, ActivePhysics *apOther);
+ void spriteCollision(ActivePhysics *apThis, ActivePhysics *apOther);
void collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther);
bool collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther);
@@ -86,9 +87,13 @@ extern "C" void *PlayWrenchSound(dEn_c *);
void daKoopaThrow::playerCollision(ActivePhysics *apThis, ActivePhysics *apOther) {
if (Type == 5) {
PlaySoundAsync(this, currentInfo->breakSound);
- SpawnEffect(currentInfo->deathEffect, 0, &this->pos, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0});
- CreateActor(EN_HATENA_BALLOON, 0x100, this->pos, 0, 0);
+ SpawnEffect(currentInfo->deathEffect, 0, &this->pos, &(S16Vec){0,0,0}, &(Vec){3.0, 3.0, 3.0});
+ dStageActor_c *spawned = CreateActor(EN_HATENA_BALLOON, 0x100, this->pos, 0, 0);
+ spawned->pos.x = this->pos.x;
+ spawned->pos.y = this->pos.y;
this->Delete(1);
+
+ return;
}
DamagePlayer(this, apThis, apOther);
@@ -102,6 +107,8 @@ void daKoopaThrow::playerCollision(ActivePhysics *apThis, ActivePhysics *apOther
}
}
+void daKoopaThrow::spriteCollision(ActivePhysics *apThis, ActivePhysics *apOther) {}
+
void daKoopaThrow::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { }
bool daKoopaThrow::collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther) {
return false;
@@ -259,6 +266,7 @@ int daKoopaThrow::onExecute() {
float rect[] = {this->_320, this->_324, this->spriteSomeRectX, this->spriteSomeRectY};
int ret = this->outOfZone(this->pos, (float*)&rect, this->currentZoneID);
if(ret) {
+ OSReport("Deleting");
this->Delete(1);
}
@@ -268,13 +276,13 @@ int daKoopaThrow::onExecute() {
void daKoopaThrow::beginState_Straight() {
- float rand = (float)GenerateRandomNumber(10) * 0.8;
+ float rand = (float)GenerateRandomNumber(10) * 0.4;
if (this->direction == 0) { // directions 1 spins clockwise, fly rightwards
- speed.x = 3.0 + rand;
+ speed.x = 1.5 + rand;
}
else { // directions 0 spins anti-clockwise, fly leftwards
- speed.x = -3.0 - rand;
+ speed.x = -1.5 - rand;
}
speed.y = 9.0;
@@ -290,13 +298,13 @@ void daKoopaThrow::executeState_Straight() {
cmgr_returnValue = collMgr.CollidedWithTile();
collMgr.execute();
- if (collMgr.CollidedWithTile() || (collMgr.bitfield_for_checks & (0x15 << direction))) {
- // hit the ground or wall
- PlaySoundAsync(this, currentInfo->breakSound);
+ // if (collMgr.CollidedWithTile() || (collMgr.bitfield_for_checks & (0x15 << direction))) {
+ // // hit the ground or wall
+ // PlaySoundAsync(this, currentInfo->breakSound);
- SpawnEffect(currentInfo->deathEffect, 0, &this->pos, &(S16Vec){0,0,0}, &(Vec){0.75, 0.75, 0.75});
- this->Delete(1);
- }
+ // SpawnEffect(currentInfo->deathEffect, 0, &this->pos, &(S16Vec){0,0,0}, &(Vec){0.75, 0.75, 0.75});
+ // this->Delete(1);
+ // }
if (this->direction == 1) { // directions 1 spins clockwise, fly rightwards
this->rot.x -= currentInfo->xrot;
@@ -320,7 +328,9 @@ void daKoopaThrow::executeState_Straight() {
if (this->speed.y < 0.0) {
PlaySoundAsync(this, currentInfo->breakSound);
SpawnEffect(currentInfo->deathEffect, 0, &this->pos, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0});
- CreateActor(EN_HATENA_BALLOON, 0x100, this->pos, 0, 0);
+ dStageActor_c *spawned = CreateActor(EN_HATENA_BALLOON, 0x100, this->pos, 0, 0);
+ spawned->pos.x = this->pos.x;
+ spawned->pos.y = this->pos.y;
this->Delete(1);
}
}
diff --git a/src/shyguy.cpp b/src/shyguy.cpp
index 79ed869..acee2f6 100644
--- a/src/shyguy.cpp
+++ b/src/shyguy.cpp
@@ -50,6 +50,8 @@ class daShyGuy : public dEn_c {
m3d::anmChr_c chrAnimation;
// m3d::anmChr_c carryAnm;
+ mEf::es2 effect;
+
int type;
int timer;
int jumpCounter;
@@ -693,7 +695,7 @@ int daShyGuy::onExecute() {
if (type > 8) {
giantRider.update();
}
-
+
return true;
}
@@ -1227,7 +1229,7 @@ void daShyGuy::updateModelMatrices() {
void daShyGuy::beginState_GoDizzy() {
bindAnimChr_and_setUpdateRate("c18_L_DMG_F_1_R", 1, 0.0, 1.0);
- SpawnEffect("Wm_en_spindamage", 0, &(Vec){this->pos.x, this->pos.y + 24.0, 0}, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0});
+ // SpawnEffect("Wm_en_spindamage", 0, &(Vec){this->pos.x, this->pos.y + 24.0, 0}, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0});
this->max_speed.x = 0;
this->speed.x = 0;
@@ -1245,6 +1247,8 @@ void daShyGuy::updateModelMatrices() {
calculateTileCollisions();
// Needs tile collision shit here, because jumpers can get hit and fall downwards.
+
+ effect.spawn("Wm_en_spindamage", 0, &(Vec){this->pos.x, this->pos.y + 24.0, 0}, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0});
if (this->jumpCounter == 0) {
if(this->chrAnimation.isAnimationDone()) {