1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-13 11:24:40 +00:00

Decompile speed_meter.c and add VIEWPORT_INIT macro (#127)

* Decompile speed_meter.c and add VIEWPORT_INIT macro

- speed_meter.c: OK
- Add VIEWPORT_INIT(viewport, by, rx, ty, lx) macro

* get rid of some magic numbers

* use early return instead of a big if block in SpeedMeter_DrawTimeEntries
This commit is contained in:
Random 2020-05-13 05:05:55 +02:00 committed by GitHub
parent 74a654ecae
commit 08d9fee6e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 249 additions and 749 deletions

View file

@ -1140,10 +1140,7 @@ void Gameplay_Draw(GlobalContext* globalCtx) {
View_Init(&view, gfxCtx);
view.flags = 2 | 8;
// clang-format off
viewport.bottomY = SCREEN_HEIGHT; viewport.rightX = SCREEN_WIDTH;
viewport.topY = 0; viewport.leftX = 0;
// clang-format on
VIEWPORT_INIT(viewport, SCREEN_HEIGHT, SCREEN_WIDTH, 0, 0);
View_SetViewport(&view, &viewport);
func_800AB9EC(&view, 15, &gfxP);