From 0339744fdf30d4a7ec757c1d048ce8e27e6120f2 Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Sun, 3 Nov 2024 23:28:25 +0800 Subject: [PATCH] [saco] Implement/match `CEntity::SetClumpAlpha(...)` --- saco/game/entity.cpp | 19 +++++++++++++++++++ saco/game/entity.h | 3 +++ 2 files changed, 22 insertions(+) diff --git a/saco/game/entity.cpp b/saco/game/entity.cpp index 1855b3d..3d47a5b 100644 --- a/saco/game/entity.cpp +++ b/saco/game/entity.cpp @@ -595,6 +595,25 @@ void CEntity::MakeNonCollidable() //----------------------------------------------------------- +void CEntity::SetClumpAlpha(int iAlpha) +{ + if(!m_pEntity || !m_pEntity->pdwRenderWare || m_pEntity->vtable == 0x863C40) + return; + + DWORD dwEntity = (DWORD)m_pEntity; + + _asm mov eax, dwEntity + _asm mov edx, [eax+24] + _asm push iAlpha + _asm push edx + _asm mov eax, 0x732B00 + _asm call eax + _asm pop edx + _asm pop edx +} + +//----------------------------------------------------------- + diff --git a/saco/game/entity.h b/saco/game/entity.h index e92999f..293e53b 100644 --- a/saco/game/entity.h +++ b/saco/game/entity.h @@ -1,6 +1,8 @@ #pragma once +#include "game.h" + //---------------------------------------------------------- class CEntity @@ -43,6 +45,7 @@ public: void EnableTunnelTransition(); void SetApplySpeed(int iState); void MakeNonCollidable(); + void SetClumpAlpha(int iAlpha); virtual void Add(); virtual void Remove();