| 1105 | return 0; |
| 1106 | } |
| 1107 | static int SetImageState(lua_State* L)LNOEXCEPT |
| 1108 | { |
| 1109 | ResSprite* p = LRES.FindSprite(luaL_checkstring(L, 1)); |
| 1110 | if (!p) |
| 1111 | return luaL_error(L, "image '%s' not found.", luaL_checkstring(L, 1)); |
| 1112 | |
| 1113 | p->SetBlendMode(TranslateBlendMode(L, 2)); |
| 1114 | if (lua_gettop(L) == 3) |
| 1115 | p->GetSprite()->SetColor(*static_cast<fcyColor*>(luaL_checkudata(L, 3, TYPENAME_COLOR))); |
| 1116 | else if (lua_gettop(L) == 6) |
| 1117 | { |
| 1118 | fcyColor tColors[] = { |
| 1119 | *static_cast<fcyColor*>(luaL_checkudata(L, 3, TYPENAME_COLOR)), |
| 1120 | *static_cast<fcyColor*>(luaL_checkudata(L, 4, TYPENAME_COLOR)), |
| 1121 | *static_cast<fcyColor*>(luaL_checkudata(L, 5, TYPENAME_COLOR)), |
| 1122 | *static_cast<fcyColor*>(luaL_checkudata(L, 6, TYPENAME_COLOR)) |
| 1123 | }; |
| 1124 | p->GetSprite()->SetColor(tColors); |
| 1125 | } |
| 1126 | return 0; |
| 1127 | } |
| 1128 | static int SetFontState(lua_State* L)LNOEXCEPT |
| 1129 | { |
| 1130 | ResFont* p = LRES.FindSpriteFont(luaL_checkstring(L, 1)); |
nothing calls this directly
no test coverage detected