SCUMM: Cleanup
We only need to initialize 'args' in runInventoryScript() when we are actually using them.
This commit is contained in:
parent
2284aba719
commit
0638d85ada
1 changed files with 3 additions and 3 deletions
|
@ -755,13 +755,13 @@ void ScummEngine::stopObjectCode() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScummEngine::runInventoryScript(int i) {
|
void ScummEngine::runInventoryScript(int i) {
|
||||||
int args[NUM_SCRIPT_LOCALS];
|
|
||||||
memset(args, 0, sizeof(args));
|
|
||||||
args[0] = i;
|
|
||||||
if (VAR(VAR_INVENTORY_SCRIPT)) {
|
if (VAR(VAR_INVENTORY_SCRIPT)) {
|
||||||
if (_game.id == GID_INDY3 && _game.platform == Common::kPlatformMacintosh) {
|
if (_game.id == GID_INDY3 && _game.platform == Common::kPlatformMacintosh) {
|
||||||
inventoryScriptIndy3Mac();
|
inventoryScriptIndy3Mac();
|
||||||
} else {
|
} else {
|
||||||
|
int args[NUM_SCRIPT_LOCALS];
|
||||||
|
memset(args, 0, sizeof(args));
|
||||||
|
args[0] = i;
|
||||||
runScript(VAR(VAR_INVENTORY_SCRIPT), 0, 0, args);
|
runScript(VAR(VAR_INVENTORY_SCRIPT), 0, 0, args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue