Mercurial > fife-parpg
comparison engine/core/video/image.cpp @ 161:e62122d12727
Fixed a tiny off-by-one in the getBixel
function.
author | phoku@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Tue, 14 Oct 2008 20:20:29 +0000 |
parents | 90005975cdbb |
children | c3418554467f |
comparison
equal
deleted
inserted
replaced
160:9a05ba6735b1 | 161:e62122d12727 |
---|---|
106 void Image::setYShift(int yshift) { | 106 void Image::setYShift(int yshift) { |
107 m_yshift = yshift; | 107 m_yshift = yshift; |
108 } | 108 } |
109 | 109 |
110 void Image::getPixelRGBA(int x, int y, uint8_t* r, uint8_t* g, uint8_t* b, uint8_t* a) { | 110 void Image::getPixelRGBA(int x, int y, uint8_t* r, uint8_t* g, uint8_t* b, uint8_t* a) { |
111 if ((x < 0) || (x >= m_surface->w) || (y < 0) || (y >= m_surface->h)) { | 111 if ((x < 0) || (x > m_surface->w) || (y < 0) || (y > m_surface->h)) { |
112 r = 0; | 112 r = 0; |
113 g = 0; | 113 g = 0; |
114 b = 0; | 114 b = 0; |
115 a = 0; | 115 a = 0; |
116 return; | 116 return; |