Continue physics
This commit is contained in:
parent
1c6666b377
commit
46c8a4eade
4 changed files with 122 additions and 23 deletions
15
renderer.h
15
renderer.h
|
@ -7,7 +7,7 @@
|
|||
|
||||
#define S3L_RESOLUTION_X LCR_SETTING_RESOLUTION_X
|
||||
#define S3L_RESOLUTION_Y LCR_SETTING_RESOLUTION_Y
|
||||
#define S3L_PIXEL_FUNCTION LCR_pixelFunc3D
|
||||
#define S3L_PIXEL_FUNCTION _LCR_pixelFuncc3D
|
||||
|
||||
#define S3L_PERSPECTIVE_CORRECTION 2
|
||||
#define S3L_NEAR_CROSS_STRATEGY 1
|
||||
|
@ -82,7 +82,18 @@ struct
|
|||
|
||||
} LCR_renderer;
|
||||
|
||||
void LCR_pixelFunc3D(S3L_PixelInfo *pixel)
|
||||
void LCR_rendererSetCarTransform(LCR_GameUnit position[3],
|
||||
LCR_GameUnit rotation[3])
|
||||
{
|
||||
LCR_renderer.carModel->transform.translation.x =
|
||||
(position[0] * LCR_RENDERER_UNIT) / LCR_GAME_UNIT;
|
||||
LCR_renderer.carModel->transform.translation.y =
|
||||
(position[1] * LCR_RENDERER_UNIT) / LCR_GAME_UNIT;
|
||||
LCR_renderer.carModel->transform.translation.z =
|
||||
(position[2] * LCR_RENDERER_UNIT) / LCR_GAME_UNIT;
|
||||
}
|
||||
|
||||
void _LCR_pixelFuncc3D(S3L_PixelInfo *pixel)
|
||||
{
|
||||
// once we get a new triangle, we precompute things for it:
|
||||
if (pixel->triangleID != LCR_renderer.previousTriID)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue