diff options
author | Treeki <treeki@gmail.com> | 2011-11-01 22:59:27 +0100 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2011-11-01 22:59:27 +0100 |
commit | c274d2173da36069855b191b93c831c1ad9bcb2b (patch) | |
tree | 538e27ae34d8cad6b269bc7066bfdbca3687b943 /src/bossFuzzyBear.cpp | |
parent | a5b283748c34215fb0954b8caa5f27ea00541cad (diff) | |
parent | 804bc013c1a3ec3afeedb19a1351ee4c3206c901 (diff) | |
download | kamek-c274d2173da36069855b191b93c831c1ad9bcb2b.tar.gz kamek-c274d2173da36069855b191b93c831c1ad9bcb2b.zip |
Merge branch 'level-select' of tsn:Kamek into level-select
Diffstat (limited to 'src/bossFuzzyBear.cpp')
-rw-r--r-- | src/bossFuzzyBear.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/bossFuzzyBear.cpp b/src/bossFuzzyBear.cpp index 0c16d42..463d063 100644 --- a/src/bossFuzzyBear.cpp +++ b/src/bossFuzzyBear.cpp @@ -25,7 +25,7 @@ class daFuzzyBear_c : public dEn_c { float AreaWidthRight; float LaunchSpeedShort; float LaunchSpeedHigh; - u8 dying; + char dying; float storeSpeed; Vec initialPos; char RolyBounces; @@ -70,7 +70,7 @@ extern "C" void *HandleYSpeed(daFuzzyBear_c *); extern "C" void *UpdateObjectPosBasedOnSpeedValues_real(daFuzzyBear_c *); extern "C" void *doSpriteMovement(dEn_c *); extern "C" void *PlaySound(daFuzzyBear_c *, int soundID); -extern "C" void *StopSound(int soundID, int thing=0); +extern "C" void *StopSound(int soundID); extern "C" u32 GenerateRandomNumber(int max); extern "C" dStageActor_c *CreateActor(u16 classID, int settings, Vec pos, char rot, char layer); @@ -248,6 +248,7 @@ int daFuzzyBear_c::onCreate() { this->roly = 0; this->damage = 0; this->isInvulnerable = 0; + this->dying = 0; bindAnimChr_and_setUpdateRate("run", 1, 0.0, 1.0); @@ -384,12 +385,12 @@ void daFuzzyBear_c::executeState_Bounce() { // Check for walls - if (this->pos.x <= this->initialPos.x - ((15 * 24.0) + wallDistance)) { // Hit left wall, head right. + if (this->pos.x <= this->initialPos.x - ((17 * 16.0) + wallDistance)) { // Hit left wall, head right. this->speed.x = -this->speed.x; this->direction = 1; this->pos.x = this->pos.x + 1.0; } - if (this->pos.x >= this->initialPos.x + ((5 * 24.0) - wallDistance)) { // Hit right wall, head left. + if (this->pos.x >= this->initialPos.x + ((7.5 * 16.0) - wallDistance)) { // Hit right wall, head left. this->speed.x = -this->speed.x; this->direction = 0; this->pos.x = this->pos.x - 1.0; } @@ -650,14 +651,14 @@ void daFuzzyBear_c::executeState_RolyPoly() { this->timer += 1; - if (this->pos.x <= this->initialPos.x - ((15 * 24.0) + wallDistance)) { // Hit left wall, head right. + if (this->pos.x <= this->initialPos.x - ((17 * 16.0) + wallDistance)) { // Hit left wall, head right. this->speed.x = -this->speed.x; this->direction = 1; this->pos.x = this->pos.x + 1.0; this->RolyBounces = this->RolyBounces + 1; } - if (this->pos.x >= this->initialPos.x + ((5 * 24.0) - wallDistance)) { // Hit right wall, head left. + if (this->pos.x >= this->initialPos.x + ((7.5 * 16.0) - wallDistance)) { // Hit right wall, head left. this->speed.x = -this->speed.x; this->direction = 0; this->pos.x = this->pos.x - 1.0; |