summaryrefslogtreecommitdiffstats
path: root/game/code/presentation/cameraplayer.cpp
diff options
context:
space:
mode:
authorSvxy <aidan61605@gmail.com>2023-05-31 23:31:32 +0200
committerSvxy <aidan61605@gmail.com>2023-05-31 23:31:32 +0200
commiteb4b3404aa00220d659e532151dab13d642c17a3 (patch)
tree7e1107c4995489a26c4007e41b53ea8d00ab2134 /game/code/presentation/cameraplayer.cpp
downloadThe-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.tar
The-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.tar.gz
The-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.tar.bz2
The-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.tar.lz
The-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.tar.xz
The-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.tar.zst
The-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.zip
Diffstat (limited to 'game/code/presentation/cameraplayer.cpp')
-rw-r--r--game/code/presentation/cameraplayer.cpp111
1 files changed, 111 insertions, 0 deletions
diff --git a/game/code/presentation/cameraplayer.cpp b/game/code/presentation/cameraplayer.cpp
new file mode 100644
index 0000000..7abf052
--- /dev/null
+++ b/game/code/presentation/cameraplayer.cpp
@@ -0,0 +1,111 @@
+//=============================================================================
+// Copyright (C) 2002 Radical Entertainment Ltd. All rights reserved.
+//
+// File: cameraplayer.cpp
+//
+// Description: Implement CameraPlayer
+//
+// History: 22/04/2002 + Created -- NAME
+//
+//=============================================================================
+
+//========================================
+// System Includes
+//========================================
+// Foundation Tech
+#include <raddebug.hpp>
+#include <p3d/utility.hpp>
+
+//========================================
+// Project Includes
+//========================================
+#include <presentation/cameraplayer.h>
+
+//******************************************************************************
+//
+// Global Data, Local Data, Local Classes
+//
+//******************************************************************************
+
+//******************************************************************************
+//
+// Public Member Functions
+//
+//******************************************************************************
+
+//==============================================================================
+// CameraPlayer::CameraPlayer
+//==============================================================================
+// Description: Constructor.
+//
+// Parameters: None.
+//
+// Return: N/A.
+//
+//==============================================================================
+CameraPlayer::CameraPlayer() :
+ mpAnimation( NULL )
+{
+ SetExclusive( false );
+}
+
+//==============================================================================
+// CameraPlayer::~CameraPlayer
+//==============================================================================
+// Description: Destructor.
+//
+// Parameters: None.
+//
+// Return: N/A.
+//
+//==============================================================================
+CameraPlayer::~CameraPlayer()
+{
+}
+
+//=============================================================================
+// CameraPlayer::ClearData
+//=============================================================================
+// Description: Comment
+//
+// Parameters: ()
+//
+// Return: void
+//
+//=============================================================================
+void CameraPlayer::ClearData()
+{
+ SimpleAnimationPlayer::ClearData();
+
+ if( mpAnimation != NULL )
+ {
+ mpAnimation->Release();
+ mpAnimation = NULL;
+ }
+}
+
+//******************************************************************************
+//
+// Private Member Functions
+//
+//******************************************************************************
+
+//=============================================================================
+// CameraPlayer::DoLoaded
+//=============================================================================
+// Description: Comment
+//
+// Parameters: ()
+//
+// Return: void
+//
+//=============================================================================
+void CameraPlayer::DoLoaded()
+{
+ SimpleAnimationPlayer::DoLoaded();
+
+ mpAnimation = p3d::find<tAnimation>( GetAnimationName() );
+ rAssert( mpAnimation );
+ mpAnimation->AddRef();
+}
+