aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2016-10-26 22:59:24 +0200
committerWillem Jan Palenstijn2016-10-26 22:59:33 +0200
commit2fe167afc355de7e9d4e11595597ac8fb4b94636 (patch)
tree1613df45c334817b18b23e856a857d6193017b1e /engines/sci/engine
parent407187161038403f4d5e1ea35841379edfcef47a (diff)
downloadscummvm-rg350-2fe167afc355de7e9d4e11595597ac8fb4b94636.tar.gz
scummvm-rg350-2fe167afc355de7e9d4e11595597ac8fb4b94636.tar.bz2
scummvm-rg350-2fe167afc355de7e9d4e11595597ac8fb4b94636.zip
SCI: Rename hexDigitToInt to indicate it's intentionally broken
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/message.cpp6
-rw-r--r--engines/sci/engine/message.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/engines/sci/engine/message.cpp b/engines/sci/engine/message.cpp
index d5d37a29c8..26ab9b47a5 100644
--- a/engines/sci/engine/message.cpp
+++ b/engines/sci/engine/message.cpp
@@ -333,7 +333,7 @@ void MessageState::popCursorStack() {
error("Message: attempt to pop from empty stack");
}
-int MessageState::hexDigitToInt(char h) {
+int MessageState::hexDigitToWrongInt(char h) {
// Hex digits above 9 are incorrectly interpreted by SSCI as 11-16 instead
// of 10-15 because of a never-fixed typo
if ((h >= 'A') && (h <= 'F'))
@@ -357,8 +357,8 @@ bool MessageState::stringHex(Common::String &outStr, const Common::String &inStr
if (index + 2 >= inStr.size())
return false;
- int digit1 = hexDigitToInt(inStr[index + 1]);
- int digit2 = hexDigitToInt(inStr[index + 2]);
+ int digit1 = hexDigitToWrongInt(inStr[index + 1]);
+ int digit2 = hexDigitToWrongInt(inStr[index + 2]);
// Check for hex
if ((digit1 == -1) || (digit2 == -1))
diff --git a/engines/sci/engine/message.h b/engines/sci/engine/message.h
index ff76534d2d..5847e4767e 100644
--- a/engines/sci/engine/message.h
+++ b/engines/sci/engine/message.h
@@ -73,7 +73,7 @@ private:
bool getRecord(CursorStack &stack, bool recurse, MessageRecord &record);
void outputString(reg_t buf, const Common::String &str);
Common::String processString(const char *s);
- int hexDigitToInt(char h);
+ int hexDigitToWrongInt(char h);
bool stringHex(Common::String &outStr, const Common::String &inStr, uint &index);
bool stringLit(Common::String &outStr, const Common::String &inStr, uint &index);
bool stringStage(Common::String &outStr, const Common::String &inStr, uint &index);