X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fpolyfill.c;h=8b01ea1184bf7946d4a53c201ef5ae96951207b8;hb=7aad8db2edab014c0f750de76bc24bdab63aef2a;hp=18294f51e9af3f475a76e5cd17ab9d3d9e3dc236;hpb=f57fab6afe62f2a476ef4afa1842c81722816451;p=gbajam22 diff --git a/src/polyfill.c b/src/polyfill.c index 18294f5..8b01ea1 100644 --- a/src/polyfill.c +++ b/src/polyfill.c @@ -1,6 +1,6 @@ /* -blender for the Gameboy Advance -Copyright (C) 2021 John Tsiombikas +gbajam22 entry for the Gameboy Advance +Copyright (C) 2022 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 @@ -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];