From 3c75a8e8875209eff6a3dba20efa256cc3666ee4 Mon Sep 17 00:00:00 2001 From: cat_or_not <41955154+catornot@users.noreply.github.com> Date: Sun, 4 Feb 2024 14:59:29 -0500 Subject: [PATCH] me when I forget to add a file and fix tests --- .github/test_rrplug.ps1 | 1 + .github/workflows/rrplug-test-build.yml | 2 +- src/interfaces/external.rs | 6 +++--- src/mid/server/cplayer.rs | 11 +++++++++++ 4 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 .github/test_rrplug.ps1 create mode 100644 src/mid/server/cplayer.rs diff --git a/.github/test_rrplug.ps1 b/.github/test_rrplug.ps1 new file mode 100644 index 0000000..c71146e --- /dev/null +++ b/.github/test_rrplug.ps1 @@ -0,0 +1 @@ +cargo test --target x86_64-pc-windows-msvc \ No newline at end of file diff --git a/.github/workflows/rrplug-test-build.yml b/.github/workflows/rrplug-test-build.yml index cd96f2c..71ccda1 100644 --- a/.github/workflows/rrplug-test-build.yml +++ b/.github/workflows/rrplug-test-build.yml @@ -29,4 +29,4 @@ jobs: run: | cargo clippy - name: Run tests - run: cargo test --verbose + run: cargo test --verbose --target x86_64-pc-windows-msvc diff --git a/src/interfaces/external.rs b/src/interfaces/external.rs index 5d1bfc1..7353477 100644 --- a/src/interfaces/external.rs +++ b/src/interfaces/external.rs @@ -22,8 +22,8 @@ use crate::{ /// /// # Example /// ``` -/// # use super::*; -/// # use self::*; +/// # use rrplug::create_external_interface; +/// # use rrplug::interfaces::external::*; /// create_external_interface! { /// pub ExternalInterface + module_to_contain_it => { /// pub fn smth() -> (); @@ -31,7 +31,7 @@ use crate::{ /// } /// } /// -/// let interface = ExternalInterface::from_dll_name("some_dll.dll", "ExternalInterface"); +/// let interface = unsafe { ExternalInterface::from_dll_name("some_dll.dll", "ExternalInterface") }; /// ``` #[macro_export] macro_rules! create_external_interface { diff --git a/src/mid/server/cplayer.rs b/src/mid/server/cplayer.rs new file mode 100644 index 0000000..b88dbfe --- /dev/null +++ b/src/mid/server/cplayer.rs @@ -0,0 +1,11 @@ +//! stuff related to `CPlayer` entity + +use std::ffi::c_void; + +use crate::offset_functions; + +offset_functions! { + CPLAYER_VTABLE + CPlayerVtable for WhichDll::Engine => { + vtable = *const c_void where offset(0x0); // TODO : rigth offset + } +}