Lua Map Maker v0.5
By Merick
3/15/2007

changes for version 0.5

-- LuMM is now a stand-alone app, using Soulkiller's mod of Cool's mod 3
 
    http://forums.evilmana.com/index.php?topic=526.0
    
quote:
	Image.startBlit()

	Call this function to begin blitting, you MUST do this in order to make fastBlit calls	

	Image:fastBlit( x, y, image [subX, subY, width, height,] alpha)

	This is the function that you call in between Image.startBlit and Image.endBlit, Its pretty much exactly 
	the same thing as a normal Image:blit call and the arguments are for it are the same

	Image.endBlit()

	Call this function to end blitting. Image:fastBlit functions may not be after this unless a new call to Image.startBlit() is made
end quote

  this function increases the speed of blitting images for tile maps, but there is a bug which prevents transparencies so I'm currently only using it for the
  map base layer

-- small change in control layout for menus - all menus now use start button to accept selection

-- my previous method of refrencing tile image was inadequate, any changes to the files in the tile folder
    would completely alter the order in which the images were refrenced. To fix this, I've now made it so that 
    the tile images are refrenced by the image filenames.

-- I've also made the tile loading function more intelligent,  it will now only attempt to load files that acutally are images
   only .jpg and .png are

-- Added a view checking function to the map base layer so that it only blits the tiles that are actually inside the current viewing area

-- added a description of the map table format to this readme 

end of changelog

This is a basic 2d tile map editor for lua games.

Features:

edits map in 3 layers: 
	ground layer  : the basic map area
	object layer  : assigns a number value to the current tile area
			0 is not displayed in the editor. In my demo, I
			used 0 for walkable area and set 1 to indicated
			an impassable barrier
	overlay layer : this layer is for images that the player can walk behind

saves / loads map info to a single data file

Controls:

start menu - d-pad up/down to change selection, start to select

text input for create new project:
	left trigger = numbers
	right trigger = shift
	D-pad up = backspace
	start = accept name
	analog and buttons = select letter

file broswer for loading projects: 
	d-pad up/down to change selection, start to select


map edit mode:
	start = brings up save/quit menu
	d-pad = change current map tile
	square = put tile down
	cross = erase tile
	triangle/circle = cycle through tiles / object numbers
	right trigger = cycle through layers

Format of map table:

map.tileimg = {}		-- tile image data
map.tilename = {}     	-- tile filenames
map.xsize		-- map width in tiles
map.ysize		-- map height in tiles
map.tilesize 		-- size used for map grid, you can set this to be less than the acutal size of the tiles but, 
				for the tiles to line up properly it must be a mutliple of the actual tile sizes
				I.E. if you have tiles that are 64x64 pixels, you could set the tile size number to 64, 32, or 16, etc...
map[x][y]			-- stores map data

	map[x][y].tile 	= base layer - filename for the tile image at map location
	map[x][y].object	= stores number value, in your program you can use this for placing path barrier or switches, etc
	map[x][y].otile	= overlay layer - filename of tile image - use this for images that would be drawn over the player or npc images
	
Credits:

File browser edited from Tactical Penguin's demo
Uses cancan's version of the Danzeff OSK for text input

tablesave functions - author unknown but found at:
      http://lua-users.org/wiki/SaveTableToFile

The sample tiles included are from a set made and released to the public
for free use by Danc at Lost Garden. The full, unaltered set can be found here:

http://lostgarden.com/2006/02/250-free-handdrawn-textures.html

The tower and tree images are from here: http://reinerstileset.4players.de/englisch.htm

Special thanks to everyone at QJ.net, Evilmana, and PSP3d 
who help me figure some of this stuff out.