コード例 #1
0
        protected internal override void PostProcess(VoidPtr bresAddress, VoidPtr dataAddress, int dataLength, StringTable stringTable)
        {
            base.PostProcess(bresAddress, dataAddress, dataLength, stringTable);
            SHP0 *header = (SHP0 *)dataAddress;

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

            bint *stringPtr = header->StringEntries;

            for (int i = 0; i < header->_numItems; i++)
            {
                stringPtr[i] = ((int)stringTable[_strings[i]] + 4) - (int)stringPtr;
            }

            ResourceGroup *group = header->Group;

            group->_first = new ResourceEntry(0xFFFF, 0, 0, 0, 0);

            ResourceEntry *rEntry = group->First;

            int index = 1;

            foreach (SHP0EntryNode n in Children)
            {
                dataAddress = (VoidPtr)group + (rEntry++)->_dataOffset;
                ResourceEntry.Build(group, index++, dataAddress, (BRESString *)stringTable[n.Name]);
                n.PostProcess(dataAddress, stringTable);
            }
        }
コード例 #2
0
        protected internal virtual void PostProcess(VoidPtr dataAddress, StringTable stringTable)
        {
            SHP0Entry *header = (SHP0Entry *)dataAddress;

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