diff --git a/SilentPatchSA/SilentPatchSA.cpp b/SilentPatchSA/SilentPatchSA.cpp index 83b1dd4..b65eff9 100644 --- a/SilentPatchSA/SilentPatchSA.cpp +++ b/SilentPatchSA/SilentPatchSA.cpp @@ -1023,6 +1023,13 @@ void CarCtrlReInit_SilentPatch_Newsteam() *TimeNextMadDriverChaseCreated_Newsteam = (static_cast(Int32Rand()) / INT32_MAX) * 600.0f + 600.0f; } +static void (*orgDrawScriptSpritesAndRectangles)(uint8_t); +void DrawScriptSpritesAndRectangles( uint8_t arg ) +{ + RwRenderStateSet( rwRENDERSTATETEXTUREFILTER, (void*)rwFILTERLINEAR ); + orgDrawScriptSpritesAndRectangles( arg ); +} + #include @@ -3137,6 +3144,12 @@ void Patch_SA_10() // 014C cargen counter fix (by spaceeinstein) Patch( 0x06F3E2C + 1, 0xBF ); // movzx ecx, ax -> movsx ecx, ax Patch( 0x6F3E32, 0x74 ); // jge -> jz + + + // Linear filtering on script sprites + ReadCall( 0x58C092, orgDrawScriptSpritesAndRectangles ); + InjectHook( 0x58C092, DrawScriptSpritesAndRectangles ); + } void Patch_SA_11() @@ -3837,6 +3850,11 @@ void Patch_SA_Steam() Patch( 0x6F3E32, 0x74 ); // jge -> jz + // Linear filtering on script sprites + ReadCall( 0x59A3F2, orgDrawScriptSpritesAndRectangles ); + InjectHook( 0x59A3F2, DrawScriptSpritesAndRectangles ); + + // Fixed police scanner names char* pScannerNames = *(char**)0x4F2B83; strcpy(pScannerNames + (8*113), "WESTP"); @@ -4369,6 +4387,13 @@ void Patch_SA_NewSteam_Common() Patch( do_processing.get(27 + 1), 0xBF ); // movzx eax, word ptr [edi+1Ah] -> movsx eax, word ptr [edi+1Ah] Patch( do_processing.get(41), 0x74 ); // jge -> jz } + + // Linear filtering on script sprites + { + auto drawScriptSprites = pattern( "81 EC 94 01 00 00 53 56 57 50" ).get_one(); + ReadCall( drawScriptSprites.get(10), orgDrawScriptSpritesAndRectangles ); + InjectHook( drawScriptSprites.get(10), DrawScriptSpritesAndRectangles ); + } }