-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcutsceneMaker.c
54 lines (40 loc) · 1.37 KB
/
cutsceneMaker.c
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
#include "cutsceneMaker.h"
#define TEST_TILEMAP_FILEPATH "./maps/testMap.txt"
#define TEST_TILEMAP_LINENUM 0
#define TEST_CUTSCENE_EXPORT_FILEPATH "./assets/cutscenes/testCutscene.txt"
bool createNewCutscene()
{
warperTilemap tilemap;
//pick tilemap
//...
importWarperTilemap(&tilemap, TEST_TILEMAP_FILEPATH, TEST_TILEMAP_LINENUM);
warperCutscene cutscene;
int keyFrames = 0; //number of "key frames" that have been created and readied for this cutscene
//initialize cutscene
{
warperAnimation emptyAnimations[10];
warperCutsceneBox emptyBoxes[10];
for(int i = 0; i < 10; i++)
{
initWarperAnimation(&emptyAnimations[i], NULL, 0, 0);
initWarperCutsceneBox(&emptyBoxes[i], NULL, NULL, 0);
}
initWarperCutscene(&cutscene, emptyAnimations, emptyBoxes, 10, TEST_TILEMAP_FILEPATH, TEST_TILEMAP_LINENUM);
}
//create cutscene
bool quit = false, quitAll = false;
cInputState input;
while(!quit)
{
input = cGetInputState(true);
if (input.quitInput || input.keyStates[SDL_SCANCODE_RETURN] || input.keyStates[SDL_SCANCODE_ESCAPE])
{
quit = true;
quitAll = input.quitInput;
}
//
}
destroyWarperTilemap(&tilemap);
exportWarperCutscene(cutscene, TEST_CUTSCENE_EXPORT_FILEPATH);
return quitAll;
}