forked from cyxx/f2bgl
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcutscene.h
59 lines (46 loc) · 1.08 KB
/
cutscene.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
* Fade To Black engine rewrite
* Copyright (C) 2006-2012 Gregory Montoir ([email protected])
*/
#ifndef CUTSCENE_H__
#define CUTSCENE_H__
#include "file.h"
#include "util.h"
enum {
kCutsceneScenesCount = 54,
kCutscenePlaybackQueueSize = 4,
};
struct Game;
struct Sound;
struct Render;
struct CutscenePlayer {
Render *_render;
Game *_game;
Sound *_snd;
virtual ~CutscenePlayer() {}
virtual bool load(int num) = 0;
virtual void unload() = 0;
virtual bool update(uint32_t ticks) = 0;
};
CutscenePlayer *CutscenePlayer_Dps_create();
CutscenePlayer *CutscenePlayer_Cin_create();
struct Cutscene {
CutscenePlayer *_player;
int _playCounter;
int _playedTable[kCutsceneScenesCount];
int _numToPlayCounter;
int _numToPlay;
bool _interrupted;
int _playQueue[kCutscenePlaybackQueueSize];
int _playQueueSize;
Cutscene(Render *render, Game *g, Sound *snd);
~Cutscene();
bool load(int num);
void unload();
bool update(uint32_t ticks);
bool isInterrupted() const;
void queue(int num, int counter = 0);
int dequeue();
int changeToNext();
};
#endif // CUTSCENE_H__