Changed @author to real name

This commit is contained in:
2014-05-25 00:49:06 +02:00
parent 5963ec62a7
commit f862708ddd
278 changed files with 404 additions and 2124 deletions
+2 -2
View File
@@ -15,7 +15,7 @@ import mightypork.gamecore.util.files.config.PropertyManager;
/**
* Static application configuration
*
* @author MightyPork
* @author Ondřej Hruška
*/
public class Config {
@@ -63,7 +63,7 @@ public class Config {
* Key property.<br>
* The stored value must be invariant ({@link KeyStroke} is mutable).
*
* @author MightyPork
* @author Ondřej Hruška
*/
public static class KeyProperty extends Property<KeyStroke> {
+1 -1
View File
@@ -11,7 +11,7 @@ import mightypork.gamecore.logging.Log;
/**
* Static application workdir accessor.
*
* @author MightyPork
* @author Ondřej Hruška
*/
public class WorkDir {
@@ -9,7 +9,7 @@ import mightypork.gamecore.eventbus.event_flags.SingleReceiverEvent;
/**
* Request to execute given {@link Runnable} in main loop.
*
* @author MightyPork
* @author Ondřej Hruška
*/
@SingleReceiverEvent
public class MainLoopRequest extends BusEvent<MainLoop> {
@@ -5,14 +5,13 @@ import mightypork.gamecore.core.modules.MainLoop;
import mightypork.gamecore.eventbus.BusEvent;
import mightypork.gamecore.eventbus.event_flags.NonConsumableEvent;
import mightypork.gamecore.eventbus.event_flags.SingleReceiverEvent;
import mightypork.gamecore.resources.audio.SoundSystem;
/**
* Shutdown request, non-interactive. Shutdown needs to execute on GL thread for
* display to deinit properly.
*
* @author MightyPork
* @author Ondřej Hruška
*/
@SingleReceiverEvent
@NonConsumableEvent
@@ -10,7 +10,7 @@ import mightypork.gamecore.eventbus.EventBus;
* titlebar button, and if no client consumes it, the application will be shut
* down.
*
* @author MightyPork
* @author Ondřej Hruška
*/
public class UserQuitRequest extends BusEvent<UserQuitRequestListener> {
@@ -4,7 +4,7 @@ package mightypork.gamecore.core.events;
/**
* Quit request listener; implementing client can abort shutdown.
*
* @author MightyPork
* @author Ondřej Hruška
*/
public interface UserQuitRequestListener {
@@ -10,7 +10,7 @@ import mightypork.gamecore.resources.audio.SoundSystem;
/**
* App interface visible to subsystems
*
* @author MightyPork
* @author Ondřej Hruška
*/
public interface AppAccess extends BusAccess {
@@ -10,7 +10,7 @@ import mightypork.gamecore.resources.audio.SoundSystem;
/**
* App access adapter (defualt {@link AppAccess} implementation)
*
* @author MightyPork
* @author Ondřej Hruška
*/
public class AppAccessAdapter implements AppAccess {
@@ -11,7 +11,7 @@ import mightypork.gamecore.resources.audio.SoundSystem;
* App event bus client, to be used for subsystems, screens and anything that
* needs access to the eventbus and other systems; Attached directly to bus.
*
* @author MightyPork
* @author Ondřej Hruška
*/
public abstract class AppModule extends RootBusNode implements AppAccess {
@@ -13,7 +13,7 @@ import mightypork.gamecore.resources.audio.SoundSystem;
* Delegating bus client, to be attached to any {@link DelegatingClient}, such
* as a {@link RootBusNode}.
*
* @author MightyPork
* @author Ondřej Hruška
*/
public class AppSubModule extends BusNode implements AppAccess {
@@ -11,9 +11,9 @@ import java.util.logging.Level;
import javax.swing.JOptionPane;
import mightypork.gamecore.core.Config;
import mightypork.gamecore.core.WorkDir;
import mightypork.gamecore.core.Config.ConfigSetup;
import mightypork.gamecore.core.Config.KeySetup;
import mightypork.gamecore.core.WorkDir;
import mightypork.gamecore.core.WorkDir.RouteSetup;
import mightypork.gamecore.eventbus.EventBus;
import mightypork.gamecore.eventbus.events.DestroyEvent;
@@ -31,16 +31,16 @@ import mightypork.gamecore.resources.ResourceSetup;
import mightypork.gamecore.resources.audio.SoundSystem;
import mightypork.gamecore.util.annot.DefaultImpl;
import mightypork.gamecore.util.files.InstanceLock;
import mightypork.gamecore.util.ion.Ion;
import mightypork.gamecore.util.math.algo.Coord;
import mightypork.gamecore.util.math.algo.Move;
import mightypork.ion.Ion;
/**
* Basic screen-based game with subsystems.<br>
* This class takes care of the initialization sequence.
*
* @author MightyPork
* @author Ondřej Hruška
*/
public abstract class BaseApp implements AppAccess, UncaughtExceptionHandler {
@@ -320,8 +320,8 @@ public abstract class BaseApp implements AppAccess, UncaughtExceptionHandler {
{
logSystemInfo();
}
protected void logSystemInfo()
{
String txt = "";
@@ -344,8 +344,8 @@ public abstract class BaseApp implements AppAccess, UncaughtExceptionHandler {
protected void registerIonizables()
{
Ion.registerType(Coord.ION_MARK, Coord.class);
Ion.registerType(Move.ION_MARK, Move.class);
Ion.register(Coord.class);
Ion.register(Move.class);
}
@@ -2,9 +2,7 @@ package mightypork.gamecore.core.modules;
import java.util.Deque;
import java.util.Queue;
import java.util.concurrent.ConcurrentLinkedDeque;
import java.util.concurrent.ConcurrentLinkedQueue;
import mightypork.gamecore.eventbus.events.UpdateEvent;
import mightypork.gamecore.gui.screens.ScreenRegistry;
@@ -21,7 +19,7 @@ import mightypork.gamecore.util.math.timing.TimerDelta;
/**
* Delta-timed game loop with task queue etc.
*
* @author MightyPork
* @author Ondřej Hruška
*/
public class MainLoop extends AppModule implements ScreenshotRequestListener {
@@ -74,7 +72,7 @@ public class MainLoop extends AppModule implements ScreenshotRequestListener {
getEventBus().sendDirect(new UpdateEvent(delta));
Runnable r;
long t = Profiler.begin();
final long t = Profiler.begin();
while ((r = tasks.poll()) != null) {
Log.f3(" * Main loop task.");
r.run();
@@ -4,7 +4,7 @@ package mightypork.gamecore.eventbus;
/**
* Access to an {@link EventBus} instance
*
* @author MightyPork
* @author Ondřej Hruška
*/
public interface BusAccess {
@@ -27,7 +27,7 @@ import mightypork.gamecore.eventbus.event_flags.SingleReceiverEvent;
* zero delay.
* </p>
*
* @author MightyPork
* @author Ondřej Hruška
* @param <HANDLER> handler type
*/
public abstract class BusEvent<HANDLER> {
@@ -7,7 +7,6 @@ import java.util.Collection;
import java.util.Collections;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentLinkedDeque;
import java.util.concurrent.DelayQueue;
import java.util.concurrent.Delayed;
import java.util.concurrent.TimeUnit;
@@ -25,7 +24,7 @@ import mightypork.gamecore.util.Utils;
* An event bus, accommodating multiple EventChannels.<br>
* Channel will be created when an event of type is first encountered.
*
* @author MightyPork
* @author Ondřej Hruška
*/
final public class EventBus implements Destroyable, BusAccess {
@@ -135,13 +134,13 @@ final public class EventBus implements Destroyable, BusAccess {
private final QueuePollingThread busThread;
/** Registered clients */
private final Set<Object> clients = Collections.newSetFromMap(new ConcurrentHashMap<Object,Boolean>());
private final Set<Object> clients = Collections.newSetFromMap(new ConcurrentHashMap<Object, Boolean>());
/** Whether the bus was destroyed */
private boolean dead = false;
/** Message channels */
private final Set<EventChannel<?, ?>> channels = Collections.newSetFromMap(new ConcurrentHashMap<EventChannel<?, ?>,Boolean>());
private final Set<EventChannel<?, ?>> channels = Collections.newSetFromMap(new ConcurrentHashMap<EventChannel<?, ?>, Boolean>());
/** Messages queued for delivery */
private final DelayQueue<DelayQueueEntry> sendQueue = new DelayQueue<>();
@@ -14,7 +14,7 @@ import mightypork.gamecore.util.Utils;
/**
* Event delivery channel, module of {@link EventBus}
*
* @author MightyPork
* @author Ondřej Hruška
* @param <EVENT> event type
* @param <CLIENT> client (subscriber) type
*/
@@ -13,7 +13,7 @@ import mightypork.gamecore.eventbus.EventBus;
* Client that can be attached to the {@link EventBus}, or added as a child
* client to another {@link DelegatingClient}
*
* @author MightyPork
* @author Ondřej Hruška
*/
public abstract class BusNode implements BusAccess, ClientHub {
@@ -9,7 +9,7 @@ import mightypork.gamecore.eventbus.EventBus;
/**
* Common methods for client hubs (ie delegating vlient implementations)
*
* @author MightyPork
* @author Ondřej Hruška
*/
public interface ClientHub extends DelegatingClient, ToggleableClient {
@@ -7,7 +7,7 @@ import java.util.ArrayList;
/**
* Array-list with varargs constructor
*
* @author MightyPork
* @author Ondřej Hruška
*/
public class ClientList extends ArrayList<Object> {
@@ -9,7 +9,7 @@ import java.util.Collection;
* of clients is ordered, the clients will be served in that order. In any case,
* the {@link DelegatingClient} itself will be served beforehand.
*
* @author MightyPork
* @author Ondřej Hruška
*/
public interface DelegatingClient {
@@ -9,7 +9,7 @@ import mightypork.gamecore.gui.Enableable;
/**
* Basic delegating client
*
* @author MightyPork
* @author Ondřej Hruška
*/
public class DelegatingList extends ClientList implements DelegatingClient, Enableable {
@@ -9,7 +9,7 @@ import mightypork.gamecore.util.annot.DefaultImpl;
/**
* Bus node that should be directly attached to the bus.
*
* @author MightyPork
* @author Ondřej Hruška
*/
public abstract class RootBusNode extends BusNode implements Destroyable {
@@ -4,7 +4,7 @@ package mightypork.gamecore.eventbus.clients;
/**
* Client that can toggle receiving messages.
*
* @author MightyPork
* @author Ondřej Hruška
*/
public interface ToggleableClient {
@@ -7,7 +7,7 @@ import java.lang.annotation.*;
/**
* Event that should be queued with given delay (default: 0);
*
* @author MightyPork
* @author Ondřej Hruška
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@@ -7,7 +7,7 @@ import java.lang.annotation.*;
/**
* Event that should not be queued.
*
* @author MightyPork
* @author Ondřej Hruška
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@@ -11,7 +11,7 @@ import java.lang.annotation.Target;
/**
* Event that cannot be consumed
*
* @author MightyPork
* @author Ondřej Hruška
*/
@Retention(RetentionPolicy.RUNTIME)
@Documented
@@ -11,7 +11,7 @@ import java.lang.annotation.Target;
/**
* Event that is forcibly delivered to all clients (bypass Toggleable etc)
*
* @author MightyPork
* @author Ondřej Hruška
*/
@Retention(RetentionPolicy.RUNTIME)
@Documented
@@ -8,7 +8,7 @@ import java.lang.annotation.*;
* Event that's not worth logging, unless there was an error with it.<br>
* Useful for common events that would otherwise clutter the log.
*
* @author MightyPork
* @author Ondřej Hruška
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@@ -7,7 +7,7 @@ import java.lang.annotation.*;
/**
* Handled only by the first client, then discarded.
*
* @author MightyPork
* @author Ondřej Hruška
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@@ -9,7 +9,7 @@ import mightypork.gamecore.eventbus.event_flags.NonConsumableEvent;
/**
* Invoke destroy() method of all subscribers. Used to deinit a system.
*
* @author MightyPork
* @author Ondřej Hruška
*/
@DirectEvent
@NonConsumableEvent
@@ -4,7 +4,7 @@ package mightypork.gamecore.eventbus.events;
/**
* Object that can be destroyed (free resources etc)
*
* @author MightyPork
* @author Ondřej Hruška
*/
public interface Destroyable {
@@ -10,7 +10,7 @@ import mightypork.gamecore.eventbus.event_flags.NotLoggedEvent;
/**
* Delta timing update event. Not logged.
*
* @author MightyPork
* @author Ondřej Hruška
*/
@NotLoggedEvent
@DirectEvent
@@ -4,7 +4,7 @@ package mightypork.gamecore.eventbus.events;
/**
* Uses delta timing
*
* @author MightyPork
* @author Ondřej Hruška
*/
public interface Updateable {
+1 -1
View File
@@ -4,7 +4,7 @@ package mightypork.gamecore.gui;
/**
* Triggered action
*
* @author MightyPork
* @author Ondřej Hruška
*/
public abstract class Action implements Runnable, Enableable {
@@ -4,7 +4,7 @@ package mightypork.gamecore.gui;
/**
* Element that can be assigned an action (ie. button);
*
* @author MightyPork
* @author Ondřej Hruška
*/
public interface ActionTrigger {
+1 -1
View File
@@ -4,7 +4,7 @@ package mightypork.gamecore.gui;
/**
* Horizontal align sides
*
* @author MightyPork
* @author Ondřej Hruška
*/
public enum AlignX
{
+1 -1
View File
@@ -4,7 +4,7 @@ package mightypork.gamecore.gui;
/**
* Vertical align sides
*
* @author MightyPork
* @author Ondřej Hruška
*/
public enum AlignY
{
+1 -1
View File
@@ -6,7 +6,7 @@ package mightypork.gamecore.gui;
* Implementations should take appropriate action (ie. stop listening to events,
* updating etc.)
*
* @author MightyPork
* @author Ondřej Hruška
*/
public interface Enableable {
+1 -1
View File
@@ -4,7 +4,7 @@ package mightypork.gamecore.gui;
/**
* Element that can be hidden or visible
*
* @author MightyPork
* @author Ondřej Hruška
*/
public interface Hideable {
@@ -20,7 +20,7 @@ import mightypork.gamecore.util.math.constraints.rect.proxy.RectBoundAdapter;
* {@link Renderable} with pluggable context. When caching is enabled, the
* layout update can be triggered by firing the {@link LayoutChangeEvent}.
*
* @author MightyPork
* @author Ondřej Hruška
*/
public abstract class BaseComponent extends AbstractRectCache implements Component, LayoutChangeListener, Enableable {
@@ -9,7 +9,7 @@ import mightypork.gamecore.util.math.constraints.num.Num;
/**
* Basic UI component interface
*
* @author MightyPork
* @author Ondřej Hruška
*/
public interface Component extends Enableable, Hideable, PluggableRenderable {
@@ -10,7 +10,7 @@ import mightypork.gamecore.util.math.constraints.rect.proxy.RectBound;
/**
* Renderable that can be assigned different context
*
* @author MightyPork
* @author Ondřej Hruška
*/
public interface PluggableRenderable extends Renderable, PluggableRectBound {
@@ -15,7 +15,7 @@ import mightypork.gamecore.util.math.constraints.vect.mutable.VectVar;
/**
* Menu-like button with shadow and push state
*
* @author MightyPork
* @author Ondřej Hruška
*/
public class TextButton extends ClickableComponent implements DynamicWidthComponent {
@@ -10,7 +10,7 @@ import mightypork.gamecore.util.math.constraints.rect.proxy.RectBound;
/**
* Layout for components with arbitrary constraints.
*
* @author MightyPork
* @author Ondřej Hruška
*/
public class ConstraintLayout extends LayoutComponent {
@@ -13,7 +13,7 @@ import mightypork.gamecore.util.math.constraints.rect.proxy.RectBound;
/**
* Holder with same-sized columns, aligned to left or right
*
* @author MightyPork
* @author Ondřej Hruška
*/
public class FlowColumnLayout extends LayoutComponent {
@@ -13,7 +13,7 @@ import mightypork.gamecore.util.math.constraints.rect.proxy.RectBound;
/**
* Holder with same-sized rows, aligned to top or bottom
*
* @author MightyPork
* @author Ondřej Hruška
*/
public class FlowRowLayout extends LayoutComponent {
@@ -11,7 +11,7 @@ import mightypork.gamecore.util.math.constraints.rect.proxy.RectBound;
/**
* Holder with table cells
*
* @author MightyPork
* @author Ondřej Hruška
*/
public class GridLayout extends LayoutComponent {
@@ -7,7 +7,7 @@ import mightypork.gamecore.gui.components.BaseComponent;
/**
* Invisible component that does nothing at all; Null object pattern
*
* @author MightyPork
* @author Ondřej Hruška
*/
public class NullComponent extends BaseComponent {
@@ -12,7 +12,7 @@ import mightypork.gamecore.gui.components.LinearComponent;
/**
* Converts a component into a linear component
*
* @author MightyPork
* @author Ondřej Hruška
*/
public abstract class AbstractLinearWrapper extends LinearComponent implements DelegatingClient {
@@ -8,7 +8,7 @@ import mightypork.gamecore.util.math.constraints.num.Num;
/**
* Gap in linear layout
*
* @author MightyPork
* @author Ondřej Hruška
*/
public class LinearGap extends LinearRectangle {
@@ -10,7 +10,7 @@ import mightypork.gamecore.resources.textures.TxQuad;
/**
* Draws image in given rect
*
* @author MightyPork
* @author Ondřej Hruška
*/
public class ImagePainter extends BaseComponent implements DynamicWidthComponent {
@@ -10,7 +10,7 @@ import mightypork.gamecore.util.math.color.Color;
/**
* Draws image in given rect
*
* @author MightyPork
* @author Ondřej Hruška
*/
public class QuadPainter extends BaseComponent {
@@ -19,7 +19,7 @@ import mightypork.gamecore.util.strings.StringWrapper;
/**
* Text painting component.
*
* @author MightyPork
* @author Ondřej Hruška
*/
public class TextPainter extends BaseComponent implements DynamicWidthComponent {
@@ -11,7 +11,7 @@ import mightypork.gamecore.eventbus.event_flags.NonRejectableEvent;
* Intended use is to notify UI component sub-clients that they should poll
* their cached constraints.
*
* @author MightyPork
* @author Ondřej Hruška
*/
@DirectEvent
@NonConsumableEvent
@@ -8,7 +8,7 @@ import mightypork.gamecore.eventbus.event_flags.SingleReceiverEvent;
/**
* Request to change screen
*
* @author MightyPork
* @author Ondřej Hruška
*/
@SingleReceiverEvent
public class ScreenRequest extends BusEvent<ScreenRequestListener> {
@@ -4,7 +4,7 @@ package mightypork.gamecore.gui.events;
/**
* {@link ScreenRequest} listener
*
* @author MightyPork
* @author Ondřej Hruška
*/
public interface ScreenRequestListener {
@@ -14,14 +14,14 @@ import mightypork.gamecore.eventbus.clients.DelegatingClient;
/**
* Screen with multiple instances of {@link ScreenLayer}
*
* @author MightyPork
* @author Ondřej Hruška
*/
public abstract class LayeredScreen extends Screen {
/**
* Wrapper for delegating client, to use custom client ordering.
*
* @author MightyPork
* @author Ondřej Hruška
*/
private class LayersClient implements DelegatingClient {
@@ -26,7 +26,7 @@ import mightypork.gamecore.util.math.constraints.vect.Vect;
* Abstract overlay.<br>
* Overlay is connected to event bus and is renderable.
*
* @author MightyPork
* @author Ondřej Hruška
*/
public abstract class Overlay extends AppSubModule implements Comparable<Overlay>, Updateable, Renderable, KeyBinder, Hideable, Enableable,
LayoutChangeListener {
@@ -20,7 +20,7 @@ import mightypork.gamecore.util.math.constraints.rect.proxy.RectBound;
/**
* Screen class.
*
* @author MightyPork
* @author Ondřej Hruška
*/
public abstract class Screen extends AppSubModule implements Renderable, RectBound, KeyBinder, LayoutChangeListener {
@@ -7,7 +7,7 @@ import mightypork.gamecore.util.annot.DefaultImpl;
/**
* Screen display layer
*
* @author MightyPork
* @author Ondřej Hruška
*/
public abstract class ScreenLayer extends Overlay {
@@ -6,8 +6,6 @@ import java.util.HashMap;
import java.util.Map;
import java.util.TreeSet;
import org.newdawn.slick.opengl.GLUtils;
import mightypork.gamecore.core.modules.AppAccess;
import mightypork.gamecore.core.modules.AppModule;
import mightypork.gamecore.gui.events.LayoutChangeEvent;
@@ -22,7 +20,7 @@ import mightypork.gamecore.util.annot.DefaultImpl;
/**
* Game screens holder; Takes care of rendering and screen requests.
*
* @author MightyPork
* @author Ondřej Hruška
*/
public class ScreenRegistry extends AppModule implements ScreenRequestListener, ViewportChangeListener, Renderable {
@@ -114,7 +112,7 @@ public class ScreenRegistry extends AppModule implements ScreenRequestListener,
@Override
public void onViewportChanged(ViewportChangeEvent event)
{
if(active != null) fireLayoutUpdateEvent();
if (active != null) fireLayoutUpdateEvent();
}
@@ -15,7 +15,7 @@ import mightypork.gamecore.util.math.timing.TimedTask;
/**
* Overlay used for cross-fading between screens
*
* @author MightyPork
* @author Ondřej Hruška
*/
public class CrossfadeOverlay extends Overlay {
@@ -67,7 +67,7 @@ public class CrossfadeOverlay extends Overlay {
{
requestedScreenName = screen;
if(screen == null) {
if (screen == null) {
// going for halt
getSoundSystem().fadeOutAllLoops();
}
@@ -6,7 +6,7 @@ import mightypork.gamecore.eventbus.event_flags.SingleReceiverEvent;
/**
* @author MightyPork
* @author Ondřej Hruška
*/
@SingleReceiverEvent
public class CrossfadeRequest extends BusEvent<CrossfadeOverlay> {
@@ -12,7 +12,7 @@ import mightypork.gamecore.util.math.timing.TimedTask;
/**
* Layer that smoothly appears/disappears when shown/hidden
*
* @author MightyPork
* @author Ondřej Hruška
*/
public abstract class FadingLayer extends ScreenLayer {
@@ -22,7 +22,7 @@ import org.lwjgl.opengl.Display;
/**
* Input system
*
* @author MightyPork
* @author Ondřej Hruška
*/
public class InputSystem extends RootBusNode implements Updateable, KeyBinder {
+1 -1
View File
@@ -8,7 +8,7 @@ import mightypork.gamecore.input.KeyStroke.Edge;
/**
* Can bind events to keys.
*
* @author MightyPork
* @author Ondřej Hruška
*/
public interface KeyBinder {
@@ -10,7 +10,7 @@ import mightypork.gamecore.input.events.KeyEventHandler;
/**
* Key binding, trigger activated by a keystroke event
*
* @author MightyPork
* @author Ondřej Hruška
*/
public class KeyBinding implements KeyEventHandler, InputReadyListener {
@@ -14,7 +14,7 @@ import mightypork.gamecore.logging.Log;
/**
* Key binding pool
*
* @author MightyPork
* @author Ondřej Hruška
*/
public class KeyBindingPool implements KeyBinder, KeyEventHandler {
+1 -1
View File
@@ -9,7 +9,7 @@ import org.lwjgl.input.Keyboard;
/**
* Key stroke trigger
*
* @author MightyPork
* @author Ondřej Hruška
*/
public class KeyStroke { //implements Pollable
+1 -1
View File
@@ -11,7 +11,7 @@ import org.lwjgl.input.Keyboard;
/**
* Key constants, from LWJGL {@link Keyboard}
*
* @author MightyPork
* @author Ondřej Hruška
*/
public class Keys {
@@ -10,7 +10,7 @@ import org.lwjgl.input.Keyboard;
/**
* A keyboard event
*
* @author MightyPork
* @author Ondřej Hruška
*/
@NotLoggedEvent
public class KeyEvent extends BusEvent<KeyEventHandler> {
@@ -4,7 +4,7 @@ package mightypork.gamecore.input.events;
/**
* {@link KeyEvent} listener
*
* @author MightyPork
* @author Ondřej Hruška
*/
public interface KeyEventHandler {
@@ -11,7 +11,7 @@ import mightypork.gamecore.util.math.constraints.vect.VectConst;
/**
* Mouse button / wheel event triggered
*
* @author MightyPork
* @author Ondřej Hruška
*/
@NotLoggedEvent
public class MouseButtonEvent extends BusEvent<MouseButtonHandler> {
@@ -4,7 +4,7 @@ package mightypork.gamecore.input.events;
/**
* {@link MouseButtonEvent} listener
*
* @author MightyPork
* @author Ondřej Hruška
*/
public interface MouseButtonHandler {
@@ -10,7 +10,7 @@ import mightypork.gamecore.util.math.constraints.vect.VectConst;
/**
* Mouse moved
*
* @author MightyPork
* @author Ondřej Hruška
*/
@NotLoggedEvent
public class MouseMotionEvent extends BusEvent<MouseMotionHandler> {
@@ -4,7 +4,7 @@ package mightypork.gamecore.input.events;
/**
* {@link MouseMotionEvent} listener
*
* @author MightyPork
* @author Ondřej Hruška
*/
public interface MouseMotionHandler {
+1 -1
View File
@@ -19,7 +19,7 @@ import mightypork.gamecore.util.strings.StringUtils;
/**
* A log.
*
* @author MightyPork
* @author Ondřej Hruška
*/
public class Log {
@@ -10,7 +10,7 @@ import java.lang.annotation.RetentionPolicy;
/**
* Specify pretty name to be used when logging (eg. <code>Log.str()</code>)
*
* @author MightyPork
* @author Ondřej Hruška
*/
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@@ -9,7 +9,7 @@ import mightypork.gamecore.logging.writers.LogWriter;
/**
* Used to redirect slick log into main logger.
*
* @author MightyPork
* @author Ondřej Hruška
*/
public class SlickLogRedirector implements org.newdawn.slick.util.LogSystem {
@@ -15,7 +15,7 @@ import mightypork.gamecore.util.files.FileUtils;
/**
* Logger that cleans directory & archives old logs
*
* @author MightyPork
* @author Ondřej Hruška
* @copy (c) 2014
*/
public class ArchivingLog extends SimpleLog {
@@ -9,7 +9,7 @@ import mightypork.gamecore.logging.monitors.LogMonitor;
/**
* Log interface
*
* @author MightyPork
* @author Ondřej Hruška
*/
public interface LogWriter {
@@ -18,7 +18,7 @@ import mightypork.gamecore.logging.monitors.LogMonitor;
/**
* Basic logger
*
* @author MightyPork
* @author Ondřej Hruška
*/
public class SimpleLog implements LogWriter {
@@ -24,7 +24,7 @@ import org.lwjgl.opengl.DisplayMode;
/**
* Display system
*
* @author MightyPork
* @author Ondřej Hruška
*/
public class DisplaySystem extends AppModule implements RectBound {
+1 -1
View File
@@ -25,7 +25,7 @@ import org.newdawn.slick.opengl.TextureLoader;
/**
* Render utilities
*
* @author MightyPork
* @author Ondřej Hruška
*/
public class Render {
@@ -4,7 +4,7 @@ package mightypork.gamecore.render;
/**
* Can be rendered
*
* @author MightyPork
* @author Ondřej Hruška
*/
public interface Renderable {
@@ -13,7 +13,7 @@ import javax.imageio.ImageIO;
* Screenshot object, can be used to extract image or write to file.<br>
* Screenshot, once taken, can be safely processed in separate thread.
*
* @author MightyPork
* @author Ondřej Hruška
*/
public class Screenshot {
@@ -10,7 +10,7 @@ import mightypork.gamecore.util.math.constraints.vect.Vect;
/**
* Screen resolution or mode was changed
*
* @author MightyPork
* @author Ondřej Hruška
*/
@NonConsumableEvent
@NotLoggedEvent
@@ -4,7 +4,7 @@ package mightypork.gamecore.render.events;
/**
* {@link ViewportChangeEvent} listener
*
* @author MightyPork
* @author Ondřej Hruška
*/
public interface ViewportChangeListener {
@@ -14,7 +14,7 @@ import mightypork.gamecore.logging.Log;
/**
* Asynchronous resource loading thread.
*
* @author MightyPork
* @author Ondřej Hruška
*/
public class AsyncResourceLoader extends Thread implements ResourceLoader, Destroyable {
@@ -98,7 +98,7 @@ public class AsyncResourceLoader extends Thread implements ResourceLoader, Destr
@Override
public void run()
{
if(!def.isLoaded()) {
if (!def.isLoaded()) {
def.load();
}
}
@@ -6,14 +6,13 @@ import java.io.IOException;
import mightypork.gamecore.eventbus.events.Destroyable;
import mightypork.gamecore.logging.Log;
import mightypork.gamecore.logging.LogAlias;
import mightypork.gamecore.util.math.Calc;
import mightypork.gamecore.util.strings.StringUtils;
/**
* Deferred resource abstraction.
*
* @author MightyPork
* @author Ondřej Hruška
*/
@LogAlias(name = "Resource")
public abstract class BaseLazyResource implements LazyResource, Destroyable {
@@ -51,7 +50,7 @@ public abstract class BaseLazyResource implements LazyResource, Destroyable {
throw new NullPointerException("Resource string cannot be null for non-null resource.");
}
long time = Profiler.begin();
final long time = Profiler.begin();
Log.f3("(res) + Load: " + this);
loadResource(resource);
Log.f3("(res) - Done: " + this + " in " + Profiler.endStr(time));
@@ -4,7 +4,7 @@ package mightypork.gamecore.resources;
/**
* Deferred resource
*
* @author MightyPork
* @author Ondřej Hruška
*/
public interface LazyResource {
+1 -1
View File
@@ -16,7 +16,7 @@ import mightypork.gamecore.resources.textures.TxSheet;
/**
* Static resource repository
*
* @author MightyPork
* @author Ondřej Hruška
*/
public final class Res {
@@ -8,7 +8,7 @@ import mightypork.gamecore.eventbus.event_flags.SingleReceiverEvent;
/**
* Request to load a deferred resource.
*
* @author MightyPork
* @author Ondřej Hruška
*/
@SingleReceiverEvent
public class ResourceLoadRequest extends BusEvent<ResourceLoader> {
@@ -7,7 +7,7 @@ import mightypork.gamecore.eventbus.BusAccess;
/**
* {@link ResourceLoadRequest} listener
*
* @author MightyPork
* @author Ondřej Hruška
*/
public interface ResourceLoader {
@@ -9,7 +9,7 @@ import mightypork.gamecore.resources.textures.TextureRegistry;
/**
* Resource binder; used by apps to specify what resources are to be loaded.
*
* @author MightyPork
* @author Ondřej Hruška
*/
public interface ResourceSetup {
@@ -8,7 +8,7 @@ import java.lang.annotation.*;
* Resource that is texture-based and therefore needs to be loaded in the main
* thread (ie. main loop).
*
* @author MightyPork
* @author Ondřej Hruška
*/
@Retention(RetentionPolicy.RUNTIME)
@@ -7,7 +7,7 @@ import mightypork.gamecore.util.math.Calc;
/**
* Volume combined of multiple volumes, combining them (multiplication).
*
* @author MightyPork
* @author Ondřej Hruška
*/
public class JointVolume extends Volume {
@@ -16,7 +16,7 @@ import org.newdawn.slick.openal.SoundStore;
/**
* Wrapper class for slick audio
*
* @author MightyPork
* @author Ondřej Hruška
*/
@LogAlias(name = "Audio")
public class LazyAudio extends BaseLazyResource {
@@ -13,7 +13,7 @@ import mightypork.gamecore.resources.audio.players.LoopPlayer;
/**
* Audio resource storage
*
* @author MightyPork
* @author Ondřej Hruška
*/
public class SoundRegistry extends AppAccessAdapter {
@@ -3,9 +3,7 @@ package mightypork.gamecore.resources.audio;
import java.nio.FloatBuffer;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import mightypork.gamecore.core.modules.AppAccess;
import mightypork.gamecore.eventbus.clients.RootBusNode;
@@ -26,7 +24,7 @@ import org.newdawn.slick.openal.SoundStore;
/**
* Sound system class (only one instance should be made per application)
*
* @author MightyPork
* @author Ondřej Hruška
*/
public class SoundSystem extends RootBusNode implements Updateable {
@@ -164,7 +162,7 @@ public class SoundSystem extends RootBusNode implements Updateable {
*/
private LazyAudio createResource(String res)
{
final LazyAudio a = new LazyAudio(res);
final LazyAudio a = new LazyAudio(res);
getEventBus().send(new ResourceLoadRequest(a));
resources.add(a);
return a;

Some files were not shown because too many files have changed in this diff Show More