public static void MakeCheckError(List <FELint.ErrorSt> errors) { InputFormRef InputFormRef = Init(null); bool isFE6 = (Program.ROM.RomInfo.version() == 6); uint table_addr = InputFormRef.BaseAddress; uint limit_count = Math.Min(InputFormRef.DataCount, Program.ROM.RomInfo.magic_effect_original_data_count()); for (int i = 0; i < limit_count; i++, table_addr += InputFormRef.BlockSize) { uint id = (uint)i; uint asm = Program.ROM.u32(table_addr + 0); if (asm == 0) { if (isFE6) {//FE6 if (id == 0x0C || id == 0x0D) { continue; } } if (id == 0x32) {//CCアイテムは、0x00が設定されているため無視する continue; } } FELint.CheckASMPointerErrors(asm, errors, FELint.Type.ITEM_EEFECT_POINTER, table_addr, id); } }
public static void MakeCheckError(List <FELint.ErrorSt> errors, List <DisassemblerTrumb.LDRPointer> ldrmap) { List <Address> procs = new List <Address>(); FindProc find = new FindProc(procs, ldrmap); //Procsに付属するデータを発見する foreach (Address a in procs) { uint addr = a.Addr; uint end = addr + a.Length; for (; addr < end; addr += 8) { uint code = Program.ROM.u8(addr); if (ProcsScriptForm.hasASMRoutine(code)) {//呼び出しているASM関数 uint arg = Program.ROM.u32(addr + 4); if (arg != 0) { FELint.CheckASMPointerErrors(arg, errors, FELint.Type.PROCS, a.Addr, addr); } } else if (ProcsScriptForm.hasChildProcs(code)) {//子Procsの確認 uint arg = Program.ROM.u32(addr + 4); if (arg != 0) { FELint.CheckProcsPointerErrors(arg, errors, FELint.Type.PROCS, a.Addr, addr); } } else if (code == 0x01) {//Set name uint name = Program.ROM.u32(addr + 4); FELint.CheckText(name, "PROCS", errors, FELint.Type.SOUNDROOM, a.Addr, addr); } } } }
public static void MakeCheckError(List <FELint.ErrorSt> errors) { InputFormRef InputFormRef = Init(null); if (InputFormRef.DataCount < 10) { errors.Add(new FELint.ErrorSt(FELint.Type.SOUNDROOM, U.NOT_FOUND , R._("サウンドルームが極端に少ないです。破損している可能性があります。"))); } uint soundroom_addr = InputFormRef.BaseAddress; for (uint i = 0; i < InputFormRef.DataCount; i++, soundroom_addr += InputFormRef.BlockSize) { uint name = Program.ROM.u32(soundroom_addr + 12); FELint.CheckText(name, "SOUND1", errors, FELint.Type.SOUNDROOM, soundroom_addr, i); uint asm = Program.ROM.u32(soundroom_addr + 8); if (asm != 0) { FELint.CheckASMPointerErrors(asm, errors, FELint.Type.SOUNDROOM, soundroom_addr); } } }