Defines | Functions | Variables

Main.cpp File Reference

#include <iostream>
#include <iomanip>
#include <sstream>
#include <cstdarg>
#include <vector>
#include <GL/glew.h>
#include <GL/glut.h>
#include "md3-model/Md3Player.h"
#include "md3-model/TextureManager.h"
Include dependency graph for Main.cpp:

Go to the source code of this file.

Defines

#define FREEGLUT_STATIC
#define GLUT_STATIC_LIB
#define GLEW_STATIC

Functions

static void animMenu (int item)
static void skinMenu (int item)
int buildSkinMenu (const Md3Player::SkinMap &skinMap)
static int buildAnimMenu (int start, int end)
static void shutdownApp ()
static void init (const string &playerpath, const string &weaponpath)
static void reshape (int w, int h)
static void updateTimer (struct glut_timer_t *t)
static void handleKeyboard (struct keyboard_input_t *k)
static void begin2D ()
static void end2D ()
static int glPrintf (const char *format,...)
static void gameLogic ()
static void draw3D ()
static void draw2D ()
static void display ()
static void keyPress (unsigned char key, int x, int y)
static void keyUp (unsigned char key, int x, int y)
static void specialKeyPress (int key, int x, int y)
static void specialKeyUp (int key, int x, int y)
static void mouseMotion (int x, int y)
static void mouseButton (int button, int state, int x, int y)
static void idleVisible ()
static void windowStatus (int state)
int main (int argc, char *argv[])

Variables

struct keyboard_input_t keyboard
struct mouse_input_t mouse
struct glut_timer_t timer
struct Vector_3d rot
struct Vector_3d eye
const string animStrings [kMaxAnimations]
Md3Playerplayer = NULL
Md3Weaponweapon = NULL
bool bTextured = true
bool bLightGL = true
bool bAnimated = true
bool bWeapon = false
int verbose = 2
int fps = 0
vector< string > skinList

Define Documentation

#define FREEGLUT_STATIC

Definition at line 25 of file Main.cpp.

#define GLUT_STATIC_LIB

Definition at line 26 of file Main.cpp.

#define GLEW_STATIC

Definition at line 27 of file Main.cpp.


Function Documentation

static void animMenu ( int  item  )  [static]

Definition at line 103 of file Main.cpp.

static void skinMenu ( int  item  )  [static]

Definition at line 112 of file Main.cpp.

int buildSkinMenu ( const Md3Player::SkinMap skinMap  ) 

Definition at line 127 of file Main.cpp.

static int buildAnimMenu ( int  start,
int  end 
) [static]

Definition at line 158 of file Main.cpp.

static void shutdownApp (  )  [static]

Definition at line 176 of file Main.cpp.

static void init ( const string &  playerpath,
const string &  weaponpath 
) [static]

Definition at line 193 of file Main.cpp.

static void reshape ( int  w,
int  h 
) [static]

Definition at line 326 of file Main.cpp.

static void updateTimer ( struct glut_timer_t *  t  )  [static]

Definition at line 351 of file Main.cpp.

static void handleKeyboard ( struct keyboard_input_t *  k  )  [static]

Definition at line 366 of file Main.cpp.

static void begin2D (  )  [static]

Definition at line 382 of file Main.cpp.

static void end2D (  )  [static]

Definition at line 405 of file Main.cpp.

static int glPrintf ( const char *  format,
  ... 
) [static]

Definition at line 420 of file Main.cpp.

static void gameLogic (  )  [static]

Definition at line 446 of file Main.cpp.

static void draw3D (  )  [static]

Definition at line 479 of file Main.cpp.

static void draw2D (  )  [static]

Definition at line 515 of file Main.cpp.

static void display (  )  [static]

Definition at line 556 of file Main.cpp.

static void keyPress ( unsigned char  key,
int  x,
int  y 
) [static]

Definition at line 575 of file Main.cpp.

static void keyUp ( unsigned char  key,
int  x,
int  y 
) [static]

Definition at line 628 of file Main.cpp.

static void specialKeyPress ( int  key,
int  x,
int  y 
) [static]

Definition at line 641 of file Main.cpp.

static void specialKeyUp ( int  key,
int  x,
int  y 
) [static]

Definition at line 654 of file Main.cpp.

static void mouseMotion ( int  x,
int  y 
) [static]

Definition at line 668 of file Main.cpp.

static void mouseButton ( int  button,
int  state,
int  x,
int  y 
) [static]

Definition at line 706 of file Main.cpp.

static void idleVisible (  )  [static]

Definition at line 726 of file Main.cpp.

static void windowStatus ( int  state  )  [static]

Definition at line 747 of file Main.cpp.

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

Definition at line 770 of file Main.cpp.


Variable Documentation

struct keyboard_input_t keyboard
struct mouse_input_t mouse
struct glut_timer_t timer
struct Vector_3d rot
struct Vector_3d eye
const string animStrings[kMaxAnimations]
Initial value:
 {
  "Both death 1", "Both dead 1", "Both death 2", "Both dead 2",
  "Both death 3", "Both dead 3", "Torso gesture", "Torso attack",
  "Torso attack 2", "Torso drop", "Torso raise", "Torso stand",
  "Torso stand 2", "Legs walk crouch", "Legs walk", "Legs run",
  "Legs back", "Legs swim", "Legs jump", "Legs land", "Legs jump B",
  "Legs land B", "Legs idle", "Legs idle crouch", "Legs turn"
}

Definition at line 72 of file Main.cpp.

Md3Player* player = NULL

Definition at line 81 of file Main.cpp.

Md3Weapon* weapon = NULL

Definition at line 82 of file Main.cpp.

bool bTextured = true

Definition at line 84 of file Main.cpp.

bool bLightGL = true

Definition at line 85 of file Main.cpp.

bool bAnimated = true

Definition at line 86 of file Main.cpp.

bool bWeapon = false

Definition at line 87 of file Main.cpp.

int verbose = 2

Definition at line 89 of file Main.cpp.

int fps = 0

Definition at line 90 of file Main.cpp.

vector<string> skinList

Definition at line 92 of file Main.cpp.