first commit
This commit is contained in:
149
p000/GameRenderCanvas.java
Normal file
149
p000/GameRenderCanvas.java
Normal file
@@ -0,0 +1,149 @@
|
||||
package p000;
|
||||
|
||||
import javax.microedition.lcdui.Graphics;
|
||||
import javax.microedition.lcdui.game.GameCanvas;
|
||||
import javax.microedition.m3g.Camera;
|
||||
import javax.microedition.m3g.Graphics3D;
|
||||
import javax.microedition.m3g.Transform;
|
||||
|
||||
/* renamed from: ab */
|
||||
/* loaded from: microcounterstrike.jar:ab.class */
|
||||
public class GameRenderCanvas extends GameCanvas {
|
||||
|
||||
/* renamed from: b */
|
||||
private static GameRenderCanvas gameRenderCanvas7;
|
||||
|
||||
/* renamed from: c */
|
||||
private Graphics3D graphics3D8;
|
||||
|
||||
/* renamed from: d */
|
||||
private Graphics graphics9;
|
||||
|
||||
/* renamed from: a */
|
||||
public boolean flag10;
|
||||
|
||||
public GameRenderCanvas() {
|
||||
super(false);
|
||||
this.graphics3D8 = Graphics3D.getInstance();
|
||||
this.graphics9 = getGraphics();
|
||||
initCanvas13();
|
||||
}
|
||||
|
||||
/* renamed from: b */
|
||||
public final void initCanvas13() {
|
||||
if (PlatformServices.getInstance().getBoolean153()) {
|
||||
setFullScreenMode(true);
|
||||
}
|
||||
MapManager.getInstance().setBackgroundCrop(getWidth(), getHeight());
|
||||
CameraManager.getInstance().execute122(CameraManager.getInstance().getCamera121("MAIN"), this);
|
||||
execute20(false);
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
/* JADX WARN: Type inference failed for: r0v0 */
|
||||
/* JADX WARN: Type inference failed for: r0v1, types: [java.lang.Throwable] */
|
||||
/* JADX WARN: Type inference failed for: r0v2, types: [java.lang.Throwable] */
|
||||
/* JADX WARN: Type inference failed for: r0v7, types: [ab] */
|
||||
/* JADX WARN: Type inference failed for: r0v8 */
|
||||
/* renamed from: c */
|
||||
public static GameRenderCanvas getInstance() {
|
||||
?? r0 = 0;
|
||||
r0 = 0;
|
||||
gameRenderCanvas7 = null;
|
||||
try {
|
||||
r0 = (GameRenderCanvas) PlatformServices.getInstance().getGameplayCanvasClass().newInstance();
|
||||
gameRenderCanvas7 = r0;
|
||||
} catch (IllegalAccessException e) {
|
||||
r0.printStackTrace();
|
||||
} catch (InstantiationException e2) {
|
||||
r0.printStackTrace();
|
||||
}
|
||||
return gameRenderCanvas7;
|
||||
}
|
||||
|
||||
/* renamed from: d */
|
||||
public static GameRenderCanvas getInstance_2() {
|
||||
return gameRenderCanvas7;
|
||||
}
|
||||
|
||||
/* renamed from: e */
|
||||
public final void execute16() {
|
||||
try {
|
||||
execute17();
|
||||
execute18();
|
||||
flushGraphics();
|
||||
} catch (Exception e) {
|
||||
System.out.println(e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/* renamed from: h */
|
||||
private void execute17() {
|
||||
Graphics3D graphics3D;
|
||||
try {
|
||||
try {
|
||||
InputStateBase.getInstance().execute125();
|
||||
if (GameSessionLoop.getInstance().sessionType == 0) {
|
||||
AiControllerBase.getInstance().execute114();
|
||||
} else if (GameSessionLoop.getInstance().sessionType == 1) {
|
||||
BluetoothClientSync.getInstance().sendPacket244();
|
||||
} else if (GameSessionLoop.getInstance().sessionType == 2) {
|
||||
BluetoothHostSync.getInstance().sendPacket103();
|
||||
}
|
||||
PlayerManager.getInstance().updateVisibility();
|
||||
execute19();
|
||||
this.graphics3D8.bindTarget(this.graphics9, true, 6);
|
||||
graphics3D = this.graphics3D8;
|
||||
graphics3D.render(MapManager.getInstance().world);
|
||||
} catch (Exception e) {
|
||||
graphics3D.printStackTrace();
|
||||
}
|
||||
} finally {
|
||||
this.graphics3D8.releaseTarget();
|
||||
this.graphics3D8.setCamera((Camera) null, (Transform) null);
|
||||
this.graphics3D8.resetLights();
|
||||
}
|
||||
}
|
||||
|
||||
/* renamed from: f */
|
||||
public final void execute18() {
|
||||
HudBase.getInstance().execute236(this.graphics9, this);
|
||||
OverlayMenuBase.getInstance().execute23(this.graphics9, this);
|
||||
}
|
||||
|
||||
/* renamed from: a */
|
||||
public void execute19() {
|
||||
}
|
||||
|
||||
/* renamed from: a */
|
||||
public final void execute20(boolean z) {
|
||||
this.flag10 = z;
|
||||
float width = getWidth() / getHeight();
|
||||
Camera camera = CameraManager.getInstance().camera89;
|
||||
float f = 60.0f / width;
|
||||
if (z) {
|
||||
f /= 2.0f;
|
||||
}
|
||||
camera.setPerspective(f, width, 0.1f, 300.0f);
|
||||
}
|
||||
|
||||
public void keyPressed(int i) {
|
||||
KeyInputHandlerBase.getInstance().execute127(i, this);
|
||||
}
|
||||
|
||||
public void keyReleased(int i) {
|
||||
KeyInputHandlerBase.getInstance().execute128(i, this);
|
||||
}
|
||||
|
||||
/* renamed from: g */
|
||||
public static void execute21() {
|
||||
gameRenderCanvas7.graphics9 = null;
|
||||
gameRenderCanvas7.graphics3D8 = null;
|
||||
gameRenderCanvas7 = null;
|
||||
}
|
||||
|
||||
public void sizeChanged(int i, int i2) {
|
||||
this.graphics9 = getGraphics();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user