From 2ce4742bf69faebb16ea1710c4d4e7902b1be0f1 Mon Sep 17 00:00:00 2001 From: Dragorn421 Date: Tue, 25 Jun 2024 00:39:08 +0200 Subject: Fix misc 22 (#1971) * remove trailing whitespace * fix/docbug about dright for next page of fault menu * // size = ...; -> // size = ... * access `ColliderJntSph.elements` as an array * fixup doc in PreRender.c * empty line after decl * gdSPDefLights1 xyz arguments for direction are signed 8bit values * doc bug of bad use of free in EffDust actor * decimal for Actor.colorFilterTimer * shopItemEntries -> sShopItemEntries * HEISHI4_AT_KAKRIKO_ENTRANCE -> HEISHI4_AT_KAKARIKO_ENTRANCE * format --- src/code/PreRender.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/code/PreRender.c') diff --git a/src/code/PreRender.c b/src/code/PreRender.c index df71d059e..e960acfec 100644 --- a/src/code/PreRender.c +++ b/src/code/PreRender.c @@ -659,11 +659,12 @@ void PreRender_AntiAliasFilter(PreRender* this, s32 x, s32 y) { } } - // The background color is determined by averaging the penultimate minimum and maximum pixels, and subtracting the + // The background color is determined by adding the penultimate minimum and maximum pixels, and subtracting the // ForeGround color: - // BackGround = (pMax + pMin) - (ForeGround) * 2 + // BackGround = (pMax + pMin) - ForeGround // OutputColor = cvg * ForeGround + (1.0 - cvg) * BackGround + // = ForeGround + (1.0 - cvg) * (BackGround - ForeGround) invCvg = 7 - buffCvg[7]; outR = buffR[7] + ((s32)(invCvg * (pmaxR + pminR - (buffR[7] * 2)) + 4) >> 3); outG = buffG[7] + ((s32)(invCvg * (pmaxG + pminG - (buffG[7] * 2)) + 4) >> 3); -- cgit v1.2.3