split the polyfiller to a preprocessor-based template file, included
[dosdemo] / src / polyfill.h
index 57f0dc4..a01130c 100644 (file)
@@ -15,10 +15,22 @@ enum {
 struct pvertex {
        int32_t x, y; /* 24.8 fixed point */
        int32_t u, v; /* 16.16 fixed point */
-       unsigned char r, g, b;
+       int32_t r, g, b;  /* int 0-255 */
 };
 
+struct pimage {
+       uint16_t *pixels;
+       int width, height;
+};
+
+extern struct pimage pimg_fb;
+extern struct pimage pimg_texture;
+
 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_gouraud(struct pvertex *verts, int nverts);
 
 #endif /* POLYFILL_H_ */