Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display a useful error window when binary game data cannot be loaded #45

Open
synthead opened this issue Jun 16, 2022 · 1 comment
Open

Comments

@synthead
Copy link
Contributor

Spun off from #44.

When game data is in place that isn't explicitly the versions in this list...

omnispeak/README

Lines 16 to 20 in d017166

Omnispeak supports:
- Keen 4 v1.4 EGA
- Keen 5 v1.4 EGA
- Keen 6 v1.4 EGA
- Keen 6 v1.5 EGA

...this window is displayed:

image

It would be better to display an error that tells the user that there is a version mismatch for the game data instead 👍

sulix added a commit that referenced this issue Jun 16, 2022
#45)

If the EGAHEAD and EGAGRAPH files don't match (which will often happen
if the wrong version of Keen is used with the provided graphics files),
the chunk lengths will typically be totally wrong. Attempting to
decompress them leaves us with a terrible error message, so provide a
(slightly) better one, letting us know that it's chunk expansion which
is failing, and suggesting that it's a version mismatch.

This is not the ideal long-term solution for this, but the extra
sanity-checking doesn't hurt, so we'll do it anyway.

Thanks @synthead for reporting this.
@sulix
Copy link
Owner

sulix commented Jun 16, 2022

While I look into a more general way of identifying known and unknown versions (ideally one which doesn't preclude the loading of custom levels, etc), I've pushed a change which will improve the message slightly in the case where the EGAGRAPH file (provided from the game) and the EGAHEAD file (which is extracted from the .exe, but omnispeak includes from v1.4), don't match.

So using the EGAGRAPH.CK4 file from v1.0 with the EGAHEAD.CK4 from the data/keen4 directory should, instead of saying MM_GetPtr: Out of Memory! (which is probably what the original game would do if you mixed its files up!), it'll give the slightly more useful:

Tried to expand an invalid chunk! Make sure you're using a compatible version of Keen!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants