public void setFontData(sbyte[] data) { if (data == null) { this.m_textDirection = 0; this.m_lineDirection = 0; this.m_leading = 0; this.m_ascent = 0; this.m_descent = 0; this.m_spaceSpace = 0; this.m_charSpace = 0; this.m_numChars = 0; this.m_numGlyphs = 0; this.m_utfCodeArray = new ushort[0]; this.m_charDataOffsetArray = new ushort[0]; this.m_charData = new sbyte[0]; this.m_ISOOffsetMap = new ushort[0]; } else { DataInputStream dataInputStream1 = new DataInputStream((InputStream) new ByteArrayInputStream(data, 12)); int num = (int)dataInputStream1.readByte(); this.m_textDirection = (int)dataInputStream1.readByte(); this.m_lineDirection = (int)dataInputStream1.readByte(); this.m_leading = (int)dataInputStream1.readByte(); this.m_ascent = (int)dataInputStream1.readByte(); this.m_descent = (int)dataInputStream1.readByte(); this.m_spaceSpace = (int)dataInputStream1.readByte(); this.m_charSpace = (int)dataInputStream1.readByte(); this.m_numChars = (int)dataInputStream1.readShort(); this.m_numGlyphs = (int)dataInputStream1.readShort(); dataInputStream1.close(); this.m_utfCodeArray = new ushort[this.m_numChars]; this.m_charDataOffsetArray = new ushort[this.m_numChars + 1]; this.m_charData = new sbyte[2 * this.m_numChars + 6 * this.m_numGlyphs]; int bufLength = 12 + (this.m_utfCodeArray.Length + this.m_charDataOffsetArray.Length) * 2 + this.m_charData.Length; DataInputStream dataInputStream2 = new DataInputStream((InputStream) new ByteArrayInputStream(data, bufLength)); dataInputStream2.skip(12L); for (int index = 0; index != this.m_numChars; ++index) { this.m_utfCodeArray[index] = (ushort)dataInputStream2.readShort(); } for (int index = 0; index != this.m_numChars; ++index) { this.m_charDataOffsetArray[index] = (ushort)dataInputStream2.readShort(); } this.m_charDataOffsetArray[this.m_numChars] = ushort.MaxValue; for (int index = 0; index != this.m_charData.Length; ++index) { this.m_charData[index] = dataInputStream2.readByte(); } dataInputStream2.close(); this.setTransform(this.m_transform); this.m_ISOOffsetMap = new ushort[256]; for (int index = 0; index != 128; ++index) { this.m_ISOOffsetMap[index] = (ushort)SDKTextUtils.getCodePos(this.m_utfCodeArray, (ushort)index, this.m_numChars); } } }
// Token: 0x060003DE RID: 990 RVA: 0x0001E0A0 File Offset: 0x0001C2A0 public void readImage() { int num = 0; try { DataInputStream dataInputStream = new DataInputStream(Rms.loadRMS("NR_image")); short num2 = dataInputStream.readShort(); SmallImage.smallImg = new int[(int)num2][]; for (int i = 0; i < SmallImage.smallImg.Length; i++) { SmallImage.smallImg[i] = new int[5]; } for (int j = 0; j < (int)num2; j++) { num++; SmallImage.smallImg[j][0] = dataInputStream.readUnsignedByte(); SmallImage.smallImg[j][1] = (int)dataInputStream.readShort(); SmallImage.smallImg[j][2] = (int)dataInputStream.readShort(); SmallImage.smallImg[j][3] = (int)dataInputStream.readShort(); SmallImage.smallImg[j][4] = (int)dataInputStream.readShort(); } } catch (Exception ex) { Cout.LogError3(string.Concat(new object[] { "Loi readImage: ", ex.ToString(), "i= ", num })); } }
public override void readPacketData(DataInputStream datainputstream) { entityId = datainputstream.readInt(); motionX = datainputstream.readShort(); motionY = datainputstream.readShort(); motionZ = datainputstream.readShort(); }
public override void readPacketData(DataInputStream datainputstream) { entityID = datainputstream.readInt(); slot = datainputstream.readShort(); itemID = datainputstream.readShort(); itemDamage = datainputstream.readShort(); }
public void readBuiltIn(DataInputStream dis, int index) { this.m_packId = (short)-1; this.m_index = (short)index; this.m_descStringId = (int)SimWorld.lookupSimsWorld(dis); this.m_icon = SimWorld.lookupSimsWorld(dis); this.m_flags = dis.readInt(); this.m_buyPrice = dis.readShort(); this.m_sellPrice = dis.readShort(); this.m_maxInventory = dis.readByte(); }
public override void readPacketData(DataInputStream datainputstream) { entityId = datainputstream.readInt(); itemID = datainputstream.readShort(); count = datainputstream.readByte(); itemDamage = datainputstream.readShort(); xPosition = datainputstream.readInt(); yPosition = datainputstream.readInt(); zPosition = datainputstream.readInt(); rotation = datainputstream.readByte(); pitch = datainputstream.readByte(); roll = datainputstream.readByte(); }
public static bool loadSubimageFile(ref AnimationManagerData thisData, ref ResourceManager resMgr) { DataInputStream dataInputStream = new DataInputStream(ResourceManager.loadBinaryFile(24)); for (int index = 0; index < 0; ++index) { thisData.m_subImages[index][0] = (short)dataInputStream.readUnsignedShort(); thisData.m_subImages[index][1] = dataInputStream.readShort(); thisData.m_subImages[index][2] = dataInputStream.readShort(); thisData.m_subImages[index][3] = (short)dataInputStream.readUnsignedShort(); thisData.m_subImages[index][4] = (short)dataInputStream.readUnsignedShort(); } return(true); }
} // end of marshal method public void unmarshal(DataInputStream dis) { try { _currentShaftRPMs = dis.readShort(); _orderedShaftRPMs = dis.readShort(); _shaftRPMRateOfChange = dis.readFloat(); } // end try catch (Exception e) { Trace.WriteLine(e); Trace.Flush(); } } // end of unmarshal method
public override void readPacketData(DataInputStream datainputstream) { xPosition = datainputstream.readInt(); yPosition = datainputstream.readShort(); zPosition = datainputstream.readInt(); xSize = datainputstream.read() + 1; ySize = datainputstream.read() + 1; zSize = datainputstream.read() + 1; chunkSize = datainputstream.readInt(); var abyte0 = new byte[chunkSize]; datainputstream.readFully(abyte0); chunk = new byte[(xSize * ySize * zSize * 5) / 2]; var inflater = new Inflater(); inflater.setInput(abyte0); try { inflater.inflate(chunk); } catch (DataFormatException dataformatexception) { throw new IOException("Bad compressed data format"); } finally { inflater.end(); } }
static GlobalHolidayCalendarLookup() { ImmutableMap.Builder <string, HolidayCalendar> builder = ImmutableMap.builder(); ResourceLocator locator = ResourceLocator.ofClasspath("com/opengamma/strata/basics/date/GlobalHolidayCalendars.bin"); try { using (Stream fis = locator.ByteSource.openStream()) { using (DataInputStream @in = new DataInputStream(fis)) { if (@in.readByte() != 'H' || @in.readByte() != 'C' || @in.readByte() != 'a' || @in.readByte() != 'l') { Console.Error.WriteLine("ERROR: Corrupt holiday calendar data file"); } else { short calSize = @in.readShort(); for (int i = 0; i < calSize; i++) { HolidayCalendar cal = ImmutableHolidayCalendar.readExternal(@in); builder.put(cal.Id.Name, cal); } } } } } catch (IOException ex) { Console.Error.WriteLine("ERROR: Unable to parse holiday calendar data file: " + ex.Message); Console.WriteLine(ex.ToString()); Console.Write(ex.StackTrace); } MAP = builder.build(); }
public void readDLC( DataInputStream dis, int packId, int index, int stringPooldId, string resPrefix) { this.m_packId = (short)packId; this.m_index = (short)index; this.m_descStringId = (int)(ushort)dis.readShort() | stringPooldId << 11; this.m_icon = (short)((int)dis.readShort() + 11); this.m_flags = dis.readInt(); this.m_buyPrice = dis.readShort(); this.m_sellPrice = dis.readShort(); this.m_maxInventory = dis.readByte(); }
} // end of marshal method new public void unmarshal(DataInputStream dis) { base.unmarshal(dis); try { _receivingEntityID.unmarshal(dis); _supplyingEntityID.unmarshal(dis); _numberOfSupplyTypes = dis.readByte(); _padding1 = dis.readShort(); _padding2 = dis.readByte(); for (int idx = 0; idx < _numberOfSupplyTypes; idx++) { SupplyQuantity anX = new SupplyQuantity(); anX.unmarshal(dis); _supplies.Add(anX); } ; } // end try catch (Exception e) { Trace.WriteLine(e); Trace.Flush(); } } // end of unmarshal method
} // end of marshal method new public void unmarshal(DataInputStream dis) { base.unmarshal(dis); try { _issuingEntityID.unmarshal(dis); _collidingEntityID.unmarshal(dis); _collisionEventID.unmarshal(dis); _pad = dis.readShort(); _contactVelocity.unmarshal(dis); _mass = dis.readFloat(); _location.unmarshal(dis); _collisionResultXX = dis.readFloat(); _collisionResultXY = dis.readFloat(); _collisionResultXZ = dis.readFloat(); _collisionResultYY = dis.readFloat(); _collisionResultYZ = dis.readFloat(); _collisionResultZZ = dis.readFloat(); _unitSurfaceNormal.unmarshal(dis); _coefficientOfRestitution = dis.readFloat(); } // end try catch (Exception e) { Trace.WriteLine(e); Trace.Flush(); } } // end of unmarshal method
public override void readPacketData(DataInputStream datainputstream) { xPosition = datainputstream.readInt(); zPosition = datainputstream.readInt(); size = datainputstream.readShort() & 0xffff; coordinateArray = new short[size]; typeArray = new byte[size]; metadataArray = new byte[size]; for (int i = 0; i < size; i++) { coordinateArray[i] = datainputstream.readShort(); } datainputstream.readFully(typeArray); datainputstream.readFully(metadataArray); }
private static void loadCharMap(sbyte enc) { int num = 0; for (int index = 1; index < (int)enc; ++index) { if (((long)SDKTextUtils.s_textEncodings & (long)(1 << index)) != 0L) { ++num; } } DataInputStream dataInputStream = new DataInputStream(JavaLib.getResourceAsStream("charmap", false)); dataInputStream.skip((long)(num << 8)); for (int index = 0; index != 128; ++index) { SDKTextUtils.s_charMapISO[index] = (ushort)dataInputStream.readShort(); } dataInputStream.close(); if (SDKTextUtils.s_currentFont == null) { return; } SDKTextUtils.s_currentFont.refreshISOOffsets(); }
} // end of marshal method new public void unmarshal(DataInputStream dis) { base.unmarshal(dis); try { _munitionID.unmarshal(dis); _eventID.unmarshal(dis); _velocity.unmarshal(dis); _locationInWorldCoordinates.unmarshal(dis); _burstDescriptor.unmarshal(dis); _locationInEntityCoordinates.unmarshal(dis); _detonationResult = dis.readByte(); _numberOfArticulationParameters = dis.readByte(); _pad = dis.readShort(); for (int idx = 0; idx < _numberOfArticulationParameters; idx++) { ArticulationParameter anX = new ArticulationParameter(); anX.unmarshal(dis); _articulationParameters.Add(anX); } ; } // end try catch (Exception e) { Trace.WriteLine(e); Trace.Flush(); } } // end of unmarshal method
// Token: 0x060006E0 RID: 1760 RVA: 0x0005C1C4 File Offset: 0x0005A3C4 public static void checkRMS() { MyVector myVector = new MyVector(); sbyte[] array = Rms.loadRMS("ImageSource"); if (array == null) { Service.gI().imageSource(myVector); return; } ImageSource.vRms = new MyVector(); DataInputStream dataInputStream = new DataInputStream(array); if (dataInputStream == null) { return; } try { short num = dataInputStream.readShort(); string[] array2 = new string[(int)num]; sbyte[] array3 = new sbyte[(int)num]; for (int i = 0; i < (int)num; i++) { array2[i] = dataInputStream.readUTF(); array3[i] = dataInputStream.readByte(); ImageSource.vRms.addElement(new ImageSource(array2[i], array3[i])); } dataInputStream.close(); } catch (Exception ex) { ex.StackTrace.ToString(); } Res.outz(string.Concat(new object[] { "vS size= ", ImageSource.vSource.size(), " vRMS size= ", ImageSource.vRms.size() })); for (int j = 0; j < ImageSource.vSource.size(); j++) { ImageSource imageSource = (ImageSource)ImageSource.vSource.elementAt(j); if (!ImageSource.isExistID(imageSource.id)) { myVector.addElement(imageSource); } } for (int k = 0; k < ImageSource.vRms.size(); k++) { ImageSource imageSource2 = (ImageSource)ImageSource.vRms.elementAt(k); if ((int)ImageSource.getVersionRMSByID(imageSource2.id) != (int)ImageSource.getCurrVersionByID(imageSource2.id)) { myVector.addElement(imageSource2); } } Service.gI().imageSource(myVector); }
public override void readPacketData(DataInputStream datainputstream) { windowId = datainputstream.readByte(); short word0 = datainputstream.readShort(); itemStack = new ItemStack[word0]; for (int i = 0; i < word0; i++) { short word1 = datainputstream.readShort(); if (word1 >= 0) { byte byte0 = datainputstream.readByte(); short word2 = datainputstream.readShort(); itemStack[i] = new ItemStack(word1, byte0, word2); } } }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private void receiveSuccess(java.io.DataInputStream dataIn) throws java.io.IOException private void ReceiveSuccess(DataInputStream dataIn) { short bytes = dataIn.readShort(); assertThat(dataIn.readUnsignedByte(), equalTo(0xB1)); assertThat(dataIn.readUnsignedByte(), equalTo(0x70)); dataIn.skipBytes(bytes); }
public override void readPacketData(DataInputStream datainputstream) { windowId = datainputstream.readByte(); itemSlot = datainputstream.readShort(); short word0 = datainputstream.readShort(); if (word0 >= 0) { byte byte0 = datainputstream.readByte(); short word1 = datainputstream.readShort(); myItemStack = new ItemStack(word0, byte0, word1); } else { myItemStack = null; } }
public override void readPacketData(DataInputStream datainputstream) { xLocation = datainputstream.readInt(); yLocation = datainputstream.readShort(); zLocation = datainputstream.readInt(); instrumentType = datainputstream.read(); pitch = datainputstream.read(); }
public override void readPacketData(DataInputStream datainputstream) { window_Id = datainputstream.readByte(); inventorySlot = datainputstream.readShort(); mouseClick = datainputstream.readByte(); action = datainputstream.readShort(); short word0 = datainputstream.readShort(); if (word0 >= 0) { byte byte0 = datainputstream.readByte(); short word1 = datainputstream.readShort(); itemStack = new ItemStack(word0, byte0, word1); } else { itemStack = null; } }
public override void readPacketData(DataInputStream datainputstream) { xPosition = datainputstream.readInt(); yPosition = datainputstream.read(); zPosition = datainputstream.readInt(); direction = datainputstream.read(); short word0 = datainputstream.readShort(); if (word0 >= 0) { byte byte0 = datainputstream.readByte(); short word1 = datainputstream.readShort(); itemStack = new ItemStack(word0, byte0, word1); } else { itemStack = null; } }
} // end of marshal method new public void unmarshal(DataInputStream dis) { base.unmarshal(dis); try { _encodingScheme = dis.readUshort(); _tdlType = dis.readUshort(); _sampleRate = dis.readUint(); _dataLength = dis.readShort(); _samples = dis.readShort(); _data = dis.readByteArray((_dataLength / 8) + (_dataLength % 8 > 0 ? 1 : 0)); //09062009 Post processed. Needed to convert from bits to bytes } // end try catch (Exception e) { Trace.WriteLine(e); Trace.Flush(); } } // end of unmarshal method
public override void readPacketData(DataInputStream datainputstream) { xPosition = datainputstream.readInt(); yPosition = datainputstream.readShort(); zPosition = datainputstream.readInt(); signLines = new string[4]; for (int i = 0; i < 4; i++) { signLines[i] = datainputstream.readUTF(); } }
public override void readPacketData(DataInputStream datainputstream) { entityId = datainputstream.readInt(); name = datainputstream.readUTF(); xPosition = datainputstream.readInt(); yPosition = datainputstream.readInt(); zPosition = datainputstream.readInt(); rotation = datainputstream.readByte(); pitch = datainputstream.readByte(); currentItem = datainputstream.readShort(); }
// Token: 0x06000174 RID: 372 RVA: 0x0000D7C8 File Offset: 0x0000B9C8 public mFont(string strFont, string pathImage, string pathData, int space) { try { this.strFont = strFont; this.space = space; this.pathImage = pathImage; DataInputStream dataInputStream = null; this.reloadImage(); try { dataInputStream = MyStream.readFile(pathData); this.fImages = new int[(int)dataInputStream.readShort()][]; for (int i = 0; i < this.fImages.Length; i++) { this.fImages[i] = new int[4]; this.fImages[i][0] = (int)dataInputStream.readShort(); this.fImages[i][1] = (int)dataInputStream.readShort(); this.fImages[i][2] = (int)dataInputStream.readShort(); this.fImages[i][3] = (int)dataInputStream.readShort(); this.setHeight(this.fImages[i][3]); } dataInputStream.close(); } catch (Exception ex) { try { dataInputStream.close(); } catch (Exception ex2) { ex2.StackTrace.ToString(); } } } catch (Exception ex3) { ex3.StackTrace.ToString(); } }
public bool loadAnimFile(ref ResourceManager resMgr) { DataInputStream dataInputStream = new DataInputStream(ResourceManager.loadBinaryFile(2)); int length1 = (int)dataInputStream.readShort(); this.m_animStartFrame = new short[length1]; this.m_animEndFrame = new short[length1]; this.m_animWindowStartFrame = new short[length1][]; this.m_animWindowEndFrame = new short[length1][]; this.m_animWindowFlags = new sbyte[length1][]; for (int index1 = 0; index1 < length1; ++index1) { this.m_animStartFrame[index1] = dataInputStream.readShort(); this.m_animEndFrame[index1] = dataInputStream.readShort(); int length2 = (int)dataInputStream.readShort(); if (length2 > 0) { this.m_animWindowStartFrame[index1] = new short[length2]; this.m_animWindowEndFrame[index1] = new short[length2]; this.m_animWindowFlags[index1] = new sbyte[length2]; for (int index2 = 0; index2 < length2; ++index2) { this.m_animWindowStartFrame[index1][index2] = dataInputStream.readShort(); this.m_animWindowEndFrame[index1][index2] = dataInputStream.readShort(); this.m_animWindowFlags[index1][index2] = dataInputStream.readByte(); } } } return(true); }
} // end of marshal method public void unmarshal(DataInputStream dis) { try { _parameterIndex = dis.readUshort(); _parameterValue = dis.readShort(); } // end try catch (Exception e) { Trace.WriteLine(e); Trace.Flush(); } } // end of unmarshal method
public void loadData() { AppEngine.getResourceManager(); DataInputStream dataInputStream = new DataInputStream(ResourceManager.loadBinaryFile(182)); int length1 = (int)dataInputStream.readByte(); byte[] numArray1 = new byte[length1]; for (int index = 0; index < length1; ++index) { numArray1[index] = (byte)dataInputStream.readByte(); } int length2 = (int)dataInputStream.readShort(); short[] numArray2 = new short[length2]; byte[] numArray3 = new byte[length2]; byte[] numArray4 = new byte[length2]; byte[] numArray5 = new byte[length2]; for (int index = 0; index < length2; ++index) { numArray2[index] = (short)GlobalConstants.SOUND_DATA_SETS[(int)dataInputStream.readShort()]; numArray3[index] = (byte)dataInputStream.readByte(); numArray4[index] = (byte)dataInputStream.readByte(); numArray5[index] = (byte)dataInputStream.readByte(); } this.d_groupFlags = numArray1; this.d_eventResources = numArray2; this.d_eventGroups = numArray3; this.d_eventInstances = numArray4; this.d_eventFlags = numArray5; this.m_players = new Player[length2][]; this.m_volumes = new float[length2][]; this.m_groupVolumes = new float[length1]; for (int index = 0; index < length1; ++index) { this.m_groupVolumes[index] = 1f; } }