Uint32 *pixmem32;
Uint32 colour;
colour = SDL_MapRGB( screen->format, r, g, b );
- pixmem32 = screen->pixels + y + x;
+ pixmem32 = screen->pixels + ( y * screen->pitch ) + ( x * screen->format->BytesPerPixel );
*pixmem32 = colour;
void
Uint32 *pixmem32;
Uint32 colour;
colour = SDL_MapRGBA( screen->format, r, g, b, a );
- pixmem32 = screen->pixels + y + x;
+ pixmem32 = screen->pixels + ( y * screen->pitch ) + ( x * screen->format->BytesPerPixel ); ;
*pixmem32 = colour;