uf-toys

toys and experiments with uf forth
git clone git://git.alexwennerberg.com/uf-toys
Log | Files | Refs | README

commit b0f196f38e6685d0f37f87ece6a28b12575f07ec
parent 837b610583335ce267de7c067c98fed0e926f640
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Sun, 18 Sep 2022 16:08:18 -0700

cleanup, prevent OOB err

Diffstat:
Mdvd.f | 7++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/dvd.f b/dvd.f @@ -21,17 +21,14 @@ dvd_icn spritedata dvd-x @ dvd-y @ position sprite ; -: check-hit -; - : on-frame h# 00 draw-dvd h# 01 -dvd-x @ dup 00 = swap hit-hor @ = or if +dvd-x @ dup 00 <= swap hit-hor @ >= or if dvd-dx @ negate dvd-dx ! drop h# 03 then -dvd-y @ dup 00 = swap hit-ver @ = or if +dvd-y @ dup 00 <= swap hit-ver @ >= or if dvd-dy @ negate dvd-dy ! drop h# 03 then