summaryrefslogtreecommitdiff
path: root/NET/worlds/scape/StandardTexture.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/StandardTexture.java
downloadworlds.jar-e1e781bb2135ef78592226f1a3eaba4925702f1f.tar.xz
worlds.jar-e1e781bb2135ef78592226f1a3eaba4925702f1f.zip
:star:HEADmain
Diffstat (limited to 'NET/worlds/scape/StandardTexture.java')
-rw-r--r--NET/worlds/scape/StandardTexture.java79
1 files changed, 79 insertions, 0 deletions
diff --git a/NET/worlds/scape/StandardTexture.java b/NET/worlds/scape/StandardTexture.java
new file mode 100644
index 0000000..2b3df13
--- /dev/null
+++ b/NET/worlds/scape/StandardTexture.java
@@ -0,0 +1,79 @@
+/* */ package NET.worlds.scape;
+/* */
+/* */ import java.io.IOException;
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public class StandardTexture
+/* */ extends Texture
+/* */ implements Persister
+/* */ {
+/* */ private String urlName;
+/* */
+/* */ public StandardTexture(String urlName, String filename)
+/* */ {
+/* 29 */ this.urlName = urlName;
+/* 30 */ makeTexture(urlName, filename);
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ protected StandardTexture() {}
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ private void makeTexture(String urlName, String filename)
+/* */ {
+/* 45 */ this.textureID = new ImageConverter(urlName, filename).convert();
+/* */ }
+/* */
+/* */
+/* */
+/* 50 */ public String getName() { return this.urlName; }
+/* */
+/* 52 */ private static Object classCookie = new Object();
+/* */
+/* */ public void saveState(Saver s) throws IOException
+/* */ {
+/* 56 */ s.saveVersion(0, classCookie);
+/* 57 */ super.saveState(s);
+/* 58 */ s.saveString(this.urlName);
+/* */ }
+/* */
+/* */ public void restoreState(Restorer r) throws IOException, TooNewException
+/* */ {
+/* 63 */ switch (r.restoreVersion(classCookie)) {
+/* */ case 0:
+/* 65 */ super.restoreState(r);
+/* 66 */ this.urlName = r.restoreString();
+/* 67 */ makeTexture(this.urlName, this.urlName);
+/* 68 */ break;
+/* */ default:
+/* 70 */ throw new TooNewException();
+/* */ }
+/* */ }
+/* */ }
+
+
+/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\StandardTexture.class
+ * Java compiler version: 6 (50.0)
+ * JD-Core Version: 0.7.1
+ */ \ No newline at end of file