Model rendering (all modes): UDMF scale, pitch and roll are now displayed.
Thing Edit Form, UDMF: added controls for setting pitch, roll, scale, render style, fill color, alpha, health and score.
Visual mode, UDMF: UDMF scale is now applied when rendering sprites.
Added Thing Statistics form (Edit -> View Thing Types...), which shows all loaded thing types with some additional info.
Visual mode: sprites with negative ScaleX and positive ScaleY were not rendered properly.
Classic modes: display was not updated after loading a sprite.
Current testing engine change was not saved on closing the program when no other game configuration settings were changed.
2014-04-30 10:01:22 +00:00
|
|
|
|
using System.Collections.Generic;
|
2012-07-16 09:45:21 +00:00
|
|
|
|
using CodeImp.DoomBuilder.Map;
|
|
|
|
|
using CodeImp.DoomBuilder.Geometry;
|
|
|
|
|
|
|
|
|
|
namespace CodeImp.DoomBuilder.GZBuilder.Data {
|
2013-09-11 09:47:53 +00:00
|
|
|
|
public sealed class ThingCopyData {
|
|
|
|
|
// Properties
|
2014-02-26 14:11:06 +00:00
|
|
|
|
private readonly int type;
|
|
|
|
|
private readonly Vector3D pos;
|
|
|
|
|
private readonly int angledoom; // Angle as entered / stored in file
|
|
|
|
|
private readonly Dictionary<string, bool> flags;
|
|
|
|
|
private readonly int tag;
|
|
|
|
|
private readonly int action;
|
|
|
|
|
private readonly int[] args;
|
|
|
|
|
private readonly UniFields fields;
|
2013-09-11 09:47:53 +00:00
|
|
|
|
|
|
|
|
|
public Vector3D Position { get { return pos; } }
|
|
|
|
|
|
|
|
|
|
public ThingCopyData(Thing t) {
|
|
|
|
|
type = t.Type;
|
|
|
|
|
angledoom = t.AngleDoom;
|
|
|
|
|
pos = t.Position;
|
2014-02-26 14:11:06 +00:00
|
|
|
|
flags = new Dictionary<string, bool>(t.Flags);
|
2013-09-11 09:47:53 +00:00
|
|
|
|
tag = t.Tag;
|
|
|
|
|
action = t.Action;
|
|
|
|
|
args = (int[])t.Args.Clone();
|
|
|
|
|
fields = new UniFields(t, t.Fields);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void ApplyTo(Thing t) {
|
|
|
|
|
t.Type = type;
|
|
|
|
|
t.Rotate(angledoom);
|
|
|
|
|
t.Move(pos);
|
|
|
|
|
|
|
|
|
|
foreach(KeyValuePair<string, bool> group in flags)
|
|
|
|
|
t.SetFlag(group.Key, group.Value);
|
|
|
|
|
|
|
|
|
|
t.Tag = tag;
|
|
|
|
|
t.Action = action;
|
|
|
|
|
|
|
|
|
|
for(int i = 0; i < args.Length; i++)
|
|
|
|
|
t.Args[i] = args[i];
|
|
|
|
|
|
|
|
|
|
foreach (KeyValuePair<string, UniValue> group in fields) {
|
|
|
|
|
if (t.Fields.ContainsKey(group.Key))
|
|
|
|
|
t.Fields[group.Key] = group.Value;
|
|
|
|
|
else
|
|
|
|
|
t.Fields.Add(group.Key, group.Value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
t.UpdateConfiguration();
|
|
|
|
|
}
|
|
|
|
|
}
|
2012-07-16 09:45:21 +00:00
|
|
|
|
}
|