\r
-package com.badlogic.gdx.backends.desktop;\r
+package com.badlogic.gdx.backends.lwjgl;\r
\r
import java.applet.Applet;\r
import java.awt.BorderLayout;\r
\r
-package com.badlogic.gdx.backends.desktop;\r
+package com.badlogic.gdx.backends.lwjgl;\r
\r
import java.awt.Canvas;\r
\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx.backends.desktop;\r
+package com.badlogic.gdx.backends.lwjgl;\r
\r
import java.util.ArrayList;\r
import java.util.Iterator;\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx.backends.desktop;\r
+package com.badlogic.gdx.backends.lwjgl;\r
\r
import javax.sound.sampled.AudioFormat;\r
import javax.sound.sampled.AudioSystem;\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx.backends.desktop;\r
+package com.badlogic.gdx.backends.lwjgl;\r
\r
import javax.sound.sampled.AudioFormat;\r
import javax.sound.sampled.AudioFormat.Encoding;\r
* @author badlogicgames@gmail.com\r
* \r
*/\r
-class LwjglAudioRecorder implements AudioRecorder {\r
+final class LwjglAudioRecorder implements AudioRecorder {\r
/** the line we read the audio from **/\r
private TargetDataLine line;\r
\r
\r
-package com.badlogic.gdx.backends.desktop;\r
+package com.badlogic.gdx.backends.lwjgl;\r
\r
import java.awt.Canvas;\r
import java.awt.Dimension;\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx.backends.desktop;\r
+package com.badlogic.gdx.backends.lwjgl;\r
\r
import java.io.File;\r
import java.io.FileInputStream;\r
* @author mzechner\r
* \r
*/\r
-class LwjglFileHandle implements FileHandle {\r
+final class LwjglFileHandle implements FileHandle {\r
/** the file **/\r
private final File file;\r
private final FileType type;\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx.backends.desktop;\r
+package com.badlogic.gdx.backends.lwjgl;\r
\r
import java.io.File;\r
import java.io.FileInputStream;\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx.backends.desktop;\r
+package com.badlogic.gdx.backends.lwjgl;\r
\r
import java.nio.Buffer;\r
import java.nio.ByteBuffer;\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx.backends.desktop;\r
+package com.badlogic.gdx.backends.lwjgl;\r
\r
import java.nio.Buffer;\r
import java.nio.ByteBuffer;\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx.backends.desktop;\r
+package com.badlogic.gdx.backends.lwjgl;\r
\r
import java.nio.Buffer;\r
import java.nio.ByteBuffer;\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx.backends.desktop;\r
+package com.badlogic.gdx.backends.lwjgl;\r
\r
import java.awt.Canvas;\r
import java.awt.image.BufferedImage;\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx.backends.desktop;\r
+package com.badlogic.gdx.backends.lwjgl;\r
\r
import java.util.ArrayList;\r
import java.util.HashSet;\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx.backends.desktop;\r
+package com.badlogic.gdx.backends.lwjgl;\r
\r
import java.io.File;\r
import java.io.IOException;\r
\r
import com.badlogic.gdx.audio.Music;\r
\r
-class LwjglMusic implements Music, Runnable {\r
+final class LwjglMusic implements Music, Runnable {\r
private enum State {\r
Playing, Stopped, Paused\r
}\r
-package com.badlogic.gdx.backends.desktop;\r
+package com.badlogic.gdx.backends.lwjgl;\r
\r
import java.io.BufferedOutputStream;\r
import java.io.File;\r
import com.badlogic.gdx.Version;\r
import com.badlogic.gdx.utils.GdxRuntimeException;\r
\r
-class LwjglNativesLoader {\r
+final class LwjglNativesLoader {\r
static void load() {\r
System.setProperty("org.lwjgl.input.Mouse.allowNegativeMouseCoords", "true");\r
Version.loadLibrary();\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx.backends.desktop;\r
+package com.badlogic.gdx.backends.lwjgl;\r
\r
import java.awt.AlphaComposite;\r
import java.awt.BasicStroke;\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx.backends.desktop;\r
+package com.badlogic.gdx.backends.lwjgl;\r
\r
import java.io.BufferedInputStream;\r
import java.io.ByteArrayOutputStream;\r
* @author mzechner\r
* \r
*/\r
-class LwjglSound implements Sound {\r
+final class LwjglSound implements Sound {\r
/** the audio format **/\r
private final AudioFormat format;\r
\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx.backends.desktop;\r
+package com.badlogic.gdx.backends.lwjgl;\r
\r
import java.awt.Graphics2D;\r
import java.awt.image.BufferedImage;\r
import org.lwjgl.opengl.GL12;\r
\r
import com.badlogic.gdx.Gdx;\r
-import com.badlogic.gdx.backends.desktop.PNGDecoder.Format;\r
+import com.badlogic.gdx.backends.lwjgl.PNGDecoder.Format;\r
import com.badlogic.gdx.files.FileHandle;\r
import com.badlogic.gdx.graphics.Pixmap;\r
import com.badlogic.gdx.graphics.Texture;\r
\r
static private ByteBuffer buffer;\r
static private IntBuffer intBuffer;\r
- static private PNGDecoder pngDecoder = new PNGDecoder();\r
+ static private final PNGDecoder pngDecoder = new PNGDecoder();\r
\r
/**\r
* Create a new texture\r
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package com.badlogic.gdx.backends.desktop;
+package com.badlogic.gdx.backends.lwjgl;
import java.io.EOFException;
import java.io.IOException;
import java.util.zip.Inflater;
/**
- * A PNGDecoder. The slick PNG decoder is based on this class :)
+ * Decodes A PNG directly a ByteBuffer.
*
* @author Matthias Mann
+ * @author Nathan Sweet <misc@n4te.com> (minor edits to avoid allocation)
*/
-class PNGDecoder {
+final class PNGDecoder {
public enum Format {
ALPHA(1, true), LUMINANCE(1, false), LUMINANCE_ALPHA(2, true), RGB(3, false), RGBA(4, true), BGRA(4, true), ABGR(4, true);
\r
import com.badlogic.gdx.ApplicationListener;\r
import com.badlogic.gdx.Gdx;\r
-import com.badlogic.gdx.backends.desktop.LwjglApplication;\r
-import com.badlogic.gdx.backends.desktop.LwjglCanvas;\r
+import com.badlogic.gdx.backends.lwjgl.LwjglApplication;\r
+import com.badlogic.gdx.backends.lwjgl.LwjglCanvas;\r
import com.badlogic.gdx.graphics.BitmapFont;\r
import com.badlogic.gdx.graphics.Color;\r
import com.badlogic.gdx.graphics.Texture;\r
\r
import com.badlogic.gdx.ApplicationListener;\r
import com.badlogic.gdx.Gdx;\r
-import com.badlogic.gdx.backends.desktop.LwjglApplication;\r
+import com.badlogic.gdx.backends.lwjgl.LwjglApplication;\r
import com.badlogic.gdx.hiero.unicodefont.effects.ColorEffect;\r
\r
public class UnicodeFontTest implements ApplicationListener {\r
import com.badlogic.gdx.Files.FileType;\r
import com.badlogic.gdx.Gdx;\r
import com.badlogic.gdx.InputProcessor;\r
-import com.badlogic.gdx.backends.desktop.LwjglCanvas;\r
+import com.badlogic.gdx.backends.lwjgl.LwjglCanvas;\r
import com.badlogic.gdx.graphics.BitmapFont;\r
import com.badlogic.gdx.graphics.Color;\r
import com.badlogic.gdx.graphics.GL10;\r
\r
package com.badlogic.gdx.twl.tests;\r
\r
-import com.badlogic.gdx.backends.desktop.LwjglApplication;\r
+import com.badlogic.gdx.backends.lwjgl.LwjglApplication;\r
\r
public class ButtonTestDesktop {\r
public static void main (String[] argv) {\r
\r
package com.badlogic.gdx.twl.tests;\r
\r
-import com.badlogic.gdx.backends.desktop.LwjglApplication;\r
+import com.badlogic.gdx.backends.lwjgl.LwjglApplication;\r
\r
public class TextAreaTestDesktop {\r
public static void main (String[] argv) {\r
\r
package com.badlogic.gdx.tests.lwjgl;\r
\r
-import com.badlogic.gdx.backends.desktop.LwjglApplet;\r
+import com.badlogic.gdx.backends.lwjgl.LwjglApplet;\r
import com.badlogic.gdx.tests.Pong;\r
\r
public class LwjglAppletTest extends LwjglApplet {\r
package com.badlogic.gdx.tests.lwjgl;\r
\r
-import com.badlogic.gdx.backends.desktop.LwjglApplication;\r
+import com.badlogic.gdx.backends.lwjgl.LwjglApplication;\r
\r
public class LwjglDebugStarter {\r
public static void main(String[] argv) {\r
import javax.swing.JScrollPane;\r
import javax.swing.ListSelectionModel;\r
\r
-import com.badlogic.gdx.backends.desktop.LwjglApplication;\r
+import com.badlogic.gdx.backends.lwjgl.LwjglApplication;\r
import com.badlogic.gdx.tests.utils.GdxTest;\r
import com.badlogic.gdx.tests.utils.GdxTests;\r
\r