mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-30 13:32:59 +00:00 
			
		
		
		
	fixed -rugon, added -ruggo for automatic movement in rug
This commit is contained in:
		
							
								
								
									
										16
									
								
								rug.cpp
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								rug.cpp
									
									
									
									
									
								
							| @@ -37,6 +37,7 @@ bool renderonce  = false; | ||||
| bool rendernogl  = false; | ||||
| int  texturesize = 1024; | ||||
| ld scale = 1; | ||||
| ld ruggo = 0; | ||||
|  | ||||
| ld err_zero = 1e-3, err_zero_current, current_total_error; | ||||
|  | ||||
| @@ -1350,12 +1351,15 @@ void actDraw() { | ||||
|     }         | ||||
|   #endif | ||||
|    | ||||
|   #if CAP_HOLDKEYS | ||||
|   Uint8 *keystate = SDL_GetKeyState(NULL); | ||||
|   int qm = 0; | ||||
|   double alpha = (ticks - lastticks) / 1000.0; | ||||
|   lastticks = ticks; | ||||
|  | ||||
|   if(ruggo) move_forward(ruggo * alpha); | ||||
|  | ||||
|   #if CAP_HOLDKEYS | ||||
|   Uint8 *keystate = SDL_GetKeyState(NULL); | ||||
|  | ||||
|   transmatrix t = Id; | ||||
|    | ||||
|   auto perform_finger = [=] () { | ||||
| @@ -1669,6 +1673,10 @@ int rugArgs() { | ||||
|     rug_perspective = true; | ||||
|     } | ||||
|  | ||||
|   else if(argis("-rugauto")) { | ||||
|     shift(); ruggo = argf(); | ||||
|     } | ||||
|  | ||||
|   else if(argis("-rugorth")) { | ||||
|     rug_perspective = false; | ||||
|     } | ||||
| @@ -1686,7 +1694,9 @@ int rugArgs() { | ||||
|     } | ||||
|  | ||||
|   else if(argis("-rugon")) { | ||||
|     PHASE(3); rug::init(); | ||||
|     PHASE(3);  | ||||
|     calcparam(); | ||||
|     rug::init(); | ||||
|     } | ||||
|  | ||||
| #if CAP_ODS | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue