1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-27 12:35:53 +00:00
QB64-PE/internal
Matthew Kilgore 4f5af8888e Fix PAINT when border color is not supplied
The border color parameter to PAINT is optional, but sub_paint was not
handling that case. What it should do in that situation is keep painting
until it finds pixels that are not the same color as the original
starting pixel was. Instead it would simply assume border color was
valid and paint until it finds color zero (the default parameter value
when it's not provided).

This was originally reported in QB64Official/qb64#2, and Walt
(@TheJoyfulProgrammer) fixed it in QB64Official/qb64#38. Functionally
this is the same change, however I'm checking `passed & 4` to see
whether a border color was provided rather than `bordercol == NULL`.
The later has problems if the provided bordercolor is zero, which is
allowed since zero is a valid color. The `passed` argument indicates
which of the function arguments were actually provided in the QB64
source that called PAINT.

Additionally, along with the `while (true)` loop that Walt changed I
went ahead and removed the duplication of the sections for each
direction. We now just use a couple of arrays to determine which
direction we're checking and loop over all 4.
2022-11-08 00:59:12 -05:00
..
c Fix PAINT when border color is not supplied 2022-11-08 00:59:12 -05:00
source Automatic update of ./internal/source 2022-11-04 23:01:37 +00:00
support Add initial MIDI language support 2022-09-04 23:35:14 -04:00
temp Corrected OSX setup script to use OSX folder instead of Linux one. 2015-12-14 11:17:09 +11:00
clean.bat Step 10: Update remaining stuff 2022-08-12 02:54:12 +02:00
version.txt Supply a default version label when no version has been calculated 2022-05-20 16:57:45 -04:00