From d5ed83dce7712f37de0f80adf4cbd12b89b8a17e Mon Sep 17 00:00:00 2001 From: Rtch90 Date: Thu, 12 Apr 2012 18:08:39 +0100 Subject: [PATCH] [Fix] Fixed an invalid type cast from DWORD to an Uint32 --- src/Collision/AABB.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Collision/AABB.cpp b/src/Collision/AABB.cpp index 0ad9d29..1c1c714 100644 --- a/src/Collision/AABB.cpp +++ b/src/Collision/AABB.cpp @@ -61,7 +61,7 @@ bool AABB::InCollision(AABB* otherAABB) { void AABB::CreateAABBFromSprite(const char* filename) { std::string tempName(filename); tempName += ".png"; - + _surface = IMG_Load(filename); if(!_surface) { return; @@ -88,7 +88,7 @@ void AABB::CreateAABBFromSprite(const char* filename) { for(int height = 0; height < _surface->h; height++) { // FUCKING PAIN IN THE ASS MOTHERFUCKER!!!! Uint32 offset = height * screen->pitch + width; - if(((DWORD)pixels[offset]) != 0 && !found) { + if(((Uint32)pixels[offset]) != 0 && !found) { _min = Vec2((float)width, (float)height); found = true; color = ((Uint32)pixels[offset]); @@ -123,7 +123,7 @@ void AABB::CreateAABBFromSprite(const char* filename) { } _staticMax = _max; _staticMin = _min; - + SDL_FreeSurface(_surface); _surface = NULL; }