Typedefs | Functions | Variables

libmini-test.cpp File Reference

#include <fstream>
#include <math.h>
#include "common/wave_ex.h"
#include "glut-font/glut-font.h"
#include "perf/perf.h"
#include "pgmppm/pgmppm.h"
#include "wave-glut/camera.h"
#include "wave-glut/glut_2d.h"
#include "wave-glut/wave-glut.h"
#include "terrain/mini.h"
Include dependency graph for libmini-test.cpp:

Go to the source code of this file.

Typedefs

typedef short int height_t

Functions

static point3d_t s_lightPosition (0.0, 0.0, 0.0)
static point3d_t s_lightVelocity (0.0, 0.0,-0.01)
static void onExit (void)
static bool notifyPgmSize (IN void *ctx, IN int width, IN int height, IN int max_val)
static void notifyPgmPixel (IN void *ctx, IN int x, IN int y, IN int height)
static void setTerrain (IN const char *pgm_file, IN const char *ppm_file)
static void addLight (IN int gl_enum, IN const point3d_t &position)
static void setLights (IN const glut::Viewer &walker)
static void debugInfo (IN const glut::Viewer &viewer)
static void updatePosition (IO glut::Viewer &view)
static void onDisplay (void)
static void onIdle (void)
static void onKeys (IN byte_t key, IN int x, IN int y)
static void onSpecial (IN int key, IN int x, IN int y)
static void onReshape (IN int w, IN int h)
int main (IN int argc, IN const char *argv[])

Variables

static const int s_defaultWidth = 800
static const int s_defaultHeight = 600
static int s_screenWidth = s_defaultWidth
static int s_screenHeight = s_defaultHeight
static int s_winid = -1
static int s_wmode = 0
static const int s_delay = 100
static int s_ignoreInput = s_delay
static minitile * s_tileset = NULL
static minicache * s_cache = NULL
static int s_updates = 5
static int s_retval = 0

Typedef Documentation

typedef short int height_t

Definition at line 32 of file libmini-test.cpp.


Function Documentation

static point3d_t s_lightPosition ( 0.  0,
0.  0,
0.  0 
) [static]
static point3d_t s_lightVelocity ( 0.  0,
0.  0,
-0.  01 
) [static]
static void onExit ( void   )  [static]

Definition at line 61 of file libmini-test.cpp.

static bool notifyPgmSize ( IN void *  ctx,
IN int  width,
IN int  height,
IN int  max_val 
) [static]

Definition at line 81 of file libmini-test.cpp.

static void notifyPgmPixel ( IN void *  ctx,
IN int  x,
IN int  y,
IN int  height 
) [static]

Definition at line 102 of file libmini-test.cpp.

static void setTerrain ( IN const char *  pgm_file,
IN const char *  ppm_file 
) [static]

Definition at line 116 of file libmini-test.cpp.

static void addLight ( IN int  gl_enum,
IN const point3d_t &  position 
) [static]

Definition at line 165 of file libmini-test.cpp.

static void setLights ( IN const glut::Viewer walker  )  [static]

Definition at line 198 of file libmini-test.cpp.

static void debugInfo ( IN const glut::Viewer viewer  )  [static]

Definition at line 223 of file libmini-test.cpp.

static void updatePosition ( IO glut::Viewer view  )  [static]

Definition at line 243 of file libmini-test.cpp.

static void onDisplay ( void   )  [static]

Definition at line 307 of file libmini-test.cpp.

static void onIdle ( void   )  [static]

Definition at line 400 of file libmini-test.cpp.

static void onKeys ( IN byte_t  key,
IN int  x,
IN int  y 
) [static]

Definition at line 411 of file libmini-test.cpp.

static void onSpecial ( IN int  key,
IN int  x,
IN int  y 
) [static]

Definition at line 446 of file libmini-test.cpp.

static void onReshape ( IN int  w,
IN int  h 
) [static]

Definition at line 459 of file libmini-test.cpp.

int main ( IN int  argc,
IN const char *  argv[] 
)

Definition at line 481 of file libmini-test.cpp.


Variable Documentation

const int s_defaultWidth = 800 [static]

Definition at line 25 of file libmini-test.cpp.

const int s_defaultHeight = 600 [static]

Definition at line 26 of file libmini-test.cpp.

int s_screenWidth = s_defaultWidth [static]

Definition at line 28 of file libmini-test.cpp.

Definition at line 29 of file libmini-test.cpp.

int s_winid = -1 [static]

Definition at line 34 of file libmini-test.cpp.

int s_wmode = 0 [static]

Definition at line 35 of file libmini-test.cpp.

const int s_delay = 100 [static]

Definition at line 38 of file libmini-test.cpp.

int s_ignoreInput = s_delay [static]

Definition at line 39 of file libmini-test.cpp.

minitile* s_tileset = NULL [static]

Definition at line 42 of file libmini-test.cpp.

minicache* s_cache = NULL [static]

Definition at line 43 of file libmini-test.cpp.

int s_updates = 5 [static]

Definition at line 44 of file libmini-test.cpp.

int s_retval = 0 [static]

Definition at line 50 of file libmini-test.cpp.