[Scummvm-git-logs] scummvm master -> e8482d8c1d104ead3a00d1e1fcbbc5e501b5f103
dreammaster
paulfgilbert at gmail.com
Wed May 6 04:57:12 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:
f72927d5df ULTIMA4: Allow portal numbers in debugger goto command
e8482d8c1d ULTIMA4: Move fix for LB Abyss response to create_ultima
Commit: f72927d5df447b007bde6cfe3543bc0218214772
https://github.com/scummvm/scummvm/commit/f72927d5df447b007bde6cfe3543bc0218214772
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-05-05T20:43:18-07:00
Commit Message:
ULTIMA4: Allow portal numbers in debugger goto command
Changed paths:
engines/ultima/ultima4/core/debugger.cpp
diff --git a/engines/ultima/ultima4/core/debugger.cpp b/engines/ultima/ultima4/core/debugger.cpp
index 497a2867f2..e99bc2a8d0 100644
--- a/engines/ultima/ultima4/core/debugger.cpp
+++ b/engines/ultima/ultima4/core/debugger.cpp
@@ -1383,6 +1383,8 @@ bool Debugger::cmdGate(int argc, const char **argv) {
bool Debugger::cmdGoto(int argc, const char **argv) {
Common::String dest;
+ PortalList &portals = g_context->_location->_map->_portals;
+ uint p;
if (argc == 2) {
dest = argv[1];
@@ -1398,14 +1400,21 @@ bool Debugger::cmdGoto(int argc, const char **argv) {
dest.toLowercase();
bool found = false;
- for (unsigned p = 0; p < g_context->_location->_map->_portals.size(); p++) {
- MapId destid = g_context->_location->_map->_portals[p]->_destid;
+ p = strToInt(dest.c_str());
+
+ if (p > 0 && p <= portals.size()) {
+ g_context->_location->_coords = portals[p - 1]->_coords;
+ found = true;
+ }
+
+ for (p = 0; p < portals.size() && !found; p++) {
+ MapId destid = portals[p]->_destid;
Common::String destNameLower = mapMgr->get(destid)->getName();
destNameLower.toLowercase();
if (destNameLower.find(dest) != Common::String::npos) {
print("\n%s", mapMgr->get(destid)->getName().c_str());
- g_context->_location->_coords = g_context->_location->_map->_portals[p]->_coords;
+ g_context->_location->_coords = portals[p]->_coords;
found = true;
break;
}
Commit: e8482d8c1d104ead3a00d1e1fcbbc5e501b5f103
https://github.com/scummvm/scummvm/commit/e8482d8c1d104ead3a00d1e1fcbbc5e501b5f103
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-05-05T21:56:23-07:00
Commit Message:
ULTIMA4: Move fix for LB Abyss response to create_ultima
Changed paths:
devtools/create_ultima/file.h
devtools/create_ultima/files/ultima4/text/lb_text.dat
devtools/create_ultima/ultima4_resources.cpp
engines/ultima/ultima4/conversation/dialogueloader_lb.cpp
diff --git a/devtools/create_ultima/file.h b/devtools/create_ultima/file.h
index ca5a71960e..f3fd0687ec 100644
--- a/devtools/create_ultima/file.h
+++ b/devtools/create_ultima/file.h
@@ -76,6 +76,10 @@ public:
return feof(_file);
}
+ int pos() const {
+ return ftell(_file);
+ }
+
uint32 computeMD5();
};
@@ -106,7 +110,7 @@ public:
writeWord((val >> 16) & 0xffff);
}
- int write(void *buf, int size) {
+ int write(const void *buf, int size) {
return (int)fwrite(buf, 1, size, _file);
}
diff --git a/devtools/create_ultima/files/ultima4/text/lb_text.dat b/devtools/create_ultima/files/ultima4/text/lb_text.dat
index 8072f90e9e..53e26861c8 100644
Binary files a/devtools/create_ultima/files/ultima4/text/lb_text.dat and b/devtools/create_ultima/files/ultima4/text/lb_text.dat differ
diff --git a/devtools/create_ultima/ultima4_resources.cpp b/devtools/create_ultima/ultima4_resources.cpp
index c4f4b87e31..0817225798 100644
--- a/devtools/create_ultima/ultima4_resources.cpp
+++ b/devtools/create_ultima/ultima4_resources.cpp
@@ -31,6 +31,21 @@ void extractStringTable(File &src, const char *filename, int offset, int count)
char c;
for (int idx = 0; idx < count; ++idx) {
+ if (offset == 87754 && idx == 19) {
+ // String entry #19 for Lord British is dodgy in the original data
+ const char *STR = "\n\n\n\n\nHe says:\nThe Great Stygian Abyss is the darkest pocket of evil "
+ "remaining in Britannia!\n\n\n\n\nIt is said that in the deepest recesses of "
+ "the Abyss is the Chamber of the Codex!\n\n\n\nIt is also said that only one "
+ "of highest Virtue may enter this Chamber, one such as an Avatar!!!\n";
+ dest.write(STR, (int)strlen(STR));
+ dest.writeByte(0);
+
+ // Skip to next line
+ while (src.readByte()) {}
+ while (src.readByte()) {}
+ continue;
+ }
+
do {
c = src.readByte();
dest.writeByte(c);
@@ -55,7 +70,7 @@ void extractUltima4Resources() {
// Extract string tables
extractStringTable(f2, "hawkwind.dat", 74729, 53);
extractStringTable(f2, "lb_keywords.dat", 87581, 24);
- extractStringTable(f2, "lb_text.dat", 87754, 25);
+ extractStringTable(f2, "lb_text.dat", 87754, 24);
extractStringTable(f2, "virtue.dat", 0x0fc7b, 11);
extractStringTable(f2, "endgame1.dat", 0x0fee4, 7);
extractStringTable(f2, "endgame2.dat", 0x10187, 5);
diff --git a/engines/ultima/ultima4/conversation/dialogueloader_lb.cpp b/engines/ultima/ultima4/conversation/dialogueloader_lb.cpp
index a4f2011b70..065317912d 100644
--- a/engines/ultima/ultima4/conversation/dialogueloader_lb.cpp
+++ b/engines/ultima/ultima4/conversation/dialogueloader_lb.cpp
@@ -41,12 +41,7 @@ Response *lordBritishGetIntro(const DynamicResponse *resp);
*/
Dialogue *U4LBDialogueLoader::load(void *source) {
Std::vector<Common::String> lbKeywords = u4read_stringtable("lb_keywords");
-
- // There's a \0 in the 19th Common::String so we get a spurious 20th entry
Std::vector<Common::String> lbText = u4read_stringtable("lb_text");
- for (int i = 20; i < 24; i++)
- lbText[i] = lbText[i + 1];
- lbText.pop_back();
Dialogue *dlg = new Dialogue();
dlg->setTurnAwayProb(0);
@@ -63,14 +58,6 @@ Dialogue *U4LBDialogueLoader::load(void *source) {
dlg->addKeyword(lbKeywords[i], new Response(lbText[i]));
}
- /* since the original game files are a bit sketchy on the 'abyss' keyword,
- let's handle it here just to be safe :) */
- dlg->addKeyword("abyss",
- new Response("\n\n\n\n\nHe says:\nThe Great Stygian Abyss is the darkest pocket of evil "
- "remaining in Britannia!\n\n\n\n\nIt is said that in the deepest recesses of "
- "the Abyss is the Chamber of the Codex!\n\n\n\nIt is also said that only one "
- "of highest Virtue may enter this Chamber, one such as an Avatar!!!\n"));
-
Response *heal = new Response("\n\n\n\n\n\nHe says: I am\nwell, thank ye.");
heal->add(g_responseParts->HEALCONFIRM);
dlg->addKeyword("heal", heal);
More information about the Scummvm-git-logs
mailing list