aboutsummaryrefslogtreecommitdiff
path: root/src/engine.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine.zig')
-rw-r--r--src/engine.zig11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/engine.zig b/src/engine.zig
index e58c1f2..05caa11 100644
--- a/src/engine.zig
+++ b/src/engine.zig
@@ -1,3 +1,6 @@
+const std = @import("std");
+const windows = std.os.windows;
+
pub const ECommandTarget_t = enum(c_int) {
CBUF_FIRST_PLAYER = 0,
CBUF_LAST_PLAYER = 1, // MAX_SPLITSCREEN_CLIENTS - 1, MAX_SPLITSCREEN_CLIENTS = 2
@@ -48,3 +51,11 @@ pub const CbufType = struct {
};
pub var Cbuf: ?CbufType = null;
+
+pub fn init(module: windows.HMODULE) void {
+ Cbuf = .{
+ .GetCurrentPlayer = @ptrFromInt(@intFromPtr(module) + 0x120630),
+ .AddText = @ptrFromInt(@intFromPtr(module) + 0x1203B0),
+ .Execute = @ptrFromInt(@intFromPtr(module) + 0x1204B0),
+ };
+}