mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-03 09:23:37 +00:00
FULLPIPE: Implement Russian demo differences
This commit is contained in:
parent
b6bc2e0b95
commit
b930b4a74f
@ -57,6 +57,9 @@ 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));
|
||||
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));
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
if (g_fp->getLanguage() == Common::RU_RUS) {
|
||||
_clickedQuit = 0;
|
||||
_countdown = -10;
|
||||
} else {
|
||||
_clickedQuit = -1;
|
||||
_countdown = 1000;
|
||||
}
|
||||
_scene = 0;
|
||||
}
|
||||
|
||||
ModalDemo::~ModalDemo() {
|
||||
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;
|
||||
|
@ -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() {}
|
||||
};
|
||||
|
@ -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" // "Без монеты"
|
||||
|
@ -288,8 +288,13 @@ bool FullpipeEngine::loadGam(const char *fname, int scene) {
|
||||
addMessageHandlerByIndex(global_messageHandler1, 0, 4);
|
||||
|
||||
_inventory = getGameLoaderInventory();
|
||||
|
||||
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();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user