mirror of
https://github.com/haven1433/HexManiacAdvance.git
synced 2026-04-26 08:18:18 -05:00
fixing bugs from discord
This commit is contained in:
parent
2cb0ad134b
commit
18c0c52b6c
|
|
@ -363,7 +363,13 @@ namespace HavenSoft.HexManiac.Core.Models.Code {
|
|||
matchingGames = ExtractMatchingGames(ref engineLine);
|
||||
Usage = engineLine.Split(new[] { ' ' }, 2).Last();
|
||||
var usageTokens = Usage.Split(" ", StringSplitOptions.RemoveEmptyEntries);
|
||||
Usage = usageTokens[0] + " " + " ".Join(usageTokens.Skip(1).Select(t => t.Split(".:|<".ToCharArray())[0]));
|
||||
Usage = usageTokens[0] + " " + " ".Join(usageTokens.Skip(1).Select(t => {
|
||||
var hasBraces = t.StartsWith('[') && t.EndsWith(']');
|
||||
if (hasBraces) t = t.Substring(1, t.Length - 2);
|
||||
t = t.Split(".:|<".ToCharArray())[0];
|
||||
if (hasBraces) t = $"[{t}]";
|
||||
return t;
|
||||
}));
|
||||
|
||||
var tokens = engineLine.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
var lineCode = new List<byte>();
|
||||
|
|
|
|||
|
|
@ -536,6 +536,7 @@ namespace HexManiac.Core.Models.Runs.Sprites {
|
|||
if (IsSecondary) blockCount = 1024 - blockCount;
|
||||
var attributeStart = ReadPointer(attributeOffset);
|
||||
EstimateBlockCount(ref blockCount, start, attributeStart, maxUsedBlock);
|
||||
if (!start.InRange(0, model.Count) || !attributeStart.InRange(0, model.Count)) return new byte[0][];
|
||||
var data = new byte[blockCount][];
|
||||
for (int i = 0; i < blockCount; i++) {
|
||||
data[i] = new byte[BytesPerAttribute];
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user