From 6fafe08b7dc884960582d272d35650d1c9dfdf87 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Thu, 11 May 2023 23:00:53 +0100 Subject: Add some randomness --- game/starfield.asm | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'game/starfield.asm') diff --git a/game/starfield.asm b/game/starfield.asm index e8b8ed1..ac8fe32 100644 --- a/game/starfield.asm +++ b/game/starfield.asm @@ -40,6 +40,16 @@ stars_update_addr: cmp y, 0x80 bc ld b, 0xbf + + ; add some randomness + push a + push x + push b + call rnd + pop b + pop x + pop a + stars_no_wrap: dec x bnz -- cgit v1.2.3