-
-
Notifications
You must be signed in to change notification settings - Fork 375
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 French and German ultimate staff sprite with PoL assets #9204
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @zenseii , I put 2 comments here. Would you mind to take a look when you have spare time?
imageStream.seek( headerSize + assetIndex * 13 ); | ||
|
||
fheroes2::ICNHeader header1; | ||
imageStream >> header1; | ||
|
||
fheroes2::ICNHeader header2; | ||
imageStream >> header2; | ||
const uint32_t dataSize = header2.offsetData - header1.offsetData; | ||
|
||
const uint8_t * data = body.data() + headerSize + header1.offsetData; | ||
const uint8_t * dataEnd = data + dataSize; | ||
|
||
_icnVsSprite[id][assetIndex] = fheroes2::decodeICNSprite( data, dataEnd, header1 ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about we create a helper function for this code which is duplicate of the code in function void LoadOriginalICN( const int id )
? I think it could be like this:
void readImage( ROStreamBuf & stream, fheroes2::Sprite & image, const int32_t imageIndex, const bool isLastImage )
{
...
}
and then we can use this function in both places. What do you think?
The staff sprite is corrupted/wrong in at least the German and French PoL assets from GOG. Apparently this bug was introduced with patch 2.0 in those languages. In the Succession Wars asset the correct sprite is still present so we use that instead.
In
master
:In original game: