Added the dealer proper.
This commit is contained in:
@ -13,7 +13,7 @@ void skywallInit(primitive_t *primitive) {
|
||||
vertice_t vertices[SKYWALL_VERTICE_COUNT];
|
||||
indice_t indices[SKYWALL_INDICE_COUNT];
|
||||
int32_t n, i, j;
|
||||
float x, z, p, r;
|
||||
float x, y, z, p, r;
|
||||
|
||||
// For each slice. We iterate slices+1 to do the wrapping mentioned below.
|
||||
for(i = 0; i < SKYWALL_SLICE_COUNT+1; i++) {
|
||||
@ -33,12 +33,13 @@ void skywallInit(primitive_t *primitive) {
|
||||
// Determine the X/Z for the given radian
|
||||
x = SKYWALL_SIZE * (float)cos(r);
|
||||
z = SKYWALL_SIZE * (float)sin(r);
|
||||
y = SKYWALL_SIZE * 1.333f;
|
||||
|
||||
// Get the start index for the ertices
|
||||
n = i * SKYWALL_VERTICES_PER_SLICE;
|
||||
vertices[n].x = x, vertices[n].y = -SKYWALL_SIZE, vertices[n].z = z;
|
||||
vertices[n].x = x, vertices[n].y = -y, vertices[n].z = z;
|
||||
vertices[n].u = p, vertices[n].v = 1;
|
||||
vertices[n+1].x = x, vertices[n+1].y = SKYWALL_SIZE, vertices[n+1].z = z;
|
||||
vertices[n+1].x = x, vertices[n+1].y = y, vertices[n+1].z = z;
|
||||
vertices[n+1].u = p, vertices[n+1].v = 0;
|
||||
|
||||
if(i == SKYWALL_SLICE_COUNT) continue;
|
||||
|
@ -23,6 +23,6 @@
|
||||
#define SKYWALL_INDICE_COUNT SKYWALL_INDICES_PER_SLICE*SKYWALL_SLICE_COUNT
|
||||
|
||||
/** How big the skywall cylinder is */
|
||||
#define SKYWALL_SIZE 100
|
||||
#define SKYWALL_SIZE 10
|
||||
|
||||
void skywallInit(primitive_t *primitive);
|
Reference in New Issue
Block a user