diff --git a/UndertaleModLib/Models/UndertaleEmbeddedTexture.cs b/UndertaleModLib/Models/UndertaleEmbeddedTexture.cs
index caf8f48b5..283f23a31 100644
--- a/UndertaleModLib/Models/UndertaleEmbeddedTexture.cs
+++ b/UndertaleModLib/Models/UndertaleEmbeddedTexture.cs
@@ -27,11 +27,15 @@ public class UndertaleEmbeddedTexture : UndertaleNamedResource
public uint Scaled { get; set; }
///
- /// The amount of generated mipmap levels.
+ /// The amount of generated mipmap levels.
+ /// GameMaker Studio: 2 only.
///
public uint GeneratedMips { get; set; }
-
+ ///
+ /// TODO: something.
+ /// GameMaker: Studio 2 only.
+ ///
public uint TextureBlockSize { get; set; }
///
diff --git a/UndertaleModLib/Models/UndertaleExtension.cs b/UndertaleModLib/Models/UndertaleExtension.cs
index f3ed1cb79..324c6dd15 100644
--- a/UndertaleModLib/Models/UndertaleExtension.cs
+++ b/UndertaleModLib/Models/UndertaleExtension.cs
@@ -15,17 +15,23 @@ public enum UndertaleExtensionKind : uint
///
/// A DLL extension.
///
- DLL = 1,
+ Dll = 1,
///
/// A GML extension.
///
GML = 2,
+ ///
+ /// TODO: unknown
+ ///
ActionLib = 3,
+ ///
+ /// TODO: unknown
+ ///
Generic = 4,
///
/// A JavaScript extension.
///
- JS = 5
+ Js = 5
}
///
diff --git a/UndertaleModLib/Models/UndertaleFilterEffect.cs b/UndertaleModLib/Models/UndertaleFilterEffect.cs
index c5c9c9e43..6a431f21f 100644
--- a/UndertaleModLib/Models/UndertaleFilterEffect.cs
+++ b/UndertaleModLib/Models/UndertaleFilterEffect.cs
@@ -1,7 +1,7 @@
namespace UndertaleModLib.Models;
///
-/// A filter effect as it's used in a GameMaker data file.
+/// A filter effect as it's used in a GameMaker data file. These are GameMaker: Studio 2.3.6+ only.
///
[PropertyChanged.AddINotifyPropertyChangedInterface]
public class UndertaleFilterEffect : UndertaleNamedResource
@@ -10,6 +10,10 @@ public class UndertaleFilterEffect : UndertaleNamedResource
/// The name of the .
///
public UndertaleString Name { get; set; }
+
+ ///
+ /// TODO: fill this out please
+ ///
public UndertaleString Value { get; set; }
///
diff --git a/UndertaleModLib/Models/UndertaleFont.cs b/UndertaleModLib/Models/UndertaleFont.cs
index 27a653a5d..5915af065 100644
--- a/UndertaleModLib/Models/UndertaleFont.cs
+++ b/UndertaleModLib/Models/UndertaleFont.cs
@@ -44,7 +44,7 @@ public class UndertaleFont : UndertaleNamedResource
public ushort RangeStart { get; set; }
///
- /// TODO: Currently unknown value.
+ /// TODO: Currently unknown value. Possibly related to ranges? (aka normal, ascii, digits, letters)
///
public byte Charset { get; set; }
@@ -75,7 +75,7 @@ public class UndertaleFont : UndertaleNamedResource
public float ScaleY { get; set; }
///
- /// TODO: currently unknown, needs investigation.
+ /// TODO: currently unknown, needs investigation. GMS2022.2 specific?
///
public uint Ascender { get; set; }
@@ -122,10 +122,19 @@ public class Glyph : UndertaleObject
public ushort SourceHeight { get; set; }
- //TODO: From here on out is some kerning related stuff I don't know.
+ ///
+ /// TODO: something kerning related
+ ///
public short Shift { get; set; }
+
+ ///
+ /// TODO: something kerning related.
+ ///
public short Offset { get; set; }
+ ///
+ /// The kerning for each glyph.
+ ///
public UndertaleSimpleListShort Kerning { get; set; } = new UndertaleSimpleListShort();
///
@@ -154,9 +163,19 @@ public void Unserialize(UndertaleReader reader)
Kerning = reader.ReadUndertaleObject>();
}
+ ///
+ /// A class representing kerning for a glyph.
+ ///
public class GlyphKerning : UndertaleObject
{
+ ///
+ /// TODO: unknown?
+ ///
public short Other;
+
+ ///
+ /// TODO: unknown?
+ ///
public short Amount;
///
diff --git a/UndertaleModLib/Models/UndertaleFunction.cs b/UndertaleModLib/Models/UndertaleFunction.cs
index f99fa2f47..d065310c3 100644
--- a/UndertaleModLib/Models/UndertaleFunction.cs
+++ b/UndertaleModLib/Models/UndertaleFunction.cs
@@ -5,13 +5,27 @@
namespace UndertaleModLib.Models;
+///
+/// A function entry as it's used in a GameMaker data file.
+///
[PropertyChanged.AddINotifyPropertyChangedInterface]
public class UndertaleFunction : UndertaleNamedResource, UndertaleInstruction.ReferencedObject
{
public FunctionClassification Classification { get; set; }
+
+ ///
+ /// The name of the .
+ ///
public UndertaleString Name { get; set; }
+
+ ///
+ /// The index of in .
+ ///
public int NameStringID { get; set; }
+ ///
+ /// How often this is referenced in code.
+ ///
public uint Occurrences { get; set; }
public UndertaleInstruction FirstAddress { get; set; }
diff --git a/UndertaleModLib/Models/UndertaleGameObject.cs b/UndertaleModLib/Models/UndertaleGameObject.cs
index c96141b19..e6a7f8eb9 100644
--- a/UndertaleModLib/Models/UndertaleGameObject.cs
+++ b/UndertaleModLib/Models/UndertaleGameObject.cs
@@ -52,17 +52,17 @@ public class UndertaleGameObject : UndertaleNamedResource, INotifyPropertyChange
///
/// Whether the game object is solid.
///
- public bool Solid { get; set; } = false;
+ public bool Solid { get; set; }
///
/// The depth level of the game object.
///
- public int Depth { get; set; } = 0;
+ public int Depth { get; set; }
///
/// Whether the game object is persistent.
///
- public bool Persistent { get; set; } = false;
+ public bool Persistent { get; set; }
///
/// The parent game object this is inheriting from.
@@ -78,12 +78,12 @@ public class UndertaleGameObject : UndertaleNamedResource, INotifyPropertyChange
///
/// Whether this object uses Game Maker physics.
///
- public bool UsesPhysics { get; set; } = false;
+ public bool UsesPhysics { get; set; }
///
/// Whether this game object should act as a sensor fixture.
///
- public bool IsSensor { get; set; } = false;
+ public bool IsSensor { get; set; }
///
/// The collision shape the game object should use.
@@ -103,7 +103,7 @@ public class UndertaleGameObject : UndertaleNamedResource, INotifyPropertyChange
///
/// The physics collision group this game object belongs to.
///
- public uint Group { get; set; } = 0;
+ public uint Group { get; set; }
///
/// The physics linear damping this game object uses.
@@ -123,12 +123,12 @@ public class UndertaleGameObject : UndertaleNamedResource, INotifyPropertyChange
///
/// Whether this game object should start awake in the physics simulation.
///
- public bool Awake { get; set; } = false;
+ public bool Awake { get; set; }
///
/// Whether this game object is kinematic.
///
- public bool Kinematic { get; set; } = false;
+ public bool Kinematic { get; set; }
///
/// The vertices used for a of type .
@@ -145,6 +145,9 @@ public class UndertaleGameObject : UndertaleNamedResource, INotifyPropertyChange
///
public event PropertyChangedEventHandler PropertyChanged;
+ ///
+ /// Initialized an instance of .
+ ///
public UndertaleGameObject()
{
for (int i = 0; i < Enum.GetValues(typeof(EventType)).Length; i++)
@@ -163,7 +166,7 @@ public void Serialize(UndertaleWriter writer)
// This apparently has a different notation than everything else...
if (_ParentId.Resource == null)
{
- writer.Write((int)-100);
+ writer.Write(-100);
}
else
{
@@ -372,7 +375,7 @@ public class Event : UndertaleObject
/// This seems to always have 1 entry, it would need testing if maybe the games using drag-and-drop code are different
public UndertalePointerList Actions { get; private set; } = new UndertalePointerList();
- //TODO: not used, condense.
+ //TODO: not used, condense. Also UMT specific.
public EventSubtypeKey EventSubtypeKey
{
get => (EventSubtypeKey)EventSubtype;
diff --git a/UndertaleModLib/Models/UndertaleRoom.cs b/UndertaleModLib/Models/UndertaleRoom.cs
index dfcfdf9a1..171e17372 100644
--- a/UndertaleModLib/Models/UndertaleRoom.cs
+++ b/UndertaleModLib/Models/UndertaleRoom.cs
@@ -207,6 +207,9 @@ protected void OnPropertyChanged([CallerMemberName] string name = null)
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
}
+ ///
+ /// Initializes a new instance of .
+ ///
public UndertaleRoom()
{
for (int i = 0; i < 8; i++)
@@ -441,7 +444,7 @@ public interface IRoomObject
///
public class Background : UndertaleObject, INotifyPropertyChanged
{
- private UndertaleRoom _ParentRoom;
+ private UndertaleRoom _parentRoom;
///
/// The room parent this background belongs to.
@@ -449,7 +452,7 @@ public class Background : UndertaleObject, INotifyPropertyChanged
///
/// This attribute is UMT-only and does not exist in GameMaker.
///
- public UndertaleRoom ParentRoom { get => _ParentRoom; set { _ParentRoom = value; OnPropertyChanged(); UpdateStretch(); } }
+ public UndertaleRoom ParentRoom { get => _parentRoom; set { _parentRoom = value; OnPropertyChanged(); UpdateStretch(); } }
///
/// The calculated horizontal render scale for the background texture.
@@ -478,24 +481,24 @@ public class Background : UndertaleObject, INotifyPropertyChanged
/// Whether this acts as a foreground.
///
public bool Foreground { get; set; } = false;
- private UndertaleResourceById _BackgroundDefinition = new();
+ private UndertaleResourceById _backgroundDefinition = new();
///
/// The background asset this uses.
///
- public UndertaleBackground BackgroundDefinition { get => _BackgroundDefinition.Resource; set { _BackgroundDefinition.Resource = value; OnPropertyChanged(); } }
- private int _X = 0;
- private int _Y = 0;
+ public UndertaleBackground BackgroundDefinition { get => _backgroundDefinition.Resource; set { _backgroundDefinition.Resource = value; OnPropertyChanged(); } }
+ private int _x = 0;
+ private int _y = 0;
///
/// The x coordinate of the background in the room.
///
- public int X { get => _X; set { _X = value; OnPropertyChanged(); UpdateStretch(); } }
+ public int X { get => _x; set { _x = value; OnPropertyChanged(); UpdateStretch(); } }
///
/// The y coordinate of the background in the room.
///
- public int Y { get => _Y; set { _Y = value; OnPropertyChanged(); UpdateStretch(); } }
+ public int Y { get => _y; set { _y = value; OnPropertyChanged(); UpdateStretch(); } }
public int TileX { get; set; } = 1;
public int TileY { get; set; } = 1;
@@ -509,12 +512,12 @@ public class Background : UndertaleObject, INotifyPropertyChanged
///
public int SpeedY { get; set; } = 0;
- private bool _Stretch = false;
+ private bool _stretch = false;
///
/// Whether this background is stretched
///
- public bool Stretch { get => _Stretch; set { _Stretch = value; OnPropertyChanged(); UpdateStretch(); } }
+ public bool Stretch { get => _stretch; set { _stretch = value; OnPropertyChanged(); UpdateStretch(); } }
///
/// Indicates whether this background is tiled horizontally.
@@ -567,7 +570,7 @@ public void Serialize(UndertaleWriter writer)
{
writer.Write(Enabled);
writer.Write(Foreground);
- writer.WriteUndertaleObject(_BackgroundDefinition);
+ writer.WriteUndertaleObject(_backgroundDefinition);
writer.Write(X);
writer.Write(Y);
writer.Write(TileX);
@@ -582,7 +585,7 @@ public void Unserialize(UndertaleReader reader)
{
Enabled = reader.ReadBoolean();
Foreground = reader.ReadBoolean();
- _BackgroundDefinition = reader.ReadUndertaleObject>();
+ _backgroundDefinition = reader.ReadUndertaleObject>();
X = reader.ReadInt32();
Y = reader.ReadInt32();
TileX = reader.ReadInt32();
@@ -663,12 +666,12 @@ public class View : UndertaleObject, INotifyPropertyChanged
///
public int SpeedY { get; set; } = -1;
- private UndertaleResourceById _ObjectId = new();
+ private UndertaleResourceById _objectId = new();
///
/// The object the view should follow.
///
- public UndertaleGameObject ObjectId { get => _ObjectId.Resource; set { _ObjectId.Resource = value; PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(ObjectId))); } }
+ public UndertaleGameObject ObjectId { get => _objectId.Resource; set { _objectId.Resource = value; PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(ObjectId))); } }
///
public event PropertyChangedEventHandler PropertyChanged;
@@ -689,7 +692,7 @@ public void Serialize(UndertaleWriter writer)
writer.Write(BorderY);
writer.Write(SpeedX);
writer.Write(SpeedY);
- writer.WriteUndertaleObject(_ObjectId);
+ writer.WriteUndertaleObject(_objectId);
}
///
@@ -708,7 +711,7 @@ public void Unserialize(UndertaleReader reader)
BorderY = reader.ReadUInt32();
SpeedX = reader.ReadInt32();
SpeedY = reader.ReadInt32();
- _ObjectId = reader.ReadUndertaleObject>();
+ _objectId = reader.ReadUndertaleObject>();
}
}
@@ -1087,17 +1090,31 @@ public override string ToString()
}
}
- // For GMS2, Backgrounds and Tiles are empty and this is used instead
///
/// The layer type for a specific layer. In Game Maker: Studio 2, ,
- /// are empty and this is used instead.
+ /// are empty and are used instead.
///
public enum LayerType
{
+ ///
+ /// The layer is a background layer.
+ ///
Background = 1,
+ ///
+ /// The layer is an instances layer.
+ ///
Instances = 2,
+ ///
+ /// The layer is an assets layer.
+ ///
Assets = 3,
+ ///
+ /// The layer is a tiles layer.
+ ///
Tiles = 4,
+ ///
+ /// The layer is an effects layer.
+ ///
Effect = 6
}
@@ -1111,13 +1128,13 @@ public interface LayerData : UndertaleObject
{
}
- private UndertaleRoom _ParentRoom;
+ private UndertaleRoom _parentRoom;
private int _layerDepth;
///
/// The room this layer belongs to.
///
- public UndertaleRoom ParentRoom { get => _ParentRoom; set { _ParentRoom = value; OnPropertyChanged(); UpdateParentRoom(); } }
+ public UndertaleRoom ParentRoom { get => _parentRoom; set { _parentRoom = value; OnPropertyChanged(); UpdateParentRoom(); } }
///
/// The name of the layer.
diff --git a/UndertaleModLib/Models/UndertaleTags.cs b/UndertaleModLib/Models/UndertaleTags.cs
index 2c8b1e83a..6c66dfdca 100644
--- a/UndertaleModLib/Models/UndertaleTags.cs
+++ b/UndertaleModLib/Models/UndertaleTags.cs
@@ -4,7 +4,7 @@
namespace UndertaleModLib.Models;
///
-/// A tag entry in a GameMaker data file.
+/// A tag entry in a GameMaker data file. Tags are a GameMaker: Studio 2.3+ feature.
///
[PropertyChanged.AddINotifyPropertyChangedInterface]
public class UndertaleTags : UndertaleObject
diff --git a/UndertaleModLib/Models/UndertaleVariable.cs b/UndertaleModLib/Models/UndertaleVariable.cs
index 87f078d07..f0357f590 100644
--- a/UndertaleModLib/Models/UndertaleVariable.cs
+++ b/UndertaleModLib/Models/UndertaleVariable.cs
@@ -2,12 +2,23 @@
namespace UndertaleModLib.Models;
+///
+/// A variable entry in a GameMaker data file.
+///
// TODO: INotifyPropertyChanged
public class UndertaleVariable : UndertaleNamedResource, ISearchable, UndertaleInstruction.ReferencedObject
{
- ///
+ /// The name of the Variable.
public UndertaleString Name { get; set; }
+
+ ///
+ /// The type of the variable.
+ ///
public UndertaleInstruction.InstanceType InstanceType { get; set; }
+
+ ///
+ /// TODO: some id?
+ ///
public int VarID { get; set; }
///
diff --git a/UndertaleModTool/Editors/UndertaleExtensionEditor.xaml.cs b/UndertaleModTool/Editors/UndertaleExtensionEditor.xaml.cs
index 19141d213..f83a2faa4 100644
--- a/UndertaleModTool/Editors/UndertaleExtensionEditor.xaml.cs
+++ b/UndertaleModTool/Editors/UndertaleExtensionEditor.xaml.cs
@@ -37,7 +37,7 @@ private void Button_Click(object sender, RoutedEventArgs e)
UndertaleExtensionFile obj = new UndertaleExtensionFile()
{
- Kind = UndertaleExtensionKind.DLL,
+ Kind = UndertaleExtensionKind.Dll,
Filename = (Application.Current.MainWindow as MainWindow).Data.Strings.MakeString($"NewExtensionFile{lastItem}.dll"),
Functions = new UndertalePointerList()
};