Version History

 1.4.22
Placer.lua can now smooth as you draw the map (see quickstart docs)
Area.lua now places a solid rectangle of blocks
Layers increased to 100
Layers can be named (shown in map window titlebar)
The tl,tr,bl,br field labels can now be set
Pro: Fixed drag map and block coords
Fixed too long labels
Fixed wrong block diplayed on onionskin when flag1 is set on block
Onionskin can edit layer when not at front
Pro: Unselected object show text in bordercolour property
Pro: Object user values can be displayed with show user info
mappy.setValue (mappy.MAPFILENAME, "") now updates the titlebar
Lua: mappy.renameLayer (LAYERNUM, "Name") added

 1.4.21
Reverted to lua 5.0.3 due to a possible bug in lua 5.1 (used in mapwin1420):
It appears numbers are rounded to nearest whole number in 5.1 meaning scripts
using writeIntLSB (Export binary file.lua etc) wrote incorrect files
See the tilemap.co.uk forum for more details
If a lua script has an error, this will now be shown (thanks Merick)
Corrected the lua docs for mappy.setValue()
Fixed lua mappy.moveWindow()
You can set the dividers from lua with get/setValue (mappy.MAPDIVIDERS, ONOFF, X, Y, COLOUR)
ONOFF is 0 or 1, COLOUR is an RGB value (if using getValue, these are returned)

 1.4.20
Fixed crash when User info is shown with 3D walls (wnesmode)
Added 3D walls mode to MapTools menu (wnesmode)
Pro: OBJGXOFF and OBJGYOFF now read and set from lua
Pro: Custom mousebuttons now work in Graphics editor (block0=colour0, pick, fill, line)
Pro: Drag map now works in Object editor
Fixed user info display length can now be changed
Compiled with latest mingw, lua (5.1.2) and libpng (1.2.24)
Keys i, k and m can be customised in mapwin.ini (keyi, keyk and keym)
ctrl-x or Edit cut can now display a warning with 'warnctrlx=1' in mapwin.ini

 1.4.19
32bit FMPS now have true alphablend (use onionskin or move graphics from BG to FG field with 'range edit blocks')
Fixed several lua dialogue functions
Overlap maps (where stagger is 0x0, but blockgap is different from blocksize) now work properly (use onionskin on a blank layer for transparent overlap), disable grid for less depth sort artifacts
'Grab Brush from block sequence' works better, size the Block Window so the area is aligned, select the top left block, then select the bottom right block, then select 'Grab Brush from block sequence' in the Brushes menu and accept the defaults.

 1.4.18
Fixed object drag bug
Fixed block properties from 1.4.17 (user 5,6,7 still signed)
Improved Dialogue example slightly
Fixed a mapwin.ini textexportopts comment

 1.4.17
1.4.17 (beta 1 to 5 are now 1.4.12 to 1.4.16)
Any Dialogue through lua (see examples Dialogue Example and Dialogue Proc in luascr)
Undo for all buttons
Fix crash on make map from big picture
Set text export defaults in mapwin.ini
investigate atoi blank field in block properties
any action with mousebuttons (see mapwin.ini)

 1.4.16
Beta 5:
Toggling the Flip V and Flip H flags in block properties redraws the dialogue
BlockProp.lua and ObjectProp.lua are called each time the properties dialogue is drawn, allowing labels to be changed (see examples in luascr folder)
Grid no longer drawn in software zoomout (0.5 and 0.25)
Lua: moveWindow (WINDOW, x, y, width, height) added (WINDOW = MPY_MAINWINDOW, MPY_MAPWINDOW or MPY_BLOCKWINDOW)
Setting text strings is now much easier (from textfile)

 1.4.15
Beta 4:
Zoom 0.25 should work with bigger window sizes
Pro: Added duplicate current object and place with ctrl+click
Lua: Can run a lua script by dragging an area (luascr/Area.lua)
Pro: Fixed brush window so anims are displayed
New Block properties dialogue with settable labels
Pro: New Object properties dialogue with settable labels
Added user definable labels to Block Properties and Object Properties dialogues:
To set user labels, add lines like this to mapwin.ini (16labels, each end with ';')
blockdialoguelabels=User data:;U1;U2;U3;U4;U5;U6;U7;tl;tr;bl;br;bg transp;flag 1;flag 2;flag 3;
objectdialoguelabels=Object data:;U1;U2;U3;U4;U5;U6;U7;F1;F2;F3;F4;F5;F6;F7;F8;
Should also be able to set with lua:
mappy.setValue (mappy.BLOCKLABELS, "User data:;U1;U2;U3;U4;U5;U6;U7;tl;tr;bl;br;bg transp;flag 1;flag 2;flag 3;")
mappy.setValue (mappy.OBJECTLABELS, "Object data:;U1;U2;U3;U4;U5;U6;U7;F1;F2;F3;F4;F5;F6;F7;F8;")

 1.4.14
Beta 3:
Added lua function 'mappy.renameMenuItem (123, "Test rename")' number is a shortcut as in docs.
Lua: Added new get/setValue (MAPONION)
Lua: Added new get/setValue (MAPDARK)
Lua: Can now add 30 lua script in ini file (16 in menu, rest can be set to keys)
Export:Current Layer as big picture now exports 24bit if 8bit map has darken or objects displayed
zoom 0.25 crashes in 1280x1024 softscale
Resize map needs fixing (parts of map lost on some resizes. Topleft=0,0 is fine)
pro: add next/prev on 'graph'
pro: add requested select graphic of current block in 'graph' option
pro: Use DrawScreen for corner map view in 'graph' mode
wrong scroll amount with mousewheel
minor colour problems with output in 8bit 'Export:Current Layer as big picture' (lost background with darkened background, wrong colour dividers)

 1.4.13
Beta 2:
Fixed tbarinfo=5 option (TextStrings in titlebar)
Added support for loading unknown graphics files with MAPEXT.DLL
Pro: Added lua funcs getObjectFilename (index), setObjectFilename (index, string),
getObjectSort (index), setObjectSort (index, objnum).
Added new getValue (NUMFILESTR)
Fix export big BMP (background=crash)
Pro: Added Pick object under mouse with 'p'
Resize dialogue add new topleft coords
Soft scaling instead of StretchBlt (zmstyle=0 in mapwin.ini)
Export:Current Layer as big picture much improved, shows objects, onionskin, dividers etc if enabled, ie how it looks in the editor
Added extra mousebuttons in Custom:Mousebuttons

 1.4.12
Some bugs fixed

 1.4.11
Fixed problem with MSB (from MappyOSX) when saving
Fixed bug displaying labels on non-rectangular maps
Fixed bug with lua function newMap
TextStrings displayed in info bar (new default: tbarinfo=5 in mapwin.ini)
Pro: Added hold ctrl when picking a colour to find it in palette

 1.4.10
TextSrings improved, saving in FMP fixed
TextStrings can be displayed with 'Show user info on tile'
Various minor GUI fixes
Can stop zoom in Block window with panelzoom option in mapwin.ini
Pro: TextStrings for objects, areas and labels
Pro: Can use next/prev keys on brushes and objects
Pro: Can hide panel using panelpro option in mapwin.ini

 1.4.9
Fixed bug from V1.4.7 and V1.4.8 selecting a brush from the brush menu
Pressing 'e' with no map loaded no longer crashes
Non-working Tutorials option removed from Help menu (see main docs instead)
Experimental Text String added to Block Properties, see 'luascr/Set Text Strings'

 1.4.8
Documentation is now updated to current version (1.4.8)
Documentation background colour changed to make it easier to read (shouldn't affect printing)
Fixed 'Solid rectangle.lua' so it can use last row and column
Added 'Find block in map.lua' and 'Set colourkey transparency.lua'
New Key shortcut 'e' edits current block or anim properties
Map/Block window positions are preserved when minimizing
Tested with MemProof, fixed some minor resource problems (like the Anim Preview window not being freed)
'MapTools:Useful functions:Create map from big picture' can now append to an existing map (make a new layer)

 1.4.7
mapwin147.zip is now under 400k
docs (and images) now in the new 'docs' folder
showuser, onion, curlayer, dividers status saved in new 'EPHD' chunk
Icon for exe is now the original one
Custom:Mousebuttons now lets you choose 'pick block', 'lay path', 'fill' and 'line'
Fixed possible conflict between F1 and F10 key binds
'Background darkened' is now in the Layers menu (works with objects too)
Better lines (key 'l') using Bresenham's algorithm (thanks to www.brackeen.com)
Pro: Lines now work in Graphics editor (key 'l')
Pro: 4 thicknesses for drawing in Graphics editor
Pro: Undo now undoes last operation in Graphics editor
Pro: Edit button now works in Object editor
Pro: You can define areas in the object editor
Pro: Objects and areas can have a custom border colour
Lua: New values CMDLINE, NUMCHUNKS
Lua: luafilemenu=1 in mapwin.ini replaces the functions in the 'File' menu with luafilenewmap.lua, luafileopen.lua etc in the luascr folder (if they exist)
Lua: new funcs:
createChunk ("CHNK", size, position)
deleteChunk (chunknum)
getChunkValue (chunknum, offset)
setChunkValue (chunknum, offset, value)
newMap (mapwidth, mapheight, mapdepth, tilewidth, tileheight, [tilegapx, tilegapy, tilestaggerx, tilestaggery, maptype])
closeMap ()
openFMP (["filename"])
saveFMP (["filename"])
if no "filename" supplied, current filename is used. On saving, use mappy.setValue(mappy.MAPFILENAME, "filename") if you want to change the name
importGraphics ("imagename", starttile, numtiles)
numtiles can be 0 for as many as possible
resizeMap (mapwidth, mapheight, centering)
centering is 1 to 9, as in resize dialogue

 1.4.6
Fixed uppercase FMP extension loading on startup (from 1.4.5) Fixed onionskin transparency with 'All' layers (from 1.4.5) Keys 1, 2 and 3 now switch between first three layers (mapwin.ini) Pro: Fixed object position on staggered maps Pro: Added fill function to Graphics editor (press 'f') Some other minor fixes/improvements

 1.4.5
Export as text, number of objects bug fixed
Object highlight in map window when zoomed bug fixed
Double click edit wrong structure bug fixed (bug in 1.4.4 only)
Custom:Mousebuttons:Drag map 2 now drags map properly
Some minor things fixed
You can now run a Lua script from commandline, example:
mapwin "luascr/Test tile graphic.lua" test.fmp
(note filenames with spaces must be in quotes. A handy hint, use:
mappy.sendMessage (106, 0) to exit the editor from a lua script, the '106' is the FILEEXIT code, see 'Key Shortcuts' for more)
Added CUROBJECT and NUMOBJECTS to getValue()
Added XMAPOFFSET, YMAPOFFSET and MAPFILENAME to setValue()
Added value = getObjectValue (obnum, OBVALCODE)
setObjectValue (obnum, OBVALCODE, value)
createObject (obnum)
deleteObject (obnum)
Where OBVALCODE is one of:
OBJXPOS, OBJYPOS, OBJGFXID, OBJTILEID, OBJGXOFF, OBJGYOFF,
OBJGWIDTH, OBJGHEIGHT, OBJGHANDLEXOFF, OBJGHANDLEYOFF,
OBJSHOW, OBJUSER1 to OBJUSER7, OBJFLAGS

 1.4.4
Better window alignment
Added Dividers to MapTools menu (useful for flipscreen games)
Added 'All' option to onionskin (shows all layers)
Incorporated MapWin32 Pro Preview 3 (demo and full version), see mapwin32pro.html for details
Added 'Export binary file.lua' thanks to Jerzy Kut
removed unused graphics from hextst.fmp and hextst2.fmp to reduce zipfile size

 1.4.3
PNG library now runtime linked, you need LIBPNG12.DLL if you want to import a PNG format file, otherwise you don't need it
Added rotated tiles support. Enabling Rotated tiles mode (from mapwin.ini or MapTools menu) lets you rotate tiles by 90, 180 and 270 degrees by setting USER7 in block properties to 1, 2 or 3
This is supported by MappyGL (R3) if you uncomment MPYROTATE near the top of mappygl.c
tilemodes (flipped, rotated, pillars, wnesmode) are now saved in the FMP file and set when reloaded (experimental)

 1.4.2
Added 'Halve block dimensions' to MapTools:Useful functions

 1.4.1
Grab Block from sequence should now work better
Export as text allows graphics export without cmap
Autofringe lua script is undocumented, see GBAMappy for instructions
New Lua additions (not in 1.4 docs):
Anim Test.lua and Brush Test.lua provided as examples
New values for use with getValue()
NUMBLOCKANIM, XMAPOFFSET, YMAPOFFSET, MAPFILENAME, MAPWINPATH,
MAPWINVERSION, MAPTYPE, NUMBRUSHES
Values for use with getAnimValue()
ANMDELAY, ANMCOUNT, ANMTYPE, ANMUSER, ANMCURFRAME, ANMREFFRAME
AN_END, AN_NONE, AN_LOOPF, AN_LOOPR, AN_ONCE, AN_ONCEH,
AN_PPFF, AN_PPRR, AN_PPRF, AN_PPFR, AN_ONCES,
createAnim (animnum)
deleteAnim (animnum)
getAnimFrame (animnum, framenum)
'framenum' can be ANMREFFRAME
setAnimFrame (animnum, framenum, blockval)
'framenum' can be ANMREFFRAME
insertAnimFrame (animnum, framenum, blockval)
cutAnimFrame (animnum, framenum)
numAnimFrames (animnum)
getAnimValue (VAL)
VAL is:
ANMDELAY, ANMCOUNT, ANMTYPE, ANMUSER, ANMCURFRAME
setAnimValue (VAL, val)
VAL is:
ANMDELAY, ANMCOUNT, ANMTYPE, ANMUSER, ANMCURFRAME
createBrush (brshnum, x, y, w, h)
deleteBrush (brshnum)
renameBrush (brshnum, "Brushname")
getBrushBlock (brshnum, x, y)
setBrushBlock (brshnum, x, y, blk)
getBrushValue (VAL)
VAL is:
BRUSHWIDTH, BRUSHHEIGHT, BRUSHNAME
shellExecute (action, file, params, dir, style)
sendMessage (code, 0)
code is one of the key shortcuts listed in mapwin.htm
for example sendMessage (119, 0) shows the helpfile

 1.4
Convert 16x16 blocks to 8x8 now orders blocks differently in flipped tiles mode (for island16b in GBAMappy release 2)
Export GBA 16x16 table LUA script corrected (again)
New copyLayer and updateScreen functions available to lua scripts
Some Lua scripts modified to support undo and screen update
New Lua script 'Show mouse coords'
You can now drag and drop .lua scripts on the editor to run them
You can set wlayout to -1 in mapwin.ini to stop windows autoresizing
New Map now goes straight to easy map dialogue
Import now uses default options (change with 'simpleimport' in mapwin.ini)
Added 'Save FMP without graphics' to Useful functions
Documentation updated

 1.3.27
Autofringe LUA script modified with different order blocks (see GBAMappy)
Export GBA 16x16 table LUA script corrected
Map limits removed (now warnings)
textfile blockgfx export fixed for bitdepths above 8
textfile cmap type fixed

 1.3.26
Stopped drag and drop renaming the map with non-map files
Fixed Custom menu names on scripts over 8
Fixed 16 colour tiles GBA text output (was reversed)
Fixed remove unused/duplicate with flipped tiles
PNG support for 4,8,24 and 32 bit PNG files
New option File:Export textfile
Textfile output updated
New Lua scripts:
*Autofringe by Robert Edwards (use a 32x32map made with images/fringe.tga)
*Read textfile
*Export GBA 16x16 table (for use with forthcoming GBAMappy)

 1.3.25
Bugfix release to fix reading of mapwin.ini

 1.3.24
MapTools:Show info on tiles now works (select it and see)
Map name in titlebar (tbarname in mapwin.ini)
.CSV values now taken from BG by default (csvusebg in mapwin.ini)
Number keys now work like functionkeys (see mapwin.ini)
Map Editor window now updates while dragging scrollbars (thumbtrack in mapwin.ini)
New example LUA script 'Merge layers.lua' (custom menu)
Placer.lua can be used for placing blocks
Can set mousebutton behaviour in custom menu (including drag map)
Mousewheel now scrolls blockwindow (unpressed), and current block (pressed)
Remove duplicate is much faster and 'MapTools: Import big picture' improved
Other tweaks and fixes

 1.3.23
Added showuser to the mapwin.ini file, you can now view a user field overlaying the blocks in the map window (useful for markers)
Right mousebutton now sets block 0 in the map window
Robert Edwards kindly contributed a random distribution LUA script (more lua scripts please :)
Block number now shown in blocks window titlebar
MapTools: Import big picture and convert to map (make a new map, then select it for instructions)
You can now map Functionkeys to most MappyWin32 functions (Zoom, save etc)

 1.3.22
Added 'drag and drop' support (Opens .FMP and .MAP, imports .BMP, .PCX and .MAR)
Added LUA script support (see Custom Menu) this makes the EXE much bigger though

 1.3.21
Flipped tiles now work with onionskin mode
Block Properties now show mode specific boxes in flippedtiles or isopillars mode
Flipped tiles mode can now be toggled in the MapTools menu
Added 'Duplicate Layer' to Layers menu
Now compiled with mingw 2.0 (www.mingw.org)
A few minor fixes

 1.3.20
Zoom 0.5 and 0.25 added (may be quite slow and have some visual artifacts)
You can set amount for graphicsmem in mapwin.ini
Layer number now shown in titlebar (toggle with tbarinfo in mapwin.ini)
Exporting a map array in a .txt only multiplies values by 4 with a 16x16 map when block graphics (for GBA) is also checked
Dialog options in export .txt are remembered for the session
Export .CSV re-added
Can now double click .MAP files if you associate them with MappyWin32 (just like FMP files)

 1.3.19
'Resize Map' moved from Edit menu to MapTools menu
'Auto set BG transparency' moved from Range edit blocks to MapTools menu
'Change block size/depth' added to MapTools menu
Can now export 16 colour GBA tiles (see 'Exporting map for GBA')
NOTE: on exporting a 16x16 map with merged bits bgoff is now multiplied by 4

 1.3.18
lines can now be drawn with anims
file: export: arrays as text, take bg as index when no structures exported
fix backups
wnesmode show vertical wall positions in red (for use with 3d playback libs like MappyGL)

 1.3.17
Can draw lines by pressing 'l'
Can Import .MAP files as layers
Two new ini file options, backups and hexordec
32 bit maps now use alpha channel (32 bit TGA only, alpha not rendered in editor)
flipbits can now be merged in export .txt

 1.3.16
Fixed problem with brushes introduced in 1.3.15
Changed brush grabbing and menu display a bit

 1.3.15
Brush handles (4 corners) and paste off edges
Should now have 'correct' folder for file dialogues
Layers: Adjust Values useful for removing marker blocks in .MAPs
Layers: Remove Marker graphics useful for removing marker blocks in .FMPs
Layers that don't exist now appear grey in menu
A few doc updates (inc hex/iso howto)
Save/Load multiple layers in .MAP files

 1.3.14
Fixed export map as big screen BMP (8bit) also exact index (8bit)
Can now export from .MAP files
If you set mapdefbw=0 in mapwin.ini a requester is used every time a .MAP is opened

 1.3.13
Added const keyword option to export data as text
corrected maparray type to short in export data as text
Busy cursor for long operations

 1.3.12
Lots of GBA goodies, including convert 16x16 map to 8x8 (see 'Exporting map for GBA' in the docs)
some doc updates
some tweaks and fixes
remove unused/duplicates improved
mapwin.ini has useful comments in now

 1.3.11
used MemProof (www.automatedqa.com) to find and fix resource leaks:
Added a couple of ReleaseDC() calls
Removed -fomit-frame-pointer (caused exceptions in memproof, though was probably ok)
File Export ?scrn.bmp will now produce an 8bit BMP file for 8bit maps

 1.3.10
new wlayout in mapwin.ini, when '1' block ed window is on left, map ed on right
fixed PCX import (again), last graphics line wasn't imported
Exporting a CSV now produces enough data for GBA developers (more docs soon)
You can now 'screenshot' the entire current layer in export (inc onionskin)
Some bugs fixed, some added ;)

 1.3.9
Fixed logical update rate in anim preview
Added simpler 'New Map' dialogue
Changed URL and email in About box
Added TEST2.FMP map
Included blprop.gif which gives labels and iso/flip info
New grid style (to revert to old style, change 'grid = 2' in mapwin.ini) (This now means changing grid in menu or Ctrl+g toggles between 3 styles)
New import style (to revert to old style, change 'importskip = 1' in mapwin.ini) (This is the most intuitive I can think of, 1st block is skipped if black, all blocks thereon are imported until all following blocks are black)
You can now use flipped tiles (change 'flippedtiles = 1' in mapwin.ini)
IMPORTANT: You must set 'flippedtiles = 0' to work with isometric pillar maps, flipped tiles are also unsupported by the playback libraries and anim preview and are mainly for GameBoy developers.
1.3.8: Increased number of brushes to 16
1.3.7: Slide layers, increment in range edit, import requester fix
1.3.6: Split layer support, pick layer
1.3.5: Unknown
1.3.4: Added PCX support
1.3.3: Isometric grid, isometric onionskin
1.3.2: Auto resize windows
1.3.1: Added pillar support

 1.3
Fixed some bugs in the .MAP loader
Transparent BG colour is now drawn as black (not 8bit)
Support for Isometric/Hexagonal/other shaped tiles
Fixed wrong colour 'DirectX feature' in 8bit Anim Preview
You can add an alternate 8bit graphics set to 15/16/24/32 bit maps
15/16bit to 8/24/32 bit is now 100% accurately scaled
Added auto-set BG transparency to Range Edit Blocks
You can now edit block properties in signed decimal as well as hexadecimal
Added FMP1.0 file format
Changed 'Map Information' to 'Map Properties' and moved colourkey and other things there
Upped limit for blocks to 30000 (from 1024), requires FMP1.0

 1.2
Now supports swapped mousebuttons
Fixed remaining alignment problems with BMP padding
You can now use any colour index (0-255) for 8bit transparency
Changed animprev.cpp to animprev.c, so source is now all in C
Compiled with mingw compiler (www.mingw.org, smaller exe)
Added user definable .MAP format
You can now name brushes
Various mapwin.ini additions
Colourkeys are now stored in FMP and can be changed from MapTools menu
More options for Range Edit Blocks

 1.1
Expanded max number of graphics for anim preview (now 4096)
Fixed outline when grabbing a brush in zoom mode
Upped graphics buffer from 2Mb to 4Mb
Added a few options to do with brushes
Tidied up display functions to cope with non-multiple of 4 graphics
Added more information to map window titlebar
Block Editor window now displays more than one column of blocks

 1.0
Finally got rid of the bug that meant if you clicked LMButton in Mappy, but released it outside the window it wasn't detected and stayed on
Added Range Edit Blocks to MapTools (apply changes to many blocks at once)
Added Clear Layer function to Layers
Added Import At function to File
Added ability to re-import .MAR files
Added Logic FPS setting to anim preview
You can now import Map Arrays (.MAR) with Import

 1.0BETA3
Have altered menus and dialogues to be more 'Windows-like'
Loading and saving now preserves unknown chunks
Improved documentation about 'edit menu'
Onion Skin feature (see Layers Menu)

 1.0BETA2
Altered info in 'About' box
Import now warns of incorrect bitdepth
You can now undo after using arrow keys
Menu functions now don't crash when no map is loaded
High/TrueColour transparency colour is now selectable via .ini file
4x Zoom added
You can now associate .FMP files with Mappy and double click them to start
DirectX preview now works properly in High/TrueColour
DirectX Preview colour depth default is the depth of the map
Fixed Map Information, Layers were being ignored

(top of doc)

Main Contents