This commit is contained in:
twinaphex
2020-05-17 23:09:23 +02:00
parent b894f42f2b
commit ed784833dd

View File

@@ -163,10 +163,12 @@ static uint32 InefficientSqrt(uint32 z) {
} }
#endif #endif
void FCEU_ZapperSetTolerance(int t) { void FCEU_ZapperSetTolerance(int t)
{
#ifdef ROUNDED_TARGET #ifdef ROUNDED_TARGET
uint32_t y;
tolerance = t <= MAX_TOLERANCE ? t : MAX_TOLERANCE; tolerance = t <= MAX_TOLERANCE ? t : MAX_TOLERANCE;
for (uint32 y = 0 ; y <= tolerance ; y++) for (y = 0; y <= tolerance; y++)
targetExpansion[y] = InefficientSqrt(tolerance*tolerance-y*y); targetExpansion[y] = InefficientSqrt(tolerance*tolerance-y*y);
#else #else
tolerance = t; tolerance = t;