Tilemap: Fix map wrap around
This commit is contained in:
		
							parent
							
								
									d1bad9b45f
								
							
						
					
					
						commit
						91aefdc17a
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -150,7 +150,7 @@ static const size_t scanrowsMax = viewpH + 5;
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int wrap(size_t value, size_t range)
 | 
					static int wrap(int value, int range)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	int res = value % range;
 | 
						int res = value % range;
 | 
				
			||||||
	return res < 0 ? res + range : res;
 | 
						return res < 0 ? res + range : res;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue