diff options
| author | fig02 <fig02srl@gmail.com> | 2022-11-26 15:22:01 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-26 15:22:01 -0500 |
| commit | eb0a82c513a2681de3aa92db623f60630689a525 (patch) | |
| tree | 7310bf1d05a707d377b74ce1eeca8d80a6ad06eb /src/code/z_view.c | |
| parent | 274743738b0db3a07612d610059ee2490728667e (diff) | |
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
Diffstat (limited to 'src/code/z_view.c')
| -rw-r--r-- | src/code/z_view.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/code/z_view.c b/src/code/z_view.c index add977538..328441150 100644 --- a/src/code/z_view.c +++ b/src/code/z_view.c @@ -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); } |
