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

Function GetKeyTrigger

TombEngine/Game/control/trigger.cpp:70–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70bool GetKeyTrigger(ItemInfo* item)
71{
72 short* triggerIndexPtr = GetTriggerIndex(item);
73 if (triggerIndexPtr == nullptr)
74 return false;
75
76 short* triggerPtr = triggerIndexPtr;
77 if (*triggerPtr & END_BIT)
78 return false;
79
80 for (short* j = &triggerPtr[2]; (*j >> 8) & 0x3C || item != &g_Level.Items[*j & VALUE_BITS]; j++)
81 {
82 if (*j & END_BIT)
83 return false;
84 }
85
86 return true;
87}
88
89// NOTE: attatchedToSwitch parameter unused.
90int GetSwitchTrigger(ItemInfo* item, short* itemNumbersPtr, int attatchedToSwitch)

Callers

nothing calls this directly

Calls 1

GetTriggerIndexFunction · 0.85

Tested by

no test coverage detected