[Scummvm-git-logs] scummvm master -> b930b4a74f8d2c8ae87a49e4e5c0e3cfd234762c
sev-
sev at scummvm.org
Sun Dec 11 18:36:32 CET 2016
This automated email contains information about 5 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
fad292cf43 FULLPIPE: Fix crash at the end of Russian demo
a95be40dcd FULLPIPE: Properly restart Russian demo
8f4a662b1d FULLPIPE: Simplify demo check in the engine
b6bc2e0b95 FULLPIPE: Implement demo-specific help screen
b930b4a74f FULLPIPE: Implement Russian demo differences
Commit: fad292cf437aa2bf578148ad6a73d148a9036bdd
https://github.com/scummvm/scummvm/commit/fad292cf437aa2bf578148ad6a73d148a9036bdd
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-12-11T18:36:08+01:00
Commit Message:
FULLPIPE: Fix crash at the end of Russian demo
Changed paths:
engines/fullpipe/scenes/sceneIntroDemo.cpp
diff --git a/engines/fullpipe/scenes/sceneIntroDemo.cpp b/engines/fullpipe/scenes/sceneIntroDemo.cpp
index a4e18ce..ea3c469 100644
--- a/engines/fullpipe/scenes/sceneIntroDemo.cpp
+++ b/engines/fullpipe/scenes/sceneIntroDemo.cpp
@@ -81,25 +81,13 @@ int sceneHandlerIntroDemo(ExCommand *ex) {
return 0;
case 33:
- // fall through
+ g_fp->startSceneTrack();
break;
default:
return 0;
}
- if (g_vars->sceneIntro_needSleep) {
- if (!g_vars->sceneIntro_aniin1man->_movement && g_vars->sceneIntro_aniin1man->_statics->_staticsId == ST_IN1MAN_SLEEP)
- g_vars->sceneIntro_aniin1man->startAnim(MV_IN1MAN_SLEEP, 0, -1);
- } else if (g_vars->sceneIntro_needGetup && !g_vars->sceneIntro_aniin1man->_movement &&
- g_vars->sceneIntro_aniin1man->_statics->_staticsId == ST_IN1MAN_SLEEP) {
- g_vars->sceneIntro_needGetup = 0;
-
- chainQueue(QU_INTR_GETUPMAN, 0);
- }
-
- g_fp->startSceneTrack();
-
return 0;
}
Commit: a95be40dcd809f188750c81c710b087fe3cbc784
https://github.com/scummvm/scummvm/commit/a95be40dcd809f188750c81c710b087fe3cbc784
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-12-11T18:36:08+01:00
Commit Message:
FULLPIPE: Properly restart Russian demo
Changed paths:
engines/fullpipe/scenes/scene09.cpp
diff --git a/engines/fullpipe/scenes/scene09.cpp b/engines/fullpipe/scenes/scene09.cpp
index eb635f1..8699560 100644
--- a/engines/fullpipe/scenes/scene09.cpp
+++ b/engines/fullpipe/scenes/scene09.cpp
@@ -33,6 +33,7 @@
#include "fullpipe/interaction.h"
#include "fullpipe/behavior.h"
+#include "engines/advancedDetector.h"
namespace Fullpipe {
@@ -463,6 +464,13 @@ int sceneHandler09(ExCommand *cmd) {
sceneHandler09_showBall();
break;
+ case 367:
+ if (g_fp->getFeatures() & ADGF_DEMO && g_fp->getLanguage() == Common::RU_RUS) {
+ g_fp->_needRestart = true;
+ return 0;
+ }
+ break;
+
case 33:
{
int res = 0;
Commit: 8f4a662b1db79a8e9db70ae4e7f89325afdc409a
https://github.com/scummvm/scummvm/commit/8f4a662b1db79a8e9db70ae4e7f89325afdc409a
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-12-11T18:36:08+01:00
Commit Message:
FULLPIPE: Simplify demo check in the engine
Changed paths:
engines/fullpipe/detection.cpp
engines/fullpipe/fullpipe.cpp
engines/fullpipe/fullpipe.h
engines/fullpipe/scenes.cpp
engines/fullpipe/scenes/scene08.cpp
engines/fullpipe/scenes/scene09.cpp
engines/fullpipe/stateloader.cpp
diff --git a/engines/fullpipe/detection.cpp b/engines/fullpipe/detection.cpp
index ceda26a..8f4de11 100644
--- a/engines/fullpipe/detection.cpp
+++ b/engines/fullpipe/detection.cpp
@@ -35,6 +35,10 @@ uint32 FullpipeEngine::getFeatures() const {
return _gameDescription->flags;
}
+bool FullpipeEngine::isDemo() {
+ return _gameDescription->flags & ADGF_DEMO;
+}
+
Common::Language FullpipeEngine::getLanguage() const {
return _gameDescription->language;
}
diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp
index 162dff3..10c1744 100644
--- a/engines/fullpipe/fullpipe.cpp
+++ b/engines/fullpipe/fullpipe.cpp
@@ -271,6 +271,7 @@ Common::Error FullpipeEngine::loadGameState(int slot) {
else
return Common::kUnknownError;
}
+
Common::Error FullpipeEngine::saveGameState(int slot, const Common::String &description) {
if (_gameLoader->writeSavegame(_currentScene, getSavegameFile(slot)))
return Common::kNoError;
diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h
index f7ad9f7..b00da62 100644
--- a/engines/fullpipe/fullpipe.h
+++ b/engines/fullpipe/fullpipe.h
@@ -113,6 +113,7 @@ public:
// Detection related functions
const ADGameDescription *_gameDescription;
uint32 getFeatures() const;
+ bool isDemo();
Common::Language getLanguage() const;
Common::RandomSource *_rnd;
diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp
index c88705b..bb141d9 100644
--- a/engines/fullpipe/scenes.cpp
+++ b/engines/fullpipe/scenes.cpp
@@ -35,8 +35,6 @@
#include "fullpipe/scenes.h"
#include "fullpipe/interaction.h"
-#include "engines/advancedDetector.h"
-
namespace Fullpipe {
Vars::Vars() {
@@ -619,7 +617,7 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) {
sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_INTRO1");
scene->preloadMovements(sceneVar);
- if (!(g_fp->getFeatures() & ADGF_DEMO && g_fp->getLanguage() == Common::RU_RUS))
+ if (!(g_fp->isDemo() && g_fp->getLanguage() == Common::RU_RUS))
sceneIntro_initScene(scene);
else
sceneIntroDemo_initScene(scene);
@@ -628,7 +626,7 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) {
scene->initObjectCursors("SC_INTRO1");
setSceneMusicParameters(sceneVar);
- if (!(g_fp->getFeatures() & ADGF_DEMO && g_fp->getLanguage() == Common::RU_RUS)) {
+ if (!(g_fp->isDemo() && g_fp->getLanguage() == Common::RU_RUS)) {
addMessageHandler(sceneHandlerIntro, 2);
_updateCursorCallback = sceneIntro_updateCursor;
} else {
diff --git a/engines/fullpipe/scenes/scene08.cpp b/engines/fullpipe/scenes/scene08.cpp
index 0c8b68b..24b23c1 100644
--- a/engines/fullpipe/scenes/scene08.cpp
+++ b/engines/fullpipe/scenes/scene08.cpp
@@ -20,8 +20,6 @@
*
*/
-#include "engines/advancedDetector.h"
-
#include "fullpipe/fullpipe.h"
#include "fullpipe/objects.h"
@@ -412,7 +410,7 @@ void sceneHandler08_checkEndArcade() {
if (y < 80) {
sceneHandler08_finishArcade();
- if (g_fp->getFeatures() & ADGF_DEMO && g_fp->getLanguage() == Common::DE_DEU) {
+ if (g_fp->isDemo() && g_fp->getLanguage() == Common::DE_DEU) {
ModalDemo *demo = new ModalDemo;
demo->launch();
diff --git a/engines/fullpipe/scenes/scene09.cpp b/engines/fullpipe/scenes/scene09.cpp
index 8699560..169d06c 100644
--- a/engines/fullpipe/scenes/scene09.cpp
+++ b/engines/fullpipe/scenes/scene09.cpp
@@ -33,8 +33,6 @@
#include "fullpipe/interaction.h"
#include "fullpipe/behavior.h"
-#include "engines/advancedDetector.h"
-
namespace Fullpipe {
struct Hanger {
@@ -465,7 +463,7 @@ int sceneHandler09(ExCommand *cmd) {
break;
case 367:
- if (g_fp->getFeatures() & ADGF_DEMO && g_fp->getLanguage() == Common::RU_RUS) {
+ if (g_fp->isDemo() && g_fp->getLanguage() == Common::RU_RUS) {
g_fp->_needRestart = true;
return 0;
}
diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp
index 05305a4..b53291b 100644
--- a/engines/fullpipe/stateloader.cpp
+++ b/engines/fullpipe/stateloader.cpp
@@ -27,8 +27,6 @@
#include "common/list.h"
#include "common/memstream.h"
-#include "engines/advancedDetector.h"
-
#include "graphics/thumbnail.h"
#include "fullpipe/objects.h"
@@ -335,7 +333,7 @@ bool FullpipeEngine::loadGam(const char *fname, int scene) {
_gameLoader->loadScene(SC_INTRO1);
_gameLoader->gotoScene(SC_INTRO1, TrubaUp);
} else {
- if (g_fp->getFeatures() & ADGF_DEMO && g_fp->getLanguage() == Common::RU_RUS) {
+ if (g_fp->isDemo() && g_fp->getLanguage() == Common::RU_RUS) {
_gameLoader->loadScene(SC_9);
_gameLoader->gotoScene(SC_9, TrubaDown);
} else {
Commit: b6bc2e0b9510bdfe0ce9b52a1ef060139b4891da
https://github.com/scummvm/scummvm/commit/b6bc2e0b9510bdfe0ce9b52a1ef060139b4891da
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-12-11T18:36:08+01:00
Commit Message:
FULLPIPE: Implement demo-specific help screen
Changed paths:
engines/fullpipe/messagehandlers.cpp
engines/fullpipe/modal.cpp
diff --git a/engines/fullpipe/messagehandlers.cpp b/engines/fullpipe/messagehandlers.cpp
index 4aefa80..d69e8a9 100644
--- a/engines/fullpipe/messagehandlers.cpp
+++ b/engines/fullpipe/messagehandlers.cpp
@@ -192,7 +192,7 @@ int global_messageHandler1(ExCommand *cmd) {
g_fp->openMap();
cmd->_messageKind = 0;
break;
- case 'p':
+ case Common::KEYCODE_F1:
if (g_fp->_flgCanOpenMap)
g_fp->openHelp();
cmd->_messageKind = 0;
diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp
index 1c21647..acb834d 100644
--- a/engines/fullpipe/modal.cpp
+++ b/engines/fullpipe/modal.cpp
@@ -1780,7 +1780,10 @@ void ModalHelp::launch() {
_mainMenuScene = g_fp->accessScene(SC_MAINMENU);
if (_mainMenuScene) {
- _bg = _mainMenuScene->getPictureObjectById(PIC_HLP_BGR, 0)->_picture;
+ if (g_fp->isDemo() && g_fp->getLanguage() == Common::RU_RUS)
+ _bg = _mainMenuScene->getPictureObjectById(364, 0)->_picture;
+ else
+ _bg = _mainMenuScene->getPictureObjectById(PIC_HLP_BGR, 0)->_picture;
_isRunning = 1;
}
}
Commit: b930b4a74f8d2c8ae87a49e4e5c0e3cfd234762c
https://github.com/scummvm/scummvm/commit/b930b4a74f8d2c8ae87a49e4e5c0e3cfd234762c
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-12-11T18:36:08+01:00
Commit Message:
FULLPIPE: Implement Russian demo differences
Changed paths:
engines/fullpipe/init.cpp
engines/fullpipe/messagehandlers.cpp
engines/fullpipe/modal.cpp
engines/fullpipe/modal.h
engines/fullpipe/objectnames.h
engines/fullpipe/stateloader.cpp
diff --git a/engines/fullpipe/init.cpp b/engines/fullpipe/init.cpp
index 9602803..db95cd8 100644
--- a/engines/fullpipe/init.cpp
+++ b/engines/fullpipe/init.cpp
@@ -57,7 +57,10 @@ void FullpipeEngine::initObjectStates() {
setObjectState(sO_FriesPit, getObjectEnumState(sO_FriesPit, sO_WithApple));
setObjectState(sO_Jug, getObjectEnumState(sO_Jug, sO_Blocked));
setObjectState(sO_RightStairs_9, getObjectEnumState(sO_RightStairs_9, sO_IsClosed));
- setObjectState(sO_Pipe_9, getObjectEnumState(sO_Pipe_9, sO_WithJug));
+ if (isDemo() && getLanguage() == Common::RU_RUS)
+ setObjectState(sO_Pipe_9, getObjectEnumState(sO_Pipe_9, sO_WithoutJug));
+ else
+ setObjectState(sO_Pipe_9, getObjectEnumState(sO_Pipe_9, sO_WithJug));
setObjectState(sO_Inflater, getObjectEnumState(sO_Inflater, sO_WithGum));
setObjectState(sO_Swingie, getObjectEnumState(sO_Swingie, sO_IsSwinging));
setObjectState(sO_DudeHasJumped, getObjectEnumState(sO_DudeHasJumped, sO_No));
diff --git a/engines/fullpipe/messagehandlers.cpp b/engines/fullpipe/messagehandlers.cpp
index d69e8a9..f53a705 100644
--- a/engines/fullpipe/messagehandlers.cpp
+++ b/engines/fullpipe/messagehandlers.cpp
@@ -188,6 +188,10 @@ int global_messageHandler1(ExCommand *cmd) {
}
break;
case '\t':
+ // Demo has no map
+ if (g_fp->isDemo() && g_fp->getLanguage() == Common::RU_RUS)
+ break;
+
if (g_fp->_flgCanOpenMap)
g_fp->openMap();
cmd->_messageKind = 0;
diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp
index acb834d..a20d6fc 100644
--- a/engines/fullpipe/modal.cpp
+++ b/engines/fullpipe/modal.cpp
@@ -1803,6 +1803,28 @@ ModalQuery::~ModalQuery() {
}
bool ModalQuery::create(Scene *sc, Scene *bgScene, int id) {
+ if (g_fp->isDemo() && g_fp->getLanguage() == Common::RU_RUS) {
+ _bg = sc->getPictureObjectById(386, 0);
+
+ if (!_bg)
+ return false;
+
+ _okBtn = sc->getPictureObjectById(392, 0);
+
+ if (!_okBtn)
+ return false;
+
+ _cancelBtn = sc->getPictureObjectById(396, 0);
+
+ if (!_cancelBtn)
+ return 0;
+
+ _queryResult = -1;
+ _bgScene = bgScene;
+
+ return true;
+ }
+
if (id == PIC_MEX_BGR) {
_bg = sc->getPictureObjectById(PIC_MEX_BGR, 0);
@@ -1817,7 +1839,7 @@ bool ModalQuery::create(Scene *sc, Scene *bgScene, int id) {
_cancelBtn = sc->getPictureObjectById(PIC_MEX_CANCEL, 0);
if (!_cancelBtn)
- return 0;
+ return false;
} else {
if (id != PIC_MOV_BGR)
return false;
@@ -1892,6 +1914,18 @@ bool ModalQuery::init(int counterdiff) {
if (_queryResult == -1) {
return true;
} else {
+ if (g_fp->isDemo() && g_fp->getLanguage() == Common::RU_RUS) {
+ if (!_queryResult)
+ return false;
+
+ ModalDemo *demo = new ModalDemo;
+ demo->launch();
+
+ g_fp->_modalObject = demo;
+
+ return true;
+ }
+
if (_bg->_id == PIC_MEX_BGR) {
_cancelBtn->_flags &= 0xFFFB;
_okBtn->_flags &= 0xFFFB;
@@ -2268,12 +2302,21 @@ ModalDemo::ModalDemo() {
_bg = 0;
_button = 0;
_text = 0;
- _clickedQuit = -1;
- _countdown = 1000;
+
+ if (g_fp->getLanguage() == Common::RU_RUS) {
+ _clickedQuit = 0;
+ _countdown = -10;
+ } else {
+ _clickedQuit = -1;
+ _countdown = 1000;
+ }
+ _scene = 0;
}
ModalDemo::~ModalDemo() {
- _bg->_flags &= 0xFFFB;
+ if (_bg)
+ _bg->_flags &= 0xFFFB;
+
_button->_flags &= 0xFFFB;
_text->_flags &= 0xFFFB;
}
@@ -2281,6 +2324,24 @@ ModalDemo::~ModalDemo() {
bool ModalDemo::launch() {
Scene *sc = g_fp->accessScene(SC_MAINMENU);
+ if (g_fp->getLanguage() == Common::RU_RUS) {
+ _scene = sc;
+
+ for (uint i = 1; i < sc->_picObjList.size(); i++) {
+ if (((PictureObject *)sc->_picObjList[i])->_id == 399)
+ sc->_picObjList[i]->_flags |= 4;
+ else
+ sc->_picObjList[i]->_flags &= 0xFFFB;
+ }
+
+ _button = sc->getPictureObjectById(443, 0);
+ _text = sc->getPictureObjectById(402, 0);
+
+ _countdown = -10;
+
+ return true;
+ }
+
_bg = sc->getPictureObjectById(PIC_POST_BGR, 0);
if (!_bg)
@@ -2304,6 +2365,9 @@ bool ModalDemo::launch() {
}
bool ModalDemo::init(int counterDiff) {
+ if (g_fp->getLanguage() == Common::RU_RUS)
+ return init2(counterDiff);
+
g_fp->_cursorId = PIC_CSR_DEFAULT;
if (_button->isPointInside(g_fp->_mouseScreenPos.x, g_fp->_mouseScreenPos.y)) {
@@ -2335,7 +2399,46 @@ bool ModalDemo::init(int counterDiff) {
return false;
}
+bool ModalDemo::init2(int counterDiff) {
+ if (_clickedQuit) {
+ // open URL
+ // http://pipestudio.ru/fullpipe/
+
+ g_fp->_gameContinue = false;
+
+ return false;
+ }
+
+ if (_countdown > 0) {
+ _countdown--;
+ } else {
+ _text->_flags ^= 4;
+ _countdown = 24;
+ }
+
+ if (_button->isPointInside(g_fp->_mouseScreenPos.x, g_fp->_mouseScreenPos.y)) {
+ _button->_flags |= 4;
+
+ g_fp->_cursorId = PIC_CSR_ITN;
+ } else {
+ _button->_flags &= 0xFFFB;
+
+ g_fp->_cursorId = PIC_CSR_DEFAULT;
+ }
+
+ return true;
+}
+
void ModalDemo::update() {
+ if (g_fp->getLanguage() == Common::RU_RUS) {
+ if (_countdown == -10)
+ g_fp->sceneFade(_scene, true);
+
+ _scene->draw();
+
+ return;
+ }
+
_bg->draw();
if (_button->_flags & 4)
@@ -2352,7 +2455,7 @@ bool ModalDemo::handleMessage(ExCommand *cmd) {
if (cmd->_messageNum == 29) {
if (_button->isPointInside(g_fp->_mouseScreenPos.x, g_fp->_mouseScreenPos.y))
_clickedQuit = 1;
- } else if (cmd->_messageNum == 36 && cmd->_param == 27) {
+ } else if (cmd->_messageNum == 36 && (cmd->_param == 27 || g_fp->getLanguage() == Common::RU_RUS)) {
_clickedQuit = 1;
}
@@ -2370,6 +2473,17 @@ void FullpipeEngine::openHelp() {
}
void FullpipeEngine::openMainMenu() {
+ if (isDemo() && getLanguage() == Common::RU_RUS) {
+ ModalQuery *q = new ModalQuery;
+
+ Scene *sc = accessScene(SC_MAINMENU);
+
+ q->create(sc, 0, 0);
+
+ g_fp->_modalObject = q;
+
+ return;
+ }
ModalMainMenu *menu = new ModalMainMenu;
menu->_parentObj = g_fp->_modalObject;
diff --git a/engines/fullpipe/modal.h b/engines/fullpipe/modal.h
index 68ebef2..ba88808 100644
--- a/engines/fullpipe/modal.h
+++ b/engines/fullpipe/modal.h
@@ -326,6 +326,7 @@ class ModalDemo : public BaseModalObject {
PictureObject *_text;
int _clickedQuit;
int _countdown;
+ Scene *_scene;
public:
ModalDemo();
@@ -336,6 +337,7 @@ class ModalDemo : public BaseModalObject {
virtual bool pollEvent() { return true; }
virtual bool handleMessage(ExCommand *message);
virtual bool init(int counterdiff);
+ bool init2(int counterdiff);
virtual void update();
virtual void saveload() {}
};
diff --git a/engines/fullpipe/objectnames.h b/engines/fullpipe/objectnames.h
index 0baf83b..7af82ff 100644
--- a/engines/fullpipe/objectnames.h
+++ b/engines/fullpipe/objectnames.h
@@ -32,6 +32,7 @@ namespace Fullpipe {
#define sO_Pool "\xc1\xe0\xf1\xf1\xe5\xe9\xed" // "Бассейн"
#define sO_TummyTrampie "\xc1\xe0\xf2\xf3\xf2\xe0" // "Батута"
#define sO_WithoutBoot "\xc1\xe5\xe7 \xe1\xee\xf2\xe8\xed\xea\xe0" // "Без ботинка"
+#define sO_WithoutJug "\xc1\xe5\xe7 \xe3\xee\xf0\xf8\xea\xe0" // "Без горшка"
#define sO_WithoutJugs "\xc1\xe5\xe7 \xe3\xee\xf0\xf8\xea\xee\xe2" // "Без горшков"
#define sO_WithoutCarpet "\xc1\xe5\xe7 \xea\xee\xe2\xf0\xe8\xea\xe0" // "Без коврика"
#define sO_WithoutCoin "\xc1\xe5\xe7 \xec\xee\xed\xe5\xf2\xfb" // "Без монеты"
diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp
index b53291b..adc4fe3 100644
--- a/engines/fullpipe/stateloader.cpp
+++ b/engines/fullpipe/stateloader.cpp
@@ -288,8 +288,13 @@ bool FullpipeEngine::loadGam(const char *fname, int scene) {
addMessageHandlerByIndex(global_messageHandler1, 0, 4);
_inventory = getGameLoaderInventory();
- _inventory->setItemFlags(ANI_INV_MAP, 0x10003);
- _inventory->addItem(ANI_INV_MAP, 1);
+
+ if (isDemo() && getLanguage() == Common::RU_RUS) {
+ _inventory->addItem(ANI_INV_HAMMER, 1);
+ } else {
+ _inventory->setItemFlags(ANI_INV_MAP, 0x10003);
+ _inventory->addItem(ANI_INV_MAP, 1);
+ }
_inventory->rebuildItemRects();
More information about the Scummvm-git-logs
mailing list