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

Join Class Reference

#include <Join.h>

Inherits Scene.

Inheritance diagram for Join:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 Join ()
virtual ~Join ()
bool load (Application *parent)
bool unload ()
bool update ()
bool drawFrame ()

Protected Member Functions

Vec4 getPlayerChatColor (int playerID)
bool loadGalaxies ()
bool unloadGalaxies ()
void setLvl (int galaxy, int lvl, const char *name, const char *file)
bool setGalaxy (int galaxy, const char *name, int levels)
void networkLoop ()
void serverLoop ()
bool addLevel (int galaxy, int level)
bool removeLevel ()
void drawGalaxies ()
void drawLevels ()
void drawQuad (TextureID tex, float x, float y, float w, float h)
void setCamera (Vec3 pos, float pitch, float heading, bool soft=false)

Protected Attributes

TextureID m_textures [JOIN_TEXTURES]
OpenGLObjectm_objects [JOIN_OBJECTS]
Sound m_sounds [JOIN_SOUNDS]
SLight m_lights [JOIN_LIGHTS]
int m_selectedGalaxy
int m_selectedLevel
float m_camDist
bool m_camReached
TextureID m_texModels [MODELS]

Detailed Description

Definition at line 49 of file Join.h.


Constructor & Destructor Documentation

Join::Join  ) 
 

Join.cpp

Author: Petter Alstermark, petter@alstermark.com

Definition at line 12 of file Join.cpp.

Join::~Join  )  [virtual]
 

Definition at line 19 of file Join.cpp.

References unload().

Here is the call graph for this function:


Member Function Documentation

bool Join::addLevel int  galaxy,
int  level
[protected]
 

Definition at line 935 of file Join.cpp.

References g_galaxies, g_gameInfo, gne, Gne::isServer(), JOIN_NET_ADD, JOIN_SOUND_ADD, SGameInfo::lvlList, m_sounds, MAX_LVL_LIST, SGameInfo::nLvls, Sound::play(), and Gne::setPlayerExtras().

Referenced by networkLoop(), and update().

Here is the call graph for this function:

bool Join::drawFrame  )  [virtual]
 

g_gameInfo.lvlList[i].name

Reimplemented from Scene.

Definition at line 324 of file Join.cpp.

References Renderer::apply(), Application::camera, Application::defaultFont, DEPTH_NONE, OpenGLObject::draw(), drawGalaxies(), drawLevels(), drawQuad(), OpenGLFont::endTextMode(), g_frameTime, g_fullscreen, g_galaxies, g_gameInfo, g_height, g_players, g_time, g_width, Camera::getHeading(), Camera::getPitch(), gne, Gne::isServer(), JOIN_LIGHTS, JOIN_OBJ_CUBEMAP, JOIN_TEX_CUBEMAP, JOIN_TEX_LVL_LIST, SGameInfo::lvlList, m_lights, Scene::m_loaded, m_objects, Scene::m_parent, m_selectedGalaxy, m_selectedLevel, m_texModels, m_textures, SGameInfo::nLvls, PLAYER_STATE_INVISIBLE, OpenGLFont::print(), Application::renderer, OpenGLFont::setColor(), Renderer::setDepthFunc(), Camera::setHeading(), Camera::setPitch(), Camera::setPrespective(), Camera::setProjection(), Renderer::setTextures(), SPLAYER_MAX_PLAYERS, OpenGLFont::startTextMode(), and Camera::updateFrustum().

Here is the call graph for this function:

void Join::drawGalaxies  )  [protected]
 

Definition at line 611 of file Join.cpp.

References Renderer::apply(), Application::camera, DEPTH_NONE, g_galaxies, g_time, Camera::getPosition(), GL_TEXTURE0_ARB, glMultiTexCoord2fARB, JOIN_GALAXIES, Scene::m_parent, ONE, SGalaxyInfo::pos, Application::renderer, Renderer::setBlending(), Renderer::setDepthFunc(), Renderer::setTextures(), Vec3::x, Vec3::y, and Vec3::z.

Referenced by drawFrame().

Here is the call graph for this function:

void Join::drawLevels  )  [protected]
 

Definition at line 803 of file Join.cpp.

References Renderer::apply(), COLOR, OpenGLObject::draw(), g_frameTime, g_galaxies, SLevelInfo::isSet, JOIN_OBJ_BOX, JOIN_OBJ_SPHERE, JOIN_TEX_SELECTION, SGalaxyInfo::lvls, m_objects, Scene::m_parent, m_selectedGalaxy, m_selectedLevel, m_textures, SGalaxyInfo::nLvls, ONE, PIdiv180, SGalaxyInfo::pos, Application::renderer, Renderer::setBlending(), Renderer::setMask(), Renderer::setTextures(), Vec3::x, Vec3::y, and Vec3::z.

Referenced by drawFrame().

Here is the call graph for this function:

void Join::drawQuad TextureID  tex,
float  x,
float  y,
float  w,
float  h
[protected]
 

Definition at line 981 of file Join.cpp.

References Renderer::apply(), COLOR, GL_TEXTURE0_ARB, glMultiTexCoord2fARB, Scene::m_parent, ONE, Application::renderer, Renderer::setBlending(), Renderer::setMask(), and Renderer::setTextures().

Referenced by drawFrame().

Here is the call graph for this function:

Vec4 Join::getPlayerChatColor int  playerID  )  [protected]
 

Definition at line 1010 of file Join.cpp.

References LOG_MISC, Vec4::w, Vec4::x, Vec4::y, and Vec4::z.

Referenced by load(), and networkLoop().

bool Join::load Application parent  )  [virtual]
 

Reimplemented from Scene.

Definition at line 26 of file Join.cpp.

References Renderer::addCubemap(), Renderer::addTexture(), SModelInfo::avatar, Application::camera, SPlayer::chatClr, SLight::clr, SPlayer::deaths, SPlayer::frags, g_allModels, g_drawConsole, g_gameInfo, g_music, g_myPlayerID, g_players, g_showFPS, getPlayerChatColor(), gne, Gne::isRunning(), JOIN_GALAXY_MAX_LVLS, JOIN_OBJ_BOX, JOIN_OBJ_CUBEMAP, JOIN_OBJ_SPHERE, JOIN_SOUND_ADD, JOIN_SOUND_ONLINE, JOIN_SOUND_REMOVE, JOIN_SOUND_SELECT, JOIN_TEX_CUBEMAP, JOIN_TEX_LVL_LIST, JOIN_TEX_PLANET_0, JOIN_TEX_PLANET_1, JOIN_TEX_PLANET_2, JOIN_TEX_PLANET_3, JOIN_TEX_PLANET_4, JOIN_TEX_SELECTION, SPlayer::kills, SPlayer::life, Sound::load(), loadGalaxies(), LOG_MISC, LOG_SUCCESS, SGameInfo::lvlList, m_lights, Scene::m_loaded, m_objects, Scene::m_parent, m_selectedGalaxy, m_selectedLevel, m_sounds, m_texModels, m_textures, SPlayer::model, MODELS, SGameInfo::nLvls, SPlayer::ownsParticleSystem, Music::play(), PLAYER_STATE_INVISIBLE, PLAYER_STATE_LOADING, PLAYER_STATE_OFFLINE, SLight::pos, Application::renderer, Camera::setHeading(), Camera::setPitch(), Gne::setPlayerExtras(), Gne::setPlayerState(), Camera::setPosition(), SPLAYER_MAX_PLAYERS, SPlayer::state, TEXTURE_NONE, and SGameInfo::thisLevel.

Here is the call graph for this function:

bool Join::loadGalaxies  )  [protected]
 

-------------------------------------------------- PINK -------------------------------------------------- if (!setGalaxy(JOIN_GALAXY_PINK2, "Pink", 3)) return false;

setLvl(JOIN_GALAXY_PINK2, 0, "Fun", "pink\\pink1.lvl"); setLvl(JOIN_GALAXY_PINK2, 1, "Heartbeat", "pink\\pink2.lvl"); setLvl(JOIN_GALAXY_PINK2, 2, "Fluffy", "pink\\pink3.lvl");

-------------------------------------------------- ELECTRONIC -------------------------------------------------- if (!setGalaxy(JOIN_GALAXY_ELECTRONIC2, "Electronic", 3)) return false;

setLvl(JOIN_GALAXY_ELECTRONIC2, 0, "ZeroOne", "electronic\\electronic1.lvl"); setLvl(JOIN_GALAXY_ELECTRONIC2, 1, "Bits And Bugs", "electronic\\electronic2.lvl"); setLvl(JOIN_GALAXY_ELECTRONIC2, 2, ":)", "electronic\\electronic3.lvl");

Definition at line 459 of file Join.cpp.

References g_galaxies, JOIN_GALAXIES, JOIN_GALAXY_ELECTRONIC, JOIN_GALAXY_ICE, JOIN_GALAXY_ICE2, JOIN_GALAXY_LAVA, JOIN_GALAXY_LAVA2, JOIN_GALAXY_PINK, PIdiv180, SGalaxyInfo::pos, setGalaxy(), setLvl(), Vec3::x, and Vec3::z.

Referenced by load().

Here is the call graph for this function:

void Join::networkLoop  )  [protected]
 

Join_network.cpp

Author: Petter Alstermark, petter@alstermark.com

Just some network functions (to get overview)

if (gne->isServer()) { for (i=0; i<g_gameInfo.nLvls; i++) { if (g_gameInfo.lvlList[i][0] == 1) { LOG_MISC(("SKICKAR")); gne->sendInfo(playerID, JOIN_NET_ADD, g_gameInfo.lvlList[i][1], g_gameInfo.lvlList[i][2]); Sleep(100); } } }

Definition at line 12 of file Join_network.cpp.

References Console::addEx(), addLevel(), SPlayer::chatClr, console, SGameInfo::currLvl, SPlayer::deaths, E_INFO, E_PLAYER_DISCONNECTED, E_PLAYER_EXTRAS, E_PLAYER_JOINED, E_PLAYER_SCORE, E_PLAYER_STATE, SPlayer::frags, g_gameInfo, g_music, g_myPlayerID, g_players, g_selectedScene, GE_PlayerScore::getDeaths(), GE_PlayerExtras::getExtras(), GE_PlayerScore::getFrags(), GE::getId(), GE_PlayerScore::getKills(), Player::getName(), Gne::getNextEvent(), Gne::getPlayerById(), getPlayerChatColor(), GE_State::getState(), GE_Info::getValA(), GE_Info::getValB(), GE_Info::getValC(), GE_PlayerExtras::getValue(), gne, Gne::isServer(), JOIN_NET_ADD, JOIN_NET_PLAYER_MODEL, JOIN_NET_REMOVE, JOIN_NET_SELECT, JOIN_NET_START, JOIN_SOUND_ONLINE, SPlayer::kills, SPlayer::life, SGameInfo::lvlList, m_selectedGalaxy, m_selectedLevel, m_sounds, SPlayer::model, Gne::nextEventPending(), SGameInfo::nLvls, SPlayer::ownsParticleSystem, Sound::play(), PLAYER_STATE_INVISIBLE, PLAYER_STATE_LOADING, PLAYER_STATE_OFFLINE, removeLevel(), SCENE_PLAY, Gne::sendInfo(), Gne::setPlayerState(), SPLAYER_MAX_PLAYERS, SPlayer::state, and Music::stop().

Referenced by update().

Here is the call graph for this function:

bool Join::removeLevel  )  [protected]
 

Definition at line 960 of file Join.cpp.

References g_gameInfo, gne, Gne::isServer(), JOIN_NET_REMOVE, JOIN_SOUND_REMOVE, SGameInfo::lvlList, m_sounds, SGameInfo::nLvls, Sound::play(), and Gne::setPlayerExtras().

Referenced by networkLoop(), and update().

Here is the call graph for this function:

void Join::serverLoop  )  [protected]
 

Join_server.cpp

Author: Petter Alstermark, petter@alstermark.com

Just some server functions (to get overview)

Definition at line 12 of file Join_server.cpp.

References gne, Gne::isRunning(), and Gne::isServer().

Referenced by update().

Here is the call graph for this function:

void Join::setCamera Vec3  pos,
float  pitch,
float  heading,
bool  soft = false
[protected]
 

Definition at line 885 of file Join.cpp.

References Application::camera, g_frameTime, Camera::getHeading(), Camera::getPitch(), Camera::getPosition(), Vec3::length(), m_camDist, m_camReached, Scene::m_parent, Vec3::normalize(), Camera::setHeading(), Camera::setPitch(), and Camera::setPosition().

Referenced by update().

Here is the call graph for this function:

bool Join::setGalaxy int  galaxy,
const char name,
int  levels
[protected]
 

Definition at line 577 of file Join.cpp.

References Renderer::addTexture(), g_galaxies, SGalaxyInfo::isSet, Scene::m_parent, SGalaxyInfo::nLvls, Application::renderer, and TEXTURE_NONE.

Referenced by loadGalaxies().

Here is the call graph for this function:

void Join::setLvl int  galaxy,
int  lvl,
const char name,
const char file
[protected]
 

Definition at line 568 of file Join.cpp.

References g_galaxies, SLevelInfo::isSet, and SGalaxyInfo::lvls.

Referenced by loadGalaxies().

bool Join::unload  )  [virtual]
 

Reimplemented from Scene.

Definition at line 148 of file Join.cpp.

References OpenGLObject::clearVertexBuffer(), Renderer::deleteTexture(), JOIN_OBJECTS, JOIN_SOUNDS, JOIN_TEXTURES, LOG_SUCCESS, Scene::m_loaded, m_objects, Scene::m_parent, m_sounds, m_texModels, m_textures, MODELS, Application::renderer, Sound::unload(), and unloadGalaxies().

Referenced by ~Join().

Here is the call graph for this function:

bool Join::unloadGalaxies  )  [protected]
 

Definition at line 596 of file Join.cpp.

References Renderer::deleteTexture(), g_galaxies, JOIN_GALAXIES, Scene::m_parent, and Application::renderer.

Referenced by unload().

Here is the call graph for this function:

bool Join::update  )  [virtual]
 

if (m_parent->keys[13]) { menuMainSelect(); m_sounds[MENU_SOUND_DOSELECT].play(); m_parent->keys[13] = false; }

Reimplemented from Scene.

Definition at line 193 of file Join.cpp.

References addLevel(), SGameInfo::currLvl, Gne::disconnect(), g_galaxies, g_gameInfo, g_selectedScene, gne, Gne::isServer(), JOIN_GALAXIES, JOIN_NET_SELECT, JOIN_NET_START, Application::keys, LOG_MISC, SGameInfo::lvlList, Scene::m_loaded, Scene::m_parent, m_selectedGalaxy, m_selectedLevel, networkLoop(), SGalaxyInfo::nLvls, PI, SGalaxyInfo::pos, removeLevel(), SCENE_MENU, serverLoop(), setCamera(), Gne::setPlayerExtras(), SGameInfo::thisLevel, Vec3::x, and Vec3::z.

Here is the call graph for this function:


Member Data Documentation

float Join::m_camDist [protected]
 

Definition at line 87 of file Join.h.

Referenced by setCamera().

bool Join::m_camReached [protected]
 

Definition at line 88 of file Join.h.

Referenced by setCamera().

SLight Join::m_lights[JOIN_LIGHTS] [protected]
 

Definition at line 82 of file Join.h.

Referenced by drawFrame(), and load().

OpenGLObject* Join::m_objects[JOIN_OBJECTS] [protected]
 

Definition at line 78 of file Join.h.

Referenced by drawFrame(), drawLevels(), load(), and unload().

int Join::m_selectedGalaxy [protected]
 

Definition at line 84 of file Join.h.

Referenced by drawFrame(), drawLevels(), load(), networkLoop(), and update().

int Join::m_selectedLevel [protected]
 

Definition at line 85 of file Join.h.

Referenced by drawFrame(), drawLevels(), load(), networkLoop(), and update().

Sound Join::m_sounds[JOIN_SOUNDS] [protected]
 

Definition at line 80 of file Join.h.

Referenced by addLevel(), load(), networkLoop(), removeLevel(), and unload().

TextureID Join::m_texModels[MODELS] [protected]
 

Definition at line 90 of file Join.h.

Referenced by drawFrame(), load(), and unload().

TextureID Join::m_textures[JOIN_TEXTURES] [protected]
 

Definition at line 77 of file Join.h.

Referenced by drawFrame(), drawLevels(), load(), and unload().


Generated on Sun Jun 5 15:49:55 2005 for Defacto by  doxygen 1.4.3