diff options
author | Starla Insigna <hatkirby@fourisland.com> | 2009-02-12 16:59:51 -0500 |
---|---|---|
committer | Starla Insigna <hatkirby@fourisland.com> | 2009-02-12 16:59:51 -0500 |
commit | ef1b05de51049d209c1d4ffa220eecd01843bc16 (patch) | |
tree | 5005e07cda3bd5ee20862406aa54b9300a1bcade /src | |
parent | bbf294dbf6b552751e5d9f3fb66188bd1bee724b (diff) | |
download | fourpuzzle-ef1b05de51049d209c1d4ffa220eecd01843bc16.tar.gz fourpuzzle-ef1b05de51049d209c1d4ffa220eecd01843bc16.tar.bz2 fourpuzzle-ef1b05de51049d209c1d4ffa220eecd01843bc16.zip |
Engine: Fixed up JavaDoc
Diffstat (limited to 'src')
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 { | |||
41 | } | 41 | } |
42 | })); | 42 | })); |
43 | } catch (MidiUnavailableException ex) { | 43 | } catch (MidiUnavailableException ex) { |
44 | /* TODO Because of the frequent MIDI unavailability, when | ||
45 | * a MIDI sequencer is unavailable, instead of breaking down, | ||
46 | * the application should display a message that something | ||
47 | * went wrong with the sound and that they should attempt | ||
48 | * the game again. | ||
49 | */ | ||
50 | |||
51 | Logger.getLogger(Audio.class.getName()).log(Level.SEVERE, null, ex); | 44 | Logger.getLogger(Audio.class.getName()).log(Level.SEVERE, null, ex); |
52 | } | 45 | } |
53 | } | 46 | } |
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 { | |||
81 | 81 | ||
82 | /** | 82 | /** |
83 | * Returns the direction opposite from the current one | 83 | * Returns the direction opposite from the current one |
84 | * | ||
84 | * @return A Direction representing the wanted direction | 85 | * @return A Direction representing the wanted direction |
85 | */ | 86 | */ |
86 | public abstract Direction opposite(); | 87 | public abstract Direction opposite(); |
87 | 88 | ||
88 | /** | 89 | /** |
89 | * Returns the direction counterclockwise from the current one | 90 | * Returns the direction counterclockwise from the current one |
91 | * | ||
90 | * @return A Direction representing the wanted direction | 92 | * @return A Direction representing the wanted direction |
91 | */ | 93 | */ |
92 | public abstract Direction left(); | 94 | public abstract Direction left(); |
93 | 95 | ||
94 | /** | 96 | /** |
95 | * Returns the direction clockwise from the current one | 97 | * Returns the direction clockwise from the current one |
98 | * | ||
96 | * @return A Direction representing the wanted direction | 99 | * @return A Direction representing the wanted direction |
97 | */ | 100 | */ |
98 | public abstract Direction right(); | 101 | 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 { | |||
37 | 37 | ||
38 | /** | 38 | /** |
39 | * Loads a SaveFile | 39 | * Loads a SaveFile |
40 | * | ||
40 | * @param file The ID of the SaveFile to load | 41 | * @param file The ID of the SaveFile to load |
41 | * @throws IOException if the SaveFile specified does not exist | 42 | * @throws IOException if the SaveFile specified does not exist |
42 | */ | 43 | */ |
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 { | |||
23 | /** | 23 | /** |
24 | * Sets a Vocabulary definition | 24 | * Sets a Vocabulary definition |
25 | * | 25 | * |
26 | * FourPuzzle uses pre-defined Vocabulary strings in many places such as | 26 | * <p>FourPuzzle uses pre-defined Vocabulary strings in many places such as |
27 | * for the Title of the game, menu options and more. There are default | 27 | * for the Title of the game, menu options and more. There are default |
28 | * values for all of these definitions, but you can change them if you wish, | 28 | * values for all of these definitions, but you can change them if you wish, |
29 | * using this function. | 29 | * using this function.</p> |
30 | * | 30 | * |
31 | * @param key The Vocabulary to set | 31 | * @param key The Vocabulary to set |
32 | * @param value The value to set the Vocabulary to | 32 | * @param value The value to set the Vocabulary to |
@@ -39,10 +39,10 @@ public class Database { | |||
39 | /** | 39 | /** |
40 | * Adds a Hero to the party | 40 | * Adds a Hero to the party |
41 | * | 41 | * |
42 | * When making a game, you need characters, at least one playable character. | 42 | * <p>When making a game, you need characters, at least one playable |
43 | * You have to create your characters and use this function to add them to | 43 | * character. You have to create your characters and use this function to |
44 | * the central list of playable characters, or your game will not work. | 44 | * add them to the central list of playable characters, or your game will |
45 | * There are no default characters, so this is a must-do. | 45 | * not work. There are no default characters, so this is a must-do.</p> |
46 | * | 46 | * |
47 | * @param hero The Hero to add | 47 | * @param hero The Hero to add |
48 | */ | 48 | */ |
@@ -64,10 +64,10 @@ public class Database { | |||
64 | /** | 64 | /** |
65 | * Change a default Music value | 65 | * Change a default Music value |
66 | * | 66 | * |
67 | * In certain places of your game, such as the Title Screen and Game Over | 67 | * <p>In certain places of your game, such as the Title Screen and Game Over |
68 | * screen, background music plays. You can tell FourPuzzle what Music to | 68 | * screen, background music plays. You can tell FourPuzzle what Music to |
69 | * play during these instances with this function. There are default values | 69 | * play during these instances with this function. There are default values |
70 | * for all instances, though. | 70 | * for all instances, though.</p> |
71 | * | 71 | * |
72 | * @param key The Music instance you wish to change | 72 | * @param key The Music instance you wish to change |
73 | * @param value The name of the Music file you wish to change it to | 73 | * @param value The name of the Music file you wish to change it to |
@@ -85,13 +85,13 @@ public class Database { | |||
85 | /** | 85 | /** |
86 | * Set a default Transition | 86 | * Set a default Transition |
87 | * | 87 | * |
88 | * In certain places, a Transition may be displayed that you did not | 88 | * <p>In certain places, a Transition may be displayed that you did not |
89 | * directly incur. These are default transitions, but they can be changed | 89 | * directly incur. These are default transitions, but they can be changed |
90 | * if you wish by using this function. | 90 | * if you wish by using this function.</p> |
91 | * | 91 | * |
92 | * Warning, all Transition instances have a required type of transition, | 92 | * <p>Warning, all Transition instances have a required type of transition, |
93 | * whether it be In or Out. If you provide the wrong type of Transition for | 93 | * whether it be In or Out. If you provide the wrong type of Transition for |
94 | * a certain instance, your game will not run. | 94 | * a certain instance, your game will not run.</p> |
95 | * | 95 | * |
96 | * @param key The transition to change | 96 | * @param key The transition to change |
97 | * @param value The transition to change it to | 97 | * @param value The transition to change it to |
@@ -109,8 +109,8 @@ public class Database { | |||
109 | /** | 109 | /** |
110 | * Change a default sound effect | 110 | * Change a default sound effect |
111 | * | 111 | * |
112 | * Sound Effects are used in many places of the game. The default sound | 112 | * <p>Sound Effects are used in many places of the game. The default sound |
113 | * effects for certain situations can be changed using this function. | 113 | * effects for certain situations can be changed using this function.</p> |
114 | * | 114 | * |
115 | * @param key The Sound instance to change | 115 | * @param key The Sound instance to change |
116 | * @param value The name of the Sound file to change it to | 116 | * @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 | |||
18 | */ | 18 | */ |
19 | public class LayerEvent extends AbstractEvent implements Event { | 19 | public class LayerEvent extends AbstractEvent implements Event { |
20 | 20 | ||
21 | /** Create a new Event instance | 21 | /** |
22 | * Create a new Event instance | ||
22 | * | 23 | * |
23 | * @param x The horizontal location of the Event on the Map | 24 | * @param x The horizontal location of the Event on the Map |
24 | * @param y The vertical location of the Event on the Map | 25 | * @param y The vertical location of the Event on the Map |
@@ -30,7 +31,8 @@ public class LayerEvent extends AbstractEvent implements Event { | |||
30 | label = "Unlabelled"; | 31 | label = "Unlabelled"; |
31 | } | 32 | } |
32 | 33 | ||
33 | /** Create a new Event instance | 34 | /** |
35 | * Create a new Event instance | ||
34 | * | 36 | * |
35 | * @param x The horizontal location of the Event on the Map | 37 | * @param x The horizontal location of the Event on the Map |
36 | * @param y The vertical location of the Event on the Map | 38 | * @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 { | |||
156 | /** | 156 | /** |
157 | * Add a precondition to this PossibleEvent | 157 | * Add a precondition to this PossibleEvent |
158 | * | 158 | * |
159 | * PossibleEvents are different versions of a single LayerEvent. A | 159 | * <p>PossibleEvents are different versions of a single LayerEvent. A |
160 | * LayerEvent may have many PossibleEvents, or none at all. The way it | 160 | * LayerEvent may have many PossibleEvents, or none at all. The way it |
161 | * determines which PossibleEvent is current is that each PossibleEvent | 161 | * determines which PossibleEvent is current is that each PossibleEvent |
162 | * (possibly) has a set of <b>Precondition</b>s, objects that describe | 162 | * (possibly) has a set of <b>Precondition</b>s, objects that describe |
163 | * certain situations. If a PossibleEvent's Preconditions are all fulfilled, | 163 | * certain situations. If a PossibleEvent's Preconditions are all fulfilled, |
164 | * it is chosen as the active one. If there are more than one PossibleEvents | 164 | * it is chosen as the active one. If there are more than one PossibleEvents |
165 | * with completely fulfilled Preconditions (that includes having no | 165 | * with completely fulfilled Preconditions (that includes having no |
166 | * Preconditions at all), the later one is the one chosen as current. | 166 | * Preconditions at all), the later one is the one chosen as current.</p> |
167 | * | 167 | * |
168 | * @param precondition The Precondition to add to the list | 168 | * @param precondition The Precondition to add to the list |
169 | */ | 169 | */ |
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 { | |||
35 | /** | 35 | /** |
36 | * Display a message on the screen. | 36 | * Display a message on the screen. |
37 | * | 37 | * |
38 | * Usually used for dialogue. If SetFace() is | 38 | * <p>Usually used for dialogue. If SetFace() is used prior to this, the face |
39 | * set is displayed on the left side.</p> | ||
39 | * | 40 | * |
40 | * used prior to this, the face set is displayed | 41 | * <p>Display of the message area can be modified using |
41 | * on the left side. | 42 | * MessageDisplaySettings().</p> |
42 | * | 43 | * |
43 | * Display of the message area can be modified using | 44 | * <p>This function also automatically splits your message up into blocks that |
44 | * MessageDisplaySettings(). | 45 | * will fit onthe screen (breaks at spaces). If there are too many words, |
45 | * | 46 | * they will be held and displayed in the message area after the prior |
46 | * This function also automatically splits your | 47 | * message has been read.</p> |
47 | * message up into blocks that will fit on | ||
48 | * the screen (breaks at spaces). If there are too | ||
49 | * many words, they will be held and displayed in | ||
50 | * the message area after the prior message has | ||
51 | * been read. | ||
52 | * | 48 | * |
53 | * @param message The message to display | 49 | * @param message The message to display |
54 | * @throws InterruptedException | 50 | * @throws InterruptedException |
@@ -61,12 +57,12 @@ public class SpecialEvent { | |||
61 | /** | 57 | /** |
62 | * Sets the face used when displaying a message | 58 | * Sets the face used when displaying a message |
63 | * | 59 | * |
64 | * See DisplayMessage() for more info | 60 | * <p>See DisplayMessage() for more info</p> |
65 | * | 61 | * |
66 | * @param faceSet The name of the FaceSet to use | 62 | * @param faceSet The name of the FaceSet to use |
67 | * @param face The number of the face in the FaceSet | 63 | * @param face The number of the face in the FaceSet to use. The faces are |
68 | * to use. The faces are numbered | 64 | * numbered horizontally as in the top-left is 0, the one to the right is 1 |
69 | * horizontally. | 65 | * and so on. |
70 | */ | 66 | */ |
71 | public void SetFace(String faceSet, int face) | 67 | public void SetFace(String faceSet, int face) |
72 | { | 68 | { |
@@ -76,7 +72,7 @@ public class SpecialEvent { | |||
76 | /** | 72 | /** |
77 | * Clears the face used when displaying a message | 73 | * Clears the face used when displaying a message |
78 | * | 74 | * |
79 | * See DisplayMessage() for more info | 75 | * <p>See DisplayMessage() for more info</p> |
80 | */ | 76 | */ |
81 | public void EraseFace() | 77 | public void EraseFace() |
82 | { | 78 | { |
@@ -132,6 +128,7 @@ public class SpecialEvent { | |||
132 | 128 | ||
133 | /** | 129 | /** |
134 | * Waits until all previously called MoveEvent()s have finished | 130 | * Waits until all previously called MoveEvent()s have finished |
131 | * | ||
135 | * @throws InterruptedException | 132 | * @throws InterruptedException |
136 | */ | 133 | */ |
137 | public void MoveEventWait() throws InterruptedException | 134 | public void MoveEventWait() throws InterruptedException |
@@ -160,10 +157,10 @@ public class SpecialEvent { | |||
160 | /** | 157 | /** |
161 | * Displays a transition from the current map to emptiness | 158 | * Displays a transition from the current map to emptiness |
162 | * | 159 | * |
163 | * If this method is executed before Teleport(), Teleport() will not use | 160 | * <p>If this method is executed before Teleport(), Teleport() will not use |
164 | * the database-default out transition and instead immeditatly jump to the | 161 | * the database-default out transition and instead immeditatly jump to the |
165 | * new map. It will also not use the database-default in transition which | 162 | * new map. It will also not use the database-default in transition which |
166 | * requires you to also execute EndTransition(). | 163 | * requires you to also execute EndTransition().</p> |
167 | * | 164 | * |
168 | * @param trans The transition to use | 165 | * @param trans The transition to use |
169 | * @throws InterruptedException | 166 | * @throws InterruptedException |
@@ -181,9 +178,9 @@ public class SpecialEvent { | |||
181 | /** | 178 | /** |
182 | * Moves the player to a different map | 179 | * Moves the player to a different map |
183 | * | 180 | * |
184 | * If StartTransition() is executed prior to this method, then this will | 181 | * <p>If StartTransition() is executed prior to this method, then this will |
185 | * not preform the database-default transitions, which requires that | 182 | * not preform the database-default transitions, which requires that |
186 | * EndTransition() is executed after this method. | 183 | * EndTransition() is executed after this method.</p> |
187 | * | 184 | * |
188 | * @param map The name of the map to move to | 185 | * @param map The name of the map to move to |
189 | * @param x The X position on the map to move to | 186 | * @param x The X position on the map to move to |
@@ -208,9 +205,9 @@ public class SpecialEvent { | |||
208 | /** | 205 | /** |
209 | * Displays a transition from the emptiness to the new map | 206 | * Displays a transition from the emptiness to the new map |
210 | * | 207 | * |
211 | * This method is only required if you called StartTransition() before | 208 | * <p>This method is only required if you called StartTransition() before |
212 | * Teleport(), in which case it will display the transition. Otherwise, | 209 | * Teleport(), in which case it will display the transition. Otherwise, |
213 | * this action will do nothing. | 210 | * this action will do nothing.</p> |
214 | * | 211 | * |
215 | * @param trans | 212 | * @param trans |
216 | * @throws InterruptedException | 213 | * @throws InterruptedException |
@@ -251,8 +248,8 @@ public class SpecialEvent { | |||
251 | * @param x The x coordinate of the tile in the top-left corner to pan to | 248 | * @param x The x coordinate of the tile in the top-left corner to pan to |
252 | * @param y The y coordinate of the tile in the top-left corner to pan to | 249 | * @param y The y coordinate of the tile in the top-left corner to pan to |
253 | * @param length How long (in milliseconds) it will take to pan | 250 | * @param length How long (in milliseconds) it will take to pan |
254 | * @param block If true, the game will wait for the pan to complete | 251 | * @param block If true, the game will wait for the pan to complete before |
255 | * before executing any more commands | 252 | * executing any more commands |
256 | * @throws InterruptedException | 253 | * @throws InterruptedException |
257 | */ | 254 | */ |
258 | public void PanViewpoint(final int x, final int y, int length, final boolean block) throws InterruptedException | 255 | 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 { | |||
27 | /** | 27 | /** |
28 | * Create another Transition with the same properties | 28 | * Create another Transition with the same properties |
29 | * | 29 | * |
30 | * This function is used in the Database where default transitions are | 30 | * <p>This function is used in the Database where default transitions are |
31 | * stored to be used in certain circumstances. When these transitions are | 31 | * stored to be used in certain circumstances. When these transitions are |
32 | * needed, this function is called on them to create a copy of the | 32 | * needed, this function is called on them to create a copy of the |
33 | * Transition with the same parameters. Essentially, this function should | 33 | * Transition with the same parameters. Essentially, this function should |
34 | * return a new Transition of the same type constructed with the same | 34 | * return a new Transition of the same type constructed with the same |
35 | * parameters as the Transition this function is being called on. | 35 | * parameters as the Transition this function is being called on.</p> |
36 | * | 36 | * |
37 | * @return A copy of the specified Transition | 37 | * @return A copy of the specified Transition |
38 | */ | 38 | */ |