jamshred.player: Use nano-count instead of system-micros.
							parent
							
								
									6f5ff6579e
								
							
						
					
					
						commit
						37b5ef7577
					
				| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
! Copyright (C) 2007, 2008 Alex Chapman
 | 
			
		||||
! See http://factorcode.org/license.txt for BSD license.
 | 
			
		||||
USING: accessors calendar.unix colors.constants combinators jamshred.log
 | 
			
		||||
USING: accessors colors.constants combinators jamshred.log
 | 
			
		||||
jamshred.oint jamshred.sound jamshred.tunnel kernel locals math
 | 
			
		||||
math.constants math.order math.ranges math.vectors math.matrices
 | 
			
		||||
sequences shuffle specialized-arrays strings system ;
 | 
			
		||||
| 
						 | 
				
			
			@ -39,9 +39,9 @@ CONSTANT: max-speed 30.0
 | 
			
		|||
    >>tunnel to-tunnel-start ;
 | 
			
		||||
    
 | 
			
		||||
: update-time ( player -- seconds-passed )
 | 
			
		||||
    system-micros swap [ last-move>> - 1000000 / ] [ last-move<< ] 2bi ;
 | 
			
		||||
    nano-count swap [ last-move>> - 1,000,000,000 / ] [ last-move<< ] 2bi ;
 | 
			
		||||
 | 
			
		||||
: moved ( player -- ) system-micros swap last-move<< ;
 | 
			
		||||
: moved ( player -- ) nano-count swap last-move<< ;
 | 
			
		||||
 | 
			
		||||
: speed-range ( -- range )
 | 
			
		||||
    max-speed [0,b] ;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue