diff --git a/src/SDL_extras.c b/src/SDL_extras.c index 54648de..6fd5327 100644 --- a/src/SDL_extras.c +++ b/src/SDL_extras.c @@ -1388,6 +1388,13 @@ SDL_Surface* BlackOutline_w(const wchar_t* t, int font_size, const SDL_Color* c, } i = ConvertToUTF8(wchar_tmp, tmp, 1024); + + if (i == 0) + { + fprintf(stderr, "BlackOutline_w(): unable to convert to UTF8, returning.\n"); + return NULL; + } + //tmp[i] = 0; DEBUGCODE diff --git a/src/editor.c b/src/editor.c index 2aa6987..04a48e1 100644 --- a/src/editor.c +++ b/src/editor.c @@ -508,7 +508,6 @@ void EditWordList(char* words_file) SDL_Rect word_rects[8]; int stop = 0; int loc = 0; - int old_loc = 1; FILE* fp = NULL; @@ -893,7 +892,6 @@ void EditWordList(char* words_file) SDL_UpdateRect(screen, 0, 0, 0 ,0); } SDL_Delay(40); // I assume throttling so we don't eat all CPU - old_loc = loc; } // End of 'while (SDL_PollEvent(&event))' loop } // End of 'while(!stop)' loop @@ -956,7 +954,7 @@ void EditWordList(char* words_file) SDL_FreeSurface(right); /* the pointers are going out of scope so we don't */ /* have to worry about setting them to NULL */ -} +} /* "Private" functions */ diff --git a/src/input_methods.c b/src/input_methods.c index 6a67ac7..044fc29 100644 --- a/src/input_methods.c +++ b/src/input_methods.c @@ -416,7 +416,6 @@ static IM_EVENT_FN im_event_fns[NUM_LANGS] = {NULL}; * UTILITY FUNCTIONS */ -#define MIN(a,b) ((a)<=(b) ? (a) : (b)) #define IN_RANGE(a,v,b) ( (a)<=(v) && (v)<(b) ) #define ARRAYLEN(a) ( sizeof(a)/sizeof(*(a)) ) diff --git a/src/laser.c b/src/laser.c index 36b1577..2ccf2e2 100644 --- a/src/laser.c +++ b/src/laser.c @@ -81,7 +81,7 @@ int PlayLaserGame(int diff_level) int i, img, done, quit, frame, lowest, lowest_y, tux_img, old_tux_img, tux_pressing, tux_anim, tux_anim_frame, tux_same_counter, level_start_wait, num_cities_alive, - num_comets_alive, paused, picked_comet, + num_comets_alive, paused, gameover; Uint16 key_unicode; @@ -147,7 +147,6 @@ int PlayLaserGame(int diff_level) frame = 0; paused = 0; - picked_comet = -1; tux_img = IMG_TUX_RELAX1; tux_anim = -1; tux_anim_frame = 0; diff --git a/src/loaders.c b/src/loaders.c index 4663d91..f160370 100644 --- a/src/loaders.c +++ b/src/loaders.c @@ -36,7 +36,6 @@ static SDL_Surface* win_bkgd = NULL; static SDL_Surface* fullscr_bkgd = NULL; /* Local function prototypes: */ -static int max(int n1, int n2); //static SDL_Surface* flip(SDL_Surface *in, int x, int y); /* Returns 1 if valid file, 2 if valid dir, 0 if neither: */ @@ -119,12 +118,6 @@ void LoadLang(void) } -int max(int n1, int n2) -{ - return (n1 > n2 ? n1 : n2); -} - - #ifdef HAVE_RSVG /*********************** SVG related functions diff --git a/src/playgame.c b/src/playgame.c index 87f4c55..a4bf83f 100644 --- a/src/playgame.c +++ b/src/playgame.c @@ -751,7 +751,6 @@ LoadTuxAnims : Load the Tux graphics and animations static int LoadTuxAnims(void) { int i; - int height = 0; //temp width/height varis to determine max's LOG("LoadTuxAnims(): Loading Tux Animations\n"); @@ -768,7 +767,6 @@ static int LoadTuxAnims(void) } tux_max_width = tux_object.spr[TUX_STANDING][RIGHT]->frame[0]->w; - height = tux_object.spr[TUX_STANDING][RIGHT]->frame[0]->h; LOG("LoadTuxAnims(): END\n");