// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) fieldsfirst ansi import javax.microedition.media.Manager ; import javax.microedition.media.Player; import java.io.IOException; import java.io.InputStream; import javax.microedition.lcdui.*; import javax.microedition.midlet.MIDlet; public class Micro extends MIDlet implements Runnable { public i m_di; public f m_charf; public b m_elseb; public m m_trym; private Thread m_jThread; public boolean m_caseZ; public int m_nullI; public long m_forJ; public long m_gotoJ; public long m_byteJ; public boolean m_intZ; public boolean m_ifZ; public static boolean m_aZ = false; public static boolean m_cZ = true; public static final int m_eI = 30; public static boolean m_bZ; public static int m_longI = 0; public static final int m_newI = 10; private static byte m_xaB[] = new byte[1]; private Player player1; private InputStream input1; public Micro() { try { input1 = getClass() .getResourceAsStream("/ music.mid"); player1 = Manager.createPlayer(input1, "audio/midi"); } catch (Exception ex) {} m_jThread = null; m_caseZ = false; m_nullI = 2; m_forJ = 0L; m_gotoJ = 0L; m_byteJ = 0L; m_intZ = false; m_ifZ = false; } public void _gameToMenuvV() { m_di._forvV(); m_bZ = true; m_trym._ivV(); } public void _menuToGamevV() {try { player1.start(); } catch (Exception ex) {} m_trym._dvV(); m_bZ = false; m_di._bytevV(); } private long _avJ() { m_longI++; m_di.repaint(); long l = System.currentTimeMillis(); switch(m_longI) { case 1: // '\001' m_charf = new f(); break; case 2: // '\002' m_elseb = new b(m_charf); m_di._abV(m_elseb); break; case 3: // '\003' m_trym = new m(this); m_trym._byteIV(1); break; case 4: // '\004' m_trym._byteIV(2); break; case 5: // '\005' m_trym._byteIV(3); break; case 6: // '\006' m_trym._byteIV(4); break; case 7: // '\007' m_trym._byteIV(5); break; case 8: // '\b' m_trym._byteIV(6); break; case 9: // '\t' m_trym._byteIV(7); break; case 10: // '\n' m_di._amV(m_trym); m_di._doIIV(-50, 150); setMode(1); break; default: m_longI--; try { Thread.sleep(100L); } catch(InterruptedException _ex) { } break; } return System.currentTimeMillis() - l; } public void init() { long l = 3000L; Thread.yield(); m_di = new i(this); Display.getDisplay(this).setCurrent(m_di); m_di._doIV(1); for(; !m_di.isShown(); _avJ()); long l2; for(; l > 0L; l -= l2) l2 = _avJ(); m_di._doIV(2); long l3; for(long l1 = 3000L; l1 > 0L; l1 -= l3) l3 = _avJ(); while(m_longI < 10) _avJ(); m_di._doIV(0); m_intZ = true; } // public static byte[] _readBigFileStringvaB(String s, int j) // { // byte abyte0[] = null; // try // { // InputStream inputstream = getClass().getResourceAsStream("/" + s); // abyte0 = new byte[j]; // inputstream.read(abyte0, 0, j); // } // catch(IOException _ex) { } // return abyte0; // } public static byte readByte(InputStream inputstream) { try { inputstream.read(m_xaB, 0, 1); } catch(IOException _ex) { } return m_xaB[0]; } public static InputStream _readFileStringInputStream(String s) { InputStream inputstream; if(s.charAt(0) == '/') inputstream = s.getClass().getResourceAsStream(s); else inputstream = s.getClass().getResourceAsStream("/" + s); return inputstream; } public void _restartZV(boolean flag) { m_elseb._doZV(true); m_forJ = 0L; m_gotoJ = 0L; m_byteJ = 0L; if(flag) m_di._aStringvV(m_charf._aIIString(m_trym._gvI(), m_trym._evI()), 3000); m_di._casevV(); } protected void destroyApp(boolean flag) { m_aZ = false; synchronized(m_di) { } m_caseZ = true; m_trym._ifvV(); notifyDestroyed(); } protected void startApp() { m_aZ = true; m_cZ = false; if(m_jThread == null) { m_jThread = new Thread(this); m_jThread.start(); } } protected void pauseApp() { m_cZ = true; if(!m_bZ) _gameToMenuvV(); System.gc(); } public void run() { long l1; if(!m_intZ) try { init(); } catch(Exception _ex) { throw new RuntimeException(); } m_di.setCommandListener(m_di); _restartZV(false); m_trym._charIV(0); if(m_trym._kvZ()) _restartZV(true); l1 = 0L; while (true) { if(!m_aZ) break; /* Loop/switch isn't completed */ if(m_elseb._bytevI() != m_trym._jvI()) { int j = m_di._intII(m_trym._jvI()); m_elseb._doIV(j); m_trym._intIV(j); } if(m_bZ) { m_trym._charIV(1); if(m_trym._kvZ()) _restartZV(true); } for(int i1 = m_nullI; i1 > 0; i1--) { if(m_ifZ) m_gotoJ += 20L; if(m_forJ == 0L) m_forJ = System.currentTimeMillis(); int k; if((k = m_elseb._dovI()) == 3 && m_byteJ == 0L) { m_byteJ = System.currentTimeMillis() + 3000L; m_di._aStringvV("Разбился", 3000); m_di.repaint(); m_di.serviceRepaints(); } if(m_byteJ != 0L && m_byteJ < System.currentTimeMillis()) _restartZV(true); if(k == 5) { m_di._aStringvV("Разбился", 3000); m_di.repaint(); m_di.serviceRepaints(); try { long l2 = 1000L; if(m_byteJ > 0L) l2 = Math.min(m_byteJ - System.currentTimeMillis(), 1000L); if(l2 > 0L) Thread.sleep(l2); } catch(InterruptedException _ex) { } _restartZV(true); } else if(k == 4) { m_forJ = 0L; m_gotoJ = 0L; } else if(k == 1 || k == 2) { if(k == 2) m_gotoJ -= 10L; _goalLoopvV(); m_trym._aJV(m_gotoJ / 10L); m_trym._charIV(2); if(m_trym._kvZ()) _restartZV(true); if(!m_aZ) break; } m_ifZ = k != 4; } if(!m_aZ) break; /* Loop/switch isn't completed */ try { m_elseb._charvV(); long l; if((l = System.currentTimeMillis()) - l1 < 30L) { try { synchronized(this) { wait(Math.max(30L - (l - l1), 1L)); } } catch(InterruptedException interruptedexception) { } l1 = System.currentTimeMillis(); } else { l1 = l; } m_di.repaint(); } catch(Exception exception) { exception.printStackTrace (); } } destroyApp(true); return; } public void _goalLoopvV() { long l1 = 0L; if(!m_elseb.m_NZ) m_di._aStringvV("На козла!", 1000); else m_di._aStringvV("Финишировал", 1000); for(long l2 = System.currentTimeMillis() + 1000L; l2 > System.currentTimeMillis(); m_di.repaint()) { if(m_bZ) { m_di.repaint(); return; } for(int j = m_nullI; j > 0; j--) if(m_elseb._dovI() == 5) try { long l3; if((l3 = l2 - System.currentTimeMillis()) > 0L) Thread.sleep(l3); return; } catch(InterruptedException _ex) { return; } m_elseb._charvV(); long l; if((l = System.currentTimeMillis()) - l1 < 30L) { try { synchronized(this) { wait(Math.max(30L - (l - l1), 1L)); } } catch(InterruptedException interruptedexception) { } l1 = System.currentTimeMillis(); } else { l1 = l; } } } public void _setNumPhysicsLoopsIV(int j) { m_nullI = j; } public void setMode(int j) { m_elseb._byteIV(j); } }