1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-15 20:35:13 +00:00

Document HREG debugging system (#1351)

* progress

* progress

* change

* named most

* name prerender things

* fix and format

* play prefix

* address most comments (still a few more things to do)

* fix error

* reword input test comments

* some more

* rework env draw flags

* add hilite

* merge and format

* init to proper values

* rename env draw flag names

* 7 to 6

* more small changes
This commit is contained in:
fig02 2022-11-26 15:22:01 -05:00 committed by GitHub
parent 274743738b
commit eb0a82c513
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 370 additions and 188 deletions

View file

@ -310,16 +310,17 @@ s32 View_ApplyPerspective(View* view) {
height = view->viewport.bottomY - view->viewport.topY;
aspect = (f32)width / (f32)height;
if (HREG(80) == 11) {
if (HREG(94) != 11) {
HREG(94) = 11;
HREG(83) = 60;
HREG(84) = 13333;
HREG(85) = 10;
HREG(86) = 12800;
HREG(87) = 100;
if (R_HREG_MODE == HREG_MODE_PERSPECTIVE) {
if (R_PERSPECTIVE_INIT != HREG_MODE_PERSPECTIVE) {
R_PERSPECTIVE_INIT = HREG_MODE_PERSPECTIVE;
R_PERSPECTIVE_FOVY = 60;
R_PERSPECTIVE_ASPECT = (10000 * 4) / 3;
R_PERSPECTIVE_NEAR = 10;
R_PERSPECTIVE_FAR = 12800;
R_PERSPECTIVE_SCALE = 100;
}
guPerspective(projection, &view->normal, HREG(83), HREG(84) / 10000.0f, HREG(85), HREG(86), HREG(87) / 100.0f);
guPerspective(projection, &view->normal, R_PERSPECTIVE_FOVY, R_PERSPECTIVE_ASPECT / 10000.0f,
R_PERSPECTIVE_NEAR, R_PERSPECTIVE_FAR, R_PERSPECTIVE_SCALE / 100.0f);
} else {
guPerspective(projection, &view->normal, view->fovy, aspect, view->zNear, view->zFar, view->scale);
}