[Scummvm-git-logs] scummvm master -> 7bf340427ccb81455f345da2752ff613bae62878
antoniou79
a.antoniou79 at gmail.com
Wed Feb 5 22:18:30 UTC 2020
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:
1b584ebf32 BLADERUNNER: Fix "Type a name" text in KIA save screen
7bf340427c BLADERUNNER: Extend max saved game's name length to 41 chars
Commit: 1b584ebf320ebd046cbf7b0cd3ea202e68dc07f0
https://github.com/scummvm/scummvm/commit/1b584ebf320ebd046cbf7b0cd3ea202e68dc07f0
Author: Thanasis Antoniou (a.antoniou79 at gmail.com)
Date: 2020-02-06T00:10:57+02:00
Commit Message:
BLADERUNNER: Fix "Type a name" text in KIA save screen
Changed paths:
engines/bladerunner/ui/kia_section_save.cpp
diff --git a/engines/bladerunner/ui/kia_section_save.cpp b/engines/bladerunner/ui/kia_section_save.cpp
index a0a4526..264cd56 100644
--- a/engines/bladerunner/ui/kia_section_save.cpp
+++ b/engines/bladerunner/ui/kia_section_save.cpp
@@ -154,7 +154,7 @@ void KIASectionSave::draw(Graphics::Surface &surface) {
// Original game shows warnings/error here, but we don't have any
- const char *textTypeName = _vm->_textOptions->getText(24); // Type a name ...
+ const char *textTypeName = _vm->_textOptions->getText(25); // Type a name ...
int textTypeNameWidth = _vm->_mainFont->getStringWidth(textTypeName);
_vm->_mainFont->drawString(&surface, textTypeName, 308 - textTypeNameWidth / 2, 352, surface.w, surface.format.RGBToColor(240, 232, 192));
Commit: 7bf340427ccb81455f345da2752ff613bae62878
https://github.com/scummvm/scummvm/commit/7bf340427ccb81455f345da2752ff613bae62878
Author: Thanasis Antoniou (a.antoniou79 at gmail.com)
Date: 2020-02-06T00:14:53+02:00
Commit Message:
BLADERUNNER: Extend max saved game's name length to 41 chars
41 is the original's name size and resolves truncated autosave names in localized versions
Fixes bug #11340
Saves version is increased to "3" (in savefile.h) now, so only new versions of the engine will be able to open the save files with the larger field for the saved game's name
Changed paths:
engines/bladerunner/savefile.cpp
engines/bladerunner/savefile.h
engines/bladerunner/ui/kia_section_save.cpp
diff --git a/engines/bladerunner/savefile.cpp b/engines/bladerunner/savefile.cpp
index 7a0739b..c994d95 100644
--- a/engines/bladerunner/savefile.cpp
+++ b/engines/bladerunner/savefile.cpp
@@ -111,7 +111,13 @@ bool SaveFileManager::readHeader(Common::SeekableReadStream &in, SaveFileHeader
return false;
}
- header._name = s.readStringSz(kNameLength);
+ if (header._version < 3) {
+ // this includes versions 0 and 1 here (even though they are non-existent)
+ header._name = s.readStringSz(kNameLengthV2);
+ } else {
+ // Version 3
+ header._name = s.readStringSz(kNameLength);
+ }
header._year = s.readUint16LE();
header._month = s.readUint16LE();
diff --git a/engines/bladerunner/savefile.h b/engines/bladerunner/savefile.h
index 2948ce6..55ede83 100644
--- a/engines/bladerunner/savefile.h
+++ b/engines/bladerunner/savefile.h
@@ -60,10 +60,15 @@ struct SaveFileHeader {
class SaveFileManager {
private:
static const uint32 kTag = MKTAG('B', 'R', 'S', 'V');
- static const uint32 kVersion = 2;
+ static const uint32 kVersion = 3; // kVersion: 3 as of Feb 5th 2020 (UTC) - ScummVM development version 2.2.0git
public:
- static const uint32 kNameLength = 32;
+ // kVersion
+ // ----------
+ // 2:: max of 32 characters for the saved game name
+ // 3:: max of 41 characters for the saved game name (this matches the original game's setting)
+ static const uint32 kNameLengthV2 = 32;
+ static const uint32 kNameLength = 41;
static const uint32 kThumbnailSize = 9600; // 80x60x16bpp
static SaveStateList list(const Common::String &target);
diff --git a/engines/bladerunner/ui/kia_section_save.cpp b/engines/bladerunner/ui/kia_section_save.cpp
index 264cd56..c632091 100644
--- a/engines/bladerunner/ui/kia_section_save.cpp
+++ b/engines/bladerunner/ui/kia_section_save.cpp
@@ -49,7 +49,7 @@ KIASectionSave::KIASectionSave(BladeRunnerEngine *vm) : KIASectionBase(vm) {
_scrollBox = new UIScrollBox(_vm, scrollBoxCallback, this, 1024, 0, true, Common::Rect(155, 158, 461, 346), Common::Rect(506, 160, 506, 350));
_uiContainer->add(_scrollBox);
- _inputBox = new UIInputBox(_vm, inputBoxCallback, this, Common::Rect(155, 367, 461, 376), SaveFileManager::kNameLength, ""); // original game had limit 41 characters
+ _inputBox = new UIInputBox(_vm, inputBoxCallback, this, Common::Rect(155, 367, 461, 376), SaveFileManager::kNameLength, ""); // original game has limit 41 characters
_uiContainer->add(_inputBox);
_inputBox->hide();
More information about the Scummvm-git-logs
mailing list