public Background(StreamLoader streamLoader, String s, int i) { Stream stream = new Stream(streamLoader.getDataForName(s + ".dat")); Stream stream_1 = new Stream(streamLoader.getDataForName("index.dat")); stream_1.currentOffset = stream.readUnsignedWord(); anInt1456 = stream_1.readUnsignedWord(); anInt1457 = stream_1.readUnsignedWord(); int j = stream_1.readUnsignedByte(); anIntArray1451 = new int[j]; for (int k = 0; k < j - 1; k++) { anIntArray1451[k + 1] = stream_1.read3Bytes(); } for (int l = 0; l < i; l++) { stream_1.currentOffset += 2; stream.currentOffset += stream_1.readUnsignedWord() * stream_1.readUnsignedWord(); stream_1.currentOffset++; } anInt1454 = stream_1.readUnsignedByte(); anInt1455 = stream_1.readUnsignedByte(); anInt1452 = stream_1.readUnsignedWord(); anInt1453 = stream_1.readUnsignedWord(); int i1 = stream_1.readUnsignedByte(); int j1 = anInt1452 * anInt1453; aByteArray1450 = new byte[j1]; if (i1 == 0) { for (int k1 = 0; k1 < j1; k1++) { aByteArray1450[k1] = (byte)stream.readSignedByte(); } return; } if (i1 == 1) { for (int l1 = 0; l1 < anInt1452; l1++) { for (int i2 = 0; i2 < anInt1453; i2++) { aByteArray1450[l1 + i2 * anInt1452] = (byte)stream.readSignedByte(); } } } }
private void readValues(Stream buffer) { int i = -1; do { int opcode; //do { opcode = buffer.readUnsignedByte(); if (opcode == 0) { goto breaklabel0; } if (opcode == 1) { int k = buffer.readUnsignedByte(); if (k > 0) { if (anIntArray773 == null || lowMem) { anIntArray776 = new int[k]; anIntArray773 = new int[k]; for (int k1 = 0; k1 < k; k1++) { anIntArray773[k1] = buffer.readUnsignedWord(); anIntArray776[k1] = buffer.readUnsignedByte(); } } else { buffer.currentOffset += k * 3; } } } else if (opcode == 2) { name = buffer.readNewString(); } else if (opcode == 3) { description = buffer.readBytes(); } else if (opcode == 5) { int l = buffer.readUnsignedByte(); if (l > 0) { if (anIntArray773 == null || lowMem) { anIntArray776 = null; anIntArray773 = new int[l]; for (int l1 = 0; l1 < l; l1++) { anIntArray773[l1] = buffer.readUnsignedWord(); } } else { buffer.currentOffset += l * 2; } } } else if (opcode == 14) { anInt744 = buffer.readUnsignedByte(); } else if (opcode == 15) { anInt761 = buffer.readUnsignedByte(); } else if (opcode == 17) { aBoolean767 = false; } else if (opcode == 18) { aBoolean757 = false; } else if (opcode == 19) { hasActions = (buffer.readUnsignedByte() == 1); //i = buffer.readUnsignedByte(); //if (i == 1) // hasActions = true; } else if (opcode == 21) { aBoolean762 = true; } else if (opcode == 22) { aBoolean769 = false; // } else if (opcode == 23) { aBoolean764 = true; } else if (opcode == 24) { animId = buffer.readUnsignedWord(); if (animId == 65535) { animId = -1; } } else if (opcode == 28) { anInt775 = buffer.readUnsignedByte(); } else if (opcode == 29) { aByte737 = (byte)buffer.readSignedByte(); } else if (opcode == 39) { aByte742 = (byte)buffer.readSignedByte(); } else if (opcode >= 30 && opcode < 39) { if (actions == null) { actions = new String[10]; } actions[opcode - 30] = buffer.readNewString(); if (actions[opcode - 30].ToLower().Equals("hidden")) { actions[opcode - 30] = null; } } else if (opcode == 40) { int i1 = buffer.readUnsignedByte(); modifiedModelColors = new int[i1]; originalModelColors = new int[i1]; for (int i2 = 0; i2 < i1; i2++) { modifiedModelColors[i2] = buffer.readUnsignedWord(); originalModelColors[i2] = buffer.readUnsignedWord(); } } else if (opcode == 41) { int k = buffer.readUnsignedByte(); //retextureSrc = new int[k]; //retextureDst = new int[k]; for (int k1 = 0; k1 < k; k1++) { /*retextureSrc[k1] = */ buffer.readUnsignedWord(); /*retextureDst[k1] = */ buffer.readUnsignedWord(); } } else if (opcode == 60) { anInt746 = buffer.readUnsignedWord(); } else if (opcode == 62) { aBoolean751 = true; } else if (opcode == 64) { aBoolean779 = false; } else if (opcode == 65) { anInt748 = buffer.readUnsignedWord(); } else if (opcode == 66) { anInt772 = buffer.readUnsignedWord(); } else if (opcode == 67) { anInt740 = buffer.readUnsignedWord(); } else if (opcode == 68) { anInt758 = buffer.readUnsignedWord(); } else if (opcode == 69) { anInt768 = buffer.readUnsignedByte(); } else if (opcode == 70) { anInt738 = buffer.readSignedWord(); } else if (opcode == 71) { anInt745 = buffer.readSignedWord(); } else if (opcode == 72) { anInt783 = buffer.readSignedWord(); } else if (opcode == 73) { aBoolean736 = true; } else if (opcode == 74) { aBoolean766 = true; } else if (opcode == 75) { anInt760 = buffer.readUnsignedByte(); } else if (opcode == 77) { anInt774 = buffer.readUnsignedWord(); if (anInt774 == 65535) { anInt774 = -1; } anInt749 = buffer.readUnsignedWord(); if (anInt749 == 65535) { anInt749 = -1; } int j1 = buffer.readUnsignedByte(); childrenIDs = new int[j1 + 1]; for (int j2 = 0; j2 <= j1; j2++) { childrenIDs[j2] = buffer.readUnsignedWord(); if (childrenIDs[j2] == 65535) { childrenIDs[j2] = -1; } } } else if (78 == opcode) { /*audioType = */ buffer.readUnsignedWord(); /*anInt7406 = */ buffer.readUnsignedByte(); } else if (opcode == 79) { /*anInt7409 = */ buffer.readUnsignedWord(); /*anInt7410 = */ buffer.readUnsignedWord(); /*anInt7406 = */ buffer.readUnsignedByte(); int i_36_ = buffer.readUnsignedByte(); //audioTracks = new int[i_36_]; for (int i_37_ = 0; i_37_ < i_36_; i_37_++) { /*audioTracks[i_37_] = */ buffer.readUnsignedWord(); } } else if (81 == opcode) { //aByte7368 = (byte) 2; /*anInt7369 = */ buffer.readUnsignedByte(); } // } else { // if (opcode != 75) // continue; // anInt760 = buffer.readUnsignedByte(); // } // continue; //} while (true); // anInt774 = buffer.readUnsignedWord(); // if (anInt774 == 65535) // anInt774 = -1; // anInt749 = buffer.readUnsignedWord(); // if (anInt749 == 65535) // anInt749 = -1; // int j1 = buffer.readUnsignedByte(); // childrenIDs = new int[j1 + 1]; // for (int j2 = 0; j2 <= j1; j2++) { // childrenIDs[j2] = buffer.readUnsignedWord(); // if (childrenIDs[j2] == 65535) // childrenIDs[j2] = -1; // } } while (true); breaklabel0: if (i == -1) { hasActions = anIntArray773 != null && (anIntArray776 == null || anIntArray776[0] == 10); if (actions != null) { hasActions = true; } } if (aBoolean766) { aBoolean767 = false; aBoolean757 = false; } if (anInt760 == -1) { anInt760 = aBoolean767 ? 1 : 0; } }
public void readValues(Stream stream) { do { int i = stream.readUnsignedByte(); if (i == 0) { return; } if (i == 1) { int j = stream.readUnsignedByte(); models = new int[j]; for (int j1 = 0; j1 < j; j1++) { models[j1] = stream.readUnsignedWord(); } } else if (i == 2) { name = stream.readString().Replace("_", " "); } else if (i == 3) { description = stream.readBytes(); } else if (i == 12) { aByte68 = (byte)stream.readSignedByte(); } else if (i == 13) { standAnim = stream.readUnsignedWord(); } else if (i == 14) { walkAnim = stream.readUnsignedWord(); } else if (i == 17) { walkAnim = stream.readUnsignedWord(); anInt58 = stream.readUnsignedWord(); anInt83 = stream.readUnsignedWord(); anInt55 = stream.readUnsignedWord(); if (walkAnim == 65535) { walkAnim = -1; } if (anInt58 == 65535) { anInt58 = -1; } if (anInt83 == 65535) { anInt83 = -1; } if (anInt55 == 65535) { anInt55 = -1; } } else if (i >= 30 && i < 40) { if (actions == null) { actions = new String[5]; } actions[i - 30] = stream.readString(); if (actions[i - 30].ToLower().Equals("hidden")) { actions[i - 30] = null; } } else if (i == 40) { int k = stream.readUnsignedByte(); originalModelColors = new int[k]; modifiedModelColors = new int[k]; for (int k1 = 0; k1 < k; k1++) { originalModelColors[k1] = stream.readUnsignedWord(); modifiedModelColors[k1] = stream.readUnsignedWord(); } } else if (i == 60) { int l = stream.readUnsignedByte(); anIntArray73 = new int[l]; for (int l1 = 0; l1 < l; l1++) { anIntArray73[l1] = stream.readUnsignedWord(); } } else if (i == 90) { stream.readUnsignedWord(); } else if (i == 91) { stream.readUnsignedWord(); } else if (i == 92) { stream.readUnsignedWord(); } else if (i == 93) { aBoolean87 = false; } else if (i == 95) { combatLevel = stream.readUnsignedWord(); } else if (i == 97) { anInt91 = stream.readUnsignedWord(); } else if (i == 98) { anInt86 = stream.readUnsignedWord(); } else if (i == 99) { aBoolean93 = true; } else if (i == 100) { anInt85 = stream.readSignedByte(); } else if (i == 101) { anInt92 = stream.readSignedByte() * 5; } else if (i == 102) { anInt75 = stream.readUnsignedWord(); } else if (i == 103) { anInt79 = stream.readUnsignedWord(); } else if (i == 106) { anInt57 = stream.readUnsignedWord(); if (anInt57 == 65535) { anInt57 = -1; } anInt59 = stream.readUnsignedWord(); if (anInt59 == 65535) { anInt59 = -1; } int i1 = stream.readUnsignedByte(); childrenIDs = new int[i1 + 1]; for (int i2 = 0; i2 <= i1; i2++) { childrenIDs[i2] = stream.readUnsignedWord(); if (childrenIDs[i2] == 65535) { childrenIDs[i2] = -1; } } } else if (i == 107) { aBoolean84 = false; } } while (true); }
private void readValues(Stream stream) { do { int i = stream.readUnsignedByte(); if (i == 0) { return; } if (i == 1) { modelID = stream.readUnsignedWord(); } else if (i == 2) { name = stream.readString(); } else if (i == 3) { description = stream.readString(); } else if (i == 4) { modelZoom = stream.readUnsignedWord(); } else if (i == 5) { modelRotation1 = stream.readUnsignedWord(); } else if (i == 6) { modelRotation2 = stream.readUnsignedWord(); } else if (i == 7) { modelOffset1 = stream.readUnsignedWord(); if (modelOffset1 > 32767) { modelOffset1 -= 0x10000; } } else if (i == 8) { modelOffset2 = stream.readUnsignedWord(); if (modelOffset2 > 32767) { modelOffset2 -= 0x10000; } } else if (i == 10) { stream.readUnsignedWord(); } else if (i == 11) { stackable = true; } else if (i == 12) { value = stream.readDWord(); } else if (i == 16) { membersObject = true; } else if (i == 23) { maleEquip1 = stream.readUnsignedWord(); aByte205 = (byte)stream.readSignedByte(); } else if (i == 24) { maleEquip2 = stream.readUnsignedWord(); } else if (i == 25) { femaleEquip1 = stream.readUnsignedWord(); aByte154 = (byte)stream.readSignedByte(); } else if (i == 26) { femaleEquip2 = stream.readUnsignedWord(); } else if (i >= 30 && i < 35) { if (groundActions == null) { groundActions = new String[5]; } groundActions[i - 30] = stream.readString(); if (groundActions[i - 30].ToLower().Equals("hidden")) { groundActions[i - 30] = null; } } else if (i >= 35 && i < 40) { if (actions == null) { actions = new String[5]; } actions[i - 35] = stream.readString(); } else if (i == 40) { int j = stream.readUnsignedByte(); editedModelColor = new int[j]; newModelColor = new int[j]; for (int k = 0; k < j; k++) { editedModelColor[k] = stream.readUnsignedWord(); newModelColor[k] = stream.readUnsignedWord(); } } else if (i == 78) { anInt185 = stream.readUnsignedWord(); } else if (i == 79) { anInt162 = stream.readUnsignedWord(); } else if (i == 90) { anInt175 = stream.readUnsignedWord(); } else if (i == 91) { anInt197 = stream.readUnsignedWord(); } else if (i == 92) { anInt166 = stream.readUnsignedWord(); } else if (i == 93) { anInt173 = stream.readUnsignedWord(); } else if (i == 95) { anInt204 = stream.readUnsignedWord(); } else if (i == 97) { certID = stream.readUnsignedWord(); } else if (i == 98) { certTemplateID = stream.readUnsignedWord(); } else if (i >= 100 && i < 110) { if (stackIDs == null) { stackIDs = new int[10]; stackAmounts = new int[10]; } stackIDs[i - 100] = stream.readUnsignedWord(); stackAmounts[i - 100] = stream.readUnsignedWord(); } else if (i == 110) { anInt167 = stream.readUnsignedWord(); } else if (i == 111) { anInt192 = stream.readUnsignedWord(); } else if (i == 112) { anInt191 = stream.readUnsignedWord(); } else if (i == 113) { anInt196 = stream.readSignedByte(); } else if (i == 114) { anInt184 = stream.readSignedByte() * 5; } else if (i == 115) { team = stream.readUnsignedByte(); } else if (i == 121) { lendID = stream.readUnsignedWord(); } else if (i == 122) { lendTemplateID = stream.readUnsignedWord(); } } while(true); }
public TextDrawingArea(bool flag, String s, StreamLoader streamLoader) { aByteArrayArray1491 = new byte[256][]; anIntArray1492 = new int[256]; anIntArray1493 = new int[256]; anIntArray1494 = new int[256]; anIntArray1495 = new int[256]; anIntArray1496 = new int[256]; aRandom1498 = new System.Random(); aBoolean1499 = false; Stream stream = new Stream(streamLoader.getDataForName(s + ".dat")); Stream stream_1 = new Stream(streamLoader.getDataForName("index.dat")); stream_1.currentOffset = stream.readUnsignedWord() + 4; int k = stream_1.readUnsignedByte(); if (k > 0) { stream_1.currentOffset += 3 * (k - 1); } for (int l = 0; l < 256; l++) { anIntArray1494[l] = stream_1.readUnsignedByte(); anIntArray1495[l] = stream_1.readUnsignedByte(); int i1 = anIntArray1492[l] = stream_1.readUnsignedWord(); int j1 = anIntArray1493[l] = stream_1.readUnsignedWord(); int k1 = stream_1.readUnsignedByte(); int l1 = i1 * j1; aByteArrayArray1491[l] = new byte[l1]; if (k1 == 0) { for (int i2 = 0; i2 < l1; i2++) { aByteArrayArray1491[l][i2] = (byte)stream.readSignedByte(); } } else if (k1 == 1) { for (int j2 = 0; j2 < i1; j2++) { for (int l2 = 0; l2 < j1; l2++) { aByteArrayArray1491[l][j2 + l2 * i1] = (byte)stream.readSignedByte(); } } } if (j1 > anInt1497 && l < 128) { anInt1497 = j1; } anIntArray1494[l] = 1; anIntArray1496[l] = i1 + 2; int k2 = 0; for (int i3 = j1 / 7; i3 < j1; i3++) { k2 += aByteArrayArray1491[l][i3 * i1]; } if (k2 <= j1 / 7) { anIntArray1496[l]--; anIntArray1494[l] = 0; } k2 = 0; for (int j3 = j1 / 7; j3 < j1; j3++) { k2 += aByteArrayArray1491[l][(i1 - 1) + j3 * i1]; } if (k2 <= j1 / 7) { anIntArray1496[l]--; } } if (flag) { anIntArray1496[32] = anIntArray1496[73]; } else { anIntArray1496[32] = anIntArray1496[105]; } }