mirror of
https://github.com/CookiePLMonster/SilentPatch.git
synced 2025-01-31 06:57:28 +05:00
III: Apply bilinear filtering on the player skin
This commit is contained in:
parent
50c6a9bda3
commit
ac3601e12c
1 changed files with 22 additions and 1 deletions
|
@ -530,6 +530,19 @@ namespace RemoveDriverStatusFix
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ============= Apply bilinear filtering on the player skin =============
|
||||||
|
namespace SkinTextureFilter
|
||||||
|
{
|
||||||
|
static RwTexture* (*orgRwTextureCreate)(RwRaster* raster);
|
||||||
|
static RwTexture* RwTextureCreate_SetLinearFilter(RwRaster* raster)
|
||||||
|
{
|
||||||
|
RwTexture* texture = orgRwTextureCreate(raster);
|
||||||
|
RwTextureSetFilterMode(texture, rwFILTERLINEAR);
|
||||||
|
return texture;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void InjectDelayedPatches_III_Common( bool bHasDebugMenu, const wchar_t* wcModulePath )
|
void InjectDelayedPatches_III_Common( bool bHasDebugMenu, const wchar_t* wcModulePath )
|
||||||
{
|
{
|
||||||
using namespace Memory;
|
using namespace Memory;
|
||||||
|
@ -1308,9 +1321,17 @@ void Patch_III_Common()
|
||||||
// By Nick007J
|
// By Nick007J
|
||||||
{
|
{
|
||||||
auto pickNodeRandomly = get_pattern("3B 44 24 24 74 09", 4);
|
auto pickNodeRandomly = get_pattern("3B 44 24 24 74 09", 4);
|
||||||
|
|
||||||
Patch<uint8_t>(pickNodeRandomly, 0x75);
|
Patch<uint8_t>(pickNodeRandomly, 0x75);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Apply bilinear filtering on the player skin
|
||||||
|
{
|
||||||
|
using namespace SkinTextureFilter;
|
||||||
|
|
||||||
|
auto getSkinTexture = get_pattern("E8 ? ? ? ? 89 C3 59 55");
|
||||||
|
InterceptCall(getSkinTexture, orgRwTextureCreate, RwTextureCreate_SetLinearFilter);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||||
|
|
Loading…
Reference in a new issue