[Fix] Re-adding some of my AABB stuff, now we know that it is not causing problems.
This commit is contained in:
		
							parent
							
								
									06e13c3c33
								
							
						
					
					
						commit
						79872d8452
					
				| @ -62,8 +62,8 @@ void AABB::CreateAABBFromSprite(const char* filename) { | |||||||
| 
 | 
 | ||||||
|   // I have no methods here, hopefully KonoM will have it
 |   // I have no methods here, hopefully KonoM will have it
 | ||||||
|   // implemented real soon...
 |   // implemented real soon...
 | ||||||
|   //float spriteWidth  = _sprite->w;
 |   float spriteWidth  = _sprite->w; | ||||||
|   //float spriteHeight = _sprite->h;
 |   float spriteHeight = _sprite->h; | ||||||
| 
 | 
 | ||||||
|   // Find the min, look through until we find a first instance of a white color.
 |   // Find the min, look through until we find a first instance of a white color.
 | ||||||
|   bool found = false; |   bool found = false; | ||||||
| @ -75,14 +75,14 @@ void AABB::CreateAABBFromSprite(const char* filename) { | |||||||
|     for(int height = 0; height < _sprite->h; height++) { |     for(int height = 0; height < _sprite->h; height++) { | ||||||
|       // FUCKING PAIN IN THE ASS MOTHERFUCKER!!!!
 |       // FUCKING PAIN IN THE ASS MOTHERFUCKER!!!!
 | ||||||
|       DWORD offset = height * screen->pitch + width; |       DWORD offset = height * screen->pitch + width; | ||||||
| //      if(((DWORD)pixels[offset]) != 0 && !found) {
 |       if(((DWORD)pixels[offset]) != 0 && !found) { | ||||||
| //       _min = Vec2((float)width, (float)height);
 |        _min = Vec2((float)width, (float)height); | ||||||
| //       found = true;
 |        found = true; | ||||||
| //       color = ((DWORD)pixels[offset]);
 |        color = ((DWORD)pixels[offset]); | ||||||
| //       // Break out of these god forsaken loops.
 |        // Break out of these god forsaken loops.
 | ||||||
| //       width  = _sprite->w;
 |        width  = _sprite->w; | ||||||
| //       height = _sprite->h;
 |        height = _sprite->h; | ||||||
| //      }
 |       } | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
| @ -91,10 +91,10 @@ void AABB::CreateAABBFromSprite(const char* filename) { | |||||||
|   found = false; |   found = false; | ||||||
|   for(int width = (int)_min.x; width < _sprite->w; width++) { |   for(int width = (int)_min.x; width < _sprite->w; width++) { | ||||||
|     DWORD offset = (DWORD)_min.y * screen->pitch + width; |     DWORD offset = (DWORD)_min.y * screen->pitch + width; | ||||||
| //    if(((DWORD)pixels[offset] != color && !found)) {
 |     if(((DWORD)pixels[offset] != color && !found)) { | ||||||
| //      found = true;
 |       found = true; | ||||||
| //      _max.x = (float)width;
 |       _max.x = (float)width; | ||||||
| //    }
 |     } | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   // Now for the max.y
 |   // Now for the max.y
 | ||||||
| @ -102,11 +102,11 @@ void AABB::CreateAABBFromSprite(const char* filename) { | |||||||
|   found = false; |   found = false; | ||||||
|   for(int height = (int)_min.y; height < _sprite->w; height++) { |   for(int height = (int)_min.y; height < _sprite->w; height++) { | ||||||
|     DWORD offset = height * screen->pitch + (DWORD)_min.x; |     DWORD offset = height * screen->pitch + (DWORD)_min.x; | ||||||
| //    if(((DWORD)pixels[offset]) != color && !found) {
 |     if(((DWORD)pixels[offset]) != color && !found) { | ||||||
| //      found = true;
 |       found = true; | ||||||
| //      _max.y = (float)height;
 |       _max.y = (float)height; | ||||||
| //      break;
 |       break; | ||||||
| //    }
 |     } | ||||||
|   } |   } | ||||||
|   _staticMax = _max; |   _staticMax = _max; | ||||||
|   _staticMin = _min; |   _staticMin = _min; | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Rtch90
						Rtch90