-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCutsceneLoader.cpp
More file actions
63 lines (50 loc) · 970 Bytes
/
CutsceneLoader.cpp
File metadata and controls
63 lines (50 loc) · 970 Bytes
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
60
61
62
63
#include "CutsceneLoader.h"
SpawnInfo CutsceneLoader::spawnData =
{
[] -> ActorBase* { return new CutsceneLoader; },
0x0000,
0x0100,
0x00000002,
0x00064000_f,
0x000c8000_f,
0x01000000_f,
0x01000000_f
};
/*
CutsceneLoader parameters:
Parameter 1: FFFF
Parameter 2: CXEE
F: Overlay 0 ID of the script file
C: Condition - see the enum in CutsceneLoader.h
E: Event ID
*/
[[gnu::target("thumb")]]
int CutsceneLoader::InitResources()
{
if (LEVEL_ID == 39 && LAST_ENTRANCE_ID != 0)
return 1;
const bool condition = ang.x & 0xff00;
if (condition == always ||
condition == noStarsInCurrentLevel &&
SAVE_DATA.stars[SUBLEVEL_LEVEL_TABLE[LEVEL_ID]] == 0
)
{
if (!RUNNING_KUPPA_SCRIPT)
{
file = LoadFile(param1);
RunKuppaScript(file);
}
}
return 1;
}
int CutsceneLoader::CleanupResources()
{
delete[] file;
return 1;
}
bool CutsceneLoader::BeforeBehavior()
{
if (RUNNING_KUPPA_SCRIPT != file)
MarkForDestruction();
return false;
}