From ad1afbb83c731dc66f7674cb32ea9a0aa0a82dc3 Mon Sep 17 00:00:00 2001 From: "fabio.olimpieri" Date: Sun, 23 Mar 2014 17:49:03 +0000 Subject: [PATCH] Removed duplicated code --- src/menu_sdl.c | 48 +----------------------------------------------- 1 file changed, 1 insertion(+), 47 deletions(-) diff --git a/src/menu_sdl.c b/src/menu_sdl.c index ad7aedb..aab0d95 100644 --- a/src/menu_sdl.c +++ b/src/menu_sdl.c @@ -496,52 +496,6 @@ void print_font(SDL_Surface *screen, int r, int g, int b, SDL_FreeSurface(font_surf); } - -#ifdef GEKKO -inline void paint_one_pixel_scr(unsigned char *colour,unsigned char *address) -{ - *(address++)=*(colour+2); - *(address++)=*(colour+3); -} -#else - -inline void paint_one_pixel_scr(unsigned char *colour,unsigned char *address) { - - #if BYTE_ORDER == LITTLE_ENDIAN - switch(ordenador.bpp) { - case 1: - *address=*colour; - break; - case 3: - *(address++)=*(colour++); - case 2: - *(address++)=*(colour++); - *(address++)=*(colour++); - break; - case 4: - *((unsigned int *)address)=*((unsigned int *)colour); - break; - } - #else //BIG ENDIAN - switch(ordenador.bpp) { - case 1: - *address=*(colour+3); - break; - case 3: - *(address++)=*(colour+1); - case 2: - *(address++)=*(colour+2); - *(address++)=*(colour+3); - break; - case 4: - *((unsigned int *)address)=*((unsigned int *)colour); - break; - } - #endif - -} -#endif - void draw_scr_file(int x,int y, char *filename) { FILE *fichero; @@ -586,7 +540,7 @@ void draw_scr_file(int x,int y, char *filename) address = (unsigned char *)(ordenador.screen->pixels + (x + loop_x*8 + bucle + (y + loop_y)*640)*ordenador.bpp); - paint_one_pixel_scr((unsigned char *)p, address); + paint_one_pixel((unsigned char *)p, address); mask = ((mask >> 1) & 0x7F); }