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

Function C_Ticker

source/common/console/c_console.cpp:522–559  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

520
521int consoletic = 0;
522void C_Ticker()
523{
524 static int lasttic = 0;
525 consoletic++;
526
527 if (lasttic == 0)
528 lasttic = consoletic - 1;
529
530 if (con_buffersize > 0)
531 {
532 conbuffer->ResizeBuffer(con_buffersize);
533 }
534
535 if (ConsoleState != c_up)
536 {
537 if (ConsoleState == c_falling)
538 {
539 ConBottom += (consoletic - lasttic) * (twod->GetHeight() * 2 / 25);
540 if (ConBottom >= twod->GetHeight() / 2)
541 {
542 ConBottom = twod->GetHeight() / 2;
543 ConsoleState = c_down;
544 }
545 }
546 else if (ConsoleState == c_rising)
547 {
548 ConBottom -= (consoletic - lasttic) * (twod->GetHeight() * 2 / 25);
549 if (ConBottom <= 0)
550 {
551 ConsoleState = c_up;
552 ConBottom = 0;
553 }
554 }
555 }
556
557 lasttic = consoletic;
558 if (NotifyStrings) NotifyStrings->Tick();
559}
560
561void C_DrawConsole ()
562{

Callers 1

TryRunTicsFunction · 0.85

Calls 3

ResizeBufferMethod · 0.80
GetHeightMethod · 0.45
TickMethod · 0.45

Tested by

no test coverage detected