| 520 | |
| 521 | int consoletic = 0; |
| 522 | void 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 | |
| 561 | void C_DrawConsole () |
| 562 | { |
no test coverage detected