public GSNDEntry(float UnkFloat0, float UnkFloat1, string trigger, string name) { _infoIndex = 0; _pad0 = _pad1 = _pad2 = 0; _unkFloat0 = UnkFloat0; _unkFloat1 = UnkFloat1; unk0 = 0x00000001; Name = name; Trigger = trigger; Pad4 = 0; }
public SCLASubEntry(BrawlLib.SSBB.ResourceNodes.SCLAEntryNode.SCLASubEntryClass e) { _unk1 = e._unk1; _unk2 = e._unk2; _unk3 = e._unk3; _unk4 = e._unk4; _index1 = e._index1; _index2 = e._index2; _index3 = e._index3; _index4 = e._index4; }
public FSTMTrackInfoStub(byte volume, byte pan) { _volume = volume; _pan = pan; _padding = 0; _byteTableReference._type = (short)FSTMReference.RefType.ByteTable; _byteTableReference._padding = 0; _byteTableReference._dataOffset = 12; _byteTableCount = 2; _byteTable = 0x00010000; }
public ColPlane(int pInd1, int pInd2, int pLink1, int pLink2, CollisionPlaneType type, CollisionPlaneFlags2 flags2, CollisionPlaneFlags flags, CollisionPlaneMaterial material) { _point1 = (short)pInd1; _point2 = (short)pInd2; _link1 = (short)pLink1; _link2 = (short)pLink2; _magic = -1; _type = (ushort)((int)flags2 | (int)type); _flags = flags; _material = material; }
protected override void OnParse(VoidPtr address) { bfloat *floatval = (bfloat *)address; bint intval1 = *(bint *)(address + 80); floatEntries = new float[20]; for (int i = 0; i < floatEntries.Length; i++) { floatEntries[i] = floatval[i]; } intEntry1 = intval1; }
public void Set(int size, int channels) { RuintList *list; uint offset = _entries.Address; int dataOffset = 0x60 + (channels * 8); _tag = Tag; _size = size; //Set entry offsets _entries.Entries[0] = 0x18; _entries.Entries[1] = 0x4C; _entries.Entries[2] = 0x5C; //Audio info //HEADPart1* part1 = Part1; //Set single channel info list = Part2; list->_numEntries._data = 1; //Number is little-endian list->Entries[0] = 0x58; *(AudioFormatInfo *)list->Get(offset, 0) = new AudioFormatInfo(2, 0, 1, 0); //Set adpcm infos list = Part3; list->_numEntries._data = channels; //little-endian for (int i = 0; i < channels; i++) { //Set initial pointer list->Entries[i] = dataOffset; //Set embedded pointer *(ruint *)(offset + dataOffset) = dataOffset + 8; dataOffset += 8; //Set info //*(ADPCMInfo*)(offset + dataOffset) = info[i]; dataOffset += ADPCMInfo.Size; //Set padding //*(short*)(offset + dataOffset) = 0; //dataOffset += 2; } //Fill remaining int *p = (int *)(offset + dataOffset); for (dataOffset += 8; dataOffset < size; dataOffset += 4) { *p++ = 0; } }
public VIS0v4(int size, ushort frameCount, ushort numEntries, int loop) { _header._tag = Tag; _header._size = size; _header._version = 4; _header._bresOffset = 0; _dataOffset = 0x28; _stringOffset = 0; _userDataOffset = _origPathOffset = 0; _numFrames = frameCount; _numEntries = numEntries; _loop = loop; }
public VIS0v3(int size, ushort frameCount, ushort numEntries, int loop) { _header._tag = Tag; _header._size = size; _header._version = 3; _header._bresOffset = 0; _dataOffset = 0x24; _stringOffset = 0; _pad = 0; _numFrames = frameCount; _numEntries = numEntries; _loop = loop; }
public bint _unk2; //0 public VIS0(int size, int frameCount, int numEntries, int unk1, int unk2) { _header._tag = Tag; _header._size = size; _header._version = 3; _header._bresOffset = 0; _dataOffset = 0x24; _stringOffset = 0; _unk1 = unk1; _frameCount = (short)frameCount; _numEntries = (short)numEntries; _unk2 = unk2; }
public PLT0v1(int length, WiiPaletteFormat format) { _bresEntry._tag = Tag; _bresEntry._size = (length * 2) + Size; _bresEntry._version = 1; _bresEntry._bresOffset = 0; _headerLen = Size; _stringOffset = 0; _pixelFormat = (uint)format; _numEntries = (short)length; _pad = 0; _origPathOffset = 0; }
public SRT0v5(ushort frames, int loop, ushort entries) { _header._tag = Tag; _header._size = Size; _header._version = 5; _header._bresOffset = 0; _dataOffset = 0x2C; _pad1 = _pad2 = _pad3 = 0; _numFrames = frames; _loop = loop; _stringOffset = 0; _numEntries = entries; }
public CHR0v4_3(int version, int size, int frames, int entries, bool loop) { _header._tag = Tag; _header._size = size; _header._bresOffset = 0; _header._version = version; _dataOffset = Size; _stringOffset = 0; _origPathOffset = _scalingRule = 0; _numFrames = (ushort)frames; _numEntries = (ushort)entries; _loop = loop ? 1 : 0; }
public CLR0v3(int size, int frames, int entries, bool loop) { _header._tag = Tag; _header._size = size; _header._bresOffset = 0; _header._version = 3; _dataOffset = Size; _stringOffset = 0; _origPathOffset = 0; _frames = (ushort)frames; _entries = (ushort)entries; _loop = loop ? 1 : 0; }
public CLR0(int size, int unk1, int frames, int entries, int unk2) { _header._tag = Tag; _header._size = size; _header._bresOffset = 0; _header._version = 3; _dataOffset = Size; _stringOffset = 0; _unk1 = unk1; _frames = (short)frames; _entries = (short)entries; _unk2 = unk2; }
public CHR0v5(int version, int size, int frames, int entries, int loop) { _header._tag = Tag; _header._size = size; _header._bresOffset = 0; _header._version = version; _dataOffset = Size; _stringOffset = 0; _pad1 = _pad2 = 0; _numFrames = (ushort)frames; _numEntries = (ushort)entries; _loop = loop; }
public override bool OnInitialize() { base.OnInitialize(); ItmFreqHeader *Header = (ItmFreqHeader *)WorkingUncompressed.Address; _dataLength = Header->_DataLength; _fileSize = Header->_Length; _DTableCount = Header->_DataTable; _offCount = Header->_OffCount; BaseAddress = (VoidPtr)Header + 0x20; _pPointerList = BaseAddress + _dataLength; _strings.Add("genParamSet"); _t1 = TableList->_table1; _t2 = TableList->_table2; _t3 = TableList->_table3; _t4 = TableList->_table4; _t5 = TableList->_table5; for (int i = 0; i < 5; i++) { if (TableList->Entries[i]._count > 0) { _numTables++; } } // Add the offsets to the pointers list, then the offset to the table list. for (int i = 0; i < _offCount; i++) { _pointerList.Add(*(bint *)(_pPointerList + i * 4)); } // Get the location for the Data Table, then add each entry to the list. _pDataTable = _pPointerList + _offCount * 4; for (int i = 0; i < Header->_DataTable; i++) { _DataTable.Add(new ItmFreqOffPair(*(bint *)(_pDataTable + i * 8), *(bint *)(_pDataTable + i * 8 + 4))); } if (_name == null) { _name = "Item Generation"; } return(_numTables > 0); }
public CHR0(int size, int frames, int entries, int unk1, int unk2, int unk3) { _header._tag = Tag; _header._size = size; _header._version = 4; //what is it? version? _header._bresOffset = 0; _dataOffset = Size; _stringOffset = 0; _unk1 = unk1; _numFrames = (ushort)frames; _numEntries = (ushort)entries; _unk2 = unk2; _unk3 = unk3; }
public SRT0v4(ushort frames, bool loop, ushort entries, int matrixMode) { _header._tag = Tag; _header._size = Size; _header._version = 4; _header._bresOffset = 0; _dataOffset = Size; _origPathOffset = 0; _matrixMode = matrixMode; _numFrames = frames; _loop = loop ? 1 : 0; _stringOffset = 0; _numEntries = entries; }
public CLR0v4(int size, int frames, int entries, int loop) { _header._tag = Tag; _header._size = size; _header._bresOffset = 0; _header._version = 4; _userDataOffset = 0; _dataOffset = Size; _stringOffset = 0; _origPathOffset = 0; _frames = (ushort)frames; _entries = (ushort)entries; _loop = loop; }
public MDL0Props(int vertices, int faces, int nodes, int unk1, int unk2, int unk3, int unk4, int unk5, Vector3 min, Vector3 max) { _headerLen = 0x40; _mdl0Offset = 0; _unk1 = unk1; _unk2 = unk2; _numVertices = vertices; _numFaces = faces; _unk3 = unk3; _numNodes = nodes; _unk4 = (short)unk4; _unk5 = (short)unk5; _dataOffset = 0x40; _minExtents = min; _maxExtents = max; }
public void Set(int planeIndex, int planeCount, Vector2 boxMin, Vector2 boxMax, string modelName, string boneName) { _planeIndex = (short)planeIndex; _planeCount = (short)planeCount; _unk1 = 0; _unk2 = 0; _unk3 = 0; _flags = 0; _boxMin = boxMin; _boxMax = boxMax; _unk5 = 0; _unk6 = 0; ModelName = modelName; BoneName = boneName; }
public CollisionHeader(int numPoints, int numPlanes, int numObjects, int unk1) { _numPoints = (short)numPoints; _numPlanes = (short)numPlanes; _numObjects = (short)numObjects; _unk1 = (short)unk1; _pointOffset = 0x28; _planeOffset = 0x28 + (numPoints * 8); _objectOffset = 0x28 + (numPoints * 8) + (numPlanes * ColPlane.Size); fixed(int *p = _pad) for (int i = 0; i < 5; i++) { p[i] = 0; } }
public SHP0v4(int loop, short frames, short entries) { _header._tag = Tag; _header._size = Size; _header._version = 4; _header._bresOffset = 0; _dataOffset = 0x28; _pad = 0; _numFrames = frames; _loop = loop; _stringOffset = 0; _numEntries = entries; _stringListOffset = 0; _stringOffset = 0; }
public StrmDataInfo(FSTMDataInfo o, int dataOffset) { _format = o._format; _sampleRate = checked ((ushort)(int)o._sampleRate); _blockHeaderOffset = 0; _loopStartSample = o._loopStartSample; _numSamples = o._numSamples; _dataOffset = dataOffset; _numBlocks = o._numBlocks; _blockSize = o._blockSize; _samplesPerBlock = o._samplesPerBlock; _lastBlockSize = o._lastBlockSize; _lastBlockSamples = o._lastBlockSamples; _lastBlockTotal = o._lastBlockTotal; _dataInterval = o._dataInterval; _bitsPerSample = o._bitsPerSample; }
public SHP0v3(bool loop, ushort frames, ushort entries) { _header._tag = Tag; _header._size = Size; _header._version = 3; _header._bresOffset = 0; _dataOffset = 0x28; _origPathOffset = 0; _numFrames = frames; _loop = loop ? 1 : 0; _stringOffset = 0; _numEntries = entries; _stringListOffset = 0; _stringOffset = 0; }
public override bool OnInitialize() { base.OnInitialize(); _unk0 = Header->_unknown0; _unk1 = Header->_unknown1; _unk2 = Header->_unknown2; _unk3 = Header->_unknown3; _Offset = Header->_entryOffset; _count = Header->_entryCount; if (_name == null) { _name = String.Format("Group[{0}]", Index); } return(Header->_entryCount > 0); }
public TEX0v1(int width, int height, WiiPixelFormat format, int mipLevels) { _header._tag = Tag; _header._size = TextureConverter.Get(format).GetMipOffset(width, height, mipLevels + 1) + Size; _header._version = 1; _header._bresOffset = 0; _headerLen = Size; _stringOffset = 0; _hasPalette = ((format == WiiPixelFormat.CI4) || (format == WiiPixelFormat.CI8)) ? 1 : 0; _width = (short)width; _height = (short)height; _pixelFormat = (int)format; _levelOfDetail = mipLevels; _minLod = 0; _maxLod = mipLevels - 1.0f; _origPathOffset = 0; }
public SHP0v4(int loop, ushort frames, ushort entries) { _header._tag = Tag; _header._size = Size; _header._version = 4; _header._bresOffset = 0; _dataOffset = Size; _origPathOffset = 0; _userDataOffset = 0; _numFrames = frames; _loop = loop; _stringOffset = 0; _numEntries = entries; _stringListOffset = 0; _stringOffset = 0; }
public void Set(int symbLen, int infoLen, int fileLen) { int offset = 0x40; _header._tag = Tag; _header._endian = -2; _header._version = 0x103; _header._firstOffset = 0x40; _header._numEntries = 3; _symbOffset = offset; _symbLength = symbLen; _infoOffset = offset += symbLen; _infoLength = infoLen; _fileOffset = offset += infoLen; _fileLength = fileLen; _header._length = offset; }
public void Set(int symbLen, int infoLen, int fileLen, byte vMinor) { int offset = 0x40; _header._tag = Tag; _header.Endian = Endian.Big; _header._version = (ushort)(0x100 + vMinor); _header._firstOffset = 0x40; _header._numEntries = 3; _symbOffset = offset; _symbLength = symbLen; _infoOffset = offset += symbLen; _infoLength = infoLen; _fileOffset = offset += infoLen; _fileLength = fileLen; _header._length = offset + fileLen; }
public static Object display_fixnum( bint n, output_port p ) { p.write( n.value.ToString() ); return p; }
public static int CINT( bint v ) { return v.value; }
//public static readonly bool running_on_ms_vm; //public static readonly bool running_on_pnet_vm; //public static readonly bool running_on_mono_vm; //public static bool vm_has_processes= true; static foreign() { /* try { if (Double.Parse( "69e69" ) == 0) { Console.Error.WriteLine( "Running on PNet VM 0.4.8..." ); running_on_pnet_vm= true; vm_has_processes= false; } else { try { if (Environment.Version.Major == 1) { Console.Error.WriteLine( "Running on Microsoft VM {0}.{1}.{2}.{3} ?", Environment.Version.Major, Environment.Version.Minor, Environment.Version.Build, Environment.Version.Revision ); running_on_ms_vm= true; } else if ( (Environment.Version.Major == 0) && (Environment.Version.Minor == 5)) { Console.Error.WriteLine( "Running on PNet VM {0}.{1}.{2} ?", Environment.Version.Major, Environment.Version.Minor, Environment.Version.Build ); running_on_pnet_vm= true; if ( (Environment.Version.Major == 0) && (Environment.Version.Major <= 5) && (Environment.Version.Build <= 6)) vm_has_processes= false; } else { Console.Error.WriteLine( "Running on Mono VM ?" ); running_on_mono_vm= true; } } catch (Exception) { Console.Error.WriteLine( "Running on PNet VM {0}.{1}.{2}", Environment.Version.Major, Environment.Version.Minor, Environment.Version.Build ); running_on_pnet_vm= true; vm_has_processes= false; } } } catch( Exception ) { Console.Error.WriteLine( "Running on PNet VM 0.5.0..." ); running_on_pnet_vm= true; } */ bint_allocated = new bint[2148]; for ( int i = -100 ; i < 2048 ; ++i) bint_allocated[i+100] = new bint( i ); if (__cb__ != null) __cb__ = new callback(); }
public static ushort BINT_TO_USHORT( bint n ) { return (ushort)n.value; }
public static uint BINT_TO_ULONG( bint n ) { return (uint)(n.value); }
public static byte BINT_TO_UBYTE( bint n ) { return (byte)n.value; }
public static short BINT_TO_SHORT( bint n ) { return (short)n.value; }
public static sbyte BINT_TO_BYTE( bint n ) { return (sbyte)n.value; }