Markemp / Cryengine-Converter

A c# program to convert Crytek files to Collada (XML) format
https://www.heffaypresents.com/GitHub/
GNU General Public License v2.0
208 stars 53 forks source link

Big endian support in general (for Rise of Lyric) #144

Closed Soreepeong closed 1 year ago

Soreepeong commented 1 year ago

This PR gets rid of chunk handler for version 0x80000800 and alike, and instead, makes it just use the handler for version 0x800 and alike, but using big endian binary reader. EndiannessChangeableBinaryReader has been added.

Also, I had to make a minor edit to COLLADA.cs (check the first commit), to make it not complain when trying to convert from .chr files shipped with Rise of Lyric.

Confirmed that this works at least for Rise of Lyric, for the .chr and .cgf files that I've run through.

Explicit casting has been used in Model.Read in order to reduce the number of changed files.

Markemp commented 1 year ago

My favorite part of this PR so far: image :) Will take a look at this today or tomorrow. Thank you a TON for the submission!

Soreepeong commented 1 year ago

Let me know if you find that the code can be cleaned more!