[Scummvm-cvs-logs] scummvm master -> cdc86c6f67c62f2c9db05501f7e31cd257952566
DrMcCoy
drmccoy at drmccoy.de
Fri Aug 26 09:24:55 CEST 2011
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
8fd8c913af GOB: Implement oGeisha_caress1 and oGeisha_caress2
cdc86c6f67 GOB: Add oGeisha_checkData
Commit: 8fd8c913af7536781a8a59bb27006b3f54087aa8
https://github.com/scummvm/scummvm/commit/8fd8c913af7536781a8a59bb27006b3f54087aa8
Author: Sven Hesse (drmccoy at users.sourceforge.net)
Date: 2011-08-26T00:11:11-07:00
Commit Message:
GOB: Implement oGeisha_caress1 and oGeisha_caress2
Used in the Mastermind minigame in Chapter 2: Caress
Changed paths:
engines/gob/inter.h
engines/gob/inter_geisha.cpp
diff --git a/engines/gob/inter.h b/engines/gob/inter.h
index 7198ec9..f229478 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 3b8747e..3f79088 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
Commit: cdc86c6f67c62f2c9db05501f7e31cd257952566
https://github.com/scummvm/scummvm/commit/cdc86c6f67c62f2c9db05501f7e31cd257952566
Author: Sven Hesse (drmccoy at users.sourceforge.net)
Date: 2011-08-26T00:17:51-07:00
Commit Message:
GOB: Add oGeisha_checkData
Changed paths:
engines/gob/inter.h
engines/gob/inter_geisha.cpp
diff --git a/engines/gob/inter.h b/engines/gob/inter.h
index f229478..84180f4 100644
--- a/engines/gob/inter.h
+++ b/engines/gob/inter.h
@@ -347,6 +347,7 @@ protected:
void oGeisha_loadCursor(OpFuncParams ¶ms);
void oGeisha_goblinFunc(OpFuncParams ¶ms);
void oGeisha_loadSound(OpFuncParams ¶ms);
+ void oGeisha_checkData(OpFuncParams ¶ms);
void oGeisha_gamePenetration(OpGobParams ¶ms);
void oGeisha_gameDiving(OpGobParams ¶ms);
diff --git a/engines/gob/inter_geisha.cpp b/engines/gob/inter_geisha.cpp
index 3f79088..658f234 100644
--- a/engines/gob/inter_geisha.cpp
+++ b/engines/gob/inter_geisha.cpp
@@ -53,6 +53,7 @@ void Inter_Geisha::setupOpcodesFunc() {
OPCODEFUNC(0x03, oGeisha_loadCursor);
OPCODEFUNC(0x25, oGeisha_goblinFunc);
OPCODEFUNC(0x3A, oGeisha_loadSound);
+ OPCODEFUNC(0x3F, oGeisha_checkData);
OPCODEGOB(0, oGeisha_gamePenetration);
OPCODEGOB(1, oGeisha_gameDiving);
@@ -112,6 +113,23 @@ int16 Inter_Geisha::loadSound(int16 slot) {
return 0;
}
+void Inter_Geisha::oGeisha_checkData(OpFuncParams ¶ms) {
+ const char *file = _vm->_game->_script->evalString();
+ int16 varOff = _vm->_game->_script->readVarIndex();
+
+ Common::String fileName(file);
+
+ fileName.toLowercase();
+ if (fileName.hasSuffix(".0ot"))
+ fileName.setChar('t', fileName.size() - 3);
+
+ if (!_vm->_dataIO->hasFile(fileName)) {
+ warning("File \"%s\" not found", fileName.c_str());
+ WRITE_VAR_OFFSET(varOff, (uint32) -1);
+ } else
+ WRITE_VAR_OFFSET(varOff, 50); // "handle" between 50 and 128 = in archive
+}
+
void Inter_Geisha::oGeisha_gamePenetration(OpGobParams ¶ms) {
uint16 var1 = _vm->_game->_script->readUint16();
uint16 var2 = _vm->_game->_script->readUint16();
More information about the Scummvm-git-logs
mailing list