summaryrefslogtreecommitdiffstats
path: root/game/code/contexts/entrycontext.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/contexts/entrycontext.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/contexts/entrycontext.cpp')
-rw-r--r--game/code/contexts/entrycontext.cpp211
1 files changed, 211 insertions, 0 deletions
diff --git a/game/code/contexts/entrycontext.cpp b/game/code/contexts/entrycontext.cpp
new file mode 100644
index 0000000..41beb67
--- /dev/null
+++ b/game/code/contexts/entrycontext.cpp
@@ -0,0 +1,211 @@
+//=============================================================================
+// Copyright (C) 2002 Radical Entertainment Ltd. All rights reserved.
+//
+// File: entrycontext.cpp
+//
+// Description: Implementation of EntryContext.
+//
+// History: + Created -- Darwin Chau
+//
+//=============================================================================
+
+//========================================
+// System Includes
+//========================================
+#include <raddebug.hpp>
+
+//========================================
+// Project Includes
+//========================================
+#include <contexts/entrycontext.h>
+#include <memory/srrmemory.h>
+
+
+//******************************************************************************
+//
+// Global Data, Local Data, Local Classes
+//
+//******************************************************************************
+
+//
+// Static pointer to instance of singleton.
+//
+EntryContext* EntryContext::spInstance = NULL;
+
+
+//******************************************************************************
+//
+// Public Member Functions
+//
+//******************************************************************************
+
+//==============================================================================
+// EntryContext::GetInstance
+//==============================================================================
+//
+// Description: - Access point for the EntryContext singleton.
+// - Creates the EntryContext if needed.
+//
+// Parameters: None.
+//
+// Return: Pointer to the EntryContext.
+//
+// Constraints: This is a singleton so only one instance is allowed.
+//
+//==============================================================================
+EntryContext* EntryContext::GetInstance()
+{
+ if( spInstance == NULL )
+ {
+ spInstance = new(GMA_PERSISTENT) EntryContext;
+ rAssert( spInstance );
+ }
+
+ return spInstance;
+}
+
+
+//******************************************************************************
+//
+// Protected Member Functions
+//
+//******************************************************************************
+
+//==============================================================================
+// EntryContext::OnStart
+//==============================================================================
+//
+// Description:
+//
+// Parameters:
+//
+// Return:
+//
+//==============================================================================
+void EntryContext::OnStart( ContextEnum previousContext )
+{
+ MEMTRACK_PUSH_FLAG( "Entry" );
+}
+
+
+//==============================================================================
+// EntryContext::OnStop
+//==============================================================================
+//
+// Description:
+//
+// Parameters:
+//
+// Return:
+//
+//==============================================================================
+void EntryContext::OnStop( ContextEnum nextContext )
+{
+ MEMTRACK_POP_FLAG( "" );
+}
+
+
+//==============================================================================
+// EntryContext::OnUpdate
+//==============================================================================
+//
+// Description:
+//
+// Parameters:
+//
+// Return:
+//
+//==============================================================================
+void EntryContext::OnUpdate( unsigned int elapsedTime )
+{
+}
+
+
+//==============================================================================
+// EntryContext::OnSuspend
+//==============================================================================
+//
+// Description:
+//
+// Parameters:
+//
+// Return:
+//
+//==============================================================================
+void EntryContext::OnSuspend()
+{
+}
+
+
+//==============================================================================
+// EntryContext::OnResume
+//==============================================================================
+//
+// Description:
+//
+// Parameters:
+//
+// Return:
+//
+//==============================================================================
+void EntryContext::OnResume()
+{
+}
+
+
+//==============================================================================
+// EntryContext::OnHandleEvent
+//==============================================================================
+//
+// Description:
+//
+// Parameters:
+//
+// Return:
+//
+//==============================================================================
+void EntryContext::OnHandleEvent( EventEnum id, void* pEventData )
+{
+}
+
+
+
+//******************************************************************************
+//
+// Private Member Functions
+//
+//******************************************************************************
+
+
+//==============================================================================
+// EntryContext::EntryContext
+//==============================================================================
+//
+// Description: Constructor.
+//
+// Parameters: None.
+//
+// Return: N/A.
+//
+//==============================================================================//
+EntryContext::EntryContext()
+{
+}
+
+
+//==============================================================================
+// EntryContext::~EntryContext
+//==============================================================================
+//
+// Description: Destructor.
+//
+// Parameters: None.
+//
+// Return: N/A.
+//
+//==============================================================================//
+EntryContext::~EntryContext()
+{
+ spInstance = NULL;
+}
+