-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Proper names with extensions for extracted Bar items
- Loading branch information
Showing
2 changed files
with
43 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using OpenKh.Kh2; | ||
using static OpenKh.Kh2.Bar; | ||
using System.Collections.Generic; | ||
|
||
namespace OpenKh.Tools.BarEditor | ||
{ | ||
public class Helpers | ||
{ | ||
private static readonly string DefaultExtension = "bin"; | ||
|
||
private static readonly Dictionary<EntryType, string> SuggestedExtensions = | ||
new Dictionary<Bar.EntryType, string> | ||
{ | ||
[EntryType.Binary] = "bin", | ||
[EntryType.Ai] = "ai", | ||
[EntryType.Tim2] = "tm2", | ||
[EntryType.SpawnPoint] = "pspwn", | ||
[EntryType.SpawnScript] = "sspwn", | ||
[EntryType.Bar] = "bar", | ||
[EntryType.Pax] = "pax", | ||
[EntryType.AnimationLoader] = "al", | ||
[EntryType.Imgd] = "imd", | ||
[EntryType.Seqd] = "2dd", | ||
[EntryType.Layout] = "2ld", | ||
[EntryType.Imgz] = "imz", | ||
[EntryType.Seb] = "seb", | ||
[EntryType.Wd] = "wd", | ||
[EntryType.RawBitmap] = "rgb", | ||
[EntryType.Vibration] = "vibration", | ||
[EntryType.Vag] = "vag", | ||
|
||
}; | ||
|
||
public static string GetSuggestedExtension(Bar.EntryType type) => | ||
SuggestedExtensions.TryGetValue(type, out var ext) ? ext : DefaultExtension; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters