Removed all usage of __attribute__((unused)), replaced by void cast which is supported both on GCC and VBCC

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1984 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud 2012-08-11 16:19:07 +00:00
parent 8621253165
commit a630a84822
18 changed files with 100 additions and 99 deletions

View File

@ -77,10 +77,6 @@
#include "tiles.h"
#include "setup.h"
#ifdef __VBCC__
#define __attribute__(x)
#endif
#if defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__) || defined(__amigaos__)
#include <proto/dos.h>
#include <dirent.h>

View File

@ -3723,8 +3723,9 @@ void Test_PNG(T_IO_Context * context)
/// Used by a callback in Load_PNG
T_IO_Context * PNG_current_context;
int PNG_read_unknown_chunk(__attribute__((unused)) png_structp ptr, png_unknown_chunkp chunk)
int PNG_read_unknown_chunk(png_structp ptr, png_unknown_chunkp chunk)
{
(void)ptr; // unused
// png_unknown_chunkp members:
// png_byte name[5];
// png_byte *data;

View File

@ -51,10 +51,6 @@
#include "brush.h"
#include "tiles.h"
#ifdef __VBCC__
#define __attribute__(x)
#endif
#if defined(__VBCC__) || defined(__GP2X__) || defined(__WIZ__) || defined(__CAANOO__)
#define M_PI 3.141592653589793238462643
#endif
@ -1225,8 +1221,10 @@ void Fill_general(byte fill_color)
}
// Affichage d'un point pour une preview en xor
void Pixel_figure_preview_xor(word x_pos,word y_pos,__attribute__((unused)) byte color)
void Pixel_figure_preview_xor(word x_pos,word y_pos,byte color)
{
(void)color; // unused
if ( (x_pos>=Limit_left) &&
(x_pos<=Limit_right) &&
(y_pos>=Limit_top) &&
@ -1237,8 +1235,10 @@ void Fill_general(byte fill_color)
// Affichage d'un point pour une preview en xor additif
// (Il lit la couleur depuis la page backup)
void Pixel_figure_preview_xorback(word x_pos,word y_pos,__attribute__((unused)) byte color)
void Pixel_figure_preview_xorback(word x_pos,word y_pos,byte color)
{
(void)color; // unused
if ( (x_pos>=Limit_left) &&
(x_pos<=Limit_right) &&
(y_pos>=Limit_top) &&
@ -1248,8 +1248,10 @@ void Fill_general(byte fill_color)
// Effacement d'un point de preview
void Pixel_figure_clear_preview(word x_pos,word y_pos,__attribute__((unused)) byte color)
void Pixel_figure_clear_preview(word x_pos,word y_pos,byte color)
{
(void)color; // unused
if ( (x_pos>=Limit_left) &&
(x_pos<=Limit_right) &&
(y_pos>=Limit_top) &&
@ -2818,15 +2820,20 @@ void Display_pixel(word x,word y,byte color)
// -- Aucun effet en cours --
byte No_effect(__attribute__((unused)) word x,__attribute__((unused)) word y,byte color)
byte No_effect(word x, word y, byte color)
{
(void)x; // unused
(void)y; // unused
return color;
}
// -- Effet de Shading --
byte Effect_shade(word x,word y,__attribute__((unused)) byte color)
byte Effect_shade(word x,word y,byte color)
{
(void)color; // unused
return Shade_table[Read_pixel_from_feedback_screen(x,y)];
}
@ -2879,21 +2886,24 @@ byte Effect_quick_shade(word x,word y,byte color)
// -- Effet de Tiling --
byte Effect_tiling(word x,word y,__attribute__((unused)) byte color)
byte Effect_tiling(word x,word y,byte color)
{
(void)color; // unused
return Read_pixel_from_brush((x+Brush_width-Tiling_offset_X)%Brush_width,
(y+Brush_height-Tiling_offset_Y)%Brush_height);
}
// -- Effet de Smooth --
byte Effect_smooth(word x,word y,__attribute__((unused)) byte color)
byte Effect_smooth(word x,word y,byte color)
{
int r,g,b;
byte c;
int weight,total_weight;
byte x2=((x+1)<Main_image_width);
byte y2=((y+1)<Main_image_height);
(void)color; // unused
// On commence par le pixel central
c=Read_pixel_from_feedback_screen(x,y);

View File

@ -38,13 +38,9 @@
#include "input.h"
#include "loadsave.h"
#ifdef __VBCC__
#define __attribute__(x)
#endif
void Handle_window_resize(SDL_ResizeEvent event);
void Handle_window_exit(SDL_QuitEvent event);
int Color_cycling(__attribute__((unused)) void* useless);
int Color_cycling(void);
// public Globals (available as extern)
@ -293,8 +289,10 @@ void Handle_window_resize(SDL_ResizeEvent event)
Resize_height = event.h;
}
void Handle_window_exit(__attribute__((unused)) SDL_QuitEvent event)
void Handle_window_exit(SDL_QuitEvent event)
{
(void)event, // unused
Quit_is_required = 1;
}
@ -825,7 +823,7 @@ int Get_input(int sleep_time)
// This is done in this function because it's called after reading
// some user input.
Flush_update();
Color_cycling(NULL);
Color_cycling();
Key_ANSI = 0;
Key = 0;
Mouse_moved=0;
@ -1043,7 +1041,7 @@ void Set_mouse_position(void)
SDL_WarpMouse(Mouse_X*Pixel_width, Mouse_Y*Pixel_height);
}
int Color_cycling(__attribute__((unused)) void* useless)
int Color_cycling(void)
{
static byte offset[16];
int i, color;

View File

@ -317,16 +317,12 @@ int Directory_exists(char * directory)
}
}
#if defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__) || defined(__amigaos__) || defined(__MINT__)
#define FILE_IS_HIDDEN_ATTRIBUTE __attribute__((unused))
#else
#define FILE_IS_HIDDEN_ATTRIBUTE
#endif
/// Check if a file or directory is hidden.
int File_is_hidden(FILE_IS_HIDDEN_ATTRIBUTE const char *fname, const char *full_name)
int File_is_hidden(const char *fname, const char *full_name)
{
#if defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__) || defined(__amigaos__) || defined(__MINT__)
// False (unable to determine, or irrrelevent for platform)
(void)fname;//unused
(void)full_name;//unused
return 0;
#elif defined(__WIN32__)

View File

@ -2879,7 +2879,7 @@ void Save_C64(T_IO_Context * context)
// SCR (Amstrad CPC)
void Test_SCR(__attribute__((unused)) T_IO_Context * context)
void Test_SCR(T_IO_Context * context)
{
// Mmh... not sure what we could test. Any idea ?
// The palette file can be tested, if it exists and have the right size it's
@ -2888,9 +2888,10 @@ void Test_SCR(__attribute__((unused)) T_IO_Context * context)
// An AMSDOS header would be a good indication but in some cases it may not
// be there
(void)context; // unused
}
void Load_SCR(__attribute__((unused)) T_IO_Context * context)
void Load_SCR(T_IO_Context * context)
{
// The Amstrad CPC screen memory is mapped in a weird mode, somewhere
// between bitmap and textmode. Basically the only way to decode this is to
@ -2919,6 +2920,7 @@ void Load_SCR(__attribute__((unused)) T_IO_Context * context)
// 6) Open the file
// 7) Run around the screen to untangle the pixeldata
// 8) Close the file
(void)context; // unused
}
void Save_SCR(T_IO_Context * context)

View File

@ -338,26 +338,18 @@ fstype_to_string (int t)
}
#endif /* MOUNTED_VMOUNT */
#ifdef __linux__
#define BROKEN __attribute__((unused))
#else
#define BROKEN
#endif
#if defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2
/* Return the device number from MOUNT_OPTIONS, if possible.
Otherwise return (dev_t) -1. */
static dev_t
dev_from_mount_options (BROKEN char const *mount_options)
dev_from_mount_options (char const *mount_options)
{
/* GNU/Linux allows file system implementations to define their own
meaning for "dev=" mount options, so don't trust the meaning
here. */
# ifndef __linux__
static char const dev_pattern[] = ",dev=";
char const *devopt = strstr (mount_options, dev_pattern);
@ -374,7 +366,8 @@ dev_from_mount_options (BROKEN char const *mount_options)
&& dev == (dev_t) dev)
return dev;
}
#else
(void)mount_options; // unused
# endif
return -1;
@ -388,11 +381,12 @@ dev_from_mount_options (BROKEN char const *mount_options)
the returned list are valid. Otherwise, they might not be. */
struct mount_entry *
read_file_system_list (BROKEN bool need_fs_type)
read_file_system_list (bool need_fs_type)
{
struct mount_entry *mount_list;
struct mount_entry *me;
struct mount_entry **mtail = &mount_list;
(void)need_fs_type; // may be unused
#ifdef MOUNTED_LISTMNTENT
{

View File

@ -1208,13 +1208,14 @@ void Convert_24b_bitmap_to_256_Floyd_Steinberg(T_Bitmap256 dest,T_Bitmap24B sour
/// Converts from 24b to 256c without dithering, using given conversion table
void Convert_24b_bitmap_to_256_nearest_neighbor(T_Bitmap256 dest,
T_Bitmap24B source, int width, int height, __attribute__((unused)) T_Components * palette,
T_Bitmap24B source, int width, int height, T_Components * palette,
CT_Tree* tc)
{
T_Bitmap24B current;
T_Bitmap256 d;
int x_pos, y_pos;
int red, green, blue;
(void)palette; // unused
// On initialise les variables de parcours:
current =source; // Le pixel dont on s'occupe

View File

@ -34,9 +34,6 @@
#define ZOOMX 2
#define ZOOMY 2
#ifdef __VBCC__
#define __attribute__(x)
#endif
void Pixel_double (word x,word y,byte color)
/* Affiche un pixel de la color aux coords x;y à l'écran */
@ -216,12 +213,15 @@ void Display_brush_mono_double(word x_pos, word y_pos,
Update_rect(x_pos,y_pos,width,height);
}
void Clear_brush_double(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)
void Clear_brush_double(word x_pos,word y_pos,word x_offset,word y_offset,word width,word height,byte transp_color,word image_width)
{
byte* dest=Screen_pixels+x_pos*ZOOMX+y_pos*ZOOMY*VIDEO_LINE_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;
(void)x_offset; // unused
(void)y_offset; // unused
(void)transp_color; // unused
for(y=height;y!=0;y--)
// Pour chaque ligne
@ -471,13 +471,14 @@ void Display_brush_mono_zoom_double(word x_pos, word y_pos,
}
}
void Clear_brush_scaled_double(word x_pos,word y_pos,word x_offset,word y_offset,word width,word end_y_pos,__attribute__((unused)) byte transp_color,word image_width,byte * buffer)
void Clear_brush_scaled_double(word x_pos,word y_pos,word x_offset,word y_offset,word width,word end_y_pos,byte transp_color,word image_width,byte * buffer)
{
// En fait on va recopier l'image non zoomée dans la partie zoomée !
byte* src = Main_screen + y_offset * image_width + x_offset;
int y = y_pos;
int bx;
(void)transp_color; // unused
// Pour chaque ligne à zoomer
while(1){

View File

@ -33,9 +33,6 @@
#define ZOOMX 4
#define ZOOMY 4
#ifdef __VBCC__
#define __attribute__(x)
#endif
void Pixel_quad (word x,word y,byte color)
/* Affiche un pixel de la color aux coords x;y à l'écran */
@ -231,12 +228,15 @@ void Display_brush_mono_quad(word x_pos, word y_pos,
Update_rect(x_pos,y_pos,width,height);
}
void Clear_brush_quad(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)
void Clear_brush_quad(word x_pos,word y_pos,word x_offset,word y_offset,word width,word height,byte transp_color,word image_width)
{
byte* dest=Screen_pixels+x_pos*ZOOMX+y_pos*ZOOMY*VIDEO_LINE_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;
(void)x_offset; // unused
(void)y_offset; // unused
(void)transp_color; // unused
for(y=height;y!=0;y--)
// Pour chaque ligne
@ -505,13 +505,14 @@ void Display_brush_mono_zoom_quad(word x_pos, word y_pos,
}
}
void Clear_brush_scaled_quad(word x_pos,word y_pos,word x_offset,word y_offset,word width,word end_y_pos,__attribute__((unused)) byte transp_color,word image_width,byte * buffer)
void Clear_brush_scaled_quad(word x_pos,word y_pos,word x_offset,word y_offset,word width,word end_y_pos,byte transp_color,word image_width,byte * buffer)
{
// En fait on va recopier l'image non zoomée dans la partie zoomée !
byte* src = Main_screen + y_offset * image_width + x_offset;
int y = y_pos;
int bx;
(void)transp_color; // unused
// Pour chaque ligne à zoomer
while(1){

View File

@ -30,9 +30,6 @@
#include "graph.h"
#include "pxsimple.h"
#ifdef __VBCC__
#define __attribute__(x)
#endif
void Pixel_simple (word x,word y,byte color)
/* Affiche un pixel de la color aux coords x;y à l'écran */
@ -200,11 +197,14 @@ void Display_brush_mono_simple(word x_pos, word y_pos,
Update_rect(x_pos,y_pos,width,height);
}
void Clear_brush_simple(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)
void Clear_brush_simple(word x_pos,word y_pos,word x_offset,word y_offset,word width,word height,byte transp_color,word image_width)
{
byte* dest=Screen_pixels+x_pos+y_pos*VIDEO_LINE_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
(void)y_offset; // unused
(void)transp_color; // unused
for(y=height;y!=0;y--)
// Pour chaque ligne
@ -445,12 +445,13 @@ void Display_brush_mono_zoom_simple(word x_pos, word y_pos,
}
}
void Clear_brush_scaled_simple(word x_pos,word y_pos,word x_offset,word y_offset,word width,word end_y_pos,__attribute__((unused)) byte transp_color,word image_width,byte * buffer)
void Clear_brush_scaled_simple(word x_pos,word y_pos,word x_offset,word y_offset,word width,word end_y_pos,byte transp_color,word image_width,byte * buffer)
{
// En fait on va recopier l'image non zoomée dans la partie zoomée !
byte* src = Main_screen + y_offset * image_width + x_offset;
int y = y_pos;
int bx;
(void)transp_color; // unused
// Pour chaque ligne à zoomer
while(1){

View File

@ -34,9 +34,6 @@
#define ZOOMX 1
#define ZOOMY 2
#ifdef __VBCC__
#define __attribute__(x)
#endif
void Pixel_tall (word x,word y,byte color)
/* Affiche un pixel de la color aux coords x;y à l'écran */
@ -215,11 +212,14 @@ void Display_brush_mono_tall(word x_pos, word y_pos,
Update_rect(x_pos,y_pos,width,height);
}
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)
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)
{
byte* dest=Screen_pixels+x_pos+y_pos*ZOOMY*VIDEO_LINE_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
(void)y_offset; // unused
(void)transp_color; // unused
for(y=height;y!=0;y--)
// Pour chaque ligne
@ -430,12 +430,13 @@ void Display_brush_mono_zoom_tall(word x_pos, word y_pos,
}
}
void Clear_brush_scaled_tall(word x_pos,word y_pos,word x_offset,word y_offset,word width,word end_y_pos,__attribute__((unused)) byte transp_color,word image_width,byte * buffer)
void Clear_brush_scaled_tall(word x_pos,word y_pos,word x_offset,word y_offset,word width,word end_y_pos,byte transp_color,word image_width,byte * buffer)
{
// En fait on va recopier l'image non zoomée dans la partie zoomée !
byte* src = Main_screen + y_offset * image_width + x_offset;
int y = y_pos;
int bx;
(void)transp_color; // unused
// Pour chaque ligne à zoomer
while(1){

View File

@ -33,9 +33,6 @@
#define ZOOMX 2
#define ZOOMY 4
#ifdef __VBCC__
#define __attribute__(x)
#endif
void Pixel_tall2 (word x,word y,byte color)
/* Affiche un pixel de la color aux coords x;y à l'écran */
@ -223,12 +220,15 @@ void Display_brush_mono_tall2(word x_pos, word y_pos,
Update_rect(x_pos,y_pos,width,height);
}
void Clear_brush_tall2(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)
void Clear_brush_tall2(word x_pos,word y_pos,word x_offset,word y_offset,word width,word height,byte transp_color,word image_width)
{
byte* dest=Screen_pixels+x_pos*ZOOMX+y_pos*ZOOMY*VIDEO_LINE_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;
(void)x_offset; // unused
(void)y_offset; // unused
(void)transp_color; // unused
for(y=height;y!=0;y--)
// Pour chaque ligne
@ -497,13 +497,14 @@ void Display_brush_mono_zoom_tall2(word x_pos, word y_pos,
}
}
void Clear_brush_scaled_tall2(word x_pos,word y_pos,word x_offset,word y_offset,word width,word end_y_pos,__attribute__((unused)) byte transp_color,word image_width,byte * buffer)
void Clear_brush_scaled_tall2(word x_pos,word y_pos,word x_offset,word y_offset,word width,word end_y_pos,byte transp_color,word image_width,byte * buffer)
{
// En fait on va recopier l'image non zoomée dans la partie zoomée !
byte* src = Main_screen + y_offset * image_width + x_offset;
int y = y_pos;
int bx;
(void)transp_color; // unused
// Pour chaque ligne à zoomer
while(1){

View File

@ -33,9 +33,6 @@
#define ZOOMX 3
#define ZOOMY 3
#ifdef __VBCC__
#define __attribute__(x)
#endif
void Pixel_triple (word x,word y,byte color)
/* Affiche un pixel de la color aux coords x;y à l'écran */
@ -222,12 +219,15 @@ void Display_brush_mono_triple(word x_pos, word y_pos,
Update_rect(x_pos,y_pos,width,height);
}
void Clear_brush_triple(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)
void Clear_brush_triple(word x_pos,word y_pos,word x_offset,word y_offset,word width,word height,byte transp_color,word image_width)
{
byte* dest=Screen_pixels+x_pos*ZOOMX+y_pos*ZOOMY*VIDEO_LINE_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;
(void)x_offset; // unused
(void)y_offset; // unused
(void)transp_color; // unused
for(y=height;y!=0;y--)
// Pour chaque ligne
@ -493,13 +493,14 @@ void Display_brush_mono_zoom_triple(word x_pos, word y_pos,
}
}
void Clear_brush_scaled_triple(word x_pos,word y_pos,word x_offset,word y_offset,word width,word end_y_pos,__attribute__((unused)) byte transp_color,word image_width,byte * buffer)
void Clear_brush_scaled_triple(word x_pos,word y_pos,word x_offset,word y_offset,word width,word end_y_pos,byte transp_color,word image_width,byte * buffer)
{
// En fait on va recopier l'image non zoomée dans la partie zoomée !
byte* src = Main_screen + y_offset * image_width + x_offset;
int y = y_pos;
int bx;
(void)transp_color; // unused
// Pour chaque ligne à zoomer
while(1){

View File

@ -33,9 +33,6 @@
#define ZOOMX 2
#define ZOOMY 1
#ifdef __VBCC__
#define __attribute__(x)
#endif
void Pixel_wide (word x,word y,byte color)
/* Affiche un pixel de la color aux coords x;y à l'écran */
@ -211,12 +208,15 @@ void Display_brush_mono_wide(word x_pos, word y_pos,
Update_rect(x_pos,y_pos,width,height);
}
void Clear_brush_wide(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)
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)
{
byte* dest=Screen_pixels+x_pos*ZOOMX+y_pos*ZOOMY*VIDEO_LINE_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;
(void)x_offset; // unused
(void)y_offset; // unused
(void)transp_color; // unused
for(y=height;y!=0;y--)
// Pour chaque ligne
@ -481,12 +481,13 @@ void Display_brush_mono_zoom_wide(word x_pos, word y_pos,
}
}
void Clear_brush_scaled_wide(word x_pos,word y_pos,word x_offset,word y_offset,word width,word end_y_pos,__attribute__((unused)) byte transp_color,word image_width,byte * buffer)
void Clear_brush_scaled_wide(word x_pos,word y_pos,word x_offset,word y_offset,word width,word end_y_pos,byte transp_color,word image_width,byte * buffer)
{
// En fait on va recopier l'image non zoomée dans la partie zoomée !
byte* src = Main_screen + y_offset * image_width + x_offset;
int y = y_pos;
int bx;
(void)transp_color; // unused
// Pour chaque ligne à zoomer
while(1){

View File

@ -33,9 +33,6 @@
#define ZOOMX 4
#define ZOOMY 2
#ifdef __VBCC__
#define __attribute__(w)
#endif
void Pixel_wide2 (word x,word y,byte color)
/* Affiche un pixel de la color aux coords x;y à l'écran */
@ -219,12 +216,15 @@ void Display_brush_mono_wide2(word x_pos, word y_pos,
Update_rect(x_pos,y_pos,width,height);
}
void Clear_brush_wide2(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)
void Clear_brush_wide2(word x_pos,word y_pos,word x_offset,word y_offset,word width,word height,byte transp_color,word image_width)
{
byte* dest=Screen_pixels+x_pos*ZOOMX+y_pos*ZOOMY*VIDEO_LINE_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;
(void)x_offset; // unused
(void)y_offset; // unused
(void)transp_color; // unused
for(y=height;y!=0;y--)
// Pour chaque ligne
@ -487,13 +487,14 @@ void Display_brush_mono_zoom_wide2(word x_pos, word y_pos,
}
}
void Clear_brush_scaled_wide2(word x_pos,word y_pos,word x_offset,word y_offset,word width,word end_y_pos,__attribute__((unused)) byte transp_color,word image_width,byte * buffer)
void Clear_brush_scaled_wide2(word x_pos,word y_pos,word x_offset,word y_offset,word width,word end_y_pos,byte transp_color,word image_width,byte * buffer)
{
// En fait on va recopier l'image non zoomée dans la partie zoomée !
byte* src = Main_screen + y_offset * image_width + x_offset;
int y = y_pos;
int bx;
(void)transp_color; // unused
// Pour chaque ligne à zoomer
while(1){

View File

@ -63,20 +63,15 @@ int Create_ConfigDirectory(char * config_dir)
#endif
}
#if defined(__macosx__) || defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__) || defined(__amigaos__) && !defined(__VBCC__)
#define ARG_UNUSED __attribute__((unused))
#else
#define ARG_UNUSED
#endif
// Determine which directory contains the executable.
// IN: Main's argv[0], some platforms need it, some don't.
// OUT: Write into program_dir. Trailing / or \ is kept.
// Note : in fact this is only used to check for the datafiles and fonts in
// this same directory.
void Set_program_directory(ARG_UNUSED const char * argv0,char * program_dir)
void Set_program_directory(const char * argv0,char * program_dir)
{
#undef ARG_UNUSED
(void)argv0; // unused sometimes
// MacOSX
#if defined(__macosx__)
CFURLRef url = CFBundleCopyBundleURL(CFBundleGetMainBundle());

View File

@ -633,17 +633,17 @@ byte *Render_text_SFont(const char *str, int font_number, int *width, int *heigh
return new_brush;
}
#ifdef NOTTF
#define TTFONLY __attribute__((unused))
#else
#define TTFONLY
#endif
// Crée une brosse à partir des paramètres de texte demandés.
// Si cela réussit, la fonction place les dimensions dans width et height,
// et retourne l'adresse du bloc d'octets.
byte *Render_text(const char *str, int font_number, TTFONLY int size, int TTFONLY antialias, TTFONLY int bold, TTFONLY int italic, int *width, int *height, T_Palette palette)
byte *Render_text(const char *str, int font_number, int size, int antialias, int bold, int italic, int *width, int *height, T_Palette palette)
{
#ifdef NOTTF
(void) size; // unused
(void) antialias; // unused
(void) bold; // unused
(void) italic; // unused
#endif
T_Font *font = font_list_start;
int index=font_number;