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

Compressed Gump read support #131

Merged
merged 5 commits into from
Jan 22, 2025
Merged

Compressed Gump read support #131

merged 5 commits into from
Jan 22, 2025

Conversation

Krubster
Copy link
Contributor

Now properly works this time. Works both with new and old clients without any checkboxes.

  • Still need to make UOPPacker plugin to compress all gumps data (without compression output .uop three times larger than compressed)

Copy link
Collaborator

@AsYlum- AsYlum- left a 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.

UoFiddler.Controls/UserControls/GumpControl.cs Outdated Show resolved Hide resolved
Ultima/Gumps.cs Outdated Show resolved Hide resolved
Ultima/Gumps.cs Outdated Show resolved Hide resolved
Ultima/Gumps.cs Outdated Show resolved Hide resolved
@AsYlum-
Copy link
Collaborator

AsYlum- commented Jan 18, 2025

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
@Krubster Krubster requested a review from AsYlum- January 19, 2025 11:55
@Krubster
Copy link
Contributor Author

Krubster commented Jan 19, 2025

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.

@AsYlum-
Copy link
Collaborator

AsYlum- commented Jan 20, 2025

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 :)

Copy link
Collaborator

@AsYlum- AsYlum- left a 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 :)

@@ -8,12 +8,13 @@ namespace Ultima
{
public sealed class FileIndex
{
public Entry3D[] Index { get; }
IFileAccessor FileAccessor { get; set; }
Copy link
Collaborator

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.

Ultima/FileIndex.cs Outdated Show resolved Hide resolved
@AsYlum- AsYlum- changed the title Compressed Gump support Compressed Gump read support Jan 20, 2025
@Krubster
Copy link
Contributor Author

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 :)

Not related to my changes - just mentioning what I've noticed during development

@Krubster Krubster requested a review from AsYlum- January 21, 2025 16:52
@AsYlum-
Copy link
Collaborator

AsYlum- commented Jan 21, 2025

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 :)

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?

@AsYlum- AsYlum- merged commit 7f51c20 into polserver:master Jan 22, 2025
1 check passed
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.

2 participants