[Scummvm-git-logs] scummvm master -> 265fc48d1590cdd503187c79dc254d65623c8d7b
sev-
sev at scummvm.org
Thu Aug 24 09:25:18 CEST 2017
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:
7cf83cab6a WAGE: Update status of The Phoenix game
265fc48d15 WAGE: Do something when player is not defined instead of crashes
Commit: 7cf83cab6a9879f9543ffabff59ca639231896bd
https://github.com/scummvm/scummvm/commit/7cf83cab6a9879f9543ffabff59ca639231896bd
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-08-24T09:06:24+02:00
Commit Message:
WAGE: Update status of The Phoenix game
Changed paths:
engines/wage/detection_tables.h
diff --git a/engines/wage/detection_tables.h b/engines/wage/detection_tables.h
index 4c29967..26df6cb 100644
--- a/engines/wage/detection_tables.h
+++ b/engines/wage/detection_tables.h
@@ -123,7 +123,7 @@ static const ADGameDescription gameDescriptions[] = {
// Polygons with byte 1
FANGAME("Periapt", "7e26a7827c694232624321a5a6844511", 406006),
FANGAME("Periapt", "bc36e40de279d5f0844577fe702d9f64", 406006), // alt version
- // Invalid rect in scene "Access Tube 1"
+ // Cannot push buttons
FANGAMEN("The Phoenix v1.2", "The Phoenix", "fee9f1de7ad9096d084461d6066192b1", 431640),
FANGAME("The Phoenix", "bd6dabf7a19d2ab7902498a8513f8c71", 431643),
FANGAME("Psychotic!", "d6229615b71b189f6ef71399a0856cd2", 367309),
Commit: 265fc48d1590cdd503187c79dc254d65623c8d7b
https://github.com/scummvm/scummvm/commit/265fc48d1590cdd503187c79dc254d65623c8d7b
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-08-24T09:25:25+02:00
Commit Message:
WAGE: Do something when player is not defined instead of crashes
Changed paths:
engines/wage/gui.cpp
engines/wage/world.cpp
diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp
index 7d1014b..9c76418 100644
--- a/engines/wage/gui.cpp
+++ b/engines/wage/gui.cpp
@@ -209,6 +209,10 @@ void Gui::regenWeaponsMenu() {
_menu->clearSubMenu(_weaponsMenuId);
Chr *player = _engine->_world->_player;
+ if (!player) {
+ warning("regenWeaponsMenu: player is not defined");
+ return;
+ }
ObjArray *weapons = player->getWeapons(true);
bool empty = true;
diff --git a/engines/wage/world.cpp b/engines/wage/world.cpp
index df9fcaf..c0c802f 100644
--- a/engines/wage/world.cpp
+++ b/engines/wage/world.cpp
@@ -252,11 +252,25 @@ bool World::loadWorld(Common::MacResManager *resMan) {
Chr *chr = new Chr(resMan->getResName(MKTAG('A','C','H','R'), *iter), res);
chr->_resourceId = *iter;
addChr(chr);
- // TODO: What if there's more than one player character?
- if (chr->_playerCharacter)
+
+ if (chr->_playerCharacter) {
+ if (_player)
+ warning("loadWorld: Player is redefined");
+
_player = chr;
+ }
+ }
+
+ if (!_player) {
+ warning("loadWorld: Player is not defined");
+
+ if (_chrs.empty()) {
+ error("loadWorld: and I have no characters");
+ }
+ _player = _chrs[0];
}
+
// Load Sounds
resArray = resMan->getResIDArray(MKTAG('A','S','N','D'));
debug(3, "Loading %d sounds", resArray.size());
More information about the Scummvm-git-logs
mailing list