Re: [AD] Z-buffer

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Henrik Stokseth wrote :

> Sure. I've tested it  under Mingw32 and found out that you forgot to include the
> function _poly_zbuf_gcol15. there might be other missing functions too, i
> haven't checked...

Right, there is a mistake in function declarations. Here is a patch
which corrects this bug.

	Bertrand.
diff -urN allegro.old/include/allegro/aintern.h allegro/include/allegro/aintern.h
--- allegro.old/include/allegro/aintern.h	Tue Nov 14 21:35:03 2000
+++ allegro/include/allegro/aintern.h	Tue Nov 14 21:15:08 2000
@@ -601,7 +601,6 @@
 AL_FUNC(void, _poly_scanline_ptex_lit15d, (unsigned long addr, int w, POLYGON_SEGMENT *info));
 AL_FUNC(void, _poly_scanline_ptex_mask_lit15d, (unsigned long addr, int w, POLYGON_SEGMENT *info));
 
-AL_FUNC(void, _poly_zbuf_gcol15, (unsigned long addr, int w, POLYGON_SEGMENT *info));
 AL_FUNC(void, _poly_zbuf_grgb15, (unsigned long addr, int w, POLYGON_SEGMENT *info));
 AL_FUNC(void, _poly_zbuf_atex_mask15, (unsigned long addr, int w, POLYGON_SEGMENT *info));
 AL_FUNC(void, _poly_zbuf_ptex_mask15, (unsigned long addr, int w, POLYGON_SEGMENT *info));
diff -urN allegro.old/src/c/czscan.h allegro/src/c/czscan.h
--- allegro.old/src/c/czscan.h	Tue Nov 14 21:35:03 2000
+++ allegro/src/c/czscan.h	Tue Nov 14 21:17:33 2000
@@ -43,6 +43,7 @@
 }
 
 
+#ifdef _bma_zbuf_gcol
 
 /* _poly_zbuf_gcol:
  *  Fills a single-color gouraud shaded polygon scanline.
@@ -67,6 +68,7 @@
    }
 }
 
+#endif /* _bma_zbuf_gcol */
 
 
 /* _poly_zbuf_grgb:
diff -urN allegro.old/src/c/czscan15.c allegro/src/c/czscan15.c
--- allegro.old/src/c/czscan15.c	Tue Nov 14 21:35:03 2000
+++ allegro/src/c/czscan15.c	Tue Nov 14 21:18:55 2000
@@ -24,7 +24,6 @@
 #include "cdefs15.h"
 
 #define FUNC_POLY_ZBUF_FLAT			_poly_zbuf_flat15
-#define FUNC_POLY_ZBUF_GCOL			_poly_zbuf_gcol15
 #define FUNC_POLY_ZBUF_GRGB			_poly_zbuf_grgb15
 #define FUNC_POLY_ZBUF_ATEX			_poly_zbuf_atex15
 #define FUNC_POLY_ZBUF_ATEX_MASK		_poly_zbuf_atex_mask15
@@ -34,6 +33,8 @@
 #define FUNC_POLY_ZBUF_PTEX_MASK		_poly_zbuf_ptex_mask15
 #define FUNC_POLY_ZBUF_PTEX_LIT			_poly_zbuf_ptex_lit15
 #define FUNC_POLY_ZBUF_PTEX_MASK_LIT		_poly_zbuf_ptex_mask_lit15
+
+#undef _bma_zbuf_gcol
 
 #include "czscan.h"
 
diff -urN allegro.old/src/c/czscan16.c allegro/src/c/czscan16.c
--- allegro.old/src/c/czscan16.c	Tue Nov 14 21:35:03 2000
+++ allegro/src/c/czscan16.c	Tue Nov 14 21:19:13 2000
@@ -24,7 +24,6 @@
 #include "cdefs16.h"
 
 #define FUNC_POLY_ZBUF_FLAT			_poly_zbuf_flat16
-#define FUNC_POLY_ZBUF_GCOL			_poly_zbuf_gcol16
 #define FUNC_POLY_ZBUF_GRGB			_poly_zbuf_grgb16
 #define FUNC_POLY_ZBUF_ATEX			_poly_zbuf_atex16
 #define FUNC_POLY_ZBUF_ATEX_MASK		_poly_zbuf_atex_mask16
@@ -34,6 +33,8 @@
 #define FUNC_POLY_ZBUF_PTEX_MASK		_poly_zbuf_ptex_mask16
 #define FUNC_POLY_ZBUF_PTEX_LIT			_poly_zbuf_ptex_lit16
 #define FUNC_POLY_ZBUF_PTEX_MASK_LIT		_poly_zbuf_ptex_mask_lit16
+
+#undef _bma_zbuf_gcol
 
 #include "czscan.h"
 
diff -urN allegro.old/src/c/czscan24.c allegro/src/c/czscan24.c
--- allegro.old/src/c/czscan24.c	Tue Nov 14 21:35:03 2000
+++ allegro/src/c/czscan24.c	Tue Nov 14 21:19:32 2000
@@ -24,7 +24,6 @@
 #include "cdefs24.h"
 
 #define FUNC_POLY_ZBUF_FLAT			_poly_zbuf_flat24
-#define FUNC_POLY_ZBUF_GCOL			_poly_zbuf_gcol24
 #define FUNC_POLY_ZBUF_GRGB			_poly_zbuf_grgb24
 #define FUNC_POLY_ZBUF_ATEX			_poly_zbuf_atex24
 #define FUNC_POLY_ZBUF_ATEX_MASK		_poly_zbuf_atex_mask24
@@ -34,6 +33,8 @@
 #define FUNC_POLY_ZBUF_PTEX_MASK		_poly_zbuf_ptex_mask24
 #define FUNC_POLY_ZBUF_PTEX_LIT			_poly_zbuf_ptex_lit24
 #define FUNC_POLY_ZBUF_PTEX_MASK_LIT		_poly_zbuf_ptex_mask_lit24
+
+#undef _bma_zbuf_gcol
 
 #include "czscan.h"
 
diff -urN allegro.old/src/c/czscan32.c allegro/src/c/czscan32.c
--- allegro.old/src/c/czscan32.c	Tue Nov 14 21:35:03 2000
+++ allegro/src/c/czscan32.c	Tue Nov 14 21:19:51 2000
@@ -24,7 +24,6 @@
 #include "cdefs32.h"
 
 #define FUNC_POLY_ZBUF_FLAT			_poly_zbuf_flat32
-#define FUNC_POLY_ZBUF_GCOL			_poly_zbuf_gcol32
 #define FUNC_POLY_ZBUF_GRGB			_poly_zbuf_grgb32
 #define FUNC_POLY_ZBUF_ATEX			_poly_zbuf_atex32
 #define FUNC_POLY_ZBUF_ATEX_MASK		_poly_zbuf_atex_mask32
@@ -34,6 +33,8 @@
 #define FUNC_POLY_ZBUF_PTEX_MASK		_poly_zbuf_ptex_mask32
 #define FUNC_POLY_ZBUF_PTEX_LIT			_poly_zbuf_ptex_lit32
 #define FUNC_POLY_ZBUF_PTEX_MASK_LIT		_poly_zbuf_ptex_mask_lit32
+
+#undef _bma_zbuf_gcol
 
 #include "czscan.h"
 
diff -urN allegro.old/src/c/czscan8.c allegro/src/c/czscan8.c
--- allegro.old/src/c/czscan8.c	Tue Nov 14 21:35:03 2000
+++ allegro/src/c/czscan8.c	Tue Nov 14 21:18:32 2000
@@ -35,6 +35,10 @@
 #define FUNC_POLY_ZBUF_PTEX_LIT			_poly_zbuf_ptex_lit8
 #define FUNC_POLY_ZBUF_PTEX_MASK_LIT		_poly_zbuf_ptex_mask_lit8
 
+#define _bma_zbuf_gcol
+
 #include "czscan.h"
+
+#undef _bma_zbuf_gcol
 
 #endif


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/