//全データの取得 public static void MakeAllDataLength(List <Address> list, bool isPointerOnly) { string name; InputFormRef InputFormRef; uint baseaddr, dimaddr, no_dimaddr; if (ImageUtilMagic.SearchMagicSystem(out baseaddr, out dimaddr, out no_dimaddr) != ImageUtilMagic.magic_system_enum.FEDITOR_ADV) { return; } { uint spellDataCount = ImageUtilMagicFEditor.SpellDataCount(); uint csaSpellTable = ImageUtilMagic.GetCSASpellTableAddr(); if (csaSpellTable == U.NOT_FOUND) { return; } uint csaSpellTablePointer = ImageUtilMagic.GetCSASpellTablePointer(); Dictionary <uint, string> effectDic = new Dictionary <uint, string>(); InputFormRef = Init(null, dimaddr, no_dimaddr, spellDataCount, csaSpellTable, effectDic); name = "Magic"; FEBuilderGBA.Address.AddAddress(list, InputFormRef, name, new uint[] { 0 }); //追加魔法テーブル(結構無駄な構造ですが、仕方ない) FEBuilderGBA.Address.AddAddress(list , csaSpellTable , InputFormRef.DataCount * 4 * 5 , csaSpellTablePointer , "Magic_Append_SpellTable" , FEBuilderGBA.Address.DataTypeEnum.MAGIC_APPEND_SPELLTABLE ); uint addr = InputFormRef.BaseAddress; for (int i = 0; i < InputFormRef.DataCount; i++, addr += InputFormRef.BlockSize) { uint baseaddress = Program.ROM.p32(Program.ROM.RomInfo.magic_effect_pointer); uint csaaddress = (uint)(csaSpellTable + (20 * i)); uint dataaddr = Program.ROM.p32(addr); if (dataaddr == 0) { continue; } if ( dataaddr == dimaddr || dataaddr == no_dimaddr) { name = "Magic:" + U.To0xHexString(i); ImageUtilMagicFEditor.RecycleOldAnime(ref list, name, isPointerOnly, csaaddress); } } } }
//変更するアニメデータから、他のアニメーションでも使っているものを除外する public static void SubConfilctArea(RecycleAddress ra, uint Now_baseaddress) { InputFormRef InputFormRef; uint baseaddr, dimaddr, no_dimaddr; if (ImageUtilMagic.SearchMagicSystem(out baseaddr, out dimaddr, out no_dimaddr) != ImageUtilMagic.magic_system_enum.FEDITOR_ADV) { return; } { uint spellDataCount = ImageUtilMagicFEditor.SpellDataCount(); uint csaSpellTable = ImageUtilMagic.GetCSASpellTableAddr(); if (csaSpellTable == U.NOT_FOUND) { return; } Dictionary <uint, string> effectDic = new Dictionary <uint, string>(); InputFormRef = Init(null, dimaddr, no_dimaddr, spellDataCount, csaSpellTable, effectDic); uint addr = InputFormRef.BaseAddress; for (int i = 0; i < InputFormRef.DataCount; i++, addr += InputFormRef.BlockSize) { uint baseaddress = Program.ROM.p32(Program.ROM.RomInfo.magic_effect_pointer); uint csaaddress = (uint)(csaSpellTable + (20 * i)); uint dataaddr = Program.ROM.p32(addr); if (dataaddr == 0) { continue; } if (csaaddress == Now_baseaddress) { continue; } if ( dataaddr == dimaddr || dataaddr == no_dimaddr) { List <Address> list = new List <Address>(); ImageUtilMagicFEditor.RecycleOldAnime(ref list, "", false, csaaddress); ra.SubRecycle(list); } } } }