diff options
| author | Walter van Niftrik | 2016-03-17 10:46:53 +0100 | 
|---|---|---|
| committer | Walter van Niftrik | 2016-06-06 20:35:49 +0200 | 
| commit | c0b33afc4a41e3c00dfafa6e1262ce17ed68c15c (patch) | |
| tree | dccbddc71dc23b84d6a387e6174a20335d64708d /engines/adl | |
| parent | 6fd580fb6661e6cf2e7935aae925457e7c92e822 (diff) | |
| download | scummvm-rg350-c0b33afc4a41e3c00dfafa6e1262ce17ed68c15c.tar.gz scummvm-rg350-c0b33afc4a41e3c00dfafa6e1262ce17ed68c15c.tar.bz2 scummvm-rg350-c0b33afc4a41e3c00dfafa6e1262ce17ed68c15c.zip  | |
ADL: Load hires2 dropped item offsets
Diffstat (limited to 'engines/adl')
| -rw-r--r-- | engines/adl/adl.cpp | 3 | ||||
| -rw-r--r-- | engines/adl/hires2.cpp | 9 | ||||
| -rw-r--r-- | engines/adl/hires2.h | 22 | 
3 files changed, 23 insertions, 11 deletions
diff --git a/engines/adl/adl.cpp b/engines/adl/adl.cpp index 1afc530ad4..bd1cc84f42 100644 --- a/engines/adl/adl.cpp +++ b/engines/adl/adl.cpp @@ -304,7 +304,8 @@ void AdlEngine::drawItems() const {  		Common::Array<byte>::const_iterator pic;  		for (pic = item->roomPictures.begin(); pic != item->roomPictures.end(); ++pic) { -			if (*pic == getCurRoom().curPicture) { +			// IDI_NONE check was added in hires2 +			if (*pic == getCurRoom().curPicture || *pic == IDI_NONE) {  				drawItem(*item, item->position);  				continue;  			} diff --git a/engines/adl/hires2.cpp b/engines/adl/hires2.cpp index e5475201de..b99f9fc3c5 100644 --- a/engines/adl/hires2.cpp +++ b/engines/adl/hires2.cpp @@ -106,6 +106,15 @@ void HiRes2Engine::init() {  	f.seek(IDI_HR2_OFS_CMDS_0);  	readCommands(f, _globalCommands); +	// Load dropped item offsets +	f.seek(IDI_HR2_OFS_ITEM_OFFSETS); +	for (uint i = 0; i < IDI_HR2_NUM_ITEM_OFFSETS; ++i) { +		Common::Point p; +		p.x = f.readByte(); +		p.y = f.readByte(); +		_itemOffsets.push_back(p); +	} +  	f.seek(IDI_HR2_OFS_VERBS);  	loadWords(f, _verbs); diff --git a/engines/adl/hires2.h b/engines/adl/hires2.h index 631b3418cc..516ea52354 100644 --- a/engines/adl/hires2.h +++ b/engines/adl/hires2.h @@ -41,21 +41,23 @@ namespace Adl {  #define TS(TRACK, SECTOR) TSO(TRACK, SECTOR, 0)  #define T(TRACK) TS(TRACK, 0) -#define IDI_HR2_OFS_INTRO_TEXT TSO(0x00, 0xd, 0x17) -#define IDI_HR2_OFS_VERBS        T(0x19) -#define IDI_HR2_OFS_NOUNS       TS(0x22, 0x2) -#define IDI_HR2_OFS_ROOMS      TSO(0x21, 0x5, 0x0e) // Skip bogus room 0 -#define IDI_HR2_OFS_MESSAGES   TSO(0x1f, 0x2, 0x04) // Skip bogus message 0 -#define IDI_HR2_OFS_ITEM_PICS  TSO(0x1e, 0x9, 0x05) // Skip bogus pic 0 -#define IDI_HR2_OFS_ITEMS        T(0x21) - -#define IDI_HR2_OFS_CMDS_0      TS(0x1f, 0x7) -#define IDI_HR2_OFS_CMDS_1      TS(0x1d, 0x7) +#define IDI_HR2_OFS_INTRO_TEXT   TSO(0x00, 0xd, 0x17) +#define IDI_HR2_OFS_VERBS          T(0x19) +#define IDI_HR2_OFS_NOUNS         TS(0x22, 0x2) +#define IDI_HR2_OFS_ROOMS        TSO(0x21, 0x5, 0x0e) // Skip bogus room 0 +#define IDI_HR2_OFS_MESSAGES     TSO(0x1f, 0x2, 0x04) // Skip bogus message 0 +#define IDI_HR2_OFS_ITEM_PICS    TSO(0x1e, 0x9, 0x05) // Skip bogus pic 0 +#define IDI_HR2_OFS_ITEMS          T(0x21) +#define IDI_HR2_OFS_ITEM_OFFSETS TSO(0x1b, 0x4, 0x15) + +#define IDI_HR2_OFS_CMDS_0        TS(0x1f, 0x7) +#define IDI_HR2_OFS_CMDS_1        TS(0x1d, 0x7)  #define IDI_HR2_NUM_ROOMS 135  #define IDI_HR2_NUM_MESSAGES 254  #define IDI_HR2_NUM_VARS 40  #define IDI_HR2_NUM_ITEM_PICS 38 +#define IDI_HR2_NUM_ITEM_OFFSETS 16  // Messages used outside of scripts  #define IDI_HR2_MSG_CANT_GO_THERE      123  | 
