aboutsummaryrefslogtreecommitdiff
path: root/engines/hdb/hdb.cpp
diff options
context:
space:
mode:
authorNipun Garg2019-07-31 10:26:17 +0530
committerEugene Sandulenko2019-09-03 17:17:30 +0200
commit0fb3ad7ba05983fe64cc5f64294d58fa394935d1 (patch)
tree0007f5d15ee58e4ebc328cace36185997942117e /engines/hdb/hdb.cpp
parent6e357d9d9749f399c5c1a347d4e8d6f7881ce081 (diff)
downloadscummvm-rg350-0fb3ad7ba05983fe64cc5f64294d58fa394935d1.tar.gz
scummvm-rg350-0fb3ad7ba05983fe64cc5f64294d58fa394935d1.tar.bz2
scummvm-rg350-0fb3ad7ba05983fe64cc5f64294d58fa394935d1.zip
HDB: Make Platform specific constants into variables
Diffstat (limited to 'engines/hdb/hdb.cpp')
-rw-r--r--engines/hdb/hdb.cpp29
1 files changed, 21 insertions, 8 deletions
diff --git a/engines/hdb/hdb.cpp b/engines/hdb/hdb.cpp
index f4c46dfc63..d243224ffb 100644
--- a/engines/hdb/hdb.cpp
+++ b/engines/hdb/hdb.cpp
@@ -44,6 +44,19 @@ namespace HDB {
HDBGame* g_hdb;
HDBGame::HDBGame(OSystem *syst, const ADGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc) {
+ if (isPPC()) {
+ _screenWidth = 240;
+ _screenHeight = 320;
+ _screenDrawWidth = 240;
+ _screenDrawHeight = 320;
+ } else {
+ _screenWidth = 640;
+ _screenHeight = 480;
+ _screenDrawWidth = _screenWidth - 160;
+ _screenDrawHeight = 480;
+ }
+ _progressY = _screenHeight - 64;
+
_format = Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0);
_systemInit = false;
g_hdb = this;
@@ -330,9 +343,9 @@ void HDBGame::paint() {
// if the graphic has never been loaded, load it now and leave it in memory
if (!_logoGfx)
_logoGfx = _gfx->loadPic(TITLELOGO);
- _logoGfx->drawMasked(kScreenWidth / 2 - _logoGfx->_width / 2, 10);
+ _logoGfx->drawMasked(_screenWidth / 2 - _logoGfx->_width / 2, 10);
- int x = kScreenWidth / 2 - _progressGfx->_width / 2;
+ int x = _screenWidth / 2 - _progressGfx->_width / 2;
int pixels = _progressGfx->_width - _progressMarkGfx->_width;
_progressXOffset = (int)(((double)pixels / _progressMax) * (double)_progressCurrent) + x;
break;
@@ -342,7 +355,7 @@ void HDBGame::paint() {
if (_debugFlag == 1) {
_gfx->drawDebugInfo(_debugLogo, _frames.size());
} else if (_debugFlag == 2) {
- _debugLogo->drawMasked(kScreenWidth - 32, 0);
+ _debugLogo->drawMasked(_screenWidth - 32, 0);
}
_gfx->updateVideo();
@@ -799,11 +812,11 @@ void HDBGame::checkProgress() {
if (!_progressActive)
return;
- x = kScreenWidth / 2 - _progressGfx->_width / 2;
- _progressGfx->drawMasked(x, kProgressY);
+ x = _screenWidth / 2 - _progressGfx->_width / 2;
+ _progressGfx->drawMasked(x, g_hdb->_progressY);
for (i = x; i < _progressXOffset; i += _progressMarkGfx->_width)
- _progressMarkGfx->drawMasked(i, kProgressY);
- _progressMarkGfx->drawMasked(_progressXOffset, kProgressY);
+ _progressMarkGfx->drawMasked(i, g_hdb->_progressY);
+ _progressMarkGfx->drawMasked(_progressXOffset, g_hdb->_progressY);
}
void HDBGame::drawLoadingScreen() {
@@ -873,7 +886,7 @@ Common::Error HDBGame::run() {
}
// Initializes Graphics
- initGraphics(kScreenWidth, kScreenHeight, &_format);
+ initGraphics(_screenWidth, _screenHeight, &_format);
start();