Skip to content

Commit

Permalink
update defaults and fix testing leftovers
Browse files Browse the repository at this point in the history
  • Loading branch information
Drofseh committed Sep 23, 2024
1 parent 4b5aca9 commit 1b061ec
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions addons/common/fnc_colorAHEXtoDecimal.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Author:
---------------------------------------------------------------------------- */
SCRIPT(colorAHEXtoDecimal);

params [["_hexString", "00000000", [""]]];
params [["_hexString", "FF000000", [""]]];

_hexString = ((toUpperANSI _hexString) trim ["#", 0]) regexReplace ["[^0-9A-F]", "0"];

Expand All @@ -32,4 +32,4 @@ private _values = _hexString splitString "";
call compile ("0x"+_values#4+_values#5),
call compile ("0x"+_values#6+_values#7),
call compile ("0x"+_values#0+_values#1)
] call test_fnc_colorRGBAtoDecimal;
] call CBA_fnc_colorRGBAtoDecimal;
2 changes: 1 addition & 1 deletion addons/common/fnc_colorARGBtoDecimal.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ Author:
---------------------------------------------------------------------------- */
SCRIPT(colorARGBtoDecimal);

params [["_alpha", 0, [0]],["_red", 0, [0]],["_green", 0, [0]],["_blue", 0, [0]]];
params [["_alpha", 255, [0]],["_red", 0, [0]],["_green", 0, [0]],["_blue", 0, [0]]];
[_red,_green,_blue,_alpha] apply {(0 max _x min 255)/255}
4 changes: 2 additions & 2 deletions addons/common/fnc_colorHEXAtoDecimal.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Author:
---------------------------------------------------------------------------- */
SCRIPT(colorHEXAtoDecimal);

params [["_hexString", "00000000", [""]]];
params [["_hexString", "000000FF", [""]]];

_hexString = ((toUpperANSI _hexString) trim ["#", 0]) regexReplace ["[^0-9A-F]", "0"];

Expand All @@ -32,4 +32,4 @@ private _values = _hexString splitString "";
call compile ("0x"+_values#2+_values#3),
call compile ("0x"+_values#4+_values#5),
call compile ("0x"+_values#6+_values#7)
] call test_fnc_colorRGBAtoDecimal;
] call CBA_fnc_colorRGBAtoDecimal;
2 changes: 1 addition & 1 deletion addons/common/fnc_colorHEXtoDecimal.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ private _values = _hexString splitString "";
call compile ("0x"+_values#0+_values#1),
call compile ("0x"+_values#2+_values#3),
call compile ("0x"+_values#4+_values#5)
] call test_fnc_colorRGBtoDecimal;
] call CBA_fnc_colorRGBtoDecimal;
2 changes: 1 addition & 1 deletion addons/common/fnc_colorRGBAtoDecimal.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ Author:
---------------------------------------------------------------------------- */
SCRIPT(colorRGBAtoDecimal);

params [["_red", 0, [0]],["_green", 0, [0]],["_blue", 0, [0]],["_alpha", 0, [0]]];
params [["_red", 0, [0]],["_green", 0, [0]],["_blue", 0, [0]],["_alpha", 255, [0]]];
[_red,_green,_blue,_alpha] apply {(0 max _x min 255)/255}
2 changes: 1 addition & 1 deletion addons/common/fnc_colorRGBtoDecimal.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Returns:
Examples:
(begin example)
[186,38,25] call test_fnc_colorRGBtoDecimal
[186,38,25] call CBA_fnc_colorRGBtoDecimal
(end)
Author:
Expand Down

0 comments on commit 1b061ec

Please sign in to comment.