better input, button for quality selection
[gbajam22] / src / polyfill.c
index 18294f5..8b01ea1 100644 (file)
@@ -1,6 +1,6 @@
 /*
-blender for the Gameboy Advance
-Copyright (C) 2021  John Tsiombikas <nuclear@member.fsf.org>
+gbajam22 entry for the Gameboy Advance
+Copyright (C) 2022  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
@@ -87,6 +87,9 @@ void polyfill_flat(struct pvertex *varr, int vnum, unsigned char col)
                }
        }
 
+       if(top < 0) top = 0;
+       if(bot >= fbheight) bot = fbheight - 1;
+
        fbptr = fb + top * fbwidth;
        for(i=top; i<=bot; i++) {
                start = scantab[0][i];