| Zeile 39: | Zeile 39: | ||
<c> | <c> | ||
void setpixel(int x, int y, unsigned char color) { | void setpixel(int x, int y, unsigned char color) { | ||
| − | offset | + | int offset; |
| − | if(x < | + | if(0 <= x && x < 320) { |
| − | if(y < | + | if(0 <= y && y < 200) { |
| + | offset = 320*y + x; | ||
VGA[offset] = color; | VGA[offset] = color; | ||
} | } | ||
| Zeile 47: | Zeile 48: | ||
} | } | ||
</c> | </c> | ||
| + | |||
==== Farben ==== | ==== Farben ==== | ||
{| {{prettytable}} | {| {{prettytable}} | ||