summaryrefslogtreecommitdiff
path: root/src/code/z_sample.c
diff options
context:
space:
mode:
authorRandom <28494085+Random06457@users.noreply.github.com>2020-05-13 05:05:55 +0200
committerGitHub <noreply@github.com>2020-05-12 23:05:55 -0400
commit08d9fee6e4ccff113287758d71b07a0afde5592e (patch)
tree67fcf7541a45a026a0d76a48e6ab39a54efa0381 /src/code/z_sample.c
parent74a654ecae4359177cee27d1fb83373aae8b1524 (diff)
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
Diffstat (limited to 'src/code/z_sample.c')
-rw-r--r--src/code/z_sample.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/code/z_sample.c b/src/code/z_sample.c
index 0f6f01e20..aa2bfb1bc 100644
--- a/src/code/z_sample.c
+++ b/src/code/z_sample.c
@@ -61,10 +61,7 @@ void Sample_SetupView(SampleContext* this) {
gfxCtx = this->state.gfxCtx;
View_Init(view, gfxCtx);
- // 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_800AA460(view, 60, 10, 12800);