Skip to navigation

Maths (Arithmetic): GetNextSeed0To30

Name: GetNextSeed0To30 [Show more] Type: Subroutine Category: Maths (Arithmetic) Summary: Set A to the next number from the landscape's sequence of seed numbers, converted to the range 0 to 30
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * PlaceObjectBelow calls GetNextSeed0To30
.GetNextSeed0To30 JSR GetNextSeedNumber \ Set A to the next number from the landscape's sequence \ of seed numbers AND #31 \ Convert A into a number into the range 0 to 31 CMP #31 \ If A >= 31 or greater, repeat the process until we BCS GetNextSeed0To30 \ get a number in the range 0 to 30 RTS \ Return from the subroutine