📄 gamescreen.java
字号:
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi
import com.nokia.mid.ui.FullCanvas;
import javax.microedition.lcdui.Graphics;
// Referenced classes of package game:
// MultiOutPut, RecStore, Scroller, Play,
// Image2, game
class GameScreen extends FullCanvas
implements Runnable
{
private static final int _$497 = 8;
private static final int _$488 = 8;
private static final int _$496 = 5;
private static final int _$188 = 128;
private static final int _$187 = 128;
private static final int _$481 = 90;
private static final int _$473 = 16;
private static final int _$486 = 477;
private static final int _$487 = 502;
boolean bDrawLoading;
boolean bDrawing;
boolean bRunning;
boolean bSavedGame;
boolean draw;
int frames;
int iCredits;
public int iDrawLoadSave;
int iDxArrow[] = {
1, 2, 4, 6, 8, 9, 9, 8, 7, 6,
5, 4, 3, 2
};
int iHelp;
int iMenu;
int iPaintLoadingBar;
int iShowIntroscreen;
int iWinText;
int maxmem;
game midlet;
MultiOutPut mu;
Play play;
boolean playGame;
boolean runGame;
boolean runMenu;
Scroller sc;
int scrx;
int scry;
public GameScreen(game game1)
{
mu = null;
frames = 0;
play = null;
draw = false;
sc = null;
scrx = 0;
scry = 0;
iShowIntroscreen = 8;
runGame = true;
runMenu = true;
playGame = false;
iMenu = 0;
iHelp = 0;
bSavedGame = false;
bDrawLoading = false;
iDrawLoadSave = 0;
maxmem = 0;
bDrawing = false;
bRunning = false;
iPaintLoadingBar = 0;
midlet = game1;
(new Thread(this)).start();
}
public void drawLoading(int i)
{
bDrawLoading = true;
iPaintLoadingBar = i;
repaint();
sleep(50);
bDrawLoading = false;
}
protected void hideNotify()
{
System.gc();
midlet.destroyApp(false);
}
public void keyPressed(int i)
{
if(mu != null)
mu.keyPressed(i);
}
public void keyReleased(int i)
{
if(mu != null)
mu.keyReleased(i);
}
public void paint(Graphics g)
{
bDrawing = true;
if(bDrawLoading)
{
if(mu != null && iDrawLoadSave != 0)
{
Graphics _tmp = g;
Graphics _tmp1 = g;
mu.print(g, 0, 0, iDrawLoadSave, 0x2 | 0x1);
}
byte byte0 = 108;
g.setClip(0, 0, 128, 128);
int l = (iPaintLoadingBar * 128) / 200;
g.setColor(189, 27, 27);
g.fillRect(32, byte0, l, 9);
g.setColor(0, 0, 0);
g.drawRect(32, byte0, 64, 9);
bDrawing = false;
return;
}
if(iShowIntroscreen == 8)
{
int i1 = 0;
g.setClip(0, 0, 128, 128 + i1);
g.setColor(255, 255, 255);
g.fillRect(0, 0, 128, 128 + i1);
Image2 image2_1 = new Image2("/gfx/mediaplazza.png", 1, 1, true);
image2_1.draw(g, 5, 18);
image2_1 = null;
System.gc();
}
if(iShowIntroscreen != 0)
{
iShowIntroscreen--;
if(iShowIntroscreen == 0)
{
Image2 image2 = new Image2("/gfx/introscreen.png", 1, 1, true);
if(image2.loaded)
image2.draw(g, 0, 0);
image2 = new Image2("/sfr.png", 1, 1, true);
if(image2.loaded)
{
Graphics _tmp2 = g;
Graphics _tmp3 = g;
image2.draw(g, -1, -1, 0x20 | 0x8);
}
image2 = null;
System.gc();
}
bDrawing = false;
return;
}
byte byte1 = 22;
if(runMenu)
{
g.setClip(0, 0, 128, 128);
g.setColor(0, 0, 0);
g.fillRect(0, 0, 128, 128);
if(iMenu <= 5)
{
int j1 = 12;
for(int i = 0; i < 6; i++)
{
if(!bSavedGame && i == 1)
i++;
if(i == 3)
{
if(mu.bUseOptions)
{
Graphics _tmp4 = g;
mu.print(g, -64, j1, 379 + i, 8);
if(mu.useMusic)
mu.print(g, 69, j1, 385);
else
mu.print(g, 69, j1, 386);
} else
{
j1 -= byte1;
}
} else
if(i == 0 && bSavedGame)
{
Graphics _tmp5 = g;
mu.print(g, 0, j1, 476, 2);
} else
{
Graphics _tmp6 = g;
mu.print(g, 0, j1, 379 + i, 2);
}
if(iMenu == i)
{
int j2 = iDxArrow[frames % iDxArrow.length];
mu.cheatPrint(g, 1 + j2, j1, ">");
mu.cheatPrint(g, 118 - j2, j1, "<");
}
j1 += byte1;
}
Graphics _tmp7 = g;
mu.print(g, 1, -1, 392, 32);
}
if(iMenu == 6)
{
Graphics _tmp8 = g;
Graphics _tmp9 = g;
mu.print(g, 0, 0, 380, 0x2 | 0x1);
Graphics _tmp10 = g;
mu.print(g, 1, -1, 0, 32);
Graphics _tmp11 = g;
Graphics _tmp12 = g;
mu.print(g, -1, -1, 371, 0x20 | 0x8);
}
if(iMenu == 10)
{
int k1 = 26 * mu.iCharSizeY + 128;
if(iWinText > k1)
{
Graphics _tmp13 = g;
mu.print(g, 0, 40, 405, 2);
Graphics _tmp14 = g;
mu.print(g, 0, 55, 406, 2);
} else
{
int k2 = 0;
for(int l2 = 477; l2 <= 502; l2++)
{
Graphics _tmp15 = g;
mu.print(g, 0, (128 - iWinText) + k2, l2, 2);
k2 += mu.iCharSizeY;
}
iWinText += 4;
}
Graphics _tmp16 = g;
mu.print(g, 1, -1, 392, 32);
}
if(iMenu == 20)
{
Graphics _tmp17 = g;
mu.print(g, 0, 8, 381, 2);
if(iHelp < 5)
{
int l1 = 35;
for(int j = 0; j < 8; j++)
{
Graphics _tmp18 = g;
mu.print(g, 0, l1, 426 + iHelp * 8 + j, 2);
l1 += mu.iCharSizeY + 3;
}
}
}
if(iMenu >= 40 && iMenu <= 44)
{
Graphics _tmp19 = g;
mu.print(g, 1, -1, 392, 32);
if(iMenu == 40)
{
int i2 = 22;
for(int k = 393; k <= 404; k++)
{
Graphics _tmp20 = g;
mu.print(g, 0, i2 - iCredits, k, 2);
i2 += 14;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -