public void initialize(ArrayList<SpriteBank> banks, 
			ArrayList<String> texturenames)
	{
		// If the map was already initialized, does nothing
		if (this.initialized)
			return;
		
		// Initializes the tiledrawer
		this.tiledrawer = new DrawableHandler(false, false, getDepth(), 
				this.parentdrawer);
		
		// Creates all the tiles
		for (int i = 0; i < this.width * this.height; i++)
		{
			// If the bankindex or nameindex is negative, that means that the 
			// tile should be ignored
			if (this.bankindexes[i] < 0 || this.nameindexes[i] < 0)
				continue;
			
			int x = (int) getX() + (i % this.height) * this.tilewidth + 
					this.tilewidth / 2;
			int y = (int) getY() + (i / this.width) * this.tileheight + 
					this.tileheight / 2;
			
			Tile newtile = new Tile(x, y, this.tiledrawer, this.tileanimator, 
					banks.get(this.bankindexes[i]), 
					texturenames.get(this.nameindexes[i]), 
					this.tilewidth, this.tileheight);
			
			// Rotates and scales the tile
			newtile.setAngle(this.rotations[i]);
			newtile.scale(this.xscales[i], this.yscales[i]);
			
			// Also changes the object's position so that the starting position 
			// becomes the left corner
			if (newtile.getOriginX() != 0 || newtile.getOriginY() != 0)
				newtile.addPosition(-newtile.getOriginX(), -newtile.getOriginY());
		}
	}