mirror of
https://github.com/sampletext32/ParkanPlayground.git
synced 2025-05-19 03:41:18 +03:00
unknown fixes
This commit is contained in:
parent
c50512ea52
commit
ba7c2afe2a
@ -22,7 +22,7 @@ public class GameObjectInfo
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
public int OwningClanIndex { get; set; }
|
public int OwningClanIndex { get; set; }
|
||||||
|
|
||||||
public int UnknownInt3 { get; set; }
|
public int Order { get; set; }
|
||||||
|
|
||||||
public Vector3 Position { get; set; }
|
public Vector3 Position { get; set; }
|
||||||
public Vector3 Rotation { get; set; }
|
public Vector3 Rotation { get; set; }
|
||||||
|
3
MissionTmaLib/Parsing/MissionTma.cs
Normal file
3
MissionTmaLib/Parsing/MissionTma.cs
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
namespace MissionTmaLib.Parsing;
|
||||||
|
|
||||||
|
public record MissionTma(ArealsFileData ArealData, ClansFileData ClansData, GameObjectsFileData GameObjectsData);
|
@ -185,7 +185,11 @@ public class MissionTmaParser
|
|||||||
|
|
||||||
if (3 < gameObjectsFeatureSet)
|
if (3 < gameObjectsFeatureSet)
|
||||||
{
|
{
|
||||||
gameObjectInfo.UnknownInt3 = fileStream.ReadInt32LittleEndian();
|
gameObjectInfo.Order = fileStream.ReadInt32LittleEndian();
|
||||||
|
if (gameObjectInfo.Type == GameObjectType.Building)
|
||||||
|
{
|
||||||
|
gameObjectInfo.Order += int.MaxValue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// читает 12 байт
|
// читает 12 байт
|
||||||
@ -379,5 +383,3 @@ public class MissionTmaParser
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public record MissionTma(ArealsFileData ArealData, ClansFileData ClansData, GameObjectsFileData GameObjectsData);
|
|
@ -1,5 +1,6 @@
|
|||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
using ImGuiNET;
|
using ImGuiNET;
|
||||||
|
using MissionTmaLib;
|
||||||
using MissionTmaLib.Parsing;
|
using MissionTmaLib.Parsing;
|
||||||
using NativeFileDialogSharp;
|
using NativeFileDialogSharp;
|
||||||
using NResLib;
|
using NResLib;
|
||||||
@ -91,6 +92,15 @@ namespace NResUI.ImGuiUI
|
|||||||
var parseResult = MissionTmaParser.ReadFile(path);
|
var parseResult = MissionTmaParser.ReadFile(path);
|
||||||
|
|
||||||
_missionTmaViewModel.SetParseResult(parseResult, path);
|
_missionTmaViewModel.SetParseResult(parseResult, path);
|
||||||
|
|
||||||
|
var orderedBuildings = parseResult.Mission.GameObjectsData.GameObjectInfos.Where(x => x.Type == GameObjectType.Building)
|
||||||
|
.OrderBy(x => x.Order)
|
||||||
|
.ToList();
|
||||||
|
|
||||||
|
foreach (var gameObjectInfo in orderedBuildings)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"{gameObjectInfo.Order} : {gameObjectInfo.DatString}");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -254,9 +254,9 @@ public class MissionTmaExplorer : IImGuiPanel
|
|||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
ImGui.Text(gameObjectInfo.OwningClanIndex.ToString());
|
ImGui.Text(gameObjectInfo.OwningClanIndex.ToString());
|
||||||
|
|
||||||
ImGui.Text("Неизвестное число 3: ");
|
ImGui.Text("Порядковый номер: ");
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
ImGui.Text(gameObjectInfo.UnknownInt3.ToString());
|
ImGui.Text(gameObjectInfo.Order.ToString());
|
||||||
|
|
||||||
ImGui.Text("Вектор позиции: ");
|
ImGui.Text("Вектор позиции: ");
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user