aboutsummaryrefslogtreecommitdiffstats
path: root/src/jake2/render/fast/Image.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-10-08 10:44:05 +0200
committerSven Gothel <[email protected]>2012-10-08 10:44:05 +0200
commitf5612e7dfc635359f15b402c2ee9022a5e703a9d (patch)
tree0b54287f72b87a2693f38ed308195e928311a093 /src/jake2/render/fast/Image.java
parent3119458b32c8620f971ba44488389ddf03b2d705 (diff)
Simple NEWT port: Remove AWT dependencies in Jake2 / JOGL / Fast (default mode) - Prepare for ES2NEWT
- Removed AWT init dialog, replaced w/ UI less auto install if n/a @ default location: $HOME/Jake2/baseq2 - JOGL GL2 Renderer 'joglgl2' - JOGL ES2 Renderer 'jogles2' (TBD) - Replaced JOGLKBD (AWT) w/ NEWTKBD - JOGL* Renderer using NEWT
Diffstat (limited to 'src/jake2/render/fast/Image.java')
-rw-r--r--src/jake2/render/fast/Image.java17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/jake2/render/fast/Image.java b/src/jake2/render/fast/Image.java
index 49a143d..cce6ab6 100644
--- a/src/jake2/render/fast/Image.java
+++ b/src/jake2/render/fast/Image.java
@@ -32,7 +32,6 @@ import jake2.render.image_t;
import jake2.util.Lib;
import jake2.util.Vargs;
-import java.awt.Dimension;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.IntBuffer;
@@ -40,6 +39,8 @@ import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
+import javax.media.nativewindow.util.Dimension;
+
/**
* Image
*
@@ -472,8 +473,8 @@ public abstract class Image extends Main {
}
if (dim != null) {
- dim.width = width;
- dim.height = height;
+ dim.setWidth(width);
+ dim.setHeight(height);
}
//
@@ -556,8 +557,8 @@ public abstract class Image extends Main {
numPixels = columns * rows;
if (dim != null) {
- dim.width = columns;
- dim.height = rows;
+ dim.setWidth(columns);
+ dim.setHeight(rows);
}
pic = new byte[numPixels * 4]; // targa_rgba;
@@ -1473,7 +1474,7 @@ public abstract class Image extends Main {
pic = LoadPCX(name, null, dim);
if (pic == null)
return null;
- image = GL_LoadPic(name, pic, dim.width, dim.height, type, 8);
+ image = GL_LoadPic(name, pic, dim.getWidth(), dim.getHeight(), type, 8);
}
else if (name.endsWith(".wal")) {
@@ -1488,14 +1489,14 @@ public abstract class Image extends Main {
if (pic == null)
return null;
- image = GL_LoadPic(name, pic, dim.width, dim.height, type, 32);
+ image = GL_LoadPic(name, pic, dim.getWidth(), dim.getHeight(), type, 32);
} else {
pic = LoadPCX("pics/" + name + ".pcx", null, dim);
if (pic == null)
return null;
- image = GL_LoadPic(name, pic, dim.width, dim.height, type, 8);
+ image = GL_LoadPic(name, pic, dim.getWidth(), dim.getHeight(), type, 8);
}