VGA Driver Bug

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
bgg
Posts: 10
Joined: Wed Aug 15, 2018 7:43 pm
Libera.chat IRC: bgg

VGA Driver Bug

Post by bgg »

I have been switching away from text mode and have started using VGA 320x200x256 as the main screen. But while I was implementing drawing methods, this little bug showed itself.
Image
I was going to just add one extra pixel to my rectangle method, but I could be looking over something way worse. Anyone have an idea of what is going on?
(VGA Driver Code)
https://pastebin.com/48MuAtJW
alexfru
Member
Member
Posts: 1112
Joined: Tue Mar 04, 2014 5:27 am

Re: VGA Driver Bug

Post by alexfru »

Missing a couple of -1's in rectangle().
Also incorrectly checking the ranges in setp(). Same problem: off by one.
Post Reply