MCPcopy Create free account
hub / github.com/ZDoom/Raze / StartTransition

Method StartTransition

source/common/menu/menu.cpp:202–220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200//============================================================================
201
202bool MenuTransition::StartTransition(DMenu* from, DMenu* to, MenuTransitionType animtype)
203{
204 if (!from->canAnimate() || !to->canAnimate() || animtype == MA_None)
205 {
206 return false;
207 }
208 else
209 {
210 start = I_GetTimeNS() * (120. / 1'000'000'000.);
211 length = 30;
212 dir = animtype == MA_Advance ? 1 : -1;
213 destroyprev = animtype == MA_Return;
214 previous = from;
215 current = to;
216 if (from) GC::WriteBarrier(from);
217 if (to) GC::WriteBarrier(to);
218 return true;
219 }
220}
221
222bool MenuTransition::Draw()
223{

Callers 2

CloseMethod · 0.80
M_ActivateMenuFunction · 0.80

Calls 2

I_GetTimeNSFunction · 0.85
canAnimateMethod · 0.80

Tested by

no test coverage detected