remove commented out code
This commit is contained in:
28
src/pxwide.c
28
src/pxwide.c
@@ -36,8 +36,6 @@
|
||||
void Pixel_wide (word x,word y,byte color)
|
||||
/* Affiche un pixel de la color aux coords x;y à l'écran */
|
||||
{
|
||||
//*(Screen_pixels + x * ZOOMX + y*ZOOMY * VIDEO_LINE_WIDTH)=color;
|
||||
//*(Screen_pixels + x * ZOOMX + y*ZOOMY * VIDEO_LINE_WIDTH + 1)=color;
|
||||
Set_Screen_pixel(x * ZOOMX, y * ZOOMY, color);
|
||||
Set_Screen_pixel(x * ZOOMX + 1, y * ZOOMY, color);
|
||||
}
|
||||
@@ -45,28 +43,18 @@ void Pixel_wide (word x,word y,byte color)
|
||||
byte Read_pixel_wide (word x,word y)
|
||||
/* On retourne la couleur du pixel aux coords données */
|
||||
{
|
||||
//return *( Screen_pixels + y * ZOOMY * VIDEO_LINE_WIDTH + x * ZOOMX);
|
||||
return Get_Screen_pixel(x * ZOOMX, y * ZOOMY);
|
||||
}
|
||||
|
||||
void Block_wide (word start_x,word start_y,word width,word height,byte color)
|
||||
/* On affiche un rectangle de la couleur donnée */
|
||||
{
|
||||
#if 0
|
||||
SDL_Rect rectangle;
|
||||
rectangle.x=start_x*ZOOMX;
|
||||
rectangle.y=start_y*ZOOMY;
|
||||
rectangle.w=width*ZOOMX;
|
||||
rectangle.h=height*ZOOMY;
|
||||
SDL_FillRect(Screen_SDL,&rectangle,color);
|
||||
#endif
|
||||
Screen_FillRect(start_x * ZOOMX, start_y * ZOOMY, width * ZOOMX, height * ZOOMY, color);
|
||||
}
|
||||
|
||||
void Display_part_of_screen_wide (word width,word height,word image_width)
|
||||
/* Afficher une partie de l'image telle quelle sur l'écran */
|
||||
{
|
||||
//On va se mettre en 0,0 dans l'écran (dest)
|
||||
byte* src=Main.offset_Y*image_width+Main.offset_X+Main_screen; //Coords de départ ds la source (src)
|
||||
int y;
|
||||
int dy;
|
||||
@@ -85,7 +73,6 @@ void Display_part_of_screen_wide (word width,word height,word image_width)
|
||||
|
||||
// On passe à la ligne suivante
|
||||
src+=image_width-width;
|
||||
//dest+=VIDEO_LINE_WIDTH*ZOOMY - width*ZOOMX;
|
||||
}
|
||||
//Update_rect(0,0,width,height);
|
||||
}
|
||||
@@ -130,7 +117,6 @@ void Pixel_preview_magnifier_wide (word x,word y,byte color)
|
||||
void Horizontal_XOR_line_wide(word x_pos,word y_pos,word width)
|
||||
{
|
||||
//On calcule la valeur initiale de dest:
|
||||
//byte* dest=y_pos*ZOOMY*VIDEO_LINE_WIDTH+x_pos*ZOOMX+Screen_pixels;
|
||||
byte* dest = Get_Screen_pixel_ptr(x_pos * ZOOMX, y_pos * ZOOMY);
|
||||
|
||||
int x;
|
||||
@@ -143,14 +129,11 @@ void Vertical_XOR_line_wide(word x_pos,word y_pos,word height)
|
||||
{
|
||||
int i;
|
||||
byte color;
|
||||
//byte *dest=Screen_pixels+x_pos*ZOOMX+y_pos*VIDEO_LINE_WIDTH*ZOOMY;
|
||||
for (i = 0; i < height; i++)
|
||||
{
|
||||
color = xor_lut[Get_Screen_pixel(x_pos * ZOOMX, (y_pos + i) * ZOOMY)];
|
||||
Set_Screen_pixel(x_pos * ZOOMX, (y_pos + i) * ZOOMY, color);
|
||||
Set_Screen_pixel(x_pos * ZOOMX + 1, (y_pos + i) * ZOOMY, color);
|
||||
//*dest=*(dest+1)=xor_lut[*dest];
|
||||
//dest+=VIDEO_LINE_WIDTH*ZOOMY;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -213,14 +196,12 @@ void Display_brush_mono_wide(word x_pos, word y_pos,
|
||||
|
||||
// On passe à la ligne suivante
|
||||
src+=brush_width-width;
|
||||
//dest+=VIDEO_LINE_WIDTH*ZOOMY-width*ZOOMX;
|
||||
}
|
||||
Update_rect(x_pos,y_pos,width,height);
|
||||
}
|
||||
|
||||
void Clear_brush_wide(word x_pos,word y_pos,word x_offset,word y_offset,word width,word height,byte transp_color,word image_width)
|
||||
{
|
||||
//On va se mettre en 0,0 dans l'écran (dest)
|
||||
byte* src = ( y_pos + Main.offset_Y ) * image_width + x_pos + Main.offset_X + Main_screen; //Coords de départ ds la source (src)
|
||||
int y;
|
||||
int x;
|
||||
@@ -244,7 +225,6 @@ void Clear_brush_wide(word x_pos,word y_pos,word x_offset,word y_offset,word wid
|
||||
|
||||
// On passe à la ligne suivante
|
||||
src+=image_width-width;
|
||||
//dest+=VIDEO_LINE_WIDTH*ZOOMY-width*ZOOMX;
|
||||
}
|
||||
Update_rect(x_pos,y_pos,width,height);
|
||||
}
|
||||
@@ -295,8 +275,6 @@ void Remap_screen_wide(word x_pos,word y_pos,word width,word height,byte * conve
|
||||
*(dest+1) = *dest = conversion_table[*dest];
|
||||
dest +=ZOOMX;
|
||||
}
|
||||
|
||||
//dest = dest + VIDEO_LINE_WIDTH*ZOOMY - width*ZOOMX;
|
||||
}
|
||||
|
||||
Update_rect(x_pos,y_pos,width,height);
|
||||
@@ -306,7 +284,6 @@ void Display_line_on_screen_fast_wide(word x_pos,word y_pos,word width,byte * li
|
||||
/* On affiche toute une ligne de pixels telle quelle. */
|
||||
/* Utilisée si le buffer contient déja des pixel doublés. */
|
||||
{
|
||||
//memcpy(Screen_pixels+x_pos*ZOOMX+y_pos*ZOOMY*VIDEO_LINE_WIDTH,line,width*ZOOMX);
|
||||
memcpy(Get_Screen_pixel_ptr(+x_pos*ZOOMX, y_pos*ZOOMY), line, width*ZOOMX);
|
||||
}
|
||||
|
||||
@@ -315,7 +292,6 @@ void Display_line_on_screen_wide(word x_pos,word y_pos,word width,byte * line)
|
||||
{
|
||||
int x;
|
||||
byte *dest;
|
||||
//dest=Screen_pixels+x_pos*ZOOMX+y_pos*ZOOMY*VIDEO_LINE_WIDTH;
|
||||
dest = Get_Screen_pixel_ptr(x_pos * ZOOMX, y_pos * ZOOMY);
|
||||
for(x=width;x>0;x--)
|
||||
{
|
||||
@@ -330,7 +306,6 @@ void Display_transparent_mono_line_on_screen_wide(
|
||||
// Affiche une ligne à l'écran avec une couleur + transparence.
|
||||
// Utilisé par les brosses en mode zoom
|
||||
{
|
||||
//byte* dest = Screen_pixels+ y_pos*VIDEO_LINE_WIDTH + x_pos*ZOOMX;
|
||||
byte* dest = Get_Screen_pixel_ptr(x_pos * ZOOMX, y_pos);
|
||||
int x;
|
||||
// Pour chaque pixel
|
||||
@@ -347,7 +322,6 @@ void Display_transparent_mono_line_on_screen_wide(
|
||||
|
||||
void Read_line_screen_wide(word x_pos,word y_pos,word width,byte * line)
|
||||
{
|
||||
//memcpy(line,VIDEO_LINE_WIDTH*ZOOMY * y_pos + x_pos * ZOOMX + Screen_pixels,width*ZOOMX);
|
||||
memcpy(line, Get_Screen_pixel_ptr(x_pos * ZOOMX, ZOOMY * y_pos), width*ZOOMX);
|
||||
}
|
||||
|
||||
@@ -531,5 +505,3 @@ void Clear_brush_scaled_wide(word x_pos,word y_pos,word x_offset,word y_offset,w
|
||||
src+= image_width;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user