https://sourceforge.net/p/toppler/bugs/16/ --- bonus.cc.orig 2012-12-22 05:02:06.000000000 -0600 +++ bonus.cc 2016-12-05 20:44:39.000000000 -0600 @@ -48,7 +48,7 @@ /* current game time */ -static Sint32 time; +static Sint32 currtime; /* current xposition, this is ongoing from tower to * tower so that you continue where you've left of in @@ -62,10 +62,10 @@ /* lets first calc the position of the tower on the screen */ Sint32 towerpos; - if (time < gametime/2) - towerpos = -(4*time); + if (currtime < gametime/2) + towerpos = -(4*currtime); else - towerpos = gametime * scrollerspeed - 4*time + SCREENWID + (SPR_SLICEWID*2); + towerpos = gametime * scrollerspeed - 4*currtime + SCREENWID + (SPR_SLICEWID*2); /* draw the background layers */ scr_draw_bonus1(xpos, towerpos); @@ -75,7 +75,7 @@ scr_draw_torpedo(torpedoy, torpedox); /* output the submarine */ - scr_draw_submarine(subposy - 20, subposx, time % 9); + scr_draw_submarine(subposy - 20, subposx, currtime % 9); /* and the fishes */ for (int b = 0; b < fishcnt; b++) @@ -137,7 +137,7 @@ torpedox = -1; /* restart timer */ - time = 0; + currtime = 0; key_readkey(); @@ -254,22 +254,22 @@ } /* change towercolor in the middle of the game */ - if ((time > gametime/2) && !newtowercol) { + if ((currtime > gametime/2) && !newtowercol) { scr_settowercolor(lev_towercol_red(), lev_towercol_green(), lev_towercol_blue()); newtowercol = true; } /* end of game, switch to automatic, stop scrolling */ - if (time == gametime) { + if (currtime == gametime) { automatic = true; if ((subposx == SUBM_TARGET_X) && (subposy == SUBM_TARGET_Y)) break; } else { xpos +=4; xpos_ofs += 4; - time++; + currtime++; } - if (!((time + 20) & 0x3f)) ttsounds::instance()->startsound(SND_SONAR); + if (!((currtime + 20) & 0x3f)) ttsounds::instance()->startsound(SND_SONAR); /* display screen and wait */ show();