Exemplo n.º 1
0
 std::string ToString() const
 {
     std::string cmd;
     cmd.append(m_cmd).append(" ");
     for (uint32 i = 0; i < m_args.size(); i++)
     {
         cmd.append(m_args[i]);
         if (i != m_args.size() - 1)
         {
             cmd.append(" ");
         }
     }
     return cmd;
 }
Exemplo n.º 2
0
 const std::string* GetArgument(uint32 index) const
 {
     if (index >= m_args.size())
     {
         return NULL;
     }
     return &(m_args[index]);
 }
Exemplo n.º 3
0
// Command 18: transition
// Note that this opcode has 1 or 5 parameters, depending on args.size()
// Parameter 0: transition type
// Parameters 1-4: transition rectangle
void RivenSimpleCommand::transition(uint16 op, const ArgumentArray &args) {
	if (args.size() == 1)
		_vm->_gfx->scheduleTransition((RivenTransition) args[0]);
	else
		_vm->_gfx->scheduleTransition((RivenTransition) args[0], Common::Rect(args[1], args[2], args[3], args[4]));
}
Exemplo n.º 4
0
// Command 1: draw tBMP resource (tbmp_id, left, top, right, bottom, u0, u1, u2, u3)
void RivenSimpleCommand::drawBitmap(uint16 op, const ArgumentArray &args) {
	if (args.size() < 5) // Copy the image to the whole screen, ignoring the rest of the parameters
		_vm->_gfx->copyImageToScreen(args[0], 0, 0, 608, 392);
	else          // Copy the image to a certain part of the screen
		_vm->_gfx->copyImageToScreen(args[0], args[1], args[2], args[3], args[4]);
}
Exemplo n.º 5
0
void BSpit::xbchangeboiler(const ArgumentArray &args) {
	uint32 heat = _vm->_vars["bheat"];
	uint32 water = _vm->_vars["bblrwtr"];
	uint32 platform = _vm->_vars["bblrgrt"];

	// Stop any background videos
	_vm->_video->closeVideos();

	if (args[0] == 1) {
		// Water is filling/draining from the boiler
		if (water == 0) {
			if (platform == 1)
				_vm->getCard()->playMovie(12);
			else
				_vm->getCard()->playMovie(10);
		} else if (heat == 1) {
			if (platform == 1)
				_vm->getCard()->playMovie(22);
			else
				_vm->getCard()->playMovie(19);
		} else {
			if (platform == 1)
				_vm->getCard()->playMovie(16);
			else
				_vm->getCard()->playMovie(13);
		}
	} else if (args[0] == 2 && water != 0) {
		if (heat == 1) {
			// Turning on the heat
			if (platform == 1)
				_vm->getCard()->playMovie(23);
			else
				_vm->getCard()->playMovie(20);
		} else {
			// Turning off the heat
			if (platform == 1)
				_vm->getCard()->playMovie(18);
			else
				_vm->getCard()->playMovie(15);
		}
	} else if (args[0] == 3) {
		if (platform == 1) {
			// Lowering the platform
			if (water == 1) {
				if (heat == 1)
					_vm->getCard()->playMovie(24);
				else
					_vm->getCard()->playMovie(17);
			} else {
				_vm->getCard()->playMovie(11);
			}
		} else {
			// Raising the platform
			if (water == 1) {
				if (heat == 1)
					_vm->getCard()->playMovie(21);
				else
					_vm->getCard()->playMovie(14);
			} else {
				_vm->getCard()->playMovie(9);
			}
		}
	}

	if (args.size() > 1)
		_vm->getCard()->playSound(args[1]);
	else if (args[0] == 2)
		_vm->getCard()->playSound(1);

	RivenVideo *video = _vm->_video->openSlot(11);
	video->playBlocking();
}