Exemplo n.º 1
0
        public override void OnRebuild(VoidPtr address, int length, bool force)
        {
            SRT0Entry *header = (SRT0Entry *)address;

            header->_textureIndices  = (int)_texIndices;
            header->_indirectIndices = (int)_indIndices;

            int     offset       = 12 + Children.Count * 4;
            VoidPtr entryAddress = address + offset;

            int prevOffset = 0;

            for (int i = 0; i < Children.Count; i++)
            {
                SRT0TextureNode n = (SRT0TextureNode)Children[i];

                n._dataAddr = _dataAddr;

                header->SetOffset(i, offset + prevOffset);
                n.Rebuild(entryAddress, n._entryLen, true);

                entryAddress += n._entryLen;
                prevOffset   += n._entryLen;
                _dataAddr    += n._dataLen;
            }
        }
Exemplo n.º 2
0
        protected internal override void OnRebuild(VoidPtr address, int length, bool force)
        {
            SRT0Entry *header = (SRT0Entry *)address;

            header->_textureIndices = (int)_texIndices;
            header->_unk1           = _unk1;

            VoidPtr entryAddress = address + 12 + (Children.Count) * 4;

            int prevOffset = 0;

            for (int i = 0; i < Children.Count; i++)
            {
                SRT0TextureNode n = (SRT0TextureNode)Children[i];

                n._dataAddr = _dataAddr;

                header->SetOffset(i, 12 + (Children.Count) * 4 + prevOffset);
                n.Rebuild(entryAddress, n._entryLen, true);

                entryAddress += n._entryLen;
                prevOffset   += n._entryLen;
                _dataAddr    += n._dataLen;
            }
        }
Exemplo n.º 3
0
        protected internal virtual void PostProcess(VoidPtr dataAddress, StringTable stringTable)
        {
            SRT0Entry *header = (SRT0Entry *)dataAddress;

            header->ResourceStringAddress = stringTable[Name] + 4;
        }