diff options
Diffstat (limited to 'engines')
| -rw-r--r-- | engines/hdb/ai-cinematic.cpp | 10 | ||||
| -rw-r--r-- | engines/hdb/ai-funcs.cpp | 6 | ||||
| -rw-r--r-- | engines/hdb/ai-init.cpp | 216 | ||||
| -rw-r--r-- | engines/hdb/ai-lists.cpp | 2 | ||||
| -rw-r--r-- | engines/hdb/ai-player.cpp | 20 | ||||
| -rw-r--r-- | engines/hdb/gfx.cpp | 28 | ||||
| -rw-r--r-- | engines/hdb/hdb.cpp | 12 | ||||
| -rw-r--r-- | engines/hdb/hdb.h | 2 | ||||
| -rw-r--r-- | engines/hdb/input.cpp | 26 | ||||
| -rw-r--r-- | engines/hdb/lua-script.cpp | 18 | ||||
| -rw-r--r-- | engines/hdb/map-loader.cpp | 42 | ||||
| -rw-r--r-- | engines/hdb/window.cpp | 206 | 
12 files changed, 294 insertions, 294 deletions
diff --git a/engines/hdb/ai-cinematic.cpp b/engines/hdb/ai-cinematic.cpp index 915605b0cb..bda993d0f1 100644 --- a/engines/hdb/ai-cinematic.cpp +++ b/engines/hdb/ai-cinematic.cpp @@ -299,7 +299,7 @@ void AI::processCines() {  			if (!_cine[i]->start) {  				Picture *pic = cineFindInBlitList(_cine[i]->id);  				if (!pic) { -					pic = g_hdb->_drawMan->loadPic(_cine[i]->string); +					pic = g_hdb->_gfx->loadPic(_cine[i]->string);  					cineAddToFreeList(pic);  				} else  					cineRemoveFromBlitList(_cine[i]->id); @@ -334,17 +334,17 @@ void AI::processCines() {  			break;  		case C_FADEIN:  			if (!_cine[i]->start) { -				g_hdb->_drawMan->setFade(true, (bool)_cine[i]->end, _cine[i]->speed); +				g_hdb->_gfx->setFade(true, (bool)_cine[i]->end, _cine[i]->speed);  				_cine[i]->start = 1; -			} else if (!g_hdb->_drawMan->isFadeActive()) { +			} else if (!g_hdb->_gfx->isFadeActive()) {  				complete = true;  			}  			break;  		case C_FADEOUT:  			if (!_cine[i]->start) { -				g_hdb->_drawMan->setFade(false, (bool)_cine[i]->end, _cine[i]->speed); +				g_hdb->_gfx->setFade(false, (bool)_cine[i]->end, _cine[i]->speed);  				_cine[i]->start = 1; -			} else if (!g_hdb->_drawMan->isFadeActive()) { +			} else if (!g_hdb->_gfx->isFadeActive()) {  				complete = true;  			}  			break; diff --git a/engines/hdb/ai-funcs.cpp b/engines/hdb/ai-funcs.cpp index 721fcbd227..c68410e103 100644 --- a/engines/hdb/ai-funcs.cpp +++ b/engines/hdb/ai-funcs.cpp @@ -101,8 +101,8 @@ bool AI::cacheEntGfx(AIEntity *e, bool init) {  				for (Common::Array<const char *>::iterator it = gfxFiles->begin(); it != gfxFiles->end(); it++) {  					size = g_hdb->_fileMan->getLength((*it), TYPE_TILE32); -					if (g_hdb->_drawMan->selectGfxType((*it))) { -						Tile *gfx = g_hdb->_drawMan->getTileGfx((*it), size); +					if (g_hdb->_gfx->selectGfxType((*it))) { +						Tile *gfx = g_hdb->_gfx->getTileGfx((*it), size);  						switch (list[j].state) {  						case STATE_STANDDOWN: @@ -381,7 +381,7 @@ bool AI::cacheEntGfx(AIEntity *e, bool init) {  							break;  						}  					} else { -						Picture *gfx = g_hdb->_drawMan->getPicGfx((*it), size); +						Picture *gfx = g_hdb->_gfx->getPicGfx((*it), size);  						switch (list[j].state) {  						case STATE_ATK_CLUB_UP: diff --git a/engines/hdb/ai-init.cpp b/engines/hdb/ai-init.cpp index feeac65ba6..f8fe0c2cbc 100644 --- a/engines/hdb/ai-init.cpp +++ b/engines/hdb/ai-init.cpp @@ -706,71 +706,71 @@ bool AI::init() {  	_waypointGfx[3]->load(g_hdb->_fileMan->findFirstData("icon_waypoint_select4", TYPE_ICON32));  	// Setup Vars to reference SPECIAL Map Tiles -	_useSwitchOff	= g_hdb->_drawMan->getTileIndex("anim_t32_switch_off01"); -	_useSwitchOn	= g_hdb->_drawMan->getTileIndex("t32_switch_on"); -	_useSwitch2Off	= g_hdb->_drawMan->getTileIndex("anim_t32_1switch_off01"); -	_useSwitch2On	= g_hdb->_drawMan->getTileIndex("t32_1switch_on"); -//	_useHandswitchOn	= g_hdb->_drawMan->getTileIndex("t32_ship_handswitch_on"); -//	_useHandswitchOff	= g_hdb->_drawMan->getTileIndex("anim_t32_ship_handswitch_off1"); -	_useHolderEmpty	= g_hdb->_drawMan->getTileIndex("anim_t32_holder_empty1"); -	_useHolderFull	= g_hdb->_drawMan->getTileIndex("t32_holder_full"); -	_useMailsorter	= g_hdb->_drawMan->getTileIndex("anim_t32_mailsort1"); -	_useAskcomp		= g_hdb->_drawMan->getTileIndex("anim_t32_askcomp1"); - -	_targetDoorN	= g_hdb->_drawMan->getTileIndex("t32_door_n_1"); -	_targetDoorP	= g_hdb->_drawMan->getTileIndex("t32_door_p_1"); -	_targetDoorS	= g_hdb->_drawMan->getTileIndex("t32_door_s_1"); -	_targetDoorNv	= g_hdb->_drawMan->getTileIndex("t32_door_nv_1"); -	_targetDoorPv	= g_hdb->_drawMan->getTileIndex("t32_door_pv_1"); -	_targetDoorSv	= g_hdb->_drawMan->getTileIndex("t32_door_sv_1"); - -	_targetDoor2N	= g_hdb->_drawMan->getTileIndex("t32_door2_n_1"); -	_targetDoor2P	= g_hdb->_drawMan->getTileIndex("t32_door2_p_1"); -	_targetDoor2S	= g_hdb->_drawMan->getTileIndex("t32_door2_s_1"); -	_targetDoor2Nv	= g_hdb->_drawMan->getTileIndex("t32_door2_nv_1"); -	_targetDoor2Pv	= g_hdb->_drawMan->getTileIndex("t32_door2_pv_1"); -	_targetDoor2Sv	= g_hdb->_drawMan->getTileIndex("t32_door2_sv_1"); - -	_target2DoorN	= g_hdb->_drawMan->getTileIndex("t32_e2_door_n_1"); -	_target2DoorP	= g_hdb->_drawMan->getTileIndex("t32_e2_door_p_1"); -	_target2DoorS	= g_hdb->_drawMan->getTileIndex("t32_e2_door_s_1"); -	_target2DoorNv	= g_hdb->_drawMan->getTileIndex("t32_e2_door_nv_1"); -	_target2DoorPv	= g_hdb->_drawMan->getTileIndex("t32_e2_door_pv_1"); -	_target2DoorSv	= g_hdb->_drawMan->getTileIndex("t32_e2_door_sv_1"); - -	_target3DoorN	= g_hdb->_drawMan->getTileIndex("t32_e3_door_n_1"); -	_target3DoorP	= g_hdb->_drawMan->getTileIndex("t32_e3_door_p_1"); -	_target3DoorS	= g_hdb->_drawMan->getTileIndex("t32_e3_door_s_1"); -	_target3DoorNv	= g_hdb->_drawMan->getTileIndex("t32_e3_door_nv_1"); -	_target3DoorPv	= g_hdb->_drawMan->getTileIndex("t32_e3_door_pv_1"); -	_target3DoorSv	= g_hdb->_drawMan->getTileIndex("t32_e3_door_sv_1"); - -	_targetBridgeU	= g_hdb->_drawMan->getTileIndex("t32_bridgeup1"); -	_targetBridgeD	= g_hdb->_drawMan->getTileIndex("t32_bridgedown1"); -	_targetBridgeL	= g_hdb->_drawMan->getTileIndex("t32_bridgeleft1"); -	_targetBridgeR	= g_hdb->_drawMan->getTileIndex("t32_bridgeright1"); -	_targetBridgeMidLR	= g_hdb->_drawMan->getTileIndex("t32_mgrate_mid"); -	_targetBridgeMidUD	= g_hdb->_drawMan->getTileIndex("t32_mgrate_tbmid"); -	_touchplateOn	= g_hdb->_drawMan->getTileIndex("t32_touchplateon"); -	_touchplateOff	= g_hdb->_drawMan->getTileIndex("t32_touchplateoff"); -	_blockpole		= g_hdb->_drawMan->getTileIndex("t32_blockpole_1"); -	_useTeleporter	= g_hdb->_drawMan->getTileIndex("anim_t32_teleporter1"); - -	_useSwitchOff	= g_hdb->_drawMan->getTileIndex("t32_temple_touchplate_on"); -	_useSwitchOff	= g_hdb->_drawMan->getTileIndex("t32_temple_touchplate_off"); - -	_kcHolderWhiteOff	= g_hdb->_drawMan->getTileIndex("anim_t32_kcholder_white_off1"); -	_kcHolderWhiteOn	= g_hdb->_drawMan->getTileIndex("t32_kcholder_white_on"); -	_kcHolderBlueOff	= g_hdb->_drawMan->getTileIndex("anim_t32_kcholder_blue_off1"); -	_kcHolderBlueOn		= g_hdb->_drawMan->getTileIndex("t32_kcholder_blue_on"); -	_kcHolderRedOff		= g_hdb->_drawMan->getTileIndex("anim_t32_kcholder_red_off1"); -	_kcHolderRedOn		= g_hdb->_drawMan->getTileIndex("t32_kcholder_red_on"); -	_kcHolderGreenOff	= g_hdb->_drawMan->getTileIndex("anim_t32_kcholder_green_off1"); -	_kcHolderGreenOn	= g_hdb->_drawMan->getTileIndex("t32_kcholder_green_on"); -	_kcHolderPurpleOff	= g_hdb->_drawMan->getTileIndex("anim_t32_kcholder_purple_off1"); -	_kcHolderPurpleOn	= g_hdb->_drawMan->getTileIndex("t32_kcholder_purple_on"); -	_kcHolderBlackOff	= g_hdb->_drawMan->getTileIndex("anim_t32_kcholder_black_off1"); -	_kcHolderBlackOn	= g_hdb->_drawMan->getTileIndex("t32_kcholder_black_on"); +	_useSwitchOff	= g_hdb->_gfx->getTileIndex("anim_t32_switch_off01"); +	_useSwitchOn	= g_hdb->_gfx->getTileIndex("t32_switch_on"); +	_useSwitch2Off	= g_hdb->_gfx->getTileIndex("anim_t32_1switch_off01"); +	_useSwitch2On	= g_hdb->_gfx->getTileIndex("t32_1switch_on"); +//	_useHandswitchOn	= g_hdb->_gfx->getTileIndex("t32_ship_handswitch_on"); +//	_useHandswitchOff	= g_hdb->_gfx->getTileIndex("anim_t32_ship_handswitch_off1"); +	_useHolderEmpty	= g_hdb->_gfx->getTileIndex("anim_t32_holder_empty1"); +	_useHolderFull	= g_hdb->_gfx->getTileIndex("t32_holder_full"); +	_useMailsorter	= g_hdb->_gfx->getTileIndex("anim_t32_mailsort1"); +	_useAskcomp		= g_hdb->_gfx->getTileIndex("anim_t32_askcomp1"); + +	_targetDoorN	= g_hdb->_gfx->getTileIndex("t32_door_n_1"); +	_targetDoorP	= g_hdb->_gfx->getTileIndex("t32_door_p_1"); +	_targetDoorS	= g_hdb->_gfx->getTileIndex("t32_door_s_1"); +	_targetDoorNv	= g_hdb->_gfx->getTileIndex("t32_door_nv_1"); +	_targetDoorPv	= g_hdb->_gfx->getTileIndex("t32_door_pv_1"); +	_targetDoorSv	= g_hdb->_gfx->getTileIndex("t32_door_sv_1"); + +	_targetDoor2N	= g_hdb->_gfx->getTileIndex("t32_door2_n_1"); +	_targetDoor2P	= g_hdb->_gfx->getTileIndex("t32_door2_p_1"); +	_targetDoor2S	= g_hdb->_gfx->getTileIndex("t32_door2_s_1"); +	_targetDoor2Nv	= g_hdb->_gfx->getTileIndex("t32_door2_nv_1"); +	_targetDoor2Pv	= g_hdb->_gfx->getTileIndex("t32_door2_pv_1"); +	_targetDoor2Sv	= g_hdb->_gfx->getTileIndex("t32_door2_sv_1"); + +	_target2DoorN	= g_hdb->_gfx->getTileIndex("t32_e2_door_n_1"); +	_target2DoorP	= g_hdb->_gfx->getTileIndex("t32_e2_door_p_1"); +	_target2DoorS	= g_hdb->_gfx->getTileIndex("t32_e2_door_s_1"); +	_target2DoorNv	= g_hdb->_gfx->getTileIndex("t32_e2_door_nv_1"); +	_target2DoorPv	= g_hdb->_gfx->getTileIndex("t32_e2_door_pv_1"); +	_target2DoorSv	= g_hdb->_gfx->getTileIndex("t32_e2_door_sv_1"); + +	_target3DoorN	= g_hdb->_gfx->getTileIndex("t32_e3_door_n_1"); +	_target3DoorP	= g_hdb->_gfx->getTileIndex("t32_e3_door_p_1"); +	_target3DoorS	= g_hdb->_gfx->getTileIndex("t32_e3_door_s_1"); +	_target3DoorNv	= g_hdb->_gfx->getTileIndex("t32_e3_door_nv_1"); +	_target3DoorPv	= g_hdb->_gfx->getTileIndex("t32_e3_door_pv_1"); +	_target3DoorSv	= g_hdb->_gfx->getTileIndex("t32_e3_door_sv_1"); + +	_targetBridgeU	= g_hdb->_gfx->getTileIndex("t32_bridgeup1"); +	_targetBridgeD	= g_hdb->_gfx->getTileIndex("t32_bridgedown1"); +	_targetBridgeL	= g_hdb->_gfx->getTileIndex("t32_bridgeleft1"); +	_targetBridgeR	= g_hdb->_gfx->getTileIndex("t32_bridgeright1"); +	_targetBridgeMidLR	= g_hdb->_gfx->getTileIndex("t32_mgrate_mid"); +	_targetBridgeMidUD	= g_hdb->_gfx->getTileIndex("t32_mgrate_tbmid"); +	_touchplateOn	= g_hdb->_gfx->getTileIndex("t32_touchplateon"); +	_touchplateOff	= g_hdb->_gfx->getTileIndex("t32_touchplateoff"); +	_blockpole		= g_hdb->_gfx->getTileIndex("t32_blockpole_1"); +	_useTeleporter	= g_hdb->_gfx->getTileIndex("anim_t32_teleporter1"); + +	_useSwitchOff	= g_hdb->_gfx->getTileIndex("t32_temple_touchplate_on"); +	_useSwitchOff	= g_hdb->_gfx->getTileIndex("t32_temple_touchplate_off"); + +	_kcHolderWhiteOff	= g_hdb->_gfx->getTileIndex("anim_t32_kcholder_white_off1"); +	_kcHolderWhiteOn	= g_hdb->_gfx->getTileIndex("t32_kcholder_white_on"); +	_kcHolderBlueOff	= g_hdb->_gfx->getTileIndex("anim_t32_kcholder_blue_off1"); +	_kcHolderBlueOn		= g_hdb->_gfx->getTileIndex("t32_kcholder_blue_on"); +	_kcHolderRedOff		= g_hdb->_gfx->getTileIndex("anim_t32_kcholder_red_off1"); +	_kcHolderRedOn		= g_hdb->_gfx->getTileIndex("t32_kcholder_red_on"); +	_kcHolderGreenOff	= g_hdb->_gfx->getTileIndex("anim_t32_kcholder_green_off1"); +	_kcHolderGreenOn	= g_hdb->_gfx->getTileIndex("t32_kcholder_green_on"); +	_kcHolderPurpleOff	= g_hdb->_gfx->getTileIndex("anim_t32_kcholder_purple_off1"); +	_kcHolderPurpleOn	= g_hdb->_gfx->getTileIndex("t32_kcholder_purple_on"); +	_kcHolderBlackOff	= g_hdb->_gfx->getTileIndex("anim_t32_kcholder_black_off1"); +	_kcHolderBlackOn	= g_hdb->_gfx->getTileIndex("t32_kcholder_black_on");  	_dummyPlayer.type = AI_GUY;  	_dummyLaser.type = AI_LASERBEAM; @@ -873,97 +873,97 @@ void AI::restartSystem() {  void AI::initAnimInfo() {  	if (g_hdb->_map->checkOneTileExistInRange(_useSwitchOff, 2)) -		g_hdb->_drawMan->getTile(_useSwitchOn); +		g_hdb->_gfx->getTile(_useSwitchOn);  	if (g_hdb->_map->checkOneTileExistInRange(_useSwitch2Off, 2)) -		g_hdb->_drawMan->getTile(_useSwitch2On); +		g_hdb->_gfx->getTile(_useSwitch2On);  	if (g_hdb->_map->checkOneTileExistInRange(_useHolderEmpty, 2)) -		g_hdb->_drawMan->getTile(_useHolderFull); +		g_hdb->_gfx->getTile(_useHolderFull);  	if (g_hdb->_map->checkOneTileExistInRange(_useHandswitchOff, 2)) -		g_hdb->_drawMan->getTile(_useHandswitchOn); +		g_hdb->_gfx->getTile(_useHandswitchOn);  	if (g_hdb->_map->checkOneTileExistInRange(_targetDoorN, 4)) -		g_hdb->_drawMan->cacheTileSequence(_targetDoorN, 4); +		g_hdb->_gfx->cacheTileSequence(_targetDoorN, 4);  	if (g_hdb->_map->checkOneTileExistInRange(_targetDoorP, 4)) -		g_hdb->_drawMan->cacheTileSequence(_targetDoorP, 4); +		g_hdb->_gfx->cacheTileSequence(_targetDoorP, 4);  	if (g_hdb->_map->checkOneTileExistInRange(_targetDoorS, 4)) -		g_hdb->_drawMan->cacheTileSequence(_targetDoorS, 4); +		g_hdb->_gfx->cacheTileSequence(_targetDoorS, 4);  	if (g_hdb->_map->checkOneTileExistInRange(_targetDoorNv, 4)) -		g_hdb->_drawMan->cacheTileSequence(_targetDoorNv, 4); +		g_hdb->_gfx->cacheTileSequence(_targetDoorNv, 4);  	if (g_hdb->_map->checkOneTileExistInRange(_targetDoorPv, 4)) -		g_hdb->_drawMan->cacheTileSequence(_targetDoorPv, 4); +		g_hdb->_gfx->cacheTileSequence(_targetDoorPv, 4);  	if (g_hdb->_map->checkOneTileExistInRange(_targetDoorSv, 4)) -		g_hdb->_drawMan->cacheTileSequence(_targetDoorSv, 4); +		g_hdb->_gfx->cacheTileSequence(_targetDoorSv, 4);  	if (g_hdb->_map->checkOneTileExistInRange(_targetDoor2N, 4)) -		g_hdb->_drawMan->cacheTileSequence(_targetDoor2N, 4); +		g_hdb->_gfx->cacheTileSequence(_targetDoor2N, 4);  	if (g_hdb->_map->checkOneTileExistInRange(_targetDoor2P, 4)) -		g_hdb->_drawMan->cacheTileSequence(_targetDoor2P, 4); +		g_hdb->_gfx->cacheTileSequence(_targetDoor2P, 4);  	if (g_hdb->_map->checkOneTileExistInRange(_targetDoor2S, 4)) -		g_hdb->_drawMan->cacheTileSequence(_targetDoor2S, 4); +		g_hdb->_gfx->cacheTileSequence(_targetDoor2S, 4);  	if (g_hdb->_map->checkOneTileExistInRange(_targetDoor2Nv, 4)) -		g_hdb->_drawMan->cacheTileSequence(_targetDoor2Nv, 4); +		g_hdb->_gfx->cacheTileSequence(_targetDoor2Nv, 4);  	if (g_hdb->_map->checkOneTileExistInRange(_targetDoor2Pv, 4)) -		g_hdb->_drawMan->cacheTileSequence(_targetDoor2Pv, 4); +		g_hdb->_gfx->cacheTileSequence(_targetDoor2Pv, 4);  	if (g_hdb->_map->checkOneTileExistInRange(_targetDoor2Sv, 4)) -		g_hdb->_drawMan->cacheTileSequence(_targetDoor2Sv, 4); +		g_hdb->_gfx->cacheTileSequence(_targetDoor2Sv, 4);  	if (g_hdb->_map->checkOneTileExistInRange(_target2DoorN, 4)) -		g_hdb->_drawMan->cacheTileSequence(_target2DoorN, 4); +		g_hdb->_gfx->cacheTileSequence(_target2DoorN, 4);  	if (g_hdb->_map->checkOneTileExistInRange(_target2DoorP, 4)) -		g_hdb->_drawMan->cacheTileSequence(_target2DoorP, 4); +		g_hdb->_gfx->cacheTileSequence(_target2DoorP, 4);  	if (g_hdb->_map->checkOneTileExistInRange(_target2DoorS, 4)) -		g_hdb->_drawMan->cacheTileSequence(_target2DoorS, 4); +		g_hdb->_gfx->cacheTileSequence(_target2DoorS, 4);  	if (g_hdb->_map->checkOneTileExistInRange(_target2DoorNv, 4)) -		g_hdb->_drawMan->cacheTileSequence(_target2DoorNv, 4); +		g_hdb->_gfx->cacheTileSequence(_target2DoorNv, 4);  	if (g_hdb->_map->checkOneTileExistInRange(_target2DoorPv, 4)) -		g_hdb->_drawMan->cacheTileSequence(_target2DoorPv, 4); +		g_hdb->_gfx->cacheTileSequence(_target2DoorPv, 4);  	if (g_hdb->_map->checkOneTileExistInRange(_target2DoorSv, 4)) -		g_hdb->_drawMan->cacheTileSequence(_target2DoorSv, 4); +		g_hdb->_gfx->cacheTileSequence(_target2DoorSv, 4);  	if (g_hdb->_map->checkOneTileExistInRange(_target3DoorN, 4)) -		g_hdb->_drawMan->cacheTileSequence(_target3DoorN, 4); +		g_hdb->_gfx->cacheTileSequence(_target3DoorN, 4);  	if (g_hdb->_map->checkOneTileExistInRange(_target3DoorP, 4)) -		g_hdb->_drawMan->cacheTileSequence(_target3DoorP, 4); +		g_hdb->_gfx->cacheTileSequence(_target3DoorP, 4);  	if (g_hdb->_map->checkOneTileExistInRange(_target3DoorS, 4)) -		g_hdb->_drawMan->cacheTileSequence(_target3DoorS, 4); +		g_hdb->_gfx->cacheTileSequence(_target3DoorS, 4);  	if (g_hdb->_map->checkOneTileExistInRange(_target3DoorNv, 4)) -		g_hdb->_drawMan->cacheTileSequence(_target3DoorNv, 4); +		g_hdb->_gfx->cacheTileSequence(_target3DoorNv, 4);  	if (g_hdb->_map->checkOneTileExistInRange(_target3DoorPv, 4)) -		g_hdb->_drawMan->cacheTileSequence(_target3DoorPv, 4); +		g_hdb->_gfx->cacheTileSequence(_target3DoorPv, 4);  	if (g_hdb->_map->checkOneTileExistInRange(_target3DoorSv, 4)) -		g_hdb->_drawMan->cacheTileSequence(_target3DoorSv, 4); +		g_hdb->_gfx->cacheTileSequence(_target3DoorSv, 4);  	if (g_hdb->_map->checkOneTileExistInRange(_targetBridgeU, 3)) -		g_hdb->_drawMan->cacheTileSequence(_targetBridgeU, 3); +		g_hdb->_gfx->cacheTileSequence(_targetBridgeU, 3);  	if (g_hdb->_map->checkOneTileExistInRange(_targetBridgeD, 3)) -		g_hdb->_drawMan->cacheTileSequence(_targetBridgeD, 3); +		g_hdb->_gfx->cacheTileSequence(_targetBridgeD, 3);  	if (g_hdb->_map->checkOneTileExistInRange(_targetBridgeL, 3)) -		g_hdb->_drawMan->cacheTileSequence(_targetBridgeL, 3); +		g_hdb->_gfx->cacheTileSequence(_targetBridgeL, 3);  	if (g_hdb->_map->checkOneTileExistInRange(_targetBridgeR, 3)) -		g_hdb->_drawMan->cacheTileSequence(_targetBridgeR, 3); +		g_hdb->_gfx->cacheTileSequence(_targetBridgeR, 3); -	g_hdb->_drawMan->cacheTileSequence(_targetBridgeMidLR, 1); -	g_hdb->_drawMan->cacheTileSequence(_targetBridgeMidUD, 1); +	g_hdb->_gfx->cacheTileSequence(_targetBridgeMidLR, 1); +	g_hdb->_gfx->cacheTileSequence(_targetBridgeMidUD, 1);  	if (g_hdb->_map->checkOneTileExistInRange(_touchplateOff, 2)) -		g_hdb->_drawMan->cacheTileSequence(_touchplateOff, 2); +		g_hdb->_gfx->cacheTileSequence(_touchplateOff, 2);  	if (g_hdb->_map->checkOneTileExistInRange(_templeTouchpOff, 2)) -		g_hdb->_drawMan->cacheTileSequence(_templeTouchpOff, 2); +		g_hdb->_gfx->cacheTileSequence(_templeTouchpOff, 2);  	if (g_hdb->_map->checkOneTileExistInRange(_blockpole, 4)) -		g_hdb->_drawMan->cacheTileSequence(_blockpole, 4); +		g_hdb->_gfx->cacheTileSequence(_blockpole, 4);  	if (g_hdb->_map->checkOneTileExistInRange(_kcHolderWhiteOff, 2)) -		g_hdb->_drawMan->getTile(_kcHolderWhiteOn); +		g_hdb->_gfx->getTile(_kcHolderWhiteOn);  	if (g_hdb->_map->checkOneTileExistInRange(_kcHolderBlueOff, 2)) -		g_hdb->_drawMan->getTile(_kcHolderBlueOn); +		g_hdb->_gfx->getTile(_kcHolderBlueOn);  	if (g_hdb->_map->checkOneTileExistInRange(_kcHolderRedOff, 2)) -		g_hdb->_drawMan->getTile(_kcHolderRedOn); +		g_hdb->_gfx->getTile(_kcHolderRedOn);  	if (g_hdb->_map->checkOneTileExistInRange(_kcHolderGreenOff, 2)) -		g_hdb->_drawMan->getTile(_kcHolderGreenOn); +		g_hdb->_gfx->getTile(_kcHolderGreenOn);  	if (g_hdb->_map->checkOneTileExistInRange(_kcHolderPurpleOff, 2)) -		g_hdb->_drawMan->getTile(_kcHolderPurpleOn); +		g_hdb->_gfx->getTile(_kcHolderPurpleOn);  	if (g_hdb->_map->checkOneTileExistInRange(_kcHolderBlackOff, 2)) -		g_hdb->_drawMan->getTile(_kcHolderBlackOn); +		g_hdb->_gfx->getTile(_kcHolderBlackOn);  }  const char *AITypeStr[] = { diff --git a/engines/hdb/ai-lists.cpp b/engines/hdb/ai-lists.cpp index b60013a38b..1e6dee74ed 100644 --- a/engines/hdb/ai-lists.cpp +++ b/engines/hdb/ai-lists.cpp @@ -71,7 +71,7 @@ void AI::addAnimateTarget(int x, int y, int start, int end, AnimSpeed speed, boo  			else  				snprintf(name, 32, "%s%d", tileName, i + 1);  			size = g_hdb->_fileMan->getLength(name, TYPE_TILE32); -			at->gfxList[i] = g_hdb->_drawMan->getTileGfx(name, size); +			at->gfxList[i] = g_hdb->_gfx->getTileGfx(name, size);  		}  	} diff --git a/engines/hdb/ai-player.cpp b/engines/hdb/ai-player.cpp index 100f186fef..6c8ff006b7 100644 --- a/engines/hdb/ai-player.cpp +++ b/engines/hdb/ai-player.cpp @@ -106,22 +106,22 @@ void aiPlayerInit2(AIEntity *e) {  		g_hdb->_ai->_slugAttackGfx[3]->load(g_hdb->_fileMan->findFirstData("slug_shot4", TYPE_PIC));  		int32 size = g_hdb->_fileMan->getLength("shock_spark_sit01", TYPE_TILE32); -		g_hdb->_ai->_stunLightningGfx[0] = g_hdb->_drawMan->getTileGfx("shock_spark_sit01", size); +		g_hdb->_ai->_stunLightningGfx[0] = g_hdb->_gfx->getTileGfx("shock_spark_sit01", size);  		size = g_hdb->_fileMan->getLength("shock_spark_sit02", TYPE_TILE32); -		g_hdb->_ai->_stunLightningGfx[1] = g_hdb->_drawMan->getTileGfx("shock_spark_sit02", size); +		g_hdb->_ai->_stunLightningGfx[1] = g_hdb->_gfx->getTileGfx("shock_spark_sit02", size);  		size = g_hdb->_fileMan->getLength("shock_spark_sit03", TYPE_TILE32); -		g_hdb->_ai->_stunLightningGfx[2] = g_hdb->_drawMan->getTileGfx("shock_spark_sit03", size); +		g_hdb->_ai->_stunLightningGfx[2] = g_hdb->_gfx->getTileGfx("shock_spark_sit03", size);  		size = g_hdb->_fileMan->getLength("shock_spark_sit04", TYPE_TILE32); -		g_hdb->_ai->_stunLightningGfx[3] = g_hdb->_drawMan->getTileGfx("shock_spark_sit04", size); +		g_hdb->_ai->_stunLightningGfx[3] = g_hdb->_gfx->getTileGfx("shock_spark_sit04", size);  		size = g_hdb->_fileMan->getLength("starstun_sit01", TYPE_TILE32); -		g_hdb->_ai->_stunnedGfx[0] = g_hdb->_drawMan->getTileGfx("starstun_sit01", size); +		g_hdb->_ai->_stunnedGfx[0] = g_hdb->_gfx->getTileGfx("starstun_sit01", size);  		size = g_hdb->_fileMan->getLength("starstun_sit02", TYPE_TILE32); -		g_hdb->_ai->_stunnedGfx[1] = g_hdb->_drawMan->getTileGfx("starstun_sit02", size); +		g_hdb->_ai->_stunnedGfx[1] = g_hdb->_gfx->getTileGfx("starstun_sit02", size);  		size = g_hdb->_fileMan->getLength("starstun_sit03", TYPE_TILE32); -		g_hdb->_ai->_stunnedGfx[2] = g_hdb->_drawMan->getTileGfx("starstun_sit03", size); +		g_hdb->_ai->_stunnedGfx[2] = g_hdb->_gfx->getTileGfx("starstun_sit03", size);  		size = g_hdb->_fileMan->getLength("starstun_sit04", TYPE_TILE32); -		g_hdb->_ai->_stunnedGfx[3] = g_hdb->_drawMan->getTileGfx("starstun_sit04", size); +		g_hdb->_ai->_stunnedGfx[3] = g_hdb->_gfx->getTileGfx("starstun_sit04", size);  	}  	e->draw = g_hdb->_ai->getStandFrameDir(e); @@ -409,8 +409,8 @@ void aiPlayerAction(AIEntity *e) {  		g_hdb->_ai->animateEntity(e);  	} else {  		// Sometimes the fading stays black -		if (!g_hdb->_ai->cinematicsActive() && g_hdb->_drawMan->isFadeStaying()) -			g_hdb->_drawMan->turnOffFade(); +		if (!g_hdb->_ai->cinematicsActive() && g_hdb->_gfx->isFadeStaying()) +			g_hdb->_gfx->turnOffFade();  		// Did we just fall down a PLUMMET?  		bgFlags = g_hdb->_map->getMapBGTileFlags(e->tileX, e->tileY); diff --git a/engines/hdb/gfx.cpp b/engines/hdb/gfx.cpp index 852718f101..0f6de884be 100644 --- a/engines/hdb/gfx.cpp +++ b/engines/hdb/gfx.cpp @@ -571,13 +571,13 @@ void DrawMan::drawText(const char *string) {  			width = kFontSpace;  		// Blit the character -		g_hdb->_drawMan->_globalSurface.transBlitFrom(_fontSurfaces[c], Common::Point(_cursorX, _cursorY), 0xf81f); +		g_hdb->_gfx->_globalSurface.transBlitFrom(_fontSurfaces[c], Common::Point(_cursorX, _cursorY), 0xf81f);  		Common::Rect clip(0, 0, width, _fontHeader.height);  		clip.moveTo(_cursorX, _cursorY);  		clip.clip(_globalSurface.getBounds());  		if (!clip.isEmpty()) { -			g_system->copyRectToScreen(g_hdb->_drawMan->_globalSurface.getBasePtr(clip.left, clip.top), g_hdb->_drawMan->_globalSurface.pitch, clip.left, clip.top, clip.width(), clip.height()); +			g_system->copyRectToScreen(g_hdb->_gfx->_globalSurface.getBasePtr(clip.left, clip.top), g_hdb->_gfx->_globalSurface.pitch, clip.left, clip.top, clip.width(), clip.height());  		}  		// Advance the cursor @@ -719,24 +719,24 @@ Graphics::Surface Picture::load(Common::SeekableReadStream *stream) {  }  void Picture::draw(int x, int y) { -	g_hdb->_drawMan->_globalSurface.blitFrom(_surface, Common::Point(x, y)); +	g_hdb->_gfx->_globalSurface.blitFrom(_surface, Common::Point(x, y));  	Common::Rect clip(_surface.getBounds());  	clip.moveTo(x, y); -	clip.clip(g_hdb->_drawMan->_globalSurface.getBounds()); +	clip.clip(g_hdb->_gfx->_globalSurface.getBounds());  	if (!clip.isEmpty()) { -		g_system->copyRectToScreen(g_hdb->_drawMan->_globalSurface.getBasePtr(clip.left, clip.top), g_hdb->_drawMan->_globalSurface.pitch, clip.left, clip.top, clip.width(), clip.height()); +		g_system->copyRectToScreen(g_hdb->_gfx->_globalSurface.getBasePtr(clip.left, clip.top), g_hdb->_gfx->_globalSurface.pitch, clip.left, clip.top, clip.width(), clip.height());  	}  }  void Picture::drawMasked(int x, int y) { -	g_hdb->_drawMan->_globalSurface.transBlitFrom(_surface, Common::Point(x, y), 0xf81f); +	g_hdb->_gfx->_globalSurface.transBlitFrom(_surface, Common::Point(x, y), 0xf81f);  	Common::Rect clip(_surface.getBounds());  	clip.moveTo(x, y); -	clip.clip(g_hdb->_drawMan->_globalSurface.getBounds()); +	clip.clip(g_hdb->_gfx->_globalSurface.getBounds());  	if (!clip.isEmpty()) { -		g_system->copyRectToScreen(g_hdb->_drawMan->_globalSurface.getBasePtr(clip.left, clip.top), g_hdb->_drawMan->_globalSurface.pitch, clip.left, clip.top, clip.width(), clip.height()); +		g_system->copyRectToScreen(g_hdb->_gfx->_globalSurface.getBasePtr(clip.left, clip.top), g_hdb->_gfx->_globalSurface.pitch, clip.left, clip.top, clip.width(), clip.height());  	}  } @@ -769,24 +769,24 @@ Graphics::Surface Tile::load(Common::SeekableReadStream *stream) {  }  void Tile::draw(int x, int y) { -	g_hdb->_drawMan->_globalSurface.blitFrom(_surface, Common::Point(x, y)); +	g_hdb->_gfx->_globalSurface.blitFrom(_surface, Common::Point(x, y));  	Common::Rect clip(_surface.getBounds());  	clip.moveTo(x, y); -	clip.clip(g_hdb->_drawMan->_globalSurface.getBounds()); +	clip.clip(g_hdb->_gfx->_globalSurface.getBounds());  	if (!clip.isEmpty()) { -		g_system->copyRectToScreen(g_hdb->_drawMan->_globalSurface.getBasePtr(clip.left, clip.top), g_hdb->_drawMan->_globalSurface.pitch, clip.left, clip.top, clip.width(), clip.height()); +		g_system->copyRectToScreen(g_hdb->_gfx->_globalSurface.getBasePtr(clip.left, clip.top), g_hdb->_gfx->_globalSurface.pitch, clip.left, clip.top, clip.width(), clip.height());  	}  }  void Tile::drawMasked(int x, int y) { -	g_hdb->_drawMan->_globalSurface.transBlitFrom(_surface, Common::Point(x, y), 0xf81f); +	g_hdb->_gfx->_globalSurface.transBlitFrom(_surface, Common::Point(x, y), 0xf81f);  	Common::Rect clip(_surface.getBounds());  	clip.moveTo(x, y); -	clip.clip(g_hdb->_drawMan->_globalSurface.getBounds()); +	clip.clip(g_hdb->_gfx->_globalSurface.getBounds());  	if (!clip.isEmpty()) { -		g_system->copyRectToScreen(g_hdb->_drawMan->_globalSurface.getBasePtr(clip.left, clip.top), g_hdb->_drawMan->_globalSurface.pitch, clip.left, clip.top, clip.width(), clip.height()); +		g_system->copyRectToScreen(g_hdb->_gfx->_globalSurface.getBasePtr(clip.left, clip.top), g_hdb->_gfx->_globalSurface.pitch, clip.left, clip.top, clip.width(), clip.height());  	}  } diff --git a/engines/hdb/hdb.cpp b/engines/hdb/hdb.cpp index 3da71974a4..0eb1da5c2d 100644 --- a/engines/hdb/hdb.cpp +++ b/engines/hdb/hdb.cpp @@ -43,7 +43,7 @@ HDBGame::HDBGame(OSystem *syst, const ADGameDescription *gameDesc) : Engine(syst  	_systemInit = false;  	g_hdb = this;  	_fileMan = new FileMan; -	_drawMan = new DrawMan; +	_gfx = new DrawMan;  	_lua = new LuaScript;  	_map = new Map;  	_ai = new AI; @@ -58,7 +58,7 @@ HDBGame::HDBGame(OSystem *syst, const ADGameDescription *gameDesc) : Engine(syst  HDBGame::~HDBGame() {  	delete _console;  	delete _fileMan; -	delete _drawMan; +	delete _gfx;  	delete _lua;  	delete _map;  	delete _ai; @@ -79,7 +79,7 @@ bool HDBGame::init() {  	if (!_fileMan->openMPC(getGameFile())) {  		error("FileMan::openMPC: Cannot find the hyperspace.mpc data file.");  	} -	if (!_drawMan->init()) { +	if (!_gfx->init()) {  		error("DrawMan::init: Couldn't initialize DrawMan");  	}  	if (!_input->init()) { @@ -147,14 +147,14 @@ void HDBGame::paint() {  		warning("STUB: MENU::DrawMenu required");  		break;  	case GAME_PLAY: -		_drawMan->drawPointer(); +		_gfx->drawPointer();  		break;  	case GAME_LOADING:  		warning("STUB: DrawMan::DrawLoadingScreen required");  		break;  	} -	_drawMan->updateVideo(); +	_gfx->updateVideo();  }  // builds a waypoint list if an entity is not next to player, @@ -485,7 +485,7 @@ Common::Error HDBGame::run() {  		}  		if (_gameState == GAME_PLAY) { -			_drawMan->drawSky(); +			_gfx->drawSky();  			if (!_pauseFlag) {  				_ai->moveEnts(); diff --git a/engines/hdb/hdb.h b/engines/hdb/hdb.h index 3c90cdfbdb..09ddedee73 100644 --- a/engines/hdb/hdb.h +++ b/engines/hdb/hdb.h @@ -130,7 +130,7 @@ public:  	*/  	FileMan *_fileMan; -	DrawMan *_drawMan; +	DrawMan *_gfx;  	LuaScript *_lua;  	Map *_map;  	AI *_ai; diff --git a/engines/hdb/input.cpp b/engines/hdb/input.cpp index 2dd8e2c33e..c9dbd2c744 100644 --- a/engines/hdb/input.cpp +++ b/engines/hdb/input.cpp @@ -229,8 +229,8 @@ void Input::updateMouse(int newX, int newY) {  		_mouseY = kScreenHeight - 1;  	// Turn Cursor back on? -	if (!g_hdb->_drawMan->getPointer()) { -		g_hdb->_drawMan->showPointer(true); +	if (!g_hdb->_gfx->getPointer()) { +		g_hdb->_gfx->showPointer(true);  	}  	// Check if LButton is being dragged @@ -292,40 +292,40 @@ void Input::updateKeys(Common::Event event, bool keyDown) {  		if (event.kbd.keycode == _keyUp) {  			if (keyDown) {  				buttons |= kButtonUp; -				if (g_hdb->_drawMan->getPointer()) -					g_hdb->_drawMan->showPointer(false); +				if (g_hdb->_gfx->getPointer()) +					g_hdb->_gfx->showPointer(false);  			} else {  				buttons &= ~kButtonUp;  			}  		} else if (event.kbd.keycode == _keyDown) {  			if (keyDown) {  				buttons |= kButtonDown; -				if (g_hdb->_drawMan->getPointer()) -					g_hdb->_drawMan->showPointer(false); +				if (g_hdb->_gfx->getPointer()) +					g_hdb->_gfx->showPointer(false);  			} else {  				buttons &= ~kButtonDown;  			}  		} else if (event.kbd.keycode == _keyLeft) {  			if (keyDown) {  				buttons |= kButtonLeft; -				if (g_hdb->_drawMan->getPointer()) -					g_hdb->_drawMan->showPointer(false); +				if (g_hdb->_gfx->getPointer()) +					g_hdb->_gfx->showPointer(false);  			} else {  				buttons &= ~kButtonLeft;  			}  		} else if (event.kbd.keycode == _keyRight) {  			if (keyDown) {  				buttons |= kButtonRight; -				if (g_hdb->_drawMan->getPointer()) -					g_hdb->_drawMan->showPointer(false); +				if (g_hdb->_gfx->getPointer()) +					g_hdb->_gfx->showPointer(false);  			} else {  				buttons &= ~kButtonRight;  			}  		} else if (event.kbd.keycode == _keyUse) {  			if (keyDown) {  				buttons |= kButtonB; -				if (g_hdb->_drawMan->getPointer()) -					g_hdb->_drawMan->showPointer(false); +				if (g_hdb->_gfx->getPointer()) +					g_hdb->_gfx->showPointer(false);  			} else {  				buttons &= ~kButtonB;  			} @@ -335,7 +335,7 @@ void Input::updateKeys(Common::Event event, bool keyDown) {  	if (event.kbd.keycode == _keyMenu) {  		if (keyDown) {  			buttons |= kButtonA; -			g_hdb->_drawMan->showPointer(true); +			g_hdb->_gfx->showPointer(true);  		} else {  			buttons &= ~kButtonA;  		} diff --git a/engines/hdb/lua-script.cpp b/engines/hdb/lua-script.cpp index 94fcf9e1ba..4b1086805a 100644 --- a/engines/hdb/lua-script.cpp +++ b/engines/hdb/lua-script.cpp @@ -361,8 +361,8 @@ static int cineSetForeground(lua_State *L) {  	g_hdb->_lua->checkParameters("cineSetForeground", 3);  	lua_pop(L, 3); -	int index = g_hdb->_drawMan->getTileIndex(tileName); -	g_hdb->_drawMan->getTile(index); +	int index = g_hdb->_gfx->getTileIndex(tileName); +	g_hdb->_gfx->getTile(index);  	g_hdb->_ai->cineSetForeground((int)x, (int)y, index);  	return 0;  } @@ -375,8 +375,8 @@ static int cineSetBackground(lua_State *L) {  	g_hdb->_lua->checkParameters("cineSetBackground", 3);  	lua_pop(L, 3); -	int index = g_hdb->_drawMan->getTileIndex(tileName); -	g_hdb->_drawMan->getTile(index); +	int index = g_hdb->_gfx->getTileIndex(tileName); +	g_hdb->_gfx->getTile(index);  	g_hdb->_ai->cineSetBackground((int)x, (int)y, index);  	return 0;  } @@ -613,8 +613,8 @@ static int setForeground(lua_State *L) {  	g_hdb->_lua->checkParameters("setForeground", 3);  	lua_pop(L, 3); -	int index = g_hdb->_drawMan->getTileIndex(tileName); -	g_hdb->_drawMan->getTile(index); +	int index = g_hdb->_gfx->getTileIndex(tileName); +	g_hdb->_gfx->getTile(index);  	g_hdb->_map->setMapFGTileIndex((int)x, (int)y, index);  	g_hdb->_map->addFGTileAnimation((int)x, (int)y);  	return 0; @@ -628,8 +628,8 @@ static int setBackground(lua_State *L) {  	g_hdb->_lua->checkParameters("setBackground", 3);  	lua_pop(L, 3); -	int index = g_hdb->_drawMan->getTileIndex(tileName); -	g_hdb->_drawMan->getTile(index); +	int index = g_hdb->_gfx->getTileIndex(tileName); +	g_hdb->_gfx->getTile(index);  	g_hdb->_map->setMapBGTileIndex((int)x, (int)y, index);  	g_hdb->_map->addBGTileAnimation((int)x, (int)y);  	return 0; @@ -986,7 +986,7 @@ static int setPointerState(lua_State *L) {  	lua_pop(L, 1); -	g_hdb->_drawMan->setPointerState((int)value); +	g_hdb->_gfx->setPointerState((int)value);  	return 0;  } diff --git a/engines/hdb/map-loader.cpp b/engines/hdb/map-loader.cpp index c45102d929..e829b3de73 100644 --- a/engines/hdb/map-loader.cpp +++ b/engines/hdb/map-loader.cpp @@ -55,11 +55,11 @@ int Map::loadTiles() {  	for (uint j = 0; j < _height; j++) {  		for (uint i = 0; i < _width; i++) {  			tile = _background[j * _width + i]; -			if ((temp = g_hdb->_drawMan->isSky(tile)) && !skyIndex) { +			if ((temp = g_hdb->_gfx->isSky(tile)) && !skyIndex) {  				skyIndex = temp;  			} -			g_hdb->_drawMan->getTile(tile); -			g_hdb->_drawMan->getTile(_foreground[j * _width + i]); +			g_hdb->_gfx->getTile(tile); +			g_hdb->_gfx->getTile(_foreground[j * _width + i]);  		}  	} @@ -141,7 +141,7 @@ bool Map::load(Common::SeekableReadStream *stream) {  	_mapLaserBeams = new byte[_width * _height];  	int sky = loadTiles(); -	g_hdb->_drawMan->setSky(sky); +	g_hdb->_gfx->setSky(sky);  	_mapX = _mapY = 0;  	// Setup animating Tile lists @@ -646,14 +646,14 @@ void Map::draw() {  			}  			// Draw if not a sky tile -			if (!g_hdb->_drawMan->isSky(tileIndex)) { -				g_hdb->_drawMan->getTile(tileIndex)->draw(screenX, screenY); +			if (!g_hdb->_gfx->isSky(tileIndex)) { +				g_hdb->_gfx->getTile(tileIndex)->draw(screenX, screenY);  			}  			// Draw Foreground Tile  			tileIndex = _foreground[matrixY + _mapTileX + i];  			if (tileIndex >= 0) { -				Tile *fTile = g_hdb->_drawMan->getTile(tileIndex); +				Tile *fTile = g_hdb->_gfx->getTile(tileIndex);  				if (fTile && !(fTile->_flags & kFlagInvisible)) {  					if ((fTile->_flags & kFlagGrating) && (_numGratings < kMaxGratings)) { @@ -689,33 +689,33 @@ void Map::draw() {  	// Animate FAST Map Tiles  	if (!(_animCycle % kAnimFastFrames)) {  		for (Common::Array<uint32>::iterator it = _listBGAnimFast.begin(); it != _listBGAnimFast.end(); it++) { -			_background[(*it)] = g_hdb->_drawMan->animateTile(_background[(*it)]); +			_background[(*it)] = g_hdb->_gfx->animateTile(_background[(*it)]);  		}  		for (Common::Array<uint32>::iterator it = _listFGAnimFast.begin(); it != _listFGAnimFast.end(); it++) { -			_foreground[(*it)] = g_hdb->_drawMan->animateTile(_foreground[(*it)]); +			_foreground[(*it)] = g_hdb->_gfx->animateTile(_foreground[(*it)]);  		}  	}  	// Animate MEDIUM Map Tiles  	if (!(_animCycle % kAnimFastFrames)) {  		for (Common::Array<uint32>::iterator it = _listBGAnimMedium.begin(); it != _listBGAnimMedium.end(); it++) { -			_background[(*it)] = g_hdb->_drawMan->animateTile(_background[(*it)]); +			_background[(*it)] = g_hdb->_gfx->animateTile(_background[(*it)]);  		}  		for (Common::Array<uint32>::iterator it = _listFGAnimMedium.begin(); it != _listFGAnimMedium.end(); it++) { -			_foreground[(*it)] = g_hdb->_drawMan->animateTile(_foreground[(*it)]); +			_foreground[(*it)] = g_hdb->_gfx->animateTile(_foreground[(*it)]);  		}  	}  	// Animate SLOW Map Tiles  	if (!(_animCycle % kAnimFastFrames)) {  		for (Common::Array<uint32>::iterator it = _listBGAnimSlow.begin(); it != _listBGAnimSlow.end(); it++) { -			_background[(*it)] = g_hdb->_drawMan->animateTile(_background[(*it)]); +			_background[(*it)] = g_hdb->_gfx->animateTile(_background[(*it)]);  		}  		for (Common::Array<uint32>::iterator it = _listFGAnimSlow.begin(); it != _listFGAnimSlow.end(); it++) { -			_foreground[(*it)] = g_hdb->_drawMan->animateTile(_foreground[(*it)]); +			_foreground[(*it)] = g_hdb->_gfx->animateTile(_foreground[(*it)]);  		}  	} @@ -728,7 +728,7 @@ void Map::drawEnts() {  void Map::drawGratings() {  	for (int i = 0; i < _numGratings; i++) { -		g_hdb->_drawMan->getTile(_gratings[i]->tile)->drawMasked(_gratings[i]->x, _gratings[i]->y); +		g_hdb->_gfx->getTile(_gratings[i]->tile)->drawMasked(_gratings[i]->x, _gratings[i]->y);  	}  	debug(8, "Gratings Count: %d", _numGratings); @@ -736,7 +736,7 @@ void Map::drawGratings() {  void Map::drawForegrounds() {  	for (int i = 0; i < _numForegrounds; i++) { -		g_hdb->_drawMan->getTile(_foregrounds[i]->tile)->drawMasked(_foregrounds[i]->x, _foregrounds[i]->y); +		g_hdb->_gfx->getTile(_foregrounds[i]->tile)->drawMasked(_foregrounds[i]->x, _foregrounds[i]->y);  	}  	debug(8, "Foregrounds Count: %d", _numForegrounds); @@ -746,7 +746,7 @@ uint32 Map::getMapBGTileFlags(int x, int y) {  	if (x < 0 || x >= _width || y < 0 || y >= _height) {  		return 0;  	} -	Tile *tile = g_hdb->_drawMan->getTile(_background[y * _width + x]); +	Tile *tile = g_hdb->_gfx->getTile(_background[y * _width + x]);  	if (tile)  		return tile->_flags;  	return 0; @@ -756,7 +756,7 @@ uint32 Map::getMapFGTileFlags(int x, int y) {  	if (x < 0 || x >= _width || y < 0 || y >= _height) {  		return 0;  	} -	Tile *tile = g_hdb->_drawMan->getTile(_foreground[y * _width + x]); +	Tile *tile = g_hdb->_gfx->getTile(_foreground[y * _width + x]);  	if (tile)  		return tile->_flags;  	return 0; @@ -794,7 +794,7 @@ void Map::addBGTileAnimation(int x, int y) {  	int i = y * _width + x; -	Tile *tile = g_hdb->_drawMan->getTile(_background[i]); +	Tile *tile = g_hdb->_gfx->getTile(_background[i]);  	if (!tile)  		return;  	uint32 flags = tile->_flags; @@ -813,7 +813,7 @@ void Map::addFGTileAnimation(int x, int y) {  	int i = y * _width + x; -	Tile *tile = g_hdb->_drawMan->getTile(_foreground[i]); +	Tile *tile = g_hdb->_gfx->getTile(_foreground[i]);  	if (!tile)  		return;  	uint32 flags = tile->_flags; @@ -831,7 +831,7 @@ void Map::addFGTileAnimation(int x, int y) {  void Map::removeBGTileAnimation(int x, int y) {  	int i = y * _width + x; -	Tile *tile = g_hdb->_drawMan->getTile(_background[i]); +	Tile *tile = g_hdb->_gfx->getTile(_background[i]);  	if (!tile)  		return;  	uint32 flags = tile->_flags; @@ -860,7 +860,7 @@ void Map::removeBGTileAnimation(int x, int y) {  void Map::removeFGTileAnimation(int x, int y) {  	int i = y * _width + x; -	Tile *tile = g_hdb->_drawMan->getTile(_foreground[i]); +	Tile *tile = g_hdb->_gfx->getTile(_foreground[i]);  	if (!tile)  		return;  	uint32 flags = tile->_flags; diff --git a/engines/hdb/window.cpp b/engines/hdb/window.cpp index c6372a7632..0b26a21b41 100644 --- a/engines/hdb/window.cpp +++ b/engines/hdb/window.cpp @@ -28,49 +28,49 @@ bool Window::init() {  	warning("STUB: Window::init: Incomplete"); -	_gfxTL = g_hdb->_drawMan->loadPic("menu_back_topleft"); -	_gfxTM = g_hdb->_drawMan->loadPic("menu_back_top"); -	_gfxTR = g_hdb->_drawMan->loadPic("menu_back_topright"); +	_gfxTL = g_hdb->_gfx->loadPic("menu_back_topleft"); +	_gfxTM = g_hdb->_gfx->loadPic("menu_back_top"); +	_gfxTR = g_hdb->_gfx->loadPic("menu_back_topright"); -	_gfxL = g_hdb->_drawMan->loadPic("menu_back_left"); -	_gfxM = g_hdb->_drawMan->loadPic("menu_back_middle"); -	_gfxR = g_hdb->_drawMan->loadPic("menu_back_right"); +	_gfxL = g_hdb->_gfx->loadPic("menu_back_left"); +	_gfxM = g_hdb->_gfx->loadPic("menu_back_middle"); +	_gfxR = g_hdb->_gfx->loadPic("menu_back_right"); -	_gfxBL = g_hdb->_drawMan->loadPic("menu_back_btmleft"); -	_gfxBM = g_hdb->_drawMan->loadPic("menu_back_bottom"); -	_gfxBR = g_hdb->_drawMan->loadPic("menu_back_btmright"); +	_gfxBL = g_hdb->_gfx->loadPic("menu_back_btmleft"); +	_gfxBM = g_hdb->_gfx->loadPic("menu_back_bottom"); +	_gfxBR = g_hdb->_gfx->loadPic("menu_back_btmright"); -	_gfxTitleL = g_hdb->_drawMan->loadPic("menu_title_left"); -	_gfxTitleM = g_hdb->_drawMan->loadPic("menu_title_mid"); -	_gfxTitleR = g_hdb->_drawMan->loadPic("menu_title_right"); +	_gfxTitleL = g_hdb->_gfx->loadPic("menu_title_left"); +	_gfxTitleM = g_hdb->_gfx->loadPic("menu_title_mid"); +	_gfxTitleR = g_hdb->_gfx->loadPic("menu_title_right"); -	_gGfxTL = g_hdb->_drawMan->loadPic("g_menu_back_topleft"); -	_gGfxTM = g_hdb->_drawMan->loadPic("g_menu_back_top"); -	_gGfxTR = g_hdb->_drawMan->loadPic("g_menu_back_topright"); +	_gGfxTL = g_hdb->_gfx->loadPic("g_menu_back_topleft"); +	_gGfxTM = g_hdb->_gfx->loadPic("g_menu_back_top"); +	_gGfxTR = g_hdb->_gfx->loadPic("g_menu_back_topright"); -	_gGfxL = g_hdb->_drawMan->loadPic("g_menu_back_left"); -	_gGfxM = g_hdb->_drawMan->loadPic("g_menu_back_middle"); -	_gGfxR = g_hdb->_drawMan->loadPic("g_menu_back_right"); +	_gGfxL = g_hdb->_gfx->loadPic("g_menu_back_left"); +	_gGfxM = g_hdb->_gfx->loadPic("g_menu_back_middle"); +	_gGfxR = g_hdb->_gfx->loadPic("g_menu_back_right"); -	_gGfxBL = g_hdb->_drawMan->loadPic("g_menu_back_btmleft"); -	_gGfxBM = g_hdb->_drawMan->loadPic("g_menu_back_bottom"); -	_gGfxBR = g_hdb->_drawMan->loadPic("g_menu_back_btmright"); +	_gGfxBL = g_hdb->_gfx->loadPic("g_menu_back_btmleft"); +	_gGfxBM = g_hdb->_gfx->loadPic("g_menu_back_bottom"); +	_gGfxBR = g_hdb->_gfx->loadPic("g_menu_back_btmright"); -	_gGfxTitleL = g_hdb->_drawMan->loadPic("g_menu_title_left"); -	_gGfxTitleM = g_hdb->_drawMan->loadPic("g_menu_title_mid"); -	_gGfxTitleR = g_hdb->_drawMan->loadPic("g_menu_title_right"); +	_gGfxTitleL = g_hdb->_gfx->loadPic("g_menu_title_left"); +	_gGfxTitleM = g_hdb->_gfx->loadPic("g_menu_title_mid"); +	_gGfxTitleR = g_hdb->_gfx->loadPic("g_menu_title_right"); -	_gfxIndent = g_hdb->_drawMan->loadPic("menu_delivery_indentation"); -	_gfxArrowTo = g_hdb->_drawMan->loadPic("menu_arrow_deliverto"); +	_gfxIndent = g_hdb->_gfx->loadPic("menu_delivery_indentation"); +	_gfxArrowTo = g_hdb->_gfx->loadPic("menu_arrow_deliverto");  	_gfxTry = _gfxAgain = NULL; // They will be loaded when needed -	_gfxInvSelect = g_hdb->_drawMan->loadPic("inventory_normal"); -	_gfxHandright = g_hdb->_drawMan->loadPic("menu_hand_pointright"); +	_gfxInvSelect = g_hdb->_gfx->loadPic("inventory_normal"); +	_gfxHandright = g_hdb->_gfx->loadPic("menu_hand_pointright"); -	_gfxInfobar = g_hdb->_drawMan->loadPic("pic_infobar"); -	_gfxDarken = g_hdb->_drawMan->loadPic("screen_darken"); -	_gfxPausePlaque = g_hdb->_drawMan->loadPic("pause_plaque"); +	_gfxInfobar = g_hdb->_gfx->loadPic("pic_infobar"); +	_gfxDarken = g_hdb->_gfx->loadPic("screen_darken"); +	_gfxPausePlaque = g_hdb->_gfx->loadPic("pause_plaque");  	_infobarDimmed = 0; @@ -96,7 +96,7 @@ void Window::restartSystem() {  	_dialogChoiceInfo.active = false;  	_invWinInfo.active = false;  	_dialogDelay = _invWinInfo.selection = 0; -	_gemGfx = g_hdb->_drawMan->loadTile("ent_gem_white_sit01"); +	_gemGfx = g_hdb->_gfx->loadTile("ent_gem_white_sit01");  	_infobarDimmed = 0;  } @@ -133,11 +133,11 @@ void Window::openDialog(const char *title, int tileIndex, const char *string, in  		strncpy(_dialogInfo.string, string, sizeof(_dialogInfo.string) - 1);  	else  		strcpy(_dialogInfo.string, string); -	g_hdb->_drawMan->getTextEdges(&e1, &e2, &e3, &e4); -	g_hdb->_drawMan->setTextEdges(kDialogTextLeft, kDialogTextRight, 0, 480); -	g_hdb->_drawMan->getDimensions(string, &width, &height); -	g_hdb->_drawMan->getDimensions(title, &titleWidth, &titleHeight); -	g_hdb->_drawMan->setTextEdges(e1, e2, e3, e4); +	g_hdb->_gfx->getTextEdges(&e1, &e2, &e3, &e4); +	g_hdb->_gfx->setTextEdges(kDialogTextLeft, kDialogTextRight, 0, 480); +	g_hdb->_gfx->getDimensions(string, &width, &height); +	g_hdb->_gfx->getDimensions(title, &titleWidth, &titleHeight); +	g_hdb->_gfx->setTextEdges(e1, e2, e3, e4);  	_dialogInfo.height = (height + 2) * 16;  	w = _dialogInfo.width = width + 32;  	_dialogInfo.titleWidth = titleWidth; @@ -207,16 +207,16 @@ void Window::drawDialog() {  	}  	int e1, e2, e3, e4; -	g_hdb->_drawMan->getTextEdges(&e1, &e2, &e3, &e4); -	g_hdb->_drawMan->setTextEdges(_dialogInfo.x + 10, 480, 0, kScreenHeight); -	g_hdb->_drawMan->setCursor(0, _dialogInfo.y - 7); +	g_hdb->_gfx->getTextEdges(&e1, &e2, &e3, &e4); +	g_hdb->_gfx->setTextEdges(_dialogInfo.x + 10, 480, 0, kScreenHeight); +	g_hdb->_gfx->setCursor(0, _dialogInfo.y - 7);  	if (_dialogInfo.title) -		g_hdb->_drawMan->drawText(_dialogInfo.title); -	g_hdb->_drawMan->setTextEdges(_dialogInfo.x + 16, _dialogInfo.x + _dialogInfo.width - 16, 0, kScreenHeight); -	g_hdb->_drawMan->setCursor(0, _dialogInfo.y + 16); +		g_hdb->_gfx->drawText(_dialogInfo.title); +	g_hdb->_gfx->setTextEdges(_dialogInfo.x + 16, _dialogInfo.x + _dialogInfo.width - 16, 0, kScreenHeight); +	g_hdb->_gfx->setCursor(0, _dialogInfo.y + 16);  	if (_dialogInfo.string) -		g_hdb->_drawMan->drawText(_dialogInfo.string); -	g_hdb->_drawMan->setTextEdges(e1, e2, e3, e4); +		g_hdb->_gfx->drawText(_dialogInfo.string); +	g_hdb->_gfx->setTextEdges(e1, e2, e3, e4);  }  void Window::closeDialog() { @@ -343,20 +343,20 @@ void Window::openDialogChoice(const char *title, const char *text, const char *f  		strcpy(_dialogChoiceInfo.choices[i], choices[i]);  	_dialogChoiceInfo.active = true; -	g_hdb->_drawMan->getTextEdges(&e1, &e2, &e3, &e4); -	g_hdb->_drawMan->setTextEdges(kOpenDialogTextLeft, kOpenDialogTextRight, 0, 480); -	g_hdb->_drawMan->getDimensions(text, &width, &height); -	g_hdb->_drawMan->getDimensions(title, &titleWidth, &titleHeight); +	g_hdb->_gfx->getTextEdges(&e1, &e2, &e3, &e4); +	g_hdb->_gfx->setTextEdges(kOpenDialogTextLeft, kOpenDialogTextRight, 0, 480); +	g_hdb->_gfx->getDimensions(text, &width, &height); +	g_hdb->_gfx->getDimensions(title, &titleWidth, &titleHeight);  	for (i = 0; i < 10; i++)  		if (choices[i]) {  			int	w, h; -			g_hdb->_drawMan->getDimensions(choices[i], &w, &h); +			g_hdb->_gfx->getDimensions(choices[i], &w, &h);  			if (w > width)  				width = w;  		} -	g_hdb->_drawMan->setTextEdges(e1, e2, e3, e4); +	g_hdb->_gfx->setTextEdges(e1, e2, e3, e4);  	_dialogChoiceInfo.textHeight = (height + 1) * 16;  	_dialogChoiceInfo.height = (height + 2 + numChoices) * 16;  	_dialogChoiceInfo.width = width + 48; @@ -406,21 +406,21 @@ void Window::drawDialogChoice() {  		_gGfxTitleR->drawMasked(_dialogChoiceInfo.x + (blocks + 1) * 16, _dialogChoiceInfo.y - 10);  	} -	g_hdb->_drawMan->getTextEdges(&e1, &e2, &e3, &e4); -	g_hdb->_drawMan->setTextEdges(_dialogChoiceInfo.x + 10, kOpenDialogTextRight, 0, 480); -	g_hdb->_drawMan->setCursor(0, _dialogChoiceInfo.y - 7); +	g_hdb->_gfx->getTextEdges(&e1, &e2, &e3, &e4); +	g_hdb->_gfx->setTextEdges(_dialogChoiceInfo.x + 10, kOpenDialogTextRight, 0, 480); +	g_hdb->_gfx->setCursor(0, _dialogChoiceInfo.y - 7);  	if (_dialogChoiceInfo.title) -		g_hdb->_drawMan->drawText(_dialogChoiceInfo.title); -	g_hdb->_drawMan->setTextEdges(_dialogChoiceInfo.x + 16, kOpenDialogTextRight, 0, 480); -	g_hdb->_drawMan->setCursor(0, _dialogChoiceInfo.y + 16); +		g_hdb->_gfx->drawText(_dialogChoiceInfo.title); +	g_hdb->_gfx->setTextEdges(_dialogChoiceInfo.x + 16, kOpenDialogTextRight, 0, 480); +	g_hdb->_gfx->setCursor(0, _dialogChoiceInfo.y + 16);  	if (_dialogChoiceInfo.text) -		g_hdb->_drawMan->drawText(_dialogChoiceInfo.text); +		g_hdb->_gfx->drawText(_dialogChoiceInfo.text);  	for (i = 0; i < _dialogChoiceInfo.numChoices; i++) { -		g_hdb->_drawMan->setCursor(_dialogChoiceInfo.x + 48, _dialogChoiceInfo.y + _dialogChoiceInfo.textHeight + 16 * i); -		g_hdb->_drawMan->drawText(_dialogChoiceInfo.choices[i]); +		g_hdb->_gfx->setCursor(_dialogChoiceInfo.x + 48, _dialogChoiceInfo.y + _dialogChoiceInfo.textHeight + 16 * i); +		g_hdb->_gfx->drawText(_dialogChoiceInfo.choices[i]);  	} -	g_hdb->_drawMan->setTextEdges(e1, e2, e3, e4); +	g_hdb->_gfx->setTextEdges(e1, e2, e3, e4);  	_gfxHandright->drawMasked(_dialogChoiceInfo.x + 10, 4 + _dialogChoiceInfo.y + _dialogChoiceInfo.textHeight + 16 * _dialogChoiceInfo.selection);  } @@ -490,10 +490,10 @@ void Window::openMessageBar(const char *title, int time) {  	_msgInfo.timer = (time * kGameFPS);  	strcpy(_msgInfo.title, title); -	g_hdb->_drawMan->getTextEdges(&e1, &e2, &e3, &e4); -	g_hdb->_drawMan->setTextEdges(kDialogTextLeft, kDialogTextRight, 0, 480); -	g_hdb->_drawMan->getDimensions(title, &width, &height); -	g_hdb->_drawMan->setTextEdges(e1, e2, e3, e4); +	g_hdb->_gfx->getTextEdges(&e1, &e2, &e3, &e4); +	g_hdb->_gfx->setTextEdges(kDialogTextLeft, kDialogTextRight, 0, 480); +	g_hdb->_gfx->getDimensions(title, &width, &height); +	g_hdb->_gfx->setTextEdges(e1, e2, e3, e4);  	_msgInfo.height = (height + 2) * 16;  	_msgInfo.width = width + 32; @@ -518,11 +518,11 @@ void Window::drawMessageBar() {  	drawBorder(_msgInfo.x, _msgInfo.y, _msgInfo.width, _msgInfo.height, false); -	g_hdb->_drawMan->getTextEdges(&e1, &e2, &e3, &e4); -	g_hdb->_drawMan->setTextEdges(_msgInfo.x + 16, _msgInfo.x + _msgInfo.width - 16, 0, 320); -	g_hdb->_drawMan->setCursor(_msgInfo.x + 16, _msgInfo.y + 16); -	g_hdb->_drawMan->drawText(_msgInfo.title); -	g_hdb->_drawMan->setTextEdges(e1, e2, e3, e4); +	g_hdb->_gfx->getTextEdges(&e1, &e2, &e3, &e4); +	g_hdb->_gfx->setTextEdges(_msgInfo.x + 16, _msgInfo.x + _msgInfo.width - 16, 0, 320); +	g_hdb->_gfx->setCursor(_msgInfo.x + 16, _msgInfo.y + 16); +	g_hdb->_gfx->drawText(_msgInfo.title); +	g_hdb->_gfx->setTextEdges(e1, e2, e3, e4);  	//  	// time to go away?  see if we have any more msgs in the queue... @@ -554,10 +554,10 @@ void Window::nextMsgQueued() {  	strcpy(_msgInfo.title, _msgQueueStr[0]);  	_msgInfo.timer = (_msgQueueWait[0] * kGameFPS); -	g_hdb->_drawMan->getTextEdges(&e1, &e2, &e3, &e4); -	g_hdb->_drawMan->setTextEdges(kDialogTextLeft, kDialogTextRight, 0, 480); -	g_hdb->_drawMan->getDimensions(_msgInfo.title, &width, &height); -	g_hdb->_drawMan->setTextEdges(e1, e2, e3, e4); +	g_hdb->_gfx->getTextEdges(&e1, &e2, &e3, &e4); +	g_hdb->_gfx->setTextEdges(kDialogTextLeft, kDialogTextRight, 0, 480); +	g_hdb->_gfx->getDimensions(_msgInfo.title, &width, &height); +	g_hdb->_gfx->setTextEdges(e1, e2, e3, e4);  	_msgInfo.height = (height + 2) * 16; @@ -623,8 +623,8 @@ void Window::drawInventory() {  	// Draw the Gem Amount  	gems = g_hdb->_ai->getGemAmount();  	sprintf(string, "%d", gems); -	g_hdb->_drawMan->setCursor(drawX + 32, drawY + 8); -	g_hdb->_drawMan->drawText(string); +	g_hdb->_gfx->setCursor(drawX + 32, drawY + 8); +	g_hdb->_gfx->drawText(string);  	// Draw the mini monkeystone  	mstones = g_hdb->_ai->getMonkeystoneAmount(); @@ -634,8 +634,8 @@ void Window::drawInventory() {  		// Draw the monkeystone amount  		sprintf(string, "%d", mstones); -		g_hdb->_drawMan->setCursor(drawX + 28, drawY + 8); -		g_hdb->_drawMan->drawText(string); +		g_hdb->_gfx->setCursor(drawX + 28, drawY + 8); +		g_hdb->_gfx->drawText(string);  	}  	// If you have an inventory, draw the selection cursor @@ -651,8 +651,8 @@ void Window::drawInventory() {  		if (sel) {  			int centerX = baseX - 4 + (kScreenWidth - baseX) / 2;  			drawY = _invWinInfo.y + (kInvItemSpaceY * 4) + 16; -			g_hdb->_drawMan->setCursor(centerX - g_hdb->_drawMan->stringLength(sel->printedName) / 2, drawY); -			g_hdb->_drawMan->drawText(sel->printedName); +			g_hdb->_gfx->setCursor(centerX - g_hdb->_gfx->stringLength(sel->printedName) / 2, drawY); +			g_hdb->_gfx->drawText(sel->printedName);  		}  	}  } @@ -680,9 +680,9 @@ void Window::openDeliveries(bool animate) {  	for (int i = 0; i < g_hdb->_ai->getDeliveriesAmount(); i++) {  		d = g_hdb->_ai->getDeliveryItem(i);  		if (d->itemGfxName[0]) -			d->itemGfx = g_hdb->_drawMan->loadTile(d->itemGfxName); +			d->itemGfx = g_hdb->_gfx->loadTile(d->itemGfxName);  		if (d->destGfxName[0]) -			d->destGfx = g_hdb->_drawMan->loadTile(d->destGfxName); +			d->destGfx = g_hdb->_gfx->loadTile(d->destGfxName);  	}  	warning("STUB: Play SND_POP"); @@ -728,8 +728,8 @@ void Window::drawDeliveries() {  					_gfxIndent->draw(drawX, drawY);  					d->itemGfx->drawMasked(drawX, drawY); -					g_hdb->_drawMan->setCursor(centerX - g_hdb->_drawMan->stringLength(d->itemTextName) / 2, kDlvItemTextY); -					g_hdb->_drawMan->drawText(d->itemTextName); +					g_hdb->_gfx->setCursor(centerX - g_hdb->_gfx->stringLength(d->itemTextName) / 2, kDlvItemTextY); +					g_hdb->_gfx->drawText(d->itemTextName);  					if (!_dlvsInfo.go2) {  						_dlvsInfo.go2 = true;  						_dlvsInfo.delay2 = g_hdb->getTimeSlice() + 500; @@ -742,8 +742,8 @@ void Window::drawDeliveries() {  					// Draw TO  					_gfxArrowTo->drawMasked(_dlvsInfo.x + kDlvItemSpaceX * _dlvsInfo.selected + 8, drawY + kTileHeight); -					g_hdb->_drawMan->setCursor(centerX - g_hdb->_drawMan->stringLength("to") / 2, kDlvItemTextY + 12); -					g_hdb->_drawMan->drawText("to"); +					g_hdb->_gfx->setCursor(centerX - g_hdb->_gfx->stringLength("to") / 2, kDlvItemTextY + 12); +					g_hdb->_gfx->drawText("to");  					if (!_dlvsInfo.go3) {  						_dlvsInfo.go3 = true;  						_dlvsInfo.delay3 = g_hdb->getTimeSlice() + 500; @@ -757,9 +757,9 @@ void Window::drawDeliveries() {  					_gfxIndent->draw(drawX, drawY + kTileHeight + 16);  					d->destGfx->drawMasked(drawX, drawY + kTileHeight + 16); -					g_hdb->_drawMan->setCursor(centerX - (g_hdb->_drawMan->stringLength(d->destTextName) + g_hdb->_drawMan->stringLength("to")) / 2, kDlvItemTextY + 12); -					g_hdb->_drawMan->drawText("to "); -					g_hdb->_drawMan->drawText(d->destTextName); +					g_hdb->_gfx->setCursor(centerX - (g_hdb->_gfx->stringLength(d->destTextName) + g_hdb->_gfx->stringLength("to")) / 2, kDlvItemTextY + 12); +					g_hdb->_gfx->drawText("to "); +					g_hdb->_gfx->drawText(d->destTextName);  					warning("STUB: Play crazy sound");  					_dlvsInfo.animate = false; @@ -775,11 +775,11 @@ void Window::drawDeliveries() {  			d->destGfx->drawMasked(drawX, drawY + kTileHeight + 16);  			if (!_dlvsInfo.animate && inv == _dlvsInfo.selected) { -				g_hdb->_drawMan->setCursor(centerX - g_hdb->_drawMan->stringLength(d->itemTextName)/2, kDlvItemTextY); -				g_hdb->_drawMan->drawText(d->itemTextName); -				g_hdb->_drawMan->setCursor(centerX - (g_hdb->_drawMan->stringLength(d->destTextName) + g_hdb->_drawMan->stringLength("to ")) / 2, kDlvItemTextY + 12); -				g_hdb->_drawMan->drawText("to "); -				g_hdb->_drawMan->drawText(d->destTextName); +				g_hdb->_gfx->setCursor(centerX - g_hdb->_gfx->stringLength(d->itemTextName)/2, kDlvItemTextY); +				g_hdb->_gfx->drawText(d->itemTextName); +				g_hdb->_gfx->setCursor(centerX - (g_hdb->_gfx->stringLength(d->destTextName) + g_hdb->_gfx->stringLength("to ")) / 2, kDlvItemTextY + 12); +				g_hdb->_gfx->drawText("to "); +				g_hdb->_gfx->drawText(d->destTextName);  			}  			drawX += kDlvItemSpaceX; @@ -792,8 +792,8 @@ void Window::drawDeliveries() {  	// Draw "No Deliveries" or the arrow that points to the currently selected one  	if (!inv) { -		g_hdb->_drawMan->setCursor(baseX + 16, _dlvsInfo.y); -		g_hdb->_drawMan->drawText("No Deliveries"); +		g_hdb->_gfx->setCursor(baseX + 16, _dlvsInfo.y); +		g_hdb->_gfx->drawText("No Deliveries");  	} else if (!_dlvsInfo.animate) {  		int dx, dy, rowtwo; @@ -845,7 +845,7 @@ void Window::textOut(const char *text, int x, int y, int timer) {  	if (x < 0) {  		int pw, lines; -		g_hdb->_drawMan->getDimensions(t->text, &pw, &lines); +		g_hdb->_gfx->getDimensions(t->text, &pw, &lines);  		t->x = kTextOutCenterX - pw / 2;  	} @@ -854,7 +854,7 @@ void Window::textOut(const char *text, int x, int y, int timer) {  void Window::centerTextOut(const char *text, int y, int timer) {  	int width, lines; -	g_hdb->_drawMan->getDimensions(text, &width, &lines); +	g_hdb->_gfx->getDimensions(text, &width, &lines);  	textOut(text, kTextOutCenterX - ((width - 8) >> 1), y, timer);  } @@ -866,15 +866,15 @@ void Window::drawTextOut() {  	if (_textOutList.empty())  		return; -	g_hdb->_drawMan->getTextEdges(&e1, &e2, &e3, &e4); -	g_hdb->_drawMan->setTextEdges(0, 480, 0, kScreenHeight); +	g_hdb->_gfx->getTextEdges(&e1, &e2, &e3, &e4); +	g_hdb->_gfx->setTextEdges(0, 480, 0, kScreenHeight);  	time = g_system->getMillis();  	for (uint i = 0; i < _textOutList.size(); i++) {  		t = _textOutList[i]; -		g_hdb->_drawMan->setCursor(t->x, t->y); -		g_hdb->_drawMan->drawText(t->text); +		g_hdb->_gfx->setCursor(t->x, t->y); +		g_hdb->_gfx->drawText(t->text);  		if (t->timer < time) {  			_textOutList.remove_at(i); @@ -882,7 +882,7 @@ void Window::drawTextOut() {  		}  	} -	g_hdb->_drawMan->setTextEdges(e1, e2, e3, e4); +	g_hdb->_gfx->setTextEdges(e1, e2, e3, e4);  }  void Window::closeTextOut() {  | 
