Esempio n. 1
0
        public void MakeFreeAreaList(byte[] data, uint RebuildAddress, Dictionary <uint, uint> useMap)
        {
            List <Address> knownList = U.MakeAllStructPointersList(false);
            List <DisassemblerTrumb.LDRPointer> ldrmap = Program.AsmMapFileAsmCache.GetLDRMapCache();

            U.AppendAllASMStructPointersList(knownList
                                             , ldrmap
                                             , isPatchInstallOnly: true
                                             , isPatchPointerOnly: false
                                             , isPatchStructOnly: false
                                             , isUseOtherGraphics: true
                                             , isUseOAMSP: true
                                             );
            MoveToFreeSapceForm.AppendSkillSystemsSanctuary(knownList);

            Dictionary <uint, bool> knownDic = MakeKnownListToDic(knownList);

            MakeFreeDataList(RecycleFreeAreaList, knownDic, FREEAREA_BLOCK_SIZE + 16 + 16, data, RebuildAddress, useMap);

            for (int i = 0; i < this.RecycleFreeAreaList.Count;)
            {
                Address p = this.RecycleFreeAreaList[i];

                //頭としっぽはくれてやれ
                if (p.Length < 64)
                {
                    this.RecycleFreeAreaList.RemoveAt(i);
                    continue;
                }
                p.ResizeAddress(p.Addr + 16, p.Length - 16 - 16);
                i++;
            }
        }
        public void MakeFreeAreaList(byte[] data, uint RebuildAddress, Dictionary <uint, uint> useMap)
        {
            List <Address> knownList = U.MakeAllStructPointersList(false);
            List <DisassemblerTrumb.LDRPointer> ldrmap = Program.AsmMapFileAsmCache.GetLDRMapCache();

            U.AppendAllASMStructPointersList(knownList
                                             , ldrmap
                                             , isPatchInstallOnly: true
                                             , isPatchPointerOnly: false
                                             , isPatchStructOnly: false
                                             , isUseOtherGraphics: true
                                             , isUseOAMSP: true
                                             );
            AsmMapFile.InvalidateUNUNSED(knownList);
            MoveToFreeSapceForm.AppendSkillSystemsSanctuary(knownList);

            Dictionary <uint, bool> knownDic = AsmMapFile.MakeKnownListToDic(knownList);

            MakeFreeDataList(RecycleFreeAreaList, knownDic, FreeAreaMinimumSize + FreeAreaPadding + FreeAreaPadding, data, RebuildAddress, useMap);

            for (int i = 0; i < this.RecycleFreeAreaList.Count;)
            {
                Address p = this.RecycleFreeAreaList[i];

                //頭としっぽはくれてやれ
                if (p.Length <= FreeAreaPadding * 2)
                {
                    this.RecycleFreeAreaList.RemoveAt(i);
                    continue;
                }
                p.ResizeAddress(p.Addr + FreeAreaPadding, p.Length - FreeAreaPadding - FreeAreaPadding);
                i++;
            }

            AppendFreeArea(RebuildAddress, this.AppendFreeAreaFilename);

            RecycleFreeAreaList.Sort((a, b) => { return(((int)a.Length) - ((int)b.Length)); });
        }