diff options
author | Colin Noga <Tempus@Spectrum-Song.local> | 2011-10-13 02:25:35 -0500 |
---|---|---|
committer | Colin Noga <Tempus@Spectrum-Song.local> | 2011-10-13 02:25:35 -0500 |
commit | 5086f4d34bd7a39ec7ea3377312dc97e11eadb31 (patch) | |
tree | e321501e7921c127860214550dafd40e8aa260d8 /src/effectvideo.cpp | |
parent | b623ecee436d9dd010152c0d4648a755e22e6a11 (diff) | |
download | kamek-5086f4d34bd7a39ec7ea3377312dc97e11eadb31.tar.gz kamek-5086f4d34bd7a39ec7ea3377312dc97e11eadb31.zip |
Minor updates
Diffstat (limited to '')
-rw-r--r-- | src/effectvideo.cpp | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/src/effectvideo.cpp b/src/effectvideo.cpp index ec23158..cacc22d 100644 --- a/src/effectvideo.cpp +++ b/src/effectvideo.cpp @@ -3,11 +3,16 @@ #include <g3dhax.h> #include "player.h" #include "effects.h" +#include <sfx.h> + + +extern "C" void *PlaySound(dEn_c *, int soundID); class EffectVideo : public dEn_c { int onCreate(); int onExecute(); + int onDelete(); s32 timer; u32 effect; @@ -26,23 +31,33 @@ EffectVideo *EffectVideo::build() { int EffectVideo::onCreate() { this->timer = -60; - this->effect = 0; + this->effect = 900; this->onExecute(); return true; } + +int EffectVideo::onDelete() { + return true; +} + + int EffectVideo::onExecute() { - if (this->effect > 1000) { return true; } + if (this->effect >= 1001) { return true; } - if (this->timer == 30) { + if (this->timer > 60) { CreateEffect(this, this->effect); + PlaySound(this, this->effect); + this->pos.x += 16.0; + + this->effect += 1; + this->timer = 0; } - this->effect += 1; this->timer += 1; return true; } |