#include #include #include #include "player.h" #include "effects.h" #include extern "C" void *PlaySound(dEn_c *, int soundID); class EffectVideo : public dEn_c { int onCreate(); int onExecute(); int onDelete(); 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 = 900; this->onExecute(); return true; } int EffectVideo::onDelete() { return true; } int EffectVideo::onExecute() { if (this->effect >= 1001) { return true; } if (this->timer > 60) { CreateEffect(this, this->effect); PlaySound(this, this->effect); this->pos.x += 16.0; this->effect += 1; this->timer = 0; } this->timer += 1; return true; }