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

Make FontXY and scummfont use the internal I/O lib for big-endian support #24

Merged
merged 12 commits into from
Apr 5, 2021

Conversation

dwatteau
Copy link
Owner

Issue #3.

scummtr and scummrp use ScummRpIO and so they're compatible with big-endian systems.

FontXY and scummfont don't use this, and are just hardcoded to little-endian.

So, let's move ScummRpIO to a dedicated common lib, and use it everywhere, so that all tools are now compatible with big-endian systems too.

The idea is to have all tools using the same I/O functions, so that
endianness and such is dealt in the same way in all our tools.
It's not part of ScummRp anymore, so avoid any ambiguity.
@dwatteau
Copy link
Owner Author

dwatteau commented Mar 30, 2021

Quickly tested on a PowerBook G4.

Needs:

  • more tests on a big-endian system
  • regression tests on little-endian systems (including Windows)
  • FontXY/ScummFont bmp/CHAR_* diffs between little-endian and big-endian
  • and the same diffs on a little-endian system, but before/after the patch
  • check that the if (baseOffset == 8) // block header part has no endianness issue
  • check the scummiolib linking error with Clang on Debian 11
  • finish the #ifdef SCUMMFONT_MAKETABLE parts

More tests are going to be needed, because I fear other cast problems.
… access to that

Tested with CHAR_0001 from DIG-FR: the output is the same between ppc and x86,
and with and without the change on x86.  Same output, but it's a cleaner and
shorter way of writing a big-endian value, now that we're using ScummIO.
@dwatteau
Copy link
Owner Author

dwatteau commented Apr 5, 2021

Seems ready to be merged. I couldn't find any regression with ScummFont.

I didn't test FontXY a lot, but well it's a simple one, and everything will be tested again for the next release.

@dwatteau dwatteau merged commit 604d3b6 into main Apr 5, 2021
@dwatteau dwatteau deleted the feat/move-scummrp-io-to-new-lib branch April 5, 2021 19:55
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

Successfully merging this pull request may close these issues.

None yet

1 participant