summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Simpson <megazig@gmail.com>2011-10-13 02:21:14 -0500
committerStephen Simpson <megazig@gmail.com>2011-10-13 02:21:14 -0500
commitb3c762b06e3238208ba54651545ca51b23e008c9 (patch)
treed213f536f6bef31f19f138bd0cb40215c9f79292
parent439bb716440d809cc4f60ca7946e3a4679672f88 (diff)
parentb623ecee436d9dd010152c0d4648a755e22e6a11 (diff)
downloadkamek-b3c762b06e3238208ba54651545ca51b23e008c9.tar.gz
kamek-b3c762b06e3238208ba54651545ca51b23e008c9.zip
Merge branch 'level-select' of ssh://treeki.shacknet.nu:30000/Kamek into level-select
Diffstat (limited to '')
-rw-r--r--NewerProject.yaml1
-rw-r--r--effectVideo.yaml10
-rw-r--r--src/effectvideo.cpp49
3 files changed, 60 insertions, 0 deletions
diff --git a/NewerProject.yaml b/NewerProject.yaml
index 36696f4..b21d07c 100644
--- a/NewerProject.yaml
+++ b/NewerProject.yaml
@@ -33,3 +33,4 @@ modules:
- processed/blocksnake.yaml
# - processed/classic_controller.yaml
- processed/bossMegaGoomba.yaml
+ - processed/effectVideo.yaml
diff --git a/effectVideo.yaml b/effectVideo.yaml
new file mode 100644
index 0000000..555719e
--- /dev/null
+++ b/effectVideo.yaml
@@ -0,0 +1,10 @@
+---
+# Replaces LIFT_TORIDE_ROLL
+
+source_files: [../src/effectvideo.cpp]
+hooks:
+ - name: EffectVideoAdd
+ type: add_func_pointer
+ src_addr_pal: 0x80969E78
+ target_func: 'EffectVideo::build(void)'
+
diff --git a/src/effectvideo.cpp b/src/effectvideo.cpp
new file mode 100644
index 0000000..ec23158
--- /dev/null
+++ b/src/effectvideo.cpp
@@ -0,0 +1,49 @@
+#include <common.h>
+#include <game.h>
+#include <g3dhax.h>
+#include "player.h"
+#include "effects.h"
+
+
+class EffectVideo : public dEn_c {
+ int onCreate();
+ int onExecute();
+
+ s32 timer;
+ u32 effect;
+
+ static EffectVideo *build();
+
+};
+
+
+EffectVideo *EffectVideo::build() {
+ void *buffer = AllocFromGameHeap1(sizeof(EffectVideo));
+ return new(buffer) EffectVideo;
+}
+
+
+int EffectVideo::onCreate() {
+
+ this->timer = -60;
+ this->effect = 0;
+
+ this->onExecute();
+ return true;
+}
+
+int EffectVideo::onExecute() {
+
+ if (this->effect > 1000) { return true; }
+
+ if (this->timer == 30) {
+
+ CreateEffect(this, this->effect);
+
+ }
+
+ this->effect += 1;
+ this->timer += 1;
+ return true;
+}
+