Opened 12 years ago

Closed 12 years ago

Last modified 9 months ago

#8772 closed patch

KYRA: kyradat support for hof

Reported by: athrxx Owned by: lordhoto
Priority: normal Component: Engine: Kyra
Keywords: Cc:
Game: Kyrandia 2

Description

These patches add kyradat support for Hand of Fate.
Floppy, CD-ROM and Towns versions now seem to run reasonably well, also in French, German and Japanese. This applies to the sequence player at least. startup() remains broken for all versions but DOS CD-ROM.

The code for non-interactive demos (hof and lol) is not in yet, although the required data can be extracted with the updated kyradat tool.

Ticket imported from: #1865509. Ticket imported from: patches/877.

Attachments (5)

createKyraDat.patch (25.2 KB) - added by athrxx 12 years ago.
patch for the kyradat tool
hofKyradatSupport.patch (54.1 KB) - added by athrxx 12 years ago.
patch for kyra engine
hofKyradatSupportV2.patch (54.8 KB) - added by athrxx 12 years ago.
patch for kyra engine - new version
createKyraDatV2.patch (30.6 KB) - added by athrxx 12 years ago.
patch for the kyradat tool - Version 2
hofKyradatSupportV3.patch (54.6 KB) - added by athrxx 12 years ago.
patch for kyra engine - version 3

Download all attachments as: .zip

Change History (17)

Changed 12 years ago by athrxx

Attachment: createKyraDat.patch added

patch for the kyradat tool

Changed 12 years ago by athrxx

Attachment: hofKyradatSupport.patch added

patch for kyra engine

comment:1 Changed 12 years ago by athrxx

Owner: set to lordhoto

comment:2 Changed 12 years ago by athrxx

File Added: hofKyradatSupport.patch

comment:3 Changed 12 years ago by lordhoto

Some little remarks after a short look through:
hofKyradatSupport.patch:
- That "INSFileComp" looks totally unrelated to the rest of the patch (and not implemented?)
- kSequencesLol <- What's "LoL"? I suppose Lands of Lore? Looks definitly not like something beloing into a patch for HoF. (There are some other occurences of LoL too).
- Why are some members of "AudioDataStruct" changed to "int" instead of "uint"? It caused some warnings in the sound code last time I used int there, so I decided to go with uint.
- I'm wondering about endian issues with _cdaTrackTable used in staticres.cpp (This line: "_cdaTrackTable = (const int32*) _staticres->loadRawData(kKyra1TownsCDATable, _cdaTrackTableSize);"). That looks really bad, I would propose to add a 'integer list' data type to kyra.dat for that, since relying on the client code to care about endianness is rather ugly IMHO.

createKyraDat.patch:
- k2DemoLol <- Lands of Lore again? See above. (There are some other occurences of LoL too).

Apart from it, it looks OK from a short look through it.

comment:4 Changed 12 years ago by athrxx

Yeah, looks like I forgot to remove the class declaration for the compressed installer files. I did at least remove the implementations from resource.cpp :). The lol demo is the non interactive demo that can be downloaded from ftp.westwood.com. It works exactly like the non interactive hof demo, so it could be supported (unless you fear that people will expect you to support the actual game, too). I will look at the other stuff later...

comment:5 Changed 12 years ago by lordhoto

To be honest I fail to see why we should support the Lands of Lore demo if we don't really have any plans to support Lands of Lore. That looks at least a bit strange to me.

Changed 12 years ago by athrxx

Attachment: hofKyradatSupportV2.patch added

patch for kyra engine - new version

comment:6 Changed 12 years ago by athrxx

Okay, here is a new version of the patch. I took out the INSFileComp and LOL stuff. Endian issues should be fixed.
Regarding the int values in AudioDataStruct: I need to use int values here, because the staticres manager functions loadStrings, loadRawData, etc. will fail if I use uint vars for the file size. I now changed the int type throughout the code, so no more warnings should be caused here (at least for me it looks okay - if you get more warnings, please tell me the file and the line number).
File Added: hofKyradatSupportV2.patch

comment:7 Changed 12 years ago by lordhoto

Looks much better now just some remarks again:
hofKyradatSupportV2.patch:
- still adds "useInstallerPackage" to the GameFlags struct

createKyraDat.patch:
- misses hof files (maybe you forgot svn add before using svn diff?)
- lol enums

Changed 12 years ago by athrxx

Attachment: createKyraDatV2.patch added

patch for the kyradat tool - Version 2

comment:8 Changed 12 years ago by athrxx

File Added: createKyraDatV2.patch

Changed 12 years ago by athrxx

Attachment: hofKyradatSupportV3.patch added

patch for kyra engine - version 3

comment:9 Changed 12 years ago by athrxx

Now it should be okay...
File Added: hofKyradatSupportV3.patch

comment:10 Changed 12 years ago by lordhoto

Commited with some modifications:
- stricmp -> scumm_stricmp there's no stricmp on UNIX like systems, so this was needed for compiling
- some formatting fixes
- const fixes (for example introduced some consts in create_kyradat and correct const_cast in engine code), this was also needed for compiling
- fixed some warnings (also ingame warnings, caused by bad snd_playTheme call in KyraEngine_v1::seq_intro)

comment:11 Changed 12 years ago by lordhoto

Status: newclosed

comment:12 Changed 9 months ago by digitall

Component: Engine: Kyra
Game: Kyrandia 2
Note: See TracTickets for help on using tickets.