CameraProcess Class Reference

#include <CameraProcess.h>

Inheritance diagram for CameraProcess:

Process List of all members.

Public Member Functions

 CameraProcess ()
 CameraProcess (uint16 itemnum)
 CameraProcess (sint32 x, sint32 y, sint32 z)
 CameraProcess (sint32 x, sint32 y, sint32 z, sint32 time)
virtual ~CameraProcess ()
 ENABLE_RUNTIME_CLASSTYPE ()
virtual bool run (const uint32 framenum)
void GetLerped (sint32 &x, sint32 &y, sint32 &z, sint32 factor, bool noupdate=false)
uint16 FindRoof (sint32 factor)
 INTRINSIC (I_setCenterOn)
 INTRINSIC (I_move_to)
 INTRINSIC (I_scrollTo)
 INTRINSIC (I_startQuake)
 INTRINSIC (I_stopQuake)
void ItemMoved ()
virtual void terminate ()
bool loadData (IDataSource *ids, uint32 version)

Static Public Member Functions

static void GetCameraLocation (sint32 &x, sint32 &y, sint32 &z)
static CameraProcessGetCameraProcess ()
static uint16 SetCameraProcess (CameraProcess *)
static void ResetCameraProcess ()
static void SetEarthquake (sint32 e)

Private Member Functions

virtual void saveData (ODataSource *ods)

Private Attributes

sint32 sx
sint32 sy
sint32 sz
sint32 ex
sint32 ey
sint32 ez
sint32 time
sint32 elapsed
uint16 itemnum
sint32 last_framenum

Static Private Attributes

static CameraProcesscamera = 0
static sint32 earthquake = 0
static sint32 eq_x = 0
static sint32 eq_y = 0

Detailed Description

Definition at line 34 of file CameraProcess.h.


Constructor & Destructor Documentation

CameraProcess::CameraProcess (  ) 

Definition at line 47 of file CameraProcess.cpp.

Referenced by SetCameraProcess().

CameraProcess::CameraProcess ( uint16  itemnum  ) 

Definition at line 107 of file CameraProcess.cpp.

References ex, Item::EXT_CAMERA, ey, ez, GetCameraLocation(), getItem(), Item::getLocation(), itemnum, Item::setExtFlag(), sx, sy, and sz.

CameraProcess::CameraProcess ( sint32  x,
sint32  y,
sint32  z 
)

Definition at line 132 of file CameraProcess.cpp.

References GetCameraLocation(), sx, sy, and sz.

CameraProcess::CameraProcess ( sint32  x,
sint32  y,
sint32  z,
sint32  time 
)

Definition at line 139 of file CameraProcess.cpp.

References GetCameraLocation(), sx, sy, and sz.

CameraProcess::~CameraProcess (  )  [virtual]

Definition at line 52 of file CameraProcess.cpp.

References camera.


Member Function Documentation

CameraProcess::ENABLE_RUNTIME_CLASSTYPE (  ) 

Reimplemented from Process.

uint16 CameraProcess::FindRoof ( sint32  factor  ) 

Find the roof above the camera.

Parameters:
factor Interpolation factor for this frame
Returns:
0 if no roof found, objid of roof if found

Definition at line 291 of file CameraProcess.cpp.

References earthquake, World::get_instance(), World::getCurrentMap(), Item::getFootpadWorld(), getItem(), GetLerped(), CurrentMap::isValidPosition(), x, and y.

Referenced by GameMapGump::PaintThis().

void CameraProcess::GetCameraLocation ( sint32 x,
sint32 y,
sint32 z 
) [static]

Definition at line 72 of file CameraProcess.cpp.

References camera, earthquake, eq_x, eq_y, World::get_instance(), getActor(), World::getCurrentMap(), GetLerped(), Item::getLocation(), Item::getMapNum(), and CurrentMap::getNum().

Referenced by AudioProcess::calculateSoundVolume(), CameraProcess(), GameMapGump::GetCameraLocation(), and GameMapGump::GetLocationOfItem().

static CameraProcess* CameraProcess::GetCameraProcess (  )  [inline, static]

Definition at line 64 of file CameraProcess.h.

References camera.

Referenced by GameMapGump::GetCameraLocation(), GameMapGump::GetLocationOfItem(), Item::move(), and GameMapGump::PaintThis().

void CameraProcess::GetLerped ( sint32 x,
sint32 y,
sint32 z,
sint32  factor,
bool  noupdate = false 
)

Definition at line 202 of file CameraProcess.cpp.

References earthquake, elapsed, eq_x, eq_y, ex, ey, ez, World::get_instance(), World::getCurrentMap(), getItem(), Item::getLocation(), itemnum, last_framenum, sx, sy, sz, time, and CurrentMap::updateFastArea().

Referenced by FindRoof(), GameMapGump::GetCameraLocation(), GetCameraLocation(), and GameMapGump::GetLocationOfItem().

CameraProcess::INTRINSIC ( I_stopQuake   ) 

CameraProcess::INTRINSIC ( I_startQuake   ) 

CameraProcess::INTRINSIC ( I_scrollTo   ) 

CameraProcess::INTRINSIC ( I_move_to   ) 

CameraProcess::INTRINSIC ( I_setCenterOn   ) 

void CameraProcess::ItemMoved (  ) 

Definition at line 183 of file CameraProcess.cpp.

References ex, Item::EXT_LERP_NOPREV, ey, ez, World::get_instance(), World::getCurrentMap(), Item::getExtFlags(), getItem(), Item::getLocation(), itemnum, sx, sy, sz, and CurrentMap::updateFastArea().

Referenced by Item::move().

bool CameraProcess::loadData ( IDataSource ids,
uint32  version 
)

load Process data

Reimplemented from Process.

Definition at line 325 of file CameraProcess.cpp.

References camera, earthquake, elapsed, eq_x, eq_y, ex, ey, ez, itemnum, last_framenum, Process::loadData(), sx, sy, sz, and time.

void CameraProcess::ResetCameraProcess (  )  [static]

Definition at line 66 of file CameraProcess.cpp.

References camera, and terminate().

Referenced by World::switchMap().

bool CameraProcess::run ( const uint32  framenum  )  [virtual]

Implements Process.

Definition at line 158 of file CameraProcess.cpp.

References earthquake, elapsed, eq_x, eq_y, Process::result, SetCameraProcess(), and time.

void CameraProcess::saveData ( ODataSource ods  )  [private, virtual]

save the Process data

Reimplemented from Process.

Definition at line 306 of file CameraProcess.cpp.

References earthquake, elapsed, eq_x, eq_y, ex, ey, ez, itemnum, last_framenum, Process::saveData(), sx, sy, sz, time, ODataSource::write2(), and ODataSource::write4().

uint16 CameraProcess::SetCameraProcess ( CameraProcess  )  [static]

Definition at line 58 of file CameraProcess.cpp.

References Kernel::addProcess(), camera, CameraProcess(), Kernel::get_instance(), and terminate().

Referenced by GameMapGump::ConCmd_dumpMap(), Item::destroy(), GUIApp::newGame(), StartU8Process::run(), run(), and World::switchMap().

static void CameraProcess::SetEarthquake ( sint32  e  )  [inline, static]

Definition at line 68 of file CameraProcess.h.

References earthquake, eq_x, and eq_y.

Referenced by World::switchMap().

void CameraProcess::terminate (  )  [virtual]

terminate the process. This wakes up all processes waiting for it.

Reimplemented from Process.

Definition at line 147 of file CameraProcess.cpp.

References Item::clearExtFlag(), Item::EXT_CAMERA, getItem(), itemnum, and Process::terminate().

Referenced by ResetCameraProcess(), and SetCameraProcess().


Member Data Documentation

CameraProcess * CameraProcess::camera = 0 [static, private]

Definition at line 89 of file CameraProcess.h.

Referenced by GetCameraLocation(), GetCameraProcess(), loadData(), ResetCameraProcess(), SetCameraProcess(), and ~CameraProcess().

sint32 CameraProcess::earthquake = 0 [static, private]

Definition at line 90 of file CameraProcess.h.

Referenced by FindRoof(), GetCameraLocation(), GetLerped(), loadData(), run(), saveData(), and SetEarthquake().

sint32 CameraProcess::elapsed [private]

Definition at line 84 of file CameraProcess.h.

Referenced by GetLerped(), loadData(), run(), and saveData().

sint32 CameraProcess::eq_x = 0 [static, private]

Definition at line 91 of file CameraProcess.h.

Referenced by GetCameraLocation(), GetLerped(), loadData(), run(), saveData(), and SetEarthquake().

sint32 CameraProcess::eq_y = 0 [static, private]

Definition at line 91 of file CameraProcess.h.

Referenced by GetCameraLocation(), GetLerped(), loadData(), run(), saveData(), and SetEarthquake().

sint32 CameraProcess::ex [private]

Definition at line 82 of file CameraProcess.h.

Referenced by CameraProcess(), GetLerped(), ItemMoved(), loadData(), and saveData().

sint32 CameraProcess::ey [private]

Definition at line 82 of file CameraProcess.h.

Referenced by CameraProcess(), GetLerped(), ItemMoved(), loadData(), and saveData().

sint32 CameraProcess::ez [private]

Definition at line 82 of file CameraProcess.h.

Referenced by CameraProcess(), GetLerped(), ItemMoved(), loadData(), and saveData().

uint16 CameraProcess::itemnum [private]

Definition at line 85 of file CameraProcess.h.

Referenced by CameraProcess(), GetLerped(), ItemMoved(), loadData(), saveData(), and terminate().

sint32 CameraProcess::last_framenum [private]

Definition at line 87 of file CameraProcess.h.

Referenced by GetLerped(), loadData(), and saveData().

sint32 CameraProcess::sx [private]

Definition at line 81 of file CameraProcess.h.

Referenced by CameraProcess(), GetLerped(), ItemMoved(), loadData(), and saveData().

sint32 CameraProcess::sy [private]

Definition at line 81 of file CameraProcess.h.

Referenced by CameraProcess(), GetLerped(), ItemMoved(), loadData(), and saveData().

sint32 CameraProcess::sz [private]

Definition at line 81 of file CameraProcess.h.

Referenced by CameraProcess(), GetLerped(), ItemMoved(), loadData(), and saveData().

sint32 CameraProcess::time [private]

Definition at line 83 of file CameraProcess.h.

Referenced by GetLerped(), loadData(), run(), and saveData().


The documentation for this class was generated from the following files:
Generated on Fri Jul 27 22:28:48 2007 for pentagram by  doxygen 1.4.7