home *** CD-ROM | disk | FTP | other *** search
- import javax.microedition.lcdui.Displayable;
- import javax.microedition.lcdui.Form;
- import javax.microedition.rms.RecordStore;
-
- class Chains$SaveThread extends Thread {
- // $FF: synthetic field
- private final Chains this$0;
-
- private Chains$SaveThread(Chains var1) {
- this.this$0 = var1;
- }
-
- public void run() {
- try {
- Chains.progGauge.setValue(15);
- RecordStore.deleteRecordStore("saveGame");
- } catch (Exception var6) {
- }
-
- try {
- Chains.progGauge.setValue(30);
- RecordStore var1 = RecordStore.openRecordStore("saveGame", true);
- Chains.progGauge.setValue(45);
- byte[] var7 = this.this$0.canvas.serialise();
- Chains.progGauge.setValue(60);
- var1.addRecord(var7, 0, var7.length);
- Chains.progGauge.setValue(75);
- var1.closeRecordStore();
- Chains.progGauge.setValue(90);
- this.this$0.form.addCommand(Chains.cont);
- } catch (Exception var5) {
- Form var2 = new Form("Phone Error");
- var2.append("This game cannot be saved because the phone has run out of memory.");
- ((Displayable)var2).addCommand(Chains.instQuit);
- ((Displayable)var2).setCommandListener(Chains.access$0(this.this$0));
- Chains.display.setCurrent(var2);
-
- try {
- RecordStore.deleteRecordStore("saveGame");
- } catch (Exception var4) {
- }
- }
-
- Chains.progGauge.setValue(100);
- this.this$0.canvas.reset();
- this.this$0.inGame = false;
- Chains.display.setCurrent(this.this$0.form);
- }
-
- // $FF: synthetic method
- Chains$SaveThread(Chains var1, Chains$$1 var2) {
- this(var1);
- }
- }
-