/*
 * Cloud.h
 *
 *  Created on: 2009-07-10
 *      Author: wasyl
 */

#ifndef CLOUD_H_
#define CLOUD_H_

#include <allegro5/allegro.h>
#include "../prep/ent/Entity.h"

class Cloud : public Entity
{
private:
	ALLEGRO_BITMAP *mBmp;
	double mSpeed;
	int mFlips;
	bool mBehind;
public:
	Cloud(bool initial = true);
	virtual ~Cloud();

	int *indices()
	{
		static int ind[] = {ID("entt"), ID("rndr"), ID("dyna"), ID("posi"), 0};
		return ind;
	}

	int order(int index)
	{
		if (index == ID("rndr"))
			return mBehind ? 10 : 90;
		else
			return (int)this;
	}

	virtual void update(double dt);
	virtual void render();
};

#endif /* CLOUD_H_ */
