diff options
| author | James Brown | 2003-08-05 16:43:33 +0000 | 
|---|---|---|
| committer | James Brown | 2003-08-05 16:43:33 +0000 | 
| commit | 173e3c5db36eb2ae56dd31ec49b2fac955920816 (patch) | |
| tree | 23270bf6035b1eff7cda200f282a38ba0948cfe9 | |
| parent | e85cf7dae72cae0a4f2d61904156a1625eb0c272 (diff) | |
| download | scummvm-rg350-173e3c5db36eb2ae56dd31ec49b2fac955920816.tar.gz scummvm-rg350-173e3c5db36eb2ae56dd31ec49b2fac955920816.tar.bz2 scummvm-rg350-173e3c5db36eb2ae56dd31ec49b2fac955920816.zip | |
V1 preposition support, but broken.
svn-id: r9502
| -rw-r--r-- | scumm/saveload.cpp | 2 | ||||
| -rw-r--r-- | scumm/script_v2.cpp | 17 | ||||
| -rw-r--r-- | scumm/verbs.h | 2 | 
3 files changed, 15 insertions, 6 deletions
| diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp index 60f8a0aa06..80926b7bbe 100644 --- a/scumm/saveload.cpp +++ b/scumm/saveload.cpp @@ -312,7 +312,7 @@ void Scumm::saveOrLoad(Serializer *s, uint32 savegameVersion) {  		MKLINE(VerbSlot, saveid, sleByte, VER_V8),  		MKLINE(VerbSlot, key, sleByte, VER_V8),  		MKLINE(VerbSlot, center, sleByte, VER_V8), -		MKLINE(VerbSlot, field_1B, sleByte, VER_V8), +		MKLINE(VerbSlot, prep, sleByte, VER_V8),  		MKLINE(VerbSlot, imgindex, sleUint16, VER_V8),  		MKEND()  	}; diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp index 75115928ca..624cd2c30a 100644 --- a/scumm/script_v2.cpp +++ b/scumm/script_v2.cpp @@ -818,8 +818,8 @@ void Scumm_v2::o2_verbOps() {  		int x = fetchScriptByte() << 3;  		int y = fetchScriptByte() << 3;  		slot = getVarOrDirectByte(0x80) + 1; -		/* int unk = */ fetchScriptByte(); // ? - +		int prep = fetchScriptByte(); // Only used in V1? +		printf("Setting prep %d for slot %d\n", prep, slot);  		// V1 Maniac verbs are relative to the 'verb area' - under the sentence  		if ((_gameId == GID_MANIAC) && (_version == 1))  			y+=8; @@ -848,6 +848,7 @@ void Scumm_v2::o2_verbOps() {  		vs->key = 0;  		vs->center = 0;  		vs->imgindex = 0; +		vs->prep = prep;  		vs->x = x;  		vs->y = y; @@ -912,7 +913,7 @@ void Scumm_v2::o2_doSentence() {  			runObjectScript(st->objectA, st->verb, false, false, NULL);  		} else -			runObjectScript(st->objectA, 253, (st->verb == 250), true, NULL); +				runObjectScript(st->objectA, 253, (st->verb == 250), true, NULL);  		break;  	case 2:  		// Print the sentence @@ -933,7 +934,7 @@ void Scumm_v2::o2_drawSentence() {  	static char sentence[256];  	const byte *temp;  	int slot = getVerbSlot(VAR(VAR_SENTENCE_VERB),0); - +	printf("slot is %d\n");  	if (!(_userState & 32))  		return; @@ -948,6 +949,14 @@ void Scumm_v2::o2_drawSentence() {  			strcat(sentence, " ");  			strcat(sentence, (const char*)temp);  		} +	 +		if ((_version == 1) && (VAR(VAR_SENTENCE_PREPOSITION) == 0)) { +        	        byte *ptr = getOBCDFromObject(VAR(VAR_SENTENCE_OBJECT1)) + 12; +			VerbSlot *vs = &_verbs[slot]; + +			if (ptr && (vs->prep == 0xFF)) +				VAR(VAR_SENTENCE_PREPOSITION) = (*ptr >> 5); +        	}  	}  	if (0 < VAR(VAR_SENTENCE_PREPOSITION) && VAR(VAR_SENTENCE_PREPOSITION) <= 4) { diff --git a/scumm/verbs.h b/scumm/verbs.h index 40fe3d47d7..fd4decb82d 100644 --- a/scumm/verbs.h +++ b/scumm/verbs.h @@ -39,7 +39,7 @@ struct VerbSlot {  	uint16 saveid;  	uint8 key;  	bool center; -	uint8 field_1B; +	uint8 prep;  	uint16 imgindex;  }; | 
