diff options
| author | SND\edgbla_cp <SND\edgbla_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2012-04-21 18:03:54 +0000 |
|---|---|---|
| committer | SND\edgbla_cp <SND\edgbla_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2012-04-21 18:03:54 +0000 |
| commit | a603b0692f07a5dc9980b9e76c7cddfe57805c12 (patch) | |
| tree | 632388593b4eda763f64b23b9393f6fa6cb0e51d /plugins | |
| parent | 4bf6253973b7a89fb4697e5e55f822a086cf7951 (diff) | |
| download | pcsxr-a603b0692f07a5dc9980b9e76c7cddfe57805c12.tar.gz | |
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@77577 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/peopsxgl/gte_accuracy.c | 6 |
1 files changed, 4 insertions, 2 deletions
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 <math.h>
+
// 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];
|
