mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-09 11:20:56 +00:00
HYPNO: refactored some code and fixed credits in wet demo
This commit is contained in:
parent
2748b3fbac
commit
2b44320ce5
@ -68,29 +68,11 @@ void HypnoEngine::runMenu(Hotspots *hs) {
|
||||
// runMice(h, (Mice*) action);
|
||||
}
|
||||
|
||||
Graphics::Surface *menu = nullptr;
|
||||
bool transparent = false;
|
||||
if (_conversation.empty()) {
|
||||
if (h->flags[0] == "HINTS" || h->flags[1] == "HINTS" || h->flags[2] == "HINTS") {
|
||||
menu = decodeFrame("int_main/hint1.smk", 0);
|
||||
} else if (h->flags[0] == "AUTO_BUTTONS" || h->flags[0] == "SINGLE_RUN") {
|
||||
if (isDemo()) {
|
||||
if (_currentLevel != "sixdemo/mis/demo.mis" && _currentLevel != "sixdemo/mis/order.mis") {
|
||||
menu = decodeFrame("int_main/resume.smk", 0);
|
||||
transparent = true;
|
||||
}
|
||||
} else {
|
||||
menu = decodeFrame("int_main/menu.smk", 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (menu) {
|
||||
h->rect = Common::Rect(0, 0, menu->w, menu->h);
|
||||
drawImage(*menu, 0, 0, transparent);
|
||||
}
|
||||
}
|
||||
drawBackToMenu(h);
|
||||
}
|
||||
|
||||
void HypnoEngine::drawBackToMenu(Hotspot *h) {}
|
||||
|
||||
void HypnoEngine::runBackground(Background *a) {
|
||||
if (a->condition.size() > 0) {
|
||||
bool condition = _sceneState[a->condition];
|
||||
|
@ -142,6 +142,8 @@ void HypnoEngine::runArcade(ArcadeShooting *arc) {
|
||||
for (Frames::iterator it =_playerFrames.begin(); it != _playerFrames.end(); ++it) {
|
||||
if ((*it)->getPixel(0, 0) == 255)
|
||||
break;
|
||||
if ((*it)->getPixel(0, 0) == 252)
|
||||
break;
|
||||
|
||||
_playerFrameSep++;
|
||||
}
|
||||
|
@ -170,6 +170,7 @@ public:
|
||||
bool runGlobal(Global *a);
|
||||
void runTalk(Talk *a);
|
||||
void runChangeLevel(ChangeLevel *a);
|
||||
virtual void drawBackToMenu(Hotspot *h);
|
||||
|
||||
// Screen
|
||||
int _screenW, _screenH;
|
||||
@ -306,6 +307,7 @@ public:
|
||||
void drawHealth() override;
|
||||
bool checkArcadeLevelCompleted(MVideo &background) override;
|
||||
|
||||
void drawBackToMenu(Hotspot *h) override;
|
||||
void runCode(Code *code) override;
|
||||
Common::String findNextLevel(const Common::String &level) override;
|
||||
Common::String findNextLevel(const Transition *trans) override;
|
||||
|
@ -1077,6 +1077,29 @@ Common::Error SpiderEngine::saveGameStream(Common::WriteStream *stream, bool isA
|
||||
return Common::kNoError;
|
||||
}
|
||||
|
||||
void SpiderEngine::drawBackToMenu(Hotspot *h) {
|
||||
Graphics::Surface *menu = nullptr;
|
||||
bool transparent = false;
|
||||
if (_conversation.empty()) {
|
||||
if (h->flags[0] == "HINTS" || h->flags[1] == "HINTS" || h->flags[2] == "HINTS") {
|
||||
menu = decodeFrame("int_main/hint1.smk", 0);
|
||||
} else if (h->flags[0] == "AUTO_BUTTONS" || h->flags[0] == "SINGLE_RUN") {
|
||||
if (isDemo()) {
|
||||
if (_currentLevel != "sixdemo/mis/demo.mis" && _currentLevel != "sixdemo/mis/order.mis") {
|
||||
menu = decodeFrame("int_main/resume.smk", 0);
|
||||
transparent = true;
|
||||
}
|
||||
} else {
|
||||
menu = decodeFrame("int_main/menu.smk", 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (menu) {
|
||||
h->rect = Common::Rect(0, 0, menu->w, menu->h);
|
||||
drawImage(*menu, 0, 0, transparent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Common::String SpiderEngine::findNextLevel(const Common::String &level) {
|
||||
if (Common::matchString(level.c_str(), "c#") || Common::matchString(level.c_str(), "c##") || Common::matchString(level.c_str(), "c##?"))
|
||||
|
@ -232,8 +232,10 @@ void WetEngine::loadAssetsFullGame() {
|
||||
}
|
||||
|
||||
void WetEngine::showCredits() {
|
||||
MVideo video("c_misc/credits.smk", Common::Point(0, 0), false, false, false);
|
||||
runIntro(video);
|
||||
if (!isDemo() || _variant == "Demo") {
|
||||
MVideo video("c_misc/credits.smk", Common::Point(0, 0), false, false, false);
|
||||
runIntro(video);
|
||||
}
|
||||
}
|
||||
|
||||
void WetEngine::runCode(Code *code) {
|
||||
|
Loading…
Reference in New Issue
Block a user