X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fgaw%2Fpolyfill.h;h=fe24d820a60b985073c9e8c699eca6b68c22ed52;hb=5f50ec3c542ea29211591d4865bdaf1368f8c649;hp=ad2d5b3bf7d23135593f5cb5e37887534f0ede91;hpb=7fccf8b3543c8cdb993252f0cf9a6b9ed826408e;p=retroray diff --git a/src/gaw/polyfill.h b/src/gaw/polyfill.h index ad2d5b3..fe24d82 100644 --- a/src/gaw/polyfill.h +++ b/src/gaw/polyfill.h @@ -1,3 +1,20 @@ +/* +RetroRay - integrated standalone vintage modeller/renderer +Copyright (C) 2023 John Tsiombikas + +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 . +*/ #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) @@ -134,4 +151,6 @@ void polyfill_add_gouraud_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); + #endif /* POLYFILL_H_ */