isolate dependencies to SDL
Do not access directly the SDL_Surface Screen_pixels use new functions Get_Screen_pixel_ptr() Set_Screen_pixel(), Get_Screen_pixel() And SetPalette() Signed-off-by: Thomas Bernard <miniupnp@free.fr>
This commit is contained in:
@@ -3169,7 +3169,8 @@ void Horizontal_grid_line(word x_pos,word y_pos,word width)
|
||||
int x;
|
||||
|
||||
for (x=!(x_pos&1);x<width;x+=2)
|
||||
Pixel(x_pos+x, y_pos, xor_lut[*((y_pos-1)*Pixel_height*VIDEO_LINE_WIDTH+x_pos*Pixel_width+Screen_pixels+x*Pixel_width)]);
|
||||
Pixel(x_pos+x, y_pos, xor_lut[Get_Screen_pixel((x_pos+x)*Pixel_width, (y_pos-1)*Pixel_height)]);
|
||||
//Pixel(x_pos+x, y_pos, xor_lut[*((y_pos-1)*Pixel_height*VIDEO_LINE_WIDTH+x_pos*Pixel_width+Screen_pixels+x*Pixel_width)]);
|
||||
}
|
||||
|
||||
void Vertical_grid_line(word x_pos,word y_pos,word height)
|
||||
@@ -3177,7 +3178,8 @@ void Vertical_grid_line(word x_pos,word y_pos,word height)
|
||||
int y;
|
||||
|
||||
for (y=!(y_pos&1);y<height;y+=2)
|
||||
Pixel(x_pos, y_pos+y, xor_lut[*(Screen_pixels+(x_pos*Pixel_width-1)+(y_pos*Pixel_height+y*Pixel_height)*VIDEO_LINE_WIDTH)]);
|
||||
Pixel(x_pos, y_pos+y, xor_lut[Get_Screen_pixel(x_pos*Pixel_width-1, (y_pos+y)*Pixel_height)]);
|
||||
//Pixel(x_pos, y_pos+y, xor_lut[*(Screen_pixels+(x_pos*Pixel_width-1)+(y_pos*Pixel_height+y*Pixel_height)*VIDEO_LINE_WIDTH)]);
|
||||
}
|
||||
|
||||
// Tile Grid
|
||||
|
||||
Reference in New Issue
Block a user