Routines 
Prev: 36254  Up: Map  Next: 36321 


36273  CALL 55740  Set new random seed and load LSB of this (random value) into A and E  
36276  AND 31  Discard bits five to seven  
36278  SUB 15  Subtract 15  
36280  LD B,A  Load result into B (random number 15 to 16) (ycomponent of star's direction)  
36281  CALL 55740  Set new random seed and load LSB of this (random value) into A and E  
36284  AND 31  Discard bits five to seven  
36286  SUB 15  Subtract 15  
36288  LD C,A  Load result into C (random number 15 to 16) (xcomponent of star's direction)  
36289  LD A,128  Add to 128 (set bit 7) in C...  
36291  ADD A,C  ...  
36292  LD C,A  ...(random number 113 to 144)  
36293  LD A,B  Add 70 to B...  
36294  ADD A,70  ...  
36296  LD B,A  ...(random number 55 to 86)  
36297  CP 70  If A is not 70 (i.e. ydirection component is not zero)...  
36299  JR NZ,36306  ...skip ahead to 36306  
36301  LD C,A  If A (loaded into C) is 128... [bug]  
36302  CP 128  ...  
36304  JR Z,36273  ...then restart this routine to generate two new random numbers/seeds  
36306  LD DE,18048  Load D (initial ycoordinate) with 70 and E (initial xcoordinate) with 128  
36309  PUSH DE  Store DE  
36310  CALL 36434  Set up star's movement data based upon starting position and direction  
36313  POP DE  Restore DE  
36314  LD (IX+0),E  Set star's initial coordinates as (128, 70)...  
36317  LD (IX+1),D  ...  
36320  RET  Return 
Prev: 36254  Up: Map  Next: 36321 