-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Gathered Nitro model bundles and created an empty loader for them.
- Loading branch information
1 parent
4d300e9
commit 089c1d4
Showing
6 changed files
with
50 additions
and
9 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
FinModelUtility/Formats/Nitro/Nitro/src/api/NsbmdModelFileBundle.cs
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,11 @@ | ||
using fin.io; | ||
using fin.model.io; | ||
|
||
namespace nitro.api; | ||
|
||
public class NsbmdModelFileBundle : IModelFileBundle { | ||
public required IReadOnlyTreeFile NsbmdFile { get; init; } | ||
|
||
public required string? GameName { get; init; } | ||
public IReadOnlyTreeFile MainFile => this.NsbmdFile; | ||
} |
20 changes: 20 additions & 0 deletions
20
FinModelUtility/Formats/Nitro/Nitro/src/api/NsbmdModelImporter.cs
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,20 @@ | ||
using fin.model; | ||
using fin.model.impl; | ||
using fin.model.io.importers; | ||
using fin.util.sets; | ||
|
||
namespace nitro.api; | ||
|
||
public class NsbmdModelImporter : IModelImporter<NsbmdModelFileBundle> { | ||
public IModel Import(NsbmdModelFileBundle fileBundle) { | ||
var nsbmdFile = fileBundle.NsbmdFile; | ||
|
||
var files = nsbmdFile.AsFileSet(); | ||
var model = new ModelImpl { | ||
FileBundle = fileBundle, | ||
Files = files, | ||
}; | ||
|
||
return model; | ||
} | ||
} |
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
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
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
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