2020-06-20 07:46:41 +00:00
|
|
|
#pragma once
|
|
|
|
#include <functional>
|
2020-06-27 09:48:55 +00:00
|
|
|
#include "dobject.h"
|
2020-06-20 07:46:41 +00:00
|
|
|
|
2020-06-28 08:14:42 +00:00
|
|
|
using CompletionFunc = std::function<void(bool)>;
|
2020-06-27 09:48:55 +00:00
|
|
|
|
|
|
|
class DScreenJob : public DObject
|
|
|
|
{
|
|
|
|
DECLARE_CLASS(DScreenJob, DObject)
|
|
|
|
|
|
|
|
public:
|
2020-06-27 22:32:28 +00:00
|
|
|
virtual int Frame(uint64_t clock, bool skiprequest) = 0;
|
2020-06-27 09:48:55 +00:00
|
|
|
};
|
|
|
|
|
2020-06-28 19:38:25 +00:00
|
|
|
struct JobDesc
|
|
|
|
{
|
|
|
|
DScreenJob* job;
|
|
|
|
void (*postAction)();
|
|
|
|
bool ignoreifskipped;
|
|
|
|
};
|
|
|
|
|
2020-06-27 09:48:55 +00:00
|
|
|
|
2020-06-28 19:38:25 +00:00
|
|
|
void RunScreenJob(JobDesc *jobs, int count, CompletionFunc completion, bool clearbefore = true);
|
2020-06-27 09:48:55 +00:00
|
|
|
|
|
|
|
struct AnimSound
|
|
|
|
{
|
|
|
|
int framenum;
|
|
|
|
int soundnum;
|
|
|
|
};
|
|
|
|
|
2020-06-28 19:38:25 +00:00
|
|
|
DScreenJob *PlayVideo(const char *filename, const AnimSound *ans = nullptr, const int *frameticks = nullptr);
|