diff options
| author | Nipun Garg | 2019-07-31 00:20:09 +0530 | 
|---|---|---|
| committer | Eugene Sandulenko | 2019-09-03 17:17:30 +0200 | 
| commit | c1d2468f075698fddd9cb0f825d6ee1e0752b3bd (patch) | |
| tree | 83b236a6902ace983ebe76977be1439a565c4c1d | |
| parent | d93c6ec72466e27ffa390c0f6f3933d2ed6640b1 (diff) | |
| download | scummvm-rg350-c1d2468f075698fddd9cb0f825d6ee1e0752b3bd.tar.gz scummvm-rg350-c1d2468f075698fddd9cb0f825d6ee1e0752b3bd.tar.bz2 scummvm-rg350-c1d2468f075698fddd9cb0f825d6ee1e0752b3bd.zip | |
HDB: Section off PPC-specific code
| -rw-r--r-- | engines/hdb/gfx.cpp | 16 | ||||
| -rw-r--r-- | engines/hdb/hdb.cpp | 8 | ||||
| -rw-r--r-- | engines/hdb/input.cpp | 15 | ||||
| -rw-r--r-- | engines/hdb/menu.cpp | 42 | ||||
| -rw-r--r-- | engines/hdb/menu.h | 2 | 
5 files changed, 63 insertions, 20 deletions
| diff --git a/engines/hdb/gfx.cpp b/engines/hdb/gfx.cpp index 5cf80a2a37..b41394b63b 100644 --- a/engines/hdb/gfx.cpp +++ b/engines/hdb/gfx.cpp @@ -218,9 +218,12 @@ void Gfx::loadSaveFile(Common::InSaveFile *in) {  		_snowInfo.xvindex[i] = in->readSint32LE();  	setSky(_currentSky); -	turnOffSnow(); -	if (_snowInfo.active) -		turnOnSnow(); + +	if (!g_hdb->isPPC()) { +		turnOffSnow(); +		if (_snowInfo.active) +			turnOnSnow(); +	}  }  double Gfx::getSin(int index) { @@ -254,6 +257,10 @@ void Gfx::updateVideo() {  }  void Gfx::drawPointer() { + +	if (g_hdb->isPPC()) +		return; +  	static int anim = 0;  	static uint32 animTime = 0; @@ -272,7 +279,8 @@ void Gfx::drawPointer() {  }  void Gfx::setPointerState(int value) { -	_pointerDisplayable = value; +	if (!g_hdb->isPPC()) +		_pointerDisplayable = value;  }  void Gfx::setFade(bool fadeIn, bool black, int steps) { diff --git a/engines/hdb/hdb.cpp b/engines/hdb/hdb.cpp index 12d0871768..f4c46dfc63 100644 --- a/engines/hdb/hdb.cpp +++ b/engines/hdb/hdb.cpp @@ -147,7 +147,8 @@ bool HDBGame::init() {  	_gameShutdown = false;  	_pauseFlag = 0;  	_systemInit = true; -	_loadingScreenGfx = _gfx->loadPic(PIC_LOADSCREEN); +	if (!g_hdb->isPPC()) +		_loadingScreenGfx = _gfx->loadPic(PIC_LOADSCREEN);  	return true;  } @@ -806,7 +807,10 @@ void HDBGame::checkProgress() {  }  void HDBGame::drawLoadingScreen() { -	_loadingScreenGfx->draw(0, 0); +	if (g_hdb->isPPC()) +		_gfx->fillScreen(0); +	else +		_loadingScreenGfx->draw(0, 0);  }  struct MapName { diff --git a/engines/hdb/input.cpp b/engines/hdb/input.cpp index 8c02d1eb79..51f31a4bdf 100644 --- a/engines/hdb/input.cpp +++ b/engines/hdb/input.cpp @@ -45,6 +45,9 @@ bool Input::init() {  	_keyDebug = Common::KEYCODE_F1;  	_keyQuit = Common::KEYCODE_F10; +	if (g_hdb->isPPC()) +		return true; +  	_mouseX = kScreenWidth / 2;  	_mouseY = kScreenHeight / 2; @@ -255,6 +258,10 @@ void Input::stylusMove(int x, int y) {  }  void Input::updateMouse(int newX, int newY) { + +	if (g_hdb->isPPC()) +		return; +  	_mouseX = newX;  	_mouseY = newY; @@ -280,6 +287,10 @@ void Input::updateMouse(int newX, int newY) {  }  void Input::updateMouseButtons(int l, int m, int r) { + +	if (g_hdb->isPPC()) +		return; +  	_mouseLButton += l;  	_mouseMButton += m;  	_mouseRButton += r; @@ -322,6 +333,10 @@ void Input::updateMouseButtons(int l, int m, int r) {  }  void Input::updateKeys(Common::Event event, bool keyDown) { + +	if (g_hdb->isPPC()) +		return; +  	static int current = 0, last = 0;  	if (keyDown && event.kbd.keycode == _keyQuit) { diff --git a/engines/hdb/menu.cpp b/engines/hdb/menu.cpp index 3158e789d6..5f8297f0d4 100644 --- a/engines/hdb/menu.cpp +++ b/engines/hdb/menu.cpp @@ -147,20 +147,32 @@ Menu::~Menu() {  }  bool Menu::init() { -	_gCheckEmpty = g_hdb->_gfx->loadPic(G_CHECK_EMPTY); -	_gCheckOff = g_hdb->_gfx->loadPic(G_CHECK_OFF); -	_gCheckOn = g_hdb->_gfx->loadPic(G_CHECK_ON); -	_gCheckLeft = g_hdb->_gfx->loadPic(G_CHECK_LEFT); -	_gCheckRight = g_hdb->_gfx->loadPic(G_CHECK_RIGHT); -	_contArrowUp = g_hdb->_gfx->loadPic(CTRL_ARROWUP); -	_contArrowDown = g_hdb->_gfx->loadPic(CTRL_ARROWDN); -	_contArrowLeft = g_hdb->_gfx->loadPic(CTRL_ARROWLEFT); -	_contArrowRight = g_hdb->_gfx->loadPic(CTRL_ARROWRIGHT); -	_contAssign = g_hdb->_gfx->loadPic(CTRL_ASSIGN); +	if (g_hdb->isPPC()) { +		if (g_hdb->isDemo()) { +			warning("STUB: Load DEMOTITLESCREEN"); +			warning("STUB: Load PIC_HANDANGO"); +		} +		else +			_hdbLogoScreen = g_hdb->_gfx->loadPic(TITLESCREEN); -	_warpPlaque = g_hdb->_gfx->loadPic(WARP_PLAQUE); -	_hdbLogoScreen = g_hdb->_gfx->loadPic(TITLESCREEN); + +	} else { +		_gCheckEmpty = g_hdb->_gfx->loadPic(G_CHECK_EMPTY); +		_gCheckOff = g_hdb->_gfx->loadPic(G_CHECK_OFF); +		_gCheckOn = g_hdb->_gfx->loadPic(G_CHECK_ON); +		_gCheckLeft = g_hdb->_gfx->loadPic(G_CHECK_LEFT); +		_gCheckRight = g_hdb->_gfx->loadPic(G_CHECK_RIGHT); + +		_contArrowUp = g_hdb->_gfx->loadPic(CTRL_ARROWUP); +		_contArrowDown = g_hdb->_gfx->loadPic(CTRL_ARROWDN); +		_contArrowLeft = g_hdb->_gfx->loadPic(CTRL_ARROWLEFT); +		_contArrowRight = g_hdb->_gfx->loadPic(CTRL_ARROWRIGHT); +		_contAssign = g_hdb->_gfx->loadPic(CTRL_ASSIGN); + +		_warpPlaque = g_hdb->_gfx->loadPic(WARP_PLAQUE); +		_hdbLogoScreen = g_hdb->_gfx->loadPic(TITLESCREEN); +	}  	return true;  } @@ -1532,7 +1544,11 @@ void Menu::drawToggle(int x, int y, bool flag) {  }  void Menu::drawWarpScreen() { -	_warpPlaque->drawMasked(centerPic(_warpPlaque), 64); +	if (g_hdb->isPPC()) { +		g_hdb->_gfx->setCursor(0, kWarpY + 176); +		g_hdb->_gfx->centerPrint("MONKEYSTONE WARP ZONE!"); +	} else +		_warpPlaque->drawMasked(centerPic(_warpPlaque), 64);  }  } // End of Namespace diff --git a/engines/hdb/menu.h b/engines/hdb/menu.h index 7ce6450bab..84a4042943 100644 --- a/engines/hdb/menu.h +++ b/engines/hdb/menu.h @@ -216,7 +216,7 @@ public:  	Picture	*_star[3], *_warpGfx;  	uint32 _quitTimer;  	Picture	*_starRedGfx[2], *_starGreenGfx[2], *_starBlueGfx[2], *_versionGfx; -	Picture *_screenshots1gfx, *_screenshots1agfx, *_screenshots2gfx, *_demoPlaqueGfx; +	Picture *_screenshots1gfx, *_screenshots1agfx, *_screenshots2gfx, *_demoPlaqueGfx, *_handangoGfx;  	bool _menuActive, _optionsScrolling, _newgameActive, _sayHDB;  	int	_gamefilesActive, _clickDelay, _saveSlot, _optionsActive, _quitActive, _warpActive; | 
