-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathEndLevelData.cpp
More file actions
51 lines (37 loc) · 1.02 KB
/
Copy pathEndLevelData.cpp
File metadata and controls
51 lines (37 loc) · 1.02 KB
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
#include "common.h"
#include "EndLevelData.h"
#include "debuglog.h"
CEndLevelData END_LEVEL_DATA ;
//******************************************************************************************
CEndLevelData::CEndLevelData()
{
mRanking=-1;
mWorldFinished = 100;
mFinalState = GAME_STATE_LEVEL_LOST;
mThingsKilled.SetAll(0);
}
//******************************************************************************************
BOOL CEndLevelData::IsAllSecondaryObjectivesComplete()
{
BOOL res = TRUE ;
SINT c0;
BOOL is_set = FALSE ;
for (c0 = 0; c0 < mSecondaryObjectives.Size(); c0 ++)
{
if (mSecondaryObjectives[c0].GetStatus() == MOS_COMPLETE ||
mSecondaryObjectives[c0].GetStatus() == MOS_FAILED )
{
is_set = TRUE ;
}
if (mSecondaryObjectives[c0].GetStatus() == MOS_FAILED)
{
res = FALSE ;
}
}
if (is_set == FALSE)
{
LOG.AddMessage("ERROR: No secondary objectives in call to 'IsAllSecondaryObjectivesComplete'") ;
return FALSE ;
}
return res ;
}