diff options
Diffstat (limited to 'NET/worlds/scape/StandardTexture.java')
| -rw-r--r-- | NET/worlds/scape/StandardTexture.java | 79 |
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 |