Back to index

extremetuxracer  0.5beta
Defines | Typedefs | Variables
quadtree.cpp File Reference
#include "textures.h"
#include "course_load.h"
#include "fog.h"
#include "gl_util.h"
#include "course_render.h"
#include "game_config.h"
#include "ppgltk/alg/defs.h"
#include "quadtree.h"

Go to the source code of this file.

Defines

#define TERRAIN_ERROR_SCALE   0.1
#define VERTEX_FORCE_THRESHOLD   120
#define ERROR_MAGNIFICATION_THRESHOLD   30
#define ERROR_MAGNIFICATION_AMOUNT   3
#define ENV_MAP_ALPHA   50
#define colorval(j, ch)   VNCArray[j*STRIDE_GL_ARRAY+STRIDE_GL_ARRAY-4+(ch)]
#define setalphaval(i)
#define update_min_max(idx, terrain)
#define make_tri_list(tri_func, terrain)
#define make_spezialtri_list(tri_func)

Typedefs

typedef void(* make_tri_func_t )(int a, int b, int c, int terrain)

Variables

terrain_tex_t terrain_texture [NUM_TERRAIN_TYPES]
unsigned int num_terrains
int terrain_count [NUM_TERRAIN_TYPES]
int MaxCreateDepth = 0
int BlockDeleteCount = 0
int BlockUpdateCount = 0
static float DetailThreshold = 100
GLuint VertexIndices [9]
int VertexTerrains [9]
GLubyte * VNCArray
static bool terraintest [NUM_TERRAIN_TYPES]

Define Documentation

#define colorval (   j,
  ch 
)    VNCArray[j*STRIDE_GL_ARRAY+STRIDE_GL_ARRAY-4+(ch)]

Definition at line 48 of file quadtree.cpp.

#define ENV_MAP_ALPHA   50

Definition at line 45 of file quadtree.cpp.

Definition at line 42 of file quadtree.cpp.

Definition at line 39 of file quadtree.cpp.

#define make_spezialtri_list (   tri_func)
Value:
if ((EnabledFlags & 1) == 0 ) { \
       tri_func(0, 2, 8); \
    } else { \
       if (flags & 8) tri_func(0, 1, 8); \
       if (flags & 1) tri_func(0, 2, 1); \
    } \
    if ((EnabledFlags & 2) == 0 ) {  \
       tri_func(0, 4, 2);  \
    } else { \
       if (flags & 1) tri_func(0, 3, 2); \
       if (flags & 2) tri_func(0, 4, 3); \
    } \
    if ((EnabledFlags & 4) == 0 ) { \
       tri_func(0, 6, 4); \
    } else { \
       if (flags & 2) tri_func(0, 5, 4); \
       if (flags & 4) tri_func(0, 6, 5); \
    } \
    if ((EnabledFlags & 8) == 0 ) { \
       tri_func(0, 8, 6); \
    } else { \
       if (flags & 4) tri_func(0, 7, 6); \
       if (flags & 8) tri_func(0, 8, 7); \
    }
#define make_tri_list (   tri_func,
  terrain 
)
Value:
if ((EnabledFlags & 1) == 0 ) { \
       tri_func(0, 2, 8, terrain); \
    } else { \
       if (flags & 8) tri_func(0, 1, 8, terrain); \
       if (flags & 1) tri_func(0, 2, 1, terrain); \
    } \
    if ((EnabledFlags & 2) == 0 ) {  \
       tri_func(0, 4, 2, terrain);  \
    } else { \
       if (flags & 1) tri_func(0, 3, 2, terrain); \
       if (flags & 2) tri_func(0, 4, 3, terrain); \
    } \
    if ((EnabledFlags & 4) == 0 ) { \
       tri_func(0, 6, 4, terrain); \
    } else { \
       if (flags & 2) tri_func(0, 5, 4, terrain); \
       if (flags & 4) tri_func(0, 6, 5, terrain); \
    } \
    if ((EnabledFlags & 8) == 0 ) { \
       tri_func(0, 8, 6, terrain); \
    } else { \
       if (flags & 4) tri_func(0, 7, 6, terrain); \
       if (flags & 8) tri_func(0, 8, 7, terrain); \
    }
#define setalphaval (   i)
Value:
colorval(VertexIndices[i], 3) = \
    ( terrain <= VertexTerrains[i] ) ? 255 : 0

Definition at line 1233 of file quadtree.cpp.

#define TERRAIN_ERROR_SCALE   0.1

Definition at line 31 of file quadtree.cpp.

#define update_min_max (   idx,
  terrain 
)
Value:
if ( idx > VertexArrayMaxIdx[terrain] ) { \
        VertexArrayMaxIdx[terrain] = idx; \
    } \
    if ( idx < VertexArrayMinIdx[terrain] ) { \
        VertexArrayMinIdx[terrain] = idx; \
    }

Definition at line 1236 of file quadtree.cpp.

#define VERTEX_FORCE_THRESHOLD   120

Definition at line 35 of file quadtree.cpp.


Typedef Documentation

typedef void(* make_tri_func_t)(int a, int b, int c, int terrain)

Definition at line 1230 of file quadtree.cpp.


Variable Documentation

Definition at line 750 of file quadtree.cpp.

Definition at line 751 of file quadtree.cpp.

float DetailThreshold = 100 [static]

Definition at line 788 of file quadtree.cpp.

int MaxCreateDepth = 0

Definition at line 612 of file quadtree.cpp.

unsigned int num_terrains

Definition at line 70 of file course_load.cpp.

Definition at line 55 of file quadtree.cpp.

Definition at line 69 of file course_load.cpp.

Definition at line 1300 of file quadtree.cpp.

GLuint VertexIndices[9]

Definition at line 975 of file quadtree.cpp.

Definition at line 976 of file quadtree.cpp.

GLubyte* VNCArray

Definition at line 991 of file quadtree.cpp.