mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-17 07:07:10 +00:00
No longer required.
svn-id: r15141
This commit is contained in:
parent
0a320ac7af
commit
cf71760391
@ -3002,7 +3002,7 @@ void ScummEngine_v6::o6_pickVarRandom() {
|
||||
int value = fetchScriptWord();
|
||||
|
||||
if (readVar(value) == 0) {
|
||||
defineArray(value, kIntArray, 0, num + 1);
|
||||
defineArray(value, kIntArray, 0, num);
|
||||
if (num > 0) {
|
||||
int16 counter = 0;
|
||||
do {
|
||||
@ -3010,7 +3010,7 @@ void ScummEngine_v6::o6_pickVarRandom() {
|
||||
} while (++counter < num);
|
||||
}
|
||||
|
||||
shuffleArray(value, 1, num-1);
|
||||
shuffleArray(value, 1, num);
|
||||
writeArray(value, 0, 0, 2);
|
||||
push(readArray(value, 0, 1));
|
||||
return;
|
||||
|
@ -1699,7 +1699,7 @@ void ScummEngine_v72he::o72_pickVarRandom() {
|
||||
int value = fetchScriptWord();
|
||||
|
||||
if (readVar(value) == 0) {
|
||||
defineArray(value, kDwordArray, 0, 0, 0, num + 1);
|
||||
defineArray(value, kDwordArray, 0, 0, 0, num);
|
||||
if (num > 0) {
|
||||
int16 counter = 0;
|
||||
do {
|
||||
@ -1707,7 +1707,7 @@ void ScummEngine_v72he::o72_pickVarRandom() {
|
||||
} while (++counter < num);
|
||||
}
|
||||
|
||||
shuffleArray(value, 1, num-1);
|
||||
shuffleArray(value, 1, num);
|
||||
writeArray(value, 0, 0, 2);
|
||||
push(readArray(value, 0, 1));
|
||||
return;
|
||||
|
@ -614,7 +614,7 @@ void ScummEngine_v80he::o80_pickVarRandom() {
|
||||
int value = fetchScriptWord();
|
||||
|
||||
if (readVar(value) == 0) {
|
||||
defineArray(value, kDwordArray, 0, 0, 0, num + 1);
|
||||
defineArray(value, kDwordArray, 0, 0, 0, num);
|
||||
if (value & 0x8000)
|
||||
localizeArray(readVar(value), 0xFFFFFFFF);
|
||||
else if (value & 0x4000)
|
||||
@ -627,7 +627,7 @@ void ScummEngine_v80he::o80_pickVarRandom() {
|
||||
} while (++counter < num);
|
||||
}
|
||||
|
||||
shuffleArray(value, 1, num-1);
|
||||
shuffleArray(value, 1, num);
|
||||
writeArray(value, 0, 0, 2);
|
||||
push(readArray(value, 0, 1));
|
||||
return;
|
||||
@ -638,7 +638,7 @@ void ScummEngine_v80he::o80_pickVarRandom() {
|
||||
ArrayHeader *ah = (ArrayHeader *)getResourceAddress(rtString, readVar(value));
|
||||
dim1end = FROM_LE_32(ah->dim1end);
|
||||
|
||||
if (dim1end <= num) {
|
||||
if (dim1end < num) {
|
||||
int16 var_2 = readArray(value, 0, num - 1);
|
||||
shuffleArray(value, 1, dim1end);
|
||||
if (readArray(value, 0, 1) == var_2 && var_2 >= 3) {
|
||||
|
Loading…
Reference in New Issue
Block a user