MCPcopy Create free account
hub / github.com/BobbyAnguelov/Esoterica / SwitchToLoadTask

Method SwitchToLoadTask

Code/Base/Resource/ResourceRequest.cpp:67–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65
66 ResourceID const& ResourceRequest::GetResourceID() const
67 {
68 return m_pResourceRecord->GetResourceID();
69 }
70
71 ResourceTypeID ResourceRequest::GetResourceTypeID() const
72 {
73 return m_pResourceRecord->GetResourceTypeID();
74 }
75
76 LoadingStatus ResourceRequest::GetLoadingStatus() const
77 {
78 return m_pResourceRecord->GetLoadingStatus();
79 }
80
81 void ResourceRequest::LogError( char const* pFormat, ... )
82 {
83 #if EE_DEVELOPMENT_TOOLS
84 va_list args;
85 va_start( args, pFormat );
86
87 InlineString msg;
88 msg.sprintf_va_list( pFormat, args );
89
90 m_pResourceRecord->m_errorLog.append( msg.c_str() );
91 EE_LOG_ERROR( LogCategory::Resource, "Resource Request", msg.c_str() );
92
93 va_end( args );
94 #endif
95 }
96
97 void ResourceRequest::SetStage( ResourceLoadStage newStage )
98 {
99 ResourceLoadStage const currentStage = m_stage;
100 EE_ASSERT( newStage != currentStage );
101
102 #if EE_DEVELOPMENT_TOOLS
103 if ( currentStage != ResourceLoadStage::None )
104 {
105 m_pResourceRecord->m_stageDurations[(uint8_t) currentStage] = m_stageTimer.GetElapsedTimeMilliseconds();
106 }
107 #endif
108
109 //-------------------------------------------------------------------------
110
111 m_stage = newStage;

Callers 1

UpdateMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected