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

#ifndef EDITORSTATE_H_
#define EDITORSTATE_H_

#include <allegro5/allegro.h>
#include <allegro5/a5_font.h>
#include <allegro5/a5_ttf.h>
#include "../prep/app/AppState.h"
#include "../prep/ent/Entity.h"
#include "../prep/ent/World.h"
#include "../prep/input/Primaries.h"
#include "../prep/input/Switch.h"

#include <vector>

class EditorState : public AppState<int>
{
private:
	std::vector<Entity*> palette;
	int selected;
	World mWorld;
	int mLastX, mLastY;
	Switch *mPut, *mContinue, *mRemove, *mPrev, *mNext;
	Switch *mSave, *mLoad, *mPlay;
	ALLEGRO_FONT *mFont;
	Entity *tile[40][30];
	int mLastZ;

public:
	EditorState();
	virtual ~EditorState();

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

#endif /* EDITORSTATE_H_ */
