8.3 rename
[retroray] / src / gaw / polyfill.h
index ad2d5b3..e9aa6bb 100644 (file)
@@ -1,3 +1,20 @@
+/*
+RetroRay - integrated standalone vintage modeller/renderer
+Copyright (C) 2023  John Tsiombikas <nuclear@mutantstargoat.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <https://www.gnu.org/licenses/>.
+*/
 #ifndef POLYFILL_H_
 #define POLYFILL_H_
 
@@ -64,7 +81,7 @@ enum {
 typedef uint32_t gaw_pixel;
 
 #define PACK_RGB(r, g, b) \
-       (((r) << 16) | ((g) << 8) | (b))
+       (0xff000000 | ((r) << 16) | ((g) << 8) | (b))
 #define PACK_RGBA(r, g, b, a) \
        (((a) << 24) | ((r) << 16) | ((g) << 8) | (b))
 #define UNPACK_R(pix)  ((pix) & 0xff)
@@ -121,17 +138,27 @@ void polyfill_add_gouraud(struct pvertex *verts, int nverts);
 void polyfill_add_tex_wire(struct pvertex *verts, int nverts);
 void polyfill_add_tex_flat(struct pvertex *verts, int nverts);
 void polyfill_add_tex_gouraud(struct pvertex *verts, int nverts);
+
+void polyfill_wire_zbuf(struct pvertex *verts, int nverts);
 void polyfill_flat_zbuf(struct pvertex *verts, int nverts);
 void polyfill_gouraud_zbuf(struct pvertex *verts, int nverts);
+void polyfill_tex_wire_zbuf(struct pvertex *verts, int nverts);
 void polyfill_tex_flat_zbuf(struct pvertex *verts, int nverts);
 void polyfill_tex_gouraud_zbuf(struct pvertex *verts, int nverts);
+void polyfill_alpha_wire_zbuf(struct pvertex *verts, int nverts);
 void polyfill_alpha_flat_zbuf(struct pvertex *verts, int nverts);
 void polyfill_alpha_gouraud_zbuf(struct pvertex *verts, int nverts);
+void polyfill_alpha_tex_wire_zbuf(struct pvertex *verts, int nverts);
 void polyfill_alpha_tex_flat_zbuf(struct pvertex *verts, int nverts);
 void polyfill_alpha_tex_gouraud_zbuf(struct pvertex *verts, int nverts);
+void polyfill_add_wire_zbuf(struct pvertex *verts, int nverts);
 void polyfill_add_flat_zbuf(struct pvertex *verts, int nverts);
 void polyfill_add_gouraud_zbuf(struct pvertex *verts, int nverts);
+void polyfill_add_tex_wire_zbuf(struct pvertex *verts, int nverts);
 void polyfill_add_tex_flat_zbuf(struct pvertex *verts, int nverts);
 void polyfill_add_tex_gouraud_zbuf(struct pvertex *verts, int nverts);
 
+void draw_line(struct pvertex *verts);
+void draw_line_zbuf(struct pvertex *verts);
+
 #endif /* POLYFILL_H_ */