diff options
author | Strangerke | 2019-09-07 22:49:07 +0200 |
---|---|---|
committer | Strangerke | 2019-09-07 22:49:07 +0200 |
commit | b1db45b718c6ebdc4f159a22c7b8ab1ecf6ce106 (patch) | |
tree | 28d2a36576be8708d67c4d97f5bc4b97bfa956b3 | |
parent | d99ba0a12675286d81431cb38f6ef55c02e7d497 (diff) | |
download | scummvm-rg350-b1db45b718c6ebdc4f159a22c7b8ab1ecf6ce106.tar.gz scummvm-rg350-b1db45b718c6ebdc4f159a22c7b8ab1ecf6ce106.tar.bz2 scummvm-rg350-b1db45b718c6ebdc4f159a22c7b8ab1ecf6ce106.zip |
HDB: Remove useless returns
-rw-r--r-- | dists/msvc9/engines/plugins_table.h | 222 | ||||
-rw-r--r-- | engines/hdb/gfx.cpp | 31 | ||||
-rw-r--r-- | graphics/primitives.cpp | 4 |
3 files changed, 236 insertions, 21 deletions
diff --git a/dists/msvc9/engines/plugins_table.h b/dists/msvc9/engines/plugins_table.h new file mode 100644 index 0000000000..7fb3a4cc2b --- /dev/null +++ b/dists/msvc9/engines/plugins_table.h @@ -0,0 +1,222 @@ +/* This file is automatically generated by create_project */ +/* DO NOT EDIT MANUALLY */ +// This file is being included by "base/plugins.cpp" +#if PLUGIN_ENABLED_STATIC(SCUMM) +LINK_PLUGIN(SCUMM) +#endif +#if PLUGIN_ENABLED_STATIC(ACCESS) +LINK_PLUGIN(ACCESS) +#endif +#if PLUGIN_ENABLED_STATIC(ADL) +LINK_PLUGIN(ADL) +#endif +#if PLUGIN_ENABLED_STATIC(AGI) +LINK_PLUGIN(AGI) +#endif +#if PLUGIN_ENABLED_STATIC(AGOS) +LINK_PLUGIN(AGOS) +#endif +#if PLUGIN_ENABLED_STATIC(AVALANCHE) +LINK_PLUGIN(AVALANCHE) +#endif +#if PLUGIN_ENABLED_STATIC(BBVS) +LINK_PLUGIN(BBVS) +#endif +#if PLUGIN_ENABLED_STATIC(BLADERUNNER) +LINK_PLUGIN(BLADERUNNER) +#endif +#if PLUGIN_ENABLED_STATIC(CGE) +LINK_PLUGIN(CGE) +#endif +#if PLUGIN_ENABLED_STATIC(CGE2) +LINK_PLUGIN(CGE2) +#endif +#if PLUGIN_ENABLED_STATIC(CHEWY) +LINK_PLUGIN(CHEWY) +#endif +#if PLUGIN_ENABLED_STATIC(CINE) +LINK_PLUGIN(CINE) +#endif +#if PLUGIN_ENABLED_STATIC(COMPOSER) +LINK_PLUGIN(COMPOSER) +#endif +#if PLUGIN_ENABLED_STATIC(CRUISE) +LINK_PLUGIN(CRUISE) +#endif +#if PLUGIN_ENABLED_STATIC(CRYO) +LINK_PLUGIN(CRYO) +#endif +#if PLUGIN_ENABLED_STATIC(CRYOMNI3D) +LINK_PLUGIN(CRYOMNI3D) +#endif +#if PLUGIN_ENABLED_STATIC(DIRECTOR) +LINK_PLUGIN(DIRECTOR) +#endif +#if PLUGIN_ENABLED_STATIC(DM) +LINK_PLUGIN(DM) +#endif +#if PLUGIN_ENABLED_STATIC(DRACI) +LINK_PLUGIN(DRACI) +#endif +#if PLUGIN_ENABLED_STATIC(DRASCULA) +LINK_PLUGIN(DRASCULA) +#endif +#if PLUGIN_ENABLED_STATIC(DREAMWEB) +LINK_PLUGIN(DREAMWEB) +#endif +#if PLUGIN_ENABLED_STATIC(FULLPIPE) +LINK_PLUGIN(FULLPIPE) +#endif +#if PLUGIN_ENABLED_STATIC(GLK) +LINK_PLUGIN(GLK) +#endif +#if PLUGIN_ENABLED_STATIC(GNAP) +LINK_PLUGIN(GNAP) +#endif +#if PLUGIN_ENABLED_STATIC(GOB) +LINK_PLUGIN(GOB) +#endif +#if PLUGIN_ENABLED_STATIC(GROOVIE) +LINK_PLUGIN(GROOVIE) +#endif +#if PLUGIN_ENABLED_STATIC(HDB) +LINK_PLUGIN(HDB) +#endif +#if PLUGIN_ENABLED_STATIC(HOPKINS) +LINK_PLUGIN(HOPKINS) +#endif +#if PLUGIN_ENABLED_STATIC(HUGO) +LINK_PLUGIN(HUGO) +#endif +#if PLUGIN_ENABLED_STATIC(ILLUSIONS) +LINK_PLUGIN(ILLUSIONS) +#endif +#if PLUGIN_ENABLED_STATIC(KYRA) +LINK_PLUGIN(KYRA) +#endif +#if PLUGIN_ENABLED_STATIC(LAB) +LINK_PLUGIN(LAB) +#endif +#if PLUGIN_ENABLED_STATIC(LASTEXPRESS) +LINK_PLUGIN(LASTEXPRESS) +#endif +#if PLUGIN_ENABLED_STATIC(LILLIPUT) +LINK_PLUGIN(LILLIPUT) +#endif +#if PLUGIN_ENABLED_STATIC(LURE) +LINK_PLUGIN(LURE) +#endif +#if PLUGIN_ENABLED_STATIC(MACVENTURE) +LINK_PLUGIN(MACVENTURE) +#endif +#if PLUGIN_ENABLED_STATIC(MADE) +LINK_PLUGIN(MADE) +#endif +#if PLUGIN_ENABLED_STATIC(MADS) +LINK_PLUGIN(MADS) +#endif +#if PLUGIN_ENABLED_STATIC(MOHAWK) +LINK_PLUGIN(MOHAWK) +#endif +#if PLUGIN_ENABLED_STATIC(MORTEVIELLE) +LINK_PLUGIN(MORTEVIELLE) +#endif +#if PLUGIN_ENABLED_STATIC(MUTATIONOFJB) +LINK_PLUGIN(MUTATIONOFJB) +#endif +#if PLUGIN_ENABLED_STATIC(NEVERHOOD) +LINK_PLUGIN(NEVERHOOD) +#endif +#if PLUGIN_ENABLED_STATIC(PARALLACTION) +LINK_PLUGIN(PARALLACTION) +#endif +#if PLUGIN_ENABLED_STATIC(PEGASUS) +LINK_PLUGIN(PEGASUS) +#endif +#if PLUGIN_ENABLED_STATIC(PINK) +LINK_PLUGIN(PINK) +#endif +#if PLUGIN_ENABLED_STATIC(PLUMBERS) +LINK_PLUGIN(PLUMBERS) +#endif +#if PLUGIN_ENABLED_STATIC(PRINCE) +LINK_PLUGIN(PRINCE) +#endif +#if PLUGIN_ENABLED_STATIC(QUEEN) +LINK_PLUGIN(QUEEN) +#endif +#if PLUGIN_ENABLED_STATIC(SAGA) +LINK_PLUGIN(SAGA) +#endif +#if PLUGIN_ENABLED_STATIC(SCI) +LINK_PLUGIN(SCI) +#endif +#if PLUGIN_ENABLED_STATIC(SHERLOCK) +LINK_PLUGIN(SHERLOCK) +#endif +#if PLUGIN_ENABLED_STATIC(SKY) +LINK_PLUGIN(SKY) +#endif +#if PLUGIN_ENABLED_STATIC(SLUDGE) +LINK_PLUGIN(SLUDGE) +#endif +#if PLUGIN_ENABLED_STATIC(STARTREK) +LINK_PLUGIN(STARTREK) +#endif +#if PLUGIN_ENABLED_STATIC(SUPERNOVA) +LINK_PLUGIN(SUPERNOVA) +#endif +#if PLUGIN_ENABLED_STATIC(SWORD1) +LINK_PLUGIN(SWORD1) +#endif +#if PLUGIN_ENABLED_STATIC(SWORD2) +LINK_PLUGIN(SWORD2) +#endif +#if PLUGIN_ENABLED_STATIC(SWORD25) +LINK_PLUGIN(SWORD25) +#endif +#if PLUGIN_ENABLED_STATIC(TEENAGENT) +LINK_PLUGIN(TEENAGENT) +#endif +#if PLUGIN_ENABLED_STATIC(TESTBED) +LINK_PLUGIN(TESTBED) +#endif +#if PLUGIN_ENABLED_STATIC(TINSEL) +LINK_PLUGIN(TINSEL) +#endif +#if PLUGIN_ENABLED_STATIC(TITANIC) +LINK_PLUGIN(TITANIC) +#endif +#if PLUGIN_ENABLED_STATIC(TOLTECS) +LINK_PLUGIN(TOLTECS) +#endif +#if PLUGIN_ENABLED_STATIC(TONY) +LINK_PLUGIN(TONY) +#endif +#if PLUGIN_ENABLED_STATIC(TOON) +LINK_PLUGIN(TOON) +#endif +#if PLUGIN_ENABLED_STATIC(TOUCHE) +LINK_PLUGIN(TOUCHE) +#endif +#if PLUGIN_ENABLED_STATIC(TSAGE) +LINK_PLUGIN(TSAGE) +#endif +#if PLUGIN_ENABLED_STATIC(TUCKER) +LINK_PLUGIN(TUCKER) +#endif +#if PLUGIN_ENABLED_STATIC(VOYEUR) +LINK_PLUGIN(VOYEUR) +#endif +#if PLUGIN_ENABLED_STATIC(WAGE) +LINK_PLUGIN(WAGE) +#endif +#if PLUGIN_ENABLED_STATIC(WINTERMUTE) +LINK_PLUGIN(WINTERMUTE) +#endif +#if PLUGIN_ENABLED_STATIC(XEEN) +LINK_PLUGIN(XEEN) +#endif +#if PLUGIN_ENABLED_STATIC(ZVISION) +LINK_PLUGIN(ZVISION) +#endif diff --git a/engines/hdb/gfx.cpp b/engines/hdb/gfx.cpp index b4f7d22795..42f6f23e5c 100644 --- a/engines/hdb/gfx.cpp +++ b/engines/hdb/gfx.cpp @@ -798,16 +798,12 @@ void Gfx::setSky(int skyIndex) { } // Setup current sky - if (tileIndex == _tileSkyStars) { + if (tileIndex == _tileSkyStars) setup3DStars(); - return; - } else if (tileIndex == _tileSkyStarsLeft) { + else if (tileIndex == _tileSkyStarsLeft) setup3DStarsLeft(); - return; - } else if (tileIndex == _tileSkyClouds) { + else if (tileIndex == _tileSkyClouds) _skyClouds = getPicture(CLOUDY_SKIES); - return; - } } void Gfx::setup3DStars() { @@ -815,9 +811,9 @@ void Gfx::setup3DStars() { _stars3D[i].x = g_hdb->_rnd->getRandomNumber(g_hdb->_screenWidth - 1); _stars3D[i].y = g_hdb->_rnd->getRandomNumber(g_hdb->_screenHeight - 1); _stars3D[i].speed = g_hdb->_rnd->getRandomNumber(255); - if (g_hdb->isPPC()) { + if (g_hdb->isPPC()) _stars3D[i].color = g_hdb->_format.RGBToColor(_stars3D[i].speed, _stars3D[i].speed, _stars3D[i].speed); - } else { + else { _stars3D[i].speed >>= 1; _stars3D[i].color = _stars3D[i].speed / 64; } @@ -846,9 +842,9 @@ void Gfx::draw3DStars() { _starField[_stars3D[i].color]->drawMasked((int)_stars3D[i].x, (int)_stars3D[i].y); _stars3D[i].y += (_stars3D[i].speed >> 5) + 1; } - if (_stars3D[i].y > g_hdb->_screenHeight) { + + if (_stars3D[i].y > g_hdb->_screenHeight) _stars3D[i].y = 0; - } } } @@ -860,20 +856,19 @@ void Gfx::draw3DStarsLeft() { else _starField[_stars3DSlow[i].color]->drawMasked((int)_stars3DSlow[i].x, (int)_stars3DSlow[i].y); _stars3DSlow[i].x -= _stars3DSlow[i].speed; - if (_stars3DSlow[i].x < 0) { + if (_stars3DSlow[i].x < 0) _stars3DSlow[i].x = g_hdb->_screenWidth - 1; - } } } void Gfx::drawSky() { int tile = _skyTiles[_currentSky - 1]; - if (tile == _tileSkyStars) { + if (tile == _tileSkyStars) draw3DStars(); - } else if (tile == _tileSkyStarsLeft) { + else if (tile == _tileSkyStarsLeft) draw3DStarsLeft(); - } else if (tile == _tileSkyClouds) { + else if (tile == _tileSkyClouds) { static int offset = 0, wait = 0; for (int j = -64; j < g_hdb->_screenHeight; j += 64) { for (int i = -64; i < g_hdb->_screenWidth; i += 64) { @@ -891,7 +886,6 @@ void Gfx::drawSky() { static const int snowXVList[13] = {0, -1, -1, -2, -2, -1, 0, 0, 0, -1, -2, -1, 0}; - void Gfx::drawSnow() { if (_snowInfo.active == false) return; @@ -1289,12 +1283,11 @@ void Gfx::drawBonusStars() { } void Gfx::drawDebugInfo(Tile *_debugLogo, int fps) { - char buff[64]; - _debugLogo->drawMasked(g_hdb->_screenWidth - 32, 0); // Draw FPS setCursor(0, 0); + char buff[64]; sprintf(buff, "FPS: %d", fps); drawText(buff); diff --git a/graphics/primitives.cpp b/graphics/primitives.cpp index 1e48ca16b5..97e3d06177 100644 --- a/graphics/primitives.cpp +++ b/graphics/primitives.cpp @@ -125,7 +125,7 @@ void drawThickLine2(int x1, int y1, int x2, int y2, int thick, int color, void ( /* 2.0.12: Michael Schwartz: divide rather than multiply; TBB: but watch out for /0! */ if (dx != 0 && thick != 0) { - double ac_recip = 1/dx * sqrt(dx * dx + dy * dy); // 1 / cos(atan2((double)dy, (double)dx)); + double ac_recip = 1/dx * sqrt((double)(dx * dx + dy * dy)); // 1 / cos(atan2((double)dy, (double)dx)); wid = thick * ac_recip; } else { wid = 1; @@ -183,7 +183,7 @@ void drawThickLine2(int x1, int y1, int x2, int y2, int thick, int color, void ( /* 2.0.12: Michael Schwartz: divide rather than multiply; TBB: but watch out for /0! */ if (dy != 0 && thick != 0) { - double as_recip = 1/dy * sqrt(dx * dx + dy * dy); // 1 / sin(atan2((double)dy, (double)dx)); + double as_recip = 1/dy * sqrt((double)(dx * dx + dy * dy)); // 1 / sin(atan2((double)dy, (double)dx)); wid = thick * as_recip; } else { wid = 1; |