changeset 34:d66538926e78

fix getPixelRGBA - it should return r g b and not r b g... why did everyone use the wrong order instead of fixing the reason? :)
author spq@33b003aa-7bff-0310-803a-e67f0ece8222
date Sat, 12 Jul 2008 00:20:26 +0000
parents 112fc4af772d
children bf7f838e6684
files engine/core/video/image.cpp engine/core/view/camera.cpp
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/engine/core/video/image.cpp	Fri Jul 11 15:42:54 2008 +0000
+++ b/engine/core/video/image.cpp	Sat Jul 12 00:20:26 2008 +0000
@@ -136,7 +136,7 @@
 		case 4:
 			pixel = *(Uint32 *)p;
 		}
-		SDL_GetRGBA(pixel, m_surface->format, r, b, g, a);
+		SDL_GetRGBA(pixel, m_surface->format, r, g, b, a);
 	}
 
 	void Image::render(const Rect& rect, unsigned char alpha) {
--- a/engine/core/view/camera.cpp	Fri Jul 11 15:42:54 2008 +0000
+++ b/engine/core/view/camera.cpp	Sat Jul 12 00:20:26 2008 +0000
@@ -314,7 +314,7 @@
 					x = static_cast<int>(round(fx / fsw * fow));
 					y = static_cast<int>(round(fy / fsh * foh));
 				}
-				vc.image->getPixelRGBA(x, y, &r, &b, &g, &a);
+				vc.image->getPixelRGBA(x, y, &r, &g, &b, &a);
 				// instance is hit with mouse if not totally transparent
 				if (a != 0) {
 					instances.push_back(i);
@@ -349,7 +349,7 @@
 							x = static_cast<int>(round(fx / fsw * fow));
 							y = static_cast<int>(round(fy / fsh * foh));
 						}
-						vc.image->getPixelRGBA(x, y, &r, &b, &g, &a);
+						vc.image->getPixelRGBA(x, y, &r, &g, &b, &a);
 						// instance is hit with mouse if not totally transparent
 						if (a != 0) {
 							instances.push_back(i);