[Scummvm-git-logs] scummvm master -> f42300b6f5f98bc7aa12875fa777c745ec66a3b1
phcoder
phcoder at gmail.com
Sun Oct 25 02:17:54 UTC 2020
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:
b4fd8cb16a HADESCH: handle gracefully successive changes of rooms.
60c623e316 HADESCH: Rename Shade to StyxShade
3096ff991a HADESCH: fix double-free when handling corrupt video files
4e53ae7fed PLUMBERS: don't use memset when initing
f42300b6f5 PLUMBERS: Add 16bit dependency
Commit: b4fd8cb16a1b09b7230f2c549ac773a07aac1c95
https://github.com/scummvm/scummvm/commit/b4fd8cb16a1b09b7230f2c549ac773a07aac1c95
Author: Vladimir Serbinenko (phcoder at google.com)
Date: 2020-10-25T03:10:31+01:00
Commit Message:
HADESCH: handle gracefully successive changes of rooms.
This can happen e.g. in video-only scene if video file is unreadable.
Changed paths:
engines/hadesch/hadesch.cpp
engines/hadesch/hadesch.h
diff --git a/engines/hadesch/hadesch.cpp b/engines/hadesch/hadesch.cpp
index 55bde4f072..b33e5013a8 100644
--- a/engines/hadesch/hadesch.cpp
+++ b/engines/hadesch/hadesch.cpp
@@ -517,7 +517,8 @@ Common::Error HadeschEngine::run() {
_isInOptions = false;
debug("HadeschEngine: moving to main loop");
- _nextRoom = kIntroRoom;
+ _nextRoom.clear();
+ _nextRoom.push_back(kIntroRoom);
while (true) {
if (_isRestoring) {
@@ -525,9 +526,8 @@ Common::Error HadeschEngine::run() {
_isRestoring = false;
CursorMan.showMouse(true);
CursorMan.replaceCursor(_cursors[3]);
- } else if (_nextRoom != kInvalidRoom) {
- moveToRoomReal(_nextRoom);
- _nextRoom = kInvalidRoom;
+ } else if (!_nextRoom.empty()) {
+ moveToRoomReal(_nextRoom.remove_at(0));
CursorMan.showMouse(true);
CursorMan.replaceCursor(_cursors[3]);
}
diff --git a/engines/hadesch/hadesch.h b/engines/hadesch/hadesch.h
index 7892c17a26..2d9f69a47c 100644
--- a/engines/hadesch/hadesch.h
+++ b/engines/hadesch/hadesch.h
@@ -125,7 +125,7 @@ public:
Common::SharedPtr<VideoRoom> getVideoRoom();
void moveToRoom(RoomId id) {
- _nextRoom = id;
+ _nextRoom.push_back(id);
_heroBelt->clearHold();
}
@@ -216,7 +216,7 @@ private:
Common::Point _mousePos;
Persistent _persistent;
- RoomId _nextRoom;
+ Common::Array<RoomId> _nextRoom;
bool _isRestoring;
bool _isQuitting;
Commit: 60c623e31682d80f5e6d5f2f2f796e9c2e6f6cc7
https://github.com/scummvm/scummvm/commit/60c623e31682d80f5e6d5f2f2f796e9c2e6f6cc7
Author: Vladimir Serbinenko (phcoder at google.com)
Date: 2020-10-25T03:11:48+01:00
Commit Message:
HADESCH: Rename Shade to StyxShade
We have 2 Shade's: in ferry.cpp and in riverstyx.cpp. Rename one of
them to prevent possible collisions.
Changed paths:
engines/hadesch/rooms/riverstyx.cpp
diff --git a/engines/hadesch/rooms/riverstyx.cpp b/engines/hadesch/rooms/riverstyx.cpp
index 76e5c674af..f0469139ee 100644
--- a/engines/hadesch/rooms/riverstyx.cpp
+++ b/engines/hadesch/rooms/riverstyx.cpp
@@ -35,8 +35,8 @@ enum {
kDeadManEndAnim = 28014
};
-struct ShadeInternal {
- ShadeInternal(Common::String name) {
+struct StyxShadeInternal {
+ StyxShadeInternal(Common::String name) {
_name = name;
_counter = 0;
}
@@ -53,36 +53,36 @@ struct ShadeInternal {
Common::Array<Common::String> _sounds;
};
-class ShadeEndSound : public EventHandler {
+class StyxShadeEndSound : public EventHandler {
public:
- ShadeEndSound(Common::SharedPtr<ShadeInternal> internal) {
+ StyxShadeEndSound(Common::SharedPtr<StyxShadeInternal> internal) {
_internal = internal;
}
void operator()() {
_internal->resume();
}
private:
- Common::SharedPtr<ShadeInternal> _internal;
+ Common::SharedPtr<StyxShadeInternal> _internal;
};
// TODO: transparency and shimmering
-class Shade {
+class StyxShade {
public:
- Shade(const Common::String &name, int zVal, int minInt, int maxInt,
- const Common::String &ambient) {
+ StyxShade(const Common::String &name, int zVal, int minInt, int maxInt,
+ const Common::String &ambient) {
_internal = makeInternal(name, zVal, minInt, maxInt, ambient);
}
- Shade(const Common::String &name, int zVal, int minInt, int maxInt) {
+ StyxShade(const Common::String &name, int zVal, int minInt, int maxInt) {
_internal = makeInternal(name, zVal, minInt, maxInt, name + " ambient");
}
- Shade() {
+ StyxShade() {
}
- static Common::SharedPtr<ShadeInternal> makeInternal(const Common::String &name, int zVal, int minInt, int maxInt,
+ static Common::SharedPtr<StyxShadeInternal> makeInternal(const Common::String &name, int zVal, int minInt, int maxInt,
const Common::String &ambient) {
- Common::SharedPtr<ShadeInternal> ret(new ShadeInternal(name));
+ Common::SharedPtr<StyxShadeInternal> ret(new StyxShadeInternal(name));
ret->_ambient = AmbientAnim(ambient, ambient + " sound", zVal, minInt, maxInt,
AmbientAnim::KEEP_LOOP, Common::Point(0, 0), AmbientAnim::PAN_ANY);
return ret;
@@ -100,7 +100,7 @@ public:
return;
_internal->_ambient.pause();
room->playVideo(_internal->_sounds[_internal->_counter % _internal->_sounds.size()],
- 800, EventHandlerWrapper(Common::SharedPtr<EventHandler>(new ShadeEndSound(_internal))));
+ 800, EventHandlerWrapper(Common::SharedPtr<EventHandler>(new StyxShadeEndSound(_internal))));
_internal->_counter++;
room->disableMouse();
}
@@ -109,7 +109,7 @@ public:
_internal->_sounds.push_back(snd);
}
private:
- Common::SharedPtr<ShadeInternal> _internal;
+ Common::SharedPtr<StyxShadeInternal> _internal;
};
class RiverStyxHandler : public Handler {
@@ -300,14 +300,14 @@ public:
}
room->playSoundLoop(quest == kRescuePhilQuest ? "V4010eB0" : "V4010eA0");
- _axHead = Shade("ax head", 800, 5000, 10000);
+ _axHead = StyxShade("ax head", 800, 5000, 10000);
_axHead.addSound("ax head click sound 1");
_axHead.addSound("ax head click sound 2");
_axHead.addSound("ax head click sound 3");
_axHead.start();
if (quest == kRescuePhilQuest || quest == kCreteQuest) {
- _pillar = Shade("pillar", 550, 8000, 12000);
+ _pillar = StyxShade("pillar", 550, 8000, 12000);
if (quest == kRescuePhilQuest)
_pillar.addSound("pillar quest speech");
_pillar.addSound("pillar click sound");
@@ -315,7 +315,7 @@ public:
}
if (quest == kCreteQuest || quest == kTroyQuest || quest == kMedusaQuest) {
- _dog = Shade("dog", 600, 5000, 10000);
+ _dog = StyxShade("dog", 600, 5000, 10000);
if (quest == kCreteQuest)
_dog.addSound("dog quest speech");
_dog.addSound("dog click sound 1");
@@ -324,7 +324,7 @@ public:
}
if (quest == kCreteQuest || quest == kTroyQuest) {
- _greekSoldier = Shade("greek soldier", 550, 5000, 10000);
+ _greekSoldier = StyxShade("greek soldier", 550, 5000, 10000);
if (quest == kTroyQuest)
_greekSoldier.addSound("greek soldier quest speech");
_greekSoldier.addSound("greek soldier click sound");
@@ -332,24 +332,24 @@ public:
}
if (quest == kTroyQuest) {
- _trojanSoldier = Shade("trojan soldier", 650, 5000, 10000);
+ _trojanSoldier = StyxShade("trojan soldier", 650, 5000, 10000);
_trojanSoldier.addSound("trojan soldier quest speech");
_trojanSoldier.start();
}
if (quest == kMedusaQuest) {
- _statue = Shade("statue", 700, 5000, 10000);
+ _statue = StyxShade("statue", 700, 5000, 10000);
_statue.addSound("statue quest speech");
_statue.start();
- _drownedMan = Shade("drowned man", 550, 5000, 10000);
+ _drownedMan = StyxShade("drowned man", 550, 5000, 10000);
_drownedMan.addSound("drowned man click sound 1");
_drownedMan.addSound("drowned man click sound 2");
_drownedMan.start();
}
if (quest == kRescuePhilQuest) {
- _alchemist = Shade("alchemist", 750, 5000, 10000, "alchemist");
+ _alchemist = StyxShade("alchemist", 750, 5000, 10000, "alchemist");
if (!persistent->_styxAlchemistSaidIntro)
_alchemist.addSound("alchemist intro");
if (persistent->_hintsAreEnabled) {
@@ -419,14 +419,14 @@ private:
bool _cameraMovingUp;
int _cameraMovingStart;
- Shade _axHead;
- Shade _pillar;
- Shade _dog;
- Shade _drownedMan;
- Shade _statue;
- Shade _greekSoldier;
- Shade _trojanSoldier;
- Shade _alchemist;
+ StyxShade _axHead;
+ StyxShade _pillar;
+ StyxShade _dog;
+ StyxShade _drownedMan;
+ StyxShade _statue;
+ StyxShade _greekSoldier;
+ StyxShade _trojanSoldier;
+ StyxShade _alchemist;
};
Common::SharedPtr<Hadesch::Handler> makeRiverStyxHandler() {
Commit: 3096ff991aa0eb50752e86caa93857931c945c96
https://github.com/scummvm/scummvm/commit/3096ff991aa0eb50752e86caa93857931c945c96
Author: Vladimir Serbinenko (phcoder at google.com)
Date: 2020-10-25T03:12:54+01:00
Commit Message:
HADESCH: fix double-free when handling corrupt video files
Changed paths:
engines/hadesch/video.cpp
diff --git a/engines/hadesch/video.cpp b/engines/hadesch/video.cpp
index 4def3236ff..a079fe7649 100644
--- a/engines/hadesch/video.cpp
+++ b/engines/hadesch/video.cpp
@@ -748,7 +748,6 @@ void VideoRoom::playVideo(const Common::String &name, int zValue,
}
if (!file->open(_smkPath + "/" + mappedName + ".SMK") || !decoder->loadStream(file)) {
debug("Video file %s can't be opened", name.c_str());
- delete file;
g_vm->handleEvent(callbackEvent);
return;
}
Commit: 4e53ae7fedafb0d4959b533f930be8ee1ff6308d
https://github.com/scummvm/scummvm/commit/4e53ae7fedafb0d4959b533f930be8ee1ff6308d
Author: Vladimir Serbinenko (phcoder at google.com)
Date: 2020-10-25T03:14:25+01:00
Commit Message:
PLUMBERS: don't use memset when initing
memsetting over Common::String is a bad idea and creates a weird behaviour.
Changed paths:
engines/plumbers/plumbers.cpp
diff --git a/engines/plumbers/plumbers.cpp b/engines/plumbers/plumbers.cpp
index 1b1c7ce974..1af4d0abcb 100644
--- a/engines/plumbers/plumbers.cpp
+++ b/engines/plumbers/plumbers.cpp
@@ -659,8 +659,25 @@ void PlumbersGame::onTimer(void *arg) {
}
void PlumbersGame::initTables() {
- memset(_scenes, 0, sizeof(_scenes));
- memset(_bitmaps, 0, sizeof(_bitmaps));
+ for (uint i = 0; i < ARRAYSIZE(_scenes); i++) {
+ _scenes[i]._bitmapNum = 0;
+ _scenes[i]._startBitmap = 0;
+ _scenes[i]._decisionChoices = 0;
+ _scenes[i]._sceneName = "";
+ _scenes[i]._waveFilename = "";
+ _scenes[i]._decisionBitmap = "";
+ _scenes[i]._style = Scene::STYLE_PC;
+ for (uint j = 0; j < ARRAYSIZE(_scenes[i]._choices); j++) {
+ _scenes[i]._choices[j]._points = 0;
+ _scenes[i]._choices[j]._skipScene = 0;
+ _scenes[i]._choices[j]._region = Common::Rect(0, 0, 0, 0);
+ _scenes[i]._choices[j]._sceneName = "";
+ }
+ }
+ for (uint i = 0; i < ARRAYSIZE(_bitmaps); i++) {
+ _bitmaps[i]._duration = 0;
+ _bitmaps[i]._filename = "";
+ }
}
void PlumbersGame::readTablesPC(const Common::String &fileName) {
Commit: f42300b6f5f98bc7aa12875fa777c745ec66a3b1
https://github.com/scummvm/scummvm/commit/f42300b6f5f98bc7aa12875fa777c745ec66a3b1
Author: Vladimir Serbinenko (phcoder at google.com)
Date: 2020-10-25T03:15:52+01:00
Commit Message:
PLUMBERS: Add 16bit dependency
It's needed to handle 3DO variant of the game.
Changed paths:
engines/plumbers/configure.engine
diff --git a/engines/plumbers/configure.engine b/engines/plumbers/configure.engine
index 57c03fdc4d..7df809b57a 100644
--- a/engines/plumbers/configure.engine
+++ b/engines/plumbers/configure.engine
@@ -1,3 +1,3 @@
# This file is included from the main "configure" script
# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine plumbers "Plumbers Don't Wear Ties" yes "" "" "highres"
+add_engine plumbers "Plumbers Don't Wear Ties" yes "" "" "highres 16bit"
More information about the Scummvm-git-logs
mailing list