public ruint(RefType refType, byte dataType, int data) { _refType = (byte)refType; _dataType = dataType; _reserved = 0; _dataOffset = data; }
public wRGB565Pixel(int r, int g, int b) { r = Convert.ToInt32(r * (31.0 / 255.0)); g = Convert.ToInt32(g * (63.0 / 255.0)); b = Convert.ToInt32(b * (31.0 / 255.0)); _data = (ushort)((r << 11) | (g << 5) | b); }
public unsafe MDL0Node3Class(MDL0NodeType3 *ptr) { _id = ptr->_id; for (int i = 0; i < ptr->_numEntries; i++) { _entries.Add(ptr->Entries[i]); } }
public I6Header(int frames, float frameScale, float step, float floor) { _numFrames = (ushort)frames; _unk1 = 0; _frameScale = frameScale; _step = step; _base = floor; }
public BRESHeader(int size, int numSections) { _tag = Tag; _version = 0xFFFE; _fileSize = (uint)size; _rootOffset = 0x10; _numSections = (ushort)numSections; }
public I4Header(int entries, float frameScale, float step, float floor) { _entries = (ushort)entries; _unk = 0; _frameScale = frameScale; _step = step; _base = floor; }
public ResourceEntry(int id, int left, int right, int dataOffset, int stringOffset) { _id = (ushort)id; _pad = 0; _leftIndex = (ushort)left; _rightIndex = (ushort)right; _stringOffset = stringOffset; _dataOffset = dataOffset; }
public ARCHeader(ushort numFiles, string name) { _tag = Tag; _version = 0x0101; _numFiles = numFiles; _unk1 = 0; _unk2 = 0; Name = name; }
public SYMBMaskEntry(ushort flags, short bit, int left, int right, int id, int index) { _flags = flags; _bit = bit; _leftId = left; _rightId = right; _stringId = id; _index = index; }
public REFTData(ushort width, ushort height, byte format) { _unknown = 0; _width = width; _height = height; _imagelen = 0; _format = format; _pltFormat = 0; _colorCount = 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 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; }
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 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 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 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 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 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 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 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 REFTImageHeader(ushort width, ushort height, byte format, byte pltFormat, ushort colors, uint imgSize, byte lod) { _unknown = 0; _width = width; _height = height; _imagelen = imgSize; _format = format; _pltFormat = pltFormat; _colorCount = colors; _pltSize = (uint)colors * 2; _mipmap = lod; _min_filt = 0; _mag_filt = 0; _reserved = 0; _lod_bias = 0; }
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 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 I6Entry(int index, int step, float tangent) { _data = (ushort)(index << 5); _step = (ushort)step; tangent *= 256.0f; if (tangent < 0.0f) { tangent -= 0.5f; } else { tangent += 0.5f; } _exp = (short)((int)tangent).Clamp(-32768, 32767); }
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 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 wRGB5A3Pixel(int a, int r, int g, int b) { a = Convert.ToInt32(a * (7.0 / 255.0)); if (a == 7) { r = Convert.ToInt32(r * (31.0 / 255.0)); g = Convert.ToInt32(g * (31.0 / 255.0)); b = Convert.ToInt32(b * (31.0 / 255.0)); _data = (ushort)((1 << 15) | (r << 10) | (g << 5) | b); } else { r = Convert.ToInt32(r * (15.0 / 255.0)); g = Convert.ToInt32(g * (15.0 / 255.0)); b = Convert.ToInt32(b * (15.0 / 255.0)); _data = (ushort)((a << 12) | (r << 8) | (g << 4) | b); } }
public unsafe ADPCMInfo(FSTMADPCMInfo o, ushort gain = 0) { fixed(short *ptr = _coefs) { for (int i = 0; i < 16; i++) { ptr[i] = o._coefs[i]; } } _gain = gain; _ps = o._ps; _yn1 = o._yn1; _yn2 = o._yn2; _lps = o._lps; _lyn1 = o._lyn1; _lyn2 = o._lyn2; _pad = o._pad; }