mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-09-04 11:10:15 +00:00
The new optional arguments for functions broke _RGB32() because it uses some custom flags ('overloaded' and 'minargs' on the id Type) to control its parameter passing. You are allowed passing any number from 1 to 4 args to `func__rgb32` and there are 4 overloaded C++ functions that will get picked from. This is different from how this typically would work, with all 4 parameters always passed and an extra argument to specify the parameters that were passed. Rather than change `func__rgb32` I simply adjusted the optional argument logic to account for the flags used by `_RGB32()` - if the `overloaded` flag is set, then we don't need to add extra `NULL` parameters for any parameter that wasn't specified in the argument list. Instead we simply don't emit anything for those.
8 lines
245 B
QBasic
8 lines
245 B
QBasic
$Console:Only
|
|
|
|
Print "Grey, max alpha: "; Hex$(_RGB32(&H7F))
|
|
Print "Grey, half alpha: "; Hex$(_RGB32(&H7F, &H7F))
|
|
Print "Grey, max alpha: "; Hex$(_RGB32(&H7F, &H7F, &H7F))
|
|
Print "Grey, half alpha: "; Hex$(_RGB32(&H7F, &H7F, &H7F, &H7F))
|
|
|
|
System
|