diff options
| author | Nipun Garg | 2019-06-08 16:22:26 +0530 |
|---|---|---|
| committer | Eugene Sandulenko | 2019-09-03 17:16:45 +0200 |
| commit | 48238b8c3c8d180bb72a6f7a8e8ff0d9e523f825 (patch) | |
| tree | 79666e21234e887b1835d320e82617ede2261ddb /engines | |
| parent | fa8880129098e5f9fcfe02dae88ecd70943f9d73 (diff) | |
| download | scummvm-rg350-48238b8c3c8d180bb72a6f7a8e8ff0d9e523f825.tar.gz scummvm-rg350-48238b8c3c8d180bb72a6f7a8e8ff0d9e523f825.tar.bz2 scummvm-rg350-48238b8c3c8d180bb72a6f7a8e8ff0d9e523f825.zip | |
HDB: Remove redundant modulo
Diffstat (limited to 'engines')
| -rw-r--r-- | engines/hdb/draw-manager.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/hdb/draw-manager.cpp b/engines/hdb/draw-manager.cpp index 44154ea78a..64c4c62575 100644 --- a/engines/hdb/draw-manager.cpp +++ b/engines/hdb/draw-manager.cpp @@ -157,9 +157,9 @@ void DrawMan::setSky(int skyIndex) { void DrawMan::setup3DStars() { for (int i = 0; i < kNum3DStars; i++) { - _stars3D[i].x = g_hdb->_rnd->getRandomNumber(kScreenWidth) % kScreenWidth; - _stars3D[i].y = g_hdb->_rnd->getRandomNumber(kScreenHeight) % kScreenHeight; - _stars3D[i].speed = (g_hdb->_rnd->getRandomNumber(256) % 256); + _stars3D[i].x = g_hdb->_rnd->getRandomNumber(kScreenWidth); + _stars3D[i].y = g_hdb->_rnd->getRandomNumber(kScreenHeight); + _stars3D[i].speed = g_hdb->_rnd->getRandomNumber(256); _stars3D[i].speed >>= 1; _stars3D[i].color = _stars3D[i].speed / 64; } @@ -167,9 +167,9 @@ void DrawMan::setup3DStars() { void DrawMan::setup3DStarsLeft() { for (int i = 0; i < kNum3DStars; i++) { - _stars3DSlow[i].x = g_hdb->_rnd->getRandomNumber(kScreenWidth) % kScreenWidth; - _stars3DSlow[i].y = g_hdb->_rnd->getRandomNumber(kScreenHeight) % kScreenHeight; - _stars3DSlow[i].speed = ((double) (1 + (g_hdb->_rnd->getRandomNumber(5) % 5))) / 6.0; + _stars3DSlow[i].x = g_hdb->_rnd->getRandomNumber(kScreenWidth); + _stars3DSlow[i].y = g_hdb->_rnd->getRandomNumber(kScreenHeight); + _stars3DSlow[i].speed = ((double) (1 + g_hdb->_rnd->getRandomNumber(5))) / 6.0; _stars3DSlow[i].color = (int) (_stars3DSlow[i].speed * 4.00); } } |
