Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>netstandard2.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion InfectedRose.Builder/InfectedRose.Builder.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>netstandard2.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
13 changes: 7 additions & 6 deletions InfectedRose.Core/HashMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public void Add(object obj)
{
Structure.Add(obj);
}

public virtual byte[] Compile(Action<int> onData = default)
{
var compiled = new List<byte>();
Expand All @@ -23,7 +23,7 @@ public virtual byte[] Compile(Action<int> onData = default)
foreach (var obj in Structure)
{
onData?.Invoke(++index);

switch (obj)
{
case null:
Expand Down Expand Up @@ -58,7 +58,7 @@ public virtual byte[] Compile(Action<int> onData = default)

return compiled.ToArray();
}

private static byte[] ToBytes(object obj)
{
if (!obj.GetType().IsValueType)
Expand All @@ -67,22 +67,23 @@ private static byte[] ToBytes(object obj)

return new byte[0];
}

var size = Marshal.SizeOf(obj);
var buf = new byte[size];
var ptr = Marshal.AllocHGlobal(size);

Marshal.StructureToPtr(obj, ptr, false);
Marshal.Copy(ptr, buf, 0, size);
Marshal.FreeHGlobal(ptr);

return buf;
}

public static HashMap operator +(HashMap map, object obj)
{
map.Add(obj);

return map;
}
}
}
}
5 changes: 2 additions & 3 deletions InfectedRose.Core/InfectedRose.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>8</LangVersion>
<TargetFramework>netstandard2.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="RakDotNet.IO" Version="1.0.0" />
<PackageReference Include="RakDotNet.IO" Version="1.0.1" />
</ItemGroup>

</Project>
1 change: 1 addition & 0 deletions InfectedRose.Core/LegoDataDictionary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ public string ToString(string separator)
{
var val = v switch
{
bool boolean => boolean ? "1" : "0",
Vector2 vec2 => $"{vec2.X}{InfoSeparator}{vec2.Y}",
Vector3 vec3 => $"{vec3.X}{InfoSeparator}{vec3.Z}{InfoSeparator}{vec3.Y}",
Vector4 vec4 => $"{vec4.X}{InfoSeparator}{vec4.Z}{InfoSeparator}{vec4.Y}{InfoSeparator}{vec4.W}",
Expand Down
4 changes: 2 additions & 2 deletions InfectedRose.Database/InfectedRose.Database.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>8</LangVersion>
<TargetFramework>netstandard2.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand All @@ -15,6 +14,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Data.Sqlite" Version="3.1.2" />
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageReference Include="System.Data.SqlClient" Version="4.3.0" />
</ItemGroup>

Expand Down
3 changes: 1 addition & 2 deletions InfectedRose.Geometry/InfectedRose.Geometry.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>8</LangVersion>
<TargetFramework>netstandard2.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion InfectedRose.Interface/InfectedRose.Interface.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>netstandard2.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
3 changes: 1 addition & 2 deletions InfectedRose.Luz/InfectedRose.Luz.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>8</LangVersion>
<TargetFramework>netstandard2.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion InfectedRose.Luz/LuzFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ public void Deserialize(BitReader reader)
if (Version >= 0x26)
{
SpawnPoint = reader.Read<Vector3>();
SpawnRotation = reader.Read<Quaternion>();
var spawnRotation = reader.Read<Quaternion>();
SpawnRotation = new Quaternion(spawnRotation.Y, spawnRotation.Z, spawnRotation.W, spawnRotation.X);
}

var sceneCount = Version < 0x25 ? reader.Read<byte>() : reader.Read<uint>();
Expand Down
3 changes: 1 addition & 2 deletions InfectedRose.Lvl/InfectedRose.Lvl.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>8</LangVersion>
<TargetFramework>netstandard2.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
3 changes: 1 addition & 2 deletions InfectedRose.Nif/InfectedRose.Nif.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>8</LangVersion>
<TargetFramework>netstandard2.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion InfectedRose.Pipeline/InfectedRose.Pipeline.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>netstandard2.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
3 changes: 1 addition & 2 deletions InfectedRose.Terrain/InfectedRose.Terrain.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>8</LangVersion>
<TargetFramework>netstandard2.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
3 changes: 1 addition & 2 deletions InfectedRose.Triggers/InfectedRose.Triggers.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>8</LangVersion>
<TargetFramework>netstandard2.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion InfectedRose.Utilities/InfectedRose.Utilities.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>netstandard2.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion InfectedRose.World/InfectedRose.World.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>netstandard2.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions InfectedRose.World/WorldObject.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Numerics;
using System.Xml.Serialization;
using InfectedRose.Core;
using InfectedRose.Lvl;

namespace InfectedRose.World
Expand Down