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

Fix parsing of certain dc6 found in casc #116

Merged
merged 5 commits into from
Feb 13, 2022

Conversation

DarthGandalf
Copy link
Contributor

@DarthGandalf DarthGandalf commented Feb 7, 2022

Normally, the frame data starts at the beginning, and has Length bytes, and after that there are several (3 or 4) bytes filled with Termination e.g. EE EE EE, before the next frame header starts

But in the new buysellbtn.dc6 there's no termination, and instead the data is aligned to the right: first several bytes are 00 00 00, which are noop, but if to just take the first Length bytes, the last bytes (which were previously just before the termination area) are now outside the Length range

Old file (from MPQ):

1F 04 00 00 20 AE AD AD AD AE AE AE ... 16 C6 C7 19 BC 80 80 EE EE EE 00 00 00 00
~~~~~       ~~~~                                        ~~~~ ~~~~~~~~ ~~~~
length      data starts                          data ends    termi-    next frame header
                                   (according to "length")    nation

New file:

1F 04 00 00 00 00 00 20 AE AD AD AD AE AE AE ... 16 C6 C7 19 BC 80 80 00 00 00 00
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~
                                      same data as before              next frame header

This is pretty ugly, ignoring Length, please suggest any better way
@essial essial merged commit 811c452 into AbyssEngine:main Feb 13, 2022
@DarthGandalf DarthGandalf deleted the newdc6 branch August 22, 2022 01:43
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

2 participants