CMovie Class Reference

Movie class. This class plays Movie in game engine. More...

#include <Movie.h>

Collaboration diagram for CMovie:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 CMovie ()
 Standard constructor.
 ~CMovie ()
 Standard Destructor.
bool Init (HWND hWnd, LPDIRECT3DDEVICE9 pd3dDevice, int screenWidth, int screenHeight, CTerrain *pTerrain, CTurtle *pTurtle, CSheep *pSheep, CLanguage *language)
 Init movie with terrain, turtle, sheep and language objects. This function loads music and prepares sprites and fonts for text drawing.
bool OnEvent (LPDIRECT3DDEVICE9 pd3dDevice, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, int *code)
 Movie quits on any user action so not much event handling.
void OnFrameMove (LPDIRECT3DDEVICE9 pd3dDevice, double fTime, float fElapsedTime)
 Animates movie. Everything is hardcoded here, camera movement, model animation, text sliding...
void OnRender (LPDIRECT3DDEVICE9 pd3dDevice)
 Renders movie. Terrain, models, sprites, text.
void stopMovie ()
 Stops movie music.
void playMovie ()
 Starts movie, plays music, resets models position, camera position and text position.
void OnLostDevice ()
 OnLost device releases POOL objects.
void OnResetDevice (LPDIRECT3DDEVICE9 pd3dDevice, int screenWidth, int screenHeight)
 Resets sprites, fonts and particles.


Detailed Description

Movie class. This class plays Movie in game engine.

This class should be made more generic. Right now, it is progremmed to play Intro movie. It loads terrain, and game models, it animates the camera, models and plays the music theme. Everything is hardcoded, no scripting, so to make another movie would mean to write it all from scratch.

Author:
Petar Bajic
Date:
January, 16 2007.

Constructor & Destructor Documentation

CMovie::CMovie (  ) 

Standard constructor.

Author:
Petar Bajic
Date:
January, 16 2007.

CMovie::~CMovie (  ) 

Standard Destructor.

Author:
Petar Bajic
Date:
January, 16 2007.


Member Function Documentation

bool CMovie::Init ( HWND  hWnd,
LPDIRECT3DDEVICE9  pd3dDevice,
int  screenWidth,
int  screenHeight,
CTerrain pTerrain,
CTurtle pTurtle,
CSheep pSheep,
CLanguage language 
)

Init movie with terrain, turtle, sheep and language objects. This function loads music and prepares sprites and fonts for text drawing.

Author:
Petar Bajic
Date:
January, 16 2007.

bool CMovie::OnEvent ( LPDIRECT3DDEVICE9  pd3dDevice,
HWND  hWnd,
UINT  msg,
WPARAM  wParam,
LPARAM  lParam,
int *  code 
)

Movie quits on any user action so not much event handling.

Author:
Petar Bajic
Date:
January, 16 2007.

void CMovie::OnFrameMove ( LPDIRECT3DDEVICE9  pd3dDevice,
double  fTime,
float  fElapsedTime 
)

Animates movie. Everything is hardcoded here, camera movement, model animation, text sliding...

It would be wonderful for movie class to use some kind of script file which would define all movements. That way same class could be used for multiple movies, you just make new instance of CMovie and pass sript file to it. Problem is making such script file and parsing it commonly for various movies?

Author:
Petar Bajic
Date:
January, 16 2007.

LOOp music (NOT FRIKING WORKING! MAY THE ALL MIGHTY SMITE THOSE WHO MAKE SOUND PLAYING API WITHOUT LOOPING)

void CMovie::OnRender ( LPDIRECT3DDEVICE9  pd3dDevice  ) 

Renders movie. Terrain, models, sprites, text.

Author:
Petar Bajic
Date:
January, 16 2007.

void CMovie::stopMovie (  ) 

Stops movie music.

Author:
Petar Bajic
Date:
January, 16 2007.

void CMovie::playMovie (  ) 

Starts movie, plays music, resets models position, camera position and text position.

Author:
Petar Bajic
Date:
January, 16 2007.

void CMovie::OnLostDevice (  ) 

OnLost device releases POOL objects.

Author:
Petar Bajic
Date:
January, 16 2007.

void CMovie::OnResetDevice ( LPDIRECT3DDEVICE9  pd3dDevice,
int  screenWidth,
int  screenHeight 
)

Resets sprites, fonts and particles.

Author:
Petar Bajic
Date:
January, 16 2007.


The documentation for this class was generated from the following files:
Generated on Wed Mar 26 16:00:54 2008 for Turtle Shepherd by  doxygen 1.5.3