-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JSYSTEM: Introducing 'ResourceResolver' concept for resources which r…
…eference other resources J2D BLO files reference other texture resources. The games need a way of resolving these references into the actual resources. A ResourceResolver is a simple callback of the form: `ResourceResolver = (resType: string, resName: string) => any` Note that the arc which contains those resources is not passed directly to the callback, because the BLO file does not know which arc it is being loaded from. Instead, the resolver is expected to have been created with the arc already specified. E.g. In Wind Waker this is handled by `dResControl_c.getResResolver(arcName: string): ResourceResolver` which returns a resolver function for the specified arc. Passing the JKRArchive directly to the BLO was also considered. But in the case of Wind Waker, the BTI images that are referenced have already been loaded by dResCtrl_c, so having the BLO create them again would result in duplicate resources. The callback seems to be the best way to resolve this.
- Loading branch information
1 parent
8c85c4b
commit 5c3eb88
Showing
3 changed files
with
36 additions
and
9 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
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