#include "explosions.h" GameObject* getExplosion1() { static GameObject expl1; static GfxObject gfx; static bool bFirstTime = true; if(bFirstTime) { bFirstTime = false; gfx = createGfxObject( "../explosion50st.png" ); expl1.gfxObj = gfx; expl1.frame = 0; expl1.frameSpeed = 1; expl1.numFrames = 50; } return &expl1; } void updateExplosions(GameObject* this) { // update which frame in texture to show this->frame += this->frameSpeed; if( this->frame >= this->numFrames) { this->status = DEAD; return; } }