Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
67a4a2c
Add index search to animdata. Add "Select in animdata" to tiledata co…
AsYlum- May 25, 2026
413d09a
Add multi-select for compare plugins.
AsYlum- May 25, 2026
458dc44
Add anim6.mul to animation edit form.
AsYlum- May 25, 2026
90db30d
Add gallery in animation edit form. Change how animation files are lo…
AsYlum- May 25, 2026
ce23f92
Optimize file loading and access.
AsYlum- May 25, 2026
750c6f4
Replace treeview with other controls for faster loading (tiledata, so…
AsYlum- May 25, 2026
bd8eb32
Publish artifacts after PR build.
AsYlum- May 25, 2026
9db8fe0
Improve "Select in..." option to properly switch to tab when used.
AsYlum- May 25, 2026
421bb46
Fix some colors when in dark mode.
AsYlum- May 25, 2026
d86a483
Use configured background color for preview in hue edit form.
AsYlum- May 25, 2026
bb4afd1
Improved radarcol and hue conversion.
AsYlum- May 25, 2026
ef69718
Improve map control performance.
AsYlum- May 25, 2026
6f1cfaf
Minor optimization to items and gumps preload.
AsYlum- May 25, 2026
4e05e3c
More performance optimizations. Update map compare and uop packer plu…
AsYlum- May 26, 2026
d407a67
Move compare map strip menu to context menu for easier access.
AsYlum- May 26, 2026
92303a2
Update multi-select operations in tile view controls.
AsYlum- May 26, 2026
b46aa43
Fix replace with multi-select.
AsYlum- May 26, 2026
529df84
Add WaitCursorScope.
AsYlum- May 26, 2026
ff9b050
Improve multi-select for compare hues control.
AsYlum- May 26, 2026
d4986b3
Use more caching in animations and few other smaller optimizations.
AsYlum- May 26, 2026
541960c
Fix some GDI leaks.
AsYlum- May 26, 2026
1d1cb40
Update RewriteXml method and animation reading logic. Fix coloring of…
AsYlum- May 31, 2026
49a9fd6
Improve loading performance and add search to animation list tab.
AsYlum- May 31, 2026
23290d4
Fix gallery preview tile size in animation edit form.
AsYlum- May 31, 2026
af341dc
Improve loading of animation list.
AsYlum- May 31, 2026
c68e654
Add some comments.
AsYlum- May 31, 2026
27964f2
Add second animation overlay option to animation edit form.
AsYlum- Jun 1, 2026
776c73c
Fix app startup logic.
AsYlum- Jun 1, 2026
b55f5e7
Ignore markers when exporting altitude bitmap in map control.
AsYlum- Jun 1, 2026
b5e8d6c
Update nuget pacakges.
AsYlum- Jun 1, 2026
265747b
Update change log and version.
AsYlum- Jun 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,11 @@ jobs:
- name: Restore & build the application
run: dotnet build $env:Solution_Name --configuration $env:Configuration
env:
Configuration: ${{ matrix.configuration }}
Configuration: ${{ matrix.configuration }}

- name: Upload build artifacts
uses: actions/upload-artifact@v7.0.0
with:
name: UOFiddler-PR${{ github.event.pull_request.number }}-${{ github.sha }}
path: ./UoFiddler/bin/Release/
retention-days: 7
54 changes: 45 additions & 9 deletions Ultima/AnimationEdit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ public sealed class AnimationEdit
private static FileIndex _fileIndex3 = new FileIndex("Anim3.idx", "Anim3.mul", -1);
private static FileIndex _fileIndex4 = new FileIndex("Anim4.idx", "Anim4.mul", -1);
private static FileIndex _fileIndex5 = new FileIndex("Anim5.idx", "Anim5.mul", -1);
private static FileIndex _fileIndex6 = new FileIndex("Anim6.idx", "Anim6.mul", -1);

private static AnimIdx[] _animCache;
private static AnimIdx[] _animCache2;
private static AnimIdx[] _animCache3;
private static AnimIdx[] _animCache4;
private static AnimIdx[] _animCache5;
private static AnimIdx[] _animCache6;

static AnimationEdit()
{
Expand Down Expand Up @@ -50,6 +52,11 @@ private static void InitializeCache()
{
_animCache5 = new AnimIdx[_fileIndex5.IdxLength / 12];
}

if (_fileIndex6.IdxLength > 0)
{
_animCache6 = new AnimIdx[_fileIndex6.IdxLength / 12];
}
}

/// <summary>
Expand All @@ -62,6 +69,7 @@ public static void Reload()
_fileIndex3 = new FileIndex("Anim3.idx", "Anim3.mul", -1);
_fileIndex4 = new FileIndex("Anim4.idx", "Anim4.mul", -1);
_fileIndex5 = new FileIndex("Anim5.idx", "Anim5.mul", -1);
_fileIndex6 = new FileIndex("Anim6.idx", "Anim6.mul", -1);

InitializeCache();
}
Expand Down Expand Up @@ -147,6 +155,22 @@ private static void GetFileIndex(
index = 35000 + ((body - 400) * 175);
}

break;
case 6:
fileIndex = _fileIndex6;
if (body < 200)
{
index = body * 110;
}
else if (body < 400)
{
index = 22000 + ((body - 200) * 65);
}
else
{
index = 35000 + ((body - 400) * 175);
}

break;
}

Expand Down Expand Up @@ -176,6 +200,8 @@ private static AnimIdx[] GetCache(int fileType)
return _animCache4;
case 5:
return _animCache5;
case 6:
return _animCache6;
default:
return _animCache;
}
Expand All @@ -197,6 +223,16 @@ public static AnimIdx GetAnimation(int fileType, int body, int action, int dir)

public static bool IsActionDefined(int fileType, int body, int action)
{
// Reject actions beyond the body's physical idx block before computing
// the index; otherwise index = base + action*5 crosses into the next
// body's records. Replaces a prior off-by-one GetAnimLength check
// (animCount < action) that both missed the boundary and used the
// now-clamped category count.
if (action < 0 || action >= Animations.GetActionCapacity(body, fileType))
{
return false;
}

AnimIdx[] cache = GetCache(fileType);

GetFileIndex(body, fileType, action, 0, out FileIndex fileIndex, out int index);
Expand All @@ -206,12 +242,6 @@ public static bool IsActionDefined(int fileType, int body, int action)
return cache[index].Frames?.Count > 0;
}

int animCount = Animations.GetAnimLength(body, fileType);
if (animCount < action)
{
return false;
}

bool valid = fileIndex.Valid(index, out int length, out int _, out bool _);

return valid && length >= 1;
Expand Down Expand Up @@ -316,6 +346,11 @@ public static void Save(int fileType, string path)
cache = _animCache5;
fileIndex = _fileIndex5;
break;
case 6:
filename = "anim6";
cache = _animCache6;
fileIndex = _fileIndex6;
break;
}

string idx = Path.Combine(path, filename + ".idx");
Expand Down Expand Up @@ -374,7 +409,10 @@ public AnimIdx(int index, FileIndex fileIndex)

_idxExtra = extra;

using (var bin = new BinaryReader(stream))
// leaveOpen: stream is owned by the shared FileIndex; disposing the
// BinaryReader must not close it, or the next FileIndex.Seek pays a
// full re-open.
using (var bin = new BinaryReader(stream, System.Text.Encoding.UTF8, leaveOpen: true))
{
for (int i = 0; i < PaletteCapacity; ++i)
{
Expand All @@ -399,8 +437,6 @@ public AnimIdx(int index, FileIndex fileIndex)
Frames.Add(new FrameEdit(bin));
}
}

stream.Close();
}

public AnimIdx(BinaryReader bin, int extra)
Expand Down
Loading
Loading