Files
micro-counter-strike-decomp…/p000/MainMenuCanvas.java
2026-03-18 12:51:32 +03:00

1226 lines
40 KiB
Java

package p000;
import com.m3gworks.engine.GameAppMidlet;
import java.io.IOException;
import java.util.Vector;
import javax.bluetooth.ServiceRecord;
import javax.microedition.lcdui.Image;
import javax.microedition.midlet.MIDletStateChangeException;
/* renamed from: ae */
/* loaded from: microcounterstrike.jar:ae.class */
public class MainMenuCanvas extends MainUiCanvasBase {
/* renamed from: m */
public static Image image28;
/* renamed from: n */
public static Image image39;
/* renamed from: o */
public static Image image40;
/* renamed from: p */
public static Image image41;
/* renamed from: q */
private static Image image26 = null;
/* renamed from: r */
private static Image image27 = null;
/* renamed from: v */
private static final String[] CONST_TEXT32 = {"start", "Multiplayer", "help", "about", "exit"};
/* renamed from: w */
private static final String[] CONST_TEXT33 = {"forward:2,up", "backward:8,down", "turn left:4,left", "turn right:6,right", "move left:1", "move right:3", "shoot:5,fire", "change weapon:7", "collimator on/off:9", "buy:0", "buy ammos:*", "popup menu:#"};
/* renamed from: x */
private static final String[] CONST_TEXT34 = {"micro counter strike", "full version 1.1.0", "", "produced by:", "www.m3gworks.com", "", "contact us:", "m3gworks@hotmail.com", "", "copyright^2007", "m3gworks team"};
/* renamed from: y */
private static final String[] CONST_TEXT35 = {"counter-terrorist", "terrorist"};
/* renamed from: z */
private static final String[] CONST_TEXT36 = {"host", "connect"};
/* renamed from: A */
private static final String[] f37A = {"refresh", "quit"};
/* renamed from: B */
private static final String[] f38B = {"start", "quit"};
/* renamed from: s */
private int value29 = 0;
/* renamed from: t */
private boolean flag30 = true;
/* renamed from: u */
private int value31 = 0;
/* renamed from: C */
private int f42C = 0;
/* renamed from: D */
private int f43D = 0;
/* renamed from: E */
private int f44E = 0;
/* renamed from: F */
private boolean f45F = false;
/* renamed from: G */
private int f46G = 0;
/* renamed from: H */
private int f47H = 0;
/* renamed from: I */
private boolean f48I = false;
@Override // p000.MainUiCanvasBase
/* renamed from: b */
public final void execute37() {
switch (this.value181) {
case 0:
execute40();
break;
case 1:
execute44();
break;
case 2:
execute46();
break;
case 3:
execute48();
break;
case 4:
execute50();
break;
case 5:
execute42();
break;
case 9:
execute52();
break;
case 10:
execute54();
break;
case 12:
execute56();
break;
case 13:
execute58();
break;
case 14:
execute59();
break;
case 21:
execute61();
break;
case 22:
execute62();
break;
case 23:
execute64();
break;
case 24:
execute65();
break;
case 25:
execute66();
break;
}
}
@Override // p000.MainUiCanvasBase
public void keyPressed(int i) {
switch (this.value181) {
case 0:
execute41(i);
break;
case 1:
execute45(i);
break;
case 2:
execute47(i);
break;
case 3:
execute49(i);
break;
case 4:
execute51(i);
break;
case 5:
execute43(i);
break;
case 10:
execute55(i);
break;
case 12:
execute57(i);
break;
case 14:
execute60();
break;
case 22:
execute63(i);
break;
case 25:
execute67();
break;
}
}
/* renamed from: b */
private void execute38(String str) {
this.graphics.setColor(16685312);
this.graphics.fillRect(0, 0, getWidth(), getHeight());
this.graphics.setColor(0);
int width = (int) (getWidth() * 2.5568182f);
int height = (int) (getHeight() * 1.8181819f);
this.graphics.fillArc((getWidth() - width) - 2, -((height - getHeight()) / 3), width, height, 90, -160);
int i = 15;
int i2 = 18;
if (PlatformServices.getInstance().uiLayoutMode == 1) {
i = 8;
i2 = 12;
}
this.graphics.setColor(0);
this.graphics.drawLine(0, i - 1, getWidth(), i - 1);
for (int i3 = 0; i3 < i2; i3++) {
this.graphics.setColor(255 - (i3 * 3), 255 - (i3 * 3), 255 - (i3 * 3));
this.graphics.fillRect(0, i + i3, getWidth(), 1);
}
this.graphics.setColor(0);
this.graphics.drawLine(0, i + i2, getWidth(), i + i2);
int i4 = i + ((i2 - 8) / 2);
int i5 = 10;
int[] iArr = new int[4];
for (int i6 = 0; i6 < str.length(); i6++) {
execute69(str.charAt(i6), iArr);
if (iArr[0] != -1) {
this.graphics.drawRegion(image39, iArr[0], iArr[1], iArr[2], iArr[3], 0, i5, i4, 20);
i5 += iArr[2] + 1;
} else {
i5 += 8;
}
}
}
/* renamed from: a */
private void execute39(String[] strArr) {
int height = getHeight();
int i = PlatformServices.getInstance().uiLayoutMode;
this.flag30 = false;
int i2 = this.value31;
while (true) {
if (i2 >= strArr.length) {
break;
}
String str = strArr[i2];
int i3 = 10;
int i4 = (i == 1 ? 30 : 43) + ((i2 - this.value31) * 16);
if (i4 > height - 20) {
this.flag30 = true;
break;
}
int[] iArr = new int[4];
for (int i5 = 0; i5 < str.length(); i5++) {
execute68(str.charAt(i5), iArr);
if (iArr[0] != -1) {
this.graphics.drawRegion(image40, iArr[0], iArr[1], iArr[2], iArr[3], 0, i3, i4, 20);
i3 += iArr[2];
} else {
i3 += 6;
}
}
i2++;
}
if (this.value31 != 0) {
this.graphics.drawRegion(image28, 0, 0, image28.getWidth(), image28.getHeight(), 6, 10, i == 1 ? 25 : 38, 17);
}
if (this.flag30) {
this.graphics.drawRegion(image28, 0, 0, image28.getWidth(), image28.getHeight(), 5, 10, height - 10, 17);
}
}
/* renamed from: e */
private void execute40() {
Image image;
execute38("menu");
if (PlatformServices.getInstance().uiLayoutMode == 1) {
image = image27;
image26 = null;
} else {
image = image26;
image27 = null;
}
this.graphics.drawImage(image, getWidth() / 2, getHeight() - 5, 33);
for (int i = 0; i < CONST_TEXT32.length; i++) {
String lowerCase = CONST_TEXT32[i].toLowerCase();
int i2 = 10;
int i3 = (PlatformServices.getInstance().uiLayoutMode == 1 ? 30 : 43) + (i * 14);
int[] iArr = new int[4];
for (int i4 = 0; i4 < lowerCase.length(); i4++) {
execute68(lowerCase.charAt(i4), iArr);
if (iArr[0] != -1) {
this.graphics.drawRegion(image40, iArr[0], iArr[1], iArr[2], iArr[3], 0, i2, i3, 20);
i2 += iArr[2];
} else {
i2 += 6;
}
}
if (i == this.value29) {
this.graphics.drawImage(image28, 4, i3 + 3, 6);
}
}
flushGraphics();
if (this.midlet.display.getCurrent() != this) {
this.midlet.display.setCurrent(this);
}
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r0v17, types: [int] */
/* JADX WARN: Type inference failed for: r0v18, types: [java.lang.Throwable] */
/* JADX WARN: Type inference failed for: r0v21, types: [com.m3gworks.engine.GameAppMidlet] */
/* renamed from: a */
private void execute41(int i) {
if (i == 50 || getGameAction(i) == 1) {
if (this.value29 == 0) {
this.value29 = CONST_TEXT32.length - 1;
} else {
this.value29--;
}
} else if (i == 56 || getGameAction(i) == 6) {
if (this.value29 == CONST_TEXT32.length - 1) {
this.value29 = 0;
} else {
this.value29++;
}
} else if (i == 53 || getGameAction(i) == 8) {
?? M213a = this.value29;
switch (M213a) {
case 0:
this.sessionType = 0;
GameSessionLoop.getInstance().sessionType = this.sessionType;
this.value181 = 5;
break;
case 1:
this.value181 = 10;
break;
case 2:
this.value181 = 3;
break;
case 3:
this.value181 = 4;
break;
case 4:
try {
GameLoadingThread.getInstance();
GameLoadingThread.execute99();
SplashScreen.execute226();
M213a = GameAppMidlet.getInstance();
M213a.destroyApp(false);
} catch (MIDletStateChangeException e) {
M213a.printStackTrace();
}
GameAppMidlet.getInstance().notifyDestroyed();
return;
}
}
execute37();
}
/* renamed from: f */
private void execute42() {
execute38("select team");
for (int i = 0; i < CONST_TEXT35.length; i++) {
String lowerCase = CONST_TEXT35[i].toLowerCase();
int i2 = 10;
int i3 = (PlatformServices.getInstance().uiLayoutMode == 1 ? 30 : 43) + (i * 14);
int[] iArr = new int[4];
for (int i4 = 0; i4 < lowerCase.length(); i4++) {
execute68(lowerCase.charAt(i4), iArr);
if (iArr[0] != -1) {
this.graphics.drawRegion(image40, iArr[0], iArr[1], iArr[2], iArr[3], 0, i2, i3, 20);
i2 += iArr[2];
} else {
i2 += 6;
}
}
if (i == this.f42C) {
this.graphics.drawImage(image28, 4, i3 + 3, 6);
}
}
flushGraphics();
if (this.midlet.display.getCurrent() != this) {
this.midlet.display.setCurrent(this);
}
}
/* renamed from: b */
private void execute43(int i) {
if (i == 56 || getGameAction(i) == 1) {
if (this.f42C == 0) {
this.f42C = CONST_TEXT35.length - 1;
} else {
this.f42C--;
}
} else if (i == 50 || getGameAction(i) == 6) {
if (this.f42C == CONST_TEXT35.length - 1) {
this.f42C = 0;
} else {
this.f42C++;
}
} else if (i == 53 || getGameAction(i) == 8) {
if (this.f42C == 0) {
this.value183 = 0;
} else {
this.value183 = 1;
}
this.value181 = 1;
} else if (i == 35) {
this.f42C = 0;
this.value181 = 0;
}
execute37();
}
/* renamed from: g */
private void execute44() {
execute38("choose a map");
Vector vector = MapManager.getInstance().maps;
for (int i = 0; i < vector.size(); i++) {
String lowerCase = ((MapInfo) vector.elementAt(i)).displayName.toLowerCase();
int i2 = 10;
int i3 = PlatformServices.getInstance().uiLayoutMode;
int i4 = (i3 == 1 ? 30 : 43) + (i * 14);
int[] iArr = new int[4];
for (int i5 = 0; i5 < lowerCase.length(); i5++) {
execute68(lowerCase.charAt(i5), iArr);
if (iArr[0] != -1) {
this.graphics.drawRegion(image40, iArr[0], iArr[1], iArr[2], iArr[3], 0, i2, i4, 20);
i2 += iArr[2];
} else {
i2 += 6;
}
}
if (i == this.value182) {
this.graphics.drawImage(image28, 4, (i3 == 1 ? 30 : 43) + (i * 14) + 3, 6);
}
}
flushGraphics();
if (this.midlet.display.getCurrent() != this) {
this.midlet.display.setCurrent(this);
}
}
/* renamed from: c */
private void execute45(int i) {
Vector vector = MapManager.getInstance().maps;
if (i == 56 || getGameAction(i) == 1) {
if (this.value182 == 0) {
this.value182 = vector.size() - 1;
} else {
this.value182--;
}
} else if (i == 50 || getGameAction(i) == 6) {
if (this.value182 == vector.size() - 1) {
this.value182 = 0;
} else {
this.value182++;
}
} else if (i == 53 || getGameAction(i) == 8) {
MapManager.getInstance().currentMapIndex = this.value182;
switch (this.sessionType) {
case 0:
GameLoadingThread.getInstance();
GameLoadingThread.execute94();
GameLoadingThread.getInstance();
GameLoadingThread.showScreen95();
return;
case 1:
BluetoothServerListener.getInstance().execute189();
this.value181 = 12;
break;
}
} else if (i == 35) {
this.value182 = 0;
this.value181 = 0;
}
execute37();
}
/* renamed from: h */
private void execute46() {
execute38("options");
int i = 10;
int i2 = PlatformServices.getInstance().uiLayoutMode == 1 ? 30 : 43;
int[] iArr = new int[4];
for (int i3 = 0; i3 < "sound".length(); i3++) {
execute68("sound".charAt(i3), iArr);
if (iArr[0] != -1) {
this.graphics.drawRegion(image40, iArr[0], iArr[1], iArr[2], iArr[3], 0, i, i2, 20);
i += iArr[2];
} else {
i += 6;
}
}
this.graphics.drawRegion(image28, 0, 0, image28.getWidth(), image28.getHeight(), 3, getWidth() - 40, i2 + 3, 24);
String str = this.soundEnabledPending ? "on" : "off";
int width = getWidth() - 35;
for (int i4 = 0; i4 < str.length(); i4++) {
execute68(str.charAt(i4), iArr);
if (iArr[0] != -1) {
this.graphics.drawRegion(image40, iArr[0], iArr[1], iArr[2], iArr[3], 0, width, i2, 20);
width += iArr[2];
} else {
width += 6;
}
}
this.graphics.drawRegion(image28, 0, 0, image28.getWidth(), image28.getHeight(), 0, getWidth() - 10, i2 + 3, 24);
flushGraphics();
if (this.midlet.display.getCurrent() != this) {
this.midlet.display.setCurrent(this);
}
}
/* renamed from: d */
private void execute47(int i) {
if (i == 50 || getGameAction(i) == 1) {
if (this.value187 == 0) {
this.value187 = 0;
} else {
this.value187--;
}
} else if (i == 56 || getGameAction(i) == 6) {
if (this.value187 == 0) {
this.value187 = 0;
} else {
this.value187++;
}
} else if (i == 52 || getGameAction(i) == 2) {
switch (this.value187) {
case 0:
this.soundEnabledPending = !this.soundEnabledPending;
break;
}
} else if (i == 54 || getGameAction(i) == 5) {
switch (this.value187) {
case 0:
this.soundEnabledPending = !this.soundEnabledPending;
break;
}
} else if (i == 53 || getGameAction(i) == 8) {
this.soundEnabled = this.soundEnabledPending;
this.value181 = 0;
} else if (i == 35 || i == -11) {
this.soundEnabledPending = this.soundEnabled;
this.value181 = 0;
}
execute37();
}
/* renamed from: i */
private void execute48() {
execute38("help");
execute39(CONST_TEXT33);
flushGraphics();
if (this.midlet.display.getCurrent() != this) {
this.midlet.display.setCurrent(this);
}
}
/* renamed from: e */
private void execute49(int i) {
if (i == 50 || getGameAction(i) == 1) {
this.value31--;
if (this.value31 < 0) {
this.value31 = 0;
}
} else if (i == 56 || getGameAction(i) == 6) {
if (this.flag30) {
this.value31++;
if (this.value31 > CONST_TEXT33.length - 1) {
this.value31 = CONST_TEXT33.length - 1;
}
}
} else if (i == 53 || i == 35 || getGameAction(i) == 8 || i == -11) {
this.value31 = 0;
this.flag30 = true;
this.value181 = 0;
}
execute37();
}
/* renamed from: j */
private void execute50() {
execute38("about");
execute39(CONST_TEXT34);
flushGraphics();
if (this.midlet.display.getCurrent() != this) {
this.midlet.display.setCurrent(this);
}
}
/* renamed from: f */
private void execute51(int i) {
if (i == 50 || getGameAction(i) == 1) {
this.value31--;
if (this.value31 < 0) {
this.value31 = 0;
}
} else if (i == 56 || getGameAction(i) == 6) {
if (this.flag30) {
this.value31++;
if (this.value31 > CONST_TEXT33.length - 1) {
this.value31 = CONST_TEXT33.length - 1;
}
}
} else if (i == 53 || i == 35 || getGameAction(i) == 8 || i == -11) {
this.value31 = 0;
this.flag30 = true;
this.value181 = 0;
}
execute37();
}
/* renamed from: k */
private void execute52() {
this.graphics.setColor(0, 0, 0);
this.graphics.fillRect(0, 0, getWidth(), getHeight());
int height = getHeight() - 20;
int width = getWidth() - 40;
this.graphics.setColor(16685312);
this.graphics.fillRect(20, height, (int) (width * (GameLoadingThread.getInstance().value71 / 100.0f)), 5);
this.graphics.setColor(1250067);
this.graphics.drawRect(20, height, width, 5);
flushGraphics();
}
@Override // p000.MainUiCanvasBase
/* renamed from: a */
public final void showScreen53(String str) {
this.graphics.setColor(0, 0, 0);
this.graphics.fillRect(0, 0, getWidth(), getHeight());
this.graphics.setColor(255, 255, 255);
this.graphics.drawString(str, 0, 0, 20);
flushGraphics();
if (this.midlet.display.getCurrent() != this) {
this.midlet.display.setCurrent(this);
}
}
/* renamed from: l */
private void execute54() {
execute38("host or connect");
for (int i = 0; i < CONST_TEXT36.length; i++) {
String lowerCase = CONST_TEXT36[i].toLowerCase();
int i2 = 10;
int i3 = (PlatformServices.getInstance().uiLayoutMode == 1 ? 30 : 43) + (i * 14);
int[] iArr = new int[4];
for (int i4 = 0; i4 < lowerCase.length(); i4++) {
execute68(lowerCase.charAt(i4), iArr);
if (iArr[0] != -1) {
this.graphics.drawRegion(image40, iArr[0], iArr[1], iArr[2], iArr[3], 0, i2, i3, 20);
i2 += iArr[2];
} else {
i2 += 6;
}
}
if (i == this.f43D) {
this.graphics.drawImage(image28, 4, i3 + 3, 6);
}
}
flushGraphics();
if (this.midlet.display.getCurrent() != this) {
this.midlet.display.setCurrent(this);
}
}
/* renamed from: g */
private void execute55(int i) {
if (i == 56 || getGameAction(i) == 1) {
if (this.f43D == 0) {
this.f43D = CONST_TEXT36.length - 1;
} else {
this.f43D--;
}
} else if (i == 50 || getGameAction(i) == 6) {
if (this.f43D == CONST_TEXT36.length - 1) {
this.f43D = 0;
} else {
this.f43D++;
}
} else if (i == 53 || getGameAction(i) == 8) {
switch (this.f43D) {
case 0:
this.sessionType = 1;
GameSessionLoop.getInstance().sessionType = this.sessionType;
this.value183 = 0;
this.value181 = 1;
break;
case 1:
this.sessionType = 2;
GameSessionLoop.getInstance().sessionType = this.sessionType;
this.value183 = 1;
GameLoadingThread.getInstance();
GameLoadingThread.execute94();
this.value181 = 21;
BluetoothDiscoveryClient.getInstance().execute267();
break;
}
} else if (i == 35) {
this.f43D = 0;
this.value181 = 0;
}
execute37();
}
/* renamed from: m */
private void execute56() {
String str;
String[] strArr;
execute38("host");
ConnectionManager c0035dM216a = ConnectionManager.getInstance_2();
int i = 10;
int i2 = PlatformServices.getInstance().uiLayoutMode == 1 ? 30 : 43;
if (c0035dM216a != null) {
str = "client connected.";
this.f45F = true;
strArr = f38B;
} else {
str = "waiting for client...";
this.f45F = false;
strArr = f37A;
}
int[] iArr = new int[4];
for (int i3 = 0; i3 < str.length(); i3++) {
execute68(str.charAt(i3), iArr);
if (iArr[0] != -1) {
this.graphics.drawRegion(image40, iArr[0], iArr[1], iArr[2], iArr[3], 0, i, i2, 20);
i += iArr[2];
} else {
i += 6;
}
}
int i4 = 60;
for (int i5 = 0; i5 < strArr.length; i5++) {
String lowerCase = strArr[i5].toLowerCase();
int i6 = 10;
i4 += i5 * 14;
int[] iArr2 = new int[4];
for (int i7 = 0; i7 < lowerCase.length(); i7++) {
execute68(lowerCase.charAt(i7), iArr2);
if (iArr2[0] != -1) {
this.graphics.drawRegion(image40, iArr2[0], iArr2[1], iArr2[2], iArr2[3], 0, i6, i4, 20);
i6 += iArr2[2];
} else {
i6 += 6;
}
}
if (i5 == this.f44E) {
this.graphics.drawImage(image28, 4, i4 + 3, 6);
}
}
flushGraphics();
if (this.midlet.display.getCurrent() != this) {
this.midlet.display.setCurrent(this);
}
}
/* renamed from: h */
private void execute57(int i) {
if (i == 56 || getGameAction(i) == 1) {
if (this.f44E == 0) {
this.f44E = 1;
} else {
this.f44E = 0;
}
execute37();
return;
}
if (i == 50 || getGameAction(i) == 6) {
if (this.f44E == 0) {
this.f44E = 1;
} else {
this.f44E = 0;
}
execute37();
return;
}
if (i == 53 || getGameAction(i) == 8) {
if (this.f44E != 0) {
BluetoothServerListener.getInstance_2().execute190();
ConnectionManager c0035dM216a = ConnectionManager.getInstance_2();
if (c0035dM216a != null) {
c0035dM216a.sendPacket223();
}
ConnectionManager.execute217();
this.f44E = 0;
this.f45F = false;
this.value181 = 0;
execute37();
return;
}
if (!this.f45F) {
execute37();
return;
}
this.value181 = 13;
execute37();
BluetoothServerListener runnableC0028baM187b = BluetoothServerListener.getInstance_2();
runnableC0028baM187b.execute190();
ConnectionManager c0035dM216a2 = ConnectionManager.getInstance_2();
GameLoadingThread.getInstance();
GameLoadingThread.execute94();
if (c0035dM216a2 != null) {
try {
c0035dM216a2.sendPacket220();
} catch (IOException unused) {
runnableC0028baM187b.execute190();
c0035dM216a2.sendPacket223();
ConnectionManager.execute217();
this.f44E = 0;
this.f45F = false;
this.value181 = 25;
execute37();
}
}
GameLoadingThread.getInstance();
GameLoadingThread.showScreen95();
}
}
/* renamed from: n */
private void execute58() {
execute38("host");
int i = 10;
int i2 = PlatformServices.getInstance().uiLayoutMode == 1 ? 30 : 43;
int[] iArr = new int[4];
for (int i3 = 0; i3 < "init bluetooth...".length(); i3++) {
execute68("init bluetooth...".charAt(i3), iArr);
if (iArr[0] != -1) {
this.graphics.drawRegion(image40, iArr[0], iArr[1], iArr[2], iArr[3], 0, i, i2, 20);
i += iArr[2];
} else {
i += 6;
}
}
flushGraphics();
}
/* renamed from: o */
private void execute59() {
this.graphics.setColor(255, 255, 255);
this.graphics.fillRect(0, 0, getWidth(), getHeight());
this.graphics.setColor(0, 0, 0);
this.graphics.drawString("Bluetooth not permitted!", 10, 10, 20);
this.graphics.drawString("Return Main Menu", 10, 150, 20);
this.graphics.drawLine(10, 169, 70, 169);
flushGraphics();
}
/* renamed from: p */
private void execute60() {
this.value181 = 0;
execute37();
}
/* renamed from: q */
private void execute61() {
execute38("client");
int i = 10;
int i2 = PlatformServices.getInstance().uiLayoutMode == 1 ? 30 : 43;
int[] iArr = new int[4];
for (int i3 = 0; i3 < "searching server...".length(); i3++) {
execute68("searching server...".charAt(i3), iArr);
if (iArr[0] != -1) {
this.graphics.drawRegion(image40, iArr[0], iArr[1], iArr[2], iArr[3], 0, i, i2, 20);
i += iArr[2];
} else {
i += 6;
}
}
flushGraphics();
if (this.midlet.display.getCurrent() != this) {
this.midlet.display.setCurrent(this);
}
}
/* renamed from: r */
private void execute62() {
execute38("client");
this.graphics.setColor(0, 0, 0);
Vector vector = BluetoothDiscoveryClient.getInstance().list230;
vector.size();
int i = 10;
int i2 = PlatformServices.getInstance().uiLayoutMode == 1 ? 30 : 43;
String string = new StringBuffer(String.valueOf(vector.size())).append(" server(s) found:").toString();
int[] iArr = new int[4];
for (int i3 = 0; i3 < string.length(); i3++) {
execute68(string.charAt(i3), iArr);
if (iArr[0] != -1) {
this.graphics.drawRegion(image40, iArr[0], iArr[1], iArr[2], iArr[3], 0, i, i2, 20);
i += iArr[2];
} else {
i += 6;
}
}
if (vector.size() == 0) {
this.f48I = false;
int i4 = 60;
for (int i5 = 0; i5 < f37A.length; i5++) {
String lowerCase = f37A[i5].toLowerCase();
int i6 = 10;
i4 += i5 * 14;
int[] iArr2 = new int[4];
for (int i7 = 0; i7 < lowerCase.length(); i7++) {
execute68(lowerCase.charAt(i7), iArr2);
if (iArr2[0] != -1) {
this.graphics.drawRegion(image40, iArr2[0], iArr2[1], iArr2[2], iArr2[3], 0, i6, i4, 20);
i6 += iArr2[2];
} else {
i6 += 6;
}
}
if (i5 == this.f46G) {
this.graphics.drawImage(image28, 4, i4 + 3, 6);
}
}
} else {
this.f48I = true;
int i8 = 60;
for (int i9 = 0; i9 < vector.size(); i9++) {
String lowerCase2 = "";
try {
lowerCase2 = ((ServiceRecord) vector.elementAt(i9)).getHostDevice().getFriendlyName(true).toLowerCase();
} catch (IOException unused) {
}
int i10 = 10;
i8 += i9 * 14;
int[] iArr3 = new int[4];
for (int i11 = 0; i11 < lowerCase2.length(); i11++) {
execute68(lowerCase2.charAt(i11), iArr3);
if (iArr3[0] != -1) {
this.graphics.drawRegion(image40, iArr3[0], iArr3[1], iArr3[2], iArr3[3], 0, i10, i8, 20);
i10 += iArr3[2];
} else {
i10 += 6;
}
}
if (i9 == this.f47H) {
this.graphics.drawImage(image28, 4, i8 + 3, 6);
}
}
}
flushGraphics();
if (this.midlet.display.getCurrent() != this) {
this.midlet.display.setCurrent(this);
}
}
/* renamed from: i */
private void execute63(int i) {
if (this.f48I) {
int size = BluetoothDiscoveryClient.getInstance().list230.size();
if (getGameAction(i) == 1) {
if (this.f47H == 0) {
this.f47H = size - 1;
} else {
this.f47H--;
}
} else if (getGameAction(i) == 6) {
if (this.f47H == size - 1) {
this.f47H = 0;
} else {
this.f47H++;
}
} else if (getGameAction(i) == 8) {
this.f46G = 0;
this.f47H = 0;
this.f48I = false;
this.value181 = 23;
BluetoothDiscoveryClient.getInstance().execute269(this.f47H);
}
} else if (i == 56 || getGameAction(i) == 1) {
if (this.f46G == 0) {
this.f46G = f37A.length - 1;
} else {
this.f46G--;
}
} else if (i == 50 || getGameAction(i) == 6) {
if (this.f46G == f37A.length - 1) {
this.f46G = 0;
} else {
this.f46G++;
}
} else if (i == 53 || getGameAction(i) == 8) {
if (this.f46G == 0) {
this.value181 = 21;
BluetoothDiscoveryClient.getInstance().execute267();
} else {
this.f46G = 0;
this.f47H = 0;
this.f48I = false;
this.value181 = 0;
execute37();
}
}
execute37();
}
/* renamed from: s */
private void execute64() {
execute38("client");
int i = 10;
int i2 = PlatformServices.getInstance().uiLayoutMode == 1 ? 30 : 43;
int[] iArr = new int[4];
for (int i3 = 0; i3 < "connecting...".length(); i3++) {
execute68("connecting...".charAt(i3), iArr);
if (iArr[0] != -1) {
this.graphics.drawRegion(image40, iArr[0], iArr[1], iArr[2], iArr[3], 0, i, i2, 20);
i += iArr[2];
} else {
i += 6;
}
}
flushGraphics();
if (this.midlet.display.getCurrent() != this) {
this.midlet.display.setCurrent(this);
}
}
/* renamed from: t */
private void execute65() {
execute38("client");
int i = 10;
int i2 = PlatformServices.getInstance().uiLayoutMode;
int i3 = i2 == 1 ? 30 : 43;
int[] iArr = new int[4];
for (int i4 = 0; i4 < "connected.".length(); i4++) {
execute68("connected.".charAt(i4), iArr);
if (iArr[0] != -1) {
this.graphics.drawRegion(image40, iArr[0], iArr[1], iArr[2], iArr[3], 0, i, i3, 20);
i += iArr[2];
} else {
i += 6;
}
}
int i5 = 10;
int i6 = i2 == 1 ? 50 : 63;
int[] iArr2 = new int[4];
for (int i7 = 0; i7 < "ready for starting...".length(); i7++) {
execute68("ready for starting...".charAt(i7), iArr2);
if (iArr2[0] != -1) {
this.graphics.drawRegion(image40, iArr2[0], iArr2[1], iArr2[2], iArr2[3], 0, i5, i6, 20);
i5 += iArr2[2];
} else {
i5 += 6;
}
}
flushGraphics();
if (this.midlet.display.getCurrent() != this) {
this.midlet.display.setCurrent(this);
}
}
/* renamed from: u */
private void execute66() {
execute38("bluetooth");
int i = 10;
int i2 = PlatformServices.getInstance().uiLayoutMode;
int i3 = i2 == 1 ? 30 : 43;
int[] iArr = new int[4];
for (int i4 = 0; i4 < "bluetooth is disconnected.".length(); i4++) {
execute68("bluetooth is disconnected.".charAt(i4), iArr);
if (iArr[0] != -1) {
this.graphics.drawRegion(image40, iArr[0], iArr[1], iArr[2], iArr[3], 0, i, i3, 20);
i += iArr[2];
} else {
i += 6;
}
}
int i5 = 10;
int i6 = i2 == 1 ? 50 : 63;
int[] iArr2 = new int[4];
for (int i7 = 0; i7 < "press any key to return.".length(); i7++) {
execute68("press any key to return.".charAt(i7), iArr2);
if (iArr2[0] != -1) {
this.graphics.drawRegion(image40, iArr2[0], iArr2[1], iArr2[2], iArr2[3], 0, i5, i6, 20);
i5 += iArr2[2];
} else {
i5 += 6;
}
}
flushGraphics();
if (this.midlet.display.getCurrent() != this) {
this.midlet.display.setCurrent(this);
}
}
/* renamed from: v */
private void execute67() {
this.value181 = 0;
execute37();
}
/* renamed from: a */
public static void execute68(char c, int[] iArr) {
iArr[0] = -1;
iArr[1] = -1;
iArr[2] = -1;
iArr[3] = -1;
if (c >= 'a' && c <= 'z') {
iArr[0] = 0 + ((c - 97) * 6);
iArr[1] = 0;
iArr[2] = 6;
iArr[3] = 6;
}
if (c >= '0' && c <= '9') {
iArr[0] = 156 + ((c - 48) * 6);
iArr[1] = 0;
iArr[2] = 6;
iArr[3] = 6;
return;
}
switch (c) {
case '!':
iArr[0] = 225;
iArr[1] = 0;
iArr[2] = 3;
iArr[3] = 6;
break;
case '#':
iArr[0] = 264;
iArr[1] = 0;
iArr[2] = 7;
iArr[3] = 6;
break;
case '$':
iArr[0] = 257;
iArr[1] = 0;
iArr[2] = 7;
iArr[3] = 6;
break;
case '\'':
iArr[0] = 222;
iArr[1] = 0;
iArr[2] = 3;
iArr[3] = 6;
break;
case '(':
iArr[0] = 236;
iArr[1] = 0;
iArr[2] = 4;
iArr[3] = 6;
break;
case ')':
iArr[0] = 240;
iArr[1] = 0;
iArr[2] = 4;
iArr[3] = 6;
break;
case '*':
iArr[0] = 286;
iArr[1] = 0;
iArr[2] = 7;
iArr[3] = 6;
break;
case ',':
iArr[0] = 219;
iArr[1] = 0;
iArr[2] = 3;
iArr[3] = 6;
break;
case '-':
iArr[0] = 244;
iArr[1] = 0;
iArr[2] = 6;
iArr[3] = 6;
break;
case '.':
iArr[0] = 216;
iArr[1] = 0;
iArr[2] = 3;
iArr[3] = 6;
break;
case ':':
iArr[0] = 232;
iArr[1] = 0;
iArr[2] = 4;
iArr[3] = 6;
break;
case ';':
iArr[0] = 228;
iArr[1] = 0;
iArr[2] = 4;
iArr[3] = 6;
break;
case '?':
iArr[0] = 250;
iArr[1] = 0;
iArr[2] = 7;
iArr[3] = 6;
break;
case '@':
iArr[0] = 271;
iArr[1] = 0;
iArr[2] = 7;
iArr[3] = 6;
break;
case '^':
iArr[0] = 278;
iArr[1] = 0;
iArr[2] = 8;
iArr[3] = 6;
break;
}
}
/* renamed from: b */
public static void execute69(char c, int[] iArr) {
iArr[0] = -1;
iArr[1] = -1;
iArr[2] = -1;
iArr[3] = -1;
if (c < 'a' || c > 'z') {
return;
}
iArr[0] = (c - 97) * 8;
iArr[1] = 0;
iArr[2] = 8;
iArr[3] = 8;
}
/* renamed from: c */
public static void loadImages70() {
Image imageCreateImage;
try {
image27 = Image.createImage("/res/image2d/title_s.png");
image26 = Image.createImage("/res/image2d/title.png");
image28 = Image.createImage("/res/image2d/arrow_s.png");
image40 = Image.createImage("/res/image2d/text.png");
image41 = Image.createImage("/res/image2d/text_orange.png");
imageCreateImage = Image.createImage("/res/image2d/text_b.png");
image39 = imageCreateImage;
} catch (Exception e) {
imageCreateImage.printStackTrace();
}
}
/* renamed from: d */
public static void execute71() {
image26 = null;
image27 = null;
image28 = null;
image40 = null;
image41 = null;
image39 = null;
}
}