Editing points and portals in navmesh, improved DX error message

This commit is contained in:
dexyfex 2018-03-14 12:36:43 +11:00
parent 761278fd0b
commit 8b72fc1220
20 changed files with 2931 additions and 169 deletions

View File

@ -116,6 +116,14 @@ namespace CodeWalker.GameFiles
poly.Index = i; poly.Index = i;
poly.CalculatePosition(); //calc poly center for display purposes.. poly.CalculatePosition(); //calc poly center for display purposes..
Polys.Add(poly); Polys.Add(poly);
if (poly.PortalType > 0)
{
if (poly.PortalType != 2) //seems to be what portal links need to understand..
{ }
}
} }
} }
if (Nav.Portals != null) if (Nav.Portals != null)
@ -127,8 +135,8 @@ namespace CodeWalker.GameFiles
YnvPortal portal = new YnvPortal(); YnvPortal portal = new YnvPortal();
portal.Init(this, portals[i]); portal.Init(this, portals[i]);
portal.Index = i; portal.Index = i;
portal.Position1 = posoffset + portal._RawData.Position1.ToVector3() * aabbsize; portal.PositionFrom = posoffset + portal._RawData.PositionFrom.ToVector3() * aabbsize;
portal.Position2 = posoffset + portal._RawData.Position2.ToVector3() * aabbsize; portal.PositionTo = posoffset + portal._RawData.PositionTo.ToVector3() * aabbsize;
Portals.Add(portal); Portals.Add(portal);
} }
} }
@ -194,7 +202,7 @@ namespace CodeWalker.GameFiles
return data; return data;
} }
public void BuildStructs() private void BuildStructs()
{ {
Vector3 posoffset = Nav.SectorTree?.AABBMin.XYZ() ?? Vector3.Zero; Vector3 posoffset = Nav.SectorTree?.AABBMin.XYZ() ?? Vector3.Zero;
Vector3 aabbsize = Nav.AABBSize; Vector3 aabbsize = Nav.AABBSize;
@ -213,9 +221,32 @@ namespace CodeWalker.GameFiles
{ {
for (int i = 0; i < Polys.Count; i++) for (int i = 0; i < Polys.Count; i++)
{ {
Polys[i].Index = i;
polylist.Add(Polys[i].RawData); polylist.Add(Polys[i].RawData);
} }
} }
var portallist = new List<NavMeshPortal>();
if (Portals != null)
{
for (int i = 0; i < Portals.Count; i++)
{
var portal = Portals[i];
var pdata = portal.RawData;
pdata.PositionFrom = NavMeshVertex.Create((portal.PositionFrom - posoffset) * aabbsizeinv);
pdata.PositionTo = NavMeshVertex.Create((portal.PositionTo - posoffset) * aabbsizeinv);
portallist.Add(pdata);
}
}
if (Points != null)
{
for (int i = 0; i < Points.Count; i++)
{
var point = Points[i];
var pdata = point.RawData;
pdata.Position = point.Position;
}
}
if (Nav.Vertices == null) if (Nav.Vertices == null)
@ -248,6 +279,9 @@ namespace CodeWalker.GameFiles
Nav.Polys.RebuildList(polylist); Nav.Polys.RebuildList(polylist);
Nav.Portals = (portallist.Count > 0) ? portallist.ToArray() : null;
Nav.PortalsCount = (uint)(Nav.Portals?.Length ?? 0);
//TODO: update portal links data.....
for (int i = 0; i < Nav.Polys.ListParts.Count; i++) //reassign part id's on all the polys... for (int i = 0; i < Nav.Polys.ListParts.Count; i++) //reassign part id's on all the polys...
@ -262,16 +296,126 @@ namespace CodeWalker.GameFiles
} }
} }
//Build Sector Tree
int depth = 0;
if ((Nav.ContentFlags & NavMeshFlags.Vehicle) == 0) depth = 2;
//vehicle navmesh has a single level, static has 3..
NavMeshSector orig = Nav.SectorTree;
NavMeshSector root = new NavMeshSector();
root.SetAABBs(orig.AABBMin.XYZ(), orig.AABBMax.XYZ());
uint pointindex = 0;
BuildSectorTree(root, depth, ref pointindex);
Nav.SectorTree = root;
}
private void BuildSectorTree(NavMeshSector node, int depth, ref uint pointindex)
{
Vector3 min = node.AABBMin.XYZ();
Vector3 max = node.AABBMax.XYZ();
Vector3 cen = (min + max) * 0.5f;
if (depth <= 0)
{
//go through polys and points and create new lists for this node
NavMeshSectorData data = new NavMeshSectorData();
node.Data = data;
data.PointsStartID = pointindex;
if (Polys != null)
{
List<ushort> polyids = new List<ushort>();
for (int i = 0; i < Polys.Count; i++)
{
var poly = Polys[i];
var b = poly._RawData.CellAABB;
if (BoxOverlaps(b, node.CellAABB))
{
polyids.Add((ushort)poly.Index);
}
}
if (polyids.Count > 0)
{
data.PolyIDs = polyids.ToArray();
}
}
if (Points != null)
{
List<NavMeshPoint> points = new List<NavMeshPoint>();
for (int i = 0; i < Points.Count; i++)
{
var point = Points[i];
if (IsInBox(point.Position, min, max))
{
points.Add(point.RawData);
}
}
if (points.Count > 0)
{
data.Points = points.ToArray();
pointindex += (uint)points.Count;
}
}
}
else
{
//recurse quadtree... clockwise from +XY (top right)
int cdepth = depth - 1;
node.SubTree1 = new NavMeshSector();
node.SubTree2 = new NavMeshSector();
node.SubTree3 = new NavMeshSector();
node.SubTree4 = new NavMeshSector();
node.SubTree1.SetAABBs(new Vector3(cen.X, cen.Y, cen.Z), new Vector3(max.X, max.Y, max.Z)); //for some reason Z values seem to get arranged like this...
node.SubTree2.SetAABBs(new Vector3(cen.X, min.Y, 0.0f), new Vector3(max.X, cen.Y, 0.0f));
node.SubTree3.SetAABBs(new Vector3(min.X, min.Y, min.Z), new Vector3(cen.X, cen.Y, cen.Z));
node.SubTree4.SetAABBs(new Vector3(min.X, cen.Y, 0.0f), new Vector3(cen.X, max.Y, 0.0f));
BuildSectorTree(node.SubTree1, cdepth, ref pointindex);
BuildSectorTree(node.SubTree2, cdepth, ref pointindex);
BuildSectorTree(node.SubTree3, cdepth, ref pointindex);
BuildSectorTree(node.SubTree4, cdepth, ref pointindex);
}
}
private bool IsInBox(Vector3 p, Vector3 min, Vector3 max)
{
return (p.X >= min.X) && (p.X < max.X) &&
(p.Y >= min.Y) && (p.Y < max.Y);// &&
//(p.Z >= min.Z) && (p.Z < max.Z);
}
private bool BoxOverlaps(Vector3 bmin, Vector3 bmax, Vector3 min, Vector3 max)
{
return (bmax.X >= min.X) && (bmin.X <= max.X) &&
(bmax.Y >= min.Y) && (bmin.Y <= max.Y);// &&
//(bmax.Z >= min.Z) && (bmin.Z <= max.Z);
}
private bool BoxOverlaps(NavMeshAABB a, NavMeshAABB b)
{
return (a.MaxX >= b.MinX) && (a.MinX <= b.MaxX) &&
(a.MaxY >= b.MinY) && (a.MinY <= b.MaxY);
} }
public bool RemovePoly(YnvPoly poly) public bool RemovePoly(YnvPoly poly)
{ {
return false; return false;
} }
public bool RemovePoint(YnvPoint point)
{
return false;
}
public bool RemovePortal(YnvPortal portal)
{
return false;
}
@ -298,9 +442,9 @@ namespace CodeWalker.GameFiles
for (int i = 0; i < cnt; i++) for (int i = 0; i < cnt; i++)
{ {
var portal = Portals[i]; var portal = Portals[i];
nv.Add(new Vector4(portal.Position1, 1.0f)); nv.Add(new Vector4(portal.PositionFrom, 1.0f));
v.Position = portal.Position1; lv.Add(v); v.Position = portal.PositionFrom; lv.Add(v);
v.Position = portal.Position2; lv.Add(v); v.Position = portal.PositionTo; lv.Add(v);
} }
} }
@ -434,8 +578,8 @@ namespace CodeWalker.GameFiles
public ushort AreaID { get { return _RawData.AreaID; } set { _RawData.AreaID = value; } } public ushort AreaID { get { return _RawData.AreaID; } set { _RawData.AreaID = value; } }
public ushort PartID { get { return _RawData.PartID; } set { _RawData.PartID = value; } } public ushort PartID { get { return _RawData.PartID; } set { _RawData.PartID = value; } }
public ushort PortalID { get { return _RawData.PortalID; } set { _RawData.PortalID = value; } } public ushort PortalLinkID { get { return _RawData.PortalLinkID; } set { _RawData.PortalLinkID = value; } }
public byte PortalUnk { get { return _RawData.PortalUnk; } set { _RawData.PortalUnk = value; } } public byte PortalType { get { return _RawData.PortalType; } set { _RawData.PortalType = value; } }
public byte Flags1 { get { return (byte)(_RawData.Unknown_00h & 0xFF); } set { _RawData.Unknown_00h = (ushort)((_RawData.Unknown_00h & 0xFF00) | (value & 0xFF)); } } public byte Flags1 { get { return (byte)(_RawData.Unknown_00h & 0xFF); } set { _RawData.Unknown_00h = (ushort)((_RawData.Unknown_00h & 0xFF00) | (value & 0xFF)); } }
public byte Flags2 { get { return (byte)((_RawData.Unknown_24h.Value >> 0) & 0xFF); } set { _RawData.Unknown_24h = ((_RawData.Unknown_24h.Value & 0xFFFFFF00u) | ((value & 0xFFu) << 0)); } } public byte Flags2 { get { return (byte)((_RawData.Unknown_24h.Value >> 0) & 0xFF); } set { _RawData.Unknown_24h = ((_RawData.Unknown_24h.Value & 0xFFFFFF00u) | ((value & 0xFFu) << 0)); } }
public byte Flags3 { get { return (byte)((_RawData.Unknown_24h.Value >> 9) & 0xFF); } set { _RawData.Unknown_24h = ((_RawData.Unknown_24h.Value & 0xFFFE01FFu) | ((value & 0xFFu) << 9)); } } public byte Flags3 { get { return (byte)((_RawData.Unknown_24h.Value >> 9) & 0xFF); } set { _RawData.Unknown_24h = ((_RawData.Unknown_24h.Value & 0xFFFE01FFu) | ((value & 0xFFu) << 9)); } }
@ -473,10 +617,6 @@ namespace CodeWalker.GameFiles
public bool B30_SlopeNorthWest { get { return (_RawData.Unknown_28h.Value & 2097152) > 0; } set { _RawData.Unknown_28h = BitUtil.UpdateBit(_RawData.Unknown_28h.Value, 21, value); } } public bool B30_SlopeNorthWest { get { return (_RawData.Unknown_28h.Value & 2097152) > 0; } set { _RawData.Unknown_28h = BitUtil.UpdateBit(_RawData.Unknown_28h.Value, 21, value); } }
public bool B31_SlopeWest { get { return (_RawData.Unknown_28h.Value & 4194304) > 0; } set { _RawData.Unknown_28h = BitUtil.UpdateBit(_RawData.Unknown_28h.Value, 22, value); } } public bool B31_SlopeWest { get { return (_RawData.Unknown_28h.Value & 4194304) > 0; } set { _RawData.Unknown_28h = BitUtil.UpdateBit(_RawData.Unknown_28h.Value, 22, value); } }
public bool B32_SlopeSouthWest { get { return (_RawData.Unknown_28h.Value & 8388608) > 0; } set { _RawData.Unknown_28h = BitUtil.UpdateBit(_RawData.Unknown_28h.Value, 23, value); } } public bool B32_SlopeSouthWest { get { return (_RawData.Unknown_28h.Value & 8388608) > 0; } set { _RawData.Unknown_28h = BitUtil.UpdateBit(_RawData.Unknown_28h.Value, 23, value); } }
//public bool B33_PortalUnk1 { get { return (_RawData.PortalUnk & 1) > 0; } }
//public bool B34_PortalUnk2 { get { return (_RawData.PortalUnk & 2) > 0; } }
//public bool B35_PortalUnk3 { get { return (_RawData.PortalUnk & 4) > 0; } }
//public bool B36_PortalUnk4 { get { return (_RawData.PortalUnk & 8) > 0; } }
public byte UnkX { get { return _RawData.Unknown_28h_8a; } set { _RawData.Unknown_28h_8a = value; } } public byte UnkX { get { return _RawData.Unknown_28h_8a; } set { _RawData.Unknown_28h_8a = value; } }
public byte UnkY { get { return _RawData.Unknown_28h_8b; } set { _RawData.Unknown_28h_8b = value; } } public byte UnkY { get { return _RawData.Unknown_28h_8b; } set { _RawData.Unknown_28h_8b = value; } }
@ -547,13 +687,17 @@ namespace CodeWalker.GameFiles
//if ((u5 & 8388608) > 0) colour.Red += 1.0f; //slope facing -X,-Y (southwest) //if ((u5 & 8388608) > 0) colour.Red += 1.0f; //slope facing -X,-Y (southwest)
//if (u5 >= 16777216) { } //other bits unused //if (u5 >= 16777216) { } //other bits unused
var u1 = _RawData.PortalUnk; var u1 = _RawData.PortalType;
//if ((u1 & 1) > 0) colour.Red += 1.0f; //portal - don't interact? //if ((u1 & 1) > 0) colour.Red += 1.0f; //portal - don't interact?
//if ((u1 & 2) > 0) colour.Green += 1.0f; //portal - ladder/fence interaction? //if ((u1 & 2) > 0) colour.Green += 1.0f; //portal - ladder/fence interaction?
//if ((u1 & 4) > 0) colour.Blue += 1.0f; //portal - fence interaction / go away from? //if ((u1 & 4) > 0) colour.Blue += 1.0f; //portal - fence interaction / go away from?
//if ((u1 & 8) > 0) colour.Red += 1.0f;//something file-specific? portal index related? //if ((u1 & 8) > 0) colour.Red += 1.0f;//something file-specific? portal index related?
//colour.Red = (PortalID) / 65535.0f; //portal ID testing... portalID only valid when portalType > 0!
//colour.Green = (PortalID%5)/4.0f;
//colour.Blue = ((PortalID/5)%5)/4.0f;
colour.Alpha = 0.75f; colour.Alpha = 0.75f;
@ -606,10 +750,43 @@ namespace CodeWalker.GameFiles
public YnvFile Ynv { get; set; } public YnvFile Ynv { get; set; }
public NavMeshPortal RawData { get { return _RawData; } set { _RawData = value; } } public NavMeshPortal RawData { get { return _RawData; } set { _RawData = value; } }
public Vector3 Position { get { return Position1; } set { Position1 = value; } } public Vector3 Position { get { return PositionFrom; } set { PositionFrom = value; } }
public Vector3 Position1 { get; set; } public Vector3 PositionFrom { get; set; }
public Vector3 Position2 { get; set; } public Vector3 PositionTo { get; set; }
public byte Angle { get { return _RawData.Angle; } set { _RawData.Angle = value; } }
public float Direction
{
get
{
return (float)Math.PI * 2.0f * Angle / 255.0f;
}
set
{
Angle = (byte)(value * 255.0f / ((float)Math.PI * 2.0f));
}
}
public Quaternion Orientation
{
get { return Quaternion.RotationAxis(Vector3.UnitZ, Direction); }
set
{
Vector3 dir = value.Multiply(Vector3.UnitX);
float dira = (float)Math.Atan2(dir.Y, dir.X);
Direction = dira;
}
}
public int Index { get; set; } public int Index { get; set; }
public byte Type { get { return _RawData.Type; } set { _RawData.Type = value; } }
public ushort AreaIDFrom { get { return _RawData.AreaIDFrom; } set { _RawData.AreaIDFrom = value; } }
public ushort AreaIDTo { get { return _RawData.AreaIDTo; } set { _RawData.AreaIDTo = value; } }
public ushort PolyIDFrom1 { get { return _RawData.PolyIDFrom1; } set { _RawData.PolyIDFrom1 = value; } }
public ushort PolyIDFrom2 { get { return _RawData.PolyIDFrom2; } set { _RawData.PolyIDFrom2 = value; } }
public ushort PolyIDTo1 { get { return _RawData.PolyIDTo1; } set { _RawData.PolyIDTo1 = value; } }
public ushort PolyIDTo2 { get { return _RawData.PolyIDTo2; } set { _RawData.PolyIDTo2 = value; } }
public ushort Unk1 { get { return _RawData.FlagsUnk; } set { _RawData.FlagsUnk = value; } }
public byte Unk2 { get { return _RawData.AreaUnk; } set { _RawData.AreaUnk = value; } }
public void Init(YnvFile ynv, NavMeshPortal portal) public void Init(YnvFile ynv, NavMeshPortal portal)
@ -620,9 +797,15 @@ namespace CodeWalker.GameFiles
public void SetPosition(Vector3 pos) public void SetPosition(Vector3 pos)
{ {
Position = pos; var delta = pos - PositionFrom;
PositionFrom = pos;
PositionTo += delta;
//TODO: update _RawData positions! //TODO: update _RawData positions!
} }
public void SetOrientation(Quaternion orientation)
{
Orientation = orientation;
}
public override string ToString() public override string ToString()
{ {
@ -638,15 +821,16 @@ namespace CodeWalker.GameFiles
public NavMeshPoint RawData { get { return _RawData; } set { _RawData = value; } } public NavMeshPoint RawData { get { return _RawData; } set { _RawData = value; } }
public Vector3 Position { get; set; } public Vector3 Position { get; set; }
public byte Angle { get { return _RawData.Angle; } set { _RawData.Angle = value; } }
public float Direction public float Direction
{ {
get get
{ {
return (float)Math.PI * 2.0f * _RawData.Angle / 255.0f; return (float)Math.PI * 2.0f * Angle / 255.0f;
} }
set set
{ {
_RawData.Angle = (byte)(value * 255.0f / ((float)Math.PI * 2.0f)); Angle = (byte)(value * 255.0f / ((float)Math.PI * 2.0f));
} }
} }
public Quaternion Orientation public Quaternion Orientation
@ -661,7 +845,7 @@ namespace CodeWalker.GameFiles
} }
public int Index { get; set; } public int Index { get; set; }
public byte Flags { get { return _RawData.Flags; } set { _RawData.Flags = value; } } public byte Type { get { return _RawData.Type; } set { _RawData.Type = value; } }
public void Init(YnvFile ynv, NavMeshPoint point) public void Init(YnvFile ynv, NavMeshPoint point)
{ {
@ -681,7 +865,7 @@ namespace CodeWalker.GameFiles
public override string ToString() public override string ToString()
{ {
return Index.ToString() + ": " + Flags.ToString(); return Index.ToString() + ": " + Type.ToString();
} }
} }

View File

@ -1834,6 +1834,8 @@ namespace CodeWalker.GameFiles
var mloa = arch as MloArchetype; var mloa = arch as MloArchetype;
if (mloa != null) if (mloa != null)
{ {
Vector3 mlobbmin = Vector3.Zero;
Vector3 mlobbmax = Vector3.Zero;
Vector3[] c = new Vector3[8]; Vector3[] c = new Vector3[8];
var rooms = mloa.rooms; var rooms = mloa.rooms;
if (rooms != null) if (rooms != null)
@ -1876,8 +1878,12 @@ namespace CodeWalker.GameFiles
} }
room.BBMin_CW = min; room.BBMin_CW = min;
room.BBMax_CW = max; room.BBMax_CW = max;
mlobbmin = Vector3.Min(mlobbmin, min);
mlobbmax = Vector3.Max(mlobbmax, max);
} }
} }
mloa.BBMin = mlobbmin;
mloa.BBMax = mlobbmax;
} }
} }
} }

View File

@ -65,7 +65,7 @@ namespace CodeWalker.GameFiles
public uint PolysCount { get; set; } public uint PolysCount { get; set; }
public uint AreaID { get; set; } // X + Y*100 public uint AreaID { get; set; } // X + Y*100
public uint TotalBytes { get; set; } public uint TotalBytes { get; set; }
public uint SectorUnkCount { get; set; } public uint PointsCount { get; set; }
public uint PortalsCount { get; set; } public uint PortalsCount { get; set; }
public uint PortalLinksCount { get; set; } public uint PortalLinksCount { get; set; }
public uint Unused_154h { get; set; } // 0x00000000 public uint Unused_154h { get; set; } // 0x00000000
@ -120,7 +120,7 @@ namespace CodeWalker.GameFiles
PolysCount = reader.ReadUInt32(); PolysCount = reader.ReadUInt32();
AreaID = reader.ReadUInt32(); AreaID = reader.ReadUInt32();
TotalBytes = reader.ReadUInt32(); TotalBytes = reader.ReadUInt32();
SectorUnkCount = reader.ReadUInt32(); PointsCount = reader.ReadUInt32();
PortalsCount = reader.ReadUInt32(); PortalsCount = reader.ReadUInt32();
PortalLinksCount = reader.ReadUInt32(); PortalLinksCount = reader.ReadUInt32();
Unused_154h = reader.ReadUInt32(); Unused_154h = reader.ReadUInt32();
@ -180,7 +180,7 @@ namespace CodeWalker.GameFiles
writer.Write(PolysCount); writer.Write(PolysCount);
writer.Write(AreaID); writer.Write(AreaID);
writer.Write(TotalBytes); writer.Write(TotalBytes);
writer.Write(SectorUnkCount); writer.Write(PointsCount);
writer.Write(PortalsCount); writer.Write(PortalsCount);
writer.Write(PortalLinksCount); writer.Write(PortalLinksCount);
writer.Write(Unused_154h); writer.Write(Unused_154h);
@ -570,8 +570,16 @@ namespace CodeWalker.GameFiles
public short MinZ { get; set; } public short MinZ { get; set; }
public short MaxZ { get; set; } public short MaxZ { get; set; }
public Vector3 Min { get { return new Vector3(MinX / 4.0f, MinY / 4.0f, MinZ / 4.0f); } } public Vector3 Min
public Vector3 Max { get { return new Vector3(MaxX / 4.0f, MaxY / 4.0f, MaxZ / 4.0f); } } {
get { return new Vector3(MinX / 4.0f, MinY / 4.0f, MinZ / 4.0f); }
set { var v = value * 4.0f; MinX = (short)v.X; MinY = (short)v.Y; MinZ = (short)v.Z; }
}
public Vector3 Max
{
get { return new Vector3(MaxX / 4.0f, MaxY / 4.0f, MaxZ / 4.0f); }
set { var v = value * 4.0f; MaxX = (short)v.X; MaxY = (short)v.Y; MaxZ = (short)v.Z; }
}
public override string ToString() public override string ToString()
{ {
@ -635,7 +643,7 @@ namespace CodeWalker.GameFiles
public FlagsUint Unknown_24h { get; set; } public FlagsUint Unknown_24h { get; set; }
public FlagsUint Unknown_28h { get; set; } public FlagsUint Unknown_28h { get; set; }
public ushort PartFlags { get; set; } public ushort PartFlags { get; set; }
public ushort PortalID { get; set; } public ushort PortalLinkID { get; set; }
//public int IndexUnk { get { return (IndexFlags >> 0) & 31; } } //always 0 //public int IndexUnk { get { return (IndexFlags >> 0) & 31; } } //always 0
@ -643,7 +651,7 @@ namespace CodeWalker.GameFiles
//public int PartUnk1 { get { return (PartFlags >> 0) & 0xF; } } //always 0 //public int PartUnk1 { get { return (PartFlags >> 0) & 0xF; } } //always 0
public ushort PartID { get { return (ushort)((PartFlags >> 4) & 0xFF); } set { PartFlags = (ushort)((PartFlags & 0xF00F) | ((value & 0xFF) << 4)); } } public ushort PartID { get { return (ushort)((PartFlags >> 4) & 0xFF); } set { PartFlags = (ushort)((PartFlags & 0xF00F) | ((value & 0xFF) << 4)); } }
public byte PortalUnk { get { return (byte)((PartFlags >> 12) & 0xF); } set { PartFlags = (ushort)((PartFlags & 0x0FFF) | ((value & 0xF) << 12)); } } public byte PortalType { get { return (byte)((PartFlags >> 12) & 0xF); } set { PartFlags = (ushort)((PartFlags & 0x0FFF) | ((value & 0xF) << 12)); } }
public ushort Unknown_28h_16 { get { return (ushort)((Unknown_28h.Value & 0xFFFF)); } set { Unknown_28h = (Unknown_28h.Value & 0xFFFF0000) | (value & 0xFFFFu); } } public ushort Unknown_28h_16 { get { return (ushort)((Unknown_28h.Value & 0xFFFF)); } set { Unknown_28h = (Unknown_28h.Value & 0xFFFF0000) | (value & 0xFFFFu); } }
@ -664,8 +672,8 @@ namespace CodeWalker.GameFiles
Unknown_28h.Hex + ", " + Unknown_28h.Hex + ", " +
//PartFlags.ToString() + ", " + //PartUnk1.ToString() + ", " + //PartFlags.ToString() + ", " + //PartUnk1.ToString() + ", " +
PartID.ToString() + ", " + PartID.ToString() + ", " +
PortalUnk.ToString() + ", " + PortalType.ToString() + ", " +
PortalID.ToString(); PortalLinkID.ToString();
} }
} }
@ -750,6 +758,14 @@ namespace CodeWalker.GameFiles
} }
public void SetAABBs(Vector3 min, Vector3 max)
{
AABBMin = new Vector4(min, float.NaN);
AABBMax = new Vector4(max, float.NaN);
CellAABB = new NavMeshAABB() { Min = min, Max = max };
}
public override string ToString() public override string ToString()
{ {
return "[Min: "+AABBMin.ToString() + "], [Max:" + AABBMax.ToString() + "]"; return "[Min: "+AABBMin.ToString() + "], [Max:" + AABBMax.ToString() + "]";
@ -763,7 +779,7 @@ namespace CodeWalker.GameFiles
get { return 32; } get { return 32; }
} }
public uint UnkDataStartID { get; set; } public uint PointsStartID { get; set; }
public uint Unused_04h { get; set; } // 0x00000000 public uint Unused_04h { get; set; } // 0x00000000
public ulong PolyIDsPointer { get; set; } public ulong PolyIDsPointer { get; set; }
public ulong PointsPointer { get; set; } public ulong PointsPointer { get; set; }
@ -779,7 +795,7 @@ namespace CodeWalker.GameFiles
public override void Read(ResourceDataReader reader, params object[] parameters) public override void Read(ResourceDataReader reader, params object[] parameters)
{ {
UnkDataStartID = reader.ReadUInt32(); PointsStartID = reader.ReadUInt32();
Unused_04h = reader.ReadUInt32(); Unused_04h = reader.ReadUInt32();
PolyIDsPointer = reader.ReadUInt64(); PolyIDsPointer = reader.ReadUInt64();
PointsPointer = reader.ReadUInt64(); PointsPointer = reader.ReadUInt64();
@ -800,7 +816,7 @@ namespace CodeWalker.GameFiles
PointsCount = (ushort)(Points?.Length ?? 0); PointsCount = (ushort)(Points?.Length ?? 0);
writer.Write(UnkDataStartID); writer.Write(PointsStartID);
writer.Write(Unused_04h); writer.Write(Unused_04h);
writer.Write(PolyIDsPointer); writer.Write(PolyIDsPointer);
writer.Write(PointsPointer); writer.Write(PointsPointer);
@ -830,7 +846,7 @@ namespace CodeWalker.GameFiles
public override string ToString() public override string ToString()
{ {
return "(Polys: " + PolyIDsCount.ToString() + ", UnkOffset: " + UnkDataStartID.ToString() + ", UnkCount: " + PointsCount.ToString() + ")"; return "(Polys: " + PolyIDsCount.ToString() + ", PointsCount: " + PointsCount.ToString() + ", PointsStartID: " + PointsStartID.ToString() + ")";
} }
} }
@ -840,20 +856,28 @@ namespace CodeWalker.GameFiles
public ushort Y { get; set; } public ushort Y { get; set; }
public ushort Z { get; set; } public ushort Z { get; set; }
public byte Angle { get; set; } public byte Angle { get; set; }
public byte Flags { get; set; } public byte Type { get; set; }
public Vector3 Position { get { return ToVector3(); } } public Vector3 Position
public Vector3 ToVector3()
{ {
const float usmax = ushort.MaxValue; get
return new Vector3(X / usmax, Y / usmax, Z / usmax); {
const float usmax = ushort.MaxValue;
return new Vector3(X / usmax, Y / usmax, Z / usmax);
}
set
{
const float usmax = ushort.MaxValue;
X = (ushort)(value.X * usmax);
Y = (ushort)(value.Y * usmax);
Z = (ushort)(value.Z * usmax);
}
} }
public override string ToString() public override string ToString()
{ {
return Flags.ToString() + ": " + Angle.ToString() + ", " + Position.ToString(); return Type.ToString() + ": " + Angle.ToString() + ", " + Position.ToString();
} }
@ -863,31 +887,28 @@ namespace CodeWalker.GameFiles
[TypeConverter(typeof(ExpandableObjectConverter))] public struct NavMeshPortal [TypeConverter(typeof(ExpandableObjectConverter))] public struct NavMeshPortal
{ {
public uint TypeFlags { get; set; } public byte Type { get; set; }
public NavMeshVertex Position1 { get; set; } public byte Angle { get; set; }
public NavMeshVertex Position2 { get; set; } public ushort FlagsUnk { get; set; }
public ushort PolyID1a { get; set; } public NavMeshVertex PositionFrom { get; set; }
public ushort PolyID1b { get; set; } public NavMeshVertex PositionTo { get; set; }
public ushort PolyID2a { get; set; } public ushort PolyIDFrom1 { get; set; }
public ushort PolyID2b { get; set; } public ushort PolyIDFrom2 { get; set; }
public ushort PolyIDTo1 { get; set; }
public ushort PolyIDTo2 { get; set; }
public uint AreaFlags { get; set; } public uint AreaFlags { get; set; }
public uint Type1 { get { return TypeFlags & 0xFF; } } public ushort AreaIDFrom { get { return (ushort)(AreaFlags & 0x3FFF); } set { AreaFlags = (AreaFlags & 0xFFFFC000) | (value & 0x3FFFu); } }
public uint Type2 { get { return (TypeFlags >> 8) & 0xF; } } public ushort AreaIDTo { get { return (ushort)((AreaFlags >> 14) & 0x3FFF); } set { AreaFlags = (AreaFlags & 0xF0003FFF) | ((value & 0x3FFFu) << 14); } }
public uint Type3 { get { return (TypeFlags >> 12) & 0xF; } } public byte AreaUnk { get { return (byte)((AreaFlags >> 28) & 0xF); } set { AreaFlags = (AreaFlags & 0x0FFFFFFF) | ((value & 0xFu) << 28); } }
public uint Type4 { get { return (TypeFlags >> 16) & 0xFFFF; } }
public ushort AreaID1 { get { return (ushort)(AreaFlags & 0x3FFF); } }
public ushort AreaID2 { get { return (ushort)((AreaFlags >> 14) & 0x3FFF); } }
public byte AreaUnk { get { return (byte)((AreaFlags >> 28) & 0xF); } }
public override string ToString() public override string ToString()
{ {
return AreaID1.ToString() + ", " + AreaID2.ToString() + ", " + AreaUnk.ToString() + ", " + return AreaIDFrom.ToString() + ", " + AreaIDTo.ToString() + ", " + AreaUnk.ToString() + ", " +
PolyID1a.ToString() + ", " + PolyID1b.ToString() + ", " + PolyIDFrom1.ToString() + ", " + PolyIDFrom2.ToString() + ", " +
PolyID2a.ToString() + ", " + PolyID2b.ToString() + ", " + PolyIDTo1.ToString() + ", " + PolyIDTo2.ToString() + ", " +
Type1.ToString() + ", " + Type2.ToString() + ", " + Type3.ToString() + ", " + Type4.ToString() + ", " + Type.ToString() + ", " + Angle.ToString() + ", " + FlagsUnk.ToString() + ", " +
"(" + Position1.ToString() + " | " + Position2.ToString() + ")"; "(" + PositionFrom.ToString() + " | " + PositionTo.ToString() + ")";
} }
} }

View File

@ -364,12 +364,24 @@
<Compile Include="Project\Panels\EditYnvPanel.Designer.cs"> <Compile Include="Project\Panels\EditYnvPanel.Designer.cs">
<DependentUpon>EditYnvPanel.cs</DependentUpon> <DependentUpon>EditYnvPanel.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Project\Panels\EditYnvPointPanel.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Project\Panels\EditYnvPointPanel.Designer.cs">
<DependentUpon>EditYnvPointPanel.cs</DependentUpon>
</Compile>
<Compile Include="Project\Panels\EditYnvPolyPanel.cs"> <Compile Include="Project\Panels\EditYnvPolyPanel.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="Project\Panels\EditYnvPolyPanel.Designer.cs"> <Compile Include="Project\Panels\EditYnvPolyPanel.Designer.cs">
<DependentUpon>EditYnvPolyPanel.cs</DependentUpon> <DependentUpon>EditYnvPolyPanel.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Project\Panels\EditYnvPortalPanel.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Project\Panels\EditYnvPortalPanel.Designer.cs">
<DependentUpon>EditYnvPortalPanel.cs</DependentUpon>
</Compile>
<Compile Include="Project\Panels\EditYtypPanel.cs"> <Compile Include="Project\Panels\EditYtypPanel.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@ -602,9 +614,15 @@
<EmbeddedResource Include="Project\Panels\EditYnvPanel.resx"> <EmbeddedResource Include="Project\Panels\EditYnvPanel.resx">
<DependentUpon>EditYnvPanel.cs</DependentUpon> <DependentUpon>EditYnvPanel.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Project\Panels\EditYnvPointPanel.resx">
<DependentUpon>EditYnvPointPanel.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Project\Panels\EditYnvPolyPanel.resx"> <EmbeddedResource Include="Project\Panels\EditYnvPolyPanel.resx">
<DependentUpon>EditYnvPolyPanel.cs</DependentUpon> <DependentUpon>EditYnvPolyPanel.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Project\Panels\EditYnvPortalPanel.resx">
<DependentUpon>EditYnvPortalPanel.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Project\Panels\EditYtypPanel.resx"> <EmbeddedResource Include="Project\Panels\EditYtypPanel.resx">
<DependentUpon>EditYtypPanel.cs</DependentUpon> <DependentUpon>EditYtypPanel.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>

View File

@ -41,13 +41,13 @@
this.YnvPolyCountLabel = new System.Windows.Forms.Label(); this.YnvPolyCountLabel = new System.Windows.Forms.Label();
this.YnvPortalCountLabel = new System.Windows.Forms.Label(); this.YnvPortalCountLabel = new System.Windows.Forms.Label();
this.YnvPortalLinkCountLabel = new System.Windows.Forms.Label(); this.YnvPortalLinkCountLabel = new System.Windows.Forms.Label();
this.YnvSectorUnkCountLabel = new System.Windows.Forms.Label(); this.YnvPointCountLabel = new System.Windows.Forms.Label();
this.YnvByteCountLabel = new System.Windows.Forms.Label(); this.YnvByteCountLabel = new System.Windows.Forms.Label();
this.YnvFlagsGroupBox = new System.Windows.Forms.GroupBox(); this.YnvFlagsGroupBox = new System.Windows.Forms.GroupBox();
this.YnvFlagsVerticesCheckBox = new System.Windows.Forms.CheckBox();
this.YnvFlagsPortalsCheckBox = new System.Windows.Forms.CheckBox();
this.YnvFlagsVehicleCheckBox = new System.Windows.Forms.CheckBox();
this.YnvFlagsUnknownCheckBox = new System.Windows.Forms.CheckBox(); this.YnvFlagsUnknownCheckBox = new System.Windows.Forms.CheckBox();
this.YnvFlagsVehicleCheckBox = new System.Windows.Forms.CheckBox();
this.YnvFlagsPortalsCheckBox = new System.Windows.Forms.CheckBox();
this.YnvFlagsVerticesCheckBox = new System.Windows.Forms.CheckBox();
this.YnvVersionUnkHashTextBox = new System.Windows.Forms.TextBox(); this.YnvVersionUnkHashTextBox = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label();
@ -177,14 +177,14 @@
this.YnvPortalLinkCountLabel.TabIndex = 42; this.YnvPortalLinkCountLabel.TabIndex = 42;
this.YnvPortalLinkCountLabel.Text = "Portal link count: 0"; this.YnvPortalLinkCountLabel.Text = "Portal link count: 0";
// //
// YnvSectorUnkCountLabel // YnvPointCountLabel
// //
this.YnvSectorUnkCountLabel.AutoSize = true; this.YnvPointCountLabel.AutoSize = true;
this.YnvSectorUnkCountLabel.Location = new System.Drawing.Point(358, 127); this.YnvPointCountLabel.Location = new System.Drawing.Point(358, 127);
this.YnvSectorUnkCountLabel.Name = "YnvSectorUnkCountLabel"; this.YnvPointCountLabel.Name = "YnvPointCountLabel";
this.YnvSectorUnkCountLabel.Size = new System.Drawing.Size(101, 13); this.YnvPointCountLabel.Size = new System.Drawing.Size(73, 13);
this.YnvSectorUnkCountLabel.TabIndex = 43; this.YnvPointCountLabel.TabIndex = 43;
this.YnvSectorUnkCountLabel.Text = "Sector unk count: 0"; this.YnvPointCountLabel.Text = "Point count: 0";
// //
// YnvByteCountLabel // YnvByteCountLabel
// //
@ -208,27 +208,16 @@
this.YnvFlagsGroupBox.TabStop = false; this.YnvFlagsGroupBox.TabStop = false;
this.YnvFlagsGroupBox.Text = "Content flags"; this.YnvFlagsGroupBox.Text = "Content flags";
// //
// YnvFlagsVerticesCheckBox // YnvFlagsUnknownCheckBox
// //
this.YnvFlagsVerticesCheckBox.AutoSize = true; this.YnvFlagsUnknownCheckBox.AutoSize = true;
this.YnvFlagsVerticesCheckBox.Location = new System.Drawing.Point(12, 19); this.YnvFlagsUnknownCheckBox.Location = new System.Drawing.Point(12, 88);
this.YnvFlagsVerticesCheckBox.Name = "YnvFlagsVerticesCheckBox"; this.YnvFlagsUnknownCheckBox.Name = "YnvFlagsUnknownCheckBox";
this.YnvFlagsVerticesCheckBox.Size = new System.Drawing.Size(64, 17); this.YnvFlagsUnknownCheckBox.Size = new System.Drawing.Size(78, 17);
this.YnvFlagsVerticesCheckBox.TabIndex = 0; this.YnvFlagsUnknownCheckBox.TabIndex = 3;
this.YnvFlagsVerticesCheckBox.Text = "Vertices"; this.YnvFlagsUnknownCheckBox.Text = "[Unknown]";
this.YnvFlagsVerticesCheckBox.UseVisualStyleBackColor = true; this.YnvFlagsUnknownCheckBox.UseVisualStyleBackColor = true;
this.YnvFlagsVerticesCheckBox.CheckedChanged += new System.EventHandler(this.YnvFlagsVerticesCheckBox_CheckedChanged); this.YnvFlagsUnknownCheckBox.CheckedChanged += new System.EventHandler(this.YnvFlagsUnknownCheckBox_CheckedChanged);
//
// YnvFlagsPortalsCheckBox
//
this.YnvFlagsPortalsCheckBox.AutoSize = true;
this.YnvFlagsPortalsCheckBox.Location = new System.Drawing.Point(12, 42);
this.YnvFlagsPortalsCheckBox.Name = "YnvFlagsPortalsCheckBox";
this.YnvFlagsPortalsCheckBox.Size = new System.Drawing.Size(58, 17);
this.YnvFlagsPortalsCheckBox.TabIndex = 1;
this.YnvFlagsPortalsCheckBox.Text = "Portals";
this.YnvFlagsPortalsCheckBox.UseVisualStyleBackColor = true;
this.YnvFlagsPortalsCheckBox.CheckedChanged += new System.EventHandler(this.YnvFlagsPortalsCheckBox_CheckedChanged);
// //
// YnvFlagsVehicleCheckBox // YnvFlagsVehicleCheckBox
// //
@ -241,16 +230,27 @@
this.YnvFlagsVehicleCheckBox.UseVisualStyleBackColor = true; this.YnvFlagsVehicleCheckBox.UseVisualStyleBackColor = true;
this.YnvFlagsVehicleCheckBox.CheckedChanged += new System.EventHandler(this.YnvFlagsVehicleCheckBox_CheckedChanged); this.YnvFlagsVehicleCheckBox.CheckedChanged += new System.EventHandler(this.YnvFlagsVehicleCheckBox_CheckedChanged);
// //
// YnvFlagsUnknownCheckBox // YnvFlagsPortalsCheckBox
// //
this.YnvFlagsUnknownCheckBox.AutoSize = true; this.YnvFlagsPortalsCheckBox.AutoSize = true;
this.YnvFlagsUnknownCheckBox.Location = new System.Drawing.Point(12, 88); this.YnvFlagsPortalsCheckBox.Location = new System.Drawing.Point(12, 42);
this.YnvFlagsUnknownCheckBox.Name = "YnvFlagsUnknownCheckBox"; this.YnvFlagsPortalsCheckBox.Name = "YnvFlagsPortalsCheckBox";
this.YnvFlagsUnknownCheckBox.Size = new System.Drawing.Size(78, 17); this.YnvFlagsPortalsCheckBox.Size = new System.Drawing.Size(58, 17);
this.YnvFlagsUnknownCheckBox.TabIndex = 3; this.YnvFlagsPortalsCheckBox.TabIndex = 1;
this.YnvFlagsUnknownCheckBox.Text = "[Unknown]"; this.YnvFlagsPortalsCheckBox.Text = "Portals";
this.YnvFlagsUnknownCheckBox.UseVisualStyleBackColor = true; this.YnvFlagsPortalsCheckBox.UseVisualStyleBackColor = true;
this.YnvFlagsUnknownCheckBox.CheckedChanged += new System.EventHandler(this.YnvFlagsUnknownCheckBox_CheckedChanged); this.YnvFlagsPortalsCheckBox.CheckedChanged += new System.EventHandler(this.YnvFlagsPortalsCheckBox_CheckedChanged);
//
// YnvFlagsVerticesCheckBox
//
this.YnvFlagsVerticesCheckBox.AutoSize = true;
this.YnvFlagsVerticesCheckBox.Location = new System.Drawing.Point(12, 19);
this.YnvFlagsVerticesCheckBox.Name = "YnvFlagsVerticesCheckBox";
this.YnvFlagsVerticesCheckBox.Size = new System.Drawing.Size(64, 17);
this.YnvFlagsVerticesCheckBox.TabIndex = 0;
this.YnvFlagsVerticesCheckBox.Text = "Vertices";
this.YnvFlagsVerticesCheckBox.UseVisualStyleBackColor = true;
this.YnvFlagsVerticesCheckBox.CheckedChanged += new System.EventHandler(this.YnvFlagsVerticesCheckBox_CheckedChanged);
// //
// YnvVersionUnkHashTextBox // YnvVersionUnkHashTextBox
// //
@ -357,7 +357,7 @@
this.Controls.Add(this.label1); this.Controls.Add(this.label1);
this.Controls.Add(this.YnvFlagsGroupBox); this.Controls.Add(this.YnvFlagsGroupBox);
this.Controls.Add(this.YnvByteCountLabel); this.Controls.Add(this.YnvByteCountLabel);
this.Controls.Add(this.YnvSectorUnkCountLabel); this.Controls.Add(this.YnvPointCountLabel);
this.Controls.Add(this.YnvPortalLinkCountLabel); this.Controls.Add(this.YnvPortalLinkCountLabel);
this.Controls.Add(this.YnvPortalCountLabel); this.Controls.Add(this.YnvPortalCountLabel);
this.Controls.Add(this.YnvPolyCountLabel); this.Controls.Add(this.YnvPolyCountLabel);
@ -396,7 +396,7 @@
private System.Windows.Forms.Label YnvPolyCountLabel; private System.Windows.Forms.Label YnvPolyCountLabel;
private System.Windows.Forms.Label YnvPortalCountLabel; private System.Windows.Forms.Label YnvPortalCountLabel;
private System.Windows.Forms.Label YnvPortalLinkCountLabel; private System.Windows.Forms.Label YnvPortalLinkCountLabel;
private System.Windows.Forms.Label YnvSectorUnkCountLabel; private System.Windows.Forms.Label YnvPointCountLabel;
private System.Windows.Forms.Label YnvByteCountLabel; private System.Windows.Forms.Label YnvByteCountLabel;
private System.Windows.Forms.GroupBox YnvFlagsGroupBox; private System.Windows.Forms.GroupBox YnvFlagsGroupBox;
private System.Windows.Forms.CheckBox YnvFlagsUnknownCheckBox; private System.Windows.Forms.CheckBox YnvFlagsUnknownCheckBox;

View File

@ -72,7 +72,7 @@ namespace CodeWalker.Project.Panels
YnvPolyCountLabel.Text = "Poly count: -"; YnvPolyCountLabel.Text = "Poly count: -";
YnvPortalCountLabel.Text = "Portal count: -"; YnvPortalCountLabel.Text = "Portal count: -";
YnvPortalLinkCountLabel.Text = "Portal link count: -"; YnvPortalLinkCountLabel.Text = "Portal link count: -";
YnvSectorUnkCountLabel.Text = "Sector unk count: -"; YnvPointCountLabel.Text = "Sector unk count: -";
YnvByteCountLabel.Text = "Byte count: -"; YnvByteCountLabel.Text = "Byte count: -";
YnvVersionUnkHashTextBox.Text = string.Empty; YnvVersionUnkHashTextBox.Text = string.Empty;
} }
@ -95,7 +95,7 @@ namespace CodeWalker.Project.Panels
YnvPolyCountLabel.Text = "Poly count: " + nv.PolysCount.ToString(); YnvPolyCountLabel.Text = "Poly count: " + nv.PolysCount.ToString();
YnvPortalCountLabel.Text = "Portal count: " + nv.PortalsCount.ToString(); YnvPortalCountLabel.Text = "Portal count: " + nv.PortalsCount.ToString();
YnvPortalLinkCountLabel.Text = "Portal link count: " + nv.PortalLinksCount.ToString(); YnvPortalLinkCountLabel.Text = "Portal link count: " + nv.PortalLinksCount.ToString();
YnvSectorUnkCountLabel.Text = "Sector unk count: " + nv.SectorUnkCount.ToString(); YnvPointCountLabel.Text = "Point count: " + nv.PointsCount.ToString();
YnvByteCountLabel.Text = "Byte count: " + nv.TotalBytes.ToString(); YnvByteCountLabel.Text = "Byte count: " + nv.TotalBytes.ToString();
YnvVersionUnkHashTextBox.Text = nv.VersionUnk2.ToString(); YnvVersionUnkHashTextBox.Text = nv.VersionUnk2.ToString();
YnvAdjAreaIDsTextBox.Text = GetAdjAreaIDsString(nv.AdjAreaIDs.Values); YnvAdjAreaIDsTextBox.Text = GetAdjAreaIDsString(nv.AdjAreaIDs.Values);

View File

@ -0,0 +1,174 @@
namespace CodeWalker.Project.Panels
{
partial class EditYnvPointPanel
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EditYnvPointPanel));
this.DeletePointButton = new System.Windows.Forms.Button();
this.AddToProjectButton = new System.Windows.Forms.Button();
this.YnvPointGoToButton = new System.Windows.Forms.Button();
this.YnvPointPositionTextBox = new System.Windows.Forms.TextBox();
this.label55 = new System.Windows.Forms.Label();
this.YnvPointTypeUpDown = new System.Windows.Forms.NumericUpDown();
this.label49 = new System.Windows.Forms.Label();
this.YnvPointAngleUpDown = new System.Windows.Forms.NumericUpDown();
this.label1 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.YnvPointTypeUpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.YnvPointAngleUpDown)).BeginInit();
this.SuspendLayout();
//
// DeletePointButton
//
this.DeletePointButton.Enabled = false;
this.DeletePointButton.Location = new System.Drawing.Point(120, 119);
this.DeletePointButton.Name = "DeletePointButton";
this.DeletePointButton.Size = new System.Drawing.Size(90, 23);
this.DeletePointButton.TabIndex = 8;
this.DeletePointButton.Text = "Delete Point";
this.DeletePointButton.UseVisualStyleBackColor = true;
this.DeletePointButton.Click += new System.EventHandler(this.DeletePointButton_Click);
//
// AddToProjectButton
//
this.AddToProjectButton.Enabled = false;
this.AddToProjectButton.Location = new System.Drawing.Point(24, 119);
this.AddToProjectButton.Name = "AddToProjectButton";
this.AddToProjectButton.Size = new System.Drawing.Size(90, 23);
this.AddToProjectButton.TabIndex = 7;
this.AddToProjectButton.Text = "Add to Project";
this.AddToProjectButton.UseVisualStyleBackColor = true;
this.AddToProjectButton.Click += new System.EventHandler(this.AddToProjectButton_Click);
//
// YnvPointGoToButton
//
this.YnvPointGoToButton.Location = new System.Drawing.Point(280, 10);
this.YnvPointGoToButton.Name = "YnvPointGoToButton";
this.YnvPointGoToButton.Size = new System.Drawing.Size(68, 23);
this.YnvPointGoToButton.TabIndex = 2;
this.YnvPointGoToButton.Text = "Go to";
this.YnvPointGoToButton.UseVisualStyleBackColor = true;
this.YnvPointGoToButton.Click += new System.EventHandler(this.YnvPointGoToButton_Click);
//
// YnvPointPositionTextBox
//
this.YnvPointPositionTextBox.Location = new System.Drawing.Point(74, 12);
this.YnvPointPositionTextBox.Name = "YnvPointPositionTextBox";
this.YnvPointPositionTextBox.Size = new System.Drawing.Size(200, 20);
this.YnvPointPositionTextBox.TabIndex = 1;
this.YnvPointPositionTextBox.TextChanged += new System.EventHandler(this.YnvPointPositionTextBox_TextChanged);
//
// label55
//
this.label55.AutoSize = true;
this.label55.Location = new System.Drawing.Point(21, 15);
this.label55.Name = "label55";
this.label55.Size = new System.Drawing.Size(47, 13);
this.label55.TabIndex = 0;
this.label55.Text = "Position:";
//
// YnvPointTypeUpDown
//
this.YnvPointTypeUpDown.Location = new System.Drawing.Point(74, 64);
this.YnvPointTypeUpDown.Maximum = new decimal(new int[] {
255,
0,
0,
0});
this.YnvPointTypeUpDown.Name = "YnvPointTypeUpDown";
this.YnvPointTypeUpDown.Size = new System.Drawing.Size(74, 20);
this.YnvPointTypeUpDown.TabIndex = 6;
this.YnvPointTypeUpDown.ValueChanged += new System.EventHandler(this.YnvPointTypeUpDown_ValueChanged);
//
// label49
//
this.label49.AutoSize = true;
this.label49.Location = new System.Drawing.Point(34, 66);
this.label49.Name = "label49";
this.label49.Size = new System.Drawing.Size(34, 13);
this.label49.TabIndex = 5;
this.label49.Text = "Type:";
//
// YnvPointAngleUpDown
//
this.YnvPointAngleUpDown.Location = new System.Drawing.Point(74, 38);
this.YnvPointAngleUpDown.Maximum = new decimal(new int[] {
255,
0,
0,
0});
this.YnvPointAngleUpDown.Name = "YnvPointAngleUpDown";
this.YnvPointAngleUpDown.Size = new System.Drawing.Size(74, 20);
this.YnvPointAngleUpDown.TabIndex = 4;
this.YnvPointAngleUpDown.ValueChanged += new System.EventHandler(this.YnvPointAngleUpDown_ValueChanged);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(18, 40);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(50, 13);
this.label1.TabIndex = 3;
this.label1.Text = "Rotation:";
//
// EditYnvPointPanel
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(434, 243);
this.Controls.Add(this.YnvPointAngleUpDown);
this.Controls.Add(this.label1);
this.Controls.Add(this.YnvPointTypeUpDown);
this.Controls.Add(this.label49);
this.Controls.Add(this.DeletePointButton);
this.Controls.Add(this.AddToProjectButton);
this.Controls.Add(this.YnvPointGoToButton);
this.Controls.Add(this.YnvPointPositionTextBox);
this.Controls.Add(this.label55);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "EditYnvPointPanel";
this.Text = "Edit Ynv Point";
((System.ComponentModel.ISupportInitialize)(this.YnvPointTypeUpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.YnvPointAngleUpDown)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button DeletePointButton;
private System.Windows.Forms.Button AddToProjectButton;
private System.Windows.Forms.Button YnvPointGoToButton;
private System.Windows.Forms.TextBox YnvPointPositionTextBox;
private System.Windows.Forms.Label label55;
private System.Windows.Forms.NumericUpDown YnvPointTypeUpDown;
private System.Windows.Forms.Label label49;
private System.Windows.Forms.NumericUpDown YnvPointAngleUpDown;
private System.Windows.Forms.Label label1;
}
}

View File

@ -0,0 +1,150 @@
using CodeWalker.GameFiles;
using SharpDX;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CodeWalker.Project.Panels
{
public partial class EditYnvPointPanel : ProjectPanel
{
public ProjectForm ProjectForm;
public YnvPoint YnvPoint { get; set; }
private bool populatingui = false;
public EditYnvPointPanel(ProjectForm projectForm)
{
ProjectForm = projectForm;
InitializeComponent();
}
public void SetYnvPoint(YnvPoint ynvPoint)
{
YnvPoint = ynvPoint;
Tag = ynvPoint;
UpdateFormTitle();
UpdateYnvPointUI();
}
private void UpdateFormTitle()
{
Text = "Nav Point " + YnvPoint.Index.ToString();
}
public void UpdateYnvPointUI()
{
if (YnvPoint == null)
{
////YnvPointPanel.Enabled = false;
DeletePointButton.Enabled = false;
AddToProjectButton.Enabled = false;
YnvPointPositionTextBox.Text = string.Empty;
YnvPointAngleUpDown.Value = 0;
YnvPointTypeUpDown.Value = 0;
}
else
{
populatingui = true;
////YnvPortalPanel.Enabled = true;
DeletePointButton.Enabled = ProjectForm.YnvExistsInProject(YnvPoint.Ynv);
AddToProjectButton.Enabled = !DeletePointButton.Enabled;
YnvPointPositionTextBox.Text = FloatUtil.GetVector3String(YnvPoint.Position);
YnvPointAngleUpDown.Value = YnvPoint.Angle;
YnvPointTypeUpDown.Value = YnvPoint.Type;
populatingui = false;
}
}
private void YnvPointPositionTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (YnvPoint == null) return;
Vector3 v = FloatUtil.ParseVector3String(YnvPointPositionTextBox.Text);
bool change = false;
lock (ProjectForm.ProjectSyncRoot)
{
if (YnvPoint.Position != v)
{
YnvPoint.SetPosition(v);
ProjectForm.SetYnvHasChanged(true);
change = true;
}
}
if (change)
{
if (ProjectForm.WorldForm != null)
{
ProjectForm.WorldForm.SetWidgetPosition(YnvPoint.Position);
ProjectForm.WorldForm.UpdateNavPointGraphics(YnvPoint, false);
}
}
}
private void YnvPointAngleUpDown_ValueChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (YnvPoint == null) return;
byte ang = (byte)YnvPointAngleUpDown.Value;
bool change = false;
lock (ProjectForm.ProjectSyncRoot)
{
if (YnvPoint.Angle != ang)
{
YnvPoint.Angle = ang;
ProjectForm.SetYnvHasChanged(true);
change = true;
}
}
if (change)
{
if (ProjectForm.WorldForm != null)
{
ProjectForm.WorldForm.SetWidgetRotation(YnvPoint.Orientation);
//ProjectForm.WorldForm.UpdateNavPointGraphics(YnvPoint, false);
}
}
}
private void YnvPointTypeUpDown_ValueChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (YnvPoint == null) return;
byte typ = (byte)YnvPointTypeUpDown.Value;
lock (ProjectForm.ProjectSyncRoot)
{
if (YnvPoint.Type != typ)
{
YnvPoint.Type = typ;
ProjectForm.SetYnvHasChanged(true);
}
}
}
private void YnvPointGoToButton_Click(object sender, EventArgs e)
{
if (YnvPoint == null) return;
if (ProjectForm.WorldForm == null) return;
ProjectForm.WorldForm.GoToPosition(YnvPoint.Position);
}
private void AddToProjectButton_Click(object sender, EventArgs e)
{
if (YnvPoint == null) return;
ProjectForm.SetProjectItem(YnvPoint);
ProjectForm.AddYnvToProject(YnvPoint.Ynv);
}
private void DeletePointButton_Click(object sender, EventArgs e)
{
MessageBox.Show("Delete Point TODO!");
}
}
}

View File

@ -0,0 +1,409 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAMAICAAAAAAGACoDAAANgAAABAQAAAAABgAaAMAAN4MAABAQAAAAAAYACgyAABGEAAAKAAAACAA
AABAAAAAAQAYAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPv8/u3v+Pn6//7+/wAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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8//7+/wAAAAAAAAAA
APb4/7/F84eP0e/0//7+/wAAAAAAAP7+//z9//v8//3+/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPz9//b5//X4//v8/wAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////////////w////4
P///+D////g8//D4MH/geCB/4Dggf+A4IH/wOCD/+DAB//hgAf//gAP//wAAB/AAAAPwAAAD8AAAA/AA
AAfjAAEHgYADAQPgBwEDEAEBAghgAQwIIEH8CCB//Bggf/wYMH/8ODD///h/////////////KAAAABAA
AAAgAAAAAQAYAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///+vv/fL1/v///wAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///4+Vx7/F5v///wAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAP///4CHtrS62////////////////////wAAAAAAAAAAAP////H0/vf6/v//
/////////4yTwrrB4f///+zw+7rA6P39/////wAAAAAAAAAAAP///56l2BkcguXr/P///////42Uw8jO
6P///ysvjWVqtP///////wAAAAAAAAAAAP////D0/0hPpsDG6////////6y02d7k8////3qAx+/z/f//
/wAAAAAAAAAAAAAAAAAAAP///////////////8zT8V5ns1Rcrdzh9f///////////wAAAAAAAAAAAAAA
AAAAAP////////7+/6ix3nmBxFthtmdwu09WqbC54/v9//r8//j6//39/wAAAAAAAAAAAOjt/H6I0FJc
skpSqHF+wRMahFZhs4iT1AsNc1pgrm52v2RsuO/z/gAAAP////////L2/cLJ7rrD64+V4DY+ozU+mYmU
0X2Hy1hfss7V8urv/PP2/v///wAAAP///+Pp+d/k9////////+Pp/4uR3ysymW14xYOM0fD0/P///+Xq
+ri/6Pj6/wAAAOrv/j5DnbS75P////////////X4/+/0/ubr+/r7/////////9rh+hgZhKGo2QAAAPDz
/eLn+f////j6/2Nqttrg9////+Hn+P3+//3+/1hescLJ6/////L2/eru/AAAAAAAAAAAAP///8rR70tR
p/3+//v8/zY6jNPY7////09WqWpwu////wAAAAAAAAAAAAAAAAAAAAAAAPb4/vr7//////v8/5Wd1eHm
+P////v8//T3/wAAAAAAAAAAAAAAAP//AAD8PwAA/D8AAPwDAACAAwAAgAMAAIAHAADABwAAwAEAAMAB
AAAAAQAAAAEAAAABAAAAAQAAwAcAAOAPAAAoAAAAQAAAAIAAAAABABgAAAAAAAAwAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/v7//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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/v7//f7/
/f3//P3//f7//v7//v//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////
///////4D/////////AH////////8Af////////wB/////////AH////////8Af////////wB///////
//AH////////8Af////////wB/////////AH////////8AfwP//////wB8Af//+Af/AHgB///wA/8AcA
H///AB/wBgAf//8AD/AGAB///wAH8AYAH///AAPwBAAf//8AA/AEAD///wAD8AQAP///AAPwBAB///+A
A/AEAP///8AD4AAA////4AcAAAH////wDgAAAf/////8AAAH//////gAAAf/////4AAAAf/////gAAAA
/f//+AAAAAAAD//AAAAAAAAH/4AAAAAAAAf/gAAAAAAAB/+AAAAAAAAH/4AAAAAAAAf/gAAAAAAAB/+A
AAAAAAAP/4AAAAAAAB//wAAAAABAf/4HwAAAAYAf8APAAAADgA/gA+AAAAMAA8AD8AAABwADgAP8AAAf
AAOAA/4AAB8AA4ADAAAAAQADgAIAcA4AgAOABgBwDgBAA4AMAGAMADADwDwAYAwAOAfg+ABgBAAeH//4
AEAEAB////gAwAYAH///+ADABgAf///4AcAGAB////gBwAcAH///+APAB4A////8B+AHwH//////4A//
///////gD/////////Af//////////////8=
</value>
</data>
</root>

View File

@ -46,14 +46,14 @@
this.label4 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label();
this.DeletePolyButton = new System.Windows.Forms.Button(); this.DeletePolyButton = new System.Windows.Forms.Button();
this.AddToProjectButton = new System.Windows.Forms.Button(); this.AddToProjectButton = new System.Windows.Forms.Button();
this.PortalUnkUpDown = new System.Windows.Forms.NumericUpDown(); this.PortalTypeUpDown = new System.Windows.Forms.NumericUpDown();
this.label6 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.AreaIDUpDown)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.AreaIDUpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.PartIDUpDown)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.PartIDUpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.PortalIDUpDown)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.PortalIDUpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.UnkXUpDown)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.UnkXUpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.UnkYUpDown)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.UnkYUpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.PortalUnkUpDown)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.PortalTypeUpDown)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
// //
// AreaIDUpDown // AreaIDUpDown
@ -102,7 +102,7 @@
// //
// PortalIDUpDown // PortalIDUpDown
// //
this.PortalIDUpDown.Location = new System.Drawing.Point(338, 12); this.PortalIDUpDown.Location = new System.Drawing.Point(346, 12);
this.PortalIDUpDown.Maximum = new decimal(new int[] { this.PortalIDUpDown.Maximum = new decimal(new int[] {
65535, 65535,
0, 0,
@ -116,11 +116,11 @@
// label2 // label2
// //
this.label2.AutoSize = true; this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(281, 14); this.label2.Location = new System.Drawing.Point(280, 14);
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(51, 13); this.label2.Size = new System.Drawing.Size(60, 13);
this.label2.TabIndex = 5; this.label2.TabIndex = 5;
this.label2.Text = "Portal ID:"; this.label2.Text = "Portal Link:";
// //
// FlagsCheckedListBox1 // FlagsCheckedListBox1
// //
@ -273,34 +273,34 @@
this.AddToProjectButton.UseVisualStyleBackColor = true; this.AddToProjectButton.UseVisualStyleBackColor = true;
this.AddToProjectButton.Click += new System.EventHandler(this.AddToProjectButton_Click); this.AddToProjectButton.Click += new System.EventHandler(this.AddToProjectButton_Click);
// //
// PortalUnkUpDown // PortalTypeUpDown
// //
this.PortalUnkUpDown.Location = new System.Drawing.Point(495, 12); this.PortalTypeUpDown.Location = new System.Drawing.Point(495, 12);
this.PortalUnkUpDown.Maximum = new decimal(new int[] { this.PortalTypeUpDown.Maximum = new decimal(new int[] {
15, 15,
0, 0,
0, 0,
0}); 0});
this.PortalUnkUpDown.Name = "PortalUnkUpDown"; this.PortalTypeUpDown.Name = "PortalTypeUpDown";
this.PortalUnkUpDown.Size = new System.Drawing.Size(57, 20); this.PortalTypeUpDown.Size = new System.Drawing.Size(57, 20);
this.PortalUnkUpDown.TabIndex = 8; this.PortalTypeUpDown.TabIndex = 8;
this.PortalUnkUpDown.ValueChanged += new System.EventHandler(this.PortalUnkUpDown_ValueChanged); this.PortalTypeUpDown.ValueChanged += new System.EventHandler(this.PortalTypeUpDown_ValueChanged);
// //
// label6 // label6
// //
this.label6.AutoSize = true; this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(431, 14); this.label6.Location = new System.Drawing.Point(429, 14);
this.label6.Name = "label6"; this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(58, 13); this.label6.Size = new System.Drawing.Size(60, 13);
this.label6.TabIndex = 7; this.label6.TabIndex = 7;
this.label6.Text = "Portal unk:"; this.label6.Text = "Portal type:";
// //
// EditYnvPolyPanel // EditYnvPolyPanel
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(562, 404); this.ClientSize = new System.Drawing.Size(562, 404);
this.Controls.Add(this.PortalUnkUpDown); this.Controls.Add(this.PortalTypeUpDown);
this.Controls.Add(this.label6); this.Controls.Add(this.label6);
this.Controls.Add(this.DeletePolyButton); this.Controls.Add(this.DeletePolyButton);
this.Controls.Add(this.AddToProjectButton); this.Controls.Add(this.AddToProjectButton);
@ -327,7 +327,7 @@
((System.ComponentModel.ISupportInitialize)(this.PortalIDUpDown)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.PortalIDUpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.UnkXUpDown)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.UnkXUpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.UnkYUpDown)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.UnkYUpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.PortalUnkUpDown)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.PortalTypeUpDown)).EndInit();
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
@ -352,7 +352,7 @@
private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label4;
private System.Windows.Forms.Button DeletePolyButton; private System.Windows.Forms.Button DeletePolyButton;
private System.Windows.Forms.Button AddToProjectButton; private System.Windows.Forms.Button AddToProjectButton;
private System.Windows.Forms.NumericUpDown PortalUnkUpDown; private System.Windows.Forms.NumericUpDown PortalTypeUpDown;
private System.Windows.Forms.Label label6; private System.Windows.Forms.Label label6;
} }
} }

View File

@ -48,7 +48,7 @@ namespace CodeWalker.Project.Panels
AreaIDUpDown.Value = 0; AreaIDUpDown.Value = 0;
PartIDUpDown.Value = 0; PartIDUpDown.Value = 0;
PortalIDUpDown.Value = 0; PortalIDUpDown.Value = 0;
PortalUnkUpDown.Value = 0; PortalTypeUpDown.Value = 0;
SetCheckedListBoxValues(FlagsCheckedListBox1, 0); SetCheckedListBoxValues(FlagsCheckedListBox1, 0);
SetCheckedListBoxValues(FlagsCheckedListBox2, 0); SetCheckedListBoxValues(FlagsCheckedListBox2, 0);
SetCheckedListBoxValues(FlagsCheckedListBox3, 0); SetCheckedListBoxValues(FlagsCheckedListBox3, 0);
@ -64,8 +64,8 @@ namespace CodeWalker.Project.Panels
AddToProjectButton.Enabled = !DeletePolyButton.Enabled; AddToProjectButton.Enabled = !DeletePolyButton.Enabled;
AreaIDUpDown.Value = YnvPoly.AreaID; AreaIDUpDown.Value = YnvPoly.AreaID;
PartIDUpDown.Value = YnvPoly.PartID; PartIDUpDown.Value = YnvPoly.PartID;
PortalIDUpDown.Value = YnvPoly.PortalID; PortalIDUpDown.Value = YnvPoly.PortalLinkID;
PortalUnkUpDown.Value = YnvPoly.PortalUnk; PortalTypeUpDown.Value = YnvPoly.PortalType;
SetCheckedListBoxValues(FlagsCheckedListBox1, YnvPoly.Flags1); SetCheckedListBoxValues(FlagsCheckedListBox1, YnvPoly.Flags1);
SetCheckedListBoxValues(FlagsCheckedListBox2, YnvPoly.Flags2); SetCheckedListBoxValues(FlagsCheckedListBox2, YnvPoly.Flags2);
SetCheckedListBoxValues(FlagsCheckedListBox3, YnvPoly.Flags3); SetCheckedListBoxValues(FlagsCheckedListBox3, YnvPoly.Flags3);
@ -144,24 +144,24 @@ namespace CodeWalker.Project.Panels
ushort portalid = (ushort)PortalIDUpDown.Value; ushort portalid = (ushort)PortalIDUpDown.Value;
lock (ProjectForm.ProjectSyncRoot) lock (ProjectForm.ProjectSyncRoot)
{ {
if (YnvPoly.PortalID != portalid) if (YnvPoly.PortalLinkID != portalid)
{ {
YnvPoly.PortalID = portalid; YnvPoly.PortalLinkID = portalid;
ProjectForm.SetYnvHasChanged(true); ProjectForm.SetYnvHasChanged(true);
} }
} }
} }
private void PortalUnkUpDown_ValueChanged(object sender, EventArgs e) private void PortalTypeUpDown_ValueChanged(object sender, EventArgs e)
{ {
if (populatingui) return; if (populatingui) return;
if (YnvPoly == null) return; if (YnvPoly == null) return;
byte portalunk = (byte)PortalUnkUpDown.Value; byte portalunk = (byte)PortalTypeUpDown.Value;
lock (ProjectForm.ProjectSyncRoot) lock (ProjectForm.ProjectSyncRoot)
{ {
if (YnvPoly.PortalUnk != portalunk) if (YnvPoly.PortalType != portalunk)
{ {
YnvPoly.PortalUnk = portalunk; YnvPoly.PortalType = portalunk;
ProjectForm.SetYnvHasChanged(true); ProjectForm.SetYnvHasChanged(true);
} }
} }

View File

@ -0,0 +1,437 @@
namespace CodeWalker.Project.Panels
{
partial class EditYnvPortalPanel
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EditYnvPortalPanel));
this.AngleUpDown = new System.Windows.Forms.NumericUpDown();
this.label1 = new System.Windows.Forms.Label();
this.TypeUpDown = new System.Windows.Forms.NumericUpDown();
this.label49 = new System.Windows.Forms.Label();
this.DeletePortalButton = new System.Windows.Forms.Button();
this.AddToProjectButton = new System.Windows.Forms.Button();
this.GoToButton = new System.Windows.Forms.Button();
this.PositionFromTextBox = new System.Windows.Forms.TextBox();
this.label55 = new System.Windows.Forms.Label();
this.PositionToTextBox = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.AreaIDFromUpDown = new System.Windows.Forms.NumericUpDown();
this.label92 = new System.Windows.Forms.Label();
this.AreaIDToUpDown = new System.Windows.Forms.NumericUpDown();
this.label3 = new System.Windows.Forms.Label();
this.PolyIDTo1UpDown = new System.Windows.Forms.NumericUpDown();
this.label4 = new System.Windows.Forms.Label();
this.PolyIDFrom1UpDown = new System.Windows.Forms.NumericUpDown();
this.label5 = new System.Windows.Forms.Label();
this.PolyIDTo2UpDown = new System.Windows.Forms.NumericUpDown();
this.label6 = new System.Windows.Forms.Label();
this.PolyIDFrom2UpDown = new System.Windows.Forms.NumericUpDown();
this.label7 = new System.Windows.Forms.Label();
this.Unk2UpDown = new System.Windows.Forms.NumericUpDown();
this.label8 = new System.Windows.Forms.Label();
this.Unk1UpDown = new System.Windows.Forms.NumericUpDown();
this.label9 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.AngleUpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.TypeUpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.AreaIDFromUpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.AreaIDToUpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.PolyIDTo1UpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.PolyIDFrom1UpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.PolyIDTo2UpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.PolyIDFrom2UpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.Unk2UpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.Unk1UpDown)).BeginInit();
this.SuspendLayout();
//
// AngleUpDown
//
this.AngleUpDown.Location = new System.Drawing.Point(96, 64);
this.AngleUpDown.Maximum = new decimal(new int[] {
255,
0,
0,
0});
this.AngleUpDown.Name = "AngleUpDown";
this.AngleUpDown.Size = new System.Drawing.Size(71, 20);
this.AngleUpDown.TabIndex = 13;
this.AngleUpDown.ValueChanged += new System.EventHandler(this.AngleUpDown_ValueChanged);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(40, 66);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(50, 13);
this.label1.TabIndex = 12;
this.label1.Text = "Rotation:";
//
// TypeUpDown
//
this.TypeUpDown.Location = new System.Drawing.Point(256, 64);
this.TypeUpDown.Maximum = new decimal(new int[] {
255,
0,
0,
0});
this.TypeUpDown.Name = "TypeUpDown";
this.TypeUpDown.Size = new System.Drawing.Size(71, 20);
this.TypeUpDown.TabIndex = 15;
this.TypeUpDown.ValueChanged += new System.EventHandler(this.TypeUpDown_ValueChanged);
//
// label49
//
this.label49.AutoSize = true;
this.label49.Location = new System.Drawing.Point(216, 66);
this.label49.Name = "label49";
this.label49.Size = new System.Drawing.Size(34, 13);
this.label49.TabIndex = 14;
this.label49.Text = "Type:";
//
// DeletePortalButton
//
this.DeletePortalButton.Enabled = false;
this.DeletePortalButton.Location = new System.Drawing.Point(133, 215);
this.DeletePortalButton.Name = "DeletePortalButton";
this.DeletePortalButton.Size = new System.Drawing.Size(90, 23);
this.DeletePortalButton.TabIndex = 17;
this.DeletePortalButton.Text = "Delete Portal";
this.DeletePortalButton.UseVisualStyleBackColor = true;
this.DeletePortalButton.Click += new System.EventHandler(this.DeletePortalButton_Click);
//
// AddToProjectButton
//
this.AddToProjectButton.Enabled = false;
this.AddToProjectButton.Location = new System.Drawing.Point(37, 215);
this.AddToProjectButton.Name = "AddToProjectButton";
this.AddToProjectButton.Size = new System.Drawing.Size(90, 23);
this.AddToProjectButton.TabIndex = 16;
this.AddToProjectButton.Text = "Add to Project";
this.AddToProjectButton.UseVisualStyleBackColor = true;
this.AddToProjectButton.Click += new System.EventHandler(this.AddToProjectButton_Click);
//
// GoToButton
//
this.GoToButton.Location = new System.Drawing.Point(302, 10);
this.GoToButton.Name = "GoToButton";
this.GoToButton.Size = new System.Drawing.Size(68, 23);
this.GoToButton.TabIndex = 11;
this.GoToButton.Text = "Go to";
this.GoToButton.UseVisualStyleBackColor = true;
this.GoToButton.Click += new System.EventHandler(this.GoToButton_Click);
//
// PositionFromTextBox
//
this.PositionFromTextBox.Location = new System.Drawing.Point(96, 12);
this.PositionFromTextBox.Name = "PositionFromTextBox";
this.PositionFromTextBox.Size = new System.Drawing.Size(200, 20);
this.PositionFromTextBox.TabIndex = 10;
this.PositionFromTextBox.TextChanged += new System.EventHandler(this.PositionFromTextBox_TextChanged);
//
// label55
//
this.label55.AutoSize = true;
this.label55.Location = new System.Drawing.Point(17, 15);
this.label55.Name = "label55";
this.label55.Size = new System.Drawing.Size(73, 13);
this.label55.TabIndex = 9;
this.label55.Text = "From Position:";
//
// PositionToTextBox
//
this.PositionToTextBox.Location = new System.Drawing.Point(96, 38);
this.PositionToTextBox.Name = "PositionToTextBox";
this.PositionToTextBox.Size = new System.Drawing.Size(200, 20);
this.PositionToTextBox.TabIndex = 19;
this.PositionToTextBox.TextChanged += new System.EventHandler(this.PositionToTextBox_TextChanged);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(27, 41);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(63, 13);
this.label2.TabIndex = 18;
this.label2.Text = "To Position:";
//
// AreaIDFromUpDown
//
this.AreaIDFromUpDown.Location = new System.Drawing.Point(96, 90);
this.AreaIDFromUpDown.Maximum = new decimal(new int[] {
16383,
0,
0,
0});
this.AreaIDFromUpDown.Name = "AreaIDFromUpDown";
this.AreaIDFromUpDown.Size = new System.Drawing.Size(71, 20);
this.AreaIDFromUpDown.TabIndex = 21;
this.AreaIDFromUpDown.ValueChanged += new System.EventHandler(this.AreaIDFromUpDown_ValueChanged);
//
// label92
//
this.label92.AutoSize = true;
this.label92.Location = new System.Drawing.Point(18, 92);
this.label92.Name = "label92";
this.label92.Size = new System.Drawing.Size(72, 13);
this.label92.TabIndex = 20;
this.label92.Text = "From Area ID:";
//
// AreaIDToUpDown
//
this.AreaIDToUpDown.Location = new System.Drawing.Point(256, 90);
this.AreaIDToUpDown.Maximum = new decimal(new int[] {
16383,
0,
0,
0});
this.AreaIDToUpDown.Name = "AreaIDToUpDown";
this.AreaIDToUpDown.Size = new System.Drawing.Size(71, 20);
this.AreaIDToUpDown.TabIndex = 23;
this.AreaIDToUpDown.ValueChanged += new System.EventHandler(this.AreaIDToUpDown_ValueChanged);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(188, 92);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(62, 13);
this.label3.TabIndex = 22;
this.label3.Text = "To Area ID:";
//
// PolyIDTo1UpDown
//
this.PolyIDTo1UpDown.Location = new System.Drawing.Point(256, 116);
this.PolyIDTo1UpDown.Maximum = new decimal(new int[] {
65535,
0,
0,
0});
this.PolyIDTo1UpDown.Name = "PolyIDTo1UpDown";
this.PolyIDTo1UpDown.Size = new System.Drawing.Size(71, 20);
this.PolyIDTo1UpDown.TabIndex = 27;
this.PolyIDTo1UpDown.ValueChanged += new System.EventHandler(this.PolyIDTo1UpDown_ValueChanged);
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(181, 118);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(69, 13);
this.label4.TabIndex = 26;
this.label4.Text = "To Poly ID 1:";
//
// PolyIDFrom1UpDown
//
this.PolyIDFrom1UpDown.Location = new System.Drawing.Point(96, 116);
this.PolyIDFrom1UpDown.Maximum = new decimal(new int[] {
65535,
0,
0,
0});
this.PolyIDFrom1UpDown.Name = "PolyIDFrom1UpDown";
this.PolyIDFrom1UpDown.Size = new System.Drawing.Size(71, 20);
this.PolyIDFrom1UpDown.TabIndex = 25;
this.PolyIDFrom1UpDown.ValueChanged += new System.EventHandler(this.PolyIDFrom1UpDown_ValueChanged);
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(11, 118);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(79, 13);
this.label5.TabIndex = 24;
this.label5.Text = "From Poly ID 1:";
//
// PolyIDTo2UpDown
//
this.PolyIDTo2UpDown.Location = new System.Drawing.Point(256, 142);
this.PolyIDTo2UpDown.Maximum = new decimal(new int[] {
65535,
0,
0,
0});
this.PolyIDTo2UpDown.Name = "PolyIDTo2UpDown";
this.PolyIDTo2UpDown.Size = new System.Drawing.Size(71, 20);
this.PolyIDTo2UpDown.TabIndex = 31;
this.PolyIDTo2UpDown.ValueChanged += new System.EventHandler(this.PolyIDTo2UpDown_ValueChanged);
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(181, 144);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(69, 13);
this.label6.TabIndex = 30;
this.label6.Text = "To Poly ID 2:";
//
// PolyIDFrom2UpDown
//
this.PolyIDFrom2UpDown.Location = new System.Drawing.Point(96, 142);
this.PolyIDFrom2UpDown.Maximum = new decimal(new int[] {
65535,
0,
0,
0});
this.PolyIDFrom2UpDown.Name = "PolyIDFrom2UpDown";
this.PolyIDFrom2UpDown.Size = new System.Drawing.Size(71, 20);
this.PolyIDFrom2UpDown.TabIndex = 29;
this.PolyIDFrom2UpDown.ValueChanged += new System.EventHandler(this.PolyIDFrom2UpDown_ValueChanged);
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(11, 144);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(79, 13);
this.label7.TabIndex = 28;
this.label7.Text = "From Poly ID 2:";
//
// Unk2UpDown
//
this.Unk2UpDown.Location = new System.Drawing.Point(256, 168);
this.Unk2UpDown.Maximum = new decimal(new int[] {
255,
0,
0,
0});
this.Unk2UpDown.Name = "Unk2UpDown";
this.Unk2UpDown.Size = new System.Drawing.Size(71, 20);
this.Unk2UpDown.TabIndex = 35;
this.Unk2UpDown.ValueChanged += new System.EventHandler(this.Unk2UpDown_ValueChanged);
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(211, 170);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(39, 13);
this.label8.TabIndex = 34;
this.label8.Text = "Unk 2:";
//
// Unk1UpDown
//
this.Unk1UpDown.Location = new System.Drawing.Point(96, 168);
this.Unk1UpDown.Maximum = new decimal(new int[] {
65535,
0,
0,
0});
this.Unk1UpDown.Name = "Unk1UpDown";
this.Unk1UpDown.Size = new System.Drawing.Size(71, 20);
this.Unk1UpDown.TabIndex = 33;
this.Unk1UpDown.ValueChanged += new System.EventHandler(this.Unk1UpDown_ValueChanged);
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(51, 170);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(39, 13);
this.label9.TabIndex = 32;
this.label9.Text = "Unk 1:";
//
// EditYnvPortalPanel
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(454, 295);
this.Controls.Add(this.Unk2UpDown);
this.Controls.Add(this.label8);
this.Controls.Add(this.Unk1UpDown);
this.Controls.Add(this.label9);
this.Controls.Add(this.PolyIDTo2UpDown);
this.Controls.Add(this.label6);
this.Controls.Add(this.PolyIDFrom2UpDown);
this.Controls.Add(this.label7);
this.Controls.Add(this.PolyIDTo1UpDown);
this.Controls.Add(this.label4);
this.Controls.Add(this.PolyIDFrom1UpDown);
this.Controls.Add(this.label5);
this.Controls.Add(this.AreaIDToUpDown);
this.Controls.Add(this.label3);
this.Controls.Add(this.AreaIDFromUpDown);
this.Controls.Add(this.label92);
this.Controls.Add(this.PositionToTextBox);
this.Controls.Add(this.label2);
this.Controls.Add(this.AngleUpDown);
this.Controls.Add(this.label1);
this.Controls.Add(this.TypeUpDown);
this.Controls.Add(this.label49);
this.Controls.Add(this.DeletePortalButton);
this.Controls.Add(this.AddToProjectButton);
this.Controls.Add(this.GoToButton);
this.Controls.Add(this.PositionFromTextBox);
this.Controls.Add(this.label55);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "EditYnvPortalPanel";
this.Text = "Edit Ynv Portal";
((System.ComponentModel.ISupportInitialize)(this.AngleUpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.TypeUpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.AreaIDFromUpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.AreaIDToUpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.PolyIDTo1UpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.PolyIDFrom1UpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.PolyIDTo2UpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.PolyIDFrom2UpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.Unk2UpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.Unk1UpDown)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.NumericUpDown AngleUpDown;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.NumericUpDown TypeUpDown;
private System.Windows.Forms.Label label49;
private System.Windows.Forms.Button DeletePortalButton;
private System.Windows.Forms.Button AddToProjectButton;
private System.Windows.Forms.Button GoToButton;
private System.Windows.Forms.TextBox PositionFromTextBox;
private System.Windows.Forms.Label label55;
private System.Windows.Forms.TextBox PositionToTextBox;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.NumericUpDown AreaIDFromUpDown;
private System.Windows.Forms.Label label92;
private System.Windows.Forms.NumericUpDown AreaIDToUpDown;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.NumericUpDown PolyIDTo1UpDown;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.NumericUpDown PolyIDFrom1UpDown;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.NumericUpDown PolyIDTo2UpDown;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.NumericUpDown PolyIDFrom2UpDown;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.NumericUpDown Unk2UpDown;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.NumericUpDown Unk1UpDown;
private System.Windows.Forms.Label label9;
}
}

View File

@ -0,0 +1,311 @@
using CodeWalker.GameFiles;
using SharpDX;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CodeWalker.Project.Panels
{
public partial class EditYnvPortalPanel : ProjectPanel
{
public ProjectForm ProjectForm;
public YnvPortal YnvPortal { get; set; }
private bool populatingui = false;
public EditYnvPortalPanel(ProjectForm projectForm)
{
ProjectForm = projectForm;
InitializeComponent();
}
public void SetYnvPortal(YnvPortal ynvPortal)
{
YnvPortal = ynvPortal;
Tag = ynvPortal;
UpdateFormTitle();
UpdateYnvPortalUI();
}
private void UpdateFormTitle()
{
Text = "Nav Portal " + YnvPortal.Index.ToString();
}
public void UpdateYnvPortalUI()
{
if (YnvPortal == null)
{
DeletePortalButton.Enabled = false;
AddToProjectButton.Enabled = false;
PositionFromTextBox.Text = string.Empty;
PositionToTextBox.Text = string.Empty;
AngleUpDown.Value = 0;
TypeUpDown.Value = 0;
AreaIDFromUpDown.Value = 0;
AreaIDToUpDown.Value = 0;
PolyIDFrom1UpDown.Value = 0;
PolyIDTo1UpDown.Value = 0;
PolyIDFrom2UpDown.Value = 0;
PolyIDTo2UpDown.Value = 0;
Unk1UpDown.Value = 0;
Unk2UpDown.Value = 0;
}
else
{
populatingui = true;
DeletePortalButton.Enabled = ProjectForm.YnvExistsInProject(YnvPortal.Ynv);
AddToProjectButton.Enabled = !DeletePortalButton.Enabled;
PositionFromTextBox.Text = FloatUtil.GetVector3String(YnvPortal.PositionFrom);
PositionToTextBox.Text = FloatUtil.GetVector3String(YnvPortal.PositionTo);
AngleUpDown.Value = YnvPortal.Angle;
TypeUpDown.Value = YnvPortal.Type;
AreaIDFromUpDown.Value = YnvPortal.AreaIDFrom;
AreaIDToUpDown.Value = YnvPortal.AreaIDTo;
PolyIDFrom1UpDown.Value = YnvPortal.PolyIDFrom1;
PolyIDTo1UpDown.Value = YnvPortal.PolyIDTo1;
PolyIDFrom2UpDown.Value = YnvPortal.PolyIDFrom2;
PolyIDTo2UpDown.Value = YnvPortal.PolyIDTo2;
Unk1UpDown.Value = YnvPortal.Unk1;
Unk2UpDown.Value = YnvPortal.Unk2;
populatingui = false;
}
}
private void PositionFromTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (YnvPortal == null) return;
Vector3 v = FloatUtil.ParseVector3String(PositionFromTextBox.Text);
bool change = false;
lock (ProjectForm.ProjectSyncRoot)
{
if (YnvPortal.PositionFrom != v)
{
YnvPortal.PositionFrom = v;
ProjectForm.SetYnvHasChanged(true);
change = true;
}
}
if (change)
{
if (ProjectForm.WorldForm != null)
{
ProjectForm.WorldForm.SetWidgetPosition(YnvPortal.Position);
ProjectForm.WorldForm.UpdateNavPortalGraphics(YnvPortal, false);
}
}
}
private void PositionToTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (YnvPortal == null) return;
Vector3 v = FloatUtil.ParseVector3String(PositionToTextBox.Text);
bool change = false;
lock (ProjectForm.ProjectSyncRoot)
{
if (YnvPortal.PositionTo != v)
{
YnvPortal.PositionTo = v;
ProjectForm.SetYnvHasChanged(true);
change = true;
}
}
if (change)
{
if (ProjectForm.WorldForm != null)
{
ProjectForm.WorldForm.SetWidgetPosition(YnvPortal.Position);
ProjectForm.WorldForm.UpdateNavPortalGraphics(YnvPortal, false);
}
}
}
private void AngleUpDown_ValueChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (YnvPortal == null) return;
byte ang = (byte)AngleUpDown.Value;
bool change = false;
lock (ProjectForm.ProjectSyncRoot)
{
if (YnvPortal.Angle != ang)
{
YnvPortal.Angle = ang;
ProjectForm.SetYnvHasChanged(true);
change = true;
}
}
if (change)
{
if (ProjectForm.WorldForm != null)
{
ProjectForm.WorldForm.SetWidgetRotation(YnvPortal.Orientation);
//ProjectForm.WorldForm.UpdateNavPortalGraphics(YnvPortal, false);
}
}
}
private void TypeUpDown_ValueChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (YnvPortal == null) return;
byte typ = (byte)TypeUpDown.Value;
lock (ProjectForm.ProjectSyncRoot)
{
if (YnvPortal.Type != typ)
{
YnvPortal.Type = typ;
ProjectForm.SetYnvHasChanged(true);
}
}
}
private void AreaIDFromUpDown_ValueChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (YnvPortal == null) return;
ushort id = (ushort)AreaIDFromUpDown.Value;
lock (ProjectForm.ProjectSyncRoot)
{
if (YnvPortal.AreaIDFrom != id)
{
YnvPortal.AreaIDFrom = id;
ProjectForm.SetYnvHasChanged(true);
}
}
}
private void AreaIDToUpDown_ValueChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (YnvPortal == null) return;
ushort id = (ushort)AreaIDToUpDown.Value;
lock (ProjectForm.ProjectSyncRoot)
{
if (YnvPortal.AreaIDTo != id)
{
YnvPortal.AreaIDTo = id;
ProjectForm.SetYnvHasChanged(true);
}
}
}
private void PolyIDFrom1UpDown_ValueChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (YnvPortal == null) return;
ushort id = (ushort)PolyIDFrom1UpDown.Value;
lock (ProjectForm.ProjectSyncRoot)
{
if (YnvPortal.PolyIDFrom1 != id)
{
YnvPortal.PolyIDFrom1 = id;
ProjectForm.SetYnvHasChanged(true);
}
}
}
private void PolyIDTo1UpDown_ValueChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (YnvPortal == null) return;
ushort id = (ushort)PolyIDTo1UpDown.Value;
lock (ProjectForm.ProjectSyncRoot)
{
if (YnvPortal.PolyIDTo1 != id)
{
YnvPortal.PolyIDTo1 = id;
ProjectForm.SetYnvHasChanged(true);
}
}
}
private void PolyIDFrom2UpDown_ValueChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (YnvPortal == null) return;
ushort id = (ushort)PolyIDFrom2UpDown.Value;
lock (ProjectForm.ProjectSyncRoot)
{
if (YnvPortal.PolyIDFrom2 != id)
{
YnvPortal.PolyIDFrom2 = id;
ProjectForm.SetYnvHasChanged(true);
}
}
}
private void PolyIDTo2UpDown_ValueChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (YnvPortal == null) return;
ushort id = (ushort)PolyIDTo2UpDown.Value;
lock (ProjectForm.ProjectSyncRoot)
{
if (YnvPortal.PolyIDTo2 != id)
{
YnvPortal.PolyIDTo2 = id;
ProjectForm.SetYnvHasChanged(true);
}
}
}
private void Unk1UpDown_ValueChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (YnvPortal == null) return;
ushort unk = (ushort)Unk1UpDown.Value;
lock (ProjectForm.ProjectSyncRoot)
{
if (YnvPortal.Unk1 != unk)
{
YnvPortal.Unk1 = unk;
ProjectForm.SetYnvHasChanged(true);
}
}
}
private void Unk2UpDown_ValueChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (YnvPortal == null) return;
byte unk = (byte)Unk2UpDown.Value;
lock (ProjectForm.ProjectSyncRoot)
{
if (YnvPortal.Unk2 != unk)
{
YnvPortal.Unk2 = unk;
ProjectForm.SetYnvHasChanged(true);
}
}
}
private void GoToButton_Click(object sender, EventArgs e)
{
if (YnvPortal == null) return;
if (ProjectForm.WorldForm == null) return;
ProjectForm.WorldForm.GoToPosition(YnvPortal.Position);
}
private void AddToProjectButton_Click(object sender, EventArgs e)
{
if (YnvPortal == null) return;
ProjectForm.SetProjectItem(YnvPortal);
ProjectForm.AddYnvToProject(YnvPortal.Ynv);
}
private void DeletePortalButton_Click(object sender, EventArgs e)
{
MessageBox.Show("Delete Portal TODO!");
}
}
}

View File

@ -0,0 +1,409 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAMAICAAA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P///+D////g8//D4MH/geCB/4Dggf+A4IH/wOCD/+DAB//hgAf//gAP//wAAB/AAAAPwAAAD8AAAA/AA
AAfjAAEHgYADAQPgBwEDEAEBAghgAQwIIEH8CCB//Bggf/wYMH/8ODD///h/////////////KAAAABAA
AAAgAAAAAQAYAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///+vv/fL1/v///wAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///4+Vx7/F5v///wAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAP///4CHtrS62////////////////////wAAAAAAAAAAAP////H0/vf6/v//
/////////4yTwrrB4f///+zw+7rA6P39/////wAAAAAAAAAAAP///56l2BkcguXr/P///////42Uw8jO
6P///ysvjWVqtP///////wAAAAAAAAAAAP////D0/0hPpsDG6////////6y02d7k8////3qAx+/z/f//
/wAAAAAAAAAAAAAAAAAAAP///////////////8zT8V5ns1Rcrdzh9f///////////wAAAAAAAAAAAAAA
AAAAAP////////7+/6ix3nmBxFthtmdwu09WqbC54/v9//r8//j6//39/wAAAAAAAAAAAOjt/H6I0FJc
skpSqHF+wRMahFZhs4iT1AsNc1pgrm52v2RsuO/z/gAAAP////////L2/cLJ7rrD64+V4DY+ozU+mYmU
0X2Hy1hfss7V8urv/PP2/v///wAAAP///+Pp+d/k9////////+Pp/4uR3ysymW14xYOM0fD0/P///+Xq
+ri/6Pj6/wAAAOrv/j5DnbS75P////////////X4/+/0/ubr+/r7/////////9rh+hgZhKGo2QAAAPDz
/eLn+f////j6/2Nqttrg9////+Hn+P3+//3+/1hescLJ6/////L2/eru/AAAAAAAAAAAAP///8rR70tR
p/3+//v8/zY6jNPY7////09WqWpwu////wAAAAAAAAAAAAAAAAAAAAAAAPb4/vr7//////v8/5Wd1e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af////////wB/////////AH////////8Af////////wB///////
//AH////////8Af////////wB/////////AH////////8AfwP//////wB8Af//+Af/AHgB///wA/8AcA
H///AB/wBgAf//8AD/AGAB///wAH8AYAH///AAPwBAAf//8AA/AEAD///wAD8AQAP///AAPwBAB///+A
A/AEAP///8AD4AAA////4AcAAAH////wDgAAAf/////8AAAH//////gAAAf/////4AAAAf/////gAAAA
/f//+AAAAAAAD//AAAAAAAAH/4AAAAAAAAf/gAAAAAAAB/+AAAAAAAAH/4AAAAAAAAf/gAAAAAAAB/+A
AAAAAAAP/4AAAAAAAB//wAAAAABAf/4HwAAAAYAf8APAAAADgA/gA+AAAAMAA8AD8AAABwADgAP8AAAf
AAOAA/4AAB8AA4ADAAAAAQADgAIAcA4AgAOABgBwDgBAA4AMAGAMADADwDwAYAwAOAfg+ABgBAAeH//4
AEAEAB////gAwAYAH///+ADABgAf///4AcAGAB////gBwAcAH///+APAB4A////8B+AHwH//////4A//
///////gD/////////Af//////////////8=
</value>
</data>
</root>

View File

@ -274,6 +274,10 @@ namespace CodeWalker.Project.Panels
n.Name = "EditPortal"; n.Name = "EditPortal";
n.Tag = ynv; //this tag should get updated with the selected portal! n.Tag = ynv; //this tag should get updated with the selected portal!
n = node.Nodes.Add("Edit Point");
n.Name = "EditPoint";
n.Tag = ynv; //this tag should get updated with the selected point!
} }
private void LoadTrainTrackTreeNodes(TrainTrack track, TreeNode node) private void LoadTrainTrackTreeNodes(TrainTrack track, TreeNode node)
@ -640,6 +644,36 @@ namespace CodeWalker.Project.Panels
//} //}
//return null; //return null;
} }
public TreeNode FindNavPointTreeNode(YnvPoint p)
{
if (p == null) return null;
TreeNode ynvnode = FindYnvTreeNode(p.Ynv);
var pointnode = GetChildTreeNode(ynvnode, "EditPoint");
if (pointnode == null) return null;
pointnode.Tag = p;
return pointnode;
//for (int i = 0; i < pointsnode.Nodes.Count; i++)
//{
// TreeNode pnode = pointsnode.Nodes[i];
// if (pnode.Tag == p) return pnode;
//}
//return null;
}
public TreeNode FindNavPortalTreeNode(YnvPortal p)
{
if (p == null) return null;
TreeNode ynvnode = FindYnvTreeNode(p.Ynv);
var portalnode = GetChildTreeNode(ynvnode, "EditPortal");
if (portalnode == null) return null;
portalnode.Tag = p;
return portalnode;
//for (int i = 0; i < portalsnode.Nodes.Count; i++)
//{
// TreeNode pnode = portalsnode.Nodes[i];
// if (pnode.Tag == p) return pnode;
//}
//return null;
}
public TreeNode FindTrainTrackTreeNode(TrainTrack track) public TreeNode FindTrainTrackTreeNode(TrainTrack track)
{ {
if (ProjectTreeView.Nodes.Count <= 0) return null; if (ProjectTreeView.Nodes.Count <= 0) return null;
@ -769,6 +803,44 @@ namespace CodeWalker.Project.Panels
} }
} }
} }
public void TrySelectNavPointTreeNode(YnvPoint point)
{
TreeNode tnode = FindNavPointTreeNode(point);
if (tnode == null)
{
tnode = FindYnvTreeNode(point?.Ynv);
}
if (tnode != null)
{
if (ProjectTreeView.SelectedNode == tnode)
{
OnItemSelected?.Invoke(point);
}
else
{
ProjectTreeView.SelectedNode = tnode;
}
}
}
public void TrySelectNavPortalTreeNode(YnvPortal portal)
{
TreeNode tnode = FindNavPortalTreeNode(portal);
if (tnode == null)
{
tnode = FindYnvTreeNode(portal?.Ynv);
}
if (tnode != null)
{
if (ProjectTreeView.SelectedNode == tnode)
{
OnItemSelected?.Invoke(portal);
}
else
{
ProjectTreeView.SelectedNode = tnode;
}
}
}
public void TrySelectTrainNodeTreeNode(TrainTrackNode node) public void TrySelectTrainNodeTreeNode(TrainTrackNode node)
{ {
TreeNode tnode = FindTrainNodeTreeNode(node); TreeNode tnode = FindTrainNodeTreeNode(node);

View File

@ -50,6 +50,8 @@ namespace CodeWalker.Project
private YnvFile CurrentYnvFile; private YnvFile CurrentYnvFile;
private YnvPoly CurrentNavPoly; private YnvPoly CurrentNavPoly;
private YnvPoint CurrentNavPoint;
private YnvPortal CurrentNavPortal;
private TrainTrack CurrentTrainTrack; private TrainTrack CurrentTrainTrack;
private TrainTrackNode CurrentTrainNode; private TrainTrackNode CurrentTrainNode;
@ -373,6 +375,20 @@ namespace CodeWalker.Project
(panel) => { panel.SetYnvPoly(CurrentNavPoly); }, //updateFunc (panel) => { panel.SetYnvPoly(CurrentNavPoly); }, //updateFunc
(panel) => { return panel.YnvPoly == CurrentNavPoly; }); //findFunc (panel) => { return panel.YnvPoly == CurrentNavPoly; }); //findFunc
} }
private void ShowEditYnvPointPanel(bool promote)
{
ShowPanel(promote,
() => { return new EditYnvPointPanel(this); }, //createFunc
(panel) => { panel.SetYnvPoint(CurrentNavPoint); }, //updateFunc
(panel) => { return panel.YnvPoint == CurrentNavPoint; }); //findFunc
}
private void ShowEditYnvPortalPanel(bool promote)
{
ShowPanel(promote,
() => { return new EditYnvPortalPanel(this); }, //createFunc
(panel) => { panel.SetYnvPortal(CurrentNavPortal); }, //updateFunc
(panel) => { return panel.YnvPortal == CurrentNavPortal; }); //findFunc
}
private void ShowEditTrainTrackPanel(bool promote) private void ShowEditTrainTrackPanel(bool promote)
{ {
ShowPanel(promote, ShowPanel(promote,
@ -436,6 +452,14 @@ namespace CodeWalker.Project
{ {
ShowEditYnvPolyPanel(promote); ShowEditYnvPolyPanel(promote);
} }
else if (CurrentNavPoint != null)
{
ShowEditYnvPointPanel(promote);
}
else if (CurrentNavPortal != null)
{
ShowEditYnvPortalPanel(promote);
}
else if (CurrentYnvFile != null) else if (CurrentYnvFile != null)
{ {
ShowEditYnvPanel(promote); ShowEditYnvPanel(promote);
@ -485,6 +509,8 @@ namespace CodeWalker.Project
CurrentPathNode = item as YndNode; CurrentPathNode = item as YndNode;
CurrentYnvFile = item as YnvFile; CurrentYnvFile = item as YnvFile;
CurrentNavPoly = item as YnvPoly; CurrentNavPoly = item as YnvPoly;
CurrentNavPoint = item as YnvPoint;
CurrentNavPortal = item as YnvPortal;
CurrentTrainTrack = item as TrainTrack; CurrentTrainTrack = item as TrainTrack;
CurrentTrainNode = item as TrainTrackNode; CurrentTrainNode = item as TrainTrackNode;
CurrentScenario = item as YmtFile; CurrentScenario = item as YmtFile;
@ -511,6 +537,14 @@ namespace CodeWalker.Project
{ {
CurrentYnvFile = CurrentNavPoly.Ynv; CurrentYnvFile = CurrentNavPoly.Ynv;
} }
if (CurrentNavPoint != null)
{
CurrentYnvFile = CurrentNavPoint.Ynv;
}
if (CurrentNavPortal != null)
{
CurrentYnvFile = CurrentNavPortal.Ynv;
}
if (CurrentTrainNode != null) if (CurrentTrainNode != null)
{ {
CurrentTrainTrack = CurrentTrainNode.Track; CurrentTrainTrack = CurrentTrainNode.Track;
@ -2165,6 +2199,30 @@ namespace CodeWalker.Project
return poly == CurrentNavPoly; return poly == CurrentNavPoly;
} }
public void NewNavPoint(YnvPoint copy = null, bool copyposition = false)//TODO!
{
}
public bool DeleteNavPoint()//TODO!
{
return false;
}
public bool IsCurrentNavPoint(YnvPoint point)
{
return point == CurrentNavPoint;
}
public void NewNavPortal(YnvPortal copy = null, bool copyposition = false)//TODO!
{
}
public bool DeleteNavPortal()//TODO!
{
return false;
}
public bool IsCurrentNavPortal(YnvPortal portal)
{
return portal == CurrentNavPortal;
}
public void NewTrainTrack() public void NewTrainTrack()
@ -3759,12 +3817,14 @@ namespace CodeWalker.Project
var pathnode = sel.PathNode; var pathnode = sel.PathNode;
var pathlink = sel.PathLink; var pathlink = sel.PathLink;
var navpoly = sel.NavPoly; var navpoly = sel.NavPoly;
var navpoint = sel.NavPoint;
var navportal = sel.NavPortal;
var trainnode = sel.TrainTrackNode; var trainnode = sel.TrainTrackNode;
var scenariond = sel.ScenarioNode; var scenariond = sel.ScenarioNode;
var scenarioedge = sel.ScenarioEdge; var scenarioedge = sel.ScenarioEdge;
YmapFile ymap = ent?.Ymap ?? cargen?.Ymap ?? grassbatch?.Ymap; YmapFile ymap = ent?.Ymap ?? cargen?.Ymap ?? grassbatch?.Ymap;
YndFile ynd = pathnode?.Ynd; YndFile ynd = pathnode?.Ynd;
YnvFile ynv = navpoly?.Ynv; YnvFile ynv = navpoly?.Ynv ?? navpoint?.Ynv ?? navportal?.Ynv;
TrainTrack traintrack = trainnode?.Track; TrainTrack traintrack = trainnode?.Track;
YmtFile scenario = scenariond?.Ymt ?? scenarioedge?.Region?.Ymt; YmtFile scenario = scenariond?.Ymt ?? scenarioedge?.Region?.Ymt;
bool showcurrent = false; bool showcurrent = false;
@ -3793,6 +3853,14 @@ namespace CodeWalker.Project
{ {
ProjectExplorer?.TrySelectNavPolyTreeNode(navpoly); ProjectExplorer?.TrySelectNavPolyTreeNode(navpoly);
} }
if (navpoint != CurrentNavPoint)
{
ProjectExplorer?.TrySelectNavPointTreeNode(navpoint);
}
if (navportal != CurrentNavPortal)
{
ProjectExplorer?.TrySelectNavPortalTreeNode(navportal);
}
} }
else if (TrainTrackExistsInProject(traintrack)) else if (TrainTrackExistsInProject(traintrack))
{ {
@ -3825,6 +3893,8 @@ namespace CodeWalker.Project
CurrentPathLink = pathlink; CurrentPathLink = pathlink;
CurrentYnvFile = ynv; CurrentYnvFile = ynv;
CurrentNavPoly = navpoly; CurrentNavPoly = navpoly;
CurrentNavPoint = navpoint;
CurrentNavPortal = navportal;
CurrentTrainTrack = traintrack; CurrentTrainTrack = traintrack;
CurrentTrainNode = trainnode; CurrentTrainNode = trainnode;
CurrentScenario = scenario; CurrentScenario = scenario;
@ -3863,6 +3933,14 @@ namespace CodeWalker.Project
{ {
OnWorldNavPolyModified(sel.NavPoly); OnWorldNavPolyModified(sel.NavPoly);
} }
else if (sel.NavPoint != null)
{
OnWorldNavPointModified(sel.NavPoint);
}
else if (sel.NavPortal != null)
{
OnWorldNavPortalModified(sel.NavPortal);
}
else if (sel.TrainTrackNode != null) else if (sel.TrainTrackNode != null)
{ {
OnWorldTrainNodeModified(sel.TrainTrackNode); OnWorldTrainNodeModified(sel.TrainTrackNode);
@ -4064,6 +4142,98 @@ namespace CodeWalker.Project
} }
catch { } catch { }
} }
private void OnWorldNavPointModified(YnvPoint point)
{
try
{
if (InvokeRequired)
{
BeginInvoke(new Action(() => { OnWorldNavPointModified(point); }));
}
else
{
if (point?.Ynv == null) return;
if (CurrentProjectFile == null)
{
NewProject();
}
if (!YnvExistsInProject(point.Ynv))
{
point.Ynv.HasChanged = true;
AddYnvToProject(point.Ynv);
ProjectExplorer?.TrySelectNavPointTreeNode(point);
}
if (point != CurrentNavPoint)
{
CurrentNavPoint = point;
ProjectExplorer?.TrySelectNavPointTreeNode(point);
}
if (point == CurrentNavPoint)
{
ShowEditYnvPointPanel(false);
//////UpdateNavPointTreeNode(poly);
if (point.Ynv != null)
{
SetYnvHasChanged(true);
}
}
}
}
catch { }
}
private void OnWorldNavPortalModified(YnvPortal portal)
{
try
{
if (InvokeRequired)
{
BeginInvoke(new Action(() => { OnWorldNavPortalModified(portal); }));
}
else
{
if (portal?.Ynv == null) return;
if (CurrentProjectFile == null)
{
NewProject();
}
if (!YnvExistsInProject(portal.Ynv))
{
portal.Ynv.HasChanged = true;
AddYnvToProject(portal.Ynv);
ProjectExplorer?.TrySelectNavPortalTreeNode(portal);
}
if (portal != CurrentNavPortal)
{
CurrentNavPortal = portal;
ProjectExplorer?.TrySelectNavPortalTreeNode(portal);
}
if (portal == CurrentNavPortal)
{
ShowEditYnvPortalPanel(false);
//////UpdateNavPortalTreeNode(poly);
if (portal.Ynv != null)
{
SetYnvHasChanged(true);
}
}
}
}
catch { }
}
private void OnWorldTrainNodeModified(TrainTrackNode node) private void OnWorldTrainNodeModified(TrainTrackNode node)
{ {
try try

View File

@ -62,6 +62,7 @@ namespace CodeWalker.Project
{ {
Dictionary<YndFile, int> pathYnds = new Dictionary<YndFile, int>(); Dictionary<YndFile, int> pathYnds = new Dictionary<YndFile, int>();
Dictionary<YnvFile, int> navYnvs = new Dictionary<YnvFile, int>();
Dictionary<TrainTrack, int> trainTracks = new Dictionary<TrainTrack, int>(); Dictionary<TrainTrack, int> trainTracks = new Dictionary<TrainTrack, int>();
Dictionary<YmtFile, int> scenarioYmts = new Dictionary<YmtFile, int>(); Dictionary<YmtFile, int> scenarioYmts = new Dictionary<YmtFile, int>();
@ -73,6 +74,18 @@ namespace CodeWalker.Project
{ {
pathYnds[item.PathNode.Ynd] = 1; pathYnds[item.PathNode.Ynd] = 1;
} }
if (item.NavPoly != null)
{
navYnvs[item.NavPoly.Ynv] = 1;
}
if (item.NavPoint != null)
{
navYnvs[item.NavPoint.Ynv] = 1;
}
if (item.NavPortal != null)
{
navYnvs[item.NavPortal.Ynv] = 1;
}
if (item.TrainTrackNode != null) if (item.TrainTrackNode != null)
{ {
trainTracks[item.TrainTrackNode.Track] = 1; trainTracks[item.TrainTrackNode.Track] = 1;
@ -88,6 +101,10 @@ namespace CodeWalker.Project
{ {
wf.UpdatePathYndGraphics(kvp.Key, true); wf.UpdatePathYndGraphics(kvp.Key, true);
} }
foreach (var kvp in navYnvs)
{
wf.UpdateNavYnvGraphics(kvp.Key, true);
}
foreach (var kvp in trainTracks) foreach (var kvp in trainTracks)
{ {
wf.UpdateTrainTrackGraphics(kvp.Key, false); wf.UpdateTrainTrackGraphics(kvp.Key, false);
@ -491,6 +508,222 @@ namespace CodeWalker.Project
} }
public class NavPointPositionUndoStep : UndoStep
{
public YnvPoint Point { get; set; }
public Vector3 StartPosition { get; set; }
public Vector3 EndPosition { get; set; }
public NavPointPositionUndoStep(YnvPoint point, Vector3 startpos, WorldForm wf)
{
Point = point;
StartPosition = startpos;
EndPosition = point?.Position ?? Vector3.Zero;
UpdateGraphics(wf); //forces the update of the path graphics when it's moved...
}
private void Update(WorldForm wf, ref MapSelection sel, Vector3 p)
{
Point?.SetPosition(p);
if (Point != sel.NavPoint)
{
wf.SelectNavPoint(Point);
}
wf.SetWidgetPosition(p);
UpdateGraphics(wf);
}
private void UpdateGraphics(WorldForm wf)
{
if (Point != null)
{
//Ynv graphics needs to be updated.....
wf.UpdateNavYnvGraphics(Point.Ynv, false);
}
}
public override void Undo(WorldForm wf, ref MapSelection sel)
{
Update(wf, ref sel, StartPosition);
}
public override void Redo(WorldForm wf, ref MapSelection sel)
{
Update(wf, ref sel, EndPosition);
}
public override string ToString()
{
return "NavPoint " + (Point?.ToString() ?? "") + ": Position";
}
}
public class NavPointRotationUndoStep : UndoStep
{
public YnvPoint Point { get; set; }
public Quaternion StartRotation { get; set; }
public Quaternion EndRotation { get; set; }
public NavPointRotationUndoStep(YnvPoint point, Quaternion startrot, WorldForm wf)
{
Point = point;
StartRotation = startrot;
EndRotation = point?.Orientation ?? Quaternion.Identity;
//UpdateGraphics(wf);
}
private void Update(WorldForm wf, ref MapSelection sel, Quaternion q)
{
Point?.SetOrientation(q);
if (Point != sel.NavPoint) wf.SelectNavPoint(Point);
wf.SetWidgetRotation(q);
//UpdateGraphics(wf);
}
private void UpdateGraphics(WorldForm wf)
{
////this function shouldn't actually be needed for rotating...
//if (Point != null)
//{
// //Ynv graphics needs to be updated.....
// wf.UpdateNavYnvGraphics(Point.Ynv, false);
//}
}
public override void Undo(WorldForm wf, ref MapSelection sel)
{
Update(wf, ref sel, StartRotation);
}
public override void Redo(WorldForm wf, ref MapSelection sel)
{
Update(wf, ref sel, EndRotation);
}
public override string ToString()
{
return "NavPoint " + (Point?.ToString() ?? "") + ": Rotation";
}
}
public class NavPortalPositionUndoStep : UndoStep
{
public YnvPortal Portal { get; set; }
public Vector3 StartPosition { get; set; }
public Vector3 EndPosition { get; set; }
public NavPortalPositionUndoStep(YnvPortal portal, Vector3 startpos, WorldForm wf)
{
Portal = portal;
StartPosition = startpos;
EndPosition = portal?.Position ?? Vector3.Zero;
UpdateGraphics(wf); //forces the update of the path graphics when it's moved...
}
private void Update(WorldForm wf, ref MapSelection sel, Vector3 p)
{
Portal?.SetPosition(p);
if (Portal != sel.NavPortal)
{
wf.SelectNavPortal(Portal);
}
wf.SetWidgetPosition(p);
UpdateGraphics(wf);
}
private void UpdateGraphics(WorldForm wf)
{
if (Portal != null)
{
//Ynv graphics needs to be updated.....
wf.UpdateNavYnvGraphics(Portal.Ynv, false);
}
}
public override void Undo(WorldForm wf, ref MapSelection sel)
{
Update(wf, ref sel, StartPosition);
}
public override void Redo(WorldForm wf, ref MapSelection sel)
{
Update(wf, ref sel, EndPosition);
}
public override string ToString()
{
return "NavPortal " + (Portal?.ToString() ?? "") + ": Position";
}
}
public class NavPortalRotationUndoStep : UndoStep
{
public YnvPortal Portal { get; set; }
public Quaternion StartRotation { get; set; }
public Quaternion EndRotation { get; set; }
public NavPortalRotationUndoStep(YnvPortal portal, Quaternion startrot, WorldForm wf)
{
Portal = portal;
StartRotation = startrot;
EndRotation = portal?.Orientation ?? Quaternion.Identity;
//UpdateGraphics(wf);
}
private void Update(WorldForm wf, ref MapSelection sel, Quaternion q)
{
Portal?.SetOrientation(q);
if (Portal != sel.NavPortal) wf.SelectNavPortal(Portal);
wf.SetWidgetRotation(q);
//UpdateGraphics(wf);
}
private void UpdateGraphics(WorldForm wf)
{
////this function shouldn't actually be needed for rotating...
//if (Point != null)
//{
// //Ynv graphics needs to be updated.....
// wf.UpdateNavYnvGraphics(Point.Ynv, false);
//}
}
public override void Undo(WorldForm wf, ref MapSelection sel)
{
Update(wf, ref sel, StartRotation);
}
public override void Redo(WorldForm wf, ref MapSelection sel)
{
Update(wf, ref sel, EndRotation);
}
public override string ToString()
{
return "NavPortal " + (Portal?.ToString() ?? "") + ": Rotation";
}
}
public class TrainTrackNodePositionUndoStep : UndoStep public class TrainTrackNodePositionUndoStep : UndoStep
{ {
public TrainTrackNode Node { get; set; } public TrainTrackNode Node { get; set; }

View File

@ -71,6 +71,7 @@ namespace CodeWalker.Rendering
//#endif //#endif
Device dev = null; Device dev = null;
SwapChain sc = null; SwapChain sc = null;
Exception exc = null;
bool success = false; bool success = false;
try try
@ -78,7 +79,7 @@ namespace CodeWalker.Rendering
Device.CreateWithSwapChain(DriverType.Hardware, flags, levels, scd, out dev, out sc); Device.CreateWithSwapChain(DriverType.Hardware, flags, levels, scd, out dev, out sc);
success = true; success = true;
} }
catch { } catch(Exception ex) { exc = ex; }
if (!success) if (!success)
{ {
@ -90,12 +91,17 @@ namespace CodeWalker.Rendering
Device.CreateWithSwapChain(DriverType.Hardware, flags, levels, scd, out dev, out sc); Device.CreateWithSwapChain(DriverType.Hardware, flags, levels, scd, out dev, out sc);
success = true; success = true;
} }
catch { } catch (Exception ex) { exc = ex; }
} }
if (!success) if (!success)
{ {
throw new Exception("CodeWalker was unable to initialise the graphics device. Please ensure your system meets the minimum requirements and that your graphics drivers and DirectX are up to date."); var msg = "CodeWalker was unable to initialise the graphics device. Please ensure your system meets the minimum requirements and that your graphics drivers and DirectX are up to date.";
if (exc != null)
{
msg += "\n\nException info: " + exc.ToString();
}
throw new Exception(msg);
} }
device = dev; device = dev;
@ -130,7 +136,7 @@ namespace CodeWalker.Rendering
} }
catch (Exception ex) catch (Exception ex)
{ {
MessageBox.Show("Unable to initialise DirectX11.\n" + ex.ToString()); MessageBox.Show("Unable to initialise DirectX11.\n" + ex.Message, "CodeWalker - Error!");
return false; return false;
} }
} }

View File

@ -587,7 +587,7 @@ namespace CodeWalker
} }
else if (NavPortal != null) else if (NavPortal != null)
{ {
return Quaternion.Identity; return NavPortal.Orientation;
} }
else if (PathNode != null) else if (PathNode != null)
{ {
@ -634,7 +634,7 @@ namespace CodeWalker
} }
else if (NavPortal != null) else if (NavPortal != null)
{ {
return WidgetAxis.None; return WidgetAxis.Z;
} }
else if (PathNode != null) else if (PathNode != null)
{ {
@ -787,6 +787,10 @@ namespace CodeWalker
{ {
NavPoint.SetOrientation(newrot); NavPoint.SetOrientation(newrot);
} }
else if (NavPortal != null)
{
NavPortal.SetOrientation(newrot);
}
else if (Audio != null) else if (Audio != null)
{ {
Audio.SetOrientation(newrot); Audio.SetOrientation(newrot);

View File

@ -179,6 +179,8 @@ namespace CodeWalker
YmapCarGen CopiedCarGen = null; YmapCarGen CopiedCarGen = null;
YndNode CopiedPathNode = null; YndNode CopiedPathNode = null;
YnvPoly CopiedNavPoly = null; YnvPoly CopiedNavPoly = null;
YnvPoint CopiedNavPoint = null;
YnvPortal CopiedNavPortal = null;
TrainTrackNode CopiedTrainNode = null; TrainTrackNode CopiedTrainNode = null;
ScenarioNode CopiedScenarioNode = null; ScenarioNode CopiedScenarioNode = null;
@ -1203,6 +1205,10 @@ namespace CodeWalker
{ {
ori = CurMouseHit.NavPoint.Orientation; ori = CurMouseHit.NavPoint.Orientation;
} }
if (CurMouseHit.NavPortal != null)
{
ori = CurMouseHit.NavPortal.Orientation;
}
if (CurMouseHit.Audio != null) if (CurMouseHit.Audio != null)
{ {
ori = CurMouseHit.Audio.Orientation; ori = CurMouseHit.Audio.Orientation;
@ -1443,9 +1449,15 @@ namespace CodeWalker
} }
if (selectionItem.NavPortal != null) if (selectionItem.NavPortal != null)
{ {
camrel = selectionItem.NavPortal.Position - camera.Position; var navp = selectionItem.NavPortal;
} camrel = navp.Position - camera.Position;
//render direction arrow for NavPortal
ori = navp.Orientation;
float arrowlen = 2.0f;
float arrowrad = 0.25f;
Renderer.RenderSelectionArrowOutline(navp.Position, Vector3.UnitY, Vector3.UnitZ, ori, arrowlen, arrowrad, cgrn);
}
if (selectionItem.Audio != null) if (selectionItem.Audio != null)
{ {
var au = selectionItem.Audio; var au = selectionItem.Audio;
@ -1743,7 +1755,7 @@ namespace CodeWalker
public void UpdateNavYnvGraphics(YnvFile ynv, bool fullupdate) public void UpdateNavYnvGraphics(YnvFile ynv, bool fullupdate)
{ {
ynv.UpdateAllNodePositions();
ynv.UpdateTriangleVertices(); ynv.UpdateTriangleVertices();
ynv.BuildBVH(); ynv.BuildBVH();
@ -1758,6 +1770,18 @@ namespace CodeWalker
//poly.Ynv.UpdateBvhForPoly(poly);//TODO! //poly.Ynv.UpdateBvhForPoly(poly);//TODO!
UpdateNavYnvGraphics(poly.Ynv, fullupdate); UpdateNavYnvGraphics(poly.Ynv, fullupdate);
} }
public void UpdateNavPointGraphics(YnvPoint point, bool fullupdate)
{
if (point == null) return;
//poly.Ynv.UpdateBvhForPoint(point);//TODO!
UpdateNavYnvGraphics(point.Ynv, fullupdate);
}
public void UpdateNavPortalGraphics(YnvPortal portal, bool fullupdate)
{
if (portal == null) return;
//poly.Ynv.UpdateBvhForPortal(portal);//TODO!
UpdateNavYnvGraphics(portal.Ynv, fullupdate);
}
public void UpdateTrainTrackGraphics(TrainTrack tt, bool fullupdate) public void UpdateTrainTrackGraphics(TrainTrack tt, bool fullupdate)
{ {
@ -4538,19 +4562,23 @@ namespace CodeWalker
private bool CanMarkUndo()
{
if (SelectedItem.MultipleSelection) return true;
if (SelectedItem.EntityDef != null) return true;
if (SelectedItem.CarGenerator != null) return true;
if (SelectedItem.PathNode != null) return true;
//if (SelectedItem.NavPoly != null) return true;
if (SelectedItem.NavPoint != null) return true;
if (SelectedItem.NavPortal != null) return true;
if (SelectedItem.TrainTrackNode != null) return true;
if (SelectedItem.ScenarioNode != null) return true;
if (SelectedItem.Audio != null) return true;
return false;
}
private void MarkUndoStart(Widget w) private void MarkUndoStart(Widget w)
{ {
bool canundo = false; if (!CanMarkUndo()) return;
if (SelectedItem.MultipleSelection) canundo = true;
if (SelectedItem.EntityDef != null) canundo = true;
if (SelectedItem.CarGenerator != null) canundo = true;
if (SelectedItem.PathNode != null) canundo = true;
//if (SelectedItem.NavPoly != null) hasval = true;
if (SelectedItem.TrainTrackNode != null) canundo = true;
if (SelectedItem.ScenarioNode != null) canundo = true;
if (SelectedItem.Audio != null) canundo = true;
if (!canundo) return;
if (Widget is TransformWidget) if (Widget is TransformWidget)
{ {
UndoStartPosition = Widget.Position; UndoStartPosition = Widget.Position;
@ -4560,19 +4588,13 @@ namespace CodeWalker
} }
private void MarkUndoEnd(Widget w) private void MarkUndoEnd(Widget w)
{ {
bool canundo = false; if (!CanMarkUndo()) return;
if (SelectedItem.MultipleSelection) canundo = true;
if (SelectedItem.EntityDef != null) canundo = true;
if (SelectedItem.CarGenerator != null) canundo = true;
if (SelectedItem.PathNode != null) canundo = true;
//if (SelectedItem.NavPoly != null) hasval = true;
if (SelectedItem.TrainTrackNode != null) canundo = true;
if (SelectedItem.ScenarioNode != null) canundo = true;
if (SelectedItem.Audio != null) canundo = true;
if (!canundo) return;
var ent = SelectedItem.EntityDef; var ent = SelectedItem.EntityDef;
var cargen = SelectedItem.CarGenerator; var cargen = SelectedItem.CarGenerator;
var pathnode = SelectedItem.PathNode; var pathnode = SelectedItem.PathNode;
var navpoly = SelectedItem.NavPoly;
var navpoint = SelectedItem.NavPoint;
var navportal = SelectedItem.NavPortal;
var trainnode = SelectedItem.TrainTrackNode; var trainnode = SelectedItem.TrainTrackNode;
var scenarionode = SelectedItem.ScenarioNode; var scenarionode = SelectedItem.ScenarioNode;
var audio = SelectedItem.Audio; var audio = SelectedItem.Audio;
@ -4623,6 +4645,26 @@ namespace CodeWalker
case WidgetMode.Position: s = new PathNodePositionUndoStep(pathnode, UndoStartPosition, this); break; case WidgetMode.Position: s = new PathNodePositionUndoStep(pathnode, UndoStartPosition, this); break;
} }
} }
else if (navpoly != null)
{
//todo...
}
else if (navpoint != null)
{
switch (tw.Mode)
{
case WidgetMode.Position: s = new NavPointPositionUndoStep(navpoint, UndoStartPosition, this); break;
case WidgetMode.Rotation: s = new NavPointRotationUndoStep(navpoint, UndoStartRotation, this); break;
}
}
else if (navportal != null)
{
switch (tw.Mode)
{
case WidgetMode.Position: s = new NavPortalPositionUndoStep(navportal, UndoStartPosition, this); break;
case WidgetMode.Rotation: s = new NavPortalRotationUndoStep(navportal, UndoStartRotation, this); break;
}
}
else if (trainnode != null) else if (trainnode != null)
{ {
switch (tw.Mode) switch (tw.Mode)
@ -4942,9 +4984,9 @@ namespace CodeWalker
case MapSelectionMode.Entity: AddEntity(); break; case MapSelectionMode.Entity: AddEntity(); break;
case MapSelectionMode.CarGenerator: AddCarGen(); break; case MapSelectionMode.CarGenerator: AddCarGen(); break;
case MapSelectionMode.Path: AddPathNode(); break; case MapSelectionMode.Path: AddPathNode(); break;
case MapSelectionMode.NavMesh: AddNavPoly(); break; case MapSelectionMode.NavMesh: AddNavPoly(); break;//how to add points/portals? project window
case MapSelectionMode.TrainTrack: AddTrainNode(); break; case MapSelectionMode.TrainTrack: AddTrainNode(); break;
case MapSelectionMode.Scenario: AddScenarioNode(); break; case MapSelectionMode.Scenario: AddScenarioNode(); break; //how to add different node types? project window
} }
} }
private void DeleteItem() private void DeleteItem()
@ -4953,6 +4995,8 @@ namespace CodeWalker
else if (SelectedItem.CarGenerator != null) DeleteCarGen(); else if (SelectedItem.CarGenerator != null) DeleteCarGen();
else if (SelectedItem.PathNode != null) DeletePathNode(); else if (SelectedItem.PathNode != null) DeletePathNode();
else if (SelectedItem.NavPoly != null) DeleteNavPoly(); else if (SelectedItem.NavPoly != null) DeleteNavPoly();
else if (SelectedItem.NavPoint != null) DeleteNavPoint();
else if (SelectedItem.NavPortal != null) DeleteNavPortal();
else if (SelectedItem.TrainTrackNode != null) DeleteTrainNode(); else if (SelectedItem.TrainTrackNode != null) DeleteTrainNode();
else if (SelectedItem.ScenarioNode != null) DeleteScenarioNode(); else if (SelectedItem.ScenarioNode != null) DeleteScenarioNode();
} }
@ -4962,6 +5006,8 @@ namespace CodeWalker
else if (SelectedItem.CarGenerator != null) CopyCarGen(); else if (SelectedItem.CarGenerator != null) CopyCarGen();
else if (SelectedItem.PathNode != null) CopyPathNode(); else if (SelectedItem.PathNode != null) CopyPathNode();
else if (SelectedItem.NavPoly != null) CopyNavPoly(); else if (SelectedItem.NavPoly != null) CopyNavPoly();
else if (SelectedItem.NavPoint != null) CopyNavPoint();
else if (SelectedItem.NavPortal != null) CopyNavPortal();
else if (SelectedItem.TrainTrackNode != null) CopyTrainNode(); else if (SelectedItem.TrainTrackNode != null) CopyTrainNode();
else if (SelectedItem.ScenarioNode != null) CopyScenarioNode(); else if (SelectedItem.ScenarioNode != null) CopyScenarioNode();
} }
@ -4971,6 +5017,8 @@ namespace CodeWalker
else if (CopiedCarGen != null) PasteCarGen(); else if (CopiedCarGen != null) PasteCarGen();
else if (CopiedPathNode != null) PastePathNode(); else if (CopiedPathNode != null) PastePathNode();
else if (CopiedNavPoly != null) PasteNavPoly(); else if (CopiedNavPoly != null) PasteNavPoly();
else if (CopiedNavPoint != null) PasteNavPoint();
else if (CopiedNavPortal != null) PasteNavPortal();
else if (CopiedTrainNode != null) PasteTrainNode(); else if (CopiedTrainNode != null) PasteTrainNode();
else if (CopiedScenarioNode != null) PasteScenarioNode(); else if (CopiedScenarioNode != null) PasteScenarioNode();
} }
@ -4980,6 +5028,8 @@ namespace CodeWalker
else if (SelectedItem.CarGenerator != null) CloneCarGen(); else if (SelectedItem.CarGenerator != null) CloneCarGen();
else if (SelectedItem.PathNode != null) ClonePathNode(); else if (SelectedItem.PathNode != null) ClonePathNode();
else if (SelectedItem.NavPoly != null) CloneNavPoly(); else if (SelectedItem.NavPoly != null) CloneNavPoly();
else if (SelectedItem.NavPoint != null) CloneNavPoint();
else if (SelectedItem.NavPortal != null) CloneNavPortal();
else if (SelectedItem.TrainTrackNode != null) CloneTrainNode(); else if (SelectedItem.TrainTrackNode != null) CloneTrainNode();
else if (SelectedItem.ScenarioNode != null) CloneScenarioNode(); else if (SelectedItem.ScenarioNode != null) CloneScenarioNode();
} }
@ -5202,6 +5252,114 @@ namespace CodeWalker
ProjectForm.NewNavPoly(SelectedItem.NavPoly, true); ProjectForm.NewNavPoly(SelectedItem.NavPoly, true);
} }
private void AddNavPoint()
{
if (ProjectForm == null) return;
ProjectForm.NewNavPoint();
}
private void DeleteNavPoint()
{
var navpoint = SelectedItem.NavPoint;
if (navpoint == null) return;
if ((ProjectForm != null) && (ProjectForm.IsCurrentNavPoint(navpoint)))
{
if (!ProjectForm.DeleteNavPoint())
{
//MessageBox.Show("Unable to delete this nav point from the current project. Make sure the nav point's ynv exists in the current project.");
}
else
{
SelectItem(null);
}
}
else
{
//project not open, or nav point not selected there, just remove the point from the ynv...
var ynv = navpoint.Ynv;
if (!ynv.RemovePoint(navpoint))
{
MessageBox.Show("Unable to remove nav point. NavMesh editing TODO!");
}
else
{
UpdateNavPointGraphics(navpoint, false);
SelectItem(null);
}
}
}
private void CopyNavPoint()
{
CopiedNavPoint = SelectedItem.NavPoint;
ToolbarPasteButton.Enabled = (CopiedNavPoint != null) && ToolbarAddItemButton.Enabled;
}
private void PasteNavPoint()
{
if (CopiedNavPoint == null) return;
if (ProjectForm == null) return;
ProjectForm.NewNavPoint(CopiedNavPoint);
}
private void CloneNavPoint()
{
if (SelectedItem.NavPoint == null) return;
if (ProjectForm == null) return;
ProjectForm.NewNavPoint(SelectedItem.NavPoint, true);
}
private void AddNavPortal()
{
if (ProjectForm == null) return;
ProjectForm.NewNavPortal();
}
private void DeleteNavPortal()
{
var navportal = SelectedItem.NavPortal;
if (navportal == null) return;
if ((ProjectForm != null) && (ProjectForm.IsCurrentNavPortal(navportal)))
{
if (!ProjectForm.DeleteNavPortal())
{
//MessageBox.Show("Unable to delete this nav portal from the current project. Make sure the nav portal's ynv exists in the current project.");
}
else
{
SelectItem(null);
}
}
else
{
//project not open, or nav portal not selected there, just remove the portal from the ynv...
var ynv = navportal.Ynv;
if (!ynv.RemovePortal(navportal))
{
MessageBox.Show("Unable to remove nav portal. NavMesh editing TODO!");
}
else
{
UpdateNavPortalGraphics(navportal, false);
SelectItem(null);
}
}
}
private void CopyNavPortal()
{
CopiedNavPortal = SelectedItem.NavPortal;
ToolbarPasteButton.Enabled = (CopiedNavPortal != null) && ToolbarAddItemButton.Enabled;
}
private void PasteNavPortal()
{
if (CopiedNavPortal == null) return;
if (ProjectForm == null) return;
ProjectForm.NewNavPortal(CopiedNavPortal);
}
private void CloneNavPortal()
{
if (SelectedItem.NavPortal == null) return;
if (ProjectForm == null) return;
ProjectForm.NewNavPortal(SelectedItem.NavPortal, true);
}
private void AddTrainNode() private void AddTrainNode()
{ {
if (ProjectForm == null) return; if (ProjectForm == null) return;