Skip to content

Commit

Permalink
Documentaion bugfix & minor bugfix in D3DTexture
Browse files Browse the repository at this point in the history
  • Loading branch information
space928 committed Dec 2, 2023
1 parent d626884 commit 6a59335
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions OmsiHook/D3DTexture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ public static int BitsPerPixel(D3DFORMAT fmt)
case D3DFORMAT.D3DFMT_A8:
case D3DFORMAT.D3DFMT_P8:
case D3DFORMAT.D3DFMT_L8:
return 8;
// 16 bpp
case D3DFORMAT.D3DFMT_R5G6B5:
case D3DFORMAT.D3DFMT_X1R5G5B5:
Expand Down
6 changes: 3 additions & 3 deletions OmsiHook/articles/building-native-plugins.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Building Native Omsi Plugins
Some features of OmsiHook such as remote method calls require the library using OmsiHook to be running as a
native Omsi plugin. This guide covers some of the basics of building a native Omsi plugin using .NET 5.
native Omsi plugin. This guide covers some of the basics of building a native Omsi plugin using .NET 6 (and above).
An example plugin is available at
[https://github.com/space928/Omsi-Extensions/tree/main/OmsiHookPlugin](https://github.com/space928/Omsi-Extensions/tree/main/OmsiHookPlugin).

Expand Down Expand Up @@ -70,8 +70,8 @@ public static void AccessSystemVariable(ushort variableIndex, [C99Type("float*")
In this example, the exported methods have been written in C# with necessary attributes decorating the methods so
that they get exported correctly later when we include the native export library.

## Setting Up a .NET 5 Project to Use as a Plugin
1. Create a new .NET 5 project with an output type of `Class Library`.
## Setting Up a .NET 6 Project to Use as a Plugin
1. Create a new .NET 6 project with an output type of `Class Library`.
1. Install the [DNNE](https://www.nuget.org/packages/DNNE/) NuGet package.
1. Install the [OmsiHook](https://www.nuget.org/packages/OmsiHook/) NuGet package.
1. Set the platform target to `x86` (Omsi runs exclusively in 32 bit and as such, so must your plugin).
Expand Down

0 comments on commit 6a59335

Please sign in to comment.