/*
 * Stonage: a puzzle game
 * Copyright (C) 2001 Luc Saillard <luc@saillard.org>
 *
 * Header file for loading, manage Level file
 * 
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 * 
 */

#ifndef __LEVEL_H
#define __LEVEL_H

#include "square.h"
#include "square_select.h"

struct t_level
{
  int sizex, sizey, nsquares;
  struct t_square *squares;
  int *map;
  char *comment;
  int start_x,start_y;		/* Start square position */
  int times[3];                 /* Times to complete the level */
};

struct level_info
{
  int sizex;
  int sizey;
  int *map;
};


enum sprite_index
{
  SPRITE_DINOSAUR=0,
  SPRITE_KINESIST_NOTSELECTED,
  SPRITE_KINESIST_SELECTED,
  SPRITE_KEY_RED,
  SPRITE_KEY_BLUE,
  SPRITE_KEY_GREEN,
  SPRITE_NEED_KEY_RED,
  SPRITE_NEED_KEY_BLUE,
  SPRITE_NEED_KEY_GREEN,
  SPRITE_HOURGLASS
};

enum e_difficulty
{
  DIFFICULT_EASY=0,
  DIFFICULT_MEDIUM=1,
  DIFFICULT_HARD=2,
  DIFFICULT_LEVEL=DIFFICULT_HARD+1
};

struct t_level *Level_Load(const char *filename);
void Level_Free(struct t_level *l);
struct level_info *Level_New(const int sizex, const int sizey);
void Level_Draw2Screen(struct level_info *level, struct square_info *squares, GtkWidget *drawing_area);


#endif

