From 4993630ae9618275420c96e737fb49e63b6c042e Mon Sep 17 00:00:00 2001 From: Gustav Louw Date: Mon, 12 Mar 2018 10:04:26 -0700 Subject: [PATCH] salesman gif fix --- README.md | 4 ++-- main.c | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f113e49..b84249e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![screenshot](img/salesman.gif) +![screenshot](img/logo.png) Gel (Graphical Emulation Layer) is an N64-like software renderer. @@ -16,4 +16,4 @@ Models, for educational purposes, can be found here: Rotate the screen with the mouse. -![screenshot](img/2018-01-12-220250_800x600_scrot.png) +![screenshot](img/salesman.gif) diff --git a/main.c b/main.c index 23d6456..6bd53e3 100644 --- a/main.c +++ b/main.c @@ -391,7 +391,7 @@ static Triangle tviewnrm(const Triangle n, const Vertex x, const Vertex y, const static Input iinit() { - const Input input = { 0.0f, 0.0f, 0.005f, 0 }; + const Input input = { 3.14, 0.0f, 0.005f, 0 }; SDL_SetRelativeMouseMode(SDL_FALSE); return input; } @@ -407,6 +407,12 @@ static Input ipump(Input input) SDL_GetRelativeMouseState(&dx, &dy); input.xt -= input.sens * dx; input.yt += input.sens * dy; + + input.xt += 0.01f; + + if(input.xt >= 3.1416f * 3) + input.done = 1; + return input; }