| 110 | return 1; |
| 111 | } |
| 112 | static int Meta_Add(lua_State* L)LNOEXCEPT |
| 113 | { |
| 114 | fcyColor* pA = static_cast<fcyColor*>(luaL_checkudata(L, 1, TYPENAME_COLOR)); |
| 115 | fcyColor* pB = static_cast<fcyColor*>(luaL_checkudata(L, 2, TYPENAME_COLOR)); |
| 116 | fcyColor* pResult = CreateAndPush(L); |
| 117 | pResult->Set( |
| 118 | ::min((int)pA->a + pB->a, 255), |
| 119 | ::min((int)pA->r + pB->r, 255), |
| 120 | ::min((int)pA->g + pB->g, 255), |
| 121 | ::min((int)pA->b + pB->b, 255) |
| 122 | ); |
| 123 | return 1; |
| 124 | } |
| 125 | static int Meta_Sub(lua_State* L)LNOEXCEPT |
| 126 | { |
| 127 | fcyColor* pA = static_cast<fcyColor*>(luaL_checkudata(L, 1, TYPENAME_COLOR)); |
nothing calls this directly
no outgoing calls
no test coverage detected