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

Tutorial Class Reference

#include <Tutorial.h>

List of all members.

Public Methods

 Tutorial (void)
 ~Tutorial ()
void update ()
void intro ()
void overhead ()
void battleMode ()
void city ()
void unit ()
void overheadWhileBattle ()
void battleCircle ()
void twoBattlesAtOnce ()
void stopTutorial ()

Private Types

enum  State { NOT_PLAYED, PLAYED }

Private Attributes

int m_ticksRemainingBeforeCurrentTutorialItemStops
State m_intro
State m_overhead
State m_battleMode
State m_city
State m_unit
State m_overheadWhileBattle
State m_battleCircle
State m_twoBattlesAtOnce


Member Enumeration Documentation

enum Tutorial::State [private]
 

Enumeration values:
NOT_PLAYED 
PLAYED 

Definition at line 37 of file Tutorial.h.

00037 {NOT_PLAYED, PLAYED};


Constructor & Destructor Documentation

Tutorial::Tutorial void   
 

Definition at line 21 of file Tutorial.cpp.

00021                    : m_ticksRemainingBeforeCurrentTutorialItemStops(0), m_intro(NOT_PLAYED), m_overhead(NOT_PLAYED), 
00022 m_battleMode(NOT_PLAYED), m_city(NOT_PLAYED), m_unit(NOT_PLAYED), m_overheadWhileBattle(NOT_PLAYED), m_battleCircle(NOT_PLAYED), 
00023 m_twoBattlesAtOnce(NOT_PLAYED)
00024 {
00025 }

Tutorial::~Tutorial  
 

Definition at line 27 of file Tutorial.cpp.

00028 {
00029         //nothing to do
00030 }


Member Function Documentation

void Tutorial::battleCircle  
 

Definition at line 118 of file Tutorial.cpp.

References m_battleCircle, m_ticksRemainingBeforeCurrentTutorialItemStops, NOT_PLAYED, Sound::play(), and PLAYED.

Referenced by Overhead::overheadRender().

00119 {
00120         if (m_ticksRemainingBeforeCurrentTutorialItemStops == 0 && m_battleCircle == NOT_PLAYED)
00121         {
00122                 Sound::play(Sound::SMPL_TUTORIAL_BATTLE_CIRCLE, 1.0f);
00123                 m_battleCircle = PLAYED;
00124                 const int SAMPLE_LENGTH(25);
00125                 const int ONE_SECOND_OF_TICKS(60);
00126                 m_ticksRemainingBeforeCurrentTutorialItemStops = SAMPLE_LENGTH * ONE_SECOND_OF_TICKS;
00127         }
00128 }

void Tutorial::battleMode  
 

Definition at line 68 of file Tutorial.cpp.

References m_battleMode, m_ticksRemainingBeforeCurrentTutorialItemStops, NOT_PLAYED, Sound::play(), and PLAYED.

Referenced by Overhead::doTutorial().

00069 {
00070         if (m_ticksRemainingBeforeCurrentTutorialItemStops == 0 && m_battleMode == NOT_PLAYED)
00071         {
00072                 Sound::play(Sound::SMPL_TUTORIAL_BATTLE_MODE, 1.0f);
00073                 m_battleMode = PLAYED;
00074                 const int SAMPLE_LENGTH(35);
00075                 const int ONE_SECOND_OF_TICKS(60);
00076                 m_ticksRemainingBeforeCurrentTutorialItemStops = SAMPLE_LENGTH * ONE_SECOND_OF_TICKS;
00077         }
00078 }

void Tutorial::city  
 

Definition at line 80 of file Tutorial.cpp.

References m_city, m_ticksRemainingBeforeCurrentTutorialItemStops, NOT_PLAYED, Sound::play(), and PLAYED.

Referenced by Overhead::doTutorial().

00081 {
00082         if (m_ticksRemainingBeforeCurrentTutorialItemStops == 0 && m_city == NOT_PLAYED)
00083         {
00084                 Sound::play(Sound::SMPL_TUTORIAL_CITIES, 1.0f);
00085                 m_city = PLAYED;
00086                 const int SAMPLE_LENGTH(35);
00087                 const int ONE_SECOND_OF_TICKS(60);
00088                 m_ticksRemainingBeforeCurrentTutorialItemStops = SAMPLE_LENGTH * ONE_SECOND_OF_TICKS;
00089 
00090         }
00091 }

void Tutorial::intro  
 

Definition at line 44 of file Tutorial.cpp.

References m_intro, m_ticksRemainingBeforeCurrentTutorialItemStops, NOT_PLAYED, Sound::play(), and PLAYED.

Referenced by Overhead::overhead_update().

00045 {
00046         if (m_ticksRemainingBeforeCurrentTutorialItemStops == 0 && m_intro == NOT_PLAYED)
00047         {
00048                 Sound::play(Sound::SMPL_TUTORIAL_INTRO, 1.0f);
00049                 m_intro = PLAYED;
00050                 const int SAMPLE_LENGTH(20);
00051                 const int ONE_SECOND_OF_TICKS(60);
00052                 m_ticksRemainingBeforeCurrentTutorialItemStops = SAMPLE_LENGTH * ONE_SECOND_OF_TICKS;
00053         }
00054 }

void Tutorial::overhead  
 

Definition at line 56 of file Tutorial.cpp.

References m_overhead, m_ticksRemainingBeforeCurrentTutorialItemStops, NOT_PLAYED, Sound::play(), and PLAYED.

00057 {
00058         if (m_ticksRemainingBeforeCurrentTutorialItemStops == 0 && m_overhead == NOT_PLAYED)
00059         {
00060                 Sound::play(Sound::SMPL_TUTORIAL_OVERHEAD, 1.0f);
00061                 m_overhead = PLAYED;
00062                 const int SAMPLE_LENGTH(25);
00063                 const int ONE_SECOND_OF_TICKS(60);
00064                 m_ticksRemainingBeforeCurrentTutorialItemStops = SAMPLE_LENGTH * ONE_SECOND_OF_TICKS;
00065         }
00066 }

void Tutorial::overheadWhileBattle  
 

Definition at line 106 of file Tutorial.cpp.

References m_overheadWhileBattle, m_ticksRemainingBeforeCurrentTutorialItemStops, NOT_PLAYED, Sound::play(), and PLAYED.

Referenced by Overhead::processOverheadInput().

00107 {
00108         if (m_ticksRemainingBeforeCurrentTutorialItemStops == 0 && m_overheadWhileBattle == NOT_PLAYED)
00109         {
00110                 Sound::play(Sound::SMPL_TUTORIAL_OVERHEAD_WHILE_BATTLE, 1.0f);
00111                 m_overheadWhileBattle = PLAYED;
00112                 const int SAMPLE_LENGTH(10);
00113                 const int ONE_SECOND_OF_TICKS(60);
00114                 m_ticksRemainingBeforeCurrentTutorialItemStops = SAMPLE_LENGTH * ONE_SECOND_OF_TICKS;
00115         }
00116 }

void Tutorial::stopTutorial  
 

Definition at line 142 of file Tutorial.cpp.

References m_battleCircle, m_battleMode, m_city, m_intro, m_overhead, m_overheadWhileBattle, m_twoBattlesAtOnce, m_unit, PLAYED, Sound::SMPL_TUTORIAL_TWO_BATTLES_AT_ONCE, and Sound::stop().

Referenced by Overhead::overhead_update().

00143 {
00144         for(int i(Sound::SMPL_TUTORIAL_CITIES); i < Sound::SMPL_TUTORIAL_TWO_BATTLES_AT_ONCE; ++i) Sound::stop(i);
00145         m_intro = PLAYED;
00146         m_overhead = PLAYED;
00147         m_battleMode = PLAYED;
00148         m_city = PLAYED;
00149         m_unit = PLAYED;
00150         m_overheadWhileBattle = PLAYED;
00151         m_battleCircle = PLAYED;
00152         m_twoBattlesAtOnce = PLAYED;
00153 }

void Tutorial::twoBattlesAtOnce  
 

Definition at line 130 of file Tutorial.cpp.

References m_ticksRemainingBeforeCurrentTutorialItemStops, m_twoBattlesAtOnce, NOT_PLAYED, Sound::play(), and PLAYED.

Referenced by Overhead::doTutorial().

00131 {
00132         if (m_ticksRemainingBeforeCurrentTutorialItemStops == 0 && m_twoBattlesAtOnce == NOT_PLAYED)
00133         {
00134                 Sound::play(Sound::SMPL_TUTORIAL_TWO_BATTLES_AT_ONCE, 1.0f);
00135                 m_twoBattlesAtOnce = PLAYED;
00136                 const int SAMPLE_LENGTH(15);
00137                 const int ONE_SECOND_OF_TICKS(60);
00138                 m_ticksRemainingBeforeCurrentTutorialItemStops = SAMPLE_LENGTH * ONE_SECOND_OF_TICKS;
00139         }
00140 }

void Tutorial::unit  
 

Definition at line 93 of file Tutorial.cpp.

References m_ticksRemainingBeforeCurrentTutorialItemStops, m_unit, NOT_PLAYED, Sound::play(), and PLAYED.

Referenced by Overhead::doTutorial().

00094 {
00095         if (m_ticksRemainingBeforeCurrentTutorialItemStops == 0 && m_unit == NOT_PLAYED)
00096         {
00097                 Sound::play(Sound::SMPL_TUTORIAL_UNITS, 1.0f);
00098                 m_unit = PLAYED;
00099                 const int SAMPLE_LENGTH(35);
00100                 const int ONE_SECOND_OF_TICKS(60);
00101                 m_ticksRemainingBeforeCurrentTutorialItemStops = SAMPLE_LENGTH * ONE_SECOND_OF_TICKS;
00102 
00103         }
00104 }

void Tutorial::update  
 

Definition at line 32 of file Tutorial.cpp.

References m_ticksRemainingBeforeCurrentTutorialItemStops.


Member Data Documentation

State Tutorial::m_battleCircle [private]
 

Definition at line 45 of file Tutorial.h.

Referenced by battleCircle(), and stopTutorial().

State Tutorial::m_battleMode [private]
 

Definition at line 41 of file Tutorial.h.

Referenced by battleMode(), and stopTutorial().

State Tutorial::m_city [private]
 

Definition at line 42 of file Tutorial.h.

Referenced by city(), and stopTutorial().

State Tutorial::m_intro [private]
 

Definition at line 39 of file Tutorial.h.

Referenced by intro(), and stopTutorial().

State Tutorial::m_overhead [private]
 

Definition at line 40 of file Tutorial.h.

Referenced by overhead(), and stopTutorial().

State Tutorial::m_overheadWhileBattle [private]
 

Definition at line 44 of file Tutorial.h.

Referenced by overheadWhileBattle(), and stopTutorial().

int Tutorial::m_ticksRemainingBeforeCurrentTutorialItemStops [private]
 

Definition at line 38 of file Tutorial.h.

Referenced by battleCircle(), battleMode(), city(), intro(), overhead(), overheadWhileBattle(), twoBattlesAtOnce(), unit(), and update().

State Tutorial::m_twoBattlesAtOnce [private]
 

Definition at line 46 of file Tutorial.h.

Referenced by stopTutorial(), and twoBattlesAtOnce().

State Tutorial::m_unit [private]
 

Definition at line 43 of file Tutorial.h.

Referenced by stopTutorial(), and unit().


The documentation for this class was generated from the following files:
Generated on Wed Apr 23 05:52:15 2003 for Modern Warfare by doxygen1.3-rc2