OpenBarnyard
 
Loading...
Searching...
No Matches
AGameSystemManager Class Reference

#include <AGameSystemManager.h>

Inheritance diagram for AGameSystemManager:

Public Types

using ThisClass = AGameSystemManager
 
using BaseClass = Toshi::TTask
 

Public Member Functions

virtual Toshi::TClass * GetClass () override
 
virtual TBOOL OnCreate () override
 
virtual TBOOL OnUpdate (TFLOAT a_fDeltaTime) override
 

Static Public Member Functions

static Toshi::TObject * CreateTObject ()
 
static Toshi::TObject * CreateTObjectInPlace (void *a_pPtr)
 
static void InitialiseClass ()
 
static void DeinitialiseClass ()
 
static TFORCEINLINE Toshi::TClass * GetClassStatic ()
 

Static Public Attributes

static constexpr Toshi::TClass * PARENTCLASS = & Toshi::TTask::ms_oClass
 
static Toshi::TClass ms_oClass = Toshi::TClass( "AGameSystemManager", AGameSystemManager::PARENTCLASS, AGameSystemManager::CreateTObject, AGameSystemManager::CreateTObjectInPlace, AGameSystemManager::InitialiseClass, AGameSystemManager::DeinitialiseClass, 0, 1, sizeof( AGameSystemManager ), alignof( AGameSystemManager ) )
 

Detailed Description

Definition at line 4 of file AGameSystemManager.h.

Member Typedef Documentation

◆ BaseClass

using AGameSystemManager::BaseClass = Toshi::TTask

Definition at line 7 of file AGameSystemManager.h.

◆ ThisClass

Member Function Documentation

◆ CreateTObject()

Toshi::TObject * AGameSystemManager::CreateTObject ( )
static

Definition at line 23 of file AGameSystemManager.cpp.

◆ CreateTObjectInPlace()

Toshi::TObject * AGameSystemManager::CreateTObjectInPlace ( void * a_pPtr)
static

Definition at line 23 of file AGameSystemManager.cpp.

◆ DeinitialiseClass()

void AGameSystemManager::DeinitialiseClass ( )
static

Definition at line 23 of file AGameSystemManager.cpp.

◆ GetClass()

Toshi::TClass * AGameSystemManager::GetClass ( )
overridevirtual

Definition at line 23 of file AGameSystemManager.cpp.

◆ GetClassStatic()

static TFORCEINLINE Toshi::TClass * AGameSystemManager::GetClassStatic ( )
inlinestatic

Definition at line 7 of file AGameSystemManager.h.

◆ InitialiseClass()

void AGameSystemManager::InitialiseClass ( )
static

Definition at line 23 of file AGameSystemManager.cpp.

◆ OnCreate()

TBOOL AGameSystemManager::OnCreate ( )
overridevirtual

Definition at line 27 of file AGameSystemManager.cpp.

28{
29 TIMPLEMENT();
30
31 // Load keylibs from the startup library
32 TString8 startupLibFileName;
33 startupLibFileName.Format( "Data/%s.trb", "lib_startup" );
34
35 TTRB startupLibTrb;
36 startupLibTrb.Load( startupLibFileName );
37 auto pProperties = PBProperties::LoadFromTRB( startupLibTrb );
38 auto pKeylibProperty = pProperties->GetProperty( "keylib" );
39
40 if ( pKeylibProperty )
41 {
42 AKeyFrameLibraryManager::GetSingleton()->LoadLibrariesFromProperties(
43 pKeylibProperty,
44 &startupLibTrb
45 );
46 }
47
48 TGetClass( AModelRepos ).CreateObject();
49
50 auto pScheduler = g_oSystemManager.GetScheduler();
51 pScheduler->CreateTask<AAnimatableObjectManager>( this )->Create();
52
53 AAnimatableObjectManager::GetSingleton()->LoadAnimSoundBreakpoints( "Data/Sound/AnimSoundBP.trb" );
54
55 // Initialise lighting manages for skinned meshes
56 ASkinLightingManager::CreateSingleton();
57
58 // Initialise some basic things like cameras, music and more
59 pScheduler->CreateTask<ACameraManager>( this )->Create();
60 pScheduler->CreateTask<AMusicManager>( this )->Create();
61
62 // Load models from the startup library
63 AAnimatableObjectManager::GetSingleton()->LoadTypesFromLibrary( "lib_startup" );
64
65 pScheduler->CreateTask<ASimAnimModelHelperManager>( this )->Create();
66
67 AAssetStreaming::CreateSingleton()->SetFlag( TFALSE );
68
69 // Instances, trees and other things...
70 ATreeManager::CreateSingleton()->Initialise();
71
72 return TTRUE;
73}
#define TIMPLEMENT()
Definition Defines.h:136
#define TGetClass(CLASS)
Definition TObject.h:13
#define TFALSE
Definition Typedefs.h:24
#define TTRUE
Definition Typedefs.h:25
TSystemManager g_oSystemManager
Definition TSystem.cpp:15
ERROR Load(const TCHAR *a_szFilePath, TUINT32 a_uiUnknown=0)
Definition TTRB.cpp:38
TTask * CreateTask(TClass *a_pClass, TTask *a_pParent=nullptr)
TString8 & Format(const TCHAR *a_pcFormat,...)
Definition TString8.cpp:176
TScheduler * GetScheduler() const
Definition TSystem.h:155

◆ OnUpdate()

TBOOL AGameSystemManager::OnUpdate ( TFLOAT a_fDeltaTime)
overridevirtual

Definition at line 75 of file AGameSystemManager.cpp.

76{
77 TIMPLEMENT();
78
79 AAssetStreaming::GetSingleton()->Update();
80
81 if ( ATerrainInterface::IsSingletonCreated() )
82 {
83 ATerrainInterface::GetSingleton()->Update();
84 }
85
86 return TTRUE;
87}

Member Data Documentation

◆ ms_oClass

Definition at line 7 of file AGameSystemManager.h.

◆ PARENTCLASS

Toshi::TClass* AGameSystemManager::PARENTCLASS = & Toshi::TTask::ms_oClass
staticconstexpr

Definition at line 7 of file AGameSystemManager.h.


The documentation for this class was generated from the following files: