#include <fenv.h>#include <stdio.h>#include <stdlib.h>#include <GL/gl.h>#include <GL/glu.h>#include <GL/glext.h>#include <SDL/SDL.h>#include <math.h>#include <string>#include <vector>#include "font.h"#include "utility.h"#include "textures.h"#include "backdrop.h"#include "camera.h"#include "weather.h"#include "keyman.h"#include "mouse.h"#include "messageq.h"#include "particles.h"#include "settings.h"#include "sound.h"#include "timer.h"#include "controls.h"#include "vamosworld.h"#include "replay.h"#include "logo.h"#include "gamestate.h"#include "objects.h"#include "multiplay.h"#include "net.h"#include "configfile.h"#include "bezier.h"#include "track.h"#include "exception.h"#include "cardinfo.h"#include <vamos/body/Gl_Car.h>#include <vamos/geometry/Texture_Image.h>#include <vamos/geometry/Three_Vector.h>#include <vamos/body/Car.h>#include <vamos/body/Fuel_Tank.h>#include <vamos/body/Wheel.h>#include <vamos/geometry/Conversions.h>#include <vamos/world/World.h>#include "gui/gui.h"Include dependency graph for main.cpp:

Go to the source code of this file.
Namespaces | |
| namespace | std |
Defines | |
| #define | GL_GLEXT_PROTOTYPES |
| #define | TRUE 1 |
| #define | FALSE 0 |
| #define | CAR_Y_OFFSET 1.0 |
| #define | AVERAGEFRAMES 5 |
| #define | FRAME_TIME 0.004 |
Functions | |
| float | FrameTime () |
| int | Screenshot (char *filename) |
| void | ResetWorld (bool fullreset) |
| void | Quit (int returnCode) |
| int | resizeWindow (int width, int height) |
| void | LoadingScreen (string loadtext) |
| void | ChangeDisplay (int w, int h, int bpp, bool fullscreen, bool reloadtextures) |
| void | ReloadDisplay () |
| void | Update () |
| void | snap_screenshot () |
| void | MainPause () |
| void | MainUnpause () |
| void | handleKeyPress (SDL_keysym *keysym) |
| void | handleKeyRelease (SDL_keysym *keysym) |
| void | glSetup () |
| void | SelectCar (string cfile, bool trim) |
| bool | UnloadWorld () |
| bool | LoadWorld () |
| void | InitGameData () |
| void | InitGL (GLvoid) |
| int | drawGLScene (GLvoid) |
| bool | isExtensionSupported (string extstring) |
| int | main (int argc, char **argv) |
Variables | |
| int | SCREEN_WIDTH = 1024 |
| int | SCREEN_HEIGHT = 768 |
| int | SCREEN_BPP = 32 |
| bool | verbose_output = false |
| SDL_Surface * | surface |
| GLfloat | LightAmbient [] = { 0.15f, 0.15f, 0.15f, 1.0f } |
| GLfloat | LightDiffuse [] = { 1.0f, 1.0f, 1.0f, 1.0f } |
| GLfloat | LightSpecular [] = { 0.0f, 0.0f, 0.0f, 0.0f } |
| GLfloat | LightPosition [4] |
| KEYMAN | keyman |
| GAMECONTROLS | gamecontrols |
| SETTINGS | settings |
| TEXTURES | textures |
| CAMERA | cam |
| FONT | font |
| UTILITY | utility |
| BACKDROP | backdrop |
| WEATHER | weathersystem |
| MOUSE | mouse |
| MESSAGEQ | mq1 |
| PARTICLE | particle |
| SOUNDMANAGER | sound |
| TIMER | timer |
| REPLAY | replay |
| LOGO | logo |
| GAMESTATE | state |
| OBJECTS | objects |
| NET | net |
| MULTIPLAY | multiplay |
| VGUI::Gui | gui |
| TRACK | track |
| CARDINFO | gfxcard |
| VAMOSWORLD | world |
| ofstream | error_log |
| double | day_time |
| double | abs_time |
| static GLint | T0 |
| static GLint | Frames |
| static GLfloat | fps |
| bool | showfps |
| static int | frameno |
| float | timefactor = 1.0f |
| float | pfps |
| float | lfps [AVERAGEFRAMES] |
| int | lfpspos = 0 |
| bool | lfpsfull = false |
| double | execution_time = 0.0 |
| bool | pauserequest = false |
| bool | unpauserequest = false |
| bool | esc_pressed = false |
| float | view_dist = 10000.0 |
| string | cur_tex_size = "" |
| int | cur_screen_w = 0 |
| int | cur_screen_h = 0 |
| int | cur_screen_bpp = 0 |
| bool | cur_fullscreen = false |
| string | tree_detail = "" |
| string | data_dir |
|
|
|
|
|
Definition at line 177 of file main.cpp. Referenced by SelectCar(). |
|
|
Definition at line 102 of file main.cpp. Referenced by main(). |
|
|
Definition at line 202 of file main.cpp. Referenced by FrameTime(), and Update(). |
|
|
|
|
|
Definition at line 101 of file main.cpp. Referenced by main(), and resizeWindow(). |
|
||||||||||||||||||||||||
|
Definition at line 331 of file main.cpp. References backdrop, font, gamecontrols, VGUI::Gui::GetEnabled(), gui, BACKDROP::Init(), TIMER::Load(), PARTICLE::Load(), FONT::Load(), GAMECONTROLS::LoadControls(), VAMOSWORLD::LoadHUD(), LoadingScreen(), NULL, particle, VGUI::Gui::ReInit(), TEXTURES::ReloadAll(), resizeWindow(), SCREEN_BPP, SCREEN_HEIGHT, SCREEN_WIDTH, VGUI::Gui::SetEnabled(), surface, textures, timer, VAMOSWORLD::UnloadHUD(), VGUI::Gui::UpdateScreenSize(), and world. Referenced by ReloadDisplay(). |
|
|
Definition at line 1700 of file main.cpp. References backdrop, WEATHER::GetFogDensity(), GAMESTATE::GetGameState(), BACKDROP::RefreshFog(), BACKDROP::SetFogStrength(), state, STATE_INITIALMENU, and weathersystem. |
|
|
Definition at line 219 of file main.cpp. References FRAME_TIME. Referenced by MULTIPLAY::GetPacketArrayTime(), REPLAY::Jump(), REPLAY::PlayIncrement(), REPLAY::PlayProcessFrame(), MULTIPLAY::ReceivePacketArray(), MULTIPLAY::ReceiveState(), MULTIPLAY::SendPacketArray(), MULTIPLAY::SendState(), MULTIPLAY::UpdateFuncmem(), and MULTIPLAY::UpdateStats(). |
|
|
Definition at line 740 of file main.cpp. Referenced by LoadingScreen(). |
|
|
Definition at line 639 of file main.cpp. References esc_pressed, VGUI::Gui::GetEnabled(), and gui. |
|
|
Definition at line 714 of file main.cpp. References esc_pressed, VGUI::Gui::GetEnabled(), gui, keyman, MainPause(), and KEYMAN::OneTime(). |
|
|
|
Definition at line 1323 of file main.cpp. References font, LightAmbient, LightDiffuse, LightPosition, LightSpecular, FONT::Load(), SCREEN_HEIGHT, and SCREEN_WIDTH. |
|
|
|
|
|
Definition at line 1378 of file main.cpp. References font, fps, Frames, glSetup(), FONT::Print(), T0, UTILITY::Tex2D(), utility, and verbose_output. Referenced by ChangeDisplay(), InitGameData(), and LoadWorld(). |
|
|
||||||||||||
|
Definition at line 2124 of file main.cpp. References error_log, FALSE, SETTINGS::GetSettingsDir(), NULL, settings, surface, TRUE, and verbose_output. |
|
|
Definition at line 618 of file main.cpp. References VGUI::Gui::GetEnabled(), gui, multiplay, MULTIPLAY::NumConnected(), pauserequest, and VGUI::Gui::ProcessAction(). |
|
|
Definition at line 633 of file main.cpp. References unpauserequest. |
|
|
Cleaup and exit.
Definition at line 275 of file main.cpp. References error_log, gamecontrols, REPLAY::Recording(), replay, GAMESTATE::SetGameState(), state, STATE_EXIT, REPLAY::Stop(), verbose_output, and GAMECONTROLS::WriteControlFile(). Referenced by VGUI::Gui::ProcessAction(). |
|
|
Definition at line 402 of file main.cpp. References ChangeDisplay(), cur_fullscreen, cur_screen_bpp, cur_screen_h, cur_screen_w, cur_tex_size, SETTINGS::Get(), objects, settings, showfps, tree_detail, OBJECTS::UpdateSettings(), VAMOSWORLD::UpdateSettings(), view_dist, and world. Referenced by VGUI::Gui::ProcessAction(). |
|
|
|
|
||||||||||||
|
Definition at line 299 of file main.cpp. References TRUE. Referenced by ChangeDisplay(). |
|
|
Definition at line 224 of file main.cpp. Referenced by snap_screenshot(). |
|
||||||||||||
|
Definition at line 777 of file main.cpp. References VAMOSWORLD::add_car(), CAR_Y_OFFSET, Vamos_Body::Car::chassis(), VAMOSWORLD::clear_cars(), GAMESTATE::GetCarName(), GAMESTATE::GetCarPaint(), TRACK::GetStart(), multiplay, MULTIPLAY::MyNum(), MULTIPLAY::NumConnected(), Vamos_Body::Car::read(), Vamos_Body::Car::set_controller(), GAMESTATE::SetCarName(), Vamos_Body::Gl_Car::SetPaint(), Vamos_Body::Car::start_engine(), state, track, world, VERTEX::x, VERTEX::y, and VERTEX::z. Referenced by LoadWorld(), and ResetWorld(). |
|
|
Definition at line 608 of file main.cpp. References SETTINGS::Get(), SETTINGS::GetSettingsDir(), Screenshot(), SETTINGS::Set(), and settings. |
|
|
Definition at line 859 of file main.cpp. References backdrop, VAMOSWORLD::DeInit(), BACKDROP::DeInit(), sound, SOUNDMANAGER::Unload(), and world. Referenced by LoadWorld(). |
|
|
|
Definition at line 180 of file main.cpp. Referenced by InitGameData(), and Update(). |
|
|
Definition at line 152 of file main.cpp. Referenced by ChangeDisplay(), drawGLScene(), LoadWorld(), UnloadWorld(), and Update(). |
|
|
Definition at line 149 of file main.cpp. Referenced by KEYMAN::DoHeldKeys(), BACKDROP::DrawClouds(), OBJECTS::DrawObject(), BACKDROP::DrawRain(), BACKDROP::DrawSky(), VAMOSWORLD::Init(), InitGameData(), VAMOSWORLD::SetCameraMode(), Update(), MOUSE::UpdateCamera(), and ROADSTRIP::Visualize(). |
|
|
Definition at line 216 of file main.cpp. Referenced by ReloadDisplay(). |
|
|
Definition at line 215 of file main.cpp. Referenced by ReloadDisplay(). |
|
|
Definition at line 214 of file main.cpp. Referenced by ReloadDisplay(). |
|
|
Definition at line 213 of file main.cpp. Referenced by ReloadDisplay(). |
|
|
Definition at line 212 of file main.cpp. Referenced by ReloadDisplay(). |
|
|
Definition at line 771 of file main.cpp. Referenced by br_find_locale_dir(), and LoadWorld(). |
|
|
Definition at line 179 of file main.cpp. Referenced by InitGameData(), and Update(). |
|
|
|
|
|
Definition at line 207 of file main.cpp. Referenced by handleKeyPress(), and handleKeyRelease(). |
|
|
Definition at line 203 of file main.cpp. Referenced by Update(). |
|
|
|
Definition at line 185 of file main.cpp. Referenced by LoadingScreen(), LOGO::run(), and Update(). |
|
|
|
|
|
Definition at line 184 of file main.cpp. Referenced by LoadingScreen(). |
|
|
Definition at line 146 of file main.cpp. Referenced by VGUI::ControlGrab::BuildControlVectors(), ChangeDisplay(), InitGameData(), VGUI::Gui::ProcessAction(), Quit(), VGUI::ControlGrab::Save(), VGUI::Calibrate::Save(), VAMOSWORLD::steer_to(), and Update(). |
|
|
Definition at line 170 of file main.cpp. Referenced by UTILITY::TexLoad(). |
|
|
Definition at line 168 of file main.cpp. Referenced by ChangeDisplay(), handleKeyPress(), handleKeyRelease(), and MainPause(). |
|
|
Definition at line 145 of file main.cpp. Referenced by VGUI::ControlGrab::GrabKey(), handleKeyRelease(), InitGameData(), VAMOSWORLD::SetCameraMode(), and Update(). |
|
|
|
|
|
|
|
|
|
|
|
Definition at line 129 of file main.cpp. Referenced by VGUI::SpinningCar::Draw(), and InitGL(). |
|
|
Definition at line 132 of file main.cpp. Referenced by VGUI::SpinningCar::Draw(), InitGL(), and Update(). |
|
|
Definition at line 135 of file main.cpp. Referenced by VAMOSWORLD::Draw(), VGUI::SpinningCar::Draw(), VAMOSWORLD::DrawCars(), InitGameData(), InitGL(), Vamos_Body::Gl_Car::transform_body(), and Update(). |
|
|
Definition at line 133 of file main.cpp. Referenced by VGUI::SpinningCar::Draw(), and InitGL(). |
|
|
Definition at line 163 of file main.cpp. Referenced by InitGameData(). |
|
|
Definition at line 154 of file main.cpp. Referenced by VGUI::Gui::MousePress(), VGUI::Gui::MouseRelease(), VGUI::Gui::MouseUpdate(), VGUI::Gui::ProcessAction(), and Update(). |
|
|
Definition at line 155 of file main.cpp. Referenced by MULTIPLAY::Connect(), InitGameData(), and LoadWorld(). |
|
|
Definition at line 167 of file main.cpp. Referenced by VAMOSWORLD::DrawHUD(), MainPause(), VAMOSWORLD::PhysUpdate(), SelectCar(), and Update(). |
|
|
Definition at line 166 of file main.cpp. Referenced by MULTIPLAY::Connect(), MULTIPLAY::Connected(), MULTIPLAY::Disconnect(), MULTIPLAY::Host(), InitGameData(), MULTIPLAY::ReceivePacketArray(), MULTIPLAY::ReceiveState(), MULTIPLAY::SendPacketArray(), MULTIPLAY::SendState(), MULTIPLAY::Server(), and MULTIPLAY::UpdateStats(). |
|
|
Definition at line 165 of file main.cpp. Referenced by TRACK::Collide(), TRACK::CollideD(), TRACK::CollideModel(), LoadWorld(), and ReloadDisplay(). |
|
|
Definition at line 157 of file main.cpp. Referenced by ChangeDisplay(), VAMOSWORLD::DrawTopLevel(), InitGameData(), LoadWorld(), Update(), and Vamos_Body::Rigid_Body::velocity(). |
|
|
Definition at line 205 of file main.cpp. Referenced by MainPause(). |
|
|
|
|
|
|
Definition at line 111 of file main.cpp. Referenced by ChangeDisplay(). |
|
|
Definition at line 110 of file main.cpp. Referenced by ChangeDisplay(), InitGL(), and Update(). |
|
|
Definition at line 109 of file main.cpp. Referenced by ChangeDisplay(), InitGL(), and Update(). |
|