215 lines
7.6 KiB
Java
215 lines
7.6 KiB
Java
package p000;
|
|
|
|
import com.m3gworks.engine.GameAppMidlet;
|
|
import java.io.IOException;
|
|
import java.util.Hashtable;
|
|
import javax.microedition.m3g.World;
|
|
|
|
/* renamed from: aj */
|
|
/* loaded from: microcounterstrike.jar:aj.class */
|
|
public final class GameLoadingThread implements Runnable {
|
|
|
|
/* renamed from: c */
|
|
private static GameLoadingThread gameLoadingThread69;
|
|
|
|
/* renamed from: d */
|
|
private static boolean flag70 = false;
|
|
|
|
/* renamed from: a */
|
|
public int value71 = 0;
|
|
|
|
/* renamed from: b */
|
|
public int value72 = 0;
|
|
|
|
private GameLoadingThread() {
|
|
}
|
|
|
|
/* renamed from: a */
|
|
public static GameLoadingThread getInstance() {
|
|
if (gameLoadingThread69 == null) {
|
|
gameLoadingThread69 = new GameLoadingThread();
|
|
}
|
|
return gameLoadingThread69;
|
|
}
|
|
|
|
/* renamed from: b */
|
|
public static void execute94() {
|
|
switch (GameSessionLoop.getInstance().sessionType) {
|
|
case 0:
|
|
SceneRootNode c0000a = new SceneRootNode();
|
|
int i = MainUiCanvasBase.getInstance().value183;
|
|
PlayerManager.getInstance().addPlayer(new LocalPlayer(1, "Me", i, 1, c0000a));
|
|
float[] fArr = MapManager.getInstance().getCurrentMapInfo().spawnPoints;
|
|
for (int i2 = 1; i2 < fArr.length / 3; i2++) {
|
|
PlayerManager.getInstance().addPlayer(new RemotePlayer(i2 + 1, "Bot", 1 - i, 2));
|
|
}
|
|
break;
|
|
case 1:
|
|
PlayerManager.getInstance().addPlayer(new LocalPlayer(1, "Me", 0, 1, new SceneRootNode()));
|
|
if (ConnectionManager.getInstance_2() != null) {
|
|
PlayerManager.getInstance().addPlayer(new RemotePlayer(2, "BT Player", 1, 3));
|
|
break;
|
|
}
|
|
break;
|
|
case 2:
|
|
PlayerManager.getInstance().addPlayer(new LocalPlayer(1, "Me", 1, 1, new SceneRootNode()));
|
|
PlayerManager.getInstance().addPlayer(new RemotePlayer(2, "BT Player", 0, 3));
|
|
break;
|
|
}
|
|
}
|
|
|
|
/* renamed from: c */
|
|
public static void showScreen95() {
|
|
GameAppMidlet.getInstance().display.setCurrent(MainUiCanvasBase.getInstance());
|
|
MainUiCanvasBase.getInstance().execute37();
|
|
new Thread(gameLoadingThread69).start();
|
|
}
|
|
|
|
@Override // java.lang.Runnable
|
|
public final void run() throws IOException {
|
|
try {
|
|
MainUiCanvasBase.getInstance().value181 = 9;
|
|
this.value72++;
|
|
this.value71 = 1;
|
|
MainUiCanvasBase.getInstance().execute37();
|
|
CameraManager.getInstance().execute118();
|
|
this.value72++;
|
|
World worldM2b = MapManager.getInstance().loadCurrentMap();
|
|
this.value72++;
|
|
this.value71 = 20;
|
|
MainUiCanvasBase.getInstance().execute37();
|
|
this.value72++;
|
|
if (!flag70 && PlatformServices.getInstance().getBoolean141()) {
|
|
BulletHoleManager.execute303(worldM2b);
|
|
}
|
|
this.value72++;
|
|
this.value71 = 25;
|
|
MainUiCanvasBase.getInstance().execute37();
|
|
if (!flag70) {
|
|
GrenadeController.execute72();
|
|
}
|
|
this.value72++;
|
|
this.value71 = 28;
|
|
MainUiCanvasBase.getInstance().execute37();
|
|
if (!flag70) {
|
|
ParticleEffectManager.execute291();
|
|
}
|
|
this.value72++;
|
|
this.value71 = 35;
|
|
MainUiCanvasBase.getInstance().execute37();
|
|
this.value71 = 50;
|
|
MainUiCanvasBase.getInstance().execute37();
|
|
this.value72++;
|
|
if (!flag70) {
|
|
MuzzleFlashManager.execute208();
|
|
}
|
|
this.value72++;
|
|
this.value71 = 60;
|
|
MainUiCanvasBase.getInstance().execute37();
|
|
PlayerManager.getInstance().addAllToWorld(worldM2b);
|
|
this.value71 = 80;
|
|
MainUiCanvasBase.getInstance().execute37();
|
|
this.value72++;
|
|
this.value71 = 85;
|
|
MainUiCanvasBase.getInstance().execute37();
|
|
HudBase.execute239();
|
|
this.value72++;
|
|
this.value71 = 90;
|
|
MainUiCanvasBase.getInstance().execute37();
|
|
OverlayMenuBase.execute231();
|
|
this.value72++;
|
|
this.value71 = 95;
|
|
MainUiCanvasBase.getInstance().execute37();
|
|
System.gc();
|
|
this.value71 = 100;
|
|
MainUiCanvasBase.getInstance().execute37();
|
|
this.value72++;
|
|
flag70 = true;
|
|
int i = GameSessionLoop.getInstance().sessionType;
|
|
if (i == 0) {
|
|
this.value71 = 0;
|
|
execute97();
|
|
return;
|
|
}
|
|
if (i != 1) {
|
|
if (i == 2) {
|
|
BluetoothDiscoveryClient.getInstance().bluetoothControlChannel233.sendPacket135();
|
|
this.value71 = 0;
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
ConnectionManager c0035dM216a = ConnectionManager.getInstance_2();
|
|
if (c0035dM216a != null) {
|
|
try {
|
|
c0035dM216a.input169.readInt();
|
|
} catch (IOException unused) {
|
|
c0035dM216a.sendPacket223();
|
|
ConnectionManager.execute217();
|
|
}
|
|
}
|
|
execute96();
|
|
if (ConnectionManager.getInstance_2() != null) {
|
|
try {
|
|
ConnectionManager.getInstance_2().sendPacket221();
|
|
} catch (IOException unused2) {
|
|
}
|
|
}
|
|
this.value71 = 0;
|
|
execute97();
|
|
} catch (Exception e) {
|
|
GameAppMidlet.getInstance().display.setCurrent(MainUiCanvasBase.getInstance());
|
|
MainUiCanvasBase.getInstance().showScreen53(new StringBuffer(String.valueOf(this.value72)).append(e.toString()).toString());
|
|
}
|
|
}
|
|
|
|
/* renamed from: f */
|
|
private static void execute96() {
|
|
if (ConnectionManager.getInstance_2() == null || !ConnectionManager.getInstance_2().flag171) {
|
|
return;
|
|
}
|
|
Hashtable hashtable = PlayerManager.getInstance().playersById;
|
|
Integer num = new Integer(2);
|
|
((PlayerEntityBase) hashtable.get(num)).removeFromWorld();
|
|
hashtable.remove(num);
|
|
}
|
|
|
|
/* renamed from: g */
|
|
private static void execute97() {
|
|
GameSessionLoop.getInstance().start();
|
|
}
|
|
|
|
/* renamed from: d */
|
|
public static void execute98() {
|
|
CameraManager.getInstance().execute119();
|
|
MapManager.getInstance().unloadMap();
|
|
if (PlatformServices.getInstance().getBoolean141()) {
|
|
BulletHoleManager.getInstance().execute306();
|
|
}
|
|
ParticleEffectManager.getInstance().execute297();
|
|
MuzzleFlashManager.getInstance().execute211();
|
|
HudBase.getInstance().execute238();
|
|
OverlayMenuBase.getInstance();
|
|
PlayerManager.getInstance().disposeAll();
|
|
GameRenderCanvas.execute21();
|
|
Runtime.getRuntime().gc();
|
|
}
|
|
|
|
/* renamed from: e */
|
|
public static void execute99() {
|
|
if (PlatformServices.getInstance().getBoolean141()) {
|
|
BulletHoleManager.execute307();
|
|
}
|
|
ParticleEffectManager.execute298();
|
|
GrenadeController.execute77();
|
|
WeaponLoadout.clearWeaponCatalog();
|
|
if (MainUiCanvasBase.getInstance().soundEnabled) {
|
|
SoundManager.getInstance().execute202();
|
|
}
|
|
MuzzleFlashManager.execute212();
|
|
HudBase.execute240();
|
|
OverlayMenuBase.execute232();
|
|
Runtime.getRuntime().gc();
|
|
}
|
|
}
|