📄 mappy.html
字号:
Loads a <code>.MAR</code> map array file called strFileName.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="Mappy.html#setBlock(int, int, int)">setBlock</A></B>(int intBlockX, int intBlockY, int intIndex)</CODE>
<BR>
Puts the block structure value in the map at the given block coords.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="Mappy.html#setCurrentMapLayer(int)">setCurrentMapLayer</A></B>(int intMapLayer)</CODE>
<BR>
Sets the current Map layer.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="Mappy.html#setScreenDimensions(int, int, int, int)">setScreenDimensions</A></B>(int intX, int intY, int intWidth, int intHeight)</CODE>
<BR>
A helper method that sets the screen dimensions.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="Mappy.html#setScreenDimensions(java.awt.Rectangle)">setScreenDimensions</A></B>(java.awt.Rectangle rectangle)</CODE>
<BR>
Sets the screen dimensions.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="Mappy.html#setTransparentColour(int)">setTransparentColour</A></B>(int intNewTransparentColour)</CODE>
<BR>
Sets the transparent colour for Block Images.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="Mappy.html#setX(int)">setX</A></B>(int intNewX)</CODE>
<BR>
Sets the X coordinate of the current Map layer, in pixels.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="Mappy.html#setY(int)">setY</A></B>(int intNewY)</CODE>
<BR>
Sets the Y coordinate of the current Map layer, in pixels.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="Mappy()"><!-- --></A><H3>
Mappy</H3>
<PRE>
public <B>Mappy</B>()</PRE>
<DL>
<DD>Constructs a new Mappy Playback Library. <br>
<P>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="setTransparentColour(int)"><!-- --></A><H3>
setTransparentColour</H3>
<PRE>
public void <B>setTransparentColour</B>(int intNewTransparentColour)</PRE>
<DL>
<DD>Sets the transparent colour for Block Images. This is used to denote the transparent colour of block images when a Map is loaded. Hence this method need only be used <i>before</i> a <code>loadMap()</code> method is called. <br> <br> The default transparent colour is <code>Color.black</code>. <br> <br> Thinking about it, if I can't find another use for the transparent colour then I may make it a parameter in <code>loadMap()</code>. <br>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>intNewTransparentColour</CODE> - the blocks transparent colour in <code>RGB</code>.<DT><B>See Also:</B><DD><A HREF="Mappy.html#getTransparentColour()"><CODE>getTransparentColour()</CODE></A>, <A HREF="Mappy.html#loadMap(java.io.File, java.awt.Component)"><CODE>loadMap(File, Component)</CODE></A>, <A HREF="Mappy.html#loadMap(java.lang.String, java.awt.Component)"><CODE>loadMap(String, Component)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getTransparentColour()"><!-- --></A><H3>
getTransparentColour</H3>
<PRE>
public int <B>getTransparentColour</B>()</PRE>
<DL>
<DD>Returns the transparent colour used for Block Images in <code>RGB</code> format. <br> <br>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the transparent colour used for Block Images.<DT><B>See Also:</B><DD><A HREF="Mappy.html#setTransparentColour(int)"><CODE>setTransparentColour(int)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="loadMap(java.lang.String, java.awt.Component)"><!-- --></A><H3>
loadMap</H3>
<PRE>
public void <B>loadMap</B>(java.lang.String strFileName, java.awt.Component component)</PRE>
<DL>
<DD>Loads a <code>.FMP</code> Map from a given filename. The Mappy class is rather useless until you load a Map into it! <br> <br>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>strFileName</CODE> - the filename of the Mappy <code>.FMP</code> file.<DD><CODE>component</CODE> - this is required to create a compatible image, it can be a <code>Window</code> or an <code>Applet</code> or any <code>component</code> really!<DT><B>See Also:</B><DD><A HREF="Mappy.html#loadMap(java.io.File, java.awt.Component)"><CODE>loadMap(File, Component)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="loadMap(java.io.File, java.awt.Component)"><!-- --></A><H3>
loadMap</H3>
<PRE>
public void <B>loadMap</B>(java.io.File file, java.awt.Component component)</PRE>
<DL>
<DD>Loads a <code>.FMP</code> Map from a given <code>File</code>. The Mappy class is rather useless until you load a Map into it! <br> <br>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>file</CODE> - the file of the Mappy <code>.FMP</code> file.<DD><CODE>component</CODE> - this is required to create a compatible image, it can be a <code>Window</code> or an <code>Applet</code> or any <code>component</code> really!<DT><B>See Also:</B><DD><A HREF="Mappy.html#loadMap(java.io.InputStream, java.awt.Component)"><CODE>loadMap(InputStream, Component)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="loadMap(java.io.InputStream, java.awt.Component)"><!-- --></A><H3>
loadMap</H3>
<PRE>
public void <B>loadMap</B>(java.io.InputStream stream, java.awt.Component component)</PRE>
<DL>
<DD>Loads a <code>.FMP</code> Map from a given <code>InputStream</code>. The Mappy class is rather useless until you load a Map into it! <br> <br>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>stream</CODE> - the InputStream where the <code>.FMP</code> file can be found.<DD><CODE>component</CODE> - this is required to create a compatible image, it can be a <code>Window</code> or an <code>Applet</code> or any <code>component</code> really!</DL>
</DD>
</DL>
<HR>
<A NAME="loadMAR(java.lang.String, int)"><!-- --></A><H3>
loadMAR</H3>
<PRE>
public void <B>loadMAR</B>(java.lang.String strFileName, int marlyr)</PRE>
<DL>
<DD>Loads a <code>.MAR</code> map array file called strFileName. The corresponding FMP map must be loaded first.<br> <br>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>strFileName</CODE> - the name of the .MAR file to load<DD><CODE>marlyr</CODE> - the number of the layer you want to load to</DL>
</DD>
</DL>
<HR>
<A NAME="getMapDescription()"><!-- --></A><H3>
getMapDescription</H3>
<PRE>
public java.lang.String <B>getMapDescription</B>()</PRE>
<DL>
<DD>Returns a description of the Map. The description is a concatonation of the strings found in the <code>ATHR</code> chunk of the map, seperated by new-line ("<code>\n</code>") characters. <br> <br>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>a description of the Map.</DL>
</DD>
</DL>
<HR>
<A NAME="getMapWidthBlocks()"><!-- --></A><H3>
getMapWidthBlocks</H3>
<PRE>
public int <B>getMapWidthBlocks</B>()</PRE>
<DL>
<DD>Returns the total width of the Map, in blocks. <br> <br>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the width of the Map.<DT><B>See Also:</B><DD><A HREF="Mappy.html#getMapHeightBlocks()"><CODE>getMapHeightBlocks()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getMapHeightBlocks()"><!-- --></A><H3>
getMapHeightBlocks</H3>
<PRE>
public int <B>getMapHeightBlocks</B>()</PRE>
<DL>
<DD>Returns the total height of the Map, in blocks. <br> <br>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the width of the Map.<DT><B>See Also:</B><DD><A HREF="Mappy.html#getMapWidthBlocks()"><CODE>getMapWidthBlocks()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getMapWidth()"><!-- --></A><H3>
getMapWidth</H3>
<PRE>
public int <B>getMapWidth</B>()</PRE>
<DL>
<DD>Returns the total width of the Map, in pixels. <br> <br>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the width of the Map.<DT><B>See Also:</B><DD><A HREF="Mappy.html#getMapHeight()"><CODE>getMapHeight()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getMapHeight()"><!-- --></A><H3>
getMapHeight</H3>
<PRE>
public int <B>getMapHeight</B>()</PRE>
<DL>
<DD>Returns the total height of the Map, in pixels. <br> <br>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the height of the Map.<DT><B>See Also:</B><DD><A HREF="Mappy.html#getMapWidth()"><CODE>getMapWidth()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getBlockWidth()"><!-- --></A><H3>
getBlockWidth</H3>
<PRE>
public int <B>getBlockWidth</B>()</PRE>
<DL>
<DD>Returns the width of a Block, in pixels. <br> <br>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the width of a Block.<DT><B>See Also:</B><DD><A HREF="Mappy.html#getBlockHeight()"><CODE>getBlockHeight()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getBlockHeight()"><!-- --></A><H3>
getBlockHeight</H3>
<PRE>
public int <B>getBlockHeight</B>()</PRE>
<DL>
<DD>Returns the height of a Block, in pixels. <br> <br>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the height of a Block.<DT><B>See Also:</B><DD><A HREF="Mappy.html#getBlockWidth()"><CODE>getBlockWidth()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setScreenDimensions(java.awt.Rectangle)"><!-- --></A><H3>
setScreenDimensions</H3>
<PRE>
public void <B>setScreenDimensions</B>(java.awt.Rectangle rectangle)</PRE>
<DL>
<DD>Sets the screen dimensions. The rectangle denotes the area of the screen where the map is drawn. <br> <br> The default dimensions equivalent to <code>new Rectangle(0, 0, 640, 480) </code>. <br> <br>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>rectangle</CODE> - the new screen dimensions.<DT><B>See Also:</B><DD><A HREF="Mappy.html#getScreenDimensions()"><CODE>getScreenDimensions()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setScreenDimensions(int, int, int, int)"><!-- --></A><H3>
setScreenDimensions</H3>
<PRE>
public void <B>setScreenDimensions</B>(int intX, int intY, int intWidth, int intHeight)</PRE>
<DL>
<DD>A helper method that sets the screen dimensions. The parameters denote the area of the screen where the map is drawn. <br> <br> The default dimensions are equivalent to <code>new Rectangle(0, 0, 640, 480) </code>. <br> <br>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>intX</CODE> - the X coordinate of the screen drawing area<DD><CODE>intY</CODE> - the Y coordinate of the screen drawing area<DD><CODE>intWidth</CODE> - the width of the screen drawing area<DD><CODE>intHeight</CODE> - the height of the screen drawing area<DT><B>See Also:</B><DD><A HREF="Mappy.html#getScreenDimensions()"><CODE>getScreenDimensions()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getScreenDimensions()"><!-- --></A><H3>
getScreenDimensions</H3>
<PRE>
public java.awt.Rectangle <B>getScreenDimensions</B>()</PRE>
<DL>
<DD>Returns the screen dimensions. The rectangle denotes the area of the screen where the map is drawn. <br> <br> The <code>rectangle</code> returned is an independant object, e.g. altering the rectangle does not affect the Mappy class. <br> <br>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the screen dimensions.</DL>
</DD>
</DL>
<HR>
<A NAME="setCurrentMapLayer(int)"><!-- --></A><H3>
setCurrentMapLayer</H3>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -