Add animation smoothing
This commit is contained in:
parent
e3d0b3219f
commit
03b703d454
5 changed files with 326 additions and 182 deletions
214
renderer.h
214
renderer.h
|
@ -17,8 +17,8 @@
|
|||
#include "small3dlib.h"
|
||||
|
||||
/// Renderer specific unit, length of one map square.
|
||||
#define LCR_RENDERER_UNIT (S3L_FRACTIONS_PER_UNIT / 2)
|
||||
// ^ just S3L_FRACTIONS_PER_UNIT leaves some tris bugging
|
||||
#define LCR_RENDERER_UNIT (S3L_F / 2)
|
||||
// ^ just S3L_F leaves some tris bugging
|
||||
|
||||
#define LCR_RENDERER_CHUNK_RESOLUTION 4 // do not change
|
||||
#define LCR_RENDERER_LOD_BLOCKS 64 // do not change
|
||||
|
@ -29,7 +29,7 @@
|
|||
#define LCR_RENDERER_CHUNKS_TOTAL (LCR_RENDERER_CHUNK_RESOLUTION * \
|
||||
LCR_RENDERER_CHUNK_RESOLUTION * LCR_RENDERER_CHUNK_RESOLUTION)
|
||||
|
||||
#define LCR_RENDERER_MODEL_COUNT 9
|
||||
#define LCR_RENDERER_MODEL_COUNT 10
|
||||
|
||||
#define LCR_RENDERER_CAR_SCALE (LCR_RENDERER_UNIT / 4)
|
||||
|
||||
|
@ -37,7 +37,8 @@ struct
|
|||
{
|
||||
S3L_Scene scene;
|
||||
S3L_Model3D mapModel; ///< whole map model
|
||||
S3L_Model3D *carModel;
|
||||
S3L_Model3D *carModel;
|
||||
S3L_Model3D *ghostModel;
|
||||
|
||||
// TODO: ghostModel
|
||||
|
||||
|
@ -45,6 +46,7 @@ struct
|
|||
The scene model array.
|
||||
0, 1, 2, 3, 4, 5, 6, 7: nearest map chunk models
|
||||
8: car model
|
||||
9: ghost model
|
||||
*/
|
||||
S3L_Model3D models[LCR_RENDERER_MODEL_COUNT];
|
||||
|
||||
|
@ -70,11 +72,6 @@ struct
|
|||
*/
|
||||
uint8_t gridOfLODs[LCR_RENDERER_LOD_BLOCKS];
|
||||
|
||||
// pixel function precomputed values:
|
||||
uint32_t previousTriID;
|
||||
int triUVs[6];
|
||||
uint8_t texSubsampleCount;
|
||||
|
||||
#if LCR_ANIMATE_CAR
|
||||
S3L_Unit wheelRotation;
|
||||
S3L_Unit wheelTurn;
|
||||
|
@ -82,6 +79,13 @@ struct
|
|||
S3L_Unit animatedCarVerts[LCR_CAR_VERTEX_COUNT * 3];
|
||||
#endif
|
||||
|
||||
// pixel function precomputed values:
|
||||
uint32_t previousTriID;
|
||||
int triUVs[6];
|
||||
int texSubsampleCount;
|
||||
unsigned int flatAndTransparent; /**< If non-zero, transparent (dithered)
|
||||
polygons will be drawn without texture,
|
||||
with color stored in this variable. */
|
||||
} LCR_renderer;
|
||||
|
||||
void LCR_rendererSetCarTransform(LCR_GameUnit position[3],
|
||||
|
@ -95,11 +99,11 @@ void LCR_rendererSetCarTransform(LCR_GameUnit position[3],
|
|||
(position[2] * LCR_RENDERER_UNIT) / LCR_GAME_UNIT;
|
||||
|
||||
LCR_renderer.carModel->transform.rotation.x = S3L_wrap((rotation[0] *
|
||||
S3L_FRACTIONS_PER_UNIT) / LCR_GAME_UNIT,S3L_FRACTIONS_PER_UNIT);
|
||||
S3L_F) / LCR_GAME_UNIT,S3L_F);
|
||||
LCR_renderer.carModel->transform.rotation.y = S3L_wrap((rotation[1] *
|
||||
S3L_FRACTIONS_PER_UNIT) / LCR_GAME_UNIT,S3L_FRACTIONS_PER_UNIT);
|
||||
S3L_F) / LCR_GAME_UNIT,S3L_F);
|
||||
LCR_renderer.carModel->transform.rotation.z = S3L_wrap((rotation[2] *
|
||||
S3L_FRACTIONS_PER_UNIT) / LCR_GAME_UNIT,S3L_FRACTIONS_PER_UNIT);
|
||||
S3L_F) / LCR_GAME_UNIT,S3L_F);
|
||||
}
|
||||
|
||||
void _LCR_pixelFuncc3D(S3L_PixelInfo *pixel)
|
||||
|
@ -108,12 +112,18 @@ void _LCR_pixelFuncc3D(S3L_PixelInfo *pixel)
|
|||
if (pixel->triangleID != LCR_renderer.previousTriID)
|
||||
{
|
||||
LCR_renderer.previousTriID = pixel->triangleID;
|
||||
LCR_renderer.flatAndTransparent = 0;
|
||||
|
||||
#if LCR_SETTING_TEXTURE_SUBSAMPLE != 0
|
||||
LCR_renderer.texSubsampleCount = 0;
|
||||
#endif
|
||||
|
||||
if (pixel->modelIndex == 8)
|
||||
if (pixel->modelIndex == 9)
|
||||
{
|
||||
// car ghost model
|
||||
LCR_renderer.flatAndTransparent = LCR_SETTING_GHOST_COLOR;
|
||||
}
|
||||
else if (pixel->modelIndex == 8)
|
||||
{
|
||||
// car model
|
||||
|
||||
|
@ -197,8 +207,15 @@ void _LCR_pixelFuncc3D(S3L_PixelInfo *pixel)
|
|||
}
|
||||
}
|
||||
|
||||
uint16_t color;
|
||||
if (LCR_renderer.flatAndTransparent)
|
||||
{
|
||||
if (pixel->x % 2 == pixel->y % 2)
|
||||
LCR_drawPixelXYUnsafe(pixel->x,pixel->y,LCR_renderer.flatAndTransparent);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
uint16_t color;
|
||||
|
||||
#if LCR_SETTING_TEXTURE_SUBSAMPLE != 0
|
||||
if (LCR_renderer.texSubsampleCount == 0)
|
||||
|
@ -214,11 +231,11 @@ void _LCR_pixelFuncc3D(S3L_PixelInfo *pixel)
|
|||
(barycentric[0] * LCR_renderer.triUVs[0] +
|
||||
barycentric[1] * LCR_renderer.triUVs[2] +
|
||||
barycentric[2] * LCR_renderer.triUVs[4])
|
||||
/ (S3L_FRACTIONS_PER_UNIT / 8),
|
||||
/ (S3L_F / 8),
|
||||
(barycentric[0] * LCR_renderer.triUVs[1] +
|
||||
barycentric[1] * LCR_renderer.triUVs[3] +
|
||||
barycentric[2] * LCR_renderer.triUVs[5])
|
||||
/ (S3L_FRACTIONS_PER_UNIT / 8));
|
||||
/ (S3L_F / 8));
|
||||
|
||||
#if LCR_SETTING_TEXTURE_SUBSAMPLE != 0
|
||||
LCR_renderer.texSubsampleCount = LCR_SETTING_TEXTURE_SUBSAMPLE;
|
||||
|
@ -755,6 +772,7 @@ uint8_t LCR_rendererInit(void)
|
|||
_LCR_rendererComputeLOD();
|
||||
|
||||
LCR_renderer.carModel = LCR_renderer.models + 8;
|
||||
LCR_renderer.ghostModel = LCR_renderer.models + 9;
|
||||
|
||||
S3L_model3DInit(
|
||||
#if LCR_ANIMATE_CAR
|
||||
|
@ -766,6 +784,20 @@ uint8_t LCR_rendererInit(void)
|
|||
LCR_carTriangles,LCR_CAR_TRIANGLE_COUNT,
|
||||
LCR_renderer.carModel);
|
||||
|
||||
S3L_vec4Set(&(LCR_renderer.carModel->transform.scale),
|
||||
LCR_RENDERER_CAR_SCALE,LCR_RENDERER_CAR_SCALE,LCR_RENDERER_CAR_SCALE,0);
|
||||
|
||||
S3L_model3DInit(
|
||||
LCR_carVertices
|
||||
,LCR_CAR_VERTEX_COUNT,
|
||||
LCR_carTriangles,LCR_CAR_TRIANGLE_COUNT,
|
||||
LCR_renderer.ghostModel);
|
||||
|
||||
LCR_renderer.ghostModel->transform.scale =
|
||||
LCR_renderer.carModel->transform.scale;
|
||||
|
||||
LCR_renderer.ghostModel->transform.translation.x -= LCR_GAME_UNIT / 4;
|
||||
|
||||
#if LCR_ANIMATE_CAR
|
||||
for (int i = 0; i < LCR_CAR_VERTEX_COUNT * 3; ++i)
|
||||
LCR_renderer.animatedCarVerts[i] = LCR_carVertices[i];
|
||||
|
@ -799,10 +831,6 @@ uint8_t LCR_rendererInit(void)
|
|||
LCR_renderer.wheelTurn = 0;
|
||||
#endif
|
||||
|
||||
LCR_renderer.carModel->transform.scale.x = LCR_RENDERER_CAR_SCALE;
|
||||
LCR_renderer.carModel->transform.scale.y = LCR_RENDERER_CAR_SCALE;
|
||||
LCR_renderer.carModel->transform.scale.z = LCR_RENDERER_CAR_SCALE;
|
||||
|
||||
S3L_sceneInit(
|
||||
LCR_renderer.models,LCR_RENDERER_MODEL_COUNT,&LCR_renderer.scene);
|
||||
|
||||
|
@ -820,14 +848,14 @@ void LCR_rendererGetCameraTransform(LCR_GameUnit position[3],
|
|||
LCR_GAME_UNIT) / LCR_RENDERER_UNIT;
|
||||
|
||||
rotation[0] = (LCR_renderer.scene.camera.transform.rotation.x *
|
||||
LCR_GAME_UNIT) / S3L_FRACTIONS_PER_UNIT;
|
||||
LCR_GAME_UNIT) / S3L_F;
|
||||
rotation[1] = (LCR_renderer.scene.camera.transform.rotation.y *
|
||||
LCR_GAME_UNIT) / S3L_FRACTIONS_PER_UNIT;
|
||||
LCR_GAME_UNIT) / S3L_F;
|
||||
rotation[2] = (LCR_renderer.scene.camera.transform.rotation.z *
|
||||
LCR_GAME_UNIT) / S3L_FRACTIONS_PER_UNIT;
|
||||
LCR_GAME_UNIT) / S3L_F;
|
||||
|
||||
*fov = (LCR_renderer.scene.camera.focalLength * LCR_GAME_UNIT)
|
||||
/ S3L_FRACTIONS_PER_UNIT;
|
||||
/ S3L_F;
|
||||
}
|
||||
|
||||
void LCR_rendererMoveCamera(LCR_GameUnit forwRightUpOffset[3],
|
||||
|
@ -836,29 +864,29 @@ void LCR_rendererMoveCamera(LCR_GameUnit forwRightUpOffset[3],
|
|||
S3L_Vec4 f, r, u;
|
||||
|
||||
S3L_rotationToDirections(LCR_renderer.scene.camera.transform.rotation,
|
||||
S3L_FRACTIONS_PER_UNIT,&f,&r,&u);
|
||||
S3L_F,&f,&r,&u);
|
||||
|
||||
LCR_renderer.scene.camera.transform.translation.x +=
|
||||
((f.x * forwRightUpOffset[0] + r.x * forwRightUpOffset[1] +
|
||||
u.x * forwRightUpOffset[2]) * S3L_FRACTIONS_PER_UNIT) / LCR_GAME_UNIT;
|
||||
u.x * forwRightUpOffset[2]) * S3L_F) / LCR_GAME_UNIT;
|
||||
|
||||
LCR_renderer.scene.camera.transform.translation.y +=
|
||||
((f.y * forwRightUpOffset[0] + r.y * forwRightUpOffset[1] +
|
||||
u.y * forwRightUpOffset[2]) * S3L_FRACTIONS_PER_UNIT) / LCR_GAME_UNIT;
|
||||
u.y * forwRightUpOffset[2]) * S3L_F) / LCR_GAME_UNIT;
|
||||
|
||||
LCR_renderer.scene.camera.transform.translation.z +=
|
||||
((f.z * forwRightUpOffset[0] + r.z * forwRightUpOffset[1] +
|
||||
u.z * forwRightUpOffset[2]) * S3L_FRACTIONS_PER_UNIT) / LCR_GAME_UNIT;
|
||||
u.z * forwRightUpOffset[2]) * S3L_F) / LCR_GAME_UNIT;
|
||||
|
||||
LCR_renderer.scene.camera.transform.rotation.y = S3L_wrap(
|
||||
LCR_renderer.scene.camera.transform.rotation.y +
|
||||
(yawPitchOffset[0] * S3L_FRACTIONS_PER_UNIT) / LCR_GAME_UNIT,
|
||||
S3L_FRACTIONS_PER_UNIT);
|
||||
(yawPitchOffset[0] * S3L_F) / LCR_GAME_UNIT,
|
||||
S3L_F);
|
||||
|
||||
LCR_renderer.scene.camera.transform.rotation.x = S3L_clamp(
|
||||
LCR_renderer.scene.camera.transform.rotation.x +
|
||||
(yawPitchOffset[1] * S3L_FRACTIONS_PER_UNIT) / LCR_GAME_UNIT,
|
||||
-1 * S3L_FRACTIONS_PER_UNIT / 4,S3L_FRACTIONS_PER_UNIT / 4);
|
||||
(yawPitchOffset[1] * S3L_F) / LCR_GAME_UNIT,
|
||||
-1 * S3L_F / 4,S3L_F / 4);
|
||||
|
||||
#define chk(o,c,l) \
|
||||
if (LCR_renderer.scene.camera.transform.translation.c o l) \
|
||||
|
@ -976,7 +1004,7 @@ void _LCR_rendererDrawLODBlock(int blockX, int blockY, int blockZ, unsigned int
|
|||
|
||||
/**
|
||||
Draws background sky, offsets are in multiples of screen dimensions
|
||||
(e.g. S3L_FRACTIONS_PER_UNIT / 2 for offsetH means half the screen width).
|
||||
(e.g. S3L_F / 2 for offsetH means half the screen width).
|
||||
*/
|
||||
void LCR_rendererDrawSky(int sky, S3L_Unit offsetH, S3L_Unit offsetV)
|
||||
{
|
||||
|
@ -993,7 +1021,7 @@ void LCR_rendererDrawSky(int sky, S3L_Unit offsetH, S3L_Unit offsetV)
|
|||
bottomColor = LCR_sampleImage(LCR_IMAGE_SIZE - 1,LCR_IMAGE_SIZE - 1);
|
||||
|
||||
anchorPoint[0] = ((LCR_EFFECTIVE_RESOLUTION_X * offsetH)
|
||||
/ S3L_FRACTIONS_PER_UNIT) %
|
||||
/ S3L_F) %
|
||||
(2 * LCR_IMAGE_SIZE * LCR_SETTING_SKY_SIZE);
|
||||
|
||||
if (anchorPoint[0] < 0)
|
||||
|
@ -1001,7 +1029,7 @@ void LCR_rendererDrawSky(int sky, S3L_Unit offsetH, S3L_Unit offsetV)
|
|||
|
||||
anchorPoint[1] =
|
||||
(LCR_EFFECTIVE_RESOLUTION_Y) / 3 - // 3: we place the center a bit more up
|
||||
(LCR_EFFECTIVE_RESOLUTION_Y * offsetV) / S3L_FRACTIONS_PER_UNIT
|
||||
(LCR_EFFECTIVE_RESOLUTION_Y * offsetV) / S3L_F
|
||||
- LCR_IMAGE_SIZE * LCR_SETTING_SKY_SIZE;
|
||||
|
||||
pixelIndex = 0;
|
||||
|
@ -1266,8 +1294,8 @@ void _LCR_rendererAnimateCar(void)
|
|||
LCR_renderer.wheelRotationCenters[offset + 1];
|
||||
|
||||
tmp = v[0];
|
||||
v[0] = (v[0] * c - v[1] * s) / S3L_FRACTIONS_PER_UNIT;
|
||||
v[1] = (tmp * s + v[1] * c) / S3L_FRACTIONS_PER_UNIT;
|
||||
v[0] = (v[0] * c - v[1] * s) / S3L_F;
|
||||
v[1] = (tmp * s + v[1] * c) / S3L_F;
|
||||
|
||||
LCR_renderer.animatedCarVerts[index + 2] =
|
||||
v[0] + LCR_renderer.wheelRotationCenters[offset];
|
||||
|
@ -1282,12 +1310,12 @@ void _LCR_rendererAnimateCar(void)
|
|||
|
||||
LCR_renderer.animatedCarVerts[index + 2] -=
|
||||
(LCR_renderer.animatedCarVerts[index] * LCR_renderer.wheelTurn)
|
||||
/ (8 * S3L_FRACTIONS_PER_UNIT);
|
||||
/ (8 * S3L_F);
|
||||
|
||||
LCR_renderer.animatedCarVerts[index] +=
|
||||
((LCR_renderer.animatedCarVerts[index + 2] -
|
||||
LCR_renderer.wheelRotationCenters[0]) * LCR_renderer.wheelTurn)
|
||||
/ (2 * S3L_FRACTIONS_PER_UNIT);
|
||||
/ (2 * S3L_F);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1296,86 +1324,57 @@ void _LCR_rendererAnimateCar(void)
|
|||
|
||||
void LCR_rendererCameraFollow(void)
|
||||
{
|
||||
S3L_Transform3D transPrev =
|
||||
LCR_renderer.scene.camera.transform;
|
||||
|
||||
|
||||
/*
|
||||
LCR_renderer.scene.camera.transform.translation.y =
|
||||
LCR_renderer.carModel->transform.translation.y + LCR_RENDERER_UNIT;
|
||||
*/
|
||||
|
||||
/*
|
||||
TPE_Vec3 cPos = TPE_vec3KeepWithinDistanceBand(
|
||||
TPE_vec3(
|
||||
s3l_scene.camera.transform.translation.x,
|
||||
s3l_scene.camera.transform.translation.y,
|
||||
s3l_scene.camera.transform.translation.z
|
||||
),carBody->joints[4].position,4 * TPE_F,6 * TPE_F);
|
||||
|
||||
s3l_scene.camera.transform.translation.x = cPos.x;
|
||||
s3l_scene.camera.transform.translation.y = cPos.y;
|
||||
s3l_scene.camera.transform.translation.z = cPos.z;
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
S3L_Unit tmp =
|
||||
LCR_renderer.scene.camera.transform.translation.y -
|
||||
LCR_renderer.carModel->transform.translation.y;
|
||||
|
||||
tmp -= S3L_clamp(tmp,
|
||||
(LCR_SETTING_CAMERA_HEIGHT -
|
||||
LCR_SETTING_CAMERA_HEIGHT_BAND) * LCR_GAME_UNIT / 8,
|
||||
(LCR_SETTING_CAMERA_HEIGHT +
|
||||
LCR_SETTING_CAMERA_HEIGHT_BAND) * LCR_GAME_UNIT / 8);
|
||||
|
||||
LCR_renderer.scene.camera.transform.translation.y -= tmp;
|
||||
*/
|
||||
|
||||
LCR_renderer.scene.camera.transform.translation.y =
|
||||
S3L_clamp(
|
||||
LCR_renderer.scene.camera.transform.translation.y,
|
||||
LCR_renderer.carModel->transform.translation.y +
|
||||
(LCR_SETTING_CAMERA_HEIGHT - LCR_SETTING_CAMERA_HEIGHT_BAND) *
|
||||
LCR_GAME_UNIT / 8,
|
||||
LCR_renderer.carModel->transform.translation.y +
|
||||
(LCR_SETTING_CAMERA_HEIGHT + LCR_SETTING_CAMERA_HEIGHT_BAND) *
|
||||
LCR_GAME_UNIT / 8);
|
||||
|
||||
LCR_renderer.scene.camera.transform.translation.x =
|
||||
S3L_clamp(
|
||||
LCR_renderer.scene.camera.transform.translation.x,
|
||||
LCR_renderer.carModel->transform.translation.x -
|
||||
LCR_SETTING_CAMERA_MAX_DISTANCE * LCR_GAME_UNIT / 4,
|
||||
LCR_renderer.carModel->transform.translation.x +
|
||||
LCR_SETTING_CAMERA_MAX_DISTANCE * LCR_GAME_UNIT / 4);
|
||||
|
||||
LCR_renderer.scene.camera.transform.translation.z =
|
||||
S3L_clamp(
|
||||
LCR_renderer.scene.camera.transform.translation.z,
|
||||
LCR_renderer.carModel->transform.translation.z -
|
||||
LCR_SETTING_CAMERA_MAX_DISTANCE * LCR_GAME_UNIT / 4,
|
||||
LCR_renderer.carModel->transform.translation.z +
|
||||
LCR_SETTING_CAMERA_MAX_DISTANCE * LCR_GAME_UNIT / 4);
|
||||
|
||||
S3L_clamp(
|
||||
LCR_renderer.scene.camera.transform.translation.y,
|
||||
LCR_renderer.carModel->transform.translation.y +
|
||||
(LCR_SETTING_CAMERA_HEIGHT - LCR_SETTING_CAMERA_HEIGHT_BAND) *
|
||||
LCR_RENDERER_UNIT / 8,
|
||||
LCR_renderer.carModel->transform.translation.y +
|
||||
(LCR_SETTING_CAMERA_HEIGHT + LCR_SETTING_CAMERA_HEIGHT_BAND) *
|
||||
LCR_RENDERER_UNIT / 8);
|
||||
|
||||
LCR_renderer.scene.camera.transform.translation.x =
|
||||
S3L_clamp(
|
||||
LCR_renderer.scene.camera.transform.translation.x,
|
||||
LCR_renderer.carModel->transform.translation.x -
|
||||
LCR_SETTING_CAMERA_MAX_DISTANCE * LCR_RENDERER_UNIT / 4,
|
||||
LCR_renderer.carModel->transform.translation.x +
|
||||
LCR_SETTING_CAMERA_MAX_DISTANCE * LCR_RENDERER_UNIT / 4);
|
||||
|
||||
LCR_renderer.scene.camera.transform.translation.z =
|
||||
S3L_clamp(
|
||||
LCR_renderer.scene.camera.transform.translation.z,
|
||||
LCR_renderer.carModel->transform.translation.z -
|
||||
LCR_SETTING_CAMERA_MAX_DISTANCE * LCR_RENDERER_UNIT / 4,
|
||||
LCR_renderer.carModel->transform.translation.z +
|
||||
LCR_SETTING_CAMERA_MAX_DISTANCE * LCR_RENDERER_UNIT / 4);
|
||||
|
||||
S3L_lookAt(LCR_renderer.carModel->transform.translation,
|
||||
&(LCR_renderer.scene.camera.transform));
|
||||
|
||||
#if LCR_SETTING_SMOOTH_ANIMATIONS
|
||||
// now average with previous transform to smooth the animation out:
|
||||
S3L_vec3Add(&(LCR_renderer.scene.camera.transform.translation),
|
||||
transPrev.translation);
|
||||
|
||||
/*
|
||||
TPE_Unit angleDiff = s3l_scene.camera.transform.rotation.y -
|
||||
(TPE_vec2Angle(toCar.x,toCar.z) - 128);
|
||||
LCR_renderer.scene.camera.transform.translation.x /= 2;
|
||||
LCR_renderer.scene.camera.transform.translation.y /= 2;
|
||||
LCR_renderer.scene.camera.transform.translation.z /= 2;
|
||||
|
||||
s3l_scene.camera.transform.rotation.y -=
|
||||
(angleDiff < 100 && angleDiff > -100) ? angleDiff / 2 : angleDiff;
|
||||
*/
|
||||
transPrev.rotation.x -= LCR_renderer.scene.camera.transform.rotation.x;
|
||||
transPrev.rotation.y -= LCR_renderer.scene.camera.transform.rotation.y;
|
||||
|
||||
if (S3L_abs(transPrev.rotation.x) < S3L_F / 4)
|
||||
LCR_renderer.scene.camera.transform.rotation.x += transPrev.rotation.x / 2;
|
||||
|
||||
LCR_renderer.scene.camera.transform.rotation.y += transPrev.rotation.y / 2;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
void LCR_rendererDraw(void)
|
||||
{
|
||||
LCR_renderer.previousTriID = -1;
|
||||
|
@ -1394,12 +1393,11 @@ LCR_renderer.wheelTurn = S3L_sin(LCR_renderer.frame * 4);
|
|||
_LCR_rendererAnimateCar();
|
||||
#endif
|
||||
|
||||
LCR_rendererCameraFollow();
|
||||
|
||||
LCR_drawLevelFloor();
|
||||
LCR_rendererDrawLOD();
|
||||
|
||||
S3L_drawScene(LCR_renderer.scene);
|
||||
|
||||
LCR_renderer.frame++;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue