MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / zScriptExecuteEvents

Function zScriptExecuteEvents

src/SB/Game/zScript.cpp:90–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90void zScriptExecuteEvents(_zScript* script, F32 start, F32 end)
91{
92 script->more = 0;
93
94 xScriptEventAsset* a = (xScriptEventAsset*)(script->tasset + 1);
95 for (U32 i = 0; i < script->tasset->eventCount; ++i)
96 {
97 if (a[i].widget != 0 && a[i].time >= start)
98 {
99 if (a[i].time < end)
100 {
101 if (xBase* widget = zSceneFindObject(a[i].widget))
102 {
103 xBase* paramWidget =
104 (!a[i].paramWidget) ? NULL : zSceneFindObject(a[i].paramWidget);
105 zEntEvent(script, 0, widget, a[i].paramEvent, a[i].param, paramWidget, 0);
106 }
107 }
108 else
109 {
110 script->more = 1;
111 }
112 }
113 }
114}
115
116void zScriptUpdate(xBase* obj, xScene* scene, F32 dt)
117{

Callers 1

zScriptUpdateFunction · 0.70

Calls 2

zSceneFindObjectFunction · 0.85
zEntEventFunction · 0.50

Tested by

no test coverage detected