summaryrefslogtreecommitdiff
path: root/src/effectvideo.cpp
diff options
context:
space:
mode:
authorColin Noga <Tempus@Spectrum-Song.local>2011-10-13 02:25:35 -0500
committerColin Noga <Tempus@Spectrum-Song.local>2011-10-13 02:25:35 -0500
commit5086f4d34bd7a39ec7ea3377312dc97e11eadb31 (patch)
treee321501e7921c127860214550dafd40e8aa260d8 /src/effectvideo.cpp
parentb623ecee436d9dd010152c0d4648a755e22e6a11 (diff)
downloadkamek-5086f4d34bd7a39ec7ea3377312dc97e11eadb31.tar.gz
kamek-5086f4d34bd7a39ec7ea3377312dc97e11eadb31.zip
Minor updates
Diffstat (limited to 'src/effectvideo.cpp')
-rw-r--r--src/effectvideo.cpp23
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;
}