mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-09-08 03:00:17 +00:00
4f5af8888e
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. |
||
---|---|---|
.. | ||
libqb | ||
parts | ||
.gitignore | ||
common.h | ||
libqb.cpp | ||
libqb.h | ||
libqb.mm | ||
msbin.c | ||
mtri1.cpp | ||
mtri1s.cpp | ||
mtri1t.cpp | ||
mtri1ts.cpp | ||
mtri2.cpp | ||
mtri2s.cpp | ||
mtri2t.cpp | ||
mtri2ts.cpp | ||
mtri3.cpp | ||
mtri3s.cpp | ||
mtri3t.cpp | ||
mtri3ts.cpp | ||
mtri4.cpp | ||
mtri4s.cpp | ||
mtri4t.cpp | ||
mtri4ts.cpp | ||
myip.cpp | ||
os.h | ||
purge_all_precompiled_content.bat | ||
purge_all_precompiled_content.command | ||
purge_all_precompiled_content.sh | ||
qbx.cpp | ||
time64.c | ||
time64.h |