From b75e98217d0d3fb1dcb54defe5fb694fa5adb437 Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Mon, 22 Apr 2024 22:52:52 +0800 Subject: [PATCH] [saco] Implement `IDirect3DDevice9Hook::SetTransform(...)` --- saco/d3dhook/IDirect3DDevice9Hook.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/saco/d3dhook/IDirect3DDevice9Hook.cpp b/saco/d3dhook/IDirect3DDevice9Hook.cpp index 4eaecad..158c04b 100644 --- a/saco/d3dhook/IDirect3DDevice9Hook.cpp +++ b/saco/d3dhook/IDirect3DDevice9Hook.cpp @@ -13,6 +13,7 @@ #include "../main.h" extern IDirect3DDevice9 *pD3DDevice; +D3DXMATRIX matView, matProj, matWorld; //------------------------------------------- @@ -244,7 +245,18 @@ HRESULT __stdcall IDirect3DDevice9Hook::Clear(DWORD Count, CONST D3DRECT* pRects HRESULT __stdcall IDirect3DDevice9Hook::SetTransform(D3DTRANSFORMSTATETYPE State, CONST D3DMATRIX* mat) { - // TODO: IDirect3DDevice9Hook::SetTransform + switch (State) + { + case D3DTS_PROJECTION: + matProj = *mat; + break; + case D3DTS_VIEW: + matView = *mat; + break; + case D3DTS_WORLD: + matWorld = *mat; + break; + } return pD3DDevice->SetTransform(State, mat); }