aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicola Mettifogo2010-06-19 04:51:31 +0000
committerNicola Mettifogo2010-06-19 04:51:31 +0000
commit5328abe2f0b1afa33c360b098865de491410b677 (patch)
tree97ea4dc773de47be5b5d0ddc3ca02c26f0e66df6
parent96d4ae0fcccbe6438c5829a4a679d94180407159 (diff)
downloadscummvm-rg350-5328abe2f0b1afa33c360b098865de491410b677.tar.gz
scummvm-rg350-5328abe2f0b1afa33c360b098865de491410b677.tar.bz2
scummvm-rg350-5328abe2f0b1afa33c360b098865de491410b677.zip
Cleanup.
Got rid of the legacy "location.part" string handling in BRA. svn-id: r50042
-rw-r--r--engines/parallaction/parallaction_br.cpp19
1 files changed, 4 insertions, 15 deletions
diff --git a/engines/parallaction/parallaction_br.cpp b/engines/parallaction/parallaction_br.cpp
index cd9b15381b..153ea1541d 100644
--- a/engines/parallaction/parallaction_br.cpp
+++ b/engines/parallaction/parallaction_br.cpp
@@ -275,11 +275,7 @@ void Parallaction_br::changeLocation() {
return;
}
- char location[200];
- strcpy(location, _newLocationName.c_str());
-
- char *partStr = strrchr(location, '.');
- if (partStr || _nextPart != -1) {
+ if (_nextPart != -1) {
cleanupGame();
// more cleanup needed for part changes (see also saveload)
@@ -287,14 +283,7 @@ void Parallaction_br::changeLocation() {
cleanInventory(true);
strcpy(_characterName1, "null");
- if (partStr) {
- int n = partStr - location;
- location[n] = '\0';
-
- _part = atoi(++partStr);
- } else {
- _part = _nextPart;
- }
+ _part = _nextPart;
if (getFeatures() & GF_DEMO) {
assert(_part == 1);
@@ -322,8 +311,8 @@ void Parallaction_br::changeLocation() {
freeLocation(false);
// load new location
- strcpy(_location._name, location);
- parseLocation(location);
+ strcpy(_location._name, _newLocationName.c_str());
+ parseLocation(_location._name);
if (_location._startPosition.x != -1000) {
_char._ani->setFoot(_location._startPosition);