diff options
author | Colin Noga <Tempus@Spectrum-Song.local> | 2011-10-12 17:22:45 -0500 |
---|---|---|
committer | Colin Noga <Tempus@Spectrum-Song.local> | 2011-10-12 17:22:45 -0500 |
commit | b623ecee436d9dd010152c0d4648a755e22e6a11 (patch) | |
tree | 0b499f53324fd50aa3126c6e93f692c06aea8bf3 /src/effectvideo.cpp | |
parent | d7c926b2e0906e225adc2a330d19a4806b646ecc (diff) | |
download | kamek-b623ecee436d9dd010152c0d4648a755e22e6a11.tar.gz kamek-b623ecee436d9dd010152c0d4648a755e22e6a11.zip |
This build is broken due to EffectVideo
Diffstat (limited to 'src/effectvideo.cpp')
-rw-r--r-- | src/effectvideo.cpp | 49 |
1 files changed, 49 insertions, 0 deletions
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; +} + |