remove commented out code

This commit is contained in:
Thomas Bernard
2018-06-25 22:38:18 +02:00
parent 32f6cbfb5c
commit 13883b7928
10 changed files with 2 additions and 378 deletions

View File

@@ -37,8 +37,6 @@
void Pixel_tall (word x,word y,byte color)
/* Affiche un pixel de la color aux coords x;y à l'écran */
{
//*(Screen_pixels + x + y*ZOOMY*VIDEO_LINE_WIDTH)=color;
//*(Screen_pixels + x + (y*ZOOMY+1)*VIDEO_LINE_WIDTH)=color;
Set_Screen_pixel(x * ZOOMX, y * ZOOMY, color);
Set_Screen_pixel(x * ZOOMX, y * ZOOMY + 1, color);
}
@@ -46,28 +44,18 @@ void Pixel_tall (word x,word y,byte color)
byte Read_pixel_tall (word x,word y)
/* On retourne la couleur du pixel aux coords données */
{
//return *( Screen_pixels + y*ZOOMY*VIDEO_LINE_WIDTH + x );
return Get_Screen_pixel(x * ZOOMX, y * ZOOMY);
}
void Block_tall (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;
rectangle.y=start_y*ZOOMY;
rectangle.w=width;
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_tall (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;
@@ -75,15 +63,11 @@ void Display_part_of_screen_tall (word width,word height,word image_width)
// Pour chaque ligne
{
// On fait une copie de la ligne
//memcpy(dest,src,width);
memcpy(Get_Screen_pixel_ptr(0, y * ZOOMY), src, width);
//dest+=VIDEO_LINE_WIDTH;
//memcpy(dest,src,width);
memcpy(Get_Screen_pixel_ptr(0, y * ZOOMY + 1), src, width);
// On passe à la ligne suivante
src+=image_width;
//dest+=VIDEO_LINE_WIDTH;
}
//Update_rect(0,0,width,height);
}
@@ -128,7 +112,6 @@ void Pixel_preview_magnifier_tall (word x,word y,byte color)
void Horizontal_XOR_line_tall(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+Screen_pixels;
byte *dest = Get_Screen_pixel_ptr(x_pos * ZOOMX, y_pos * ZOOMY);
int x;
@@ -136,7 +119,6 @@ void Horizontal_XOR_line_tall(word x_pos,word y_pos,word width)
for (x=0;x<width;x++)
*(dest+x)=xor_lut[*(dest+x)];
//dest=(y_pos*ZOOMY+1)*VIDEO_LINE_WIDTH+x_pos+Screen_pixels;
dest = Get_Screen_pixel_ptr(x_pos * ZOOMX, y_pos * ZOOMY + 1);
for (x=0;x<width;x++)
*(dest+x)=xor_lut[*(dest+x)];
@@ -148,9 +130,7 @@ void Vertical_XOR_line_tall(word x_pos,word y_pos,word height)
byte color;
for (i=y_pos*ZOOMY;i<(y_pos+height)*ZOOMY;i++)
{
//color=*(Screen_pixels+x_pos+i*VIDEO_LINE_WIDTH);
color = Get_Screen_pixel(x_pos, i);
//*(Screen_pixels+x_pos+i*VIDEO_LINE_WIDTH)=xor_lut[color];
Set_Screen_pixel(x_pos, i, xor_lut[color]);
}
}
@@ -175,7 +155,6 @@ void Display_brush_color_tall(word x_pos,word y_pos,word x_offset,word y_offset,
if(*src != transp_color)
{
*dest = *src;
//*(dest+VIDEO_LINE_WIDTH) = *src;
*dest2 = *src;
}
@@ -211,7 +190,6 @@ void Display_brush_mono_tall(word x_pos, word y_pos,
if (*src!=transp_color)
{
*dest=color;
//*(dest+VIDEO_LINE_WIDTH)=color;
*dest2 = color;
}
@@ -223,14 +201,12 @@ void Display_brush_mono_tall(word x_pos, word y_pos,
// On passe à la ligne suivante
src+=brush_width-width;
//dest+=ZOOMY*VIDEO_LINE_WIDTH-width;
}
Update_rect(x_pos,y_pos,width,height);
}
void Clear_brush_tall(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;
(void)x_offset; // unused
@@ -248,7 +224,6 @@ void Clear_brush_tall(word x_pos,word y_pos,word x_offset,word y_offset,word wid
// On passe à la ligne suivante
src+=image_width;
//dest+=VIDEO_LINE_WIDTH;
}
Update_rect(x_pos,y_pos,width,height);
}
@@ -301,8 +276,6 @@ void Remap_screen_tall(word x_pos,word y_pos,word width,word height,byte * conve
*dest = conversion_table[*dest];
dest ++;
}
//dest = dest + VIDEO_LINE_WIDTH - width;
}
Update_rect(x_pos,y_pos,width,height);
@@ -311,15 +284,12 @@ void Remap_screen_tall(word x_pos,word y_pos,word width,word height,byte * conve
void Display_line_on_screen_tall(word x_pos,word y_pos,word width,byte * line)
/* On affiche toute une ligne de pixels. Utilisé pour les textes. */
{
//memcpy(Screen_pixels+x_pos+y_pos*ZOOMY*VIDEO_LINE_WIDTH,line,width);
//memcpy(Screen_pixels+x_pos+(y_pos*ZOOMY+1)*VIDEO_LINE_WIDTH,line,width);
memcpy(Get_Screen_pixel_ptr(x_pos * ZOOMX, y_pos * ZOOMY), line, width);
memcpy(Get_Screen_pixel_ptr(x_pos * ZOOMX, y_pos * ZOOMY + 1), line, width);
}
void Read_line_screen_tall(word x_pos,word y_pos,word width,byte * line)
{
//memcpy(line,VIDEO_LINE_WIDTH*ZOOMY*y_pos + x_pos + Screen_pixels,width);
memcpy(line, Get_Screen_pixel_ptr(x_pos * ZOOMX, y_pos * ZOOMY), width);
}
@@ -385,7 +355,6 @@ void Display_brush_color_zoom_tall(word x_pos,word y_pos,
for(bx=Main.magnifier_factor;bx>0;bx--)
{
Display_transparent_line_on_screen_simple(x_pos,y*ZOOMY,width*Main.magnifier_factor,buffer,transp_color);
//memcpy(Screen_pixels + (y*ZOOMY +1) * VIDEO_LINE_WIDTH + x_pos, Screen_pixels + y*ZOOMY*VIDEO_LINE_WIDTH + x_pos, width*Main.magnifier_factor);
memcpy(Get_Screen_pixel_ptr(x_pos, y * ZOOMY + 1), Get_Screen_pixel_ptr(x_pos, y * ZOOMY), width*Main.magnifier_factor);
y++;
if(y==end_y_pos)