/*
 * Stonage: a puzzle game
 * Copyright (C) 2001 Luc Saillard <luc@saillard.org>
 * 
 * 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 __SQUARE_H
#define __SQUARE_H

#include <glib.h>
#include <gtk/gtkwidget.h>
#include <gdk/gdk.h>

enum
{
  CAN_MOVE_TO_NORTH = (1<<0),
  CAN_MOVE_TO_SOUTH = (1<<1),
  CAN_MOVE_TO_EAST  = (1<<2),
  CAN_MOVE_TO_WEST  = (1<<3),
  AFTER_MOVE_CRASH  = (1<<4),
  START             = (1<<5),
  FINISH            = (1<<6),
  CAN_GO_ABOVE      = (1<<7),
  KEY_RED	    = (1<<8),
  KEY_BLUE	    = (1<<9),
  KEY_GREEN	    = (1<<10),
  NEED_KEY_RED      = (1<<11),
  NEED_KEY_BLUE     = (1<<12),
  NEED_KEY_GREEN    = (1<<13),
  HOURGLASS         = (1<<14),
  TELEPORT1         = (1<<15),
  TELEPORT2         = (1<<16),
  TELEPORT3         = (1<<17)
};

struct t_square
{
  unsigned char *name;
  unsigned int properties;
  int npixmaps;
  int delay;
  GtkWidget **pixmaps;
  GdkPixmap *pixmap;
};

extern struct enum_list square_properties_text2enum[];

int Square_Load_All(GList **squares);
GList * Square_Load_Default(void);
void Square_Free(struct t_square *s);

#endif

