Fixed compilation error on Linux (name conflicts, issue 132)

Load/Save: Fixed display of mount points and drives ("Select drive" button)
Started documenting global variables


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@698 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud
2009-03-27 20:14:28 +00:00
parent efbc978e6f
commit 663229efb3
15 changed files with 344 additions and 272 deletions

View File

@@ -32,14 +32,14 @@
void Pixel_tall (word x,word y,byte color)
/* Affiche un pixel de la color aux coords x;y à l'écran */
{
*(Screen + x + y * 2 * Screen_width)=color;
*(Screen + x + (y * 2 + 1) * Screen_width)=color;
*(Screen_pixels + x + y * 2 * Screen_width)=color;
*(Screen_pixels + x + (y * 2 + 1) * Screen_width)=color;
}
byte Read_pixel_tall (word x,word y)
/* On retourne la couleur du pixel aux coords données */
{
return *( Screen + y * 2 * Screen_width + x );
return *( Screen_pixels + y * 2 * Screen_width + x );
}
void Block_tall (word start_x,word start_y,word width,word height,byte color)
@@ -56,7 +56,7 @@ void Block_tall (word start_x,word start_y,word width,word height,byte 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 */
{
byte* dest=Screen; //On va se mettre en 0,0 dans l'écran (dest)
byte* dest=Screen_pixels; //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;
@@ -115,14 +115,14 @@ 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*2*Screen_width+x_pos+Screen;
byte* dest=y_pos*2*Screen_width+x_pos+Screen_pixels;
int x;
for (x=0;x<width;x++)
*(dest+x)=~*(dest+x);
dest=(y_pos*2+1)*Screen_width+x_pos+Screen;
dest=(y_pos*2+1)*Screen_width+x_pos+Screen_pixels;
for (x=0;x<width;x++)
*(dest+x)=~*(dest+x);
}
@@ -133,15 +133,15 @@ void Vertical_XOR_line_tall(word x_pos,word y_pos,word height)
byte color;
for (i=y_pos*2;i<(y_pos+height)*2;i++)
{
color=*(Screen+x_pos+i*Screen_width);
*(Screen+x_pos+i*Screen_width)=~color;
color=*(Screen_pixels+x_pos+i*Screen_width);
*(Screen_pixels+x_pos+i*Screen_width)=~color;
}
}
void Display_brush_color_tall(word x_pos,word y_pos,word x_offset,word y_offset,word width,word height,byte transp_color,word brush_width)
{
// dest = Position à l'écran
byte* dest = Screen + y_pos * 2 * Screen_width + x_pos;
byte* dest = Screen_pixels + y_pos * 2 * Screen_width + x_pos;
// src = Position dans la brosse
byte* src = Brush + y_offset * brush_width + x_offset;
@@ -176,7 +176,7 @@ void Display_brush_mono_tall(word x_pos, word y_pos,
byte transp_color, byte color, word brush_width)
/* On affiche la brosse en monochrome */
{
byte* dest=y_pos*2*Screen_width+x_pos+Screen; // dest = adr Destination à
byte* dest=y_pos*2*Screen_width+x_pos+Screen_pixels; // dest = adr Destination à
// l'écran
byte* src=brush_width*y_offset+x_offset+Brush; // src = adr ds
// la brosse
@@ -208,7 +208,7 @@ void Display_brush_mono_tall(word x_pos, word y_pos,
void Clear_brush_tall(word x_pos,word y_pos,__attribute__((unused)) word x_offset,__attribute__((unused)) word y_offset,word width,word height,__attribute__((unused))byte transp_color,word image_width)
{
byte* dest=Screen+x_pos+y_pos*2*Screen_width; //On va se mettre en 0,0 dans l'écran (dest)
byte* dest=Screen_pixels+x_pos+y_pos*2*Screen_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;
@@ -231,7 +231,7 @@ void Clear_brush_tall(word x_pos,word y_pos,__attribute__((unused)) word x_offse
void Display_brush_tall(byte * brush, word x_pos,word y_pos,word x_offset,word y_offset,word width,word height,byte transp_color,word brush_width)
{
// dest = Position à l'écran
byte* dest = Screen + y_pos * 2 * Screen_width + x_pos;
byte* dest = Screen_pixels + y_pos * 2 * Screen_width + x_pos;
// src = Position dans la brosse
byte* src = brush + y_offset * brush_width + x_offset;
@@ -263,7 +263,7 @@ void Display_brush_tall(byte * brush, word x_pos,word y_pos,word x_offset,word y
void Remap_screen_tall(word x_pos,word y_pos,word width,word height,byte * conversion_table)
{
// dest = coords a l'écran
byte* dest = Screen + y_pos * 2 * Screen_width + x_pos;
byte* dest = Screen_pixels + y_pos * 2 * Screen_width + x_pos;
int x,y;
// Pour chaque ligne
@@ -285,13 +285,13 @@ 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+x_pos+y_pos*2*Screen_width,line,width);
memcpy(Screen+x_pos+(y_pos*2+1)*Screen_width,line,width);
memcpy(Screen_pixels+x_pos+y_pos*2*Screen_width,line,width);
memcpy(Screen_pixels+x_pos+(y_pos*2+1)*Screen_width,line,width);
}
void Read_line_screen_tall(word x_pos,word y_pos,word width,byte * line)
{
memcpy(line,Screen_width * 2 * y_pos + x_pos + Screen,width);
memcpy(line,Screen_width * 2 * y_pos + x_pos + Screen_pixels,width);
}
void Display_part_of_screen_scaled_tall(
@@ -354,7 +354,7 @@ 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*2,width*Main_magnifier_factor,buffer,transp_color);
memcpy(Screen + (y*2 +1) * Screen_width + x_pos, Screen + y*2* Screen_width + x_pos, width*Main_magnifier_factor);
memcpy(Screen_pixels + (y*2 +1) * Screen_width + x_pos, Screen_pixels + y*2* Screen_width + x_pos, width*Main_magnifier_factor);
y++;
if(y==end_y_pos)
{