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; }