| 1678 | } |
| 1679 | |
| 1680 | void DemoPlayAutoDemo(void) { |
| 1681 | char wcard_fname[_MAX_PATH * 2]; |
| 1682 | char auto_fname[_MAX_PATH * 2]; |
| 1683 | int idx = 0; |
| 1684 | ddio_MakePath(wcard_fname, Base_directory, "demo", "*.dem", NULL); |
| 1685 | if (ddio_FindFileStart(wcard_fname, auto_fname)) { |
| 1686 | // Get to the next demo file we are scheduled to do. |
| 1687 | while (idx < Demo_auto_idx) { |
| 1688 | if (!ddio_FindNextFile(auto_fname)) { |
| 1689 | Demo_auto_idx = 0; |
| 1690 | ddio_FindFileClose(); |
| 1691 | // A little recursion to go back to the start |
| 1692 | DemoPlayAutoDemo(); |
| 1693 | return; |
| 1694 | } |
| 1695 | idx++; |
| 1696 | } |
| 1697 | // Now we should have the proper filename |
| 1698 | if (DemoPlaybackFile(auto_fname)) { |
| 1699 | Demo_auto_play = true; |
| 1700 | } else { |
| 1701 | Demo_auto_play = false; |
| 1702 | } |
| 1703 | } else { |
| 1704 | // No demo files are available, sorry! |
| 1705 | Demo_auto_play = false; |
| 1706 | } |
| 1707 | } |
| 1708 | |
| 1709 | void DemoWritePersistantHUDMessage(ddgr_color color, int x, int y, float time, int flags, int sound_index, char *msg) { |
| 1710 | cf_WriteByte(Demo_cfp, DT_PERSISTANT_HUD); |
nothing calls this directly
no test coverage detected