Ejemplo n.º 1
0
void AGOSEngine_PuzzlePack::opp_message() {
	// 63: show string nl

	if (getBitFlag(105)) {
		// Swampy adventures
		getStringPtrByID(getNextStringID());
//		printInfoText(getStringPtrByID(getNextStringID()));
	} else {
		showMessageFormat("%s\n", getStringPtrByID(getNextStringID()));
	}
}
Ejemplo n.º 2
0
void AGOSEngine_Simon1::os1_screenTextMsg() {
	// 162: print string
	uint vgaSpriteId = getVarOrByte();
	uint color = getVarOrByte();
	uint stringId = getNextStringID();
	const byte *stringPtr = NULL;
	uint speechId = 0;
	TextLocation *tl;

	if (stringId != 0xFFFF)
		stringPtr = getStringPtrByID(stringId);

	if (getFeatures() & GF_TALKIE) {
		if (getGameType() == GType_FF || getGameType() == GType_PP)
			speechId = (uint16)getVarOrWord();
		else
			speechId = (uint16)getNextWord();
	}

	if (getGameType() == GType_FF || getGameType() == GType_PP)
		vgaSpriteId = 1;

	tl = getTextLocation(vgaSpriteId);
	if (_speech && speechId != 0)
		playSpeech(speechId, vgaSpriteId);
	if (((getGameType() == GType_SIMON2 && (getFeatures() & GF_TALKIE)) || getGameType() == GType_FF) &&
		speechId == 0) {
		stopAnimateSimon2(2, vgaSpriteId + 2);
	}

	if (stringPtr != NULL && stringPtr[0] != 0 && (speechId == 0 || _subtitles))
		printScreenText(vgaSpriteId, color, (const char *)stringPtr, tl->x, tl->y, tl->width);

}
Ejemplo n.º 3
0
void AGOSEngine_Waxworks::oww_setShortText() {
	// 66: set item name
	uint var = getVarOrByte();
	uint stringId = getNextStringID();
	if (var < _numTextBoxes) {
		_shortText[var] = stringId;
	}
}
Ejemplo n.º 4
0
void AGOSEngine_Feeble::off_loadVideo() {
	// 182: load video file
	const byte *filename = getStringPtrByID(getNextStringID());

	_moviePlayer = makeMoviePlayer(this, (const char *)filename);

	assert(_moviePlayer);
	_moviePlayer->load();
}
Ejemplo n.º 5
0
void AGOSEngine_PuzzlePack::opp_setShortText() {
	// 66: set item name
	uint var = getVarOrByte();
	uint stringId = getNextStringID();
	if (var < _numTextBoxes) {
		_shortText[var] = stringId;
		_shortTextX[var] = getVarOrWord();
		_shortTextY[var] = getVarOrWord();
	}
}
Ejemplo n.º 6
0
void AGOSEngine_Waxworks::oww_setLongText() {
	// 67: set item description
	uint var = getVarOrByte();
	uint stringId = getNextStringID();
	if (getFeatures() & GF_TALKIE) {
		uint speechId = getNextWord();
		if (var < _numTextBoxes) {
			_longText[var] = stringId;
			_longSound[var] = speechId;
		}
	} else {
		if (var < _numTextBoxes) {
			_longText[var] = stringId;
		}
	}
}
Ejemplo n.º 7
0
void AGOSEngine_Simon1::os1_screenTextMsg() {
	// 162: print string
	uint vgaSpriteId = getVarOrByte();
	uint color = getVarOrByte();
	uint stringId = getNextStringID();
	const byte *stringPtr = NULL;
	uint speechId = 0;
	TextLocation *tl;

	if (stringId != 0xFFFF)
		stringPtr = getStringPtrByID(stringId);

	if (getFeatures() & GF_TALKIE) {
		if (getGameType() == GType_FF || getGameType() == GType_PP)
			speechId = (uint16)getVarOrWord();
		else
			speechId = (uint16)getNextWord();
	}

	if (getGameType() == GType_FF || getGameType() == GType_PP)
		vgaSpriteId = 1;

	tl = getTextLocation(vgaSpriteId);
	if (_speech && speechId != 0)
		playSpeech(speechId, vgaSpriteId);
	if (((getGameType() == GType_SIMON2 && (getFeatures() & GF_TALKIE)) || getGameType() == GType_FF) &&
		speechId == 0) {
		stopAnimateSimon2(2, vgaSpriteId + 2);
	}

	// WORKAROUND: Several strings in the French version of Simon the Sorcerer 1 set the incorrect width,
	// causing crashes, or glitches in subtitles. See bug #3512776 for example.
	if (getGameType() == GType_SIMON1 && _language == Common::FR_FRA) {
		if ((getFeatures() & GF_TALKIE) && stringId == 33219)
			tl->width = 96;
		if (!(getFeatures() & GF_TALKIE) && stringId == 33245)
			tl->width = 96;
	}

	if (stringPtr != NULL && stringPtr[0] != 0 && (speechId == 0 || _subtitles))
		printScreenText(vgaSpriteId, color, (const char *)stringPtr, tl->x, tl->y, tl->width);

}
Ejemplo n.º 8
0
void AGOSEngine_Elvira2::oe2_isCalled() {
	// 79: childstruct fr2 is
	Item *i = getNextItemPtr();
	uint stringId = getNextStringID();
	setScriptCondition(i->itemName == stringId);
}
Ejemplo n.º 9
0
void AGOSEngine_Simon2::os2_isShortText() {
	// 188: string2 is
	uint i = getVarOrByte();
	uint str = getNextStringID();
	setScriptCondition(str < _numTextBoxes && _shortText[i] == str);
}
Ejemplo n.º 10
0
void AGOSEngine::o_comment() {
	// 87: comment
	getNextStringID();
}
Ejemplo n.º 11
0
void AGOSEngine::o_isCalled() {
	// 79: childstruct fr2 is
	SubObject *subObject = (SubObject *)findChildOfType(getNextItemPtr(), kObjectType);
	uint stringId = getNextStringID();
	setScriptCondition((subObject != NULL) && subObject->objectName == stringId);
}
Ejemplo n.º 12
0
void AGOSEngine::o_msg() {
	// 64: show string
	showMessageFormat("%s", getStringPtrByID(getNextStringID()));
}
Ejemplo n.º 13
0
void AGOSEngine::o_message() {
	// 63: show string nl
	showMessageFormat("%s\n", getStringPtrByID(getNextStringID()));
}
Ejemplo n.º 14
0
void AGOSEngine_Waxworks::oww_boxMsg() {
	// 185: print msg to box
	boxTextMsg((const char *)getStringPtrByID(getNextStringID()));
}
Ejemplo n.º 15
0
void AGOSEngine_Waxworks::oww_boxMessage() {
	// 184: print message to box
	boxTextMessage((const char *)getStringPtrByID(getNextStringID()));
}