summaryrefslogtreecommitdiff
path: root/hammer/ibsplightingthread.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /hammer/ibsplightingthread.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'hammer/ibsplightingthread.h')
-rw-r--r--hammer/ibsplightingthread.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/hammer/ibsplightingthread.h b/hammer/ibsplightingthread.h
new file mode 100644
index 0000000..de47600
--- /dev/null
+++ b/hammer/ibsplightingthread.h
@@ -0,0 +1,54 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================//
+
+#ifndef IBSPLIGHTING_THREAD_H
+#define IBSPLIGHTING_THREAD_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+
+#include "ivraddll.h"
+
+
+class IBSPLightingThread
+{
+public:
+ enum
+ {
+ STATE_IDLE=0,
+ STATE_LIGHTING=1,
+ STATE_FINISHED=2
+ };
+
+ virtual ~IBSPLightingThread() {}
+
+ virtual void Release() = 0;
+
+ // Start processing light in the background thread.
+ //
+ // Goes to STATE_LIGHTING, then if it's successful, it goes to STATE_FINISHED.
+ // If unsuccessful or interrupted, it goes to STATE_IDLE.
+ //
+ // If this is called while it's already lighting, it stops the current lighting
+ // process and restarts.
+ virtual void StartLighting( char const *pVMFFileWithEntities ) = 0;
+
+ // Returns one of the STATE_ defines.
+ virtual int GetCurrentState() = 0;
+
+ // If lighting is in progress, make it stop.
+ virtual void Interrupt() = 0;
+
+ // Returns IVRadDLL::GetPercentComplete if it's lighting.
+ virtual float GetPercentComplete() = 0;
+};
+
+IBSPLightingThread* CreateBSPLightingThread( IVRadDLL *pDLL );
+
+
+#endif // IBSPLIGHTING_THREAD_H