diff options
author | Nicola Mettifogo | 2007-09-22 18:45:43 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2007-09-22 18:45:43 +0000 |
commit | d7ae40b65d9e6b8f30c071fb3327f39484eae898 (patch) | |
tree | a7239fb51168c22e83292e0ae0407298d77aff5d /engines/parallaction/saveload.cpp | |
parent | 7524244581bcec8d95da2fc65455704a31c3a517 (diff) | |
download | scummvm-rg350-d7ae40b65d9e6b8f30c071fb3327f39484eae898.tar.gz scummvm-rg350-d7ae40b65d9e6b8f30c071fb3327f39484eae898.tar.bz2 scummvm-rg350-d7ae40b65d9e6b8f30c071fb3327f39484eae898.zip |
Refactored a lot of Character-related code and put it into the Character class.
svn-id: r29025
Diffstat (limited to 'engines/parallaction/saveload.cpp')
-rw-r--r-- | engines/parallaction/saveload.cpp | 33 |
1 files changed, 5 insertions, 28 deletions
diff --git a/engines/parallaction/saveload.cpp b/engines/parallaction/saveload.cpp index c37feaa421..eb7d5c502a 100644 --- a/engines/parallaction/saveload.cpp +++ b/engines/parallaction/saveload.cpp @@ -92,7 +92,9 @@ void Parallaction_ns::doLoadGame(uint16 slot) { f->readLine(s, 29); - f->readLine(_characterName, 15); + f->readLine(s, 15); + _char.setName(s); + f->readLine(_location._name, 15); strcat(_location._name, "."); @@ -144,32 +146,11 @@ void Parallaction_ns::doLoadGame(uint16 slot) { delete f; - _engineFlags &= ~kEngineTransformedDonna; - if (!scumm_stricmp(_characterName, "donnatras")) { - _engineFlags |= kEngineTransformedDonna; - strcpy(_characterName, "donna"); - } - if (!scumm_stricmp(_characterName, "minidonnatras")) { - _engineFlags |= kEngineTransformedDonna; - strcpy(_characterName, _minidonnaName); - } - - if (IS_MINI_CHARACTER(_characterName)) { - strcpy(filename, _characterName+4); - } else { - strcpy(filename, _characterName); - } -// strcat(filename, ".tab"); -// freeTable(_objectsNames); -// initTable(filename, _objectsNames); - -// parseLocation("common"); - // force reload of character to solve inventory // bugs, but it's a good maneuver anyway strcpy(_characterName1, "null"); - strcat(_location._name, _characterName); + strcat(_location._name, _char.getName()); _engineFlags |= kEngineChangeLocation; return; @@ -201,11 +182,7 @@ void Parallaction_ns::doSaveGame(uint16 slot, const char* name) { f->writeString(s); f->writeString("\n"); - if (_engineFlags & kEngineTransformedDonna) { - sprintf(s, "%stras\n", _characterName); - } else { - sprintf(s, "%s\n", _characterName); - } + sprintf(s, "%s\n", _char.getFullName()); f->writeString(s); sprintf(s, "%s\n", _saveData1); |