code optimization
This commit is contained in:
@@ -1,7 +1,5 @@
|
|||||||
using System;
|
namespace SM64Lib.LIBMIO0;
|
||||||
|
|
||||||
namespace SM64Lib.LIBMIO0
|
|
||||||
{
|
|
||||||
public struct MIO0_Header
|
public struct MIO0_Header
|
||||||
{
|
{
|
||||||
public uint dest_size;
|
public uint dest_size;
|
||||||
@@ -148,4 +146,3 @@ namespace SM64Lib.LIBMIO0
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Runtime.InteropServices;
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
|
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
|
||||||
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
|
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
|
||||||
namespace SM64Lib.N64Graphics
|
namespace SM64Lib.N64Graphics;
|
||||||
{
|
|
||||||
public enum N64Codec { RGBA16, RGBA32, IA16, IA8, IA4, I8, I4, CI8, CI4, ONEBPP };
|
public enum N64Codec { RGBA16, RGBA32, IA16, IA8, IA4, I8, I4, CI8, CI4, ONEBPP };
|
||||||
public enum N64IMode { AlphaCopyIntensity, AlphaBinary, AlphaOne };
|
public enum N64IMode { AlphaCopyIntensity, AlphaBinary, AlphaOne };
|
||||||
|
|
||||||
@@ -521,4 +521,3 @@ namespace SM64Lib.N64Graphics
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Runtime.InteropServices;
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar
|
// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar
|
||||||
// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von
|
// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von
|
||||||
|
|||||||
@@ -1,14 +1,10 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Drawing.Imaging;
|
using System.Drawing.Imaging;
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SM64Lib.N64Graphics
|
namespace SM64Lib.N64Graphics;
|
||||||
{
|
|
||||||
public class TextureFormats
|
public class TextureFormats
|
||||||
{
|
{
|
||||||
public static Bitmap createColorTexture(Color color)
|
public static Bitmap createColorTexture(Color color)
|
||||||
@@ -595,4 +591,3 @@ namespace SM64Lib.N64Graphics
|
|||||||
return tex;
|
return tex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,13 +1,10 @@
|
|||||||
using OfficeOpenXml;
|
using OfficeOpenXml;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace SM64Lib.Text.Exporters
|
namespace SM64Lib.Text.Exporters;
|
||||||
{
|
|
||||||
public class ExcelExporter
|
public class ExcelExporter
|
||||||
{
|
{
|
||||||
public ExcelExporter()
|
public ExcelExporter()
|
||||||
@@ -99,4 +96,3 @@ namespace SM64Lib.Text.Exporters
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Runtime.InteropServices;
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
|
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
|
||||||
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
|
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
|
||||||
|
|||||||
@@ -1,12 +1,8 @@
|
|||||||
using System;
|
using System.IO;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace SM64Lib.Text.Exporters
|
namespace SM64Lib.Text.Exporters;
|
||||||
{
|
|
||||||
public class TxtExporter
|
public class TxtExporter
|
||||||
{
|
{
|
||||||
public async Task Export(string destFilePath, TextGroup[] groups)
|
public async Task Export(string destFilePath, TextGroup[] groups)
|
||||||
@@ -45,4 +41,3 @@ namespace SM64Lib.Text.Exporters
|
|||||||
sw.Close();
|
sw.Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using global::System;
|
using global::System;
|
||||||
using global::System.Reflection;
|
|
||||||
using global::System.Runtime.InteropServices;
|
using global::System.Runtime.InteropServices;
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using Microsoft.VisualBasic.CompilerServices;
|
|
||||||
|
|
||||||
namespace SM64Lib.TextValueConverter
|
namespace SM64Lib.TextValueConverter;
|
||||||
{
|
|
||||||
public static class TextValueConverter
|
public static class TextValueConverter
|
||||||
{
|
{
|
||||||
public static event WantIntegerValueModeEventHandler WantIntegerValueMode;
|
public static event WantIntegerValueModeEventHandler WantIntegerValueMode;
|
||||||
@@ -86,4 +85,3 @@ namespace SM64Lib.TextValueConverter
|
|||||||
{
|
{
|
||||||
public int IntegerValueMode { get; set; }
|
public int IntegerValueMode { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,13 +1,8 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using SM64Lib.Data;
|
using SM64Lib.Data;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SM64Lib.ASM
|
namespace SM64Lib.ASM;
|
||||||
{
|
|
||||||
public class CustomAsmArea
|
public class CustomAsmArea
|
||||||
{
|
{
|
||||||
public byte[] AreaBytes { get; set; }
|
public byte[] AreaBytes { get; set; }
|
||||||
@@ -80,4 +75,3 @@ namespace SM64Lib.ASM
|
|||||||
return Config.Length;
|
return Config.Length;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,14 +1,9 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Pilz.Cryptography;
|
using Pilz.Cryptography;
|
||||||
using Pilz.Json.Converters;
|
using Pilz.Json.Converters;
|
||||||
|
|
||||||
namespace SM64Lib.ASM
|
namespace SM64Lib.ASM;
|
||||||
{
|
|
||||||
public class CustomAsmAreaConfig
|
public class CustomAsmAreaConfig
|
||||||
{
|
{
|
||||||
internal delegate void RequestCustomAsmAreaEventHandler(CustomAsmAreaConfig config, RequestCustomAsmAreaEventArgs request);
|
internal delegate void RequestCustomAsmAreaEventHandler(CustomAsmAreaConfig config, RequestCustomAsmAreaEventArgs request);
|
||||||
@@ -36,4 +31,3 @@ namespace SM64Lib.ASM
|
|||||||
public CustomAsmArea CustomAsmArea { get; set; }
|
public CustomAsmArea CustomAsmArea { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SM64Lib.ASM
|
namespace SM64Lib.ASM;
|
||||||
{
|
|
||||||
public class CustomAsmBank
|
public class CustomAsmBank
|
||||||
{
|
{
|
||||||
public CustomAsmBankConfig Config { get; }
|
public CustomAsmBankConfig Config { get; }
|
||||||
@@ -82,4 +79,3 @@ namespace SM64Lib.ASM
|
|||||||
Config.Areas.AddRange(Areas.Select(n => n.Config));
|
Config.Areas.AddRange(Areas.Select(n => n.Config));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,12 +1,8 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SM64Lib.ASM
|
namespace SM64Lib.ASM;
|
||||||
{
|
|
||||||
public class CustomAsmBankConfig
|
public class CustomAsmBankConfig
|
||||||
{
|
{
|
||||||
public static int DefaultMaxLength { get; set; } = 0xA000;
|
public static int DefaultMaxLength { get; set; } = 0xA000;
|
||||||
@@ -47,4 +43,3 @@ namespace SM64Lib.ASM
|
|||||||
return (isDefault ? DefaultMaxLength : MaxLength, isDefault);
|
return (isDefault ? DefaultMaxLength : MaxLength, isDefault);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,12 +1,8 @@
|
|||||||
using SM64Lib.Patching;
|
using SM64Lib.Patching;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SM64Lib
|
namespace SM64Lib;
|
||||||
{
|
|
||||||
public class BaseTweakScriptInfo
|
public class BaseTweakScriptInfo
|
||||||
{
|
{
|
||||||
public PatchScript Script { get; private set; }
|
public PatchScript Script { get; private set; }
|
||||||
@@ -27,4 +23,3 @@ namespace SM64Lib
|
|||||||
Script = script;
|
Script = script;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -5,13 +5,11 @@ using SM64Lib.Data;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Z.Collections.Extensions;
|
using Z.Collections.Extensions;
|
||||||
using static SM64Lib.Extensions.ObjectExtensions;
|
using static SM64Lib.Extensions.ObjectExtensions;
|
||||||
|
|
||||||
namespace SM64Lib.Behaviors
|
namespace SM64Lib.Behaviors;
|
||||||
{
|
|
||||||
public class Behavior
|
public class Behavior
|
||||||
{
|
{
|
||||||
private readonly Dictionary<CustomAsmAreaConfig, BehaviorscriptCommand> knownCustomAsmCommands = new Dictionary<CustomAsmAreaConfig, BehaviorscriptCommand>();
|
private readonly Dictionary<CustomAsmAreaConfig, BehaviorscriptCommand> knownCustomAsmCommands = new Dictionary<CustomAsmAreaConfig, BehaviorscriptCommand>();
|
||||||
@@ -238,4 +236,3 @@ namespace SM64Lib.Behaviors
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,16 +1,13 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using SM64Lib.Data;
|
using SM64Lib.Data;
|
||||||
using SM64Lib.SegmentedBanking;
|
using SM64Lib.SegmentedBanking;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Z.Collections.Extensions;
|
using Z.Collections.Extensions;
|
||||||
|
|
||||||
namespace SM64Lib.Behaviors
|
namespace SM64Lib.Behaviors;
|
||||||
{
|
|
||||||
public class BehaviorBank
|
public class BehaviorBank
|
||||||
{
|
{
|
||||||
public BehaviorBankConfig Config { get; private set; }
|
public BehaviorBankConfig Config { get; private set; }
|
||||||
@@ -217,4 +214,3 @@ namespace SM64Lib.Behaviors
|
|||||||
UpdateBehaviorAddresses(rommgr, addressUpdates);
|
UpdateBehaviorAddresses(rommgr, addressUpdates);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,12 +1,8 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SM64Lib.Behaviors
|
namespace SM64Lib.Behaviors;
|
||||||
{
|
|
||||||
public class BehaviorBankConfig
|
public class BehaviorBankConfig
|
||||||
{
|
{
|
||||||
public bool IsVanilla { get; set; } = true;
|
public bool IsVanilla { get; set; } = true;
|
||||||
@@ -33,4 +29,3 @@ namespace SM64Lib.Behaviors
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,14 +1,10 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Pilz.Cryptography;
|
using Pilz.Cryptography;
|
||||||
using Pilz.Json.Converters;
|
using Pilz.Json.Converters;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace SM64Lib.Behaviors;
|
||||||
|
|
||||||
namespace SM64Lib.Behaviors
|
|
||||||
{
|
|
||||||
public class BehaviorConfig
|
public class BehaviorConfig
|
||||||
{
|
{
|
||||||
internal delegate void RequestModelEventHandler(BehaviorConfig config, RequestBehaviorEventArgs request);
|
internal delegate void RequestModelEventHandler(BehaviorConfig config, RequestBehaviorEventArgs request);
|
||||||
@@ -36,4 +32,3 @@ namespace SM64Lib.Behaviors
|
|||||||
public Behavior Behavior { get; set; }
|
public Behavior Behavior { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,13 +1,6 @@
|
|||||||
using System;
|
namespace SM64Lib.Behaviors;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SM64Lib.Behaviors
|
|
||||||
{
|
|
||||||
public enum BehaviorCreationTypes
|
public enum BehaviorCreationTypes
|
||||||
{
|
{
|
||||||
SolidObject
|
SolidObject
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,15 +1,10 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
namespace SM64Lib.Behaviors;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SM64Lib.Behaviors
|
|
||||||
{
|
|
||||||
public class BehaviorParamInfo
|
public class BehaviorParamInfo
|
||||||
{
|
{
|
||||||
public string Name { get; set; } = string.Empty;
|
public string Name { get; set; } = string.Empty;
|
||||||
public string Description { get; set; } = string.Empty;
|
public string Description { get; set; } = string.Empty;
|
||||||
public List<BehaviorParamValue> Values { get; } = new List<BehaviorParamValue>();
|
public List<BehaviorParamValue> Values { get; } = new List<BehaviorParamValue>();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,14 +1,7 @@
|
|||||||
using System;
|
namespace SM64Lib.Behaviors;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SM64Lib.Behaviors
|
|
||||||
{
|
|
||||||
public class BehaviorParamValue
|
public class BehaviorParamValue
|
||||||
{
|
{
|
||||||
public string Name { get; set; } = "";
|
public string Name { get; set; } = "";
|
||||||
public byte Value { get; set; } = 0;
|
public byte Value { get; set; } = 0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
using System;
|
namespace SM64Lib.Behaviors;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SM64Lib.Behaviors
|
|
||||||
{
|
|
||||||
public class BehaviorParamsInfo
|
public class BehaviorParamsInfo
|
||||||
{
|
{
|
||||||
public BehaviorParamInfo Param1 { get; } = new();
|
public BehaviorParamInfo Param1 { get; } = new();
|
||||||
@@ -13,4 +7,3 @@ namespace SM64Lib.Behaviors
|
|||||||
public BehaviorParamInfo Param3 { get; } = new();
|
public BehaviorParamInfo Param3 { get; } = new();
|
||||||
public BehaviorParamInfo Param4 { get; } = new();
|
public BehaviorParamInfo Param4 { get; } = new();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,13 +1,8 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using SM64Lib.ASM;
|
using SM64Lib.ASM;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SM64Lib.Behaviors
|
namespace SM64Lib.Behaviors;
|
||||||
{
|
|
||||||
public class CustomAsmAreaLinkOptions
|
public class CustomAsmAreaLinkOptions
|
||||||
{
|
{
|
||||||
// Temporary fix - Remove custom property code and make it auto property in v1.?
|
// Temporary fix - Remove custom property code and make it auto property in v1.?
|
||||||
@@ -22,4 +17,3 @@ namespace SM64Lib.Behaviors
|
|||||||
public CustomAsmArea CustomAsm { get; private set; }
|
public CustomAsmArea CustomAsm { get; private set; }
|
||||||
public bool Loop { get; set; }
|
public bool Loop { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
using SM64Lib.Data;
|
using SM64Lib.Data;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace SM64Lib.Behaviors.Script
|
namespace SM64Lib.Behaviors.Script;
|
||||||
{
|
|
||||||
public class Behaviorscript : BehaviorscriptCommandCollection
|
public class Behaviorscript : BehaviorscriptCommandCollection
|
||||||
{
|
{
|
||||||
public bool Read(BinaryData data, int address, bool detectJumpsAsEnd = false, bool ignoreEndCmds = false, int expectedLength = -1)
|
public bool Read(BinaryData data, int address, bool detectJumpsAsEnd = false, bool ignoreEndCmds = false, int expectedLength = -1)
|
||||||
@@ -103,4 +102,3 @@ namespace SM64Lib.Behaviors.Script
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -2,8 +2,8 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using SM64Lib.Json;
|
using SM64Lib.Json;
|
||||||
|
|
||||||
namespace SM64Lib.Behaviors.Script
|
namespace SM64Lib.Behaviors.Script;
|
||||||
{
|
|
||||||
[JsonConverter(typeof(BehaviorscriptCommandJsonConverter))]
|
[JsonConverter(typeof(BehaviorscriptCommandJsonConverter))]
|
||||||
public class BehaviorscriptCommand : SM64Lib.Script.BaseCommand<BehaviorscriptCommandTypes>
|
public class BehaviorscriptCommand : SM64Lib.Script.BaseCommand<BehaviorscriptCommandTypes>
|
||||||
{
|
{
|
||||||
@@ -117,4 +117,3 @@ namespace SM64Lib.Behaviors.Script
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
|
|
||||||
namespace SM64Lib.Behaviors.Script
|
namespace SM64Lib.Behaviors.Script;
|
||||||
{
|
|
||||||
public class BehaviorscriptCommandCollection : SM64Lib.Script.BaseCommandCollection<BehaviorscriptCommand, BehaviorscriptCommandTypes>
|
public class BehaviorscriptCommandCollection : SM64Lib.Script.BaseCommandCollection<BehaviorscriptCommand, BehaviorscriptCommandTypes>
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,11 +1,5 @@
|
|||||||
using System;
|
namespace SM64Lib.Behaviors.Script;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SM64Lib.Behaviors.Script
|
|
||||||
{
|
|
||||||
public static class BehaviorscriptCommandFactory
|
public static class BehaviorscriptCommandFactory
|
||||||
{
|
{
|
||||||
public static BehaviorscriptCommand Build_x2A(int collisionPointer = -1)
|
public static BehaviorscriptCommand Build_x2A(int collisionPointer = -1)
|
||||||
@@ -29,4 +23,3 @@ namespace SM64Lib.Behaviors.Script
|
|||||||
return cmd;
|
return cmd;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,12 +1,5 @@
|
|||||||
using SM64Lib.Data;
|
namespace SM64Lib.Behaviors.Script;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SM64Lib.Behaviors.Script
|
|
||||||
{
|
|
||||||
public class BehaviorscriptCommandFunctions
|
public class BehaviorscriptCommandFunctions
|
||||||
{
|
{
|
||||||
public class X2A
|
public class X2A
|
||||||
@@ -36,4 +29,3 @@ namespace SM64Lib.Behaviors.Script
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
namespace SM64Lib.Behaviors.Script
|
namespace SM64Lib.Behaviors.Script;
|
||||||
{
|
|
||||||
public enum BehaviorscriptCommandTypes
|
public enum BehaviorscriptCommandTypes
|
||||||
{
|
{
|
||||||
x00_Start,
|
x00_Start,
|
||||||
@@ -59,4 +59,3 @@
|
|||||||
x36_SetValue,
|
x36_SetValue,
|
||||||
x37_SpawnSomething
|
x37_SpawnSomething
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,12 +1,9 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SM64Lib.Configuration
|
namespace SM64Lib.Configuration;
|
||||||
{
|
|
||||||
public class CollisionBasicConfig
|
public class CollisionBasicConfig
|
||||||
{
|
{
|
||||||
private List<byte> collisionTypesWithParams = new List<byte>()
|
private List<byte> collisionTypesWithParams = new List<byte>()
|
||||||
@@ -19,4 +16,3 @@ namespace SM64Lib.Configuration
|
|||||||
private set => collisionTypesWithParams = value.Distinct().ToList();
|
private set => collisionTypesWithParams = value.Distinct().ToList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using SM64Lib.Objects.ModelBanks;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using Pilz.Cryptography;
|
using Pilz.Cryptography;
|
||||||
using Pilz.Json.Converters;
|
using Pilz.Json.Converters;
|
||||||
|
using SM64Lib.Objects.ModelBanks;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace SM64Lib.Configuration;
|
||||||
|
|
||||||
namespace SM64Lib.Configuration
|
|
||||||
{
|
|
||||||
public class CustomModelConfig
|
public class CustomModelConfig
|
||||||
{
|
{
|
||||||
internal delegate void RequestModelEventHandler(CustomModelConfig config, RequestModelEventArgs request);
|
internal delegate void RequestModelEventHandler(CustomModelConfig config, RequestModelEventArgs request);
|
||||||
@@ -28,4 +28,3 @@ namespace SM64Lib.Configuration
|
|||||||
public CustomModel Model { get; set; }
|
public CustomModel Model { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace SM64Lib.Configuration
|
namespace SM64Lib.Configuration;
|
||||||
{
|
|
||||||
public class LevelAreaConfig
|
public class LevelAreaConfig
|
||||||
{
|
{
|
||||||
public string AreaName { get; set; }
|
public string AreaName { get; set; }
|
||||||
public Dictionary<short, string> ScrollingNames { get; set; } = new Dictionary<short, string>();
|
public Dictionary<short, string> ScrollingNames { get; set; } = new Dictionary<short, string>();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace SM64Lib.Configuration
|
namespace SM64Lib.Configuration;
|
||||||
{
|
|
||||||
public class LevelConfig
|
public class LevelConfig
|
||||||
{
|
{
|
||||||
public string LevelName { get; set; }
|
public string LevelName { get; set; }
|
||||||
@@ -23,4 +23,3 @@ namespace SM64Lib.Configuration
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,9 +1,8 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace SM64Lib.Configuration
|
namespace SM64Lib.Configuration;
|
||||||
{
|
|
||||||
public class MusicConfiguration
|
public class MusicConfiguration
|
||||||
{
|
{
|
||||||
public List<string> SqeuenceNames { get; private set; } = new List<string>();
|
public List<string> SqeuenceNames { get; private set; } = new List<string>();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,13 +1,6 @@
|
|||||||
using System;
|
namespace SM64Lib.Configuration;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SM64Lib.Configuration
|
|
||||||
{
|
|
||||||
public class NPCConfig
|
public class NPCConfig
|
||||||
{
|
{
|
||||||
public bool Enabled3DCoins { get; set; } = false;
|
public bool Enabled3DCoins { get; set; } = false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace SM64Lib.Configuration
|
namespace SM64Lib.Configuration;
|
||||||
{
|
|
||||||
public class ObjectModelConfig
|
public class ObjectModelConfig
|
||||||
{
|
{
|
||||||
public Dictionary<int, CustomModelConfig> CustomObjectConfigs { get; private set; } = new Dictionary<int, CustomModelConfig>();
|
public Dictionary<int, CustomModelConfig> CustomObjectConfigs { get; private set; } = new Dictionary<int, CustomModelConfig>();
|
||||||
@@ -17,4 +17,3 @@ namespace SM64Lib.Configuration
|
|||||||
return conf;
|
return conf;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,15 +1,9 @@
|
|||||||
using Pilz.IO;
|
using Pilz.IO;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SM64Lib.Configuration
|
namespace SM64Lib.Configuration;
|
||||||
{
|
|
||||||
public class PatchingConfig
|
public class PatchingConfig
|
||||||
{
|
{
|
||||||
public EmbeddedFilesContainer TweakBackups { get; } = new EmbeddedFilesContainer();
|
public EmbeddedFilesContainer TweakBackups { get; } = new EmbeddedFilesContainer();
|
||||||
public bool Patched2DCamera { get; set; } = false;
|
public bool Patched2DCamera { get; set; } = false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,16 +1,15 @@
|
|||||||
using System.Collections.Generic;
|
using global::Newtonsoft.Json.Linq;
|
||||||
using global::System.IO;
|
using global::System.IO;
|
||||||
using Microsoft.VisualBasic.CompilerServices;
|
|
||||||
using global::Newtonsoft.Json.Linq;
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using SM64Lib.ASM;
|
||||||
using SM64Lib.Behaviors;
|
using SM64Lib.Behaviors;
|
||||||
using SM64Lib.Objects.ObjectBanks;
|
using SM64Lib.Objects.ObjectBanks;
|
||||||
using SM64Lib.ASM;
|
|
||||||
using SM64Lib.Objects.ObjectBanks.Data;
|
using SM64Lib.Objects.ObjectBanks.Data;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace SM64Lib.Configuration;
|
||||||
|
|
||||||
namespace SM64Lib.Configuration
|
|
||||||
{
|
|
||||||
public class RomConfig
|
public class RomConfig
|
||||||
{
|
{
|
||||||
// Levels
|
// Levels
|
||||||
@@ -75,4 +74,3 @@ namespace SM64Lib.Configuration
|
|||||||
File.WriteAllText(filePath, JObject.FromObject(this, serializer).ToString());
|
File.WriteAllText(filePath, JObject.FromObject(this, serializer).ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,14 +1,7 @@
|
|||||||
using System;
|
namespace SM64Lib.Configuration;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SM64Lib.Configuration
|
|
||||||
{
|
|
||||||
public class ScrollTexConfig
|
public class ScrollTexConfig
|
||||||
{
|
{
|
||||||
public bool UseCustomBehavior { get; set; } = false;
|
public bool UseCustomBehavior { get; set; } = false;
|
||||||
public int CustomBehaviorAddress { get; set; } = -1;
|
public int CustomBehaviorAddress { get; set; } = -1;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using global::System.IO;
|
using global::System.IO;
|
||||||
|
|
||||||
namespace SM64Lib.Data
|
namespace SM64Lib.Data;
|
||||||
{
|
|
||||||
public class BinaryArrayData : BinaryStreamData
|
public class BinaryArrayData : BinaryStreamData
|
||||||
{
|
{
|
||||||
public FileAccess RomAccess { get; private set; } = FileAccess.Read;
|
public FileAccess RomAccess { get; private set; } = FileAccess.Read;
|
||||||
@@ -25,4 +25,3 @@ namespace SM64Lib.Data
|
|||||||
// End Function
|
// End Function
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -2,8 +2,8 @@
|
|||||||
using SM64Lib.Data.System;
|
using SM64Lib.Data.System;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace SM64Lib.Data
|
namespace SM64Lib.Data;
|
||||||
{
|
|
||||||
public abstract class BinaryData : IDisposable
|
public abstract class BinaryData : IDisposable
|
||||||
{
|
{
|
||||||
public delegate void AnyBinaryDataEventHandler(BinaryData data);
|
public delegate void AnyBinaryDataEventHandler(BinaryData data);
|
||||||
@@ -277,4 +277,3 @@ namespace SM64Lib.Data
|
|||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,11 +1,10 @@
|
|||||||
using global::System.IO;
|
using global::System.IO;
|
||||||
|
|
||||||
namespace SM64Lib.Data
|
namespace SM64Lib.Data;
|
||||||
{
|
|
||||||
public class BinaryFile : BinaryStreamData
|
public class BinaryFile : BinaryStreamData
|
||||||
{
|
{
|
||||||
public BinaryFile(string filePath, FileMode fileMode, FileAccess fileAccess) : base(new FileStream(filePath, fileMode, fileAccess))
|
public BinaryFile(string filePath, FileMode fileMode, FileAccess fileAccess) : base(new FileStream(filePath, fileMode, fileAccess))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
using global::System.IO;
|
using global::System.IO;
|
||||||
|
|
||||||
namespace SM64Lib.Data
|
namespace SM64Lib.Data;
|
||||||
{
|
|
||||||
public class BinaryRom : BinaryFile
|
public class BinaryRom : BinaryFile
|
||||||
{
|
{
|
||||||
public BinaryRom(RomManager rommgr, FileAccess romAccess) : base(rommgr.RomFile, FileMode.Open, romAccess)
|
public BinaryRom(RomManager rommgr, FileAccess romAccess) : base(rommgr.RomFile, FileMode.Open, romAccess)
|
||||||
@@ -23,4 +23,3 @@ namespace SM64Lib.Data
|
|||||||
// End Function
|
// End Function
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
using global::System.IO;
|
using global::SM64Lib.SegmentedBanking;
|
||||||
using global::SM64Lib.SegmentedBanking;
|
using global::System.IO;
|
||||||
|
|
||||||
|
namespace SM64Lib.Data;
|
||||||
|
|
||||||
namespace SM64Lib.Data
|
|
||||||
{
|
|
||||||
public class BinarySegBank : BinaryData
|
public class BinarySegBank : BinaryData
|
||||||
{
|
{
|
||||||
public SegmentedBank SegBank { get; private set; }
|
public SegmentedBank SegBank { get; private set; }
|
||||||
@@ -30,4 +30,3 @@ namespace SM64Lib.Data
|
|||||||
return SegBank.Data;
|
return SegBank.Data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
using global::System.IO;
|
using global::System.IO;
|
||||||
|
|
||||||
namespace SM64Lib.Data
|
namespace SM64Lib.Data;
|
||||||
{
|
|
||||||
public class BinaryStreamData : BinaryData
|
public class BinaryStreamData : BinaryData
|
||||||
{
|
{
|
||||||
protected readonly Stream myBaseStream;
|
protected readonly Stream myBaseStream;
|
||||||
@@ -17,4 +17,3 @@ namespace SM64Lib.Data
|
|||||||
return myBaseStream;
|
return myBaseStream;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Microsoft.VisualBasic.CompilerServices;
|
|
||||||
|
|
||||||
namespace SM64Lib.Data.System
|
namespace SM64Lib.Data.System;
|
||||||
{
|
|
||||||
public class Bits
|
public class Bits
|
||||||
{
|
{
|
||||||
public static byte[] ByteToBitArray(byte b)
|
public static byte[] ByteToBitArray(byte b)
|
||||||
@@ -95,4 +94,3 @@ namespace SM64Lib.Data.System
|
|||||||
return ByteToBoolArray(b)[index];
|
return ByteToBoolArray(b)[index];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace SM64Lib.Data.System
|
namespace SM64Lib.Data.System;
|
||||||
{
|
|
||||||
internal static class SwapInts
|
internal static class SwapInts
|
||||||
{
|
{
|
||||||
public static short SwapInt16(short value)
|
public static short SwapInt16(short value)
|
||||||
@@ -59,4 +59,3 @@ namespace SM64Lib.Data.System
|
|||||||
return BitConverter.ToSingle(bytes, 0);
|
return BitConverter.ToSingle(bytes, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
using global::System.Runtime.InteropServices;
|
using global::System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace SM64Lib
|
namespace SM64Lib;
|
||||||
{
|
|
||||||
static class Datatypecastes
|
static class Datatypecastes
|
||||||
{
|
{
|
||||||
public static short LongToInt16(long value)
|
public static short LongToInt16(long value)
|
||||||
@@ -36,4 +36,3 @@ namespace SM64Lib
|
|||||||
public byte ByteValue;
|
public byte ByteValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,13 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SM64Lib.EventArguments
|
namespace SM64Lib.EventArguments;
|
||||||
{
|
|
||||||
public class GetTextProfileInfoEventArgs : EventArgs
|
public class GetTextProfileInfoEventArgs : EventArgs
|
||||||
{
|
{
|
||||||
public Text.Profiles.TextProfileInfo ProfileInfo { get; set; }
|
public Text.Profiles.TextProfileInfo ProfileInfo { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,13 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SM64Lib.EventArguments
|
namespace SM64Lib.EventArguments;
|
||||||
{
|
|
||||||
public class PrepairingRomEventArgs : EventArgs
|
public class PrepairingRomEventArgs : EventArgs
|
||||||
{
|
{
|
||||||
public IEnumerable<BaseTweakScriptInfo> ScriptInfos { get; set; }
|
public IEnumerable<BaseTweakScriptInfo> ScriptInfos { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace SM64Lib.EventArguments
|
namespace SM64Lib.EventArguments;
|
||||||
{
|
|
||||||
public class RomVersionEventArgs : EventArgs
|
public class RomVersionEventArgs : EventArgs
|
||||||
{
|
{
|
||||||
public RomVersion RomVersion { get; set; }
|
public RomVersion RomVersion { get; set; }
|
||||||
@@ -11,4 +11,3 @@ namespace SM64Lib.EventArguments
|
|||||||
RomVersion = romVersion;
|
RomVersion = romVersion;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace SM64Lib.Exceptions
|
namespace SM64Lib.Exceptions;
|
||||||
{
|
|
||||||
public class InvalidMD5HashException : Exception
|
public class InvalidMD5HashException : Exception
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,11 +1,10 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace SM64Lib.Exceptions
|
namespace SM64Lib.Exceptions;
|
||||||
{
|
|
||||||
public class RomCompatiblityException : Exception
|
public class RomCompatiblityException : Exception
|
||||||
{
|
{
|
||||||
public RomCompatiblityException(string msg) : base(msg)
|
public RomCompatiblityException(string msg) : base(msg)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -2,8 +2,8 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
namespace SM64Lib.Extensions
|
namespace SM64Lib.Extensions;
|
||||||
{
|
|
||||||
public static class Int16Extensions
|
public static class Int16Extensions
|
||||||
{
|
{
|
||||||
public static bool IsInRange(this short value, short min, short max)
|
public static bool IsInRange(this short value, short min, short max)
|
||||||
@@ -30,4 +30,3 @@ namespace SM64Lib.Extensions
|
|||||||
JsonSerializer.CreateDefault().Populate(sr, target);
|
JsonSerializer.CreateDefault().Populate(sr, target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace SM64Lib
|
namespace SM64Lib;
|
||||||
{
|
|
||||||
public class FilePathsConfiguration
|
public class FilePathsConfiguration
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -46,4 +46,3 @@ namespace SM64Lib
|
|||||||
dic[key] = path;
|
dic[key] = path;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -8,8 +8,8 @@ using System.IO.Compression;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
|
|
||||||
namespace SM64Lib
|
namespace SM64Lib;
|
||||||
{
|
|
||||||
public static class General
|
public static class General
|
||||||
{
|
{
|
||||||
public static byte[] DisplayListCommandsWithPointerList { get; private set; } = new byte[] { 0x1, 0x3, 0x4, 0x6, 0xFD };
|
public static byte[] DisplayListCommandsWithPointerList { get; private set; } = new byte[] { 0x1, 0x3, 0x4, 0x6, 0xFD };
|
||||||
@@ -600,4 +600,3 @@ namespace SM64Lib
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
namespace SM64Lib.Geolayout
|
namespace SM64Lib.Geolayout;
|
||||||
{
|
|
||||||
public enum BackgroundIDs : byte
|
public enum BackgroundIDs : byte
|
||||||
{
|
{
|
||||||
HauntedForest = 0x6,
|
HauntedForest = 0x6,
|
||||||
@@ -15,4 +15,3 @@ namespace SM64Lib.Geolayout
|
|||||||
PurpleClouds = 0x9,
|
PurpleClouds = 0x9,
|
||||||
Custom = 0xA
|
Custom = 0xA
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
namespace SM64Lib.Geolayout
|
namespace SM64Lib.Geolayout;
|
||||||
{
|
|
||||||
public enum BackgroundPointers
|
public enum BackgroundPointers
|
||||||
{
|
{
|
||||||
HauntedForestStart = 0xC3B030, // &HC3AFD5
|
HauntedForestStart = 0xC3B030, // &HC3AFD5
|
||||||
@@ -24,4 +24,3 @@ namespace SM64Lib.Geolayout
|
|||||||
PurpleCloudsStart = 0xC7FAB0, // &HC7FA55
|
PurpleCloudsStart = 0xC7FAB0, // &HC7FA55
|
||||||
PurpleCloudsEnd = 0xC9FBF0 // &HC9FB95
|
PurpleCloudsEnd = 0xC9FBF0 // &HC9FB95
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,11 +1,5 @@
|
|||||||
using System;
|
namespace SM64Lib.Geolayout;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SM64Lib.Geolayout
|
|
||||||
{
|
|
||||||
public class CameraFrustrum
|
public class CameraFrustrum
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -17,4 +11,3 @@ namespace SM64Lib.Geolayout
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public short CameraNear { get; set; } = 0x64;
|
public short CameraNear { get; set; } = 0x64;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
namespace SM64Lib.Geolayout
|
namespace SM64Lib.Geolayout;
|
||||||
{
|
|
||||||
public enum CameraPresets
|
public enum CameraPresets
|
||||||
{
|
{
|
||||||
OpenCamera = 0x1,
|
OpenCamera = 0x1,
|
||||||
@@ -20,4 +20,3 @@ namespace SM64Lib.Geolayout
|
|||||||
Unmoving2,
|
Unmoving2,
|
||||||
FreeRoamCamera
|
FreeRoamCamera
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
namespace SM64Lib.Geolayout
|
namespace SM64Lib.Geolayout;
|
||||||
{
|
|
||||||
public enum DefaultGeolayers
|
public enum DefaultGeolayers
|
||||||
{
|
{
|
||||||
SolidNoAntiAlias,
|
SolidNoAntiAlias,
|
||||||
@@ -12,4 +12,3 @@ namespace SM64Lib.Geolayout
|
|||||||
TranslucentDecal2,
|
TranslucentDecal2,
|
||||||
TranslucentDecal3
|
TranslucentDecal3
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
namespace SM64Lib.Geolayout
|
namespace SM64Lib.Geolayout;
|
||||||
{
|
|
||||||
public enum EnvironmentEffects
|
public enum EnvironmentEffects
|
||||||
{
|
{
|
||||||
NoEffect = 0x0,
|
NoEffect = 0x0,
|
||||||
@@ -11,4 +11,3 @@ namespace SM64Lib.Geolayout
|
|||||||
WaterRelated1 = 0xD,
|
WaterRelated1 = 0xD,
|
||||||
WaterRelated2 = 0x2
|
WaterRelated2 = 0x2
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
|
|
||||||
namespace SM64Lib.Geolayout
|
namespace SM64Lib.Geolayout;
|
||||||
{
|
|
||||||
public enum GeoAsmPointer : uint
|
public enum GeoAsmPointer : uint
|
||||||
{
|
{
|
||||||
EnvironmentEffect = 0x802761D0,
|
EnvironmentEffect = 0x802761D0,
|
||||||
Water = 0x802D104C,
|
Water = 0x802D104C,
|
||||||
Unknown = 0x802CD1E8
|
Unknown = 0x802CD1E8
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,14 +1,13 @@
|
|||||||
using System.Collections.Generic;
|
using global::SM64Lib.Geolayout.Script;
|
||||||
|
using global::SM64Lib.Geolayout.Script.Commands;
|
||||||
using global::System.IO;
|
using global::System.IO;
|
||||||
using Microsoft.VisualBasic;
|
using Microsoft.VisualBasic;
|
||||||
using Microsoft.VisualBasic.CompilerServices;
|
|
||||||
using global::SM64Lib.Geolayout.Script;
|
|
||||||
using global::SM64Lib.Geolayout.Script.Commands;
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace SM64Lib.Geolayout;
|
||||||
|
|
||||||
namespace SM64Lib.Geolayout
|
|
||||||
{
|
|
||||||
public class Geolayout
|
public class Geolayout
|
||||||
{
|
{
|
||||||
[JsonProperty]
|
[JsonProperty]
|
||||||
@@ -377,4 +376,3 @@ namespace SM64Lib.Geolayout
|
|||||||
Object
|
Object
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace SM64Lib.Geolayout
|
namespace SM64Lib.Geolayout;
|
||||||
{
|
|
||||||
public class Geopointer
|
public class Geopointer
|
||||||
{
|
{
|
||||||
public byte Layer { get; set; } = default;
|
public byte Layer { get; set; } = default;
|
||||||
@@ -39,4 +39,3 @@ namespace SM64Lib.Geolayout
|
|||||||
Index = index;
|
Index = index;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,11 +1,5 @@
|
|||||||
using System;
|
namespace SM64Lib.Geolayout;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SM64Lib.Geolayout
|
|
||||||
{
|
|
||||||
public class ObjectShadow
|
public class ObjectShadow
|
||||||
{
|
{
|
||||||
public bool Enabled { get; set; } = false;
|
public bool Enabled { get; set; } = false;
|
||||||
@@ -13,4 +7,3 @@ namespace SM64Lib.Geolayout
|
|||||||
public short Scale { get; set; }
|
public short Scale { get; set; }
|
||||||
public byte Solidity { get; set; } = 0xFF;
|
public byte Solidity { get; set; } = 0xFF;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
using System;
|
namespace SM64Lib.Geolayout;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SM64Lib.Geolayout
|
|
||||||
{
|
|
||||||
public enum ObjectShadowType
|
public enum ObjectShadowType
|
||||||
{
|
{
|
||||||
Circle_9Verts = 0,
|
Circle_9Verts = 0,
|
||||||
@@ -21,4 +15,3 @@ namespace SM64Lib.Geolayout
|
|||||||
RectangleHardcodedOffset = 50,
|
RectangleHardcodedOffset = 50,
|
||||||
CirclePlayer = 99
|
CirclePlayer = 99
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using SM64Lib.Json;
|
using SM64Lib.Json;
|
||||||
|
|
||||||
namespace SM64Lib.Geolayout.Script
|
namespace SM64Lib.Geolayout.Script;
|
||||||
{
|
|
||||||
[JsonConverter(typeof(GeolayoutscriptCommandJsonConverter))]
|
[JsonConverter(typeof(GeolayoutscriptCommandJsonConverter))]
|
||||||
public class GeolayoutCommand : BaseCommand<GeolayoutCommandTypes>
|
public class GeolayoutCommand : BaseCommand<GeolayoutCommandTypes>
|
||||||
{
|
{
|
||||||
@@ -37,4 +37,3 @@ namespace SM64Lib.Geolayout.Script
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
using global::SM64Lib.Script;
|
using global::SM64Lib.Script;
|
||||||
|
|
||||||
namespace SM64Lib.Geolayout.Script
|
namespace SM64Lib.Geolayout.Script;
|
||||||
{
|
|
||||||
public class GeolayoutCommandCollection : BaseCommandCollection<GeolayoutCommand, GeolayoutCommandTypes>
|
public class GeolayoutCommandCollection : BaseCommandCollection<GeolayoutCommand, GeolayoutCommandTypes>
|
||||||
{
|
{
|
||||||
public int IndexOfFirst(GeolayoutCommandTypes cmdType)
|
public int IndexOfFirst(GeolayoutCommandTypes cmdType)
|
||||||
@@ -15,4 +15,3 @@ namespace SM64Lib.Geolayout.Script
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
using global::System.Numerics;
|
using global::System.Numerics;
|
||||||
using Microsoft.VisualBasic.CompilerServices;
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace SM64Lib.Geolayout.Script
|
namespace SM64Lib.Geolayout.Script
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
namespace SM64Lib.Geolayout.Script
|
namespace SM64Lib.Geolayout.Script;
|
||||||
{
|
|
||||||
public enum GeolayoutCommandTypes
|
public enum GeolayoutCommandTypes
|
||||||
{
|
{
|
||||||
BranchAndStore = 0x0,
|
BranchAndStore = 0x0,
|
||||||
@@ -34,4 +34,3 @@ namespace SM64Lib.Geolayout.Script
|
|||||||
x1f = 0xF,
|
x1f = 0xF,
|
||||||
DrawingDistance = 0x20
|
DrawingDistance = 0x20
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,13 +1,12 @@
|
|||||||
using System.Collections.Generic;
|
using global::SM64Lib.Data;
|
||||||
using global::System.IO;
|
using global::System.IO;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Microsoft.VisualBasic.CompilerServices;
|
|
||||||
using global::SM64Lib.Data;
|
|
||||||
using SM64Lib.SegmentedBanking;
|
using SM64Lib.SegmentedBanking;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SM64Lib.Geolayout.Script;
|
||||||
|
|
||||||
namespace SM64Lib.Geolayout.Script
|
|
||||||
{
|
|
||||||
public class Geolayoutscript : GeolayoutCommandCollection
|
public class Geolayoutscript : GeolayoutCommandCollection
|
||||||
{
|
{
|
||||||
public List<int> GeopointerOffsets = new List<int>();
|
public List<int> GeopointerOffsets = new List<int>();
|
||||||
@@ -236,4 +235,3 @@ namespace SM64Lib.Geolayout.Script
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
namespace SM64Lib.Geolayout
|
namespace SM64Lib.Geolayout;
|
||||||
{
|
|
||||||
public enum TerrainTypes
|
public enum TerrainTypes
|
||||||
{
|
{
|
||||||
NoramlA = 0x0,
|
NoramlA = 0x0,
|
||||||
@@ -11,4 +11,3 @@ namespace SM64Lib.Geolayout
|
|||||||
WaterLevels,
|
WaterLevels,
|
||||||
SlipperySlide
|
SlipperySlide
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,14 +1,11 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace SM64Lib.Json;
|
||||||
|
|
||||||
namespace SM64Lib.Json
|
|
||||||
{
|
|
||||||
public class ArrayReferencePreservngConverter : JsonConverter
|
public class ArrayReferencePreservngConverter : JsonConverter
|
||||||
{
|
{
|
||||||
const string refProperty = "$ref";
|
const string refProperty = "$ref";
|
||||||
@@ -84,4 +81,3 @@ namespace SM64Lib.Json
|
|||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,15 +1,9 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using SM64Lib.Behaviors.Script;
|
|
||||||
using SM64Lib.Geolayout.Script;
|
using SM64Lib.Geolayout.Script;
|
||||||
using SM64Lib.Model.Fast3D;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SM64Lib.Json
|
namespace SM64Lib.Json;
|
||||||
{
|
|
||||||
internal class BaseCommandJsonConverter : JsonConverter
|
internal class BaseCommandJsonConverter : JsonConverter
|
||||||
{
|
{
|
||||||
public override bool CanConvert(Type objectType)
|
public override bool CanConvert(Type objectType)
|
||||||
@@ -58,4 +52,3 @@ namespace SM64Lib.Json
|
|||||||
public int BankAddress { get; set; }
|
public int BankAddress { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,14 +1,9 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using SM64Lib.Behaviors.Script;
|
using SM64Lib.Behaviors.Script;
|
||||||
using SM64Lib.Model.Fast3D;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SM64Lib.Json
|
namespace SM64Lib.Json;
|
||||||
{
|
|
||||||
internal class BehaviorscriptCommandJsonConverter : JsonConverter
|
internal class BehaviorscriptCommandJsonConverter : JsonConverter
|
||||||
{
|
{
|
||||||
public override bool CanConvert(Type objectType)
|
public override bool CanConvert(Type objectType)
|
||||||
@@ -57,4 +52,3 @@ namespace SM64Lib.Json
|
|||||||
public int BankAddress { get; set; }
|
public int BankAddress { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,15 +1,11 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using SM64Lib.Model.Fast3D;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Z.Collections.Extensions;
|
using Z.Collections.Extensions;
|
||||||
|
|
||||||
namespace SM64Lib.Json
|
namespace SM64Lib.Json;
|
||||||
{
|
|
||||||
internal class ComplexDictionarJsonConverter<TKey, TValue> : JsonConverter
|
internal class ComplexDictionarJsonConverter<TKey, TValue> : JsonConverter
|
||||||
{
|
{
|
||||||
public override bool CanConvert(Type objectType)
|
public override bool CanConvert(Type objectType)
|
||||||
@@ -32,4 +28,3 @@ namespace SM64Lib.Json
|
|||||||
serializer.Serialize(writer, ((Dictionary<TKey, TValue>)value).ToArray());
|
serializer.Serialize(writer, ((Dictionary<TKey, TValue>)value).ToArray());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -2,14 +2,11 @@
|
|||||||
using SM64Lib.Model.Fast3D;
|
using SM64Lib.Model.Fast3D;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
|
||||||
using System.IO.Compression;
|
using System.IO.Compression;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SM64Lib.Json
|
namespace SM64Lib.Json;
|
||||||
{
|
|
||||||
internal class Fast3DBufferJsonConverter : JsonConverter
|
internal class Fast3DBufferJsonConverter : JsonConverter
|
||||||
{
|
{
|
||||||
public override bool CanConvert(Type objectType)
|
public override bool CanConvert(Type objectType)
|
||||||
@@ -68,4 +65,3 @@ namespace SM64Lib.Json
|
|||||||
public bool IsDeflateStream { get; set; } = false;
|
public bool IsDeflateStream { get; set; } = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,15 +1,9 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using SM64Lib.Behaviors.Script;
|
|
||||||
using SM64Lib.Geolayout.Script;
|
using SM64Lib.Geolayout.Script;
|
||||||
using SM64Lib.Model.Fast3D;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SM64Lib.Json
|
namespace SM64Lib.Json;
|
||||||
{
|
|
||||||
internal class GeolayoutscriptCommandJsonConverter : JsonConverter
|
internal class GeolayoutscriptCommandJsonConverter : JsonConverter
|
||||||
{
|
{
|
||||||
public override bool CanConvert(Type objectType)
|
public override bool CanConvert(Type objectType)
|
||||||
@@ -58,4 +52,3 @@ namespace SM64Lib.Json
|
|||||||
public int BankAddress { get; set; }
|
public int BankAddress { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,12 +1,7 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SM64Lib.Json
|
namespace SM64Lib.Json;
|
||||||
{
|
|
||||||
internal class JsonHelper
|
internal class JsonHelper
|
||||||
{
|
{
|
||||||
public static JsonSerializer CreateJsonSerializer(
|
public static JsonSerializer CreateJsonSerializer(
|
||||||
@@ -33,4 +28,3 @@ namespace SM64Lib.Json
|
|||||||
return serializer;
|
return serializer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,16 +1,9 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using SM64Lib.Behaviors.Script;
|
|
||||||
using SM64Lib.Geolayout.Script;
|
|
||||||
using SM64Lib.Levels.Script;
|
using SM64Lib.Levels.Script;
|
||||||
using SM64Lib.Model.Fast3D;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SM64Lib.Json
|
namespace SM64Lib.Json;
|
||||||
{
|
|
||||||
internal class LevelscriptCommandJsonConverter : JsonConverter
|
internal class LevelscriptCommandJsonConverter : JsonConverter
|
||||||
{
|
{
|
||||||
public override bool CanConvert(Type objectType)
|
public override bool CanConvert(Type objectType)
|
||||||
@@ -59,4 +52,3 @@ namespace SM64Lib.Json
|
|||||||
public int BankAddress { get; set; }
|
public int BankAddress { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,17 +1,9 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using SM64Lib.Behaviors.Script;
|
|
||||||
using SM64Lib.Geolayout.Script;
|
|
||||||
using SM64Lib.Levels.Script;
|
|
||||||
using SM64Lib.Model.Fast3D;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SM64Lib.Json
|
namespace SM64Lib.Json;
|
||||||
{
|
|
||||||
internal class MemoryStreamJsonConverter : JsonConverter
|
internal class MemoryStreamJsonConverter : JsonConverter
|
||||||
{
|
{
|
||||||
public override bool CanConvert(Type objectType)
|
public override bool CanConvert(Type objectType)
|
||||||
@@ -34,4 +26,3 @@ namespace SM64Lib.Json
|
|||||||
serializer.Serialize(writer, ms.ToArray());
|
serializer.Serialize(writer, ms.ToArray());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using global::System.Drawing;
|
using global::System.Drawing;
|
||||||
|
|
||||||
namespace SM64Lib.Levels
|
namespace SM64Lib.Levels;
|
||||||
{
|
|
||||||
public class AreaBG
|
public class AreaBG
|
||||||
{
|
{
|
||||||
public AreaBGs Type { get; set; } = AreaBGs.Levelbackground;
|
public AreaBGs Type { get; set; } = AreaBGs.Levelbackground;
|
||||||
@@ -13,4 +13,3 @@ namespace SM64Lib.Levels
|
|||||||
Levelbackground,
|
Levelbackground,
|
||||||
Color
|
Color
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,11 +1,5 @@
|
|||||||
using System;
|
namespace SM64Lib.Levels;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SM64Lib.Levels
|
|
||||||
{
|
|
||||||
public enum AreaReverbLevel : byte
|
public enum AreaReverbLevel : byte
|
||||||
{
|
{
|
||||||
None,
|
None,
|
||||||
@@ -20,4 +14,3 @@ namespace SM64Lib.Levels
|
|||||||
Level09 = 0x40,
|
Level09 = 0x40,
|
||||||
Level10 = 0x70
|
Level10 = 0x70
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
namespace SM64Lib.Levels
|
namespace SM64Lib.Levels;
|
||||||
{
|
|
||||||
public enum ObjectBank0x0C
|
public enum ObjectBank0x0C
|
||||||
{
|
{
|
||||||
Disabled,
|
Disabled,
|
||||||
@@ -120,4 +120,3 @@ namespace SM64Lib.Levels
|
|||||||
GreenWater = 0x30000,
|
GreenWater = 0x30000,
|
||||||
LavaWater = 0x40000
|
LavaWater = 0x40000
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
using global::SM64Lib.Data;
|
using global::SM64Lib.Data;
|
||||||
|
|
||||||
namespace SM64Lib.Levels
|
namespace SM64Lib.Levels;
|
||||||
{
|
|
||||||
public interface ILevelManager
|
public interface ILevelManager
|
||||||
{
|
{
|
||||||
void LoadLevel(Level lvl, RomManager rommgr, ushort LevelID, uint segAddress);
|
void LoadLevel(Level lvl, RomManager rommgr, ushort LevelID, uint segAddress);
|
||||||
LevelSaveResult SaveLevel(Level lvl, RomManager rommgr, BinaryData output, ref uint curOff);
|
LevelSaveResult SaveLevel(Level lvl, RomManager rommgr, BinaryData output, ref uint curOff);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,19 +1,17 @@
|
|||||||
using System.Collections.Generic;
|
using global::SM64Lib.Levels.Script;
|
||||||
using System.Data;
|
|
||||||
using global::System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using Microsoft.VisualBasic;
|
|
||||||
using Microsoft.VisualBasic.CompilerServices;
|
|
||||||
using global::SM64Lib.Levels.Script;
|
|
||||||
using global::SM64Lib.Levels.Script.Commands;
|
using global::SM64Lib.Levels.Script.Commands;
|
||||||
using global::SM64Lib.Objects.ObjectBanks.Data;
|
using global::SM64Lib.Objects.ObjectBanks.Data;
|
||||||
using global::SM64Lib.SegmentedBanking;
|
using global::SM64Lib.SegmentedBanking;
|
||||||
using SM64Lib.Objects.ModelBanks;
|
using Microsoft.VisualBasic;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using SM64Lib.Objects.ModelBanks;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace SM64Lib.Levels;
|
||||||
|
|
||||||
namespace SM64Lib.Levels
|
|
||||||
{
|
|
||||||
public abstract class Level
|
public abstract class Level
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -326,4 +324,3 @@ namespace SM64Lib.Levels
|
|||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,15 +1,13 @@
|
|||||||
using System.Collections.Generic;
|
using global::SM64Lib.Levels.Script;
|
||||||
using System.Linq;
|
|
||||||
using Microsoft.VisualBasic.CompilerServices;
|
|
||||||
using global::SM64Lib.Levels.Script;
|
|
||||||
using global::SM64Lib.Levels.Script.Commands;
|
using global::SM64Lib.Levels.Script.Commands;
|
||||||
using global::SM64Lib.Levels.ScrolTex;
|
using global::SM64Lib.Levels.ScrolTex;
|
||||||
using global::SM64Lib.Model;
|
using global::SM64Lib.Model;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace SM64Lib.Levels;
|
||||||
|
|
||||||
namespace SM64Lib.Levels
|
|
||||||
{
|
|
||||||
public abstract class LevelArea
|
public abstract class LevelArea
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -175,4 +173,3 @@ namespace SM64Lib.Levels
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,13 +1,12 @@
|
|||||||
using global::System.Drawing;
|
using global::SM64Lib.Model.Fast3D;
|
||||||
|
using global::System.Drawing;
|
||||||
using global::System.IO;
|
using global::System.IO;
|
||||||
using Microsoft.VisualBasic.CompilerServices;
|
|
||||||
using SM64Lib.Data.System;
|
|
||||||
using global::SM64Lib.Model.Fast3D;
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using SM64Lib.Data.System;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace SM64Lib.Levels
|
namespace SM64Lib.Levels;
|
||||||
{
|
|
||||||
public class LevelBG
|
public class LevelBG
|
||||||
{
|
{
|
||||||
private Bitmap _Image = null;
|
private Bitmap _Image = null;
|
||||||
@@ -233,4 +232,3 @@ namespace SM64Lib.Levels
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,15 +1,11 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using SM64Lib.Levels.Script;
|
using SM64Lib.Levels.Script;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.IO.Compression;
|
using System.IO.Compression;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SM64Lib.Levels
|
namespace SM64Lib.Levels;
|
||||||
{
|
|
||||||
public class LevelExport
|
public class LevelExport
|
||||||
{
|
{
|
||||||
// P r o p e r t i e s
|
// P r o p e r t i e s
|
||||||
@@ -76,4 +72,3 @@ namespace SM64Lib.Levels
|
|||||||
return export;
|
return export;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
using System;
|
namespace SM64Lib.Levels;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SM64Lib.Levels
|
|
||||||
{
|
|
||||||
public enum LevelExportContentType
|
public enum LevelExportContentType
|
||||||
{
|
{
|
||||||
Unknown,
|
Unknown,
|
||||||
@@ -14,4 +8,3 @@ namespace SM64Lib.Levels
|
|||||||
Objects,
|
Objects,
|
||||||
Warps
|
Warps
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,14 +1,7 @@
|
|||||||
using System;
|
namespace SM64Lib.Levels;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SM64Lib.Levels
|
|
||||||
{
|
|
||||||
public enum LevelExportFileFormat
|
public enum LevelExportFileFormat
|
||||||
{
|
{
|
||||||
JSON,
|
JSON,
|
||||||
PlainText
|
PlainText
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -2,11 +2,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SM64Lib.Levels
|
namespace SM64Lib.Levels;
|
||||||
{
|
|
||||||
public static class LevelExportImporter
|
public static class LevelExportImporter
|
||||||
{
|
{
|
||||||
public static void ImportLevel(LevelExport export, RomManager destRomManager, KeyValuePair<Level, short>[] levelIDs)
|
public static void ImportLevel(LevelExport export, RomManager destRomManager, KeyValuePair<Level, short>[] levelIDs)
|
||||||
@@ -72,4 +70,3 @@ namespace SM64Lib.Levels
|
|||||||
throw new NotSupportedException();
|
throw new NotSupportedException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
using System.Collections.Generic;
|
using global::Newtonsoft.Json.Linq;
|
||||||
using global::System.IO;
|
using global::System.IO;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using global::Newtonsoft.Json.Linq;
|
|
||||||
using static SM64Lib.TextValueConverter.TextValueConverter;
|
using static SM64Lib.TextValueConverter.TextValueConverter;
|
||||||
|
|
||||||
namespace SM64Lib.Levels
|
namespace SM64Lib.Levels;
|
||||||
{
|
|
||||||
public class LevelInfoDataTabelList : List<LevelInfoDataTabelList.Level>
|
public class LevelInfoDataTabelList : List<LevelInfoDataTabelList.Level>
|
||||||
{
|
{
|
||||||
public void ReadFromFile(string FileName)
|
public void ReadFromFile(string FileName)
|
||||||
@@ -140,4 +140,3 @@ namespace SM64Lib.Levels
|
|||||||
Bowserbattle
|
Bowserbattle
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -2,8 +2,8 @@
|
|||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace SM64Lib.Levels
|
namespace SM64Lib.Levels;
|
||||||
{
|
|
||||||
public class LevelList : List<Level>
|
public class LevelList : List<Level>
|
||||||
{
|
{
|
||||||
public bool NeedToSave
|
public bool NeedToSave
|
||||||
@@ -19,4 +19,3 @@ namespace SM64Lib.Levels
|
|||||||
get => this.Sum(n => n.Length);
|
get => this.Sum(n => n.Length);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,10 +1,4 @@
|
|||||||
using System;
|
using global::SM64Lib.Data;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Data;
|
|
||||||
using global::System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using Microsoft.VisualBasic.CompilerServices;
|
|
||||||
using global::SM64Lib.Data;
|
|
||||||
using global::SM64Lib.Data.System;
|
using global::SM64Lib.Data.System;
|
||||||
using global::SM64Lib.Geolayout.Script;
|
using global::SM64Lib.Geolayout.Script;
|
||||||
using global::SM64Lib.Geolayout.Script.Commands;
|
using global::SM64Lib.Geolayout.Script.Commands;
|
||||||
@@ -13,9 +7,14 @@ using global::SM64Lib.Levels.Script.Commands;
|
|||||||
using global::SM64Lib.Levels.ScrolTex;
|
using global::SM64Lib.Levels.ScrolTex;
|
||||||
using global::SM64Lib.Model;
|
using global::SM64Lib.Model;
|
||||||
using global::SM64Lib.SegmentedBanking;
|
using global::SM64Lib.SegmentedBanking;
|
||||||
|
using global::System.IO;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace SM64Lib.Levels;
|
||||||
|
|
||||||
namespace SM64Lib.Levels
|
|
||||||
{
|
|
||||||
public class LevelManager : ILevelManager
|
public class LevelManager : ILevelManager
|
||||||
{
|
{
|
||||||
public bool EnableLoadingAreaReverb { get; set; } = true;
|
public bool EnableLoadingAreaReverb { get; set; } = true;
|
||||||
@@ -891,4 +890,3 @@ namespace SM64Lib.Levels
|
|||||||
return saveres;
|
return saveres;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
using System;
|
using global::System.IO;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using global::System.IO;
|
|
||||||
using Microsoft.VisualBasic.CompilerServices;
|
|
||||||
|
|
||||||
namespace SM64Lib.Levels
|
namespace SM64Lib.Levels;
|
||||||
{
|
|
||||||
public class LevelNumberTable : List<byte>
|
public class LevelNumberTable : List<byte>
|
||||||
{
|
{
|
||||||
public void ReadFromROM(string Romfile, int Address = 0xE8D98)
|
public void ReadFromROM(string Romfile, int Address = 0xE8D98)
|
||||||
@@ -24,4 +23,3 @@ namespace SM64Lib.Levels
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,9 +1,8 @@
|
|||||||
using global::SM64Lib.SegmentedBanking;
|
using global::SM64Lib.SegmentedBanking;
|
||||||
|
|
||||||
namespace SM64Lib.Levels
|
namespace SM64Lib.Levels;
|
||||||
{
|
|
||||||
public class LevelSaveResult
|
public class LevelSaveResult
|
||||||
{
|
{
|
||||||
public SegmentedBank Bank0x19 { get; set; } = null;
|
public SegmentedBank Bank0x19 { get; set; } = null;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
|
|
||||||
namespace SM64Lib.Levels
|
namespace SM64Lib.Levels;
|
||||||
{
|
|
||||||
public enum LevelType
|
public enum LevelType
|
||||||
{
|
{
|
||||||
Original,
|
Original,
|
||||||
SM64RomManager,
|
SM64RomManager,
|
||||||
SM64Editor
|
SM64Editor
|
||||||
}
|
}
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user