-
Notifications
You must be signed in to change notification settings - Fork 263
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
Wind Waker: Add black bars to top and bottom during demos #736
Closed
Closed
Changes from 4 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
e187445
Move camera code into new dCamera_c class
themikelester a42a1ca
Enable "trimming". The top and bottom of the screen are scissored out…
themikelester 6d8118d
Update d_place_name to use the correct ortho context
themikelester db62967
Small todo cleanup
themikelester 3fba4cd
Use === instead of ==
themikelester 7ad0b9b
J2DScreen: Remove default J2DGrafContext
themikelester c34e5ef
Replace `dGlobals.camera` with `dCamera_c` class.
themikelester feebf27
Replace all instances of `viewerInput.camera` with `globals.camera`
themikelester 6bbfb69
dCamera_c now extends Camera. Removed `viewerCamera`.
themikelester 9b80db4
Use the dCamera_c projection matrix in scene params, rather than view…
themikelester cb5b495
Fix camera not being able to move. Remove redundant camera updates
themikelester 69675a2
Formatting fixes
themikelester c423902
Disable trimming by default behind `trimmingEnabled` member variable
themikelester 36ea3f8
Factor in deltaTime when computing camera trimming
themikelester d7330a4
Keep the noclip camera in sync with the demo cam so it isn't jarring…
themikelester File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea of splitting dCamera_c out to a separate class, but I believe we should replace
globals.camera
with it. Search for setupFromCamera to see other examples of how I do this elsewhere.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! It turned out to be a bit messier than the other users of setFromCamera because there are several places in src/Common/ and src/gx/ that use
viewerInput.camera
directly. To work around this without doing some bigger refactoring, I madedCamera_c
extendCamera
.I think we'd be better off if Camera wasn't used anywhere in src/Common, and we just passed in matrices, frustums, etc or abstracted whatever is using those up to a higher level. But take a look through this and let me know what you think . And feel free to either make changes directly in the branch too.