Comment format changes.

- Collapsed Javadoc comments for all fields.
- OsuFile now has proper Javadoc comments.
- Fixed various mistakes with comments.

Some changes with enums:
- Changed Class.values() calls to values().
- Changed size() calls to a SIZE field.
- Changed valuesReversed() calls to a VALUES_REVERSED field.
- Removed 'static' from enum declarations.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
Jeffrey Han
2015-01-22 00:44:45 -05:00
parent d6c7476b88
commit c9e14bfc70
32 changed files with 527 additions and 1008 deletions

View File

@@ -34,29 +34,21 @@ public enum HitSound implements SoundController.SoundComponent {
SLIDERTICK ("slidertick"),
SLIDERWHISTLE ("sliderwhistle");
/**
* Sound sample sets.
*/
public static enum SampleSet {
/** Sound sample sets. */
public enum SampleSet {
NORMAL ("normal", 1),
SOFT ("soft", 2),
DRUM ("drum", 3);
// TAIKO ("taiko", 4);
/**
* The sample set name.
*/
/** The sample set name. */
private String name;
/**
* The sample set index.
*/
/** The sample set index. */
private int index;
/**
* Total number of sample sets.
*/
public static final int SIZE = SampleSet.values().length;
/** Total number of sample sets. */
public static final int SIZE = values().length;
/**
* Constructor.
@@ -80,25 +72,17 @@ public enum HitSound implements SoundController.SoundComponent {
public int getIndex() { return index; }
}
/**
* Current sample set.
*/
/** Current sample set. */
private static SampleSet currentSampleSet;
/**
* The file name.
*/
/** The file name. */
private String filename;
/**
* The Clip associated with the hit sound.
*/
/** The Clip associated with the hit sound. */
private HashMap<SampleSet, Clip> clips;
/**
* Total number of hit sounds.
*/
public static final int SIZE = HitSound.values().length;
/** Total number of hit sounds. */
public static final int SIZE = values().length;
/**
* Constructor.

View File

@@ -41,39 +41,25 @@ import org.newdawn.slick.openal.SoundStore;
* Controller for all music.
*/
public class MusicController {
/**
* The current music track.
*/
/** The current music track. */
private static Music player;
/**
* The last OsuFile passed to play().
*/
/** The last OsuFile passed to play(). */
private static OsuFile lastOsu;
/**
* Temporary WAV file for file conversions (to be deleted).
*/
/** Temporary WAV file for file conversions (to be deleted). */
private static File wavFile;
/**
* Thread for loading tracks.
*/
/** Thread for loading tracks. */
private static Thread trackLoader;
/**
* Whether the theme song is currently playing.
*/
/** Whether the theme song is currently playing. */
private static boolean themePlaying = false;
/**
* Track pause time.
*/
/** Track pause time. */
private static float pauseTime = 0f;
/**
* Whether the current track volume is dimmed.
*/
/** Whether the current track volume is dimmed. */
private static boolean trackDimmed = false;
// This class should not be instantiated.

View File

@@ -42,9 +42,7 @@ import org.newdawn.slick.util.ResourceLoader;
* Note: Uses Java Sound because OpenAL lags too much for accurate hit sounds.
*/
public class SoundController {
/**
* Interface for all (non-music) sound components.
*/
/** Interface for all (non-music) sound components. */
public interface SoundComponent {
/**
* Returns the Clip associated with the sound component.
@@ -53,19 +51,13 @@ public class SoundController {
public Clip getClip();
}
/**
* Sample volume multiplier, from timing points [0, 1].
*/
/** Sample volume multiplier, from timing points [0, 1]. */
private static float sampleVolumeMultiplier = 1f;
/**
* The name of the current sound file being loaded.
*/
/** The name of the current sound file being loaded. */
private static String currentFileName;
/**
* The number of the current sound file being loaded.
*/
/** The number of the current sound file being loaded. */
private static int currentFileIndex = -1;
// This class should not be instantiated.

View File

@@ -43,20 +43,14 @@ public enum SoundEffect implements SoundController.SoundComponent {
SPINNEROSU ("spinner-osu"),
SPINNERSPIN ("spinnerspin");
/**
* The file name.
*/
/** The file name. */
private String filename;
/**
* The Clip associated with the sound effect.
*/
/** The Clip associated with the sound effect. */
private Clip clip;
/**
* Total number of sound effects.
*/
public static final int SIZE = SoundEffect.values().length;
/** Total number of sound effects. */
public static final int SIZE = values().length;
/**
* Constructor.