Previously I incorrectly described the r,g,b,a color values as if they
were clamped to (0,255). This is not the case. The input color value is
actually normalized with "value mod 256" or something similar, like an
integer division.
The result is that you get the magenta color for (-257, -256, -257) as
if you entered (255,0,255). The same applies to TimerDialogSetTitleColor
and probably other APIs of this kind.
Relatably, the float angles of unit facing are also normalized to be in
360 range.
@lep I just dont bother starting threads/creating real repros at the moment. If I were to, I'd be writing actual tests instead and thats too much time for no gain.
From commit messages:
Testing code: https://github.com/Luashine/wc3-test-maps/blob/1fd3cdaed228d5906a442bab27a8a9f4ce18ca55/README.md#timerdialog-api-tests
Previously I incorrectly described the r,g,b,a color values as if they were clamped to (0,255). This is not the case. The input color value is actually normalized with "value mod 256" or something similar, like an integer division.
The result is that you get the magenta color for (-257, -256, -257) as if you entered (255,0,255). The same applies to TimerDialogSetTitleColor and probably other APIs of this kind.
Relatably, the float angles of unit facing are also normalized to be in 360 range.
Test code:
Extra note for clarity about colors:
I will probably check the rest of jassdoc where colors were used to fix those places.