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.

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

Function Documentation

static void animMenu ( int  item  )  [static]

Definition at line 97 of file Main.cpp.

static void skinMenu ( int  item  )  [static]

Definition at line 106 of file Main.cpp.

int buildSkinMenu ( const Md3Player::SkinMap skinMap  ) 

Definition at line 121 of file Main.cpp.

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

Definition at line 152 of file Main.cpp.

static void shutdownApp (  )  [static]

Definition at line 170 of file Main.cpp.

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

Definition at line 187 of file Main.cpp.

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

Definition at line 320 of file Main.cpp.

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

Definition at line 345 of file Main.cpp.

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

Definition at line 360 of file Main.cpp.

static void begin2D (  )  [static]

Definition at line 376 of file Main.cpp.

static void end2D (  )  [static]

Definition at line 399 of file Main.cpp.

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

Definition at line 414 of file Main.cpp.

static void gameLogic (  )  [static]

Definition at line 440 of file Main.cpp.

static void draw3D (  )  [static]

Definition at line 473 of file Main.cpp.

static void draw2D (  )  [static]

Definition at line 509 of file Main.cpp.

static void display (  )  [static]

Definition at line 550 of file Main.cpp.

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

Definition at line 569 of file Main.cpp.

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

Definition at line 622 of file Main.cpp.

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

Definition at line 635 of file Main.cpp.

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

Definition at line 648 of file Main.cpp.

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

Definition at line 662 of file Main.cpp.

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

Definition at line 700 of file Main.cpp.

static void idleVisible (  )  [static]

Definition at line 720 of file Main.cpp.

static void windowStatus ( int  state  )  [static]

Definition at line 741 of file Main.cpp.

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

Definition at line 764 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 66 of file Main.cpp.

Md3Player* player = NULL

Definition at line 75 of file Main.cpp.

Md3Weapon* weapon = NULL

Definition at line 76 of file Main.cpp.

bool bTextured = true

Definition at line 78 of file Main.cpp.

bool bLightGL = true

Definition at line 79 of file Main.cpp.

bool bAnimated = true

Definition at line 80 of file Main.cpp.

bool bWeapon = false

Definition at line 81 of file Main.cpp.

int verbose = 2

Definition at line 83 of file Main.cpp.

int fps = 0

Definition at line 84 of file Main.cpp.

vector<string> skinList

Definition at line 86 of file Main.cpp.