-
Notifications
You must be signed in to change notification settings - Fork 19
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
LibGUI update for spinning disc animation #80
Merged
Merged
Conversation
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
Added declaration of the following functions: - void drawTextureAlphaResizeTexCoords: this function allows to provide custom texture coordinates and alpha value - void drawTextureResizedAlpha: same as drawTextureResized but with the ability to put a custom alpha value - void setTextureST: to allow changing the wrapping mode for S and T (GX_CLAMP, GX_REPEAT or GX_MIRROR)
Added the following functions: - void drawTextureAlphaResizeTexCoords: this function allows to provide custom texture coordinates and alpha value - void drawTextureResizedAlpha: same as drawTextureResized but with the ability to put a custom alpha value - void setTextureST: to allow changing the wrapping mode for S and T (GX_CLAMP, GX_REPEAT or GX_MIRROR)
Added declaration of the following functions: - void drawAlpha: calls the underlying draw.cpp function to draw a texture with a given alpha value as input - void drawTextureAlphaTexCoords: calls the underlying draw.cpp function to draw a texture with custom texture coordinates and alpha value - void setTextureWrap: to set the texture coordinate wrapping strategy in the S and T directions
Added the following functions: - void drawAlpha: calls the underlying draw.cpp function to draw a texture with a given alpha value as input - void drawTextureAlphaTexCoords: calls the underlying draw.cpp function to draw a texture with custom texture coordinates and alpha value - void setTextureWrap: to set the texture coordinate wrapping strategy in the S and T directions
To store external disc PNG images: they have to be less than 256 x 256 to work properly
used to create the discs folder
Added a "Wii game loading screen" setting that can be set to: - Default (verbose): traditional Hiidra loading - Spinning Disc: to show a spinning disc while loading the game
Two header files: - ash.h contains the declaration of ashExtract: function used to decode the ASH file from the Wii NAND that contains the Wii disc and disc shadow assets - discAnim.h contains the declaration of discAnim: function that loads the disc either from the NAND or from the usb (located in "/rvloader/discs/GAMEID.png") and animates it
Change int bootHiidra declaration to allow passing the gameIDString that will be required further down to load the proper PNG in discAnim
Changed the declaration of two functions: - void bootWiiGame: to pass the gameIDString variable needed further down by discAnim (called by bootHiidra) - void bootDiscLoader: to give it a variable to hide the log lines normally displayed by discLoader when verbose
Changed the call to bootWiiGame to pass the gameIDString argument, needed further down by discAnim
- ash.cpp contains the ashExtract function: depending on the console region, will open the correct ASH file and decode it from the NAND. The ASH file contains the Wii disc and Wii disc shadow assets (TPLs) - discAnim.cpp takes the necessary assets and renders a spinning disc animation. The disc will enter the tray once the insertDisc flag is set to 1 (done in bootHiidraThread in hiidra.cpp)
- added flag volatile bool hideLogLines: when the spinning disc animation is shown, we don't want to display log lines, this flag is used to toggling that - in bootHiidraThread, before calling bootDiscLoader: we set the insertDisc flag to 1, which triggers the disc insertion in the tray, and we wait 1s (udelay) before calling bootDiscLoader to let the animation finish properly - in hiidraAddLogLine and hiidraUpdateLogLine: we use the flag hideLogLines, if set to true, we return directly to not interfere with the animation - in bootHiidra: we open the main config file to check if we show the spinning disc animation or regular (verbose) hiidra loading, and we check if the game to be loaded is a Wii game or a VC game. Depending on the conditions we then call ashExtract and discAnim or not
- bootWiiGame now passes the gameIDString argument needed by discAnim to load the proper PNG image for the spinning disc animation - modified void bootDiscLoader(bool hideLog) function to tell bootDiscLoader if we want it to display its log lines or not by passing a command line argument '0' (no) or '1' (yes)
Added wiiLoad value in main config to toggle between default (verbose) Wii game loading or spinning disc animation Wii game loading screen By default set to 0 (default (verbose))
Toggle displaying log lines depending on received command line arguments from bootDiscLoader function (in main/hiidra.cpp)
Toggle displaying log lines depending on hideLines flag
Declare hideLines flag to toggle between displaying log lines or not
Added #include disc.h to have the hideLines flag. Toggling log lines depending on the flag's value
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added functions in
draw.cpp
andguiimage.cpp