Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates for string support and version increases on demos #106

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 3 additions & 3 deletions OmsiExtensions.sln
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TriggersSample", "_OmsiHook
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VideoDemo", "_OmsiHookExamples\VideoDemo\VideoDemo.csproj", "{D94FF6D3-08AA-41CB-B9B9-F82E860E6E96}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClickablePlaneDemo", "_OmsiHookExamples\ClickablePlaneDemo\ClickablePlaneDemo.csproj", "{49428923-732C-4541-8C97-C6D9C004D726}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ClickablePlaneDemo", "_OmsiHookExamples\ClickablePlaneDemo\ClickablePlaneDemo.csproj", "{49428923-732C-4541-8C97-C6D9C004D726}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -97,8 +97,8 @@ Global
{CBCB99EF-DD1A-4D4D-A9A8-9BF251FDCD1B}.ReleaseAndDocs|Any CPU.Build.0 = Release|Win32
{CBCB99EF-DD1A-4D4D-A9A8-9BF251FDCD1B}.ReleaseAndDocs|x86.ActiveCfg = Release|Win32
{CBCB99EF-DD1A-4D4D-A9A8-9BF251FDCD1B}.ReleaseAndDocs|x86.Build.0 = Release|Win32
{CDB17143-5653-48BE-AAC8-8419D5B4FD2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CDB17143-5653-48BE-AAC8-8419D5B4FD2C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CDB17143-5653-48BE-AAC8-8419D5B4FD2C}.Debug|Any CPU.ActiveCfg = Debug|x86
{CDB17143-5653-48BE-AAC8-8419D5B4FD2C}.Debug|Any CPU.Build.0 = Debug|x86
{CDB17143-5653-48BE-AAC8-8419D5B4FD2C}.Debug|x86.ActiveCfg = Debug|x86
{CDB17143-5653-48BE-AAC8-8419D5B4FD2C}.Debug|x86.Build.0 = Debug|x86
{CDB17143-5653-48BE-AAC8-8419D5B4FD2C}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
2 changes: 1 addition & 1 deletion OmsiHook/MemArray/MemArrayString.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public override string this[int index]
{
if (cached)
arrayCache[index] = value;
Memory.WriteMemoryArrayItemSafe(Address, Memory.AllocateString(value).Result, index);
Memory.WriteMemoryArrayItemSafe(Address, Memory.AllocateString(value, wide).Result, index);
}
}

Expand Down
4 changes: 2 additions & 2 deletions OmsiHook/WrappedOmsiClasses/OmsiComplMapObjInst.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class OmsiComplMapObjInst : OmsiPhysObjInst
private MemArrayStringDict funcsStrings;
private OmsiFuncClass[] funcs;
private float[] consts;
private MemArray<OmsiWStringInternal, OmsiWString> stringVars;
private MemArrayString stringVars;

internal OmsiComplMapObjInst(Memory omsiMemory, int baseAddress) : base(omsiMemory, baseAddress) { }
public OmsiComplMapObjInst() : base() { }
Expand Down Expand Up @@ -196,7 +196,7 @@ public string GetStringVariable(string varName)
if (index >= stringVars.Count || index < 0)
throw new KeyNotFoundException($"String Variable '{varName}' not found in object. - Index Out Of Bounds");
stringVars.UpdateFromHook(index);
return stringVars[index].String;
return stringVars[index];
}

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions OmsiHook/WrappedOmsiClasses/OmsiComplObjInst.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ public MemArrayPtr<float> PublicVars
{
get => new(Memory, Memory.ReadMemory<int>(Address + 0x28));
}
public MemArray<OmsiWStringInternal, OmsiWString> StringVars
public MemArrayString StringVars
{
get => new(Memory, Address + 0x2c, false);
get => new(Memory, Address + 0x2c, true, false);
}
/* TODO:
public OmsiChangeTex[] ChangeTexs
Expand Down
2 changes: 1 addition & 1 deletion _OmsiHookExamples/BasicCLI/BasicCLI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="OmsiHook" Version="2.4.4" />
<PackageReference Include="OmsiHook" Version="2.5.3" />
amathieson marked this conversation as resolved.
Show resolved Hide resolved
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="OmsiHook" Version="2.4.4" />
<PackageReference Include="OmsiHook" Version="2.5.3" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion _OmsiHookExamples/EventSample/EventSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="OmsiHook" Version="2.4.4" />
<PackageReference Include="OmsiHook" Version="2.5.3" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion _OmsiHookExamples/TriggersSample/TriggersSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="OmsiHook" Version="2.4.4" />
<PackageReference Include="OmsiHook" Version="2.5.3" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion _OmsiHookExamples/VideoDemo/VideoDemo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<ItemGroup>
<PackageReference Include="FFMediaToolkit" Version="4.5.1" />
<PackageReference Include="OmsiHook" Version="2.4.4" />
<PackageReference Include="OmsiHook" Version="2.5.3" />
</ItemGroup>

</Project>
Loading