| 1176 | return 0; |
| 1177 | } |
| 1178 | static int SetAnimationCenter(lua_State* L)LNOEXCEPT |
| 1179 | { |
| 1180 | ResAnimation* p = LRES.FindAnimation(luaL_checkstring(L, 1)); |
| 1181 | if (!p) |
| 1182 | return luaL_error(L, "animation '%s' not found.", luaL_checkstring(L, 1)); |
| 1183 | for (size_t i = 0; i < p->GetCount(); ++i) |
| 1184 | { |
| 1185 | p->GetSprite(i)->SetHotSpot(fcyVec2( |
| 1186 | static_cast<float>(luaL_checknumber(L, 2) + p->GetSprite(i)->GetTexRect().a.x), |
| 1187 | static_cast<float>(luaL_checknumber(L, 3) + p->GetSprite(i)->GetTexRect().a.y))); |
| 1188 | } |
| 1189 | return 0; |
| 1190 | } |
| 1191 | |
| 1192 | // 绘图函数 |
| 1193 | static int BeginScene(lua_State* L)LNOEXCEPT |
nothing calls this directly
no test coverage detected