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

Function TriggerActive

TombEngine/Game/control/trigger.cpp:38–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36int KeyTriggerActive;
37
38int TriggerActive(ItemInfo* item)
39{
40 int flag = (~item->Flags & IFLAG_REVERSE) >> 14;
41 if ((item->Flags & IFLAG_ACTIVATION_MASK) != IFLAG_ACTIVATION_MASK)
42 {
43 flag = !flag;
44 }
45 else
46 {
47 if (item->Timer)
48 {
49 if (item->Timer > 0)
50 {
51 --item->Timer;
52 if (!item->Timer)
53 item->Timer = NO_VALUE;
54 }
55 else if (item->Timer < NO_VALUE)
56 {
57 ++item->Timer;
58 if (item->Timer == NO_VALUE)
59 item->Timer = 0;
60 }
61
62 if (item->Timer <= NO_VALUE)
63 flag = !flag;
64 }
65 }
66
67 return flag;
68}
69
70bool GetKeyTrigger(ItemInfo* item)
71{

Callers 15

ControlSpinningBladeFunction · 0.85
ControlKillerStatueFunction · 0.85
ControlBartoliFunction · 0.85
ControlElectricCleanerFunction · 0.85
WallMountedBladeControlFunction · 0.85
ControlFirePendulumFunction · 0.85
CollideFirePendulumFunction · 0.85
ControlTurningBladeFunction · 0.85
CollideTurningBladeFunction · 0.85
ControlTrainFunction · 0.85
ControlFishSwarmFunction · 0.85
UpdateFishSwarmFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected