Add block types
This commit is contained in:
parent
e068b02b9f
commit
f1bbb1e1b6
5 changed files with 93 additions and 104 deletions
18
renderer.h
18
renderer.h
|
@ -8,10 +8,8 @@
|
|||
#define S3L_RESOLUTION_X LCR_SETTING_RESOLUTION_X
|
||||
#define S3L_RESOLUTION_Y LCR_SETTING_RESOLUTION_Y
|
||||
#define S3L_PIXEL_FUNCTION _LCR_pixelFunc3D
|
||||
|
||||
#define S3L_PERSPECTIVE_CORRECTION 2
|
||||
#define S3L_NEAR_CROSS_STRATEGY 1
|
||||
|
||||
#define S3L_Z_BUFFER 1
|
||||
|
||||
#include "small3dlib.h"
|
||||
|
@ -30,7 +28,6 @@
|
|||
LCR_RENDERER_CHUNK_RESOLUTION * LCR_RENDERER_CHUNK_RESOLUTION)
|
||||
|
||||
#define LCR_RENDERER_MODEL_COUNT 10
|
||||
|
||||
#define LCR_RENDERER_CAR_SCALE (LCR_RENDERER_UNIT / 4)
|
||||
|
||||
struct
|
||||
|
@ -40,8 +37,6 @@ struct
|
|||
S3L_Model3D *carModel;
|
||||
S3L_Model3D *ghostModel;
|
||||
|
||||
// TODO: ghostModel
|
||||
|
||||
/**
|
||||
The scene model array.
|
||||
0, 1, 2, 3, 4, 5, 6, 7: nearest map chunk models
|
||||
|
@ -426,16 +421,14 @@ uint8_t _LCR_rendererCheckMapTriCover(const S3L_Index *t1,
|
|||
((t3[1] == t2[0] || t3[1] == t2[1] || t3[1] == t2[2]) << 1) |
|
||||
((t3[2] == t2[0] || t3[2] == t2[1] || t3[2] == t2[2]) << 2);
|
||||
|
||||
if (
|
||||
t3 != t1 && t3 != t2 &&
|
||||
if (t3 != t1 && t3 != t2 &&
|
||||
(sharedVerts == 3 || sharedVerts == 5 || sharedVerts == 6) &&
|
||||
LCR_renderer.mapVerts[3 * t3[0] + plane] ==
|
||||
LCR_renderer.mapVerts[3 * t3[1] + plane] &&
|
||||
LCR_renderer.mapVerts[3 * t3[1] + plane] ==
|
||||
LCR_renderer.mapVerts[3 * t3[2] + plane] &&
|
||||
LCR_renderer.mapVerts[3 * t3[0] + plane] ==
|
||||
LCR_renderer.mapVerts[3 * t1[0] + plane]
|
||||
)
|
||||
LCR_renderer.mapVerts[3 * t1[0] + plane])
|
||||
{
|
||||
// here shares exactly two vertices and is in the same plane
|
||||
|
||||
|
@ -787,11 +780,8 @@ uint8_t LCR_rendererInit(void)
|
|||
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);
|
||||
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue