static InputFormRef Init(Form self) { return(new InputFormRef(self , "" , Program.ROM.RomInfo.worldmap_bgm_pointer , 4 , (int i, uint addr) => { //終端データは存在しない uint song_id1 = Program.ROM.u16(addr + 0); uint song_id2 = Program.ROM.u16(addr + 2); if (song_id1 == 1 && song_id2 == 0) { return false; } if (song_id1 == 0 && song_id2 == 0) { return false; } return true; } , (int i, uint addr) => { string name = WorldMapPointForm.GetWorldMapPointName((uint)i); return U.ToHexString(i) + " " + name; } )); }
public static string ConvertWorldmapNodeToString(uint v) { if (v == U.NOT_FOUND) { return(""); } string ret = U.ToHexString(v); string edition = WorldMapPointForm.GetWorldMapPointName(v); if (edition == "") { edition = "???"; } return(R._("拠点") + ": " + ret + "=" + edition); }
public static string GetPathName(uint id) { InputFormRef InputFormRef = Init(null); //現在のIDに対応するデータ uint addr = InputFormRef.IDToAddr(id); if (!U.isSafetyOffset(addr)) { return(""); } uint basepoint1 = Program.ROM.u8(addr + 4); uint basepoint2 = Program.ROM.u8(addr + 4 + 1); string basepointstring1 = WorldMapPointForm.GetWorldMapPointName(basepoint1); string basepointstring2 = WorldMapPointForm.GetWorldMapPointName(basepoint2); return(basepointstring1 + " -> " + basepointstring2); }
static InputFormRef Init(Form self) {//魔物が発生する拠点 return new InputFormRef(self , "" , Program.ROM.RomInfo.monster_wmap_base_point_pointer() , 1 , (int i, uint addr) => {//読込最大値検索 return i < 0x9; } , (int i, uint addr) => { uint baseID = Program.ROM.u8(addr); return U.ToHexString(i) + " " + WorldMapPointForm.GetWorldMapPointName(baseID); } ); }
static InputFormRef Init(Form self) { return(new InputFormRef(self , "" , Program.ROM.RomInfo.worldmap_road_pointer() , 12 , (int i, uint addr) => { return U.isPointer(Program.ROM.u32(addr)) ; } , (int i, uint addr) => { uint basepoint1 = Program.ROM.u8(addr + 4); uint basepoint2 = Program.ROM.u8(addr + 4 + 1); string basepointstring1 = WorldMapPointForm.GetWorldMapPointName(basepoint1); string basepointstring2 = WorldMapPointForm.GetWorldMapPointName(basepoint2); return U.ToHexString(i) + " " + basepointstring1 + " -> " + basepointstring2; } )); }