Opened 15 years ago

Closed 15 years ago

Last modified 5 years ago

#8981 closed patch

INDY3/FOA: series IQ with ScummVM GUI

Reported by: SF/tobigun Owned by: fingolfin
Priority: normal Component: Engine: SCUMM
Version: Keywords:
Cc: Game: Indiana Jones 3

Description

At the moment support for the series IQ is limited. For Indy3 savegames must be loaded via the original save/load dialog to update the series IQ in the IQ-file. For Indy4 the 'i'-key must be pressed after loading a savegame to make sure the IQ-file is updated.

This patch updates the series IQ and IQ-file directly after loading a savegame.

As Indy3 calculates and stores the series IQ only when the "LOAD" or "SAVE" button was pressed (script room-14-206) we can either execute room-15-206 or reimplement the calculation algorithm. Executing the script is rather difficult as room 14 must be loaded in advance. In addition it depends on script 9 which initializes the save/load dialog. For example, it creates resource-string 9 used for the IQ-string. It is simpler to reimplement the series point calculation. This is done by updateIQPoints(). This function is called after loading/saving a savegame and when 'i' is pressed.

For Indy4 we can simply call script 145 which is also called when pressing 'i'. It loads the IQ-file, recalculates the series IQ and stores it back. It just uses local vars and the series IQ var so no side effects should occur.

Ticket imported from: #2676453. Ticket imported from: patches/1086.

Attachments (2)

save-iq.patch (5.6 KB ) - added by SF/tobigun 15 years ago.
save-iq-on-change.patch (5.8 KB ) - added by SF/tobigun 15 years ago.
Save on IQ change

Download all attachments as: .zip

Change History (11)

by SF/tobigun, 15 years ago

Attachment: save-iq.patch added

by SF/tobigun, 15 years ago

Attachment: save-iq-on-change.patch added

Save on IQ change

comment:1 by SF/tobigun, 15 years ago

Instead of saving the Indy3 series IQ just on saving, it is possible to save it whenever the IQ-points change. This is the case when script 125 is called. This is exactly the way Indy4 saves the series IQ. The advantage of this solution is that the series IQ is not lost if the game was not saved.

File Added: save-iq-on-change.patch

comment:2 by sev-, 15 years ago

Owner: set to fingolfin

comment:3 by sev-, 15 years ago

Great stuff! Looking forward for Max to approve both patches (this one and support for original save dialogs)

comment:4 by fingolfin, 15 years ago

This sounds like a great addition :).

But I wonder: Have you verified that the script id is the same in all versions of the games? Well, at least in the major variants: Indy4 regular vs. talkie (and I wonder about Indy4 Amiga, FM-Towns...), as well as other languages. *Usually* the script ids stay the same, but not always.

comment:5 by SF/tobigun, 15 years ago

The script id is 145 at least for the German (non-talkie) and English (talkie) version.

comment:6 by SF/tobigun, 15 years ago

I've tried my dust covered amiga version of indy4 and the script ID is also 145.

comment:7 by fingolfin, 15 years ago

Status: newclosed

comment:8 by fingolfin, 15 years ago

Great, added, thanks once more!

comment:9 by digitall, 5 years ago

Component: Engine: SCUMM
Game: Indiana Jones 3
Note: See TracTickets for help on using tickets.