mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-10 03:40:25 +00:00
Fix regression, resID shouldn't beint16.
Slight correction to copyArrayHelper. svn-id: r19089
This commit is contained in:
parent
842f520af1
commit
b6425d1cf8
@ -750,6 +750,8 @@ int ScummEngine::getResourceSize(int type, int idx) {
|
||||
}
|
||||
|
||||
byte *ScummEngine::getResourceAddress(int type, int idx) {
|
||||
printf("getResourceAddress: type %d idx %d\n", type, idx);
|
||||
|
||||
byte *ptr;
|
||||
|
||||
CHECK_HEAP
|
||||
@ -757,6 +759,8 @@ byte *ScummEngine::getResourceAddress(int type, int idx) {
|
||||
if (_heversion >= 80 && type == rtString)
|
||||
idx &= ~0x33539000;
|
||||
|
||||
printf("getResourceAddress2: type %d idx %d\n", type, idx);
|
||||
|
||||
if (!res.validateResource("getResourceAddress", type, idx))
|
||||
return NULL;
|
||||
|
||||
|
@ -1859,7 +1859,7 @@ void ScummEngine_v72he::writeFileFromArray(int slot, int resID) {
|
||||
}
|
||||
|
||||
void ScummEngine_v72he::o72_writeFile() {
|
||||
int16 resID = pop();
|
||||
int resID = pop();
|
||||
int slot = pop();
|
||||
byte subOp = fetchScriptByte();
|
||||
|
||||
@ -2126,12 +2126,12 @@ void ScummEngine_v72he::copyArrayHelper(ArrayHeader *ah, int idx2, int idx1, int
|
||||
*data = ah->data + offset;
|
||||
break;
|
||||
case kIntArray:
|
||||
*num = (len1 - idx1) * 2;
|
||||
*num = (len1 - idx1) * 2 + 2;
|
||||
*size = pitch * 2;
|
||||
*data = ah->data + offset * 2;
|
||||
break;
|
||||
case kDwordArray:
|
||||
*num = (len1 - idx1) * 4;
|
||||
*num = (len1 - idx1) * 4 + 4;
|
||||
*size = pitch * 4;
|
||||
*data = ah->data + offset * 4;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user