|
|
@ -50,6 +50,7 @@ void world_load(const u_long *data, world_t *world) |
|
|
LOAD_CHUNK(ps1bsp_leaf_t, world->leaves, world->numLeaves, bytes, header->leaves); |
|
|
LOAD_CHUNK(ps1bsp_leaf_t, world->leaves, world->numLeaves, bytes, header->leaves); |
|
|
LOAD_CHUNK(u_short, world->leafFaces, world->numLeafFaces, bytes, header->leafFaces); |
|
|
LOAD_CHUNK(u_short, world->leafFaces, world->numLeafFaces, bytes, header->leafFaces); |
|
|
LOAD_CHUNK(u_char, world->visData, world->numVisData, bytes, header->visData); |
|
|
LOAD_CHUNK(u_char, world->visData, world->numVisData, bytes, header->visData); |
|
|
|
|
|
LOAD_CHUNK(ps1bsp_model_t, world->models, world->numModels, bytes, header->models); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static INLINE short world_pointPlaneDist(const VECTOR *point, const ps1bsp_plane_t *plane) |
|
|
static INLINE short world_pointPlaneDist(const VECTOR *point, const ps1bsp_plane_t *plane) |
|
|
@ -315,7 +316,7 @@ void world_draw(const world_t *world) |
|
|
world_drawface = &world_drawface_lit; |
|
|
world_drawface = &world_drawface_lit; |
|
|
|
|
|
|
|
|
ps1bsp_leaf_t *firstLeaf = NULL; |
|
|
ps1bsp_leaf_t *firstLeaf = NULL; |
|
|
world_sortLeafs(world, 0, pvs, &firstLeaf); |
|
|
|
|
|
|
|
|
world_sortLeafs(world, world->models[0].nodeId, pvs, &firstLeaf); |
|
|
ps1bsp_face_t *firstFace = world_sortFaces(world, firstLeaf); |
|
|
ps1bsp_face_t *firstFace = world_sortFaces(world, firstLeaf); |
|
|
world_drawFaces(world, firstFace); |
|
|
world_drawFaces(world, firstFace); |
|
|
} |
|
|
} |