From a603b0692f07a5dc9980b9e76c7cddfe57805c12 Mon Sep 17 00:00:00 2001 From: "SND\\edgbla_cp" Date: Sat, 21 Apr 2012 18:03:54 +0000 Subject: git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@77577 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- plugins/peopsxgl/gte_accuracy.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/peopsxgl/gte_accuracy.c b/plugins/peopsxgl/gte_accuracy.c index 9a1b7ed6..04375423 100644 --- a/plugins/peopsxgl/gte_accuracy.c +++ b/plugins/peopsxgl/gte_accuracy.c @@ -20,6 +20,8 @@ #include "stdafx.h" #include "externals.h" +#include + // TODO: use malloc and pointer to the array's center. float gteCoords[0x800 * 2][0x800 * 2][2]; @@ -51,8 +53,8 @@ int getGteVertex(short sx, short sy, float *fx, float *fy) if(sx >= -0x800 && sx <= 0x7ff && sy >= -0x800 && sy <= 0x7ff) { - if(((int)gteCoords[sy + 0x800][sx + 0x800][0]) == sx && - ((int)gteCoords[sy + 0x800][sx + 0x800][1]) == sy) + if((fabsf(gteCoords[sy + 0x800][sx + 0x800][0] - sx) < 1.0) && + (fabsf(gteCoords[sy + 0x800][sx + 0x800][1] - sy) < 1.0)) { *fx = gteCoords[sy + 0x800][sx + 0x800][0]; *fy = gteCoords[sy + 0x800][sx + 0x800][1]; -- cgit v1.2.3