-
Notifications
You must be signed in to change notification settings - Fork 65
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
Compressed Gump read support #131
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.
Thank you very much for your contribution. The code can be simplified. Please let me know if you are willing to do changes before we merge the PR.
I've also noticed that map and textures loading is now broken so this will require testing too. |
- fixed texture and map reading - reverted GumpControl
Need to figure out how to fix Dress Control - It is unable to properly render newly added equipment (Elemental Plate sets) because it takes GumpID based on AnimID, which is the same as regular plate set have. |
Is it related to your changes? Because a lot of mappings that works in regular client are not really implemented in UOFiddler. So I'm not sure if this is actual problem here :) |
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.
Just two more things and It will be good enough :)
Ultima/FileIndex.cs
Outdated
@@ -8,12 +8,13 @@ namespace Ultima | |||
{ | |||
public sealed class FileIndex | |||
{ | |||
public Entry3D[] Index { get; } | |||
IFileAccessor FileAccessor { get; set; } |
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.
Please make it read only IFileAccessor FileAccessor { get; }
and add public
accessor.
Not related to my changes - just mentioning what I've noticed during development |
Yea a lot of stuff is missing. Ok, after I save gump and try to load it's broken. It doesn't matter if I use something pre-NL or NL compressed version. And there were some issues with art from NL too I'll have to do some testing but it's not possible to merge this yet. For now it looks like index is written differently then before this change. It's related to accessors GetEntry logic. Instead returning the entry as it is it returns default entry instance when Lookup < 0 . So it should be something like this for mul and uop public IEntry GetEntry(int index)
{
if (index < 0 || index >= Index.Length)
{
return new Entry6D();
}
return Index[index];
} Right now I'm not sure what we should do when index is outside of boundaries maybe an exception would be better. Let's leave it as is for now. The only change is that the additonal condition for e.Lookup needs to be removed from GetEntry(). @Krubster are you able to join POL discord to talk more about this PR? |
Now properly works this time. Works both with new and old clients without any checkboxes.