mirror of
https://github.com/kwsch/pkNX.git
synced 2026-08-22 02:14:32 -05:00
Add Pokémon Legends: Arceus support
.NET5.0 -> .NET6.0 Co-Authored-By: SciresM <8676005+SciresM@users.noreply.github.com>
This commit is contained in:
@@ -70,8 +70,8 @@ public IEnumerable<string> SummaryLines
|
||||
}
|
||||
|
||||
public Function LookupFunction(uint pc) => Array.Find(Functions, f => f.Within(pc));
|
||||
public TableRecord LookupPublic(string name) => Array.Find(this.Publics, t => t.Name == name);
|
||||
public TableRecord LookupPublic(uint addr) => Array.Find(this.Publics, t => t.Address == addr);
|
||||
public TableRecord LookupPublic(string name) => Array.Find(Publics, t => t.Name == name);
|
||||
public TableRecord LookupPublic(uint addr) => Array.Find(Publics, t => t.Address == addr);
|
||||
|
||||
public Function[] Functions { get; protected set; }
|
||||
public TableRecord[] Publics { get; protected set; }
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
namespace pkNX.Structures
|
||||
namespace pkNX.Structures;
|
||||
|
||||
public enum CellType
|
||||
{
|
||||
public enum CellType
|
||||
{
|
||||
None,
|
||||
Bool,
|
||||
Float,
|
||||
Character,
|
||||
Tag,
|
||||
Function
|
||||
};
|
||||
}
|
||||
None,
|
||||
Bool,
|
||||
Float,
|
||||
Character,
|
||||
Tag,
|
||||
Function,
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ private static byte[] CompressInstruction(uint instruction)
|
||||
public static string[] ParseScript(uint[] cmd, int sanity = -1)
|
||||
{
|
||||
// sub_148CBC Moon v1.0
|
||||
List<string> parse = new List<string>();
|
||||
List<string> parse = new();
|
||||
const int sanityMode = 0; // todo
|
||||
|
||||
string ErrorNear(int line, string error)
|
||||
@@ -288,7 +288,7 @@ string ErrorNear(int line, string error)
|
||||
}
|
||||
}
|
||||
|
||||
if (opcode == AmxOpCode.RET || opcode == AmxOpCode.RETN || opcode == AmxOpCode.IRETN)
|
||||
if (opcode is AmxOpCode.RET or AmxOpCode.RETN or AmxOpCode.IRETN)
|
||||
{
|
||||
// Newline after return
|
||||
instrLine += Environment.NewLine;
|
||||
@@ -315,7 +315,7 @@ internal static string EchoIntCommand(AmxOpCode c, params int[] arr)
|
||||
{
|
||||
static string FormatParameter(int param)
|
||||
{
|
||||
if (param < -100 || param > 100)
|
||||
if (param is < -100 or > 100)
|
||||
return $"0x{param:X4}";
|
||||
return param.ToString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user