#ifndef _Tuli_HPP_
#define _Tuli_HPP_

#include <stdio.h>
#include "../externs.hpp"
#include "../bpm.hpp"

#define PARTICLE_STATE_NONE 0
#define PARTICLE_STATE_IGNITE 1
#define PARTICLE_STATE_BURN 2

class TuliParticle
{
public:
    
    Vector p;
    float energy;
    float maxenergy;

    float upspeed;
    float a;
    float s;

    int state;

};

class Tulispiraali
{
public:
    void draw(float pos, float alpha);
    float st;
    float et;

    int count;
    Vector color;
    Vector *vertices;

    Vector movedelta;
};


class Tuli : public Base
{
	public:

		Tuli();
		~Tuli();

		bool init(unsigned long s, unsigned long e);
		void draw();

	private:
        Vector turbulenceFunc1(float t, Vector &pos);
        Vector turbulenceFunc2(float t, Vector &pos);
        Vector turbulenceFunc3(float t, Vector &pos);

        int maxparticles;
        TuliParticle *parts;
		void renderScene(float pos, float alpha);

        int spiraalicount;
        Tulispiraali **spiraalit;

};

#endif
