Address some settings
This commit is contained in:
parent
ff75390a2a
commit
71aa8156e9
5 changed files with 45 additions and 38 deletions
19
renderer.h
19
renderer.h
|
@ -21,6 +21,8 @@
|
|||
#define S3L_PERSPECTIVE_CORRECTION 2
|
||||
#define S3L_NEAR_CROSS_STRATEGY 1
|
||||
#define S3L_Z_BUFFER 1
|
||||
#define LCR_FONT_PIXEL_SIZE (1 + LCR_EFFECTIVE_RESOLUTION_X / 512)
|
||||
#define LCR_ANIMATE_CAR (LCR_SETTING_CAR_ANIMATION_SUBDIVIDE != 0)
|
||||
|
||||
#if LCR_SETTING_POTATO_GRAPHICS
|
||||
#define S3L_PERSPECTIVE_CORRECTION 0
|
||||
|
@ -1129,6 +1131,9 @@ void LCR_rendererGetCameraTransform(LCR_GameUnit position[3],
|
|||
/ S3L_F;
|
||||
}
|
||||
|
||||
/**
|
||||
Moves and rotates camera by given offset in game units.
|
||||
*/
|
||||
void LCR_rendererMoveCamera(LCR_GameUnit forwRightUpOffset[3],
|
||||
LCR_GameUnit yawPitchOffset[2])
|
||||
{
|
||||
|
@ -1137,19 +1142,19 @@ void LCR_rendererMoveCamera(LCR_GameUnit forwRightUpOffset[3],
|
|||
S3L_Vec4 f, r, u;
|
||||
|
||||
S3L_rotationToDirections(LCR_renderer.scene.camera.transform.rotation,
|
||||
S3L_F,&f,&r,&u);
|
||||
LCR_RENDERER_UNIT,&f,&r,&u);
|
||||
|
||||
LCR_renderer.scene.camera.transform.translation.x +=
|
||||
((f.x * forwRightUpOffset[0] + r.x * forwRightUpOffset[1] +
|
||||
u.x * forwRightUpOffset[2]) * S3L_F) / LCR_GAME_UNIT;
|
||||
(f.x * forwRightUpOffset[0] + r.x * forwRightUpOffset[1] +
|
||||
u.x * forwRightUpOffset[2]) / LCR_GAME_UNIT;
|
||||
|
||||
LCR_renderer.scene.camera.transform.translation.y +=
|
||||
((f.y * forwRightUpOffset[0] + r.y * forwRightUpOffset[1] +
|
||||
u.y * forwRightUpOffset[2]) * S3L_F) / LCR_GAME_UNIT;
|
||||
(f.y * forwRightUpOffset[0] + r.y * forwRightUpOffset[1] +
|
||||
u.y * forwRightUpOffset[2]) / LCR_GAME_UNIT;
|
||||
|
||||
LCR_renderer.scene.camera.transform.translation.z +=
|
||||
((f.z * forwRightUpOffset[0] + r.z * forwRightUpOffset[1] +
|
||||
u.z * forwRightUpOffset[2]) * S3L_F) / LCR_GAME_UNIT;
|
||||
(f.z * forwRightUpOffset[0] + r.z * forwRightUpOffset[1] +
|
||||
u.z * forwRightUpOffset[2]) / LCR_GAME_UNIT;
|
||||
|
||||
LCR_renderer.scene.camera.transform.rotation.y +=
|
||||
(yawPitchOffset[0] * S3L_F) / LCR_GAME_UNIT;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue