equal
deleted
inserted
replaced
54 stepx = -1; |
54 stepx = -1; |
55 } else { |
55 } else { |
56 stepx = 1; |
56 stepx = 1; |
57 } |
57 } |
58 |
58 |
59 if (x > 0 && y > 0 && x < screen_width && y < screen_height) this->SetPixel(video, x, y, color); |
59 if (x >= 0 && y >= 0 && x < screen_width && y < screen_height) this->SetPixel(video, x, y, color); |
60 if (dx > dy) { |
60 if (dx > dy) { |
61 frac = dy - (dx / 2); |
61 frac = dy - (dx / 2); |
62 while (x != x2) { |
62 while (x != x2) { |
63 if (frac >= 0) { |
63 if (frac >= 0) { |
64 y += stepy; |
64 y += stepy; |
65 frac -= dx; |
65 frac -= dx; |
66 } |
66 } |
67 x += stepx; |
67 x += stepx; |
68 frac += dy; |
68 frac += dy; |
69 if (x > 0 && y > 0 && x < screen_width && y < screen_height) this->SetPixel(video, x, y, color); |
69 if (x >= 0 && y >= 0 && x < screen_width && y < screen_height) this->SetPixel(video, x, y, color); |
70 } |
70 } |
71 } else { |
71 } else { |
72 frac = dx - (dy / 2); |
72 frac = dx - (dy / 2); |
73 while (y != y2) { |
73 while (y != y2) { |
74 if (frac >= 0) { |
74 if (frac >= 0) { |
75 x += stepx; |
75 x += stepx; |
76 frac -= dy; |
76 frac -= dy; |
77 } |
77 } |
78 y += stepy; |
78 y += stepy; |
79 frac += dx; |
79 frac += dx; |
80 if (x > 0 && y > 0 && x < screen_width && y < screen_height) this->SetPixel(video, x, y, color); |
80 if (x >= 0 && y >= 0 && x < screen_width && y < screen_height) this->SetPixel(video, x, y, color); |
81 } |
81 } |
82 } |
82 } |
83 } |
83 } |
84 |
84 |
85 void Blitter_32bppBase::CopyFromBuffer(void *video, const void *src, int width, int height) |
85 void Blitter_32bppBase::CopyFromBuffer(void *video, const void *src, int width, int height) |