MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / InitializeSpotCamSequences

Function InitializeSpotCamSequences

TombEngine/Game/spotcam.cpp:74–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74void InitializeSpotCamSequences(bool startFirstSequence)
75{
76 TrackCameraInit = false;
77
78 CameraCnt.clear();
79 SpotCamRemap.clear();
80
81 if (SpotCam.empty())
82 return;
83
84 int currentSequence = SpotCam[0].sequence;
85 int count = 0;
86
87 for (const auto& cam : SpotCam)
88 {
89 if (cam.sequence != currentSequence)
90 {
91 SpotCamRemap[currentSequence] = (int)CameraCnt.size();
92 CameraCnt.push_back(count);
93 currentSequence = cam.sequence;
94 count = 0;
95 }
96
97 count++;
98 }
99
100 SpotCamRemap[currentSequence] = (int)CameraCnt.size();
101 CameraCnt.push_back(count);
102
103 if (startFirstSequence && SpotCamRemap.count(0))
104 {
105 InitializeSpotCam(0);
106 UseSpotCam = true;
107 }
108}
109
110void InitializeSpotCam(short Sequence)
111{

Callers 1

DoLevelFunction · 0.85

Calls 6

InitializeSpotCamFunction · 0.85
clearMethod · 0.45
emptyMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected