📄 mapwin.htm
字号:
playback libs have a function for loading .MAR files, this is
one way of having many levels.<br>
<strong>?.TXT</strong> This is the same as selecting 'Export
as text' from the File menu, see below.<br>
<strong>?.CSV</strong> Saves the current layer as comma
separated values in a text file, if csvusebg is 1 in mapwin.ini
the BG value is used, if 0 the block number is used.<br>
<strong>?scrn.BMP</strong> Saves the current layer as a BMP
file, as maps can cover a large area this image can be very big
also there seems to be a limit of 32768 pixels in each direction.
BMP is 8bit if map is 8bit, 24bit for all other map depths.<br>
<strong>?.BMP</strong> Saves the graphics blocks in a BMP
file, click 'skip block 0' if you dont want the blank tile
at the start. BMP is 8bit if map is 8bit, 24bit for all other
map depths. You can use this picture to modify the graphics
by re-importing it.<br>
<strong>?.CMA</strong> The colour map is exported as a 768 byte file containing
256*3byte values of 0xRRGGBB, this is the same as the CMAP chunk
of the FMP file.<br>
<strong>?.ABD</strong> The Anim and Block data is exported as a long
int offset to the split between the anim and block structures
then the anim info, then the block structures. This raw
information is not generally useful.<br>
<strong>?.GFX</strong> All the raw blockgraphics one after the other, so
that's blockwidth*(blockdepth/8)*blockheight*numblockgfx.<br>
<br>
<strong>Export as text</strong>. This option allows you to save data from the
current .MAP or .FMP in text form to be included in a compiled
programme (for gba or a mobile device, for example). The file
created uses the name at the top with a .txt extension. 'Use
name as prefix' uses this name to prefix each part (eg: cmap
becomes name_cmap). There are four main parts:<br><br>
Colour Map - outputs the 256 colour table in either RGB or 16bit
GBA format.<br><br>
Anim and Block structure data - The Block properties in BLKSTR
and ANISTR format, unused fields (all '0') can be automatically
cut if you check that box, you will need to adjust BLKSTR to fit
the new format. BLKSTR and ANISTR are defined in mapdefs.h<br><br>
Map Array(s) - GBA Merge Flip will merge the V and H flip bits
into the array, and User7 as the palette index if you choose
16 colour tiles. Auto resolve BG will use the BG field as the
value, rather than the block number, if you don't export
Anim and Block structure data.<br><br>
Block graphics - If you choose GBA 8x8, tiles will be output
as 8x8, if you have 16x16 tiles you will get 4 8x8 tiles for
each tile. 16 colour tiles will do just that for GBA (check
GBA 8x8 too). If you don't choose GBA 8x8, tiles will be
output 'as is'.<br><br>
</p>
<p><a href="#topod">(top of doc)</a> </p>
<hr>
<p><a name="editmenu"></a></p>
<h3>The Edit Menu</h3>
<p> This contains New, Cut, Copy and Paste for use with the
blocks in the Block Editor window (see
<a href="#blocked">Block Editor</a> for how those work).
<br>
Undo is very useful, but doesn't work on everything, it
will undo everything since the last left mouse click in the Map
Editor window (including the area you can't see), especially
useful for undoing Fill or when you 'paint' by holding the
mousebutton down.</p>
<p><a href="#topod">(top of doc)</a> </p>
<hr>
<p><a name="toolmenu"></a></p>
<h3>The MapTools Menu</h3>
<p>
<strong>Map Properties</strong>. This allows you to put your name and a 3 line
description of the map, the length of each line is limited to 68
characters, this information is saved in the FMP file. Below is
how much memory each type of object is using in the map along
with the total space used for those objects. There are also a
variety of things you can fiddle with. The Alt Graphics: Load allows
you to add another set of graphics to support an 8bit display in
a truecolour map, if
Anim Preview is set to an 8bit mode, you can see them there... If you import
graphics, these will be freed. To make them: export tiles as a BMP, convert
to 8 bit, Load 8bit BMP as Alt graphics.<br>
Map version allows you to select which FMP type is used, you can
freely change this at any time, FMP0.5 is most supported by
other libraries (check your playback library) but is limited
to 1024 tiles.<br>
Colourkey allows you to choose the transparency colour for the map,
this is saved in FMP files.<br>
You should ignore the clickmask, stagger and gap values for
normal rectangular tile maps.<br>
A clickmask MUST be set for non-rectangular tile maps (like isometric)
you should set this to a number of a graphic tile that is a solid mask
for the shape of blocks. The gap values are the pixels between blocks,
the stagger values are the offsets of the odd rows.<br>
Don't cache in VRAM allows you to stop a
playback lib using VRAM for certain graphics (like marker blocks), example:
1-20,28,30,35-40 would not load blocks 1 through 20, 28, 30, and 35 through
40 in VRAM, using sysmem instead. This feature requires a playback lib that supports it,
if it doesn't the map will still work and this info will be ignored.<br>
<br>
<strong>Anim preview (DirectX)</strong>. Runs the map in fullscreen
DirectDraw using the settings from 'Preview setup'. You can
scroll around the map (starting at the point where the Map Editor
window is currently viewing) and see the animated blocks animating as
well as the transparency. Zoom and flipped tiles are not used in
this preview.<br>
<strong>Preview setup</strong>. Select the screenmode you want to
use from the list, these are reported by DirectX so only valid
ones are shown, it defaults to whatever you set as apmode in
<a href="#mapini">mapwin.ini</a>, bpp is the depth of the map
pick whichever you like,
preferably the one your game is going to run in, beware that
running excessively high resolution modes on monitors not
designed for that mode may damage the monitor. Check the boxes
below for which block layers are drawn (the default is background
(BG) with the first foreground layer). Below are the transparency
options, check the box to enable transparency on the preview, if
you want a parallax layer (very handy for checking proper
transparency) enter the number of the GRAPHIC (this may not be
the same as the block number, 0 will be plain black or colour 0,
you can see what the graphic numbers are by editing a still
block, clicking on the BG image and looking at the list) this
will be repeated over and over in any transparent regions
(remember to check the BG transparency box, in the Block properties
editor) and move at half the speed
of the other layers creating a rather lovely effect. There is also a box
specifying the logic rate, leave this at 0 if you want the logic
to match the monitor refresh rate, or specify your own. If you are
making a game you usually can't rely on the refresh rate of the
monitor to regulate speed as it varies (so speed will vary on
different machines). Most games update internally at a set rate
(try 100fps) which unfortunately leads to jerkier movement but
at least the speed is the same on all machines.<br>
<br>
<strong>Range Edit Blocks</strong>. Allows you to selectively
adjust a set range of block structures. It is simple to
use, type the numbers for the start and end of the range of blocks
you want to alter, then adjust ONLY the things you want to change.
If any of the checkboxes are greyed out, or the user fields are
completely blank the information in each block will be left
unaltered. For more information on these fields, see
<a href="#blocked">Block Editor</a>.<br>
<br>
<strong>Resize Map</strong>. Allows
you to resize the map array of all layers. Before resizing it is
advisable to save the map as you can't Undo it (though you can
resize back to the original size). The Resize dialogue shows 9
buttons on the left which show which edges rows and columns will
be removed/added to, be sure that the Map Centering text at the
top shows the correct number (the default is 5, rows and columns
will be added/removed equally from all sides to make the new size
map). If you select centering as '1' (top left), columns will be
added/removed from the right and bottom edges. Select the new
size by entering the numbers in the width and height boxes, then
OK to resize, or Cancel to keep the old size.<br>
<br>
<strong>Useful functions</strong>. Contains miscellaneous
functions:<br>
<strong>Change block size/depth</strong>: Will destroy the current graphics
but keep all other data, you can then import the new size
graphics into the map (you can do this by exporting the current
graphics, resizing, then re-importing them.<br>
<strong>Convert 16x16 blocks to 8x8 (GBA)</strong>: 8bit only, download GBAMappy
to see how to use. Often used with the 'Export 16x16 GBA table'
custom export script.<br>
<strong>Split blocks (Halve block dimensions)</strong>: Splits all blocks
and graphics into four (for example, 32x32 size tiles become 16x16)><br>
<strong>Auto set BG transparency</strong>: Checks the BG transparency box for
every block that has any transparent colour pixels in the BG image.<br>
<strong>Create map from big picture</strong>: Loads a large image file into the
current map (such as one exported as ?scrn.BMP), optionally
removing duplicate tiles. Select the option for full instructions.<br>
<strong>Save FMP without graphics</strong>: Saves all information just like a
FMP file except the graphics (allowing sharing of graphics
between maps). The file is saved with a .FMA extension as
these maps are not FMP compliant. If you want to reload a
FMA file into MappyWin32 (1.4 and above only), load the
FMP with the graphics in first, then load the FMA file.
You will need to type the whole FMA name in the open
requester as FMA files are not shown (eg: level1.fma).
As only the graphics are missing, an FMA map can have
different blocks, map size, brushes, number of layers etc
to the FMP file it is using the graphics from.
In order to load an FMA file with a playback library, you
will either:<br>
1) Modify it so the FreeAll function does not
free the graphics from the FMP file, then load the FMA
file with MapLoad, or:<br>
2) Export the graphics as a .GFX file and modify the DecodeBGFX
function to load that after loading the FMA file, or:<br>
3) Load the graphics from a BMP file or other.<br>
You should consider exporting .MAR files instead as these
are supported by playback libraries.<br>
<br>
<strong>Remove Unused or Duplicate</strong>. Useful when you have
completed a map and want to reduce its size. Make sure you have
a backup! If you select remove anims, any anims that aren't used
in the map will be removed, this probably won't save much space
on its own, but when you remove graphics you could save a lot
more, be careful, if you have made an anim sequence that is
inserted into the map in realtime by your game, it will still be
deleted if it is not in the map. Remove blocks removes any block
structures not used by the map array or anim sequences. Remove
graphics removes any raw graphics not used by block structures,
this will mean you can no longer update your graphics from your
original picture, export the blocks as a BMP if you need to
modify them after this. To check these savings, view Map
Information before and after doing this.<br>
<br>
<strong>Show user info on tile</strong>. Lets you select
one of the Block Properties fields to show over the tile
graphic in the Map and Block Editor windows (if the field is
not 0). The value is truncated if it is too big to show on the
tile. See also: <a href="#markers">Using Marker Blocks</a>.<br>
<br>
<strong>Show Pillar bases only</strong>. On isometric maps
with risers, this toggles whether the whole riser is drawn
(obscuring parts of the map), or just the base.<br>
<br>
<strong>Pillar Riser mode</strong>. Toggles riser mode,
see the <a href="isohex">Isometric section</a> for details.<br>
<br>
<strong>Flipped tiles mode</strong>. Toggles flipped tiles
mode, when enabled you can flip the tile graphics vertically and/or
horizontally in the block properties of each block. Most playback
libraries do not support this mode, used mainly for GBA development
and MappyGL. Flipped tiles
mode is not saved in the map file, if you use flipped tiles,
you can set this mode on by default in the mapwin.ini file.<br>
<br>
<strong>Rotated tiles mode</strong>. Toggles rotated tiles
mode, when enabled you can rotate the tile graphics 0, 90, 180
and 270 degrees by setting the USER7 field to 0, 1, 2 or 3
repectively. The change will not be shown until you OK or
change the tile. Currently only MappyGL (see mappygl.c) supports this.
<br><br>
<strong>Grid</strong>. This toggles between 'off', 'on1'
which is the default and highlights the block in the Map Editor
window the mouse cursor is over, and 'on2' which also puts a border
around the blocks in the Block Editor window. If you want to
grid all the blocks in the Map Editor window, see the
<a href="#markers">Using Marker Blocks</a> section.<br>
<br>
<strong>Dividers</strong>. Select to show the dividers
options. Toggle off and on with the 'Enable dividers' box. Choose
the colour with 'Line colour', 000000 is black, FFFFFF is white.
Set the spacing between dividing lines with Pixel gap X and Y.
Setting the gap the same as your tile width and height gives a
useful grid, setting the gap the size of your game screen is
useful for flipscreen type games.<br>
<br>
<strong>Zoom (x 0.25, x 0.5, x 1, x 2, x 4)</strong>.
Zoom shows things at a quarter normal size at Zoom x 0.25,
half normal size at Zoom x 0.5, normal
size at Zoom x 1, twice normal at Zoom x 2, and four times
normal size at Zoom x 4.</p>
<p><a href="#topod">(top of doc)</a> </p>
<hr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -