Skip to content

Commit

Permalink
salesman gif fix
Browse files Browse the repository at this point in the history
  • Loading branch information
glouw committed Mar 12, 2018
1 parent c4c36cc commit 4993630
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![screenshot](img/salesman.gif)
![screenshot](img/logo.png)

Gel (Graphical Emulation Layer) is an N64-like software renderer.

Expand All @@ -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)
8 changes: 7 additions & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}

Expand Down

0 comments on commit 4993630

Please sign in to comment.