From 1371a421e5471c9d4dbcafcd13fa9afa2139d4e2 Mon Sep 17 00:00:00 2001 From: aap Date: Sat, 25 Apr 2020 00:47:40 +0200 Subject: [PATCH] fixing the fix --- src/charset.cpp | 4 ++-- src/rwcharset.h | 2 +- tools/clumpview/ras_test.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/charset.cpp b/src/charset.cpp index a16cb0c..601115e 100644 --- a/src/charset.cpp +++ b/src/charset.cpp @@ -135,7 +135,7 @@ Charset::flushBuffer(void) } void -Charset::printChar(uint32 c, int32 x, int32 y) +Charset::printChar(int32 c, int32 x, int32 y) { Camera *cam; float recipZ; @@ -143,7 +143,7 @@ Charset::printChar(uint32 c, int32 x, int32 y) RWDEVICE::Im2DVertex *vert; uint16 *ix; - if((int32)c >= this->desc.count) + if(c >= this->desc.count) return; if(this->raster != lastRaster || numChars >= NUMCHARS) diff --git a/src/rwcharset.h b/src/rwcharset.h index d4576ed..3988654 100644 --- a/src/rwcharset.h +++ b/src/rwcharset.h @@ -19,7 +19,7 @@ struct Charset void printBuffered(const char *str, int32 x, int32 y, bool32 hideSpaces); static void flushBuffer(void); private: - void printChar(uint32 c, int32 x, int32 y); + void printChar(int32 c, int32 x, int32 y); }; } diff --git a/tools/clumpview/ras_test.cpp b/tools/clumpview/ras_test.cpp index 6e17310..1544c1c 100644 --- a/tools/clumpview/ras_test.cpp +++ b/tools/clumpview/ras_test.cpp @@ -287,11 +287,11 @@ putpixel(Canvas *canvas, Point3 p, Color c) case DEPTHTEST_ALWAYS: break; case DEPTHTEST_GEQUAL: - if(p.z < (int)*z) + if((u32)p.z < *z) return; break; case DEPTHTEST_GREATER: - if(p.z <= (int)*z) + if((u32)p.z <= *z) return; break; }