X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=dosdemo;a=blobdiff_plain;f=src%2Fpolyfill.h;h=86c794739e8649d9f7a119d2efc1227eb94c4cfe;hp=b52b5de1f5af8eea2ddb14dd25a3dbafdc3b5d7b;hb=5f36e95f19ad8d7a5a1dd546ffeb54ce95d51749;hpb=e4699729fda402682816fac18a3ffce416d99301 diff --git a/src/polyfill.h b/src/polyfill.h index b52b5de..86c7947 100644 --- a/src/polyfill.h +++ b/src/polyfill.h @@ -2,13 +2,28 @@ #define POLYFILL_H_ #include "inttypes.h" +#include "3dgfx.h" + +#define POLYFILL_MODE_MASK 0x03 +#define POLYFILL_TEX_BIT 0x04 +#define POLYFILL_BLEND_BIT 0x08 enum { - POLYFILL_WIRE, + POLYFILL_WIRE = 0, POLYFILL_FLAT, POLYFILL_GOURAUD, - POLYFILL_TEX, - POLYFILL_TEX_GOURAUD + + POLYFILL_TEX_WIRE = 4, + POLYFILL_TEX_FLAT, + POLYFILL_TEX_GOURAUD, + + POLYFILL_BLEND_WIRE = 8, + POLYFILL_BLEND_FLAT, + POLYFILL_BLEND_GOURAUD, + + POLYFILL_BLEND_TEX_WIRE = 12, + POLYFILL_BLEND_TEX_FLAT, + POLYFILL_BLEND_TEX_GOURAUD }; /* projected vertices for the rasterizer */ @@ -19,7 +34,7 @@ struct pvertex { }; struct pimage { - uint16_t *pixels; + g3d_pixel *pixels; int width, height; int xshift, yshift; @@ -30,10 +45,18 @@ extern struct pimage pfill_fb; extern struct pimage pfill_tex; void polyfill(int mode, struct pvertex *verts, int nverts); + void polyfill_wire(struct pvertex *verts, int nverts); void polyfill_flat(struct pvertex *verts, int nverts); void polyfill_gouraud(struct pvertex *verts, int nverts); -void polyfill_tex(struct pvertex *verts, int nverts); +void polyfill_tex_wire(struct pvertex *verts, int nverts); +void polyfill_tex_flat(struct pvertex *verts, int nverts); void polyfill_tex_gouraud(struct pvertex *verts, int nverts); +void polyfill_blend_wire(struct pvertex *verts, int nverts); +void polyfill_blend_flat(struct pvertex *verts, int nverts); +void polyfill_blend_gouraud(struct pvertex *verts, int nverts); +void polyfill_blend_tex_wire(struct pvertex *verts, int nverts); +void polyfill_blend_tex_flat(struct pvertex *verts, int nverts); +void polyfill_blend_tex_gouraud(struct pvertex *verts, int nverts); #endif /* POLYFILL_H_ */