RequireSystemScript('timed_animation.js');

function game() {
	var mng_fire = LoadAnimation("firewood.mng");
	if (mng_fire.getNumFrames() == 0)
		Abort("Whoops, no numframes, fix your file");
	var looptimes = 2;
	var anim =  TimedAnimation(mng_fire, looptimes);

	while (!anim.done) { 
		anim.blit(10,10);
		GetSystemFont().drawText(0,0, anim.currentframe + "/" + anim.totalframes + " " + anim.done )
		FlipScreen();  
	}

	var msg = "";
	msg += "\nFIRE:\n" + mng_fire.width + "*" + mng_fire.height + " " + mng_fire.getNumFrames() + " " + mng_fire.getPlaytime() + " " + mng_fire.getTicks();
	Abort(msg);
}
