first commit
This commit is contained in:
@@ -0,0 +1,712 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<!-- Generated by javadoc (build 1.4.2_03) on Fri Apr 23 12:22:23 EDT 2004 -->
|
||||
<TITLE>
|
||||
TileSet
|
||||
</TITLE>
|
||||
|
||||
<META NAME="keywords" CONTENT="edu.gatech.cs2335.lemmings.graphics.TileSet class">
|
||||
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
|
||||
|
||||
<SCRIPT type="text/javascript">
|
||||
function windowTitle()
|
||||
{
|
||||
parent.document.title="TileSet";
|
||||
}
|
||||
</SCRIPT>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="white" onload="windowTitle();">
|
||||
|
||||
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<A NAME="navbar_top"><!-- --></A>
|
||||
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../../../../edu/gatech/cs2335/lemmings/graphics/Renderer.html" title="class in edu.gatech.cs2335.lemmings.graphics"><B>PREV CLASS</B></A>
|
||||
<A HREF="../../../../../edu/gatech/cs2335/lemmings/graphics/TileSet.FrameInformation.html" title="class in edu.gatech.cs2335.lemmings.graphics"><B>NEXT CLASS</B></A></FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="TileSet.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_top"></A>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
|
||||
<HR>
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<H2>
|
||||
<FONT SIZE="-1">
|
||||
edu.gatech.cs2335.lemmings.graphics</FONT>
|
||||
<BR>
|
||||
Class TileSet</H2>
|
||||
<PRE>
|
||||
java.lang.Object
|
||||
<IMG SRC="../../../../../resources/inherit.gif" ALT="extended by"><B>edu.gatech.cs2335.lemmings.graphics.TileSet</B>
|
||||
</PRE>
|
||||
<DL>
|
||||
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../edu/gatech/cs2335/lemmings/graphics/ImprovedTileSet.html" title="class in edu.gatech.cs2335.lemmings.graphics">ImprovedTileSet</A></DD>
|
||||
</DL>
|
||||
<HR>
|
||||
<DL>
|
||||
<DT>public class <B>TileSet</B><DT>extends java.lang.Object</DL>
|
||||
|
||||
<P>
|
||||
The tileset class simplifies loading bitmap files that contain
|
||||
several tiles. It is a fairly flexible class, but it does impose
|
||||
certain restrictions on the way the file is organized. First of
|
||||
all, there needs to be a set of control pixels in the upper-right
|
||||
corner of the image. The control pixels start at the coordinate
|
||||
(width-1, 0) and go down from there in the following order:
|
||||
transparency pixel, empty-region pixel, outside anchor pixel,
|
||||
used-region pixel, inside anchor pixel; five in all. The
|
||||
transparency pixel is used for color-keying, and all the pixels of
|
||||
that color in the image will be made transparent. The outside and
|
||||
inside anchor pixels do the same thing currently, and are used to
|
||||
denote the image anchor. When the tile is blitted using the
|
||||
putTile method, the anchor has the coordinates passed in to the
|
||||
method, and the rest of the image is drawn relatively to it. In
|
||||
other words, suppose we blit to rectangular tiles using the same
|
||||
target coordinates. One of the tiles has its anchor in the
|
||||
top-left corner, and the other - in the center. Then the center of
|
||||
the latter tile will coincide with the top-left corner of the
|
||||
former tile. The empty-region and used-region pixels are used to
|
||||
denote where the useful areas of the tile are, and which ones can
|
||||
be discarded. The reason for that is that the tiles in the tileset
|
||||
file have to be arranged in a table. In other words, all tiles in
|
||||
one column have to be the same width, and all the tiles in one row
|
||||
have to be the same height. That is not to say, however, that the
|
||||
width and the height have to be the equal, or that the tiles in
|
||||
different rows have to have the same height, and in different
|
||||
columns - the same width. Suppose a game has only two tiles. We
|
||||
can arrange them in a column. One of the tiles is square, and the
|
||||
other - a very thin rectangle. Then, we could mark the whole first
|
||||
tile as used, and for the second tile - only the space that is
|
||||
actually used up. Since we arranged the tiles in a column, the
|
||||
widths of the tiles have to be the same. However, we can mark the
|
||||
unused areas of the thin tile with the unused-area pixel color,
|
||||
and they will be discarded when blitting.
|
||||
|
||||
<PRE>
|
||||
Revision History:
|
||||
v1.0 (Mar. 11, 2004) - Created the TileSet class
|
||||
</PRE>
|
||||
<P>
|
||||
|
||||
<P>
|
||||
<DL>
|
||||
<DT><B>Version:</B></DT>
|
||||
<DD>Version 1.0, Mar. 11, 2004</DD>
|
||||
<DT><B>Author:</B></DT>
|
||||
<DD><A HREF="mailto:gtg308i@mail.gatech.edu">Vladimir Urazov</A></DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<P>
|
||||
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
||||
|
||||
<A NAME="nested_class_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Nested Class Summary</B></FONT></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE>protected class</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../../../edu/gatech/cs2335/lemmings/graphics/TileSet.FrameInformation.html" title="class in edu.gatech.cs2335.lemmings.graphics">TileSet.FrameInformation</A></B></CODE>
|
||||
|
||||
<BR>
|
||||
Information structure for one tile in the tileset.</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- =========== FIELD SUMMARY =========== -->
|
||||
|
||||
<A NAME="field_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Field Summary</B></FONT></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE>protected static boolean</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../../../edu/gatech/cs2335/lemmings/graphics/TileSet.html#DEBUG">DEBUG</A></B></CODE>
|
||||
|
||||
<BR>
|
||||
Show debug output?</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE>protected static boolean</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../../../edu/gatech/cs2335/lemmings/graphics/TileSet.html#VERBOSE">VERBOSE</A></B></CODE>
|
||||
|
||||
<BR>
|
||||
Show lots of debug output?</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
|
||||
<A NAME="constructor_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Constructor Summary</B></FONT></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><CODE><B><A HREF="../../../../../edu/gatech/cs2335/lemmings/graphics/TileSet.html#TileSet()">TileSet</A></B>()</CODE>
|
||||
|
||||
<BR>
|
||||
Creates a new <code>TileSet</code> instance.</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
|
||||
<A NAME="method_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Method Summary</B></FONT></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="../../../../../edu/gatech/cs2335/lemmings/graphics/TileSet.html#drawTile(java.awt.Graphics, java.awt.Point, int)">drawTile</A></B>(java.awt.Graphics destination,
|
||||
java.awt.Point coordinates,
|
||||
int tileNum)</CODE>
|
||||
|
||||
<BR>
|
||||
Puts the tile with the specified number onto the graphics context
|
||||
passed in at the specified coordinates.</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE>protected int</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../../../edu/gatech/cs2335/lemmings/graphics/TileSet.html#findFirstOccurrence(int, int, int, java.awt.Color, java.awt.Color, boolean)">findFirstOccurrence</A></B>(int lowBound,
|
||||
int highBound,
|
||||
int coordinate,
|
||||
java.awt.Color c1,
|
||||
java.awt.Color c2,
|
||||
boolean vertical)</CODE>
|
||||
|
||||
<BR>
|
||||
Finds the coordinate of the first occurrence of one of the test colors.</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE>protected int</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../../../edu/gatech/cs2335/lemmings/graphics/TileSet.html#findLastOccurrence(int, int, int, java.awt.Color, java.awt.Color, boolean)">findLastOccurrence</A></B>(int lowBound,
|
||||
int highBound,
|
||||
int coordinate,
|
||||
java.awt.Color c1,
|
||||
java.awt.Color c2,
|
||||
boolean vertical)</CODE>
|
||||
|
||||
<BR>
|
||||
Finds the coordinate of the last occurrence of one of the test colors.</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> java.awt.Dimension</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../../../edu/gatech/cs2335/lemmings/graphics/TileSet.html#getDimension(int)">getDimension</A></B>(int tileNum)</CODE>
|
||||
|
||||
<BR>
|
||||
Returns the dimensions of the tile with the specified id.</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> java.awt.Rectangle</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../../../edu/gatech/cs2335/lemmings/graphics/TileSet.html#getExtent(int)">getExtent</A></B>(int tileNum)</CODE>
|
||||
|
||||
<BR>
|
||||
Returns the extent of the tile with the specified id.</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> java.lang.String</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../../../edu/gatech/cs2335/lemmings/graphics/TileSet.html#getFileName()">getFileName</A></B>()</CODE>
|
||||
|
||||
<BR>
|
||||
Returns the name of the file containing the tileset in a string.</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE>protected <A HREF="../../../../../edu/gatech/cs2335/lemmings/graphics/TileSet.FrameInformation.html" title="class in edu.gatech.cs2335.lemmings.graphics">TileSet.FrameInformation</A>[]</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../../../edu/gatech/cs2335/lemmings/graphics/TileSet.html#getFrameList()">getFrameList</A></B>()</CODE>
|
||||
|
||||
<BR>
|
||||
Describe <code>getFrameList</code> method here.</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE>protected java.awt.image.BufferedImage</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../../../edu/gatech/cs2335/lemmings/graphics/TileSet.html#getFramesetImage()">getFramesetImage</A></B>()</CODE>
|
||||
|
||||
<BR>
|
||||
Describe <code>getFramesetImage</code> method here.</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> java.awt.image.BufferedImage</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../../../edu/gatech/cs2335/lemmings/graphics/TileSet.html#getImage()">getImage</A></B>()</CODE>
|
||||
|
||||
<BR>
|
||||
Returns the image on which the tileset resides.</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> java.awt.Dimension</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../../../edu/gatech/cs2335/lemmings/graphics/TileSet.html#getLargestDimension()">getLargestDimension</A></B>()</CODE>
|
||||
|
||||
<BR>
|
||||
Returns the dimensions of the largest tile in the tileset.</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> int</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../../../edu/gatech/cs2335/lemmings/graphics/TileSet.html#getTileCount()">getTileCount</A></B>()</CODE>
|
||||
|
||||
<BR>
|
||||
Returns the number of tiles in the tileset.</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> boolean</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../../../edu/gatech/cs2335/lemmings/graphics/TileSet.html#loadTileset(java.lang.String)">loadTileset</A></B>(java.lang.String name)</CODE>
|
||||
|
||||
<BR>
|
||||
Loads the tileset from a file.</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> boolean</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../../../edu/gatech/cs2335/lemmings/graphics/TileSet.html#reloadTileset()">reloadTileset</A></B>()</CODE>
|
||||
|
||||
<BR>
|
||||
If the surface was lost, reloads it, but does not reparse the file.</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE>protected boolean</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../../../edu/gatech/cs2335/lemmings/graphics/TileSet.html#specialLoad()">specialLoad</A></B>()</CODE>
|
||||
|
||||
<BR>
|
||||
Describe <code>specialLoad</code> method here.</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> boolean</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../../../edu/gatech/cs2335/lemmings/graphics/TileSet.html#unloadTileset()">unloadTileset</A></B>()</CODE>
|
||||
|
||||
<BR>
|
||||
Performs all the necessary clean-up operations.</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<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 =========== -->
|
||||
|
||||
<A NAME="field_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=1><FONT SIZE="+2">
|
||||
<B>Field Detail</B></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<A NAME="DEBUG"><!-- --></A><H3>
|
||||
DEBUG</H3>
|
||||
<PRE>
|
||||
protected static final boolean <B>DEBUG</B></PRE>
|
||||
<DL>
|
||||
<DD>Show debug output?
|
||||
<P>
|
||||
<DL>
|
||||
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#edu.gatech.cs2335.lemmings.graphics.TileSet.DEBUG">Constant Field Values</A></DL>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="VERBOSE"><!-- --></A><H3>
|
||||
VERBOSE</H3>
|
||||
<PRE>
|
||||
protected static final boolean <B>VERBOSE</B></PRE>
|
||||
<DL>
|
||||
<DD>Show lots of debug output?
|
||||
<P>
|
||||
<DL>
|
||||
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#edu.gatech.cs2335.lemmings.graphics.TileSet.VERBOSE">Constant Field Values</A></DL>
|
||||
</DL>
|
||||
|
||||
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||||
|
||||
<A NAME="constructor_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=1><FONT SIZE="+2">
|
||||
<B>Constructor Detail</B></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<A NAME="TileSet()"><!-- --></A><H3>
|
||||
TileSet</H3>
|
||||
<PRE>
|
||||
public <B>TileSet</B>()</PRE>
|
||||
<DL>
|
||||
<DD>Creates a new <code>TileSet</code> instance.
|
||||
<P>
|
||||
</DL>
|
||||
|
||||
<!-- ============ METHOD DETAIL ========== -->
|
||||
|
||||
<A NAME="method_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=1><FONT SIZE="+2">
|
||||
<B>Method Detail</B></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<A NAME="loadTileset(java.lang.String)"><!-- --></A><H3>
|
||||
loadTileset</H3>
|
||||
<PRE>
|
||||
public boolean <B>loadTileset</B>(java.lang.String name)</PRE>
|
||||
<DL>
|
||||
<DD>Loads the tileset from a file. Returns true upon success or false
|
||||
upon failure.
|
||||
<P>
|
||||
<DD><DL>
|
||||
<DT><B>Parameters:</B><DD><CODE>name</CODE> - a <code>String</code> value
|
||||
<DT><B>Returns:</B><DD>a <code>boolean</code> value</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="specialLoad()"><!-- --></A><H3>
|
||||
specialLoad</H3>
|
||||
<PRE>
|
||||
protected boolean <B>specialLoad</B>()</PRE>
|
||||
<DL>
|
||||
<DD>Describe <code>specialLoad</code> method here.
|
||||
<P>
|
||||
<DD><DL>
|
||||
|
||||
<DT><B>Returns:</B><DD>a <code>boolean</code> value</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="getFrameList()"><!-- --></A><H3>
|
||||
getFrameList</H3>
|
||||
<PRE>
|
||||
protected <A HREF="../../../../../edu/gatech/cs2335/lemmings/graphics/TileSet.FrameInformation.html" title="class in edu.gatech.cs2335.lemmings.graphics">TileSet.FrameInformation</A>[] <B>getFrameList</B>()</PRE>
|
||||
<DL>
|
||||
<DD>Describe <code>getFrameList</code> method here.
|
||||
<P>
|
||||
<DD><DL>
|
||||
|
||||
<DT><B>Returns:</B><DD>a <code>FrameInformation[]</code> value</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="getFramesetImage()"><!-- --></A><H3>
|
||||
getFramesetImage</H3>
|
||||
<PRE>
|
||||
protected java.awt.image.BufferedImage <B>getFramesetImage</B>()</PRE>
|
||||
<DL>
|
||||
<DD>Describe <code>getFramesetImage</code> method here.
|
||||
<P>
|
||||
<DD><DL>
|
||||
|
||||
<DT><B>Returns:</B><DD>a <code>BufferedImage</code> value</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="findFirstOccurrence(int, int, int, java.awt.Color, java.awt.Color, boolean)"><!-- --></A><H3>
|
||||
findFirstOccurrence</H3>
|
||||
<PRE>
|
||||
protected int <B>findFirstOccurrence</B>(int lowBound,
|
||||
int highBound,
|
||||
int coordinate,
|
||||
java.awt.Color c1,
|
||||
java.awt.Color c2,
|
||||
boolean vertical)</PRE>
|
||||
<DL>
|
||||
<DD>Finds the coordinate of the first occurrence of one of the test colors.
|
||||
<P>
|
||||
<DD><DL>
|
||||
<DT><B>Parameters:</B><DD><CODE>lowBound</CODE> - an <code>int</code> value<DD><CODE>highBound</CODE> - an <code>int</code> value<DD><CODE>coordinate</CODE> - an <code>int</code> value<DD><CODE>c1</CODE> - a <code>Color</code> value<DD><CODE>c2</CODE> - a <code>Color</code> value<DD><CODE>vertical</CODE> - a <code>boolean</code> value
|
||||
<DT><B>Returns:</B><DD>an <code>int</code> value</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="findLastOccurrence(int, int, int, java.awt.Color, java.awt.Color, boolean)"><!-- --></A><H3>
|
||||
findLastOccurrence</H3>
|
||||
<PRE>
|
||||
protected int <B>findLastOccurrence</B>(int lowBound,
|
||||
int highBound,
|
||||
int coordinate,
|
||||
java.awt.Color c1,
|
||||
java.awt.Color c2,
|
||||
boolean vertical)</PRE>
|
||||
<DL>
|
||||
<DD>Finds the coordinate of the last occurrence of one of the test colors.
|
||||
<P>
|
||||
<DD><DL>
|
||||
<DT><B>Parameters:</B><DD><CODE>lowBound</CODE> - an <code>int</code> value<DD><CODE>highBound</CODE> - an <code>int</code> value<DD><CODE>coordinate</CODE> - an <code>int</code> value<DD><CODE>c1</CODE> - a <code>Color</code> value<DD><CODE>c2</CODE> - a <code>Color</code> value<DD><CODE>vertical</CODE> - a <code>boolean</code> value
|
||||
<DT><B>Returns:</B><DD>an <code>int</code> value</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="reloadTileset()"><!-- --></A><H3>
|
||||
reloadTileset</H3>
|
||||
<PRE>
|
||||
public boolean <B>reloadTileset</B>()</PRE>
|
||||
<DL>
|
||||
<DD>If the surface was lost, reloads it, but does not reparse the file.
|
||||
<P>
|
||||
<DD><DL>
|
||||
|
||||
<DT><B>Returns:</B><DD>a <code>boolean</code> value</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="unloadTileset()"><!-- --></A><H3>
|
||||
unloadTileset</H3>
|
||||
<PRE>
|
||||
public boolean <B>unloadTileset</B>()</PRE>
|
||||
<DL>
|
||||
<DD>Performs all the necessary clean-up operations.
|
||||
<P>
|
||||
<DD><DL>
|
||||
|
||||
<DT><B>Returns:</B><DD>a <code>boolean</code> value</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="getTileCount()"><!-- --></A><H3>
|
||||
getTileCount</H3>
|
||||
<PRE>
|
||||
public int <B>getTileCount</B>()</PRE>
|
||||
<DL>
|
||||
<DD>Returns the number of tiles in the tileset.
|
||||
<P>
|
||||
<DD><DL>
|
||||
|
||||
<DT><B>Returns:</B><DD>an <code>int</code> value</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="getImage()"><!-- --></A><H3>
|
||||
getImage</H3>
|
||||
<PRE>
|
||||
public java.awt.image.BufferedImage <B>getImage</B>()</PRE>
|
||||
<DL>
|
||||
<DD>Returns the image on which the tileset resides.
|
||||
<P>
|
||||
<DD><DL>
|
||||
|
||||
<DT><B>Returns:</B><DD>a <code>BufferedImage</code> value</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="getFileName()"><!-- --></A><H3>
|
||||
getFileName</H3>
|
||||
<PRE>
|
||||
public java.lang.String <B>getFileName</B>()</PRE>
|
||||
<DL>
|
||||
<DD>Returns the name of the file containing the tileset in a string.
|
||||
<P>
|
||||
<DD><DL>
|
||||
|
||||
<DT><B>Returns:</B><DD>a <code>String</code> value</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="getLargestDimension()"><!-- --></A><H3>
|
||||
getLargestDimension</H3>
|
||||
<PRE>
|
||||
public java.awt.Dimension <B>getLargestDimension</B>()</PRE>
|
||||
<DL>
|
||||
<DD>Returns the dimensions of the largest tile in the tileset.
|
||||
<P>
|
||||
<DD><DL>
|
||||
|
||||
<DT><B>Returns:</B><DD>a <code>Dimension</code> value</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="getDimension(int)"><!-- --></A><H3>
|
||||
getDimension</H3>
|
||||
<PRE>
|
||||
public java.awt.Dimension <B>getDimension</B>(int tileNum)</PRE>
|
||||
<DL>
|
||||
<DD>Returns the dimensions of the tile with the specified id.
|
||||
<P>
|
||||
<DD><DL>
|
||||
<DT><B>Parameters:</B><DD><CODE>tileNum</CODE> - an <code>int</code> value
|
||||
<DT><B>Returns:</B><DD>a <code>Dimension</code> value</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="getExtent(int)"><!-- --></A><H3>
|
||||
getExtent</H3>
|
||||
<PRE>
|
||||
public java.awt.Rectangle <B>getExtent</B>(int tileNum)</PRE>
|
||||
<DL>
|
||||
<DD>Returns the extent of the tile with the specified id.
|
||||
<P>
|
||||
<DD><DL>
|
||||
<DT><B>Parameters:</B><DD><CODE>tileNum</CODE> - an <code>int</code> value
|
||||
<DT><B>Returns:</B><DD>a <code>Rectangle</code> value</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="drawTile(java.awt.Graphics, java.awt.Point, int)"><!-- --></A><H3>
|
||||
drawTile</H3>
|
||||
<PRE>
|
||||
public void <B>drawTile</B>(java.awt.Graphics destination,
|
||||
java.awt.Point coordinates,
|
||||
int tileNum)</PRE>
|
||||
<DL>
|
||||
<DD>Puts the tile with the specified number onto the graphics context
|
||||
passed in at the specified coordinates. Note that the position of
|
||||
the tile will depend on its anchor point, which will be put
|
||||
exactly at the coordinates passed in.
|
||||
<P>
|
||||
<DD><DL>
|
||||
<DT><B>Parameters:</B><DD><CODE>destination</CODE> - the context to which we want to draw the tile.<DD><CODE>coordinates</CODE> - the coordinates at which we want to draw the tile.<DD><CODE>tileNum</CODE> - the number of the tile we want to draw. The tiles
|
||||
will be numbered automatically, from left to right, from top to
|
||||
bottom, when the image file is parsed.</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
<HR>
|
||||
|
||||
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../../../../edu/gatech/cs2335/lemmings/graphics/Renderer.html" title="class in edu.gatech.cs2335.lemmings.graphics"><B>PREV CLASS</B></A>
|
||||
<A HREF="../../../../../edu/gatech/cs2335/lemmings/graphics/TileSet.FrameInformation.html" title="class in edu.gatech.cs2335.lemmings.graphics"><B>NEXT CLASS</B></A></FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="TileSet.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_bottom"></A>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
|
||||
<HR>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
Reference in New Issue
Block a user