first commit
This commit is contained in:
@@ -0,0 +1,377 @@
|
||||
<!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>
|
||||
LevelReader
|
||||
</TITLE>
|
||||
|
||||
<META NAME="keywords" CONTENT="edu.gatech.cs2335.lemmings.file.LevelReader class">
|
||||
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
|
||||
|
||||
<SCRIPT type="text/javascript">
|
||||
function windowTitle()
|
||||
{
|
||||
parent.document.title="LevelReader";
|
||||
}
|
||||
</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">
|
||||
PREV CLASS
|
||||
NEXT CLASS</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="LevelReader.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: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: FIELD | CONSTR | <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.file</FONT>
|
||||
<BR>
|
||||
Class LevelReader</H2>
|
||||
<PRE>
|
||||
java.lang.Object
|
||||
<IMG SRC="../../../../../resources/inherit.gif" ALT="extended by"><B>edu.gatech.cs2335.lemmings.file.LevelReader</B>
|
||||
</PRE>
|
||||
<HR>
|
||||
<DL>
|
||||
<DT>public class <B>LevelReader</B><DT>extends java.lang.Object</DL>
|
||||
|
||||
<P>
|
||||
Allows us to read level data, maps and other nice stuff. The string
|
||||
passed in to any of the "load" methods is basically the id of the
|
||||
level. The loader then tests if there is a directory with the same
|
||||
name in the levels list. If there is one, then it loads the level
|
||||
from it. If there is no such directory, then is appends a .lmf
|
||||
extension to it and checks wether there is a file with that
|
||||
name. If there is, it extracts the file and then loads the level
|
||||
from that. If there is no such file, then the loading fails and
|
||||
null is returned.
|
||||
<P>
|
||||
|
||||
<P>
|
||||
<DL>
|
||||
<DT><B>Version:</B></DT>
|
||||
<DD>1.0</DD>
|
||||
<DT><B>Author:</B></DT>
|
||||
<DD><A HREF="mailto:gtg308i@mail.gatech.edu">Vladimir Urazov</A></DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<P>
|
||||
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
||||
|
||||
|
||||
<!-- =========== FIELD SUMMARY =========== -->
|
||||
|
||||
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
|
||||
|
||||
<!-- ========== 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> java.lang.String</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../../../edu/gatech/cs2335/lemmings/file/LevelReader.html#findNextLevel(java.lang.String)">findNextLevel</A></B>(java.lang.String id)</CODE>
|
||||
|
||||
<BR>
|
||||
Given the id of a level, finds the next level.</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE>static <A HREF="../../../../../edu/gatech/cs2335/lemmings/file/LevelReader.html" title="class in edu.gatech.cs2335.lemmings.file">LevelReader</A></CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../../../edu/gatech/cs2335/lemmings/file/LevelReader.html#getInstance()">getInstance</A></B>()</CODE>
|
||||
|
||||
<BR>
|
||||
Access method for the INSTANCE property.</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/file/LevelReader.html#getLevelList()">getLevelList</A></B>()</CODE>
|
||||
|
||||
<BR>
|
||||
Returns the list of all levels available.</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> <A HREF="../../../../../edu/gatech/cs2335/lemmings/engine/Level.html" title="class in edu.gatech.cs2335.lemmings.engine">Level</A></CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../../../edu/gatech/cs2335/lemmings/file/LevelReader.html#loadLevel(java.lang.String)">loadLevel</A></B>(java.lang.String name)</CODE>
|
||||
|
||||
<BR>
|
||||
Loads the level with the name specified if possible.</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> <A HREF="../../../../../edu/gatech/cs2335/lemmings/engine/LevelData.html" title="class in edu.gatech.cs2335.lemmings.engine">LevelData</A></CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../../../edu/gatech/cs2335/lemmings/file/LevelReader.html#loadLevelData(java.lang.String)">loadLevelData</A></B>(java.lang.String name)</CODE>
|
||||
|
||||
<BR>
|
||||
Loads the data for the level with the specified name.</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> <A HREF="../../../../../edu/gatech/cs2335/lemmings/engine/Map.html" title="class in edu.gatech.cs2335.lemmings.engine">Map</A></CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../../../edu/gatech/cs2335/lemmings/file/LevelReader.html#loadMap(java.lang.String)">loadMap</A></B>(java.lang.String name)</CODE>
|
||||
|
||||
<BR>
|
||||
Loads the map for the level with the specified name.</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE>static void</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../../../edu/gatech/cs2335/lemmings/file/LevelReader.html#main(java.lang.String[])">main</A></B>(java.lang.String[] args)</CODE>
|
||||
|
||||
<BR>
|
||||
</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 =========== -->
|
||||
|
||||
|
||||
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||||
|
||||
|
||||
<!-- ============ 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="getInstance()"><!-- --></A><H3>
|
||||
getInstance</H3>
|
||||
<PRE>
|
||||
public static <A HREF="../../../../../edu/gatech/cs2335/lemmings/file/LevelReader.html" title="class in edu.gatech.cs2335.lemmings.file">LevelReader</A> <B>getInstance</B>()</PRE>
|
||||
<DL>
|
||||
<DD>Access method for the INSTANCE property.
|
||||
<P>
|
||||
<DD><DL>
|
||||
|
||||
<DT><B>Returns:</B><DD>the current value of the INSTANCE property</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="getLevelList()"><!-- --></A><H3>
|
||||
getLevelList</H3>
|
||||
<PRE>
|
||||
public java.lang.String[] <B>getLevelList</B>()</PRE>
|
||||
<DL>
|
||||
<DD>Returns the list of all levels available. The elements in the
|
||||
list returned are String ids of the available levels.
|
||||
<P>
|
||||
<DD><DL>
|
||||
|
||||
<DT><B>Returns:</B><DD>The array of ids of the levels.</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="findNextLevel(java.lang.String)"><!-- --></A><H3>
|
||||
findNextLevel</H3>
|
||||
<PRE>
|
||||
public java.lang.String <B>findNextLevel</B>(java.lang.String id)</PRE>
|
||||
<DL>
|
||||
<DD>Given the id of a level, finds the next level. Basically, if the
|
||||
level id cannot be found in the list, returns the first element
|
||||
of the list. If the level id is the last level, returns null.
|
||||
<P>
|
||||
<DD><DL>
|
||||
<DT><B>Parameters:</B><DD><CODE>id</CODE> - a <code>String</code> value
|
||||
<DT><B>Returns:</B><DD>a <code>String</code> value</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="loadLevel(java.lang.String)"><!-- --></A><H3>
|
||||
loadLevel</H3>
|
||||
<PRE>
|
||||
public <A HREF="../../../../../edu/gatech/cs2335/lemmings/engine/Level.html" title="class in edu.gatech.cs2335.lemmings.engine">Level</A> <B>loadLevel</B>(java.lang.String name)</PRE>
|
||||
<DL>
|
||||
<DD>Loads the level with the name specified if possible. Otherwise,
|
||||
returns null.
|
||||
<P>
|
||||
<DD><DL>
|
||||
<DT><B>Parameters:</B><DD><CODE>name</CODE> - The name of the level to load.
|
||||
<DT><B>Returns:</B><DD>Level</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="loadMap(java.lang.String)"><!-- --></A><H3>
|
||||
loadMap</H3>
|
||||
<PRE>
|
||||
public <A HREF="../../../../../edu/gatech/cs2335/lemmings/engine/Map.html" title="class in edu.gatech.cs2335.lemmings.engine">Map</A> <B>loadMap</B>(java.lang.String name)</PRE>
|
||||
<DL>
|
||||
<DD>Loads the map for the level with the specified name.
|
||||
<P>
|
||||
<DD><DL>
|
||||
<DT><B>Parameters:</B><DD><CODE>name</CODE> - a <code>String</code> value
|
||||
<DT><B>Returns:</B><DD>a <code>Map</code> value</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="loadLevelData(java.lang.String)"><!-- --></A><H3>
|
||||
loadLevelData</H3>
|
||||
<PRE>
|
||||
public <A HREF="../../../../../edu/gatech/cs2335/lemmings/engine/LevelData.html" title="class in edu.gatech.cs2335.lemmings.engine">LevelData</A> <B>loadLevelData</B>(java.lang.String name)</PRE>
|
||||
<DL>
|
||||
<DD>Loads the data for the level with the specified name.
|
||||
<P>
|
||||
<DD><DL>
|
||||
<DT><B>Parameters:</B><DD><CODE>name</CODE> - The name of the level to load the data for.
|
||||
<DT><B>Returns:</B><DD>LevelData</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="main(java.lang.String[])"><!-- --></A><H3>
|
||||
main</H3>
|
||||
<PRE>
|
||||
public static void <B>main</B>(java.lang.String[] args)</PRE>
|
||||
<DL>
|
||||
<DD><DL>
|
||||
<DT><B>Parameters:</B><DD><CODE>args</CODE> - args</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">
|
||||
PREV CLASS
|
||||
NEXT CLASS</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="LevelReader.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: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: FIELD | CONSTR | <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