mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Compile it as static object & renamed to more correct names. Also made the integral type for frame delay an unsigned int instead
26 lines
476 B
C++
26 lines
476 B
C++
#ifndef TIER0_IFRAMETASK_H
|
|
#define TIER0_IFRAMETASK_H
|
|
|
|
struct QueuedTasks_s
|
|
{
|
|
unsigned int m_nDelayedFrames;
|
|
std::function<void()> m_rFunctor;
|
|
|
|
QueuedTasks_s(unsigned int frames, std::function<void()> functor)
|
|
{
|
|
m_nDelayedFrames = frames;
|
|
m_rFunctor = functor;
|
|
}
|
|
};
|
|
|
|
abstract_class IFrameTask
|
|
{
|
|
public:
|
|
virtual ~IFrameTask() {}
|
|
|
|
virtual void RunFrame() = 0;
|
|
virtual bool IsFinished() const = 0;
|
|
};
|
|
|
|
#endif // TIER0_IFRAMETASK_H
|