Main Page | Namespace List | Class Hierarchy | Compound List | File List | Compound Members | File Members

main.cpp File Reference

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <unistd.h>
#include <math.h>
#include <GL/glut.h>
#include <signal.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <plib/ssg.h>
#include <plib/pu.h>
#include "common_gui_funcs.h"
#include "core.h"
#include "configuration.h"
#include "userData.h"

Go to the source code of this file.

Compounds

class  wrapper

Defines

#define str(s)   #s

Enumerations

enum  { MOVE_CAM, IN_GAME }

Functions

void get_camera_data (int i)
void update_motion ()
void mouse_motionfn (int x, int y)
void keyfn (unsigned char k, int, int)
void displayfn ()
void mousefn (int button, int state, int x, int y)
void init_graphics_once (int argc, char **argv)
void sig_catcher (int sig)
int main (int argc, char **argv)

Variables

ssgRoot * scene = NULL
int display_width
int display_height
int game_state
puMenuBar * main_menu = NULL
bool in_game_menu = false
puGroup * total_menu = NULL
puGroup * overlay_menu = NULL
configurationconfig = NULL
userDataloc_player = NULL
GameCoreloc_core = NULL
sgVec3 * cam_target = NULL
float view_distance = 10.0f
float view_x_angle = 0.0f
float view_z_angle = 10.0f
sgVec2 nmouse
int win_handle = -1
int input_mode = IN_GAME
wrapperfoo = NULL


Define Documentation

#define str  )     #s
 

Definition at line 38 of file main.cpp.

Referenced by wrapper::wrapper().


Enumeration Type Documentation

anonymous enum
 

Enumeration values:
MOVE_CAM 
IN_GAME 

Definition at line 67 of file main.cpp.


Function Documentation

void displayfn  ) 
 

Definition at line 141 of file main.cpp.

References scene, and update_motion().

Referenced by _register_glutfuncs_game().

void get_camera_data int  i  ) 
 

Definition at line 74 of file main.cpp.

References config, configuration::get_campos(), view_distance, view_x_angle, and view_z_angle.

Referenced by keyfn().

void init_graphics_once int  argc,
char **  argv
 

Definition at line 165 of file main.cpp.

References _register_glutfuncs_menuonly(), config, display_height, display_width, configuration::get_fullscreen(), configuration::get_game_mode_string(), configuration::get_window_height(), configuration::get_window_width(), MODEL_PATH, TEXTURE_PATH, win_handle, and WINDOW_TITLE.

Referenced by main().

void keyfn unsigned char  k,
int  ,
int 
 

Definition at line 91 of file main.cpp.

References config, get_camera_data(), in_game_menu, main_menu, configuration::set_campos(), view_distance, view_x_angle, and view_z_angle.

Referenced by _register_glutfuncs_game().

int main int  argc,
char **  argv
 

Definition at line 237 of file main.cpp.

References foo, wrapper::go(), init_graphics_once(), and sig_catcher().

void mouse_motionfn int  x,
int  y
 

Definition at line 86 of file main.cpp.

References display_height, display_width, and nmouse.

Referenced by _register_glutfuncs_game().

void mousefn int  button,
int  state,
int  x,
int  y
 

Definition at line 157 of file main.cpp.

Referenced by _register_glutfuncs_game().

void sig_catcher int  sig  ) 
 

Definition at line 232 of file main.cpp.

References foo.

Referenced by main().

void update_motion  ) 
 

Definition at line 82 of file main.cpp.

Referenced by displayfn().


Variable Documentation

sgVec3* cam_target = NULL
 

Definition at line 60 of file main.cpp.

configuration* config = NULL
 

Definition at line 56 of file main.cpp.

Referenced by MainMenu::_display_graph_config(), MainMenu::apply_graph_settings(), get_camera_data(), init_graphics_once(), keyfn(), MainMenu::test_graph_settings(), and wrapper::wrapper().

int display_height
 

Definition at line 46 of file main.cpp.

Referenced by MainMenu::_display_graph_config(), MainMenu::_display_total(), MainMenu::apply_graph_settings(), init_graphics_once(), mouse_motionfn(), reshape(), and start_game_cb().

int display_width
 

Definition at line 45 of file main.cpp.

Referenced by MainMenu::_display_graph_config(), MainMenu::_display_total(), MainMenu::apply_graph_settings(), init_graphics_once(), mouse_motionfn(), reshape(), and start_game_cb().

wrapper* foo = NULL
 

Definition at line 230 of file main.cpp.

Referenced by main(), and sig_catcher().

int game_state
 

Definition at line 48 of file main.cpp.

Referenced by GameCore::act_on_state(), and GameCore::GameCore().

bool in_game_menu = false
 

Definition at line 51 of file main.cpp.

Referenced by keyfn().

int input_mode = IN_GAME
 

Definition at line 72 of file main.cpp.

GameCore* loc_core = NULL
 

Definition at line 58 of file main.cpp.

Referenced by GameCore::GameCore(), and wrapper::go().

userData* loc_player = NULL
 

Definition at line 57 of file main.cpp.

puMenuBar* main_menu = NULL
 

Definition at line 50 of file main.cpp.

Referenced by keyfn().

sgVec2 nmouse [static]
 

Definition at line 64 of file main.cpp.

Referenced by mouse_motionfn().

puGroup* overlay_menu = NULL
 

Definition at line 54 of file main.cpp.

Referenced by GameCore::~GameCore().

ssgRoot* scene = NULL
 

Definition at line 41 of file main.cpp.

Referenced by displayfn(), wrapper::go(), and wrapper::~wrapper().

puGroup* total_menu = NULL
 

Definition at line 53 of file main.cpp.

Referenced by _clear_main_menu(), _clear_total_menu(), MainMenu::_display_graph_config(), MainMenu::_display_total(), and remove_char_creator().

float view_distance = 10.0f
 

Definition at line 61 of file main.cpp.

Referenced by get_camera_data(), and keyfn().

float view_x_angle = 0.0f
 

Definition at line 62 of file main.cpp.

Referenced by get_camera_data(), and keyfn().

float view_z_angle = 10.0f
 

Definition at line 63 of file main.cpp.

Referenced by get_camera_data(), and keyfn().

int win_handle = -1
 

Definition at line 65 of file main.cpp.

Referenced by MainMenu::apply_graph_settings(), and init_graphics_once().


Generated on Sat Jul 12 04:29:21 2003 for glPirates by doxygen 1.3.2