Fix some stuff

This commit is contained in:
Miloslav Ciz 2024-09-10 15:30:07 +02:00
parent 08fb45b652
commit 74ea3dcd41
4 changed files with 615 additions and 405 deletions

10
game.h
View file

@ -21,9 +21,7 @@
COORDINATE SYSTEM AND ROTATIONS: The game itself (racing module) is
independent of rendering and physics libraries, but out of convenient adopts
their coordinate system (X right, Y up, Z forward) and rotations (Euler
angles, by Z, then by X, then Y).
angles, by Z, then by X, then Y).
*/
#ifndef _LCR_GAME_H
@ -206,6 +204,7 @@ LCR_GameUnit physicsInterpolationParam = LCR_GAME_UNIT -
LCR_GameUnit carTransform[6];
LCR_racingGetCarTransform(carTransform,carTransform + 3,
physicsInterpolationParam);
LCR_rendererSetCarTransform(carTransform,carTransform + 3);
while (time >= LCR_game.nextRenderFrameTime)
@ -248,6 +247,11 @@ LCR_GameUnit physicsInterpolationParam = LCR_GAME_UNIT -
else
LCR_rendererCameraFollow();
#if LCR_ANIMATE_CAR
LCR_rendererSetWheelState(LCR_racingGetWheelRotation(),
LCR_racingGetWheelSteer());
#endif
LCR_rendererDraw();
if (LCR_game.debugDraw)