From 5328abe2f0b1afa33c360b098865de491410b677 Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Sat, 19 Jun 2010 04:51:31 +0000 Subject: Cleanup. Got rid of the legacy "location.part" string handling in BRA. svn-id: r50042 --- engines/parallaction/parallaction_br.cpp | 19 ++++--------------- 1 file 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); -- cgit v1.2.3