#8782 closed patch
KYRA: HoF startup patch for towns and floppy
Reported by: | athrxx | Owned by: | lordhoto |
---|---|---|---|
Priority: | normal | Component: | Engine: Kyra |
Version: | Keywords: | ||
Cc: | Game: | Kyrandia 2 |
Description
This patch fixes startup for the towns and floppy versions. Starting a new game will no longer cause an immediate crash.
Ticket imported from: #1869752. Ticket imported from: patches/887.
Attachments (2)
Change History (9)
by , 17 years ago
Attachment: | hofStartupFix.patch added |
---|
comment:1 by , 17 years ago
comment:2 by , 17 years ago
Owner: | set to |
---|
comment:3 by , 17 years ago
Now this starts to sound _really_ interesting ;-)
The original towns code has a bool value for language where 0 is English and 1 is Japanese. There are 167 opcode functions which means that we don't have anything like o2_getGameLanguage() here. We _should_ be safe with a _lang value of 3 (if not we will notice soon enough :-) ).
Regarding the cCode stuff: We probably will have to load the _cCodeBuffer for all versions (my patch is wrong here). The original code does this, too. I am starting to believe that showMessageFromCCode() might fail only in this particular case which would make sense (the message is "Reading CD-ROM data..." or something like that). The original code does not call it here either. I will look into this some more and then upload a new patch file.
by , 17 years ago
Attachment: | hofStartupFix_V2 plus ingame sfx.patch added |
---|
comment:4 by , 17 years ago
Now here is a new version of the patch. I also fixed updateCommandLineEx() for Japanese according to the original code and I added support for ingame voc/pcm sound effects (the corresponding patch for the kyradat tool is the next tracker item).
Zanthia still doesn't talk much. The CD-ROM version often makes Zanthia talk via o2_zanthiaChat(). This opcode is beyond the range of the floppy and towns opcode tables (which hopefully will be the same at least). I haven't explored this for now. The last opcode is 167 which is o2_getVocHigh for CD-ROM and a nullsub for Towns and Floppy. File Added: hofStartupFix_V2 plus ingame sfx.patch
comment:5 by , 17 years ago
Thanks for the patch, next time I would really like to have the create_kyradat patch in the same tracker item though.
comment:6 by , 17 years ago
Status: | new → closed |
---|
comment:7 by , 6 years ago
Component: | → Engine: Kyra |
---|---|
Game: | → Kyrandia 2 |
This sounds interessting, but I wonder about some things: - _lang is set to 3 for JAP is that what the original did? If not I would love to know what value the original used I suppose 1? Since there's an opcode which returns _lang (at least for the CD version), so it would be good to know the real value if it also exists in the FM-Towns version.
- That check for _flags.useHiResOverlay is unneeded, I fixed checkInput a few seconds ago, after I saw it in your patch.
- That if check in KyraEngine_v2::loadNPCScript looks too complicated I suppose it should check for "if (_flags.platform != Common::kPlatformPC || _flags.isTalkie)"
- showMessageFromCCode doesn't work with Floppy or FM-Towns if I get it right? I saw you were able to put most occurences to talkie specific code, but there's one in items_v2.cpp left, also updateCommandLine is using _cCodeBuffer, so I guess this will still crash for DOS and FM-Towns versions? Don't they have any C_CODE file, or what's the problem with it? I wonder at least how the Towns version is able to support two languages without any translation file, which is what C_CODE seems to be for.