From 8fd8c913af7536781a8a59bb27006b3f54087aa8 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Fri, 26 Aug 2011 09:04:51 +0200 Subject: GOB: Implement oGeisha_caress1 and oGeisha_caress2 Used in the Mastermind minigame in Chapter 2: Caress --- engines/gob/inter.h | 3 +++ engines/gob/inter_geisha.cpp | 13 +++++++++++++ 2 files changed, 16 insertions(+) diff --git a/engines/gob/inter.h b/engines/gob/inter.h index 7198ec9453..f229478301 100644 --- a/engines/gob/inter.h +++ b/engines/gob/inter.h @@ -354,6 +354,9 @@ protected: void oGeisha_playMusic(OpGobParams ¶ms); void oGeisha_stopMusic(OpGobParams ¶ms); + void oGeisha_caress1(OpGobParams ¶ms); + void oGeisha_caress2(OpGobParams ¶ms); + int16 loadSound(int16 slot); }; diff --git a/engines/gob/inter_geisha.cpp b/engines/gob/inter_geisha.cpp index 3b8747e903..3f79088ac8 100644 --- a/engines/gob/inter_geisha.cpp +++ b/engines/gob/inter_geisha.cpp @@ -29,6 +29,7 @@ #include "gob/resources.h" #include "gob/game.h" #include "gob/draw.h" +#include "gob/video.h" #include "gob/sound/sound.h" #include "gob/sound/sounddesc.h" @@ -58,6 +59,8 @@ void Inter_Geisha::setupOpcodesFunc() { OPCODEGOB(2, oGeisha_loadTitleMusic); OPCODEGOB(3, oGeisha_playMusic); OPCODEGOB(4, oGeisha_stopMusic); + OPCODEGOB(6, oGeisha_caress1); + OPCODEGOB(7, oGeisha_caress2); } void Inter_Geisha::setupOpcodesGob() { @@ -152,4 +155,14 @@ void Inter_Geisha::oGeisha_stopMusic(OpGobParams ¶ms) { _vm->_sound->adlibUnload(); } +void Inter_Geisha::oGeisha_caress1(OpGobParams ¶ms) { + if (_vm->_draw->_spritesArray[0]) + _vm->_video->drawPackedSprite("hp1.cmp", *_vm->_draw->_spritesArray[0]); +} + +void Inter_Geisha::oGeisha_caress2(OpGobParams ¶ms) { + if (_vm->_draw->_spritesArray[1]) + _vm->_video->drawPackedSprite("hpsc1.cmp", *_vm->_draw->_spritesArray[1]); +} + } // End of namespace Gob -- cgit v1.2.3