diff options
Diffstat (limited to 'src/jake2/render/fast')
-rw-r--r-- | src/jake2/render/fast/Draw.java | 7 | ||||
-rw-r--r-- | src/jake2/render/fast/Image.java | 17 | ||||
-rw-r--r-- | src/jake2/render/fast/Main.java | 3 |
3 files changed, 15 insertions, 12 deletions
diff --git a/src/jake2/render/fast/Draw.java b/src/jake2/render/fast/Draw.java index 6eeb937..87d2522 100644 --- a/src/jake2/render/fast/Draw.java +++ b/src/jake2/render/fast/Draw.java @@ -31,10 +31,11 @@ import jake2.qcommon.Com; import jake2.render.image_t; import jake2.util.Lib; -import java.awt.Dimension; import java.nio.ByteBuffer; import java.nio.IntBuffer; +import javax.media.nativewindow.util.Dimension; + /** * Draw * (gl_draw.c) @@ -118,8 +119,8 @@ public abstract class Draw extends Image { public void Draw_GetPicSize(Dimension dim, String pic) { image_t image = Draw_FindPic(pic); - dim.width = (image != null) ? image.width : -1; - dim.height = (image != null) ? image.height : -1; + dim.setWidth((image != null) ? image.width : -1); + dim.setHeight((image != null) ? image.height : -1); } /* 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); } diff --git a/src/jake2/render/fast/Main.java b/src/jake2/render/fast/Main.java index e5583cd..471e40d 100644 --- a/src/jake2/render/fast/Main.java +++ b/src/jake2/render/fast/Main.java @@ -32,10 +32,11 @@ import jake2.qcommon.*; import jake2.render.*; import jake2.util.*; -import java.awt.Dimension; import java.nio.FloatBuffer; import java.nio.IntBuffer; +import javax.media.nativewindow.util.Dimension; + /** * Main * |