02-08-2024, 07:12 PM
Another code reduction:
If Screen(pym + py, pxm + px, 0) = 219 Then pxm = 0: pym = 0
px = px + pxm
py = py + pym
This can be reduced down to:
If Screen(pym + py, pxm + px, 0) <> 219 Then px = px + pxm: py = py + pym
If Screen(pym + py, pxm + px, 0) = 219 Then pxm = 0: pym = 0
px = px + pxm
py = py + pym
This can be reduced down to:
If Screen(pym + py, pxm + px, 0) <> 219 Then px = px + pxm: py = py + pym