public void setPosWarp(int index) { Warp w = warpLoader.loadWarpProps(index, primaryWarp.group, game); propWarp = w; nMap1.Value = w.map; nPos1.Value = w.pos; nUnknown1.Value = w.unknown; }
private void button2_Click(object sender, EventArgs e) { frmW = new frmWarpProps(warpLoader, loadedWarp.srcGroup, loadedWarp.fpointer + 0x10000, game, gb); if (loadedWarp == null) { return; } Warp w; if (groupBox1.Visible) { w = warpLoader.loadWarpProps((int)nWarp.Value, (int)nDestGroup.Value, game); frmW.grp0.Visible = true; frmW.nMap0.Value = w.map; frmW.nPos0.Value = w.pos; frmW.nUnknown0.Value = w.unknown; } else if (groupBox2.Visible) { Warp m = warpLoader.loadWarp(0x10000 + loadedWarp.fpointer); frmW.grp1A.Visible = true; frmW.grp1B.Visible = true; frmW.fillWarp(m); } else { w = warpLoader.loadWarpProps((int)nSIndex.Value, (int)nSGroup.Value, game); frmW.grp0.Visible = true; frmW.nMap0.Value = w.map; frmW.nPos0.Value = w.pos; frmW.nUnknown0.Value = w.unknown; } if (frmW.ShowDialog() != DialogResult.OK) { loadedWarp.secondaryWarp = null; frmW = null; return; } loadedWarp.secondaryWarp = frmW.propWarp; }