Changed @author to real name

master
Ondřej Hruška 11 years ago
parent 5963ec62a7
commit f862708ddd
  1. 1
      .classpath
  2. 4
      LICENSE.txt
  3. 4
      src/mightypork/gamecore/core/Config.java
  4. 2
      src/mightypork/gamecore/core/WorkDir.java
  5. 2
      src/mightypork/gamecore/core/events/MainLoopRequest.java
  6. 3
      src/mightypork/gamecore/core/events/ShudownRequest.java
  7. 2
      src/mightypork/gamecore/core/events/UserQuitRequest.java
  8. 2
      src/mightypork/gamecore/core/events/UserQuitRequestListener.java
  9. 2
      src/mightypork/gamecore/core/modules/AppAccess.java
  10. 2
      src/mightypork/gamecore/core/modules/AppAccessAdapter.java
  11. 2
      src/mightypork/gamecore/core/modules/AppModule.java
  12. 2
      src/mightypork/gamecore/core/modules/AppSubModule.java
  13. 10
      src/mightypork/gamecore/core/modules/BaseApp.java
  14. 6
      src/mightypork/gamecore/core/modules/MainLoop.java
  15. 2
      src/mightypork/gamecore/eventbus/BusAccess.java
  16. 2
      src/mightypork/gamecore/eventbus/BusEvent.java
  17. 7
      src/mightypork/gamecore/eventbus/EventBus.java
  18. 2
      src/mightypork/gamecore/eventbus/EventChannel.java
  19. 2
      src/mightypork/gamecore/eventbus/clients/BusNode.java
  20. 2
      src/mightypork/gamecore/eventbus/clients/ClientHub.java
  21. 2
      src/mightypork/gamecore/eventbus/clients/ClientList.java
  22. 2
      src/mightypork/gamecore/eventbus/clients/DelegatingClient.java
  23. 2
      src/mightypork/gamecore/eventbus/clients/DelegatingList.java
  24. 2
      src/mightypork/gamecore/eventbus/clients/RootBusNode.java
  25. 2
      src/mightypork/gamecore/eventbus/clients/ToggleableClient.java
  26. 2
      src/mightypork/gamecore/eventbus/event_flags/DelayedEvent.java
  27. 2
      src/mightypork/gamecore/eventbus/event_flags/DirectEvent.java
  28. 2
      src/mightypork/gamecore/eventbus/event_flags/NonConsumableEvent.java
  29. 2
      src/mightypork/gamecore/eventbus/event_flags/NonRejectableEvent.java
  30. 2
      src/mightypork/gamecore/eventbus/event_flags/NotLoggedEvent.java
  31. 2
      src/mightypork/gamecore/eventbus/event_flags/SingleReceiverEvent.java
  32. 2
      src/mightypork/gamecore/eventbus/events/DestroyEvent.java
  33. 2
      src/mightypork/gamecore/eventbus/events/Destroyable.java
  34. 2
      src/mightypork/gamecore/eventbus/events/UpdateEvent.java
  35. 2
      src/mightypork/gamecore/eventbus/events/Updateable.java
  36. 2
      src/mightypork/gamecore/gui/Action.java
  37. 2
      src/mightypork/gamecore/gui/ActionTrigger.java
  38. 2
      src/mightypork/gamecore/gui/AlignX.java
  39. 2
      src/mightypork/gamecore/gui/AlignY.java
  40. 2
      src/mightypork/gamecore/gui/Enableable.java
  41. 2
      src/mightypork/gamecore/gui/Hideable.java
  42. 2
      src/mightypork/gamecore/gui/components/BaseComponent.java
  43. 2
      src/mightypork/gamecore/gui/components/Component.java
  44. 2
      src/mightypork/gamecore/gui/components/PluggableRenderable.java
  45. 2
      src/mightypork/gamecore/gui/components/input/TextButton.java
  46. 2
      src/mightypork/gamecore/gui/components/layout/ConstraintLayout.java
  47. 2
      src/mightypork/gamecore/gui/components/layout/FlowColumnLayout.java
  48. 2
      src/mightypork/gamecore/gui/components/layout/FlowRowLayout.java
  49. 2
      src/mightypork/gamecore/gui/components/layout/GridLayout.java
  50. 2
      src/mightypork/gamecore/gui/components/layout/NullComponent.java
  51. 2
      src/mightypork/gamecore/gui/components/layout/linear/AbstractLinearWrapper.java
  52. 2
      src/mightypork/gamecore/gui/components/layout/linear/LinearGap.java
  53. 2
      src/mightypork/gamecore/gui/components/painters/ImagePainter.java
  54. 2
      src/mightypork/gamecore/gui/components/painters/QuadPainter.java
  55. 2
      src/mightypork/gamecore/gui/components/painters/TextPainter.java
  56. 2
      src/mightypork/gamecore/gui/events/LayoutChangeEvent.java
  57. 2
      src/mightypork/gamecore/gui/events/ScreenRequest.java
  58. 2
      src/mightypork/gamecore/gui/events/ScreenRequestListener.java
  59. 4
      src/mightypork/gamecore/gui/screens/LayeredScreen.java
  60. 2
      src/mightypork/gamecore/gui/screens/Overlay.java
  61. 2
      src/mightypork/gamecore/gui/screens/Screen.java
  62. 2
      src/mightypork/gamecore/gui/screens/ScreenLayer.java
  63. 6
      src/mightypork/gamecore/gui/screens/ScreenRegistry.java
  64. 4
      src/mightypork/gamecore/gui/screens/impl/CrossfadeOverlay.java
  65. 2
      src/mightypork/gamecore/gui/screens/impl/CrossfadeRequest.java
  66. 2
      src/mightypork/gamecore/gui/screens/impl/FadingLayer.java
  67. 2
      src/mightypork/gamecore/input/InputSystem.java
  68. 2
      src/mightypork/gamecore/input/KeyBinder.java
  69. 2
      src/mightypork/gamecore/input/KeyBinding.java
  70. 2
      src/mightypork/gamecore/input/KeyBindingPool.java
  71. 2
      src/mightypork/gamecore/input/KeyStroke.java
  72. 2
      src/mightypork/gamecore/input/Keys.java
  73. 2
      src/mightypork/gamecore/input/events/KeyEvent.java
  74. 2
      src/mightypork/gamecore/input/events/KeyEventHandler.java
  75. 2
      src/mightypork/gamecore/input/events/MouseButtonEvent.java
  76. 2
      src/mightypork/gamecore/input/events/MouseButtonHandler.java
  77. 2
      src/mightypork/gamecore/input/events/MouseMotionEvent.java
  78. 2
      src/mightypork/gamecore/input/events/MouseMotionHandler.java
  79. 2
      src/mightypork/gamecore/logging/Log.java
  80. 2
      src/mightypork/gamecore/logging/LogAlias.java
  81. 2
      src/mightypork/gamecore/logging/SlickLogRedirector.java
  82. 2
      src/mightypork/gamecore/logging/writers/ArchivingLog.java
  83. 2
      src/mightypork/gamecore/logging/writers/LogWriter.java
  84. 2
      src/mightypork/gamecore/logging/writers/SimpleLog.java
  85. 2
      src/mightypork/gamecore/render/DisplaySystem.java
  86. 2
      src/mightypork/gamecore/render/Render.java
  87. 2
      src/mightypork/gamecore/render/Renderable.java
  88. 2
      src/mightypork/gamecore/render/Screenshot.java
  89. 2
      src/mightypork/gamecore/render/events/ViewportChangeEvent.java
  90. 2
      src/mightypork/gamecore/render/events/ViewportChangeListener.java
  91. 4
      src/mightypork/gamecore/resources/AsyncResourceLoader.java
  92. 5
      src/mightypork/gamecore/resources/BaseLazyResource.java
  93. 2
      src/mightypork/gamecore/resources/LazyResource.java
  94. 2
      src/mightypork/gamecore/resources/Res.java
  95. 2
      src/mightypork/gamecore/resources/ResourceLoadRequest.java
  96. 2
      src/mightypork/gamecore/resources/ResourceLoader.java
  97. 2
      src/mightypork/gamecore/resources/ResourceSetup.java
  98. 2
      src/mightypork/gamecore/resources/TextureBasedResource.java
  99. 2
      src/mightypork/gamecore/resources/audio/JointVolume.java
  100. 2
      src/mightypork/gamecore/resources/audio/LazyAudio.java
  101. Some files were not shown because too many files have changed in this diff Show More

@ -32,5 +32,6 @@
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="Rogue/lib"/> <attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="Rogue/lib"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry combineaccessrules="false" kind="src" path="/Ion"/>
<classpathentry kind="output" path="bin"/> <classpathentry kind="output" path="bin"/>
</classpath> </classpath>

@ -1,4 +1,5 @@
Copyright (c) 2014 Ondřej Hruška (MightyPork), <ondra@ondrovo.com> Copyright (c) 2014, Ondřej Hruška <ondra@ondrovo.com>
Some rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions modification, are permitted provided that the following conditions
@ -14,6 +15,7 @@ are met:
3. The name of the author may not be used to endorse or promote products 3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission. derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.

@ -15,7 +15,7 @@ import mightypork.gamecore.util.files.config.PropertyManager;
/** /**
* Static application configuration * Static application configuration
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public class Config { public class Config {
@ -63,7 +63,7 @@ public class Config {
* Key property.<br> * Key property.<br>
* The stored value must be invariant ({@link KeyStroke} is mutable). * The stored value must be invariant ({@link KeyStroke} is mutable).
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public static class KeyProperty extends Property<KeyStroke> { public static class KeyProperty extends Property<KeyStroke> {

@ -11,7 +11,7 @@ import mightypork.gamecore.logging.Log;
/** /**
* Static application workdir accessor. * Static application workdir accessor.
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public class WorkDir { public class WorkDir {

@ -9,7 +9,7 @@ import mightypork.gamecore.eventbus.event_flags.SingleReceiverEvent;
/** /**
* Request to execute given {@link Runnable} in main loop. * Request to execute given {@link Runnable} in main loop.
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
@SingleReceiverEvent @SingleReceiverEvent
public class MainLoopRequest extends BusEvent<MainLoop> { 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.BusEvent;
import mightypork.gamecore.eventbus.event_flags.NonConsumableEvent; import mightypork.gamecore.eventbus.event_flags.NonConsumableEvent;
import mightypork.gamecore.eventbus.event_flags.SingleReceiverEvent; 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 * Shutdown request, non-interactive. Shutdown needs to execute on GL thread for
* display to deinit properly. * display to deinit properly.
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
@SingleReceiverEvent @SingleReceiverEvent
@NonConsumableEvent @NonConsumableEvent

@ -10,7 +10,7 @@ import mightypork.gamecore.eventbus.EventBus;
* titlebar button, and if no client consumes it, the application will be shut * titlebar button, and if no client consumes it, the application will be shut
* down. * down.
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public class UserQuitRequest extends BusEvent<UserQuitRequestListener> { public class UserQuitRequest extends BusEvent<UserQuitRequestListener> {

@ -4,7 +4,7 @@ package mightypork.gamecore.core.events;
/** /**
* Quit request listener; implementing client can abort shutdown. * Quit request listener; implementing client can abort shutdown.
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public interface UserQuitRequestListener { public interface UserQuitRequestListener {

@ -10,7 +10,7 @@ import mightypork.gamecore.resources.audio.SoundSystem;
/** /**
* App interface visible to subsystems * App interface visible to subsystems
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public interface AppAccess extends BusAccess { public interface AppAccess extends BusAccess {

@ -10,7 +10,7 @@ import mightypork.gamecore.resources.audio.SoundSystem;
/** /**
* App access adapter (defualt {@link AppAccess} implementation) * App access adapter (defualt {@link AppAccess} implementation)
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public class AppAccessAdapter implements AppAccess { 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 * 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. * 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 { 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 * Delegating bus client, to be attached to any {@link DelegatingClient}, such
* as a {@link RootBusNode}. * as a {@link RootBusNode}.
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public class AppSubModule extends BusNode implements AppAccess { public class AppSubModule extends BusNode implements AppAccess {

@ -11,9 +11,9 @@ import java.util.logging.Level;
import javax.swing.JOptionPane; import javax.swing.JOptionPane;
import mightypork.gamecore.core.Config; import mightypork.gamecore.core.Config;
import mightypork.gamecore.core.WorkDir;
import mightypork.gamecore.core.Config.ConfigSetup; import mightypork.gamecore.core.Config.ConfigSetup;
import mightypork.gamecore.core.Config.KeySetup; import mightypork.gamecore.core.Config.KeySetup;
import mightypork.gamecore.core.WorkDir;
import mightypork.gamecore.core.WorkDir.RouteSetup; import mightypork.gamecore.core.WorkDir.RouteSetup;
import mightypork.gamecore.eventbus.EventBus; import mightypork.gamecore.eventbus.EventBus;
import mightypork.gamecore.eventbus.events.DestroyEvent; import mightypork.gamecore.eventbus.events.DestroyEvent;
@ -31,16 +31,16 @@ import mightypork.gamecore.resources.ResourceSetup;
import mightypork.gamecore.resources.audio.SoundSystem; import mightypork.gamecore.resources.audio.SoundSystem;
import mightypork.gamecore.util.annot.DefaultImpl; import mightypork.gamecore.util.annot.DefaultImpl;
import mightypork.gamecore.util.files.InstanceLock; 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.Coord;
import mightypork.gamecore.util.math.algo.Move; import mightypork.gamecore.util.math.algo.Move;
import mightypork.ion.Ion;
/** /**
* Basic screen-based game with subsystems.<br> * Basic screen-based game with subsystems.<br>
* This class takes care of the initialization sequence. * This class takes care of the initialization sequence.
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public abstract class BaseApp implements AppAccess, UncaughtExceptionHandler { public abstract class BaseApp implements AppAccess, UncaughtExceptionHandler {
@ -344,8 +344,8 @@ public abstract class BaseApp implements AppAccess, UncaughtExceptionHandler {
protected void registerIonizables() protected void registerIonizables()
{ {
Ion.registerType(Coord.ION_MARK, Coord.class); Ion.register(Coord.class);
Ion.registerType(Move.ION_MARK, Move.class); Ion.register(Move.class);
} }

@ -2,9 +2,7 @@ package mightypork.gamecore.core.modules;
import java.util.Deque; import java.util.Deque;
import java.util.Queue;
import java.util.concurrent.ConcurrentLinkedDeque; import java.util.concurrent.ConcurrentLinkedDeque;
import java.util.concurrent.ConcurrentLinkedQueue;
import mightypork.gamecore.eventbus.events.UpdateEvent; import mightypork.gamecore.eventbus.events.UpdateEvent;
import mightypork.gamecore.gui.screens.ScreenRegistry; 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. * Delta-timed game loop with task queue etc.
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public class MainLoop extends AppModule implements ScreenshotRequestListener { public class MainLoop extends AppModule implements ScreenshotRequestListener {
@ -74,7 +72,7 @@ public class MainLoop extends AppModule implements ScreenshotRequestListener {
getEventBus().sendDirect(new UpdateEvent(delta)); getEventBus().sendDirect(new UpdateEvent(delta));
Runnable r; Runnable r;
long t = Profiler.begin(); final long t = Profiler.begin();
while ((r = tasks.poll()) != null) { while ((r = tasks.poll()) != null) {
Log.f3(" * Main loop task."); Log.f3(" * Main loop task.");
r.run(); r.run();

@ -4,7 +4,7 @@ package mightypork.gamecore.eventbus;
/** /**
* Access to an {@link EventBus} instance * Access to an {@link EventBus} instance
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public interface BusAccess { public interface BusAccess {

@ -27,7 +27,7 @@ import mightypork.gamecore.eventbus.event_flags.SingleReceiverEvent;
* zero delay. * zero delay.
* </p> * </p>
* *
* @author MightyPork * @author Ondřej Hruška
* @param <HANDLER> handler type * @param <HANDLER> handler type
*/ */
public abstract class BusEvent<HANDLER> { public abstract class BusEvent<HANDLER> {

@ -7,7 +7,6 @@ import java.util.Collection;
import java.util.Collections; import java.util.Collections;
import java.util.Set; import java.util.Set;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentLinkedDeque;
import java.util.concurrent.DelayQueue; import java.util.concurrent.DelayQueue;
import java.util.concurrent.Delayed; import java.util.concurrent.Delayed;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
@ -25,7 +24,7 @@ import mightypork.gamecore.util.Utils;
* An event bus, accommodating multiple EventChannels.<br> * An event bus, accommodating multiple EventChannels.<br>
* Channel will be created when an event of type is first encountered. * 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 { final public class EventBus implements Destroyable, BusAccess {
@ -135,13 +134,13 @@ final public class EventBus implements Destroyable, BusAccess {
private final QueuePollingThread busThread; private final QueuePollingThread busThread;
/** Registered clients */ /** 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 */ /** Whether the bus was destroyed */
private boolean dead = false; private boolean dead = false;
/** Message channels */ /** 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 */ /** Messages queued for delivery */
private final DelayQueue<DelayQueueEntry> sendQueue = new DelayQueue<>(); private final DelayQueue<DelayQueueEntry> sendQueue = new DelayQueue<>();

@ -14,7 +14,7 @@ import mightypork.gamecore.util.Utils;
/** /**
* Event delivery channel, module of {@link EventBus} * Event delivery channel, module of {@link EventBus}
* *
* @author MightyPork * @author Ondřej Hruška
* @param <EVENT> event type * @param <EVENT> event type
* @param <CLIENT> client (subscriber) 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 that can be attached to the {@link EventBus}, or added as a child
* client to another {@link DelegatingClient} * client to another {@link DelegatingClient}
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public abstract class BusNode implements BusAccess, ClientHub { 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) * Common methods for client hubs (ie delegating vlient implementations)
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public interface ClientHub extends DelegatingClient, ToggleableClient { public interface ClientHub extends DelegatingClient, ToggleableClient {

@ -7,7 +7,7 @@ import java.util.ArrayList;
/** /**
* Array-list with varargs constructor * Array-list with varargs constructor
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public class ClientList extends ArrayList<Object> { 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, * of clients is ordered, the clients will be served in that order. In any case,
* the {@link DelegatingClient} itself will be served beforehand. * the {@link DelegatingClient} itself will be served beforehand.
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public interface DelegatingClient { public interface DelegatingClient {

@ -9,7 +9,7 @@ import mightypork.gamecore.gui.Enableable;
/** /**
* Basic delegating client * Basic delegating client
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public class DelegatingList extends ClientList implements DelegatingClient, Enableable { 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. * 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 { public abstract class RootBusNode extends BusNode implements Destroyable {

@ -4,7 +4,7 @@ package mightypork.gamecore.eventbus.clients;
/** /**
* Client that can toggle receiving messages. * Client that can toggle receiving messages.
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public interface ToggleableClient { public interface ToggleableClient {

@ -7,7 +7,7 @@ import java.lang.annotation.*;
/** /**
* Event that should be queued with given delay (default: 0); * Event that should be queued with given delay (default: 0);
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE) @Target(ElementType.TYPE)

@ -7,7 +7,7 @@ import java.lang.annotation.*;
/** /**
* Event that should not be queued. * Event that should not be queued.
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE) @Target(ElementType.TYPE)

@ -11,7 +11,7 @@ import java.lang.annotation.Target;
/** /**
* Event that cannot be consumed * Event that cannot be consumed
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
@Documented @Documented

@ -11,7 +11,7 @@ import java.lang.annotation.Target;
/** /**
* Event that is forcibly delivered to all clients (bypass Toggleable etc) * Event that is forcibly delivered to all clients (bypass Toggleable etc)
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
@Documented @Documented

@ -8,7 +8,7 @@ import java.lang.annotation.*;
* Event that's not worth logging, unless there was an error with it.<br> * Event that's not worth logging, unless there was an error with it.<br>
* Useful for common events that would otherwise clutter the log. * Useful for common events that would otherwise clutter the log.
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE) @Target(ElementType.TYPE)

@ -7,7 +7,7 @@ import java.lang.annotation.*;
/** /**
* Handled only by the first client, then discarded. * Handled only by the first client, then discarded.
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE) @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. * Invoke destroy() method of all subscribers. Used to deinit a system.
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
@DirectEvent @DirectEvent
@NonConsumableEvent @NonConsumableEvent

@ -4,7 +4,7 @@ package mightypork.gamecore.eventbus.events;
/** /**
* Object that can be destroyed (free resources etc) * Object that can be destroyed (free resources etc)
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public interface Destroyable { public interface Destroyable {

@ -10,7 +10,7 @@ import mightypork.gamecore.eventbus.event_flags.NotLoggedEvent;
/** /**
* Delta timing update event. Not logged. * Delta timing update event. Not logged.
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
@NotLoggedEvent @NotLoggedEvent
@DirectEvent @DirectEvent

@ -4,7 +4,7 @@ package mightypork.gamecore.eventbus.events;
/** /**
* Uses delta timing * Uses delta timing
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public interface Updateable { public interface Updateable {

@ -4,7 +4,7 @@ package mightypork.gamecore.gui;
/** /**
* Triggered action * Triggered action
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public abstract class Action implements Runnable, Enableable { public abstract class Action implements Runnable, Enableable {

@ -4,7 +4,7 @@ package mightypork.gamecore.gui;
/** /**
* Element that can be assigned an action (ie. button); * Element that can be assigned an action (ie. button);
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public interface ActionTrigger { public interface ActionTrigger {

@ -4,7 +4,7 @@ package mightypork.gamecore.gui;
/** /**
* Horizontal align sides * Horizontal align sides
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public enum AlignX public enum AlignX
{ {

@ -4,7 +4,7 @@ package mightypork.gamecore.gui;
/** /**
* Vertical align sides * Vertical align sides
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public enum AlignY public enum AlignY
{ {

@ -6,7 +6,7 @@ package mightypork.gamecore.gui;
* Implementations should take appropriate action (ie. stop listening to events, * Implementations should take appropriate action (ie. stop listening to events,
* updating etc.) * updating etc.)
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public interface Enableable { public interface Enableable {

@ -4,7 +4,7 @@ package mightypork.gamecore.gui;
/** /**
* Element that can be hidden or visible * Element that can be hidden or visible
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public interface Hideable { 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 * {@link Renderable} with pluggable context. When caching is enabled, the
* layout update can be triggered by firing the {@link LayoutChangeEvent}. * 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 { 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 * Basic UI component interface
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public interface Component extends Enableable, Hideable, PluggableRenderable { 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 * Renderable that can be assigned different context
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public interface PluggableRenderable extends Renderable, PluggableRectBound { 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 * Menu-like button with shadow and push state
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public class TextButton extends ClickableComponent implements DynamicWidthComponent { 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. * Layout for components with arbitrary constraints.
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public class ConstraintLayout extends LayoutComponent { 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 * Holder with same-sized columns, aligned to left or right
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public class FlowColumnLayout extends LayoutComponent { 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 * Holder with same-sized rows, aligned to top or bottom
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public class FlowRowLayout extends LayoutComponent { public class FlowRowLayout extends LayoutComponent {

@ -11,7 +11,7 @@ import mightypork.gamecore.util.math.constraints.rect.proxy.RectBound;
/** /**
* Holder with table cells * Holder with table cells
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public class GridLayout extends LayoutComponent { 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 * Invisible component that does nothing at all; Null object pattern
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public class NullComponent extends BaseComponent { public class NullComponent extends BaseComponent {

@ -12,7 +12,7 @@ import mightypork.gamecore.gui.components.LinearComponent;
/** /**
* Converts a component into a linear component * Converts a component into a linear component
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public abstract class AbstractLinearWrapper extends LinearComponent implements DelegatingClient { public abstract class AbstractLinearWrapper extends LinearComponent implements DelegatingClient {

@ -8,7 +8,7 @@ import mightypork.gamecore.util.math.constraints.num.Num;
/** /**
* Gap in linear layout * Gap in linear layout
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public class LinearGap extends LinearRectangle { public class LinearGap extends LinearRectangle {

@ -10,7 +10,7 @@ import mightypork.gamecore.resources.textures.TxQuad;
/** /**
* Draws image in given rect * Draws image in given rect
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public class ImagePainter extends BaseComponent implements DynamicWidthComponent { public class ImagePainter extends BaseComponent implements DynamicWidthComponent {

@ -10,7 +10,7 @@ import mightypork.gamecore.util.math.color.Color;
/** /**
* Draws image in given rect * Draws image in given rect
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public class QuadPainter extends BaseComponent { public class QuadPainter extends BaseComponent {

@ -19,7 +19,7 @@ import mightypork.gamecore.util.strings.StringWrapper;
/** /**
* Text painting component. * Text painting component.
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public class TextPainter extends BaseComponent implements DynamicWidthComponent { 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 * Intended use is to notify UI component sub-clients that they should poll
* their cached constraints. * their cached constraints.
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
@DirectEvent @DirectEvent
@NonConsumableEvent @NonConsumableEvent

@ -8,7 +8,7 @@ import mightypork.gamecore.eventbus.event_flags.SingleReceiverEvent;
/** /**
* Request to change screen * Request to change screen
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
@SingleReceiverEvent @SingleReceiverEvent
public class ScreenRequest extends BusEvent<ScreenRequestListener> { public class ScreenRequest extends BusEvent<ScreenRequestListener> {

@ -4,7 +4,7 @@ package mightypork.gamecore.gui.events;
/** /**
* {@link ScreenRequest} listener * {@link ScreenRequest} listener
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public interface ScreenRequestListener { public interface ScreenRequestListener {

@ -14,14 +14,14 @@ import mightypork.gamecore.eventbus.clients.DelegatingClient;
/** /**
* Screen with multiple instances of {@link ScreenLayer} * Screen with multiple instances of {@link ScreenLayer}
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public abstract class LayeredScreen extends Screen { public abstract class LayeredScreen extends Screen {
/** /**
* Wrapper for delegating client, to use custom client ordering. * Wrapper for delegating client, to use custom client ordering.
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
private class LayersClient implements DelegatingClient { private class LayersClient implements DelegatingClient {

@ -26,7 +26,7 @@ import mightypork.gamecore.util.math.constraints.vect.Vect;
* Abstract overlay.<br> * Abstract overlay.<br>
* Overlay is connected to event bus and is renderable. * 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, public abstract class Overlay extends AppSubModule implements Comparable<Overlay>, Updateable, Renderable, KeyBinder, Hideable, Enableable,
LayoutChangeListener { LayoutChangeListener {

@ -20,7 +20,7 @@ import mightypork.gamecore.util.math.constraints.rect.proxy.RectBound;
/** /**
* Screen class. * Screen class.
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public abstract class Screen extends AppSubModule implements Renderable, RectBound, KeyBinder, LayoutChangeListener { public abstract class Screen extends AppSubModule implements Renderable, RectBound, KeyBinder, LayoutChangeListener {

@ -7,7 +7,7 @@ import mightypork.gamecore.util.annot.DefaultImpl;
/** /**
* Screen display layer * Screen display layer
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public abstract class ScreenLayer extends Overlay { public abstract class ScreenLayer extends Overlay {

@ -6,8 +6,6 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.TreeSet; import java.util.TreeSet;
import org.newdawn.slick.opengl.GLUtils;
import mightypork.gamecore.core.modules.AppAccess; import mightypork.gamecore.core.modules.AppAccess;
import mightypork.gamecore.core.modules.AppModule; import mightypork.gamecore.core.modules.AppModule;
import mightypork.gamecore.gui.events.LayoutChangeEvent; 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. * 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 { public class ScreenRegistry extends AppModule implements ScreenRequestListener, ViewportChangeListener, Renderable {
@ -114,7 +112,7 @@ public class ScreenRegistry extends AppModule implements ScreenRequestListener,
@Override @Override
public void onViewportChanged(ViewportChangeEvent event) 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 * Overlay used for cross-fading between screens
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public class CrossfadeOverlay extends Overlay { public class CrossfadeOverlay extends Overlay {
@ -67,7 +67,7 @@ public class CrossfadeOverlay extends Overlay {
{ {
requestedScreenName = screen; requestedScreenName = screen;
if(screen == null) { if (screen == null) {
// going for halt // going for halt
getSoundSystem().fadeOutAllLoops(); getSoundSystem().fadeOutAllLoops();
} }

@ -6,7 +6,7 @@ import mightypork.gamecore.eventbus.event_flags.SingleReceiverEvent;
/** /**
* @author MightyPork * @author Ondřej Hruška
*/ */
@SingleReceiverEvent @SingleReceiverEvent
public class CrossfadeRequest extends BusEvent<CrossfadeOverlay> { 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 * Layer that smoothly appears/disappears when shown/hidden
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public abstract class FadingLayer extends ScreenLayer { public abstract class FadingLayer extends ScreenLayer {

@ -22,7 +22,7 @@ import org.lwjgl.opengl.Display;
/** /**
* Input system * Input system
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public class InputSystem extends RootBusNode implements Updateable, KeyBinder { public class InputSystem extends RootBusNode implements Updateable, KeyBinder {

@ -8,7 +8,7 @@ import mightypork.gamecore.input.KeyStroke.Edge;
/** /**
* Can bind events to keys. * Can bind events to keys.
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public interface KeyBinder { public interface KeyBinder {

@ -10,7 +10,7 @@ import mightypork.gamecore.input.events.KeyEventHandler;
/** /**
* Key binding, trigger activated by a keystroke event * Key binding, trigger activated by a keystroke event
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public class KeyBinding implements KeyEventHandler, InputReadyListener { public class KeyBinding implements KeyEventHandler, InputReadyListener {

@ -14,7 +14,7 @@ import mightypork.gamecore.logging.Log;
/** /**
* Key binding pool * Key binding pool
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public class KeyBindingPool implements KeyBinder, KeyEventHandler { public class KeyBindingPool implements KeyBinder, KeyEventHandler {

@ -9,7 +9,7 @@ import org.lwjgl.input.Keyboard;
/** /**
* Key stroke trigger * Key stroke trigger
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public class KeyStroke { //implements Pollable public class KeyStroke { //implements Pollable

@ -11,7 +11,7 @@ import org.lwjgl.input.Keyboard;
/** /**
* Key constants, from LWJGL {@link Keyboard} * Key constants, from LWJGL {@link Keyboard}
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public class Keys { public class Keys {

@ -10,7 +10,7 @@ import org.lwjgl.input.Keyboard;
/** /**
* A keyboard event * A keyboard event
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
@NotLoggedEvent @NotLoggedEvent
public class KeyEvent extends BusEvent<KeyEventHandler> { public class KeyEvent extends BusEvent<KeyEventHandler> {

@ -4,7 +4,7 @@ package mightypork.gamecore.input.events;
/** /**
* {@link KeyEvent} listener * {@link KeyEvent} listener
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public interface KeyEventHandler { public interface KeyEventHandler {

@ -11,7 +11,7 @@ import mightypork.gamecore.util.math.constraints.vect.VectConst;
/** /**
* Mouse button / wheel event triggered * Mouse button / wheel event triggered
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
@NotLoggedEvent @NotLoggedEvent
public class MouseButtonEvent extends BusEvent<MouseButtonHandler> { public class MouseButtonEvent extends BusEvent<MouseButtonHandler> {

@ -4,7 +4,7 @@ package mightypork.gamecore.input.events;
/** /**
* {@link MouseButtonEvent} listener * {@link MouseButtonEvent} listener
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public interface MouseButtonHandler { public interface MouseButtonHandler {

@ -10,7 +10,7 @@ import mightypork.gamecore.util.math.constraints.vect.VectConst;
/** /**
* Mouse moved * Mouse moved
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
@NotLoggedEvent @NotLoggedEvent
public class MouseMotionEvent extends BusEvent<MouseMotionHandler> { public class MouseMotionEvent extends BusEvent<MouseMotionHandler> {

@ -4,7 +4,7 @@ package mightypork.gamecore.input.events;
/** /**
* {@link MouseMotionEvent} listener * {@link MouseMotionEvent} listener
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public interface MouseMotionHandler { public interface MouseMotionHandler {

@ -19,7 +19,7 @@ import mightypork.gamecore.util.strings.StringUtils;
/** /**
* A log. * A log.
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public class Log { 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>) * Specify pretty name to be used when logging (eg. <code>Log.str()</code>)
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
@Inherited @Inherited

@ -9,7 +9,7 @@ import mightypork.gamecore.logging.writers.LogWriter;
/** /**
* Used to redirect slick log into main logger. * Used to redirect slick log into main logger.
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public class SlickLogRedirector implements org.newdawn.slick.util.LogSystem { 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 * Logger that cleans directory & archives old logs
* *
* @author MightyPork * @author Ondřej Hruška
* @copy (c) 2014 * @copy (c) 2014
*/ */
public class ArchivingLog extends SimpleLog { public class ArchivingLog extends SimpleLog {

@ -9,7 +9,7 @@ import mightypork.gamecore.logging.monitors.LogMonitor;
/** /**
* Log interface * Log interface
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public interface LogWriter { public interface LogWriter {

@ -18,7 +18,7 @@ import mightypork.gamecore.logging.monitors.LogMonitor;
/** /**
* Basic logger * Basic logger
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public class SimpleLog implements LogWriter { public class SimpleLog implements LogWriter {

@ -24,7 +24,7 @@ import org.lwjgl.opengl.DisplayMode;
/** /**
* Display system * Display system
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public class DisplaySystem extends AppModule implements RectBound { public class DisplaySystem extends AppModule implements RectBound {

@ -25,7 +25,7 @@ import org.newdawn.slick.opengl.TextureLoader;
/** /**
* Render utilities * Render utilities
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public class Render { public class Render {

@ -4,7 +4,7 @@ package mightypork.gamecore.render;
/** /**
* Can be rendered * Can be rendered
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public interface Renderable { 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 object, can be used to extract image or write to file.<br>
* Screenshot, once taken, can be safely processed in separate thread. * Screenshot, once taken, can be safely processed in separate thread.
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public class Screenshot { public class Screenshot {

@ -10,7 +10,7 @@ import mightypork.gamecore.util.math.constraints.vect.Vect;
/** /**
* Screen resolution or mode was changed * Screen resolution or mode was changed
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
@NonConsumableEvent @NonConsumableEvent
@NotLoggedEvent @NotLoggedEvent

@ -4,7 +4,7 @@ package mightypork.gamecore.render.events;
/** /**
* {@link ViewportChangeEvent} listener * {@link ViewportChangeEvent} listener
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public interface ViewportChangeListener { public interface ViewportChangeListener {

@ -14,7 +14,7 @@ import mightypork.gamecore.logging.Log;
/** /**
* Asynchronous resource loading thread. * Asynchronous resource loading thread.
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public class AsyncResourceLoader extends Thread implements ResourceLoader, Destroyable { public class AsyncResourceLoader extends Thread implements ResourceLoader, Destroyable {
@ -98,7 +98,7 @@ public class AsyncResourceLoader extends Thread implements ResourceLoader, Destr
@Override @Override
public void run() public void run()
{ {
if(!def.isLoaded()) { if (!def.isLoaded()) {
def.load(); def.load();
} }
} }

@ -6,14 +6,13 @@ import java.io.IOException;
import mightypork.gamecore.eventbus.events.Destroyable; import mightypork.gamecore.eventbus.events.Destroyable;
import mightypork.gamecore.logging.Log; import mightypork.gamecore.logging.Log;
import mightypork.gamecore.logging.LogAlias; import mightypork.gamecore.logging.LogAlias;
import mightypork.gamecore.util.math.Calc;
import mightypork.gamecore.util.strings.StringUtils; import mightypork.gamecore.util.strings.StringUtils;
/** /**
* Deferred resource abstraction. * Deferred resource abstraction.
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
@LogAlias(name = "Resource") @LogAlias(name = "Resource")
public abstract class BaseLazyResource implements LazyResource, Destroyable { 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."); 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); Log.f3("(res) + Load: " + this);
loadResource(resource); loadResource(resource);
Log.f3("(res) - Done: " + this + " in " + Profiler.endStr(time)); Log.f3("(res) - Done: " + this + " in " + Profiler.endStr(time));

@ -4,7 +4,7 @@ package mightypork.gamecore.resources;
/** /**
* Deferred resource * Deferred resource
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public interface LazyResource { public interface LazyResource {

@ -16,7 +16,7 @@ import mightypork.gamecore.resources.textures.TxSheet;
/** /**
* Static resource repository * Static resource repository
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public final class Res { public final class Res {

@ -8,7 +8,7 @@ import mightypork.gamecore.eventbus.event_flags.SingleReceiverEvent;
/** /**
* Request to load a deferred resource. * Request to load a deferred resource.
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
@SingleReceiverEvent @SingleReceiverEvent
public class ResourceLoadRequest extends BusEvent<ResourceLoader> { public class ResourceLoadRequest extends BusEvent<ResourceLoader> {

@ -7,7 +7,7 @@ import mightypork.gamecore.eventbus.BusAccess;
/** /**
* {@link ResourceLoadRequest} listener * {@link ResourceLoadRequest} listener
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public interface ResourceLoader { 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. * Resource binder; used by apps to specify what resources are to be loaded.
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public interface ResourceSetup { 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 * Resource that is texture-based and therefore needs to be loaded in the main
* thread (ie. main loop). * thread (ie. main loop).
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)

@ -7,7 +7,7 @@ import mightypork.gamecore.util.math.Calc;
/** /**
* Volume combined of multiple volumes, combining them (multiplication). * Volume combined of multiple volumes, combining them (multiplication).
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
public class JointVolume extends Volume { public class JointVolume extends Volume {

@ -16,7 +16,7 @@ import org.newdawn.slick.openal.SoundStore;
/** /**
* Wrapper class for slick audio * Wrapper class for slick audio
* *
* @author MightyPork * @author Ondřej Hruška
*/ */
@LogAlias(name = "Audio") @LogAlias(name = "Audio")
public class LazyAudio extends BaseLazyResource { public class LazyAudio extends BaseLazyResource {

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

Loading…
Cancel
Save