Skip to content

Commit

Permalink
Add rainbow killstreak sheen changer, Fix up the register names
Browse files Browse the repository at this point in the history
  • Loading branch information
Viceroyy committed Aug 30, 2024
1 parent 8040b08 commit f8c0064
Show file tree
Hide file tree
Showing 94 changed files with 362 additions and 460 deletions.
19 changes: 9 additions & 10 deletions Fusion/Fusion.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<SupportJustMyCode>true</SupportJustMyCode>
<LanguageStandard_C>stdc17</LanguageStandard_C>
<LanguageStandard_C>stdclatest</LanguageStandard_C>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand Down Expand Up @@ -146,7 +146,7 @@
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<SupportJustMyCode>true</SupportJustMyCode>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<LanguageStandard_C>stdc17</LanguageStandard_C>
<LanguageStandard_C>stdclatest</LanguageStandard_C>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand All @@ -171,7 +171,7 @@
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<BufferSecurityCheck>false</BufferSecurityCheck>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<LanguageStandard_C>stdc17</LanguageStandard_C>
<LanguageStandard_C>stdclatest</LanguageStandard_C>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand All @@ -186,19 +186,18 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>false</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;ZYDIS_STATIC_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpplatest</LanguageStandard>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>
</OmitFramePointers>
<OmitFramePointers>false</OmitFramePointers>
<StringPooling>true</StringPooling>
<EnableEnhancedInstructionSet>AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<BufferSecurityCheck>false</BufferSecurityCheck>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<LanguageStandard_C>stdc17</LanguageStandard_C>
<LanguageStandard_C>stdclatest</LanguageStandard_C>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand Down Expand Up @@ -243,7 +242,6 @@
<ClCompile Include="src\Features\EnginePrediction\EnginePrediction.cpp" />
<ClCompile Include="src\Features\ImGui\Render.cpp" />
<ClCompile Include="src\Features\ImGui\Menu\Menu.cpp" />
<ClCompile Include="src\Features\Killstreak\Killstreak.cpp" />
<ClCompile Include="src\Features\Records\Records.cpp" />
<ClCompile Include="src\Features\Misc\Misc.cpp" />
<ClCompile Include="src\Features\NetworkFix\NetworkFix.cpp" />
Expand Down Expand Up @@ -302,6 +300,7 @@
<ClCompile Include="src\Hooks\ClientState_GetClientInterpAmount.cpp" />
<ClCompile Include="src\Hooks\ClientState_ProcessFixAngle.cpp" />
<ClCompile Include="src\Hooks\CL_CheckForPureServerWhitelist.cpp" />
<ClCompile Include="src\Hooks\CClientState_GetTime.cpp" />
<ClCompile Include="src\Hooks\CL_Move.cpp" />
<ClCompile Include="src\Hooks\CL_ReadPackets.cpp" />
<ClCompile Include="src\Hooks\CMatchInviteNotification_OnTick.cpp" />
Expand All @@ -311,6 +310,7 @@
<ClCompile Include="src\Hooks\CParticleProperty_Create.cpp" />
<ClCompile Include="src\Hooks\CPlayerResource_GetTeamColor.cpp" />
<ClCompile Include="src\Hooks\CPrediction_RunCommand.cpp" />
<ClCompile Include="src\Hooks\CProxyAnimatedWeaponSheen_OnBind.cpp" />
<ClCompile Include="src\Hooks\CRendering3dView_EnableWorldFog.cpp" />
<ClCompile Include="src\Hooks\CSequenceTransitioner_CheckForSequenceChange.cpp" />
<ClCompile Include="src\Hooks\CSkyboxView_Enable3dSkyboxFog.cpp" />
Expand Down Expand Up @@ -412,7 +412,6 @@
<ClInclude Include="src\Features\EnginePrediction\EnginePrediction.h" />
<ClInclude Include="src\Features\ImGui\FontAwesome\FontAwesome.h" />
<ClInclude Include="src\Features\ImGui\FontAwesome\IconDefinitions.h" />
<ClInclude Include="src\Features\Killstreak\Killstreak.h" />
<ClInclude Include="src\Features\Misc\Misc.h" />
<ClInclude Include="src\Features\NetworkFix\NetworkFix.h" />
<ClInclude Include="src\Features\NoSpread\NoSpread.h" />
Expand Down Expand Up @@ -652,4 +651,4 @@
</PropertyGroup>
<Error Condition="!Exists('..\packages\boost.1.85.0\build\boost.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\boost.1.85.0\build\boost.targets'))" />
</Target>
</Project>
</Project>
4 changes: 2 additions & 2 deletions Fusion/Fusion.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@
<ClCompile Include="src\Hooks\CL_CheckForPureServerWhitelist.cpp" />
<ClCompile Include="src\Hooks\ViewRender_LevelInit.cpp" />
<ClCompile Include="src\Hooks\ViewRender_LevelShutdown.cpp" />
<ClCompile Include="src\Features\Killstreak\Killstreak.cpp" />
<ClCompile Include="src\Utils\EventListener\EventListener.cpp" />
<ClCompile Include="src\Hooks\CTFWearable_ShouldDraw.cpp" />
<ClCompile Include="src\Hooks\S_StartSound.cpp" />
Expand All @@ -169,6 +168,8 @@
<ClCompile Include="src\Hooks\CClientScoreBoardDialog_UpdatePlayerAvatar.cpp" />
<ClCompile Include="src\Hooks\C_PlayerResource_GetPlayerName.cpp" />
<ClCompile Include="src\Hooks\CCvar_ConsoleColorPrintf.cpp" />
<ClCompile Include="src\Hooks\CProxyAnimatedWeaponSheen_OnBind.cpp" />
<ClCompile Include="src\Hooks\CClientState_GetTime.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\Utils\UtlVector\UtlVector.h" />
Expand Down Expand Up @@ -425,7 +426,6 @@
<ClInclude Include="src\SDK\Definitions\Interfaces\ViewRenderBeams.h" />
<ClInclude Include="src\SDK\Definitions\Main\UtlMemory.h" />
<ClInclude Include="src\SDK\Definitions\Main\UtlBlockMemory.h" />
<ClInclude Include="src\Features\Killstreak\Killstreak.h" />
<ClInclude Include="src\SDK\Definitions\Main\CCaptureFlag.h" />
<ClInclude Include="src\Utils\EventListener\EventListener.h" />
<ClInclude Include="src\Features\ImGui\FontAwesome\FontAwesome.h" />
Expand Down
4 changes: 2 additions & 2 deletions Fusion/src/Core/Core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,9 @@ bool CCore::ShouldUnload()
}

MAKE_HOOK(IMaterialSystem_FindTexture, U::Memory.GetVFunc(I::MaterialSystem, 81), ITexture*, __fastcall,
void* ecx, char const* pTextureName, const char* pTextureGroupName, bool complain, int nAdditionalCreationFlags)
void* rcx, char const* pTextureName, const char* pTextureGroupName, bool complain, int nAdditionalCreationFlags)
{
ITexture* const result{ CALL_ORIGINAL(ecx, pTextureName, pTextureGroupName, complain, nAdditionalCreationFlags) };
ITexture* const result{ CALL_ORIGINAL(rcx, pTextureName, pTextureGroupName, complain, nAdditionalCreationFlags) };

if (Vars::Visuals::Other::ThePS2Inator.Value)
{
Expand Down
8 changes: 4 additions & 4 deletions Fusion/src/Features/CameraWindow/CameraWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void CCameraWindow::Draw()
}

// Renders another view onto a texture
void CCameraWindow::RenderView(void* ecx, const CViewSetup& pViewSetup)
void CCameraWindow::RenderView(void* rcx, const CViewSetup& pViewSetup)
{
if (!ShouldDraw || !CameraTex)
return;
Expand All @@ -51,10 +51,10 @@ void CCameraWindow::RenderView(void* ecx, const CViewSetup& pViewSetup)
viewSetup.m_flAspectRatio = static_cast<float>(viewSetup.width) / static_cast<float>(viewSetup.height);
viewSetup.fov = 90;

RenderCustomView(ecx, viewSetup, CameraTex);
RenderCustomView(rcx, viewSetup, CameraTex);
}

void CCameraWindow::RenderCustomView(void* ecx, const CViewSetup& pViewSetup, ITexture* pTexture)
void CCameraWindow::RenderCustomView(void* rcx, const CViewSetup& pViewSetup, ITexture* pTexture)
{
const auto renderCtx = I::MaterialSystem->GetRenderContext();

Expand All @@ -63,7 +63,7 @@ void CCameraWindow::RenderCustomView(void* ecx, const CViewSetup& pViewSetup, IT

static auto ViewRender_RenderView = U::Hooks.m_mHooks["ViewRender_RenderView"];
if (ViewRender_RenderView)
ViewRender_RenderView->Original<void(__fastcall*)(void*, const CViewSetup&, int, int)>()(ecx, pViewSetup, VIEW_CLEAR_COLOR | VIEW_CLEAR_DEPTH, RENDERVIEW_UNSPECIFIED);
ViewRender_RenderView->Original<void(__fastcall*)(void*, const CViewSetup&, int, int)>()(rcx, pViewSetup, VIEW_CLEAR_COLOR | VIEW_CLEAR_DEPTH, RENDERVIEW_UNSPECIFIED);

renderCtx->PopRenderTargetAndViewport();
renderCtx->Release();
Expand Down
6 changes: 3 additions & 3 deletions Fusion/src/Features/CameraWindow/CameraWindow.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once
#include "../../SDK/SDK.h"

using RenderViewFN = void(__fastcall*)(void* ecx, const CViewSetup& view, ClearFlags_t nClearFlags, RenderViewInfo_t whatToDraw);
using RenderViewFN = void(__fastcall*)(void* rcx, const CViewSetup& view, ClearFlags_t nClearFlags, RenderViewInfo_t whatToDraw);

class CCameraWindow
{
Expand All @@ -14,8 +14,8 @@ class CCameraWindow

void Init();
void Draw();
void RenderView(void* ecx, const CViewSetup& pViewSetup);
void RenderCustomView(void* ecx, const CViewSetup& pViewSetup, ITexture* pTexture);
void RenderView(void* rcx, const CViewSetup& pViewSetup);
void RenderCustomView(void* rcx, const CViewSetup& pViewSetup, ITexture* pTexture);
};

ADD_FEATURE(CCameraWindow, CameraWindow)
1 change: 1 addition & 0 deletions Fusion/src/Features/ImGui/Menu/Menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,7 @@ void CMenu::MenuVisuals()
FDropdown("Medigun charge", Vars::Visuals::Particle::MedigunChargeEffect, { "Off", "Fireball spell", "Spellbound", "Electrocuted", "Cloud 9", "Electrostatic", "Knifestorm", "Frostbite", "Haunted Phantasm Jr.", "Time Warp", "Stormy 13th Hour", "Terror-Watt", "Sunbeams", "Sunbeams new", "Disco beams", "Pumpkin" }, {}, FDropdown_Right);
FDropdown("Rocket trail", Vars::Visuals::Particle::RocketTrailEffect, { "Off", "Crit", "Bubbles", "Halloween", "Airstrike", "Monoculus", "Cow Mangler", "Cow Mangler charged" }, {}, FDropdown_Left);
FToggle("Rainbow footsteps", Vars::Visuals::Particle::RainbowFootstepEffect);
FToggle("Rainbow killstreak sheen", Vars::Visuals::Particle::RainbowKillstreakSheen, FToggle_Middle);
} EndSection();
if (Section("Bullet"))
{
Expand Down
138 changes: 0 additions & 138 deletions Fusion/src/Features/Killstreak/Killstreak.cpp

This file was deleted.

21 changes: 0 additions & 21 deletions Fusion/src/Features/Killstreak/Killstreak.h

This file was deleted.

4 changes: 2 additions & 2 deletions Fusion/src/Features/Visuals/Chams/Chams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ void CChams::RenderHandler(const DrawModelState_t& pState, const ModelRenderInfo
}
}

bool CChams::RenderViewmodel(void* ecx, int flags, int* iReturn)
bool CChams::RenderViewmodel(void* rcx, int flags, int* iReturn)
{
if (!Vars::Chams::Viewmodel::Weapon.Value)
return false;
Expand All @@ -509,7 +509,7 @@ bool CChams::RenderViewmodel(void* ecx, int flags, int* iReturn)

F::Materials.SetColor(material, sColor, it + 1 == vMaterials.end());
I::ModelRender->ForcedMaterialOverride(material ? material : nullptr);
*iReturn = CBaseAnimating_DrawModel->Original<int(__thiscall*)(void*, int)>()(ecx, flags);
*iReturn = CBaseAnimating_DrawModel->Original<int(__thiscall*)(void*, int)>()(rcx, flags);
}

I::RenderView->SetColorModulation(1.f, 1.f, 1.f);
Expand Down
2 changes: 1 addition & 1 deletion Fusion/src/Features/Visuals/Chams/Chams.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class CChams
void RenderMain(CTFPlayer* pLocal);
void RenderHandler(const DrawModelState_t& pState, const ModelRenderInfo_t& pInfo, matrix3x4* pBoneToWorld);

bool RenderViewmodel(void* ecx, int flags, int* iReturn);
bool RenderViewmodel(void* rcx, int flags, int* iReturn);
bool RenderViewmodel(const DrawModelState_t& pState, const ModelRenderInfo_t& pInfo, matrix3x4* pBoneToWorld);

bool bRendering = false;
Expand Down
Loading

0 comments on commit f8c0064

Please sign in to comment.