#ifndef EDITOR_H
#define EDITOR_H
#define ED_UP 0
#define ED_DOWN 1
#define ED_LEFT 2
#define ED_RIGHT 3
#define ED_LOAD 4
#define ED_SAVE 5
#define ED_MAP 6
#define ED_FICHAS 7
#define ED_DOWN2 8
#define ED_UP2 9
#define ED_NEW 10
class Editor{
GLuint ed_texture[NUM_OBJS];
GLuint ed_tex_flech;
GLuint ed_tex_marco;
GLuint ed_tex_abrir;
GLuint ed_tex_nuevo;
GLuint ed_tex_guard;
struct Map
{
int length;
int area;
int *data;
int shown_x, shown_y;
int first_x, first_y;
int border;
int sel_x;
int sel_y;
} map;
struct Fichas
{
int shown_y;
int first_y;
int sel_x;
int sel_y;
int ficha_sel;
} fichas;
int cursor_over;
void draw_rejilla();
void draw_ficha(GLuint &tex, int x, int y,int size);
int load_map(const char *filename);
int save_map(const char *filename);
void check_mouse();
public:
Editor();
~Editor();
void draw();
};
#endif