| 3887 | } |
| 3888 | } |
| 3889 | static uint32 gui_getcolour(lua_State *L, int offset) { |
| 3890 | uint32 colour; |
| 3891 | int a, r, g, b; |
| 3892 | |
| 3893 | colour = gui_getcolour_wrapped(L, offset, false, 0); |
| 3894 | a = ((colour & 0xff) * transparencyModifier) / 255; |
| 3895 | if (a > 255) a = 255; |
| 3896 | b = (colour >> 8) & 0xff; |
| 3897 | g = (colour >> 16) & 0xff; |
| 3898 | r = (colour >> 24) & 0xff; |
| 3899 | return LUA_BUILD_PIXEL(a, r, g, b); |
| 3900 | } |
| 3901 | static uint32 gui_optcolour(lua_State *L, int offset, uint32 defaultColour) { |
| 3902 | uint32 colour; |
| 3903 | int a, r, g, b; |
no test coverage detected