From ef1b05de51049d209c1d4ffa220eecd01843bc16 Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Thu, 12 Feb 2009 16:59:51 -0500 Subject: Engine: Fixed up JavaDoc --- src/com/fourisland/fourpuzzle/Audio.java | 7 ---- src/com/fourisland/fourpuzzle/Direction.java | 3 ++ src/com/fourisland/fourpuzzle/SaveFile.java | 1 + .../fourisland/fourpuzzle/database/Database.java | 28 ++++++------- .../gamestate/mapview/event/LayerEvent.java | 6 ++- .../gamestate/mapview/event/PossibleEvent.java | 4 +- .../gamestate/mapview/event/SpecialEvent.java | 47 ++++++++++------------ .../fourpuzzle/transition/Transition.java | 4 +- 8 files changed, 48 insertions(+), 52 deletions(-) diff --git a/src/com/fourisland/fourpuzzle/Audio.java b/src/com/fourisland/fourpuzzle/Audio.java index 3e40e6a..9083d27 100755 --- a/src/com/fourisland/fourpuzzle/Audio.java +++ b/src/com/fourisland/fourpuzzle/Audio.java @@ -41,13 +41,6 @@ public class Audio { } })); } catch (MidiUnavailableException ex) { - /* TODO Because of the frequent MIDI unavailability, when - * a MIDI sequencer is unavailable, instead of breaking down, - * the application should display a message that something - * went wrong with the sound and that they should attempt - * the game again. - */ - Logger.getLogger(Audio.class.getName()).log(Level.SEVERE, null, ex); } } diff --git a/src/com/fourisland/fourpuzzle/Direction.java b/src/com/fourisland/fourpuzzle/Direction.java index 4fa0908..72ea595 100755 --- a/src/com/fourisland/fourpuzzle/Direction.java +++ b/src/com/fourisland/fourpuzzle/Direction.java @@ -81,18 +81,21 @@ public enum Direction { /** * Returns the direction opposite from the current one + * * @return A Direction representing the wanted direction */ public abstract Direction opposite(); /** * Returns the direction counterclockwise from the current one + * * @return A Direction representing the wanted direction */ public abstract Direction left(); /** * Returns the direction clockwise from the current one + * * @return A Direction representing the wanted direction */ public abstract Direction right(); diff --git a/src/com/fourisland/fourpuzzle/SaveFile.java b/src/com/fourisland/fourpuzzle/SaveFile.java index a98e8bf..44b3cdd 100755 --- a/src/com/fourisland/fourpuzzle/SaveFile.java +++ b/src/com/fourisland/fourpuzzle/SaveFile.java @@ -37,6 +37,7 @@ public class SaveFile implements Serializable { /** * Loads a SaveFile + * * @param file The ID of the SaveFile to load * @throws IOException if the SaveFile specified does not exist */ diff --git a/src/com/fourisland/fourpuzzle/database/Database.java b/src/com/fourisland/fourpuzzle/database/Database.java index 1493a3f..5f37d61 100755 --- a/src/com/fourisland/fourpuzzle/database/Database.java +++ b/src/com/fourisland/fourpuzzle/database/Database.java @@ -23,10 +23,10 @@ public class Database { /** * Sets a Vocabulary definition * - * FourPuzzle uses pre-defined Vocabulary strings in many places such as + *

FourPuzzle uses pre-defined Vocabulary strings in many places such as * for the Title of the game, menu options and more. There are default * values for all of these definitions, but you can change them if you wish, - * using this function. + * using this function.

* * @param key The Vocabulary to set * @param value The value to set the Vocabulary to @@ -39,10 +39,10 @@ public class Database { /** * Adds a Hero to the party * - * When making a game, you need characters, at least one playable character. - * You have to create your characters and use this function to add them to - * the central list of playable characters, or your game will not work. - * There are no default characters, so this is a must-do. + *

When making a game, you need characters, at least one playable + * character. You have to create your characters and use this function to + * add them to the central list of playable characters, or your game will + * not work. There are no default characters, so this is a must-do.

* * @param hero The Hero to add */ @@ -64,10 +64,10 @@ public class Database { /** * Change a default Music value * - * In certain places of your game, such as the Title Screen and Game Over + *

In certain places of your game, such as the Title Screen and Game Over * screen, background music plays. You can tell FourPuzzle what Music to * play during these instances with this function. There are default values - * for all instances, though. + * for all instances, though.

* * @param key The Music instance you wish to change * @param value The name of the Music file you wish to change it to @@ -85,13 +85,13 @@ public class Database { /** * Set a default Transition * - * In certain places, a Transition may be displayed that you did not + *

In certain places, a Transition may be displayed that you did not * directly incur. These are default transitions, but they can be changed - * if you wish by using this function. + * if you wish by using this function.

* - * Warning, all Transition instances have a required type of transition, + *

Warning, all Transition instances have a required type of transition, * whether it be In or Out. If you provide the wrong type of Transition for - * a certain instance, your game will not run. + * a certain instance, your game will not run.

* * @param key The transition to change * @param value The transition to change it to @@ -109,8 +109,8 @@ public class Database { /** * Change a default sound effect * - * Sound Effects are used in many places of the game. The default sound - * effects for certain situations can be changed using this function. + *

Sound Effects are used in many places of the game. The default sound + * effects for certain situations can be changed using this function.

* * @param key The Sound instance to change * @param value The name of the Sound file to change it to diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/LayerEvent.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/LayerEvent.java index 3c826cb..5ff2ed1 100755 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/LayerEvent.java +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/LayerEvent.java @@ -18,7 +18,8 @@ import com.fourisland.fourpuzzle.gamestate.mapview.event.precondition.Preconditi */ public class LayerEvent extends AbstractEvent implements Event { - /** Create a new Event instance + /** + * Create a new Event instance * * @param x The horizontal location of the Event on the Map * @param y The vertical location of the Event on the Map @@ -30,7 +31,8 @@ public class LayerEvent extends AbstractEvent implements Event { label = "Unlabelled"; } - /** Create a new Event instance + /** + * Create a new Event instance * * @param x The horizontal location of the Event on the Map * @param y The vertical location of the Event on the Map diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/PossibleEvent.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/PossibleEvent.java index a8c3a51..62d356a 100755 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/PossibleEvent.java +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/PossibleEvent.java @@ -156,14 +156,14 @@ public class PossibleEvent { /** * Add a precondition to this PossibleEvent * - * PossibleEvents are different versions of a single LayerEvent. A + *

PossibleEvents are different versions of a single LayerEvent. A * LayerEvent may have many PossibleEvents, or none at all. The way it * determines which PossibleEvent is current is that each PossibleEvent * (possibly) has a set of Preconditions, objects that describe * certain situations. If a PossibleEvent's Preconditions are all fulfilled, * it is chosen as the active one. If there are more than one PossibleEvents * with completely fulfilled Preconditions (that includes having no - * Preconditions at all), the later one is the one chosen as current. + * Preconditions at all), the later one is the one chosen as current.

* * @param precondition The Precondition to add to the list */ diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/SpecialEvent.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/SpecialEvent.java index 2b54dc9..40e1536 100755 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/SpecialEvent.java +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/SpecialEvent.java @@ -35,20 +35,16 @@ public class SpecialEvent { /** * Display a message on the screen. * - * Usually used for dialogue. If SetFace() is + *

Usually used for dialogue. If SetFace() is used prior to this, the face + * set is displayed on the left side.

* - * used prior to this, the face set is displayed - * on the left side. + *

Display of the message area can be modified using + * MessageDisplaySettings().

* - * Display of the message area can be modified using - * MessageDisplaySettings(). - * - * This function also automatically splits your - * message up into blocks that will fit on - * the screen (breaks at spaces). If there are too - * many words, they will be held and displayed in - * the message area after the prior message has - * been read. + *

This function also automatically splits your message up into blocks that + * will fit onthe screen (breaks at spaces). If there are too many words, + * they will be held and displayed in the message area after the prior + * message has been read.

* * @param message The message to display * @throws InterruptedException @@ -61,12 +57,12 @@ public class SpecialEvent { /** * Sets the face used when displaying a message * - * See DisplayMessage() for more info + *

See DisplayMessage() for more info

* * @param faceSet The name of the FaceSet to use - * @param face The number of the face in the FaceSet - * to use. The faces are numbered - * horizontally. + * @param face The number of the face in the FaceSet to use. The faces are + * numbered horizontally as in the top-left is 0, the one to the right is 1 + * and so on. */ public void SetFace(String faceSet, int face) { @@ -76,7 +72,7 @@ public class SpecialEvent { /** * Clears the face used when displaying a message * - * See DisplayMessage() for more info + *

See DisplayMessage() for more info

*/ public void EraseFace() { @@ -132,6 +128,7 @@ public class SpecialEvent { /** * Waits until all previously called MoveEvent()s have finished + * * @throws InterruptedException */ public void MoveEventWait() throws InterruptedException @@ -160,10 +157,10 @@ public class SpecialEvent { /** * Displays a transition from the current map to emptiness * - * If this method is executed before Teleport(), Teleport() will not use + *

If this method is executed before Teleport(), Teleport() will not use * the database-default out transition and instead immeditatly jump to the * new map. It will also not use the database-default in transition which - * requires you to also execute EndTransition(). + * requires you to also execute EndTransition().

* * @param trans The transition to use * @throws InterruptedException @@ -181,9 +178,9 @@ public class SpecialEvent { /** * Moves the player to a different map * - * If StartTransition() is executed prior to this method, then this will + *

If StartTransition() is executed prior to this method, then this will * not preform the database-default transitions, which requires that - * EndTransition() is executed after this method. + * EndTransition() is executed after this method.

* * @param map The name of the map to move to * @param x The X position on the map to move to @@ -208,9 +205,9 @@ public class SpecialEvent { /** * Displays a transition from the emptiness to the new map * - * This method is only required if you called StartTransition() before + *

This method is only required if you called StartTransition() before * Teleport(), in which case it will display the transition. Otherwise, - * this action will do nothing. + * this action will do nothing.

* * @param trans * @throws InterruptedException @@ -251,8 +248,8 @@ public class SpecialEvent { * @param x The x coordinate of the tile in the top-left corner to pan to * @param y The y coordinate of the tile in the top-left corner to pan to * @param length How long (in milliseconds) it will take to pan - * @param block If true, the game will wait for the pan to complete - * before executing any more commands + * @param block If true, the game will wait for the pan to complete before + * executing any more commands * @throws InterruptedException */ public void PanViewpoint(final int x, final int y, int length, final boolean block) throws InterruptedException diff --git a/src/com/fourisland/fourpuzzle/transition/Transition.java b/src/com/fourisland/fourpuzzle/transition/Transition.java index e9b6d9f..2a47dc9 100755 --- a/src/com/fourisland/fourpuzzle/transition/Transition.java +++ b/src/com/fourisland/fourpuzzle/transition/Transition.java @@ -27,12 +27,12 @@ public interface Transition { /** * Create another Transition with the same properties * - * This function is used in the Database where default transitions are + *

This function is used in the Database where default transitions are * stored to be used in certain circumstances. When these transitions are * needed, this function is called on them to create a copy of the * Transition with the same parameters. Essentially, this function should * return a new Transition of the same type constructed with the same - * parameters as the Transition this function is being called on. + * parameters as the Transition this function is being called on.

* * @return A copy of the specified Transition */ -- cgit 1.4.1