Rev 5296 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5296 | Rev 5297 | ||
---|---|---|---|
Line 23... | Line 23... | ||
23 | void CKosRender::RenderImg(RGB *img, Point position, int width, int height) |
23 | void CKosRender::RenderImg(RGB *img, Point position, int width, int height) |
24 | { |
24 | { |
25 | for (int y = position.Y; y < position.Y + height; y++) |
25 | for (int y = position.Y; y < position.Y + height; y++) |
26 | for (int x = position.X; x < position.X + width; x++) |
26 | for (int x = position.X; x < position.X + width; x++) |
27 | if (x >= 0 && y >= 0 && x < this->width && y < this->height) |
27 | if (x >= 0 && y >= 0 && x < this->width && y < this->height) |
28 | this->buffer[y * width + x] = img[(y - position.Y) * width + (x - position.X)]; |
28 | this->buffer[y * this->width + x] = img[(y - position.Y) * width + (x - position.X)]; |
29 | } |
29 | } |
Line 30... | Line 30... | ||
30 | 30 | ||
31 | int CKosRender::getPixel(int x, int y) |
31 | int CKosRender::getPixel(int x, int y) |
32 | { |
32 | { |