summaryrefslogtreecommitdiff
path: root/NET/worlds/scape/Texture.java
diff options
context:
space:
mode:
authorFuwn <[email protected]>2021-05-03 16:38:41 -0700
committerFuwn <[email protected]>2021-05-03 16:38:41 -0700
commite1e781bb2135ef78592226f1a3eaba4925702f1f (patch)
tree8a5b590463ed413e1c6eabb719130e701b95ca63 /NET/worlds/scape/Texture.java
downloadworlds.jar-main.tar.xz
worlds.jar-main.zip
:star:HEADmain
Diffstat (limited to 'NET/worlds/scape/Texture.java')
-rw-r--r--NET/worlds/scape/Texture.java162
1 files changed, 162 insertions, 0 deletions
diff --git a/NET/worlds/scape/Texture.java b/NET/worlds/scape/Texture.java
new file mode 100644
index 0000000..4d68b7f
--- /dev/null
+++ b/NET/worlds/scape/Texture.java
@@ -0,0 +1,162 @@
+/* */ package NET.worlds.scape;
+/* */
+/* */ import NET.worlds.network.URL;
+/* */ import java.io.IOException;
+/* */ import java.net.MalformedURLException;
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public abstract class Texture
+/* */ implements Persister
+/* */ {
+/* 30 */ protected int textureID = 0;
+/* 31 */ int refs = 1;
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ static
+/* */ {
+/* 44 */ nativeInit();
+/* */ }
+/* */
+/* */ public static native void nativeInit();
+/* */
+/* */ private static native int nativeGetW(int paramInt);
+/* */
+/* 51 */ public int getW() { return nativeGetW(this.textureID); }
+/* */
+/* */
+/* */ private static native int nativeGetH(int paramInt);
+/* */
+/* */ public int getH()
+/* */ {
+/* 58 */ return nativeGetH(this.textureID);
+/* */ }
+/* */
+/* 61 */ private static Object classCookie = new Object();
+/* */
+/* */ public URL getURL()
+/* */ {
+/* 65 */ URL u = null;
+/* 66 */ String s = getName();
+/* 67 */ if (s != null) {
+/* */ try {
+/* 69 */ u = new URL(URL.getCurDir(), s);
+/* */ }
+/* */ catch (MalformedURLException localMalformedURLException) {}
+/* */ }
+/* 73 */ return u;
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public void incRef()
+/* */ {
+/* 82 */ assert (this.refs > 0);
+/* */
+/* 84 */ if (this.textureID != 0) {
+/* 85 */ this.refs += 1;
+/* */ }
+/* */ }
+/* */
+/* */
+/* */ public void copyFrom(int dc, int x1, int x2, int y1, int y2)
+/* */ {
+/* 92 */ assert (this.textureID != 0);
+/* 93 */ nativeCopyFrom(this.textureID, dc, x1, x2, y1, y2);
+/* */ }
+/* */
+/* */
+/* */
+/* */ private static native void nativeCopyFrom(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6);
+/* */
+/* */
+/* */ private static native void nativeRelease(int paramInt);
+/* */
+/* */
+/* */ public synchronized void decRef()
+/* */ {
+/* 106 */ if (--this.refs <= 0)
+/* */ {
+/* */
+/* 109 */ if (this.textureID != 0) {
+/* 110 */ nativeRelease(this.textureID);
+/* 111 */ this.textureID = 0;
+/* */ }
+/* */ }
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */ protected void finalize()
+/* */ {
+/* 121 */ if (this.refs > 0) {
+/* 122 */ this.refs = 1;
+/* 123 */ decRef();
+/* */
+/* */
+/* 126 */ this.refs = 1000000;
+/* */ }
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */ protected String getName()
+/* */ {
+/* 135 */ return null;
+/* */ }
+/* */
+/* */ public void saveState(Saver s) throws IOException {
+/* 139 */ s.saveVersion(0, classCookie);
+/* */ }
+/* */
+/* */ public void restoreState(Restorer r)
+/* */ throws IOException, TooNewException
+/* */ {
+/* 145 */ switch (r.restoreVersion(classCookie))
+/* */ {
+/* */ case 0:
+/* */ break;
+/* */
+/* */ default:
+/* 151 */ throw new TooNewException();
+/* */ }
+/* */ }
+/* */
+/* */ public void postRestore(int version) {}
+/* */ }
+
+
+/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Texture.class
+ * Java compiler version: 6 (50.0)
+ * JD-Core Version: 0.7.1
+ */ \ No newline at end of file