diff options
author | Colin Noga <Tempus@chronometry.ca> | 2012-07-20 21:29:54 -0500 |
---|---|---|
committer | Colin Noga <Tempus@chronometry.ca> | 2012-07-20 21:29:54 -0500 |
commit | a37e9d8030a5274072cc085db74e463eb4be0a73 (patch) | |
tree | 128457c6cc7ee7ff51574b25cefefb065c2e3a91 /src/bossSamurshai.cpp | |
parent | 061f0c1d9eda240eace4b638575f0fca1d1a3b1c (diff) | |
download | kamek-a37e9d8030a5274072cc085db74e463eb4be0a73.tar.gz kamek-a37e9d8030a5274072cc085db74e463eb4be0a73.zip |
Arrrgh
Diffstat (limited to '')
-rw-r--r-- | src/bossSamurshai.cpp | 52 |
1 files changed, 31 insertions, 21 deletions
diff --git a/src/bossSamurshai.cpp b/src/bossSamurshai.cpp index 88886e9..24c8615 100644 --- a/src/bossSamurshai.cpp +++ b/src/bossSamurshai.cpp @@ -4,6 +4,10 @@ #include <sfx.h> #include "boss.h" +extern "C" void *SoundRelatedClass; +extern "C" void *MapSoundPlayer(void *SoundRelatedClass, int soundID, int unk); + + const char* SSarcNameList [] = { "Shynja", NULL @@ -429,8 +433,8 @@ void daSamurshai::updateModelMatrices() { if (timer == 230) { SpawnEffect("Wm_en_hanapetal", 0, &pos, &(S16Vec){0,0,0}, &(Vec){1.5, 1.5, 1.5}); SpawnEffect("Wm_ob_itemget_ring", 0, &(Vec){pos.x, pos.y + 16.0, pos.z}, &(S16Vec){0,0,0}, &(Vec){8.0, 0.1, 1.5}); - PlaySound(this, SE_OBJ_WOOD_BOX_BREAK); - PlaySound(this, SE_BOSS_KAMECK_DOWN); + MapSoundPlayer(SoundRelatedClass, SE_OBJ_WOOD_BOX_BREAK, 1); + MapSoundPlayer(SoundRelatedClass, SE_BOSS_KAMECK_DOWN, 1); this->Kameck->doStateChange(&daKameckDemo::StateID_DieFall); } @@ -440,19 +444,15 @@ void daSamurshai::updateModelMatrices() { } int done = 0; - if ((timer > 360) && (done == 0)) { + if ((timer > 330) && (done == 0)) { u16 amt = (this->direction == 0) ? 0x2800 : 0xD800; done = SmoothRotation(&this->rot.y, amt, 0x2000); } - if (timer == 440) { bindAnimChr_and_setUpdateRate("c18_IDLE_R", 1, 0.0, 1.0); } - + if (timer == 400) { bindAnimChr_and_setUpdateRate("c18_IDLE_R", 1, 0.0, 1.0); } - // if (timer == 130) { actor->Kameck->doStateChange(&daKameckDemo::StateID_DemoSt); } - // if (timer == 400) { actor->Kameck->doStateChange(&daKameckDemo::StateID_DemoSt2); } - - if (timer == 530) { - // PlaySound(this, SE_EMY_KURI_CHANGE_BIG); + if (timer == 500) { + MapSoundPlayer(SoundRelatedClass, SE_BOSS_WENDY_RING_BOUND, 1); doStateChange(&StateID_Walk); } } @@ -482,6 +482,9 @@ void daSamurshai::updateModelMatrices() { } void daSamurshai::beginState_Walk() { + Chuckles.removeFromList(); + Knuckles.removeFromList(); + bindAnimChr_and_setUpdateRate("c18_RUNNING", 1, 0.0, 0.5); chosenOne = GetSpecificPlayerActor(this->randomPlayer()); @@ -494,6 +497,7 @@ void daSamurshai::updateModelMatrices() { OSReport("Speed: %f / %f", speed.x, max_speed.x); } void daSamurshai::executeState_Walk() { + MapSoundPlayer(SoundRelatedClass, SE_EMY_MOUSE_WALK, 1); float xDistance = pos.x - chosenOne->pos.x; float yDistance = pos.y - chosenOne->pos.y; @@ -571,10 +575,10 @@ void daSamurshai::updateModelMatrices() { } void daSamurshai::executeState_Chop() { - PlaySoundAsync(this, SE_EMY_CRASHER_PUNCH); speed.x = speed.x / 1.5; if (chrAnimation.getCurrentFrame() == 15.0) { + MapSoundPlayer(SoundRelatedClass, SE_EMY_CRASHER_PUNCH, 1); if (this->direction == 1) { SpawnEffect("Wm_ob_itemget_ring", 0, &(Vec){pos.x - 18.0, pos.y + 16.0, pos.z-200.0}, &(S16Vec){0,0,0}, &(Vec){2.5, 0.5, 1.5}); Chuckles.addToList(); @@ -583,10 +587,10 @@ void daSamurshai::updateModelMatrices() { SpawnEffect("Wm_ob_itemget_ring", 0, &(Vec){pos.x + 18.0, pos.y + 16.0, pos.z-200.0}, &(S16Vec){0,0,0}, &(Vec){2.5, 0.5, 1.5}); Knuckles.addToList(); } - timer += 1; } if (chrAnimation.getCurrentFrame() == 20.0) { + MapSoundPlayer(SoundRelatedClass, SE_OBJ_WOOD_BOX_BREAK, 1); if (this->direction == 1) { SpawnEffect("Wm_en_hit", 0, &(Vec){pos.x - 38.0, pos.y + 16.0, pos.z}, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0}); SpawnEffect("Wm_en_hanapetal", 0, &(Vec){pos.x - 38.0, pos.y + 16.0, pos.z}, &(S16Vec){0,0,0}, &(Vec){2.0, 2.0, 2.0}); @@ -600,8 +604,10 @@ void daSamurshai::updateModelMatrices() { } if(this->chrAnimation.isAnimationDone()) { - PlaySoundAsync(this, SE_OBJ_WOOD_BOX_BREAK); - doStateChange(&StateID_Walk); + timer += 1; + if (timer > 45) { + doStateChange(&StateID_Walk); + } } } void daSamurshai::endState_Chop() { } @@ -693,11 +699,15 @@ void daSamurshai::updateModelMatrices() { void daSamurshai::beginState_Uppercut() { bindAnimChr_and_setUpdateRate("c18_H_SHOT_R", 1, 0.0, 2.0); slowDown = false; + timer = 0; } void daSamurshai::executeState_Uppercut() { if ((slowDown) && (this->chrAnimation.isAnimationDone())) { - doStateChange(&StateID_Walk); + timer++; + if (timer > 45) { + doStateChange(&StateID_Walk); + } } if (slowDown) { @@ -706,8 +716,8 @@ void daSamurshai::updateModelMatrices() { if (this->chrAnimation.getCurrentFrame() == 34.0) { topHurts = true; - PlaySoundAsync(this, SE_EMY_CRASHER_PUNCH); - PlaySoundAsync(this, SE_BOSS_CMN_JUMP_M); + MapSoundPlayer(SoundRelatedClass, SE_EMY_CRASHER_PUNCH, 1); + MapSoundPlayer(SoundRelatedClass, SE_BOSS_CMN_JUMP_M, 1); speed.y = 4.0; y_speed_inc = -0.1875; @@ -735,7 +745,7 @@ void daSamurshai::updateModelMatrices() { Knuckles.removeFromList(); } - PlaySoundAsync(this, SE_OBJ_WOOD_BOX_BREAK); + MapSoundPlayer(SoundRelatedClass, SE_OBJ_WOOD_BOX_BREAK, 1); topHurts = false; } } @@ -819,7 +829,7 @@ void daSamurshai::updateModelMatrices() { Knuckles.removeFromList(); SpawnEffect("Wm_ob_switch", 0, &(Vec){pos.x, pos.y + 16.0, pos.z}, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0}); - PlaySoundAsync(this, SE_BOSS_CMN_DAMAGE_DEF); + MapSoundPlayer(SoundRelatedClass, SE_BOSS_CMN_DAMAGE_DEF, 1); } void daSamurshai::executeState_Damage() { calculateTileCollisions(); @@ -859,8 +869,8 @@ void daSamurshai::updateModelMatrices() { Chuckles.removeFromList(); Knuckles.removeFromList(); + MapSoundPlayer(SoundRelatedClass, SE_BOSS_CMN_DAMAGE_LAST, 1); - PlaySoundAsync(this, SE_BOSS_CMN_DAMAGE_LAST); } void daSamurshai::executeState_Outro() { @@ -881,7 +891,7 @@ void daSamurshai::updateModelMatrices() { SpawnEffect("Wm_ob_cmnshotstar", 0, &(Vec){pos.x + 8.0, pos.y - 8.0, pos.z + 500.0}, &(S16Vec){0,0,0}, &(Vec){1.75, 1.75, 1.75}); SpawnEffect("Wm_mr_wirehit_hit", 0, &(Vec){pos.x + 8.0, pos.y, pos.z + 500.0}, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0}); - PlaySound(this, STRM_BGM_SHIRO_BOSS_CLEAR); + MapSoundPlayer(SoundRelatedClass, STRM_BGM_SHIRO_BOSS_CLEAR, 1); MakeMarioEnterDemoMode(); this->dying = 1; |