From 48238b8c3c8d180bb72a6f7a8e8ff0d9e523f825 Mon Sep 17 00:00:00 2001 From: Nipun Garg Date: Sat, 8 Jun 2019 16:22:26 +0530 Subject: HDB: Remove redundant modulo --- engines/hdb/draw-manager.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'engines') 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); } } -- cgit v1.2.3