| 1323 | return 0; |
| 1324 | } |
| 1325 | static int RenderTexture(lua_State* L)LNOEXCEPT |
| 1326 | { |
| 1327 | const char* tex_name = luaL_checkstring(L, 1); |
| 1328 | BlendMode blend = TranslateBlendMode(L, 2); |
| 1329 | f2dGraphics2DVertex vertex[4]; |
| 1330 | |
| 1331 | for (int i = 0; i < 4; ++i) |
| 1332 | { |
| 1333 | lua_pushinteger(L, 1); |
| 1334 | lua_gettable(L, 3 + i); |
| 1335 | vertex[i].x = (float)lua_tonumber(L, -1); |
| 1336 | |
| 1337 | lua_pushinteger(L, 2); |
| 1338 | lua_gettable(L, 3 + i); |
| 1339 | vertex[i].y = (float)lua_tonumber(L, -1); |
| 1340 | |
| 1341 | lua_pushinteger(L, 3); |
| 1342 | lua_gettable(L, 3 + i); |
| 1343 | vertex[i].z = (float)lua_tonumber(L, -1); |
| 1344 | |
| 1345 | lua_pushinteger(L, 4); |
| 1346 | lua_gettable(L, 3 + i); |
| 1347 | vertex[i].u = (float)lua_tonumber(L, -1); |
| 1348 | |
| 1349 | lua_pushinteger(L, 5); |
| 1350 | lua_gettable(L, 3 + i); |
| 1351 | vertex[i].v = (float)lua_tonumber(L, -1); |
| 1352 | |
| 1353 | lua_pushinteger(L, 6); |
| 1354 | lua_gettable(L, 3 + i); |
| 1355 | vertex[i].color = static_cast<fcyColor*>(luaL_checkudata(L, -1, TYPENAME_COLOR))->argb; |
| 1356 | |
| 1357 | lua_pop(L, 6); |
| 1358 | } |
| 1359 | |
| 1360 | if (!LAPP.RenderTexture(tex_name, blend, vertex)) |
| 1361 | return luaL_error(L, "can't render texture '%s'.", tex_name); |
| 1362 | return 0; |
| 1363 | } |
| 1364 | static int RenderTTF(lua_State* L)LNOEXCEPT |
| 1365 | { |
| 1366 | if (!LAPP.RenderTTF( |
nothing calls this directly
no test coverage detected