/* map.c generated by valac 0.26.0.19-b2255, the Vala compiler
 * generated from map.vala, do not modify */

/*
 * Copyright (C) 2010-2013 Robert Ancell
 *
 * 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. See http://www.gnu.org/copyleft/gpl.html the full text of the
 * license.
 */

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gstdio.h>
#include <float.h>
#include <math.h>


#define TYPE_SLOT (slot_get_type ())
#define SLOT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SLOT, Slot))
#define SLOT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SLOT, SlotClass))
#define IS_SLOT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SLOT))
#define IS_SLOT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SLOT))
#define SLOT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SLOT, SlotClass))

typedef struct _Slot Slot;
typedef struct _SlotClass SlotClass;
typedef struct _SlotPrivate SlotPrivate;

#define TYPE_MAP (map_get_type ())
#define MAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MAP, Map))
#define MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MAP, MapClass))
#define IS_MAP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MAP))
#define IS_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MAP))
#define MAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MAP, MapClass))

typedef struct _Map Map;
typedef struct _MapClass MapClass;
typedef struct _MapPrivate MapPrivate;
#define _g_free0(var) (var = (g_free (var), NULL))
#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define TYPE_MAP_LOADER (map_loader_get_type ())
#define MAP_LOADER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MAP_LOADER, MapLoader))
#define MAP_LOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MAP_LOADER, MapLoaderClass))
#define IS_MAP_LOADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MAP_LOADER))
#define IS_MAP_LOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MAP_LOADER))
#define MAP_LOADER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MAP_LOADER, MapLoaderClass))

typedef struct _MapLoader MapLoader;
typedef struct _MapLoaderClass MapLoaderClass;
typedef struct _MapLoaderPrivate MapLoaderPrivate;
#define _g_markup_parse_context_free0(var) ((var == NULL) ? NULL : (var = (g_markup_parse_context_free (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

struct _Slot {
	GObject parent_instance;
	SlotPrivate * priv;
	gint x;
	gint y;
	gint layer;
};

struct _SlotClass {
	GObjectClass parent_class;
};

struct _Map {
	GObject parent_instance;
	MapPrivate * priv;
	gchar* name;
	gchar* score_name;
	GList* slots;
};

struct _MapClass {
	GObjectClass parent_class;
};

struct _MapLoader {
	GObject parent_instance;
	MapLoaderPrivate * priv;
	GList* maps;
};

struct _MapLoaderClass {
	GObjectClass parent_class;
};

struct _MapLoaderPrivate {
	Map* map;
	gint layer_z;
};


static gpointer slot_parent_class = NULL;
static gpointer map_parent_class = NULL;
static gpointer map_loader_parent_class = NULL;

GType slot_get_type (void) G_GNUC_CONST;
enum  {
	SLOT_DUMMY_PROPERTY
};
Slot* slot_new (gint x, gint y, gint layer);
Slot* slot_construct (GType object_type, gint x, gint y, gint layer);
static void slot_finalize (GObject* obj);
gint compare_slots (Slot* a, Slot* b);
GType map_get_type (void) G_GNUC_CONST;
enum  {
	MAP_DUMMY_PROPERTY,
	MAP_WIDTH,
	MAP_HEIGHT
};
static void _g_object_unref0_ (gpointer var);
static void _g_list_free__g_object_unref0_ (GList* self);
Map* map_new_test (void);
Map* map_construct_test (GType object_type);
Map* map_new_builtin (void);
Map* map_construct_builtin (GType object_type);
Map* map_new (void);
Map* map_construct (GType object_type);
guint map_get_width (Map* self);
guint map_get_height (Map* self);
static void map_finalize (GObject* obj);
static void _vala_map_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
GType map_loader_get_type (void) G_GNUC_CONST;
#define MAP_LOADER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_MAP_LOADER, MapLoaderPrivate))
enum  {
	MAP_LOADER_DUMMY_PROPERTY
};
void map_loader_load (MapLoader* self, const gchar* filename, GError** error);
static void map_loader_start_element_cb (MapLoader* self, GMarkupParseContext* context, const gchar* element_name, gchar** attribute_names, int attribute_names_length1, gchar** attribute_values, int attribute_values_length1, GError** error);
static void _map_loader_start_element_cb_gmarkup_parser_start_element_func (GMarkupParseContext* context, const gchar* element_name, gchar** attribute_names, gchar** attribute_values, gpointer self, GError** error);
static void map_loader_end_element_cb (MapLoader* self, GMarkupParseContext* context, const gchar* element_name, GError** error);
static void _map_loader_end_element_cb_gmarkup_parser_end_element_func (GMarkupParseContext* context, const gchar* element_name, gpointer self, GError** error);
static gchar* map_loader_get_attribute (MapLoader* self, gchar** attribute_names, int attribute_names_length1, gchar** attribute_values, int attribute_values_length1, const gchar* name, const gchar* _default_);
static gdouble map_loader_get_attribute_d (MapLoader* self, gchar** attribute_names, int attribute_names_length1, gchar** attribute_values, int attribute_values_length1, const gchar* name, gdouble _default_);
MapLoader* map_loader_new (void);
MapLoader* map_loader_construct (GType object_type);
static void map_loader_finalize (GObject* obj);
static gint _vala_array_length (gpointer array);


Slot* slot_construct (GType object_type, gint x, gint y, gint layer) {
	Slot * self = NULL;
	gint _tmp0_ = 0;
	gint _tmp1_ = 0;
	gint _tmp2_ = 0;
	self = (Slot*) g_object_new (object_type, NULL);
	_tmp0_ = x;
	self->x = _tmp0_;
	_tmp1_ = y;
	self->y = _tmp1_;
	_tmp2_ = layer;
	self->layer = _tmp2_;
	return self;
}


Slot* slot_new (gint x, gint y, gint layer) {
	return slot_construct (TYPE_SLOT, x, y, layer);
}


static void slot_class_init (SlotClass * klass) {
	slot_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = slot_finalize;
}


static void slot_instance_init (Slot * self) {
}


static void slot_finalize (GObject* obj) {
	Slot * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SLOT, Slot);
	G_OBJECT_CLASS (slot_parent_class)->finalize (obj);
}


GType slot_get_type (void) {
	static volatile gsize slot_type_id__volatile = 0;
	if (g_once_init_enter (&slot_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (SlotClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) slot_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Slot), 0, (GInstanceInitFunc) slot_instance_init, NULL };
		GType slot_type_id;
		slot_type_id = g_type_register_static (G_TYPE_OBJECT, "Slot", &g_define_type_info, 0);
		g_once_init_leave (&slot_type_id__volatile, slot_type_id);
	}
	return slot_type_id__volatile;
}


gint compare_slots (Slot* a, Slot* b) {
	gint result = 0;
	gint dl = 0;
	Slot* _tmp0_ = NULL;
	gint _tmp1_ = 0;
	Slot* _tmp2_ = NULL;
	gint _tmp3_ = 0;
	gint _tmp4_ = 0;
	gint dx = 0;
	Slot* _tmp5_ = NULL;
	gint _tmp6_ = 0;
	Slot* _tmp7_ = NULL;
	gint _tmp8_ = 0;
	gint dy = 0;
	Slot* _tmp9_ = NULL;
	gint _tmp10_ = 0;
	Slot* _tmp11_ = NULL;
	gint _tmp12_ = 0;
	gint _tmp13_ = 0;
	gint _tmp14_ = 0;
	gint _tmp15_ = 0;
	gint _tmp16_ = 0;
	g_return_val_if_fail (a != NULL, 0);
	g_return_val_if_fail (b != NULL, 0);
	_tmp0_ = a;
	_tmp1_ = _tmp0_->layer;
	_tmp2_ = b;
	_tmp3_ = _tmp2_->layer;
	dl = _tmp1_ - _tmp3_;
	_tmp4_ = dl;
	if (_tmp4_ != 0) {
		result = dl;
		return result;
	}
	_tmp5_ = a;
	_tmp6_ = _tmp5_->x;
	_tmp7_ = b;
	_tmp8_ = _tmp7_->x;
	dx = _tmp6_ - _tmp8_;
	_tmp9_ = a;
	_tmp10_ = _tmp9_->y;
	_tmp11_ = b;
	_tmp12_ = _tmp11_->y;
	dy = _tmp10_ - _tmp12_;
	_tmp13_ = dx;
	_tmp14_ = dy;
	if (_tmp13_ > _tmp14_) {
		result = -1;
		return result;
	}
	_tmp15_ = dx;
	_tmp16_ = dy;
	if (_tmp15_ < _tmp16_) {
		result = 1;
		return result;
	}
	result = 0;
	return result;
}


static void _g_object_unref0_ (gpointer var) {
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}


static void _g_list_free__g_object_unref0_ (GList* self) {
	g_list_foreach (self, (GFunc) _g_object_unref0_, NULL);
	g_list_free (self);
}


Map* map_construct_test (GType object_type) {
	Map * self = NULL;
	gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	Slot* _tmp2_ = NULL;
	Slot* _tmp3_ = NULL;
	Slot* _tmp4_ = NULL;
	Slot* _tmp5_ = NULL;
	Slot* _tmp6_ = NULL;
	Slot* _tmp7_ = NULL;
	Slot* _tmp8_ = NULL;
	Slot* _tmp9_ = NULL;
	self = (Map*) g_object_new (object_type, NULL);
	_tmp0_ = g_strdup ("Test");
	_g_free0 (self->name);
	self->name = _tmp0_;
	_tmp1_ = g_strdup ("test");
	_g_free0 (self->score_name);
	self->score_name = _tmp1_;
	_tmp2_ = slot_new (0, 0, 0);
	self->slots = g_list_append (self->slots, _tmp2_);
	_tmp3_ = slot_new (2, 0, 0);
	self->slots = g_list_append (self->slots, _tmp3_);
	_tmp4_ = slot_new (2, 0, 1);
	self->slots = g_list_append (self->slots, _tmp4_);
	_tmp5_ = slot_new (4, 0, 0);
	self->slots = g_list_append (self->slots, _tmp5_);
	_tmp6_ = slot_new (0, 2, 0);
	self->slots = g_list_append (self->slots, _tmp6_);
	_tmp7_ = slot_new (2, 2, 0);
	self->slots = g_list_append (self->slots, _tmp7_);
	_tmp8_ = slot_new (2, 2, 1);
	self->slots = g_list_append (self->slots, _tmp8_);
	_tmp9_ = slot_new (4, 2, 0);
	self->slots = g_list_append (self->slots, _tmp9_);
	return self;
}


Map* map_new_test (void) {
	return map_construct_test (TYPE_MAP);
}


Map* map_construct_builtin (GType object_type) {
	Map * self = NULL;
	gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	Slot* _tmp2_ = NULL;
	Slot* _tmp3_ = NULL;
	Slot* _tmp4_ = NULL;
	Slot* _tmp5_ = NULL;
	Slot* _tmp6_ = NULL;
	Slot* _tmp7_ = NULL;
	Slot* _tmp8_ = NULL;
	Slot* _tmp9_ = NULL;
	Slot* _tmp10_ = NULL;
	Slot* _tmp11_ = NULL;
	Slot* _tmp12_ = NULL;
	Slot* _tmp13_ = NULL;
	Slot* _tmp14_ = NULL;
	Slot* _tmp15_ = NULL;
	Slot* _tmp16_ = NULL;
	Slot* _tmp17_ = NULL;
	Slot* _tmp18_ = NULL;
	Slot* _tmp19_ = NULL;
	Slot* _tmp20_ = NULL;
	Slot* _tmp21_ = NULL;
	Slot* _tmp22_ = NULL;
	Slot* _tmp23_ = NULL;
	Slot* _tmp24_ = NULL;
	Slot* _tmp25_ = NULL;
	Slot* _tmp26_ = NULL;
	Slot* _tmp27_ = NULL;
	Slot* _tmp28_ = NULL;
	Slot* _tmp29_ = NULL;
	Slot* _tmp30_ = NULL;
	Slot* _tmp31_ = NULL;
	Slot* _tmp32_ = NULL;
	Slot* _tmp33_ = NULL;
	Slot* _tmp34_ = NULL;
	Slot* _tmp35_ = NULL;
	Slot* _tmp36_ = NULL;
	Slot* _tmp37_ = NULL;
	Slot* _tmp38_ = NULL;
	Slot* _tmp39_ = NULL;
	Slot* _tmp40_ = NULL;
	Slot* _tmp41_ = NULL;
	Slot* _tmp42_ = NULL;
	Slot* _tmp43_ = NULL;
	Slot* _tmp44_ = NULL;
	Slot* _tmp45_ = NULL;
	Slot* _tmp46_ = NULL;
	Slot* _tmp47_ = NULL;
	Slot* _tmp48_ = NULL;
	Slot* _tmp49_ = NULL;
	Slot* _tmp50_ = NULL;
	Slot* _tmp51_ = NULL;
	Slot* _tmp52_ = NULL;
	Slot* _tmp53_ = NULL;
	Slot* _tmp54_ = NULL;
	Slot* _tmp55_ = NULL;
	Slot* _tmp56_ = NULL;
	Slot* _tmp57_ = NULL;
	Slot* _tmp58_ = NULL;
	Slot* _tmp59_ = NULL;
	Slot* _tmp60_ = NULL;
	Slot* _tmp61_ = NULL;
	Slot* _tmp62_ = NULL;
	Slot* _tmp63_ = NULL;
	Slot* _tmp64_ = NULL;
	Slot* _tmp65_ = NULL;
	Slot* _tmp66_ = NULL;
	Slot* _tmp67_ = NULL;
	Slot* _tmp68_ = NULL;
	Slot* _tmp69_ = NULL;
	Slot* _tmp70_ = NULL;
	Slot* _tmp71_ = NULL;
	Slot* _tmp72_ = NULL;
	Slot* _tmp73_ = NULL;
	Slot* _tmp74_ = NULL;
	Slot* _tmp75_ = NULL;
	Slot* _tmp76_ = NULL;
	Slot* _tmp77_ = NULL;
	Slot* _tmp78_ = NULL;
	Slot* _tmp79_ = NULL;
	Slot* _tmp80_ = NULL;
	Slot* _tmp81_ = NULL;
	Slot* _tmp82_ = NULL;
	Slot* _tmp83_ = NULL;
	Slot* _tmp84_ = NULL;
	Slot* _tmp85_ = NULL;
	Slot* _tmp86_ = NULL;
	Slot* _tmp87_ = NULL;
	Slot* _tmp88_ = NULL;
	Slot* _tmp89_ = NULL;
	Slot* _tmp90_ = NULL;
	Slot* _tmp91_ = NULL;
	Slot* _tmp92_ = NULL;
	Slot* _tmp93_ = NULL;
	Slot* _tmp94_ = NULL;
	Slot* _tmp95_ = NULL;
	Slot* _tmp96_ = NULL;
	Slot* _tmp97_ = NULL;
	Slot* _tmp98_ = NULL;
	Slot* _tmp99_ = NULL;
	Slot* _tmp100_ = NULL;
	Slot* _tmp101_ = NULL;
	Slot* _tmp102_ = NULL;
	Slot* _tmp103_ = NULL;
	Slot* _tmp104_ = NULL;
	Slot* _tmp105_ = NULL;
	Slot* _tmp106_ = NULL;
	Slot* _tmp107_ = NULL;
	Slot* _tmp108_ = NULL;
	Slot* _tmp109_ = NULL;
	Slot* _tmp110_ = NULL;
	Slot* _tmp111_ = NULL;
	Slot* _tmp112_ = NULL;
	Slot* _tmp113_ = NULL;
	Slot* _tmp114_ = NULL;
	Slot* _tmp115_ = NULL;
	Slot* _tmp116_ = NULL;
	Slot* _tmp117_ = NULL;
	Slot* _tmp118_ = NULL;
	Slot* _tmp119_ = NULL;
	Slot* _tmp120_ = NULL;
	Slot* _tmp121_ = NULL;
	Slot* _tmp122_ = NULL;
	Slot* _tmp123_ = NULL;
	Slot* _tmp124_ = NULL;
	Slot* _tmp125_ = NULL;
	Slot* _tmp126_ = NULL;
	Slot* _tmp127_ = NULL;
	Slot* _tmp128_ = NULL;
	Slot* _tmp129_ = NULL;
	Slot* _tmp130_ = NULL;
	Slot* _tmp131_ = NULL;
	Slot* _tmp132_ = NULL;
	Slot* _tmp133_ = NULL;
	Slot* _tmp134_ = NULL;
	Slot* _tmp135_ = NULL;
	Slot* _tmp136_ = NULL;
	Slot* _tmp137_ = NULL;
	Slot* _tmp138_ = NULL;
	Slot* _tmp139_ = NULL;
	Slot* _tmp140_ = NULL;
	Slot* _tmp141_ = NULL;
	Slot* _tmp142_ = NULL;
	Slot* _tmp143_ = NULL;
	Slot* _tmp144_ = NULL;
	Slot* _tmp145_ = NULL;
	self = (Map*) g_object_new (object_type, NULL);
	_tmp0_ = g_strdup ("Easy");
	_g_free0 (self->name);
	self->name = _tmp0_;
	_tmp1_ = g_strdup ("easy");
	_g_free0 (self->score_name);
	self->score_name = _tmp1_;
	_tmp2_ = slot_new (13, 7, 4);
	self->slots = g_list_append (self->slots, _tmp2_);
	_tmp3_ = slot_new (12, 8, 3);
	self->slots = g_list_append (self->slots, _tmp3_);
	_tmp4_ = slot_new (14, 8, 3);
	self->slots = g_list_append (self->slots, _tmp4_);
	_tmp5_ = slot_new (12, 6, 3);
	self->slots = g_list_append (self->slots, _tmp5_);
	_tmp6_ = slot_new (14, 6, 3);
	self->slots = g_list_append (self->slots, _tmp6_);
	_tmp7_ = slot_new (10, 10, 2);
	self->slots = g_list_append (self->slots, _tmp7_);
	_tmp8_ = slot_new (12, 10, 2);
	self->slots = g_list_append (self->slots, _tmp8_);
	_tmp9_ = slot_new (14, 10, 2);
	self->slots = g_list_append (self->slots, _tmp9_);
	_tmp10_ = slot_new (16, 10, 2);
	self->slots = g_list_append (self->slots, _tmp10_);
	_tmp11_ = slot_new (10, 8, 2);
	self->slots = g_list_append (self->slots, _tmp11_);
	_tmp12_ = slot_new (12, 8, 2);
	self->slots = g_list_append (self->slots, _tmp12_);
	_tmp13_ = slot_new (14, 8, 2);
	self->slots = g_list_append (self->slots, _tmp13_);
	_tmp14_ = slot_new (16, 8, 2);
	self->slots = g_list_append (self->slots, _tmp14_);
	_tmp15_ = slot_new (10, 6, 2);
	self->slots = g_list_append (self->slots, _tmp15_);
	_tmp16_ = slot_new (12, 6, 2);
	self->slots = g_list_append (self->slots, _tmp16_);
	_tmp17_ = slot_new (14, 6, 2);
	self->slots = g_list_append (self->slots, _tmp17_);
	_tmp18_ = slot_new (16, 6, 2);
	self->slots = g_list_append (self->slots, _tmp18_);
	_tmp19_ = slot_new (10, 4, 2);
	self->slots = g_list_append (self->slots, _tmp19_);
	_tmp20_ = slot_new (12, 4, 2);
	self->slots = g_list_append (self->slots, _tmp20_);
	_tmp21_ = slot_new (14, 4, 2);
	self->slots = g_list_append (self->slots, _tmp21_);
	_tmp22_ = slot_new (16, 4, 2);
	self->slots = g_list_append (self->slots, _tmp22_);
	_tmp23_ = slot_new (8, 12, 1);
	self->slots = g_list_append (self->slots, _tmp23_);
	_tmp24_ = slot_new (10, 12, 1);
	self->slots = g_list_append (self->slots, _tmp24_);
	_tmp25_ = slot_new (12, 12, 1);
	self->slots = g_list_append (self->slots, _tmp25_);
	_tmp26_ = slot_new (14, 12, 1);
	self->slots = g_list_append (self->slots, _tmp26_);
	_tmp27_ = slot_new (16, 12, 1);
	self->slots = g_list_append (self->slots, _tmp27_);
	_tmp28_ = slot_new (18, 12, 1);
	self->slots = g_list_append (self->slots, _tmp28_);
	_tmp29_ = slot_new (8, 10, 1);
	self->slots = g_list_append (self->slots, _tmp29_);
	_tmp30_ = slot_new (10, 10, 1);
	self->slots = g_list_append (self->slots, _tmp30_);
	_tmp31_ = slot_new (12, 10, 1);
	self->slots = g_list_append (self->slots, _tmp31_);
	_tmp32_ = slot_new (14, 10, 1);
	self->slots = g_list_append (self->slots, _tmp32_);
	_tmp33_ = slot_new (16, 10, 1);
	self->slots = g_list_append (self->slots, _tmp33_);
	_tmp34_ = slot_new (18, 10, 1);
	self->slots = g_list_append (self->slots, _tmp34_);
	_tmp35_ = slot_new (8, 8, 1);
	self->slots = g_list_append (self->slots, _tmp35_);
	_tmp36_ = slot_new (10, 8, 1);
	self->slots = g_list_append (self->slots, _tmp36_);
	_tmp37_ = slot_new (12, 8, 1);
	self->slots = g_list_append (self->slots, _tmp37_);
	_tmp38_ = slot_new (14, 8, 1);
	self->slots = g_list_append (self->slots, _tmp38_);
	_tmp39_ = slot_new (16, 8, 1);
	self->slots = g_list_append (self->slots, _tmp39_);
	_tmp40_ = slot_new (18, 8, 1);
	self->slots = g_list_append (self->slots, _tmp40_);
	_tmp41_ = slot_new (8, 6, 1);
	self->slots = g_list_append (self->slots, _tmp41_);
	_tmp42_ = slot_new (10, 6, 1);
	self->slots = g_list_append (self->slots, _tmp42_);
	_tmp43_ = slot_new (12, 6, 1);
	self->slots = g_list_append (self->slots, _tmp43_);
	_tmp44_ = slot_new (14, 6, 1);
	self->slots = g_list_append (self->slots, _tmp44_);
	_tmp45_ = slot_new (16, 6, 1);
	self->slots = g_list_append (self->slots, _tmp45_);
	_tmp46_ = slot_new (18, 6, 1);
	self->slots = g_list_append (self->slots, _tmp46_);
	_tmp47_ = slot_new (8, 4, 1);
	self->slots = g_list_append (self->slots, _tmp47_);
	_tmp48_ = slot_new (10, 4, 1);
	self->slots = g_list_append (self->slots, _tmp48_);
	_tmp49_ = slot_new (12, 4, 1);
	self->slots = g_list_append (self->slots, _tmp49_);
	_tmp50_ = slot_new (14, 4, 1);
	self->slots = g_list_append (self->slots, _tmp50_);
	_tmp51_ = slot_new (16, 4, 1);
	self->slots = g_list_append (self->slots, _tmp51_);
	_tmp52_ = slot_new (18, 4, 1);
	self->slots = g_list_append (self->slots, _tmp52_);
	_tmp53_ = slot_new (8, 2, 1);
	self->slots = g_list_append (self->slots, _tmp53_);
	_tmp54_ = slot_new (10, 2, 1);
	self->slots = g_list_append (self->slots, _tmp54_);
	_tmp55_ = slot_new (12, 2, 1);
	self->slots = g_list_append (self->slots, _tmp55_);
	_tmp56_ = slot_new (14, 2, 1);
	self->slots = g_list_append (self->slots, _tmp56_);
	_tmp57_ = slot_new (16, 2, 1);
	self->slots = g_list_append (self->slots, _tmp57_);
	_tmp58_ = slot_new (18, 2, 1);
	self->slots = g_list_append (self->slots, _tmp58_);
	_tmp59_ = slot_new (2, 14, 0);
	self->slots = g_list_append (self->slots, _tmp59_);
	_tmp60_ = slot_new (4, 14, 0);
	self->slots = g_list_append (self->slots, _tmp60_);
	_tmp61_ = slot_new (6, 14, 0);
	self->slots = g_list_append (self->slots, _tmp61_);
	_tmp62_ = slot_new (8, 14, 0);
	self->slots = g_list_append (self->slots, _tmp62_);
	_tmp63_ = slot_new (10, 14, 0);
	self->slots = g_list_append (self->slots, _tmp63_);
	_tmp64_ = slot_new (12, 14, 0);
	self->slots = g_list_append (self->slots, _tmp64_);
	_tmp65_ = slot_new (14, 14, 0);
	self->slots = g_list_append (self->slots, _tmp65_);
	_tmp66_ = slot_new (16, 14, 0);
	self->slots = g_list_append (self->slots, _tmp66_);
	_tmp67_ = slot_new (18, 14, 0);
	self->slots = g_list_append (self->slots, _tmp67_);
	_tmp68_ = slot_new (20, 14, 0);
	self->slots = g_list_append (self->slots, _tmp68_);
	_tmp69_ = slot_new (22, 14, 0);
	self->slots = g_list_append (self->slots, _tmp69_);
	_tmp70_ = slot_new (24, 14, 0);
	self->slots = g_list_append (self->slots, _tmp70_);
	_tmp71_ = slot_new (6, 12, 0);
	self->slots = g_list_append (self->slots, _tmp71_);
	_tmp72_ = slot_new (8, 12, 0);
	self->slots = g_list_append (self->slots, _tmp72_);
	_tmp73_ = slot_new (10, 12, 0);
	self->slots = g_list_append (self->slots, _tmp73_);
	_tmp74_ = slot_new (12, 12, 0);
	self->slots = g_list_append (self->slots, _tmp74_);
	_tmp75_ = slot_new (14, 12, 0);
	self->slots = g_list_append (self->slots, _tmp75_);
	_tmp76_ = slot_new (16, 12, 0);
	self->slots = g_list_append (self->slots, _tmp76_);
	_tmp77_ = slot_new (18, 12, 0);
	self->slots = g_list_append (self->slots, _tmp77_);
	_tmp78_ = slot_new (20, 12, 0);
	self->slots = g_list_append (self->slots, _tmp78_);
	_tmp79_ = slot_new (4, 10, 0);
	self->slots = g_list_append (self->slots, _tmp79_);
	_tmp80_ = slot_new (6, 10, 0);
	self->slots = g_list_append (self->slots, _tmp80_);
	_tmp81_ = slot_new (8, 10, 0);
	self->slots = g_list_append (self->slots, _tmp81_);
	_tmp82_ = slot_new (10, 10, 0);
	self->slots = g_list_append (self->slots, _tmp82_);
	_tmp83_ = slot_new (12, 10, 0);
	self->slots = g_list_append (self->slots, _tmp83_);
	_tmp84_ = slot_new (14, 10, 0);
	self->slots = g_list_append (self->slots, _tmp84_);
	_tmp85_ = slot_new (16, 10, 0);
	self->slots = g_list_append (self->slots, _tmp85_);
	_tmp86_ = slot_new (18, 10, 0);
	self->slots = g_list_append (self->slots, _tmp86_);
	_tmp87_ = slot_new (20, 10, 0);
	self->slots = g_list_append (self->slots, _tmp87_);
	_tmp88_ = slot_new (22, 10, 0);
	self->slots = g_list_append (self->slots, _tmp88_);
	_tmp89_ = slot_new (0, 7, 0);
	self->slots = g_list_append (self->slots, _tmp89_);
	_tmp90_ = slot_new (2, 8, 0);
	self->slots = g_list_append (self->slots, _tmp90_);
	_tmp91_ = slot_new (4, 8, 0);
	self->slots = g_list_append (self->slots, _tmp91_);
	_tmp92_ = slot_new (6, 8, 0);
	self->slots = g_list_append (self->slots, _tmp92_);
	_tmp93_ = slot_new (8, 8, 0);
	self->slots = g_list_append (self->slots, _tmp93_);
	_tmp94_ = slot_new (10, 8, 0);
	self->slots = g_list_append (self->slots, _tmp94_);
	_tmp95_ = slot_new (12, 8, 0);
	self->slots = g_list_append (self->slots, _tmp95_);
	_tmp96_ = slot_new (14, 8, 0);
	self->slots = g_list_append (self->slots, _tmp96_);
	_tmp97_ = slot_new (16, 8, 0);
	self->slots = g_list_append (self->slots, _tmp97_);
	_tmp98_ = slot_new (18, 8, 0);
	self->slots = g_list_append (self->slots, _tmp98_);
	_tmp99_ = slot_new (20, 8, 0);
	self->slots = g_list_append (self->slots, _tmp99_);
	_tmp100_ = slot_new (22, 8, 0);
	self->slots = g_list_append (self->slots, _tmp100_);
	_tmp101_ = slot_new (24, 8, 0);
	self->slots = g_list_append (self->slots, _tmp101_);
	_tmp102_ = slot_new (2, 6, 0);
	self->slots = g_list_append (self->slots, _tmp102_);
	_tmp103_ = slot_new (4, 6, 0);
	self->slots = g_list_append (self->slots, _tmp103_);
	_tmp104_ = slot_new (6, 6, 0);
	self->slots = g_list_append (self->slots, _tmp104_);
	_tmp105_ = slot_new (8, 6, 0);
	self->slots = g_list_append (self->slots, _tmp105_);
	_tmp106_ = slot_new (10, 6, 0);
	self->slots = g_list_append (self->slots, _tmp106_);
	_tmp107_ = slot_new (12, 6, 0);
	self->slots = g_list_append (self->slots, _tmp107_);
	_tmp108_ = slot_new (14, 6, 0);
	self->slots = g_list_append (self->slots, _tmp108_);
	_tmp109_ = slot_new (16, 6, 0);
	self->slots = g_list_append (self->slots, _tmp109_);
	_tmp110_ = slot_new (18, 6, 0);
	self->slots = g_list_append (self->slots, _tmp110_);
	_tmp111_ = slot_new (20, 6, 0);
	self->slots = g_list_append (self->slots, _tmp111_);
	_tmp112_ = slot_new (22, 6, 0);
	self->slots = g_list_append (self->slots, _tmp112_);
	_tmp113_ = slot_new (24, 6, 0);
	self->slots = g_list_append (self->slots, _tmp113_);
	_tmp114_ = slot_new (4, 4, 0);
	self->slots = g_list_append (self->slots, _tmp114_);
	_tmp115_ = slot_new (6, 4, 0);
	self->slots = g_list_append (self->slots, _tmp115_);
	_tmp116_ = slot_new (8, 4, 0);
	self->slots = g_list_append (self->slots, _tmp116_);
	_tmp117_ = slot_new (10, 4, 0);
	self->slots = g_list_append (self->slots, _tmp117_);
	_tmp118_ = slot_new (12, 4, 0);
	self->slots = g_list_append (self->slots, _tmp118_);
	_tmp119_ = slot_new (14, 4, 0);
	self->slots = g_list_append (self->slots, _tmp119_);
	_tmp120_ = slot_new (16, 4, 0);
	self->slots = g_list_append (self->slots, _tmp120_);
	_tmp121_ = slot_new (18, 4, 0);
	self->slots = g_list_append (self->slots, _tmp121_);
	_tmp122_ = slot_new (20, 4, 0);
	self->slots = g_list_append (self->slots, _tmp122_);
	_tmp123_ = slot_new (22, 4, 0);
	self->slots = g_list_append (self->slots, _tmp123_);
	_tmp124_ = slot_new (6, 2, 0);
	self->slots = g_list_append (self->slots, _tmp124_);
	_tmp125_ = slot_new (8, 2, 0);
	self->slots = g_list_append (self->slots, _tmp125_);
	_tmp126_ = slot_new (10, 2, 0);
	self->slots = g_list_append (self->slots, _tmp126_);
	_tmp127_ = slot_new (12, 2, 0);
	self->slots = g_list_append (self->slots, _tmp127_);
	_tmp128_ = slot_new (14, 2, 0);
	self->slots = g_list_append (self->slots, _tmp128_);
	_tmp129_ = slot_new (16, 2, 0);
	self->slots = g_list_append (self->slots, _tmp129_);
	_tmp130_ = slot_new (18, 2, 0);
	self->slots = g_list_append (self->slots, _tmp130_);
	_tmp131_ = slot_new (20, 2, 0);
	self->slots = g_list_append (self->slots, _tmp131_);
	_tmp132_ = slot_new (2, 0, 0);
	self->slots = g_list_append (self->slots, _tmp132_);
	_tmp133_ = slot_new (4, 0, 0);
	self->slots = g_list_append (self->slots, _tmp133_);
	_tmp134_ = slot_new (6, 0, 0);
	self->slots = g_list_append (self->slots, _tmp134_);
	_tmp135_ = slot_new (8, 0, 0);
	self->slots = g_list_append (self->slots, _tmp135_);
	_tmp136_ = slot_new (10, 0, 0);
	self->slots = g_list_append (self->slots, _tmp136_);
	_tmp137_ = slot_new (12, 0, 0);
	self->slots = g_list_append (self->slots, _tmp137_);
	_tmp138_ = slot_new (14, 0, 0);
	self->slots = g_list_append (self->slots, _tmp138_);
	_tmp139_ = slot_new (16, 0, 0);
	self->slots = g_list_append (self->slots, _tmp139_);
	_tmp140_ = slot_new (18, 0, 0);
	self->slots = g_list_append (self->slots, _tmp140_);
	_tmp141_ = slot_new (20, 0, 0);
	self->slots = g_list_append (self->slots, _tmp141_);
	_tmp142_ = slot_new (22, 0, 0);
	self->slots = g_list_append (self->slots, _tmp142_);
	_tmp143_ = slot_new (24, 0, 0);
	self->slots = g_list_append (self->slots, _tmp143_);
	_tmp144_ = slot_new (26, 7, 0);
	self->slots = g_list_append (self->slots, _tmp144_);
	_tmp145_ = slot_new (28, 7, 0);
	self->slots = g_list_append (self->slots, _tmp145_);
	return self;
}


Map* map_new_builtin (void) {
	return map_construct_builtin (TYPE_MAP);
}


Map* map_construct (GType object_type) {
	Map * self = NULL;
	self = (Map*) g_object_new (object_type, NULL);
	return self;
}


Map* map_new (void) {
	return map_construct (TYPE_MAP);
}


static gpointer _g_object_ref0 (gpointer self) {
	return self ? g_object_ref (self) : NULL;
}


guint map_get_width (Map* self) {
	guint result;
	gint w = 0;
	GList* _tmp0_ = NULL;
	gint _tmp7_ = 0;
	g_return_val_if_fail (self != NULL, 0U);
	w = 0;
	_tmp0_ = self->slots;
	{
		GList* slot_collection = NULL;
		GList* slot_it = NULL;
		slot_collection = _tmp0_;
		for (slot_it = slot_collection; slot_it != NULL; slot_it = slot_it->next) {
			Slot* _tmp1_ = NULL;
			Slot* slot = NULL;
			_tmp1_ = _g_object_ref0 ((Slot*) slot_it->data);
			slot = _tmp1_;
			{
				Slot* _tmp2_ = NULL;
				gint _tmp3_ = 0;
				gint _tmp4_ = 0;
				_tmp2_ = slot;
				_tmp3_ = _tmp2_->x;
				_tmp4_ = w;
				if (_tmp3_ > _tmp4_) {
					Slot* _tmp5_ = NULL;
					gint _tmp6_ = 0;
					_tmp5_ = slot;
					_tmp6_ = _tmp5_->x;
					w = _tmp6_;
				}
				_g_object_unref0 (slot);
			}
		}
	}
	_tmp7_ = w;
	result = (guint) (_tmp7_ + 2);
	return result;
}


guint map_get_height (Map* self) {
	guint result;
	gint h = 0;
	GList* _tmp0_ = NULL;
	gint _tmp7_ = 0;
	g_return_val_if_fail (self != NULL, 0U);
	h = 0;
	_tmp0_ = self->slots;
	{
		GList* slot_collection = NULL;
		GList* slot_it = NULL;
		slot_collection = _tmp0_;
		for (slot_it = slot_collection; slot_it != NULL; slot_it = slot_it->next) {
			Slot* _tmp1_ = NULL;
			Slot* slot = NULL;
			_tmp1_ = _g_object_ref0 ((Slot*) slot_it->data);
			slot = _tmp1_;
			{
				Slot* _tmp2_ = NULL;
				gint _tmp3_ = 0;
				gint _tmp4_ = 0;
				_tmp2_ = slot;
				_tmp3_ = _tmp2_->y;
				_tmp4_ = h;
				if (_tmp3_ > _tmp4_) {
					Slot* _tmp5_ = NULL;
					gint _tmp6_ = 0;
					_tmp5_ = slot;
					_tmp6_ = _tmp5_->y;
					h = _tmp6_;
				}
				_g_object_unref0 (slot);
			}
		}
	}
	_tmp7_ = h;
	result = (guint) (_tmp7_ + 2);
	return result;
}


static void map_class_init (MapClass * klass) {
	map_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->get_property = _vala_map_get_property;
	G_OBJECT_CLASS (klass)->finalize = map_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), MAP_WIDTH, g_param_spec_uint ("width", "width", "width", 0, G_MAXUINT, 0U, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), MAP_HEIGHT, g_param_spec_uint ("height", "height", "height", 0, G_MAXUINT, 0U, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
}


static void map_instance_init (Map * self) {
	self->name = NULL;
	self->score_name = NULL;
	self->slots = NULL;
}


static void map_finalize (GObject* obj) {
	Map * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_MAP, Map);
	_g_free0 (self->name);
	_g_free0 (self->score_name);
	__g_list_free__g_object_unref0_0 (self->slots);
	G_OBJECT_CLASS (map_parent_class)->finalize (obj);
}


GType map_get_type (void) {
	static volatile gsize map_type_id__volatile = 0;
	if (g_once_init_enter (&map_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (MapClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) map_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Map), 0, (GInstanceInitFunc) map_instance_init, NULL };
		GType map_type_id;
		map_type_id = g_type_register_static (G_TYPE_OBJECT, "Map", &g_define_type_info, 0);
		g_once_init_leave (&map_type_id__volatile, map_type_id);
	}
	return map_type_id__volatile;
}


static void _vala_map_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	Map * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_MAP, Map);
	switch (property_id) {
		case MAP_WIDTH:
		g_value_set_uint (value, map_get_width (self));
		break;
		case MAP_HEIGHT:
		g_value_set_uint (value, map_get_height (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _map_loader_start_element_cb_gmarkup_parser_start_element_func (GMarkupParseContext* context, const gchar* element_name, gchar** attribute_names, gchar** attribute_values, gpointer self, GError** error) {
	map_loader_start_element_cb ((MapLoader*) self, context, element_name, attribute_names, _vala_array_length (attribute_names), attribute_values, _vala_array_length (attribute_values), error);
}


static void _map_loader_end_element_cb_gmarkup_parser_end_element_func (GMarkupParseContext* context, const gchar* element_name, gpointer self, GError** error) {
	map_loader_end_element_cb ((MapLoader*) self, context, element_name, error);
}


void map_loader_load (MapLoader* self, const gchar* filename, GError** error) {
	gchar* data = NULL;
	gsize length = 0UL;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gsize _tmp2_ = 0UL;
	GMarkupParser parser = {0};
	GMarkupParseContext* parse_context = NULL;
	GMarkupParser _tmp3_ = {0};
	GMarkupParseContext* _tmp4_ = NULL;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (filename != NULL);
	_tmp0_ = filename;
	g_file_get_contents (_tmp0_, &_tmp1_, &_tmp2_, &_inner_error_);
	_g_free0 (data);
	data = _tmp1_;
	length = _tmp2_;
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_propagate_error (error, _inner_error_);
		_g_free0 (data);
		return;
	}
	memset (&parser, 0, sizeof (GMarkupParser));
	parser.start_element = _map_loader_start_element_cb_gmarkup_parser_start_element_func;
	parser.end_element = _map_loader_end_element_cb_gmarkup_parser_end_element_func;
	parser.text = NULL;
	parser.passthrough = NULL;
	parser.error = NULL;
	_tmp3_ = parser;
	_tmp4_ = g_markup_parse_context_new (&_tmp3_, 0, self, NULL);
	parse_context = _tmp4_;
	{
		GMarkupParseContext* _tmp5_ = NULL;
		_tmp5_ = parse_context;
		g_markup_parse_context_parse (_tmp5_, data, (gssize) length, &_inner_error_);
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			if (_inner_error_->domain == G_MARKUP_ERROR) {
				goto __catch10_g_markup_error;
			}
			_g_markup_parse_context_free0 (parse_context);
			_g_free0 (data);
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
	}
	goto __finally10;
	__catch10_g_markup_error:
	{
		GError* e = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		_g_error_free0 (e);
	}
	__finally10:
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_propagate_error (error, _inner_error_);
		_g_markup_parse_context_free0 (parse_context);
		_g_free0 (data);
		return;
	}
	_g_markup_parse_context_free0 (parse_context);
	_g_free0 (data);
}


static gchar* map_loader_get_attribute (MapLoader* self, gchar** attribute_names, int attribute_names_length1, gchar** attribute_values, int attribute_values_length1, const gchar* name, const gchar* _default_) {
	gchar* result = NULL;
	const gchar* _tmp16_ = NULL;
	gchar* _tmp17_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (name != NULL, NULL);
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				gchar** _tmp2_ = NULL;
				gint _tmp2__length1 = 0;
				gint _tmp3_ = 0;
				const gchar* _tmp4_ = NULL;
				gchar** _tmp5_ = NULL;
				gint _tmp5__length1 = 0;
				gint _tmp6_ = 0;
				const gchar* _tmp7_ = NULL;
				gchar* _tmp8_ = NULL;
				gchar* _tmp9_ = NULL;
				const gchar* _tmp10_ = NULL;
				gboolean _tmp11_ = FALSE;
				if (!_tmp0_) {
					gint _tmp1_ = 0;
					_tmp1_ = i;
					i = _tmp1_ + 1;
				}
				_tmp0_ = FALSE;
				_tmp2_ = attribute_names;
				_tmp2__length1 = attribute_names_length1;
				_tmp3_ = i;
				_tmp4_ = _tmp2_[_tmp3_];
				if (!(_tmp4_ != NULL)) {
					break;
				}
				_tmp5_ = attribute_names;
				_tmp5__length1 = attribute_names_length1;
				_tmp6_ = i;
				_tmp7_ = _tmp5_[_tmp6_];
				_tmp8_ = g_utf8_strdown (_tmp7_, (gssize) (-1));
				_tmp9_ = _tmp8_;
				_tmp10_ = name;
				_tmp11_ = g_strcmp0 (_tmp9_, _tmp10_) == 0;
				_g_free0 (_tmp9_);
				if (_tmp11_) {
					gchar** _tmp12_ = NULL;
					gint _tmp12__length1 = 0;
					gint _tmp13_ = 0;
					const gchar* _tmp14_ = NULL;
					gchar* _tmp15_ = NULL;
					_tmp12_ = attribute_values;
					_tmp12__length1 = attribute_values_length1;
					_tmp13_ = i;
					_tmp14_ = _tmp12_[_tmp13_];
					_tmp15_ = g_strdup (_tmp14_);
					result = _tmp15_;
					return result;
				}
			}
		}
	}
	_tmp16_ = _default_;
	_tmp17_ = g_strdup (_tmp16_);
	result = _tmp17_;
	return result;
}


static gdouble double_parse (const gchar* str) {
	gdouble result = 0.0;
	const gchar* _tmp0_ = NULL;
	gdouble _tmp1_ = 0.0;
	g_return_val_if_fail (str != NULL, 0.0);
	_tmp0_ = str;
	_tmp1_ = g_ascii_strtod (_tmp0_, NULL);
	result = _tmp1_;
	return result;
}


static gdouble map_loader_get_attribute_d (MapLoader* self, gchar** attribute_names, int attribute_names_length1, gchar** attribute_values, int attribute_values_length1, const gchar* name, gdouble _default_) {
	gdouble result = 0.0;
	gchar* a = NULL;
	gchar** _tmp0_ = NULL;
	gint _tmp0__length1 = 0;
	gchar** _tmp1_ = NULL;
	gint _tmp1__length1 = 0;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	g_return_val_if_fail (self != NULL, 0.0);
	g_return_val_if_fail (name != NULL, 0.0);
	_tmp0_ = attribute_names;
	_tmp0__length1 = attribute_names_length1;
	_tmp1_ = attribute_values;
	_tmp1__length1 = attribute_values_length1;
	_tmp2_ = name;
	_tmp3_ = map_loader_get_attribute (self, _tmp0_, _tmp0__length1, _tmp1_, _tmp1__length1, _tmp2_, NULL);
	a = _tmp3_;
	_tmp4_ = a;
	if (_tmp4_ == NULL) {
		gdouble _tmp5_ = 0.0;
		_tmp5_ = _default_;
		result = _tmp5_;
		_g_free0 (a);
		return result;
	} else {
		const gchar* _tmp6_ = NULL;
		gdouble _tmp7_ = 0.0;
		_tmp6_ = a;
		_tmp7_ = double_parse (_tmp6_);
		result = _tmp7_;
		_g_free0 (a);
		return result;
	}
	_g_free0 (a);
}


static void map_loader_start_element_cb (MapLoader* self, GMarkupParseContext* context, const gchar* element_name, gchar** attribute_names, int attribute_names_length1, gchar** attribute_values, int attribute_values_length1, GError** error) {
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	GQuark _tmp4_ = 0U;
	static GQuark _tmp3_label0 = 0;
	static GQuark _tmp3_label1 = 0;
	static GQuark _tmp3_label2 = 0;
	static GQuark _tmp3_label3 = 0;
	static GQuark _tmp3_label4 = 0;
	static GQuark _tmp3_label5 = 0;
	static GQuark _tmp3_label6 = 0;
	g_return_if_fail (self != NULL);
	g_return_if_fail (context != NULL);
	g_return_if_fail (element_name != NULL);
	_tmp0_ = element_name;
	_tmp1_ = g_utf8_strdown (_tmp0_, (gssize) (-1));
	_tmp2_ = _tmp1_;
	_tmp4_ = (NULL == _tmp2_) ? 0 : g_quark_from_string (_tmp2_);
	g_free (_tmp2_);
	if (_tmp4_ == ((0 != _tmp3_label0) ? _tmp3_label0 : (_tmp3_label0 = g_quark_from_static_string ("mahjongg")))) {
		switch (0) {
			default:
			{
				break;
			}
		}
	} else if (_tmp4_ == ((0 != _tmp3_label1) ? _tmp3_label1 : (_tmp3_label1 = g_quark_from_static_string ("map")))) {
		switch (0) {
			default:
			{
				Map* _tmp5_ = NULL;
				Map* _tmp6_ = NULL;
				gchar** _tmp7_ = NULL;
				gint _tmp7__length1 = 0;
				gchar** _tmp8_ = NULL;
				gint _tmp8__length1 = 0;
				gchar* _tmp9_ = NULL;
				Map* _tmp10_ = NULL;
				gchar** _tmp11_ = NULL;
				gint _tmp11__length1 = 0;
				gchar** _tmp12_ = NULL;
				gint _tmp12__length1 = 0;
				gchar* _tmp13_ = NULL;
				_tmp5_ = map_new ();
				_g_object_unref0 (self->priv->map);
				self->priv->map = _tmp5_;
				_tmp6_ = self->priv->map;
				_tmp7_ = attribute_names;
				_tmp7__length1 = attribute_names_length1;
				_tmp8_ = attribute_values;
				_tmp8__length1 = attribute_values_length1;
				_tmp9_ = map_loader_get_attribute (self, _tmp7_, _tmp7__length1, _tmp8_, _tmp8__length1, "name", "");
				_g_free0 (_tmp6_->name);
				_tmp6_->name = _tmp9_;
				_tmp10_ = self->priv->map;
				_tmp11_ = attribute_names;
				_tmp11__length1 = attribute_names_length1;
				_tmp12_ = attribute_values;
				_tmp12__length1 = attribute_values_length1;
				_tmp13_ = map_loader_get_attribute (self, _tmp11_, _tmp11__length1, _tmp12_, _tmp12__length1, "scorename", "");
				_g_free0 (_tmp10_->score_name);
				_tmp10_->score_name = _tmp13_;
				break;
			}
		}
	} else if (_tmp4_ == ((0 != _tmp3_label2) ? _tmp3_label2 : (_tmp3_label2 = g_quark_from_static_string ("layer")))) {
		switch (0) {
			default:
			{
				gchar** _tmp14_ = NULL;
				gint _tmp14__length1 = 0;
				gchar** _tmp15_ = NULL;
				gint _tmp15__length1 = 0;
				gdouble _tmp16_ = 0.0;
				_tmp14_ = attribute_names;
				_tmp14__length1 = attribute_names_length1;
				_tmp15_ = attribute_values;
				_tmp15__length1 = attribute_values_length1;
				_tmp16_ = map_loader_get_attribute_d (self, _tmp14_, _tmp14__length1, _tmp15_, _tmp15__length1, "z", 0.0);
				self->priv->layer_z = (gint) _tmp16_;
				break;
			}
		}
	} else if (_tmp4_ == ((0 != _tmp3_label3) ? _tmp3_label3 : (_tmp3_label3 = g_quark_from_static_string ("row")))) {
		switch (0) {
			default:
			{
				gint x1 = 0;
				gchar** _tmp17_ = NULL;
				gint _tmp17__length1 = 0;
				gchar** _tmp18_ = NULL;
				gint _tmp18__length1 = 0;
				gdouble _tmp19_ = 0.0;
				gint x2 = 0;
				gchar** _tmp20_ = NULL;
				gint _tmp20__length1 = 0;
				gchar** _tmp21_ = NULL;
				gint _tmp21__length1 = 0;
				gdouble _tmp22_ = 0.0;
				gint y = 0;
				gchar** _tmp23_ = NULL;
				gint _tmp23__length1 = 0;
				gchar** _tmp24_ = NULL;
				gint _tmp24__length1 = 0;
				gdouble _tmp25_ = 0.0;
				gint z = 0;
				gchar** _tmp26_ = NULL;
				gint _tmp26__length1 = 0;
				gchar** _tmp27_ = NULL;
				gint _tmp27__length1 = 0;
				gint _tmp28_ = 0;
				gdouble _tmp29_ = 0.0;
				_tmp17_ = attribute_names;
				_tmp17__length1 = attribute_names_length1;
				_tmp18_ = attribute_values;
				_tmp18__length1 = attribute_values_length1;
				_tmp19_ = map_loader_get_attribute_d (self, _tmp17_, _tmp17__length1, _tmp18_, _tmp18__length1, "left", 0.0);
				x1 = (gint) (_tmp19_ * 2);
				_tmp20_ = attribute_names;
				_tmp20__length1 = attribute_names_length1;
				_tmp21_ = attribute_values;
				_tmp21__length1 = attribute_values_length1;
				_tmp22_ = map_loader_get_attribute_d (self, _tmp20_, _tmp20__length1, _tmp21_, _tmp21__length1, "right", 0.0);
				x2 = (gint) (_tmp22_ * 2);
				_tmp23_ = attribute_names;
				_tmp23__length1 = attribute_names_length1;
				_tmp24_ = attribute_values;
				_tmp24__length1 = attribute_values_length1;
				_tmp25_ = map_loader_get_attribute_d (self, _tmp23_, _tmp23__length1, _tmp24_, _tmp24__length1, "y", 0.0);
				y = (gint) (_tmp25_ * 2);
				_tmp26_ = attribute_names;
				_tmp26__length1 = attribute_names_length1;
				_tmp27_ = attribute_values;
				_tmp27__length1 = attribute_values_length1;
				_tmp28_ = self->priv->layer_z;
				_tmp29_ = map_loader_get_attribute_d (self, _tmp26_, _tmp26__length1, _tmp27_, _tmp27__length1, "z", (gdouble) _tmp28_);
				z = (gint) _tmp29_;
				{
					gboolean _tmp30_ = FALSE;
					_tmp30_ = TRUE;
					while (TRUE) {
						gint _tmp32_ = 0;
						gint _tmp33_ = 0;
						Map* _tmp34_ = NULL;
						gint _tmp35_ = 0;
						gint _tmp36_ = 0;
						gint _tmp37_ = 0;
						Slot* _tmp38_ = NULL;
						if (!_tmp30_) {
							gint _tmp31_ = 0;
							_tmp31_ = x1;
							x1 = _tmp31_ + 2;
						}
						_tmp30_ = FALSE;
						_tmp32_ = x1;
						_tmp33_ = x2;
						if (!(_tmp32_ <= _tmp33_)) {
							break;
						}
						_tmp34_ = self->priv->map;
						_tmp35_ = x1;
						_tmp36_ = y;
						_tmp37_ = z;
						_tmp38_ = slot_new (_tmp35_, _tmp36_, _tmp37_);
						_tmp34_->slots = g_list_append (_tmp34_->slots, _tmp38_);
					}
				}
				break;
			}
		}
	} else if (_tmp4_ == ((0 != _tmp3_label4) ? _tmp3_label4 : (_tmp3_label4 = g_quark_from_static_string ("column")))) {
		switch (0) {
			default:
			{
				gint x = 0;
				gchar** _tmp39_ = NULL;
				gint _tmp39__length1 = 0;
				gchar** _tmp40_ = NULL;
				gint _tmp40__length1 = 0;
				gdouble _tmp41_ = 0.0;
				gint y1 = 0;
				gchar** _tmp42_ = NULL;
				gint _tmp42__length1 = 0;
				gchar** _tmp43_ = NULL;
				gint _tmp43__length1 = 0;
				gdouble _tmp44_ = 0.0;
				gint y2 = 0;
				gchar** _tmp45_ = NULL;
				gint _tmp45__length1 = 0;
				gchar** _tmp46_ = NULL;
				gint _tmp46__length1 = 0;
				gdouble _tmp47_ = 0.0;
				gint z = 0;
				gchar** _tmp48_ = NULL;
				gint _tmp48__length1 = 0;
				gchar** _tmp49_ = NULL;
				gint _tmp49__length1 = 0;
				gint _tmp50_ = 0;
				gdouble _tmp51_ = 0.0;
				_tmp39_ = attribute_names;
				_tmp39__length1 = attribute_names_length1;
				_tmp40_ = attribute_values;
				_tmp40__length1 = attribute_values_length1;
				_tmp41_ = map_loader_get_attribute_d (self, _tmp39_, _tmp39__length1, _tmp40_, _tmp40__length1, "x", 0.0);
				x = (gint) (_tmp41_ * 2);
				_tmp42_ = attribute_names;
				_tmp42__length1 = attribute_names_length1;
				_tmp43_ = attribute_values;
				_tmp43__length1 = attribute_values_length1;
				_tmp44_ = map_loader_get_attribute_d (self, _tmp42_, _tmp42__length1, _tmp43_, _tmp43__length1, "top", 0.0);
				y1 = (gint) (_tmp44_ * 2);
				_tmp45_ = attribute_names;
				_tmp45__length1 = attribute_names_length1;
				_tmp46_ = attribute_values;
				_tmp46__length1 = attribute_values_length1;
				_tmp47_ = map_loader_get_attribute_d (self, _tmp45_, _tmp45__length1, _tmp46_, _tmp46__length1, "bottom", 0.0);
				y2 = (gint) (_tmp47_ * 2);
				_tmp48_ = attribute_names;
				_tmp48__length1 = attribute_names_length1;
				_tmp49_ = attribute_values;
				_tmp49__length1 = attribute_values_length1;
				_tmp50_ = self->priv->layer_z;
				_tmp51_ = map_loader_get_attribute_d (self, _tmp48_, _tmp48__length1, _tmp49_, _tmp49__length1, "z", (gdouble) _tmp50_);
				z = (gint) _tmp51_;
				{
					gboolean _tmp52_ = FALSE;
					_tmp52_ = TRUE;
					while (TRUE) {
						gint _tmp54_ = 0;
						gint _tmp55_ = 0;
						Map* _tmp56_ = NULL;
						gint _tmp57_ = 0;
						gint _tmp58_ = 0;
						gint _tmp59_ = 0;
						Slot* _tmp60_ = NULL;
						if (!_tmp52_) {
							gint _tmp53_ = 0;
							_tmp53_ = y1;
							y1 = _tmp53_ + 2;
						}
						_tmp52_ = FALSE;
						_tmp54_ = y1;
						_tmp55_ = y2;
						if (!(_tmp54_ <= _tmp55_)) {
							break;
						}
						_tmp56_ = self->priv->map;
						_tmp57_ = x;
						_tmp58_ = y1;
						_tmp59_ = z;
						_tmp60_ = slot_new (_tmp57_, _tmp58_, _tmp59_);
						_tmp56_->slots = g_list_append (_tmp56_->slots, _tmp60_);
					}
				}
				break;
			}
		}
	} else if (_tmp4_ == ((0 != _tmp3_label5) ? _tmp3_label5 : (_tmp3_label5 = g_quark_from_static_string ("block")))) {
		switch (0) {
			default:
			{
				gint x1 = 0;
				gchar** _tmp61_ = NULL;
				gint _tmp61__length1 = 0;
				gchar** _tmp62_ = NULL;
				gint _tmp62__length1 = 0;
				gdouble _tmp63_ = 0.0;
				gint x2 = 0;
				gchar** _tmp64_ = NULL;
				gint _tmp64__length1 = 0;
				gchar** _tmp65_ = NULL;
				gint _tmp65__length1 = 0;
				gdouble _tmp66_ = 0.0;
				gint y1 = 0;
				gchar** _tmp67_ = NULL;
				gint _tmp67__length1 = 0;
				gchar** _tmp68_ = NULL;
				gint _tmp68__length1 = 0;
				gdouble _tmp69_ = 0.0;
				gint y2 = 0;
				gchar** _tmp70_ = NULL;
				gint _tmp70__length1 = 0;
				gchar** _tmp71_ = NULL;
				gint _tmp71__length1 = 0;
				gdouble _tmp72_ = 0.0;
				gint z = 0;
				gchar** _tmp73_ = NULL;
				gint _tmp73__length1 = 0;
				gchar** _tmp74_ = NULL;
				gint _tmp74__length1 = 0;
				gint _tmp75_ = 0;
				gdouble _tmp76_ = 0.0;
				_tmp61_ = attribute_names;
				_tmp61__length1 = attribute_names_length1;
				_tmp62_ = attribute_values;
				_tmp62__length1 = attribute_values_length1;
				_tmp63_ = map_loader_get_attribute_d (self, _tmp61_, _tmp61__length1, _tmp62_, _tmp62__length1, "left", 0.0);
				x1 = (gint) (_tmp63_ * 2);
				_tmp64_ = attribute_names;
				_tmp64__length1 = attribute_names_length1;
				_tmp65_ = attribute_values;
				_tmp65__length1 = attribute_values_length1;
				_tmp66_ = map_loader_get_attribute_d (self, _tmp64_, _tmp64__length1, _tmp65_, _tmp65__length1, "right", 0.0);
				x2 = (gint) (_tmp66_ * 2);
				_tmp67_ = attribute_names;
				_tmp67__length1 = attribute_names_length1;
				_tmp68_ = attribute_values;
				_tmp68__length1 = attribute_values_length1;
				_tmp69_ = map_loader_get_attribute_d (self, _tmp67_, _tmp67__length1, _tmp68_, _tmp68__length1, "top", 0.0);
				y1 = (gint) (_tmp69_ * 2);
				_tmp70_ = attribute_names;
				_tmp70__length1 = attribute_names_length1;
				_tmp71_ = attribute_values;
				_tmp71__length1 = attribute_values_length1;
				_tmp72_ = map_loader_get_attribute_d (self, _tmp70_, _tmp70__length1, _tmp71_, _tmp71__length1, "bottom", 0.0);
				y2 = (gint) (_tmp72_ * 2);
				_tmp73_ = attribute_names;
				_tmp73__length1 = attribute_names_length1;
				_tmp74_ = attribute_values;
				_tmp74__length1 = attribute_values_length1;
				_tmp75_ = self->priv->layer_z;
				_tmp76_ = map_loader_get_attribute_d (self, _tmp73_, _tmp73__length1, _tmp74_, _tmp74__length1, "z", (gdouble) _tmp75_);
				z = (gint) _tmp76_;
				{
					gboolean _tmp77_ = FALSE;
					_tmp77_ = TRUE;
					while (TRUE) {
						gint _tmp79_ = 0;
						gint _tmp80_ = 0;
						if (!_tmp77_) {
							gint _tmp78_ = 0;
							_tmp78_ = x1;
							x1 = _tmp78_ + 2;
						}
						_tmp77_ = FALSE;
						_tmp79_ = x1;
						_tmp80_ = x2;
						if (!(_tmp79_ <= _tmp80_)) {
							break;
						}
						{
							gint y = 0;
							gint _tmp81_ = 0;
							_tmp81_ = y1;
							y = _tmp81_;
							{
								gboolean _tmp82_ = FALSE;
								_tmp82_ = TRUE;
								while (TRUE) {
									gint _tmp84_ = 0;
									gint _tmp85_ = 0;
									Map* _tmp86_ = NULL;
									gint _tmp87_ = 0;
									gint _tmp88_ = 0;
									gint _tmp89_ = 0;
									Slot* _tmp90_ = NULL;
									if (!_tmp82_) {
										gint _tmp83_ = 0;
										_tmp83_ = y;
										y = _tmp83_ + 2;
									}
									_tmp82_ = FALSE;
									_tmp84_ = y;
									_tmp85_ = y2;
									if (!(_tmp84_ <= _tmp85_)) {
										break;
									}
									_tmp86_ = self->priv->map;
									_tmp87_ = x1;
									_tmp88_ = y;
									_tmp89_ = z;
									_tmp90_ = slot_new (_tmp87_, _tmp88_, _tmp89_);
									_tmp86_->slots = g_list_append (_tmp86_->slots, _tmp90_);
								}
							}
						}
					}
				}
				break;
			}
		}
	} else if (_tmp4_ == ((0 != _tmp3_label6) ? _tmp3_label6 : (_tmp3_label6 = g_quark_from_static_string ("tile")))) {
		switch (0) {
			default:
			{
				gint x = 0;
				gchar** _tmp91_ = NULL;
				gint _tmp91__length1 = 0;
				gchar** _tmp92_ = NULL;
				gint _tmp92__length1 = 0;
				gdouble _tmp93_ = 0.0;
				gint y = 0;
				gchar** _tmp94_ = NULL;
				gint _tmp94__length1 = 0;
				gchar** _tmp95_ = NULL;
				gint _tmp95__length1 = 0;
				gdouble _tmp96_ = 0.0;
				gint z = 0;
				gchar** _tmp97_ = NULL;
				gint _tmp97__length1 = 0;
				gchar** _tmp98_ = NULL;
				gint _tmp98__length1 = 0;
				gint _tmp99_ = 0;
				gdouble _tmp100_ = 0.0;
				Map* _tmp101_ = NULL;
				gint _tmp102_ = 0;
				gint _tmp103_ = 0;
				gint _tmp104_ = 0;
				Slot* _tmp105_ = NULL;
				_tmp91_ = attribute_names;
				_tmp91__length1 = attribute_names_length1;
				_tmp92_ = attribute_values;
				_tmp92__length1 = attribute_values_length1;
				_tmp93_ = map_loader_get_attribute_d (self, _tmp91_, _tmp91__length1, _tmp92_, _tmp92__length1, "x", 0.0);
				x = (gint) (_tmp93_ * 2);
				_tmp94_ = attribute_names;
				_tmp94__length1 = attribute_names_length1;
				_tmp95_ = attribute_values;
				_tmp95__length1 = attribute_values_length1;
				_tmp96_ = map_loader_get_attribute_d (self, _tmp94_, _tmp94__length1, _tmp95_, _tmp95__length1, "y", 0.0);
				y = (gint) (_tmp96_ * 2);
				_tmp97_ = attribute_names;
				_tmp97__length1 = attribute_names_length1;
				_tmp98_ = attribute_values;
				_tmp98__length1 = attribute_values_length1;
				_tmp99_ = self->priv->layer_z;
				_tmp100_ = map_loader_get_attribute_d (self, _tmp97_, _tmp97__length1, _tmp98_, _tmp98__length1, "z", (gdouble) _tmp99_);
				z = (gint) _tmp100_;
				_tmp101_ = self->priv->map;
				_tmp102_ = x;
				_tmp103_ = y;
				_tmp104_ = z;
				_tmp105_ = slot_new (_tmp102_, _tmp103_, _tmp104_);
				_tmp101_->slots = g_list_append (_tmp101_->slots, _tmp105_);
				break;
			}
		}
	}
}


static void map_loader_end_element_cb (MapLoader* self, GMarkupParseContext* context, const gchar* element_name, GError** error) {
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	GQuark _tmp4_ = 0U;
	static GQuark _tmp3_label0 = 0;
	static GQuark _tmp3_label1 = 0;
	g_return_if_fail (self != NULL);
	g_return_if_fail (context != NULL);
	g_return_if_fail (element_name != NULL);
	_tmp0_ = element_name;
	_tmp1_ = g_utf8_strdown (_tmp0_, (gssize) (-1));
	_tmp2_ = _tmp1_;
	_tmp4_ = (NULL == _tmp2_) ? 0 : g_quark_from_string (_tmp2_);
	g_free (_tmp2_);
	if (_tmp4_ == ((0 != _tmp3_label0) ? _tmp3_label0 : (_tmp3_label0 = g_quark_from_static_string ("map")))) {
		switch (0) {
			default:
			{
				guint n_slots = 0U;
				Map* _tmp5_ = NULL;
				GList* _tmp6_ = NULL;
				guint _tmp7_ = 0U;
				gboolean _tmp8_ = FALSE;
				gboolean _tmp9_ = FALSE;
				gboolean _tmp10_ = FALSE;
				Map* _tmp11_ = NULL;
				const gchar* _tmp12_ = NULL;
				_tmp5_ = self->priv->map;
				_tmp6_ = _tmp5_->slots;
				_tmp7_ = g_list_length (_tmp6_);
				n_slots = _tmp7_;
				_tmp11_ = self->priv->map;
				_tmp12_ = _tmp11_->name;
				if (_tmp12_ != NULL) {
					Map* _tmp13_ = NULL;
					const gchar* _tmp14_ = NULL;
					_tmp13_ = self->priv->map;
					_tmp14_ = _tmp13_->score_name;
					_tmp10_ = _tmp14_ != NULL;
				} else {
					_tmp10_ = FALSE;
				}
				if (_tmp10_) {
					guint _tmp15_ = 0U;
					_tmp15_ = n_slots;
					_tmp9_ = _tmp15_ <= ((guint) 144);
				} else {
					_tmp9_ = FALSE;
				}
				if (_tmp9_) {
					guint _tmp16_ = 0U;
					_tmp16_ = n_slots;
					_tmp8_ = (_tmp16_ % 2) == ((guint) 0);
				} else {
					_tmp8_ = FALSE;
				}
				if (_tmp8_) {
					Map* _tmp17_ = NULL;
					Map* _tmp18_ = NULL;
					_tmp17_ = self->priv->map;
					_tmp18_ = _g_object_ref0 (_tmp17_);
					self->maps = g_list_append (self->maps, _tmp18_);
				} else {
					g_warning ("map.vala:359: Invalid map");
				}
				_g_object_unref0 (self->priv->map);
				self->priv->map = NULL;
				break;
			}
		}
	} else if (_tmp4_ == ((0 != _tmp3_label1) ? _tmp3_label1 : (_tmp3_label1 = g_quark_from_static_string ("layer")))) {
		switch (0) {
			default:
			{
				self->priv->layer_z = 0;
				break;
			}
		}
	}
}


MapLoader* map_loader_construct (GType object_type) {
	MapLoader * self = NULL;
	self = (MapLoader*) g_object_new (object_type, NULL);
	return self;
}


MapLoader* map_loader_new (void) {
	return map_loader_construct (TYPE_MAP_LOADER);
}


static void map_loader_class_init (MapLoaderClass * klass) {
	map_loader_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (MapLoaderPrivate));
	G_OBJECT_CLASS (klass)->finalize = map_loader_finalize;
}


static void map_loader_instance_init (MapLoader * self) {
	self->priv = MAP_LOADER_GET_PRIVATE (self);
	self->maps = NULL;
	self->priv->layer_z = 0;
}


static void map_loader_finalize (GObject* obj) {
	MapLoader * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_MAP_LOADER, MapLoader);
	__g_list_free__g_object_unref0_0 (self->maps);
	_g_object_unref0 (self->priv->map);
	G_OBJECT_CLASS (map_loader_parent_class)->finalize (obj);
}


GType map_loader_get_type (void) {
	static volatile gsize map_loader_type_id__volatile = 0;
	if (g_once_init_enter (&map_loader_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (MapLoaderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) map_loader_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MapLoader), 0, (GInstanceInitFunc) map_loader_instance_init, NULL };
		GType map_loader_type_id;
		map_loader_type_id = g_type_register_static (G_TYPE_OBJECT, "MapLoader", &g_define_type_info, 0);
		g_once_init_leave (&map_loader_type_id__volatile, map_loader_type_id);
	}
	return map_loader_type_id__volatile;
}


static gint _vala_array_length (gpointer array) {
	int length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}



