summaryrefslogtreecommitdiff
path: root/src/effectvideo.cpp
diff options
context:
space:
mode:
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;
}