changeset 11060 | 506b6184f4af |
parent 11058 | b91667fd6f20 |
child 11061 | 2f1efb11ddf3 |
11059:659427d9fd17 | 11060:506b6184f4af |
---|---|
2323 lf : Word; |
2323 lf : Word; |
2324 i, n : LongInt; |
2324 i, n : LongInt; |
2325 eraseOnLFMatch, onlyEraseLF, flipHoriz, flipVert : boolean; |
2325 eraseOnLFMatch, onlyEraseLF, flipHoriz, flipVert : boolean; |
2326 const |
2326 const |
2327 call = 'EraseSprite'; |
2327 call = 'EraseSprite'; |
2328 params = 'x, y, sprite, frameIdx, eraseOnLFMatch, flipHoriz, flipVert, [, landFlag, ... ]'; |
2328 params = 'x, y, sprite, frameIdx, eraseOnLFMatch, onlyEraseLF, flipHoriz, flipVert, [, landFlag, ... ]'; |
2329 begin |
2329 begin |
2330 if CheckAndFetchLuaParamMinCount(L, 4, call, params, n) then |
2330 if CheckAndFetchLuaParamMinCount(L, 4, call, params, n) then |
2331 begin |
2331 begin |
2332 if not lua_isnoneornil(L, 5) then |
2332 if not lua_isnoneornil(L, 5) then |
2333 eraseOnLFMatch := lua_toboolean(L, 5) |
2333 eraseOnLFMatch := lua_toboolean(L, 5) |
2341 if not lua_isnoneornil(L, 8) then |
2341 if not lua_isnoneornil(L, 8) then |
2342 flipVert := lua_toboolean(L, 8) |
2342 flipVert := lua_toboolean(L, 8) |
2343 else flipVert := false; |
2343 else flipVert := false; |
2344 lf:= 0; |
2344 lf:= 0; |
2345 |
2345 |
2346 // accept any amount of landflags, loop is never executed if n>6 |
2346 // accept any amount of landflags, loop is never executed if n<9 |
2347 for i:= 9 to n do |
2347 for i:= 9 to n do |
2348 lf:= lf or lua_tointeger(L, i); |
2348 lf:= lf or lua_tointeger(L, i); |
2349 |
2349 |
2350 n:= LuaToSpriteOrd(L, 3, call, params); |
2350 n:= LuaToSpriteOrd(L, 3, call, params); |
2351 if n >= 0 then |
2351 if n >= 0 then |