From 0011e44087fafe98dea03b08faaa4b00885dfc25 Mon Sep 17 00:00:00 2001 From: zicodxx Date: Sun, 15 Apr 2012 16:15:21 +0200 Subject: [PATCH] Fixed set but unused variables in OGL build --- 2d/bitblt.c | 18 ++++++++++++++++-- CHANGELOG.txt | 1 + main/render.c | 6 ++++-- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/2d/bitblt.c b/2d/bitblt.c index 1b58a1f15..60aaf3110 100644 --- a/2d/bitblt.c +++ b/2d/bitblt.c @@ -385,12 +385,26 @@ void gr_bitmap( int x, int y, grs_bitmap *bm ) { int dx1=x, dx2=x+bm->bm_w-1; int dy1=y, dy2=y+bm->bm_h-1; +#ifndef OGL int sx=0, sy=0; +#endif if ((dx1 >= grd_curcanv->cv_bitmap.bm_w ) || (dx2 < 0)) return; if ((dy1 >= grd_curcanv->cv_bitmap.bm_h) || (dy2 < 0)) return; - if ( dx1 < 0 ) { sx = -dx1; dx1 = 0; } - if ( dy1 < 0 ) { sy = -dy1; dy1 = 0; } + if ( dx1 < 0 ) + { +#ifndef OGL + sx = -dx1; +#endif + dx1 = 0; + } + if ( dy1 < 0 ) + { +#ifndef OGL + sy = -dy1; +#endif + dy1 = 0; + } if ( dx2 >= grd_curcanv->cv_bitmap.bm_w ) { dx2 = grd_curcanv->cv_bitmap.bm_w-1; } if ( dy2 >= grd_curcanv->cv_bitmap.bm_h ) { dy2 = grd_curcanv->cv_bitmap.bm_h-1; } diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 2b5c1e714..35dcc93c2 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -8,6 +8,7 @@ editor/meddraw.c: Set edge_list_size to Num_segments*12 to avoid crashes in the editor/centers.c: Create a centers dialog that won't crash main/bmread.c, main/game.c, main/gameseq.c, main/gameseq.h, main/gauges.c, main/kmatrix.c, main/multi.c, main/multi.h, main/net_udp.c, main/state.c: Further Multiplayer cleanup: moved gobal variable resets from multi_new_game() to proper function calls; added pnum variable to init_player_stats_game() and init_player_stats_new_ship() so these can be set for each player when starting match; added multi_new_level() calls when setting up game as well when trying to join game; cleaned multi_reset_stuff() from variable resetting that happen in general game code; when being dumped from game, made sure no packets are sent during messagebox dispaly; replaced MAX_NUM_NET_PLAYERS by MAX_PLAYERS as it's the same definition misc/hmp.c: Addition for last change in hmp_reset(): execute midiOutShortMsg() even if midiOutPrepareHeader() fails as not related to SysEx part +2d/bitblt.c, main/render.c: Fixed set but unused variables in OGL build 20120414 -------- diff --git a/main/render.c b/main/render.c index 4b1ce08ac..506c26fbc 100644 --- a/main/render.c +++ b/main/render.c @@ -336,18 +336,20 @@ void check_face(int segnum, int sidenum, int facenum, int nv, int *vp, int tmap1 if (_search_mode) { int save_lighting; +#ifndef OGL grs_bitmap *bm; +#endif g3s_uvl uvl_copy[8]; g3s_lrgb dyn_light[8]; g3s_point *pointlist[4]; memset(dyn_light, 0, sizeof(dyn_light)); - +#ifndef OGL if (tmap2 > 0 ) bm = texmerge_get_cached_bitmap( tmap1, tmap2 ); else bm = &GameBitmaps[Textures[tmap1].index]; - +#endif for (i=0; i