diff options
author | Colin Snover | 2017-09-08 20:54:48 -0500 |
---|---|---|
committer | Colin Snover | 2017-09-08 21:10:51 -0500 |
commit | 7eedfdbeaf2d1349a368ea308219f0f185322c0d (patch) | |
tree | 63d95e284e2f94ff302683ea9c3e0343d04849a4 /engines/sci/engine/kernel_tables.h | |
parent | 5228aa29fa632249c835f98fbc4cfc01fa5f222b (diff) | |
download | scummvm-rg350-7eedfdbeaf2d1349a368ea308219f0f185322c0d.tar.gz scummvm-rg350-7eedfdbeaf2d1349a368ea308219f0f185322c0d.tar.bz2 scummvm-rg350-7eedfdbeaf2d1349a368ea308219f0f185322c0d.zip |
SCI32: Fix kString signatures to allow null references where appropriate
The original interpreter allowed most string references to be
null references, in which case it would substitute an empty
string.
Diffstat (limited to 'engines/sci/engine/kernel_tables.h')
-rw-r--r-- | engines/sci/engine/kernel_tables.h | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index f4f96ad253..0f7b9cac6f 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -533,34 +533,34 @@ static const SciKernelMapSubEntry kString_subops[] = { // 3) { SIG_THRU_SCI21MID, 0, MAP_CALL(StringNew), "i(i)", NULL }, { SIG_THRU_SCI21MID, 1, MAP_CALL(ArrayGetSize), "r", NULL }, - { SIG_THRU_SCI21MID, 2, MAP_CALL(StringGetChar), "ri", NULL }, + { SIG_THRU_SCI21MID, 2, MAP_CALL(StringGetChar), "[0r]i", NULL }, { SIG_THRU_SCI21MID, 3, MAP_CALL(ArraySetElements), "ri(i*)", kArraySetElements_workarounds }, { SIG_THRU_SCI21MID, 4, MAP_CALL(StringFree), "[0r]", NULL }, { SIG_THRU_SCI21MID, 5, MAP_CALL(ArrayFill), "rii", kArrayFill_workarounds }, { SIG_THRU_SCI21MID, 6, MAP_CALL(ArrayCopy), "ririi", NULL }, - { SIG_SCI32, 7, MAP_CALL(StringCompare), "rr(i)", NULL }, + { SIG_SCI32, 7, MAP_CALL(StringCompare), "[0r][0r](i)", NULL }, { SIG_THRU_SCI21MID, 8, MAP_CALL(ArrayDuplicate), "r", NULL }, { SIG_THRU_SCI21MID, 9, MAP_CALL(StringGetData), "[0or]", NULL }, - { SIG_THRU_SCI21MID, 10, MAP_CALL(StringLength), "r", NULL }, - { SIG_THRU_SCI21MID, 11, MAP_CALL(StringFormat), "[ro](.*)", NULL }, - { SIG_THRU_SCI21MID, 12, MAP_CALL(StringFormatAt), "r[ro](.*)", NULL }, - { SIG_THRU_SCI21MID, 13, MAP_CALL(StringToInteger), "r", NULL }, - { SIG_THRU_SCI21MID, 14, MAP_CALL(StringTrim), "ri(i)", NULL }, - { SIG_THRU_SCI21MID, 15, MAP_CALL(StringToUpperCase), "r", NULL }, - { SIG_THRU_SCI21MID, 16, MAP_CALL(StringToLowerCase), "r", NULL }, - { SIG_THRU_SCI21MID, 17, MAP_CALL(StringReplaceSubstring), "rrrr", NULL }, - { SIG_THRU_SCI21MID, 18, MAP_CALL(StringReplaceSubstringEx), "rrrr", NULL }, - - { SIG_SINCE_SCI21LATE, 8, MAP_CALL(StringLength), "r", NULL }, + { SIG_THRU_SCI21MID, 10, MAP_CALL(StringLength), "[0r]", NULL }, + { SIG_THRU_SCI21MID, 11, MAP_CALL(StringFormat), "[0ro](.*)", NULL }, + { SIG_THRU_SCI21MID, 12, MAP_CALL(StringFormatAt), "r[0ro](.*)", NULL }, + { SIG_THRU_SCI21MID, 13, MAP_CALL(StringToInteger), "[0r]", NULL }, + { SIG_THRU_SCI21MID, 14, MAP_CALL(StringTrim), "[0r]i(i)", NULL }, + { SIG_THRU_SCI21MID, 15, MAP_CALL(StringToUpperCase), "[0r]", NULL }, + { SIG_THRU_SCI21MID, 16, MAP_CALL(StringToLowerCase), "[0r]", NULL }, + { SIG_THRU_SCI21MID, 17, MAP_CALL(StringReplaceSubstring), "[0r][0r][0r][0r]", NULL }, + { SIG_THRU_SCI21MID, 18, MAP_CALL(StringReplaceSubstringEx), "[0r][0r][0r][0r]", NULL }, + + { SIG_SINCE_SCI21LATE, 8, MAP_CALL(StringLength), "[0r]", NULL }, { SIG_SINCE_SCI21LATE, 9, MAP_CALL(StringFormat), "[0ro](.*)", NULL }, - { SIG_SINCE_SCI21LATE,10, MAP_CALL(StringFormatAt), "r[0ro](.*)", NULL }, - { SIG_SINCE_SCI21LATE,11, MAP_CALL(StringToInteger), "r", NULL }, - { SIG_SINCE_SCI21LATE,12, MAP_CALL(StringTrim), "ri(i)", NULL }, - { SIG_SINCE_SCI21LATE,13, MAP_CALL(StringToUpperCase), "r", NULL }, - { SIG_SINCE_SCI21LATE,14, MAP_CALL(StringToLowerCase), "r", NULL }, - { SIG_SINCE_SCI21LATE,15, MAP_CALL(StringReplaceSubstring), "rrrr", NULL }, - { SIG_SINCE_SCI21LATE,16, MAP_CALL(StringReplaceSubstringEx), "rrrr", NULL }, + { SIG_SINCE_SCI21LATE,10, MAP_CALL(StringFormatAt), "[0r][0ro](.*)", NULL }, + { SIG_SINCE_SCI21LATE,11, MAP_CALL(StringToInteger), "[0r]", NULL }, + { SIG_SINCE_SCI21LATE,12, MAP_CALL(StringTrim), "[0r]i(i)", NULL }, + { SIG_SINCE_SCI21LATE,13, MAP_CALL(StringToUpperCase), "[0r]", NULL }, + { SIG_SINCE_SCI21LATE,14, MAP_CALL(StringToLowerCase), "[0r]", NULL }, + { SIG_SINCE_SCI21LATE,15, MAP_CALL(StringReplaceSubstring), "[0r][0r][0r][0r]", NULL }, + { SIG_SINCE_SCI21LATE,16, MAP_CALL(StringReplaceSubstringEx), "[0r][0r][0r][0r]", NULL }, SCI_SUBOPENTRY_TERMINATOR }; |