⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mapwin.htm

📁 一款非常好用的地图编辑器 开发J2ME Windows 游戏 都非常好用 可以导出地图数组
💻 HTM
📖 第 1 页 / 共 5 页
字号:
type it).
</p>

<p><a href="#topod">(top of doc)</a> </p>

<hr>

<p><a name="maped"></a></p>

<h3>The Map Editor Window</h3>

<p>&nbsp; This will show how the map is layed out, and allow you
to edit that layout. Simply select a block, anim, or brush and
paint with it by clicking the left mouse button on the square
where you want to place the tile, you can alter more than one
square by holding down the left mouse button and moving the
mouse. The actions performed by the mousebuttons can be defined 
by selectin 'Mousebuttons' in the Custom menu. The mousewheel 
can be used to scroll the blocks in the Block editor window. 
You can fill an area of blocks with either a still
block, anim block or brush (depending on what is currently
selected as your drawing item) by pressing the 'f' key (make sure
caps lock isn't on) when the mouse button is over the block you
want to start the fill with. You can also fill randomly from a
brush with Ctrl+F, you can weight blocks by having more than one
in a brush (try and see, you can undo a fill with Undo, Ctrl+Z).
Another handy shortcut is to press the 'p' key while the mouse
pointer is over the block you want to pick in the Map Editor
window, this will now be your current block/anim. You can select
the next/previous block/anim by pressing the ',' and '.' keys.<br>
<br>
&nbsp; You can move the area seen in the Map Editor window by
either using the scrollbars on the right and bottom edges of that
window, or by pressing the arrow (cursor) keys, hold them down to
scroll along. When you get to the right or bottom edges of the
map you will see a grey area which cannot be modified.<br>
<br>
&nbsp; Information about the block under the mouse pointer is
given in the window title bar.</p>

<p><a href="#topod">(top of doc)</a> </p>

<hr>

<p><a name="blocked"></a></p>

<h3>The Block Editor Window</h3>

<p>&nbsp; This shows all the still and animated blocks that have
been created, you can toggle between the still and animated
screens by right clicking the mouse over the Block Editor window.
To select a block or anim, left click the mouse button on it, you
can now draw with it in the Map Editor window. 
You can add a new block/anim, cut copy and paste 
(all in the Edit menu), new and paste put the block after the
currently selected one. Each block takes only 32 bytes of space 
(see Map Properties). Note that cutting a block will remove any
references to it from the map array (they will be replaced with a
reference to block 0), and pasting it will not put them back, so
it's usually best not to cut blocks you are using in the map
array. Also note that cutting a block does not remove the
graphics it was using. Using new, cut, copy and paste does not 
affect the graphics you imported in any way, click on the picture 
above 'BG' in a block's properties to see the actual graphics. 
As long as you don't use 'Remove unused or duplicate graphics' 
options the graphics will never change, allowing you to update 
them from the original imported image. 
Undo does not work when editing the Block
Editor.<br>
<br>
&nbsp; You can see more blocks/anims by scrolling up and down
with the scrollbar on the right of the Block Editor window.<br>
<br>
&nbsp; To edit a block structure, double click it in the Block
Editor window. Depending on whether it is a still or animated
block, you will be shown a dialogue giving details about it and
allowing you to change it.<br>
<br>
&nbsp;<strong>Editing Properties of a Still Block</strong>. You will be shown the
block you double clicked, along with it's properties. The numeric
information is not used by Mappy and is entirely for your own
use, as are the four collision detection, and 'other' bits. The BG 
transparency box indicates whether BG transparency is taken into
account (you will nearly always check that in block 0 if you plan
to use transparency, as well as any blocks that have a
transparent colour in the BG graphic. An easy way to set this for 
all blocks with some transparent pixels is to select 'Auto set 
BG transparency' from the 'Useful functions' option in the MapTools 
menu after you have imported your graphics). In the bottom left, you will see the
four layers of graphics that make up the block's appearance,
simply click them to pick a new graphic, BG is used as the back
layer, you will probably only want to use the first FG layer,
this allows you to draw the map in layers in the playback
libraries, sandwiching sprites between them to give depth. You
can go to the next/previous block by clicking the arrows next to
the OK button.<br>
<center><img src="images/blprop.gif" alt="Block Properties diagram"></center>
<br>
&nbsp;<strong>Editing Properties of an Animated Block</strong>. Double clicking
an animated block in the Block Editor window lets you create 
animations. Animated blocks are made up of a sequence of still 
blocks, you do not pick graphics when you edit them, but still 
block structures. The reference block is how the anim appears 
when it is not animating (such as in the Block and Map Editor
windows), click it to change. Below that is the sequence of still
blocks, there is a black and white 'C' shape indicating where
frames will be inserted and deleted, simply click where you want
to insert or cut, then click the Insert or Cut buttons. Clicking
Insert will take you to another dialogue where you can pick up to
30 frames to insert (you can have more than 30 frames in an
animation, just click insert again). When you OK, you are
returned and the new frames will be shown, with the edit point
'C' cursor at the end of the new frames. The Delay is the number
of calls to UpdateAnims before the next frame is used, so the
higher it is the slower it will animate, the actual speed is
determined by how often you call UpdateAnims (a playback library
function), you can get a rough idea with Anim Preview from the
MapTools menu. To the right of Delay is the style of animation,
click to change, LOOPF continually loops forward, ONCE only plays
the anim once (this is so your game can trigger an event), PP
pingpongs between the start and end frame via the middle ones.</p>

<p><a href="#topod">(top of doc)</a> </p>

<hr>

<p><a name="filemenu"></a></p>

<h3>The File Menu</h3>

<p>&nbsp; This has the standard file features such as Open (open
a .FMP or .MAP mapfile for editing), Save (saves current .FMP or .MAP file under
it's current name, if it hasn't been named this is the same as
Save As), Save As (requests a name to save the map, .FMP will be
added if you don't type it in then saves it), Exit (quits Mappy,
same as clicking the 'X' gadget in the window titlebar, you
will be warned if you have modified a map but not saved it), and
some Mappy specfic ones, which are:<br><br>
&nbsp; <strong>New Map</strong>. Brings up the new map dialogue where you choose
settings for the new map, you should have carefully decided on
the values you enter here. Either the default values will be shown, or
the values for the currently loaded map (currently loaded map
will be cleared from memory if you OK from New Map), you can
modify these values to any legal value. If you are creating a 
map with non-rectangular tiles click 'Advanced'. 
Note: Your Windows desktop doesn't need to be in, or support,
that depth, your Windows desktop does need to be in high or true
colour though (yes, even for 8bit maps :).<br>
<strong>Advanced dialogue:</strong>
FMP version: this allows you to specify the version
of the FMP file, you can change it in Map Properties later on.<br>
Block gap x and y: this is the gap between blocks, if x is the same width,
the blocks will be next to each other. For isometric maps,
gapx should be the same as blockwidth, and
gapy should be the same as blockheight.<br>
Block stagger x and y: This is the offset for every other row, for
isometric, stagger x should be half blockwidth, stagger y should be half
blockheight. You can change all these in Map Properties later on if it doesn't look right.<br>
<br>
&nbsp;When you 'OK' you will be given a map
filled with one block (shown in the Block Editor 'still' window)
this is a special block, you can edit it's properties (by double
clicking) but not give it any graphics or delete or move it from
the first position. Now may be a good time to check 'Map
Properties' in MapTools to see how much space is being taken up.<br>
<br>
&nbsp; <strong>Import</strong>. This is used to get your tile graphics into your
map, see <a href="#imgfmts">supported image formats</a>.<br>
<center><img src="images/TEST.BMP" alt="images/TEST.BMP"></center><br>
The editor defaults to simpleimport, this allows you to import one image 
file and update or add more graphics by modifying the image file and importing again. 
If you disable simpleimport in the mapwin.ini file (not recommended), 
you can import more than one image file, when you have selected the image
file to import, you will get the question: &quot;Make all
imported graphics into NEW block structures?&quot; If you answer
'Yes' new blocks will be created in the Block Editor 'still'
window that have each new graphic tile as the BG (see Block
Structures in the <a href="#glossary">glossary</a>), if you
answer 'No' you will be asked: &quot;Replace existing
graphics?&quot;. Answering 'Yes' to that will write over the
current map graphics (except the special first one), the most
common reason to do that is when you have updated the map graphics.
If you have added more blocks to the end you will be asked if you
want new structures for the new blocks.
If you say 'No' to replacing existing graphics the new ones will
be added to the map, but won't be visible until you incorporate
them into a Block Structure.<br>
&nbsp; You can also import Map Array (.MAR and .MAP) layers here, these MUST have been
previously exported from this map, and you must not have altered
the block order.<br>
<br>
&nbsp; <strong>Import at</strong>. Please use import instead<br><br>
&nbsp; <strong>Export</strong>. You can export individual parts of the map as
separate files, which you may need for various reasons, though
the playback libs use the FMP files. 
Click the checkboxes to indicate what to export 
(they will be given the name at the top of the dialogue with 
the indicated extension and be put in the same
directory as the map file). <br>
<strong>?.MAR</strong> The current layer map array is saved as 
an array of short ints mapwidth wide by mapheight high, so
a 100*100 map would produce a 20000byte .MAR file. These .MAR 
files can be re-imported ('import' in the File menu) if you 
don't change the block order in the Block editor window. Most 
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>
&nbsp;<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>&nbsp; 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>
&nbsp; 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>
&nbsp;<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

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -