The clipping in src/bucket3d.c doesn't seem to work for me, as droids and buildings disappear when they are not entirely off screen.
Anyone else has this problem?
I hacked a *7 into the radius calculation and everything seems to work fine, and I guess it is not a big problem nowadays when we draw 3 droids and a building too much.

- Gerard
Index: src/bucket3d.c
===================================================================
--- src/bucket3d.c      (revision 469)
+++ src/bucket3d.c      (working copy)
@@ -31,12 +31,14 @@
 #define BUCKET_RANGE   32000
 
 #define BUCKET_CLIP
-#define CLIP_LEFT      (0)
+#define CLIP_LEFT      ((SDWORD)0)
 #define CLIP_RIGHT     ((SDWORD)DISP_WIDTH)
-#define CLIP_TOP       (0)
+#define CLIP_TOP       ((SDWORD)0)
 #define CLIP_BOTTOM ((SDWORD)DISP_HEIGHT)
 //scale depth = 1<<FP12_SHIFT>>STRETCHED_Z_SHIFT<<xpshift
-#define SCALE_DEPTH (FP12_MULTIPLIER)
+// Gerard - HACK Multiplied by 7 to fix clipping
+// someone needs to take a good look at the radius calculation
+#define SCALE_DEPTH (FP12_MULTIPLIER*7)
 
 typedef struct _bucket_tag
 {
@@ -443,7 +445,7 @@
                        {
                                position.y = psSimpObj->z;
 #ifdef BUCKET_CLIP
-                               radius = 
(((STRUCTURE*)pObject)->sDisplay.imd->radius) * 2;//other building clipping not 
so close
+                               radius = 
(((STRUCTURE*)pObject)->sDisplay.imd->radius);
 #endif
                        }
 
_______________________________________________
Warzone-dev mailing list
[email protected]
https://mail.gna.org/listinfo/warzone-dev

Reply via email to