#cheat #bindings #engine #sdk #plugin #toml #exported-functions

ceplugin

Rust 对 Cheat Engine 插件 SDK 的绑定

3 个不稳定版本

使用旧的 Rust 2015

0.6.0 2017年3月7日
0.5.1 2017年3月6日
0.5.0 2017年3月5日

#9 in #cheat

APL-1.0 许可证

20MB
269K SLoC

Pascal 175K SLoC // 0.1% comments C 61K SLoC // 0.1% comments Visual Studio Project 10K SLoC C++ 8K SLoC // 0.1% comments Lua 7K SLoC // 0.3% comments Assembly 3.5K SLoC // 0.1% comments ReScript 1K SLoC // 0.0% comments CUDA 877 SLoC // 0.2% comments Rust 430 SLoC // 0.0% comments Visual Studio Solution 414 SLoC Puppet 380 SLoC Forge Config 198 SLoC Batch 194 SLoC // 0.0% comments Bitbake 64 SLoC // 0.1% comments VB6 8 SLoC INI 2 SLoC // 0.6% comments Shell 1 SLoC // 0.9% comments

包含 (Windows DLL, 1.5MB) dbghelp.dll, (Windows DLL, 1.5MB) dbghelp.dll, (Windows DLL, 1.5MB) sqlite3.dll, (Windows DLL, 570KB) sqlite3.dll, (Windows DLL, 290KB) libmikmod32.dll, (Windows DLL, 320KB) libmikmod64.dll 和更多.

文档

示例

Cargo.toml

[package]
name = "myplugin"
version = "0.1.0"
authors = ["Mack Stump <[email protected]>"]

[lib]
crate-type = ["cdylib"]

[dependencies]
libc = "0.2.21"
winapi = "0.2.8"
ceplugin = "0.5.0"

src/lib.rs

extern crate ceplugin;
extern crate libc;
extern crate winapi;

use winapi::*;

#[no_mangle]
pub extern "stdcall" fn CEPlugin_InitializePlugin(ef: &mut ceplugin::ExportedFunctions,
                                                  pluginid: libc::c_int) -> BOOL {
    (ef.ShowMessage)(b"Plugin Initialized\0" as *const libc::c_char);

    TRUE
}

#[no_mangle]
pub extern "stdcall" fn CEPlugin_GetVersion(pv: &mut ceplugin::PluginVersion,
                                            sizeofpluginversion: libc::c_int) -> BOOL {
    pv.version = 2;
    pv.pluginname = b"Rust CE Plugin\0" as *const libc::c_char;

    TRUE
}

#[no_mangle]
pub extern "stdcall" fn CEPlugin_DisablePlugin() -> BOOL {
    TRUE
}

依赖项