| 1610 | } |
| 1611 | |
| 1612 | void InitGameSystems(bool editor) { |
| 1613 | // initialize possible remote controller. |
| 1614 | int adr = FindArg("-rjoy"); |
| 1615 | if (adr) |
| 1616 | Controller_ip = &GameArgs[adr + 1][1]; |
| 1617 | |
| 1618 | // do other joint editor/game initialization. |
| 1619 | SetInitMessageLength(TXT_INITCOLLATING, 0.4f); |
| 1620 | TelComInit(); |
| 1621 | InitFrameTime(); |
| 1622 | |
| 1623 | // Check for aspect ratio override |
| 1624 | int t = FindArg("-aspect"); |
| 1625 | if (t) { |
| 1626 | float aspect = atof(GameArgs[t + 1]); |
| 1627 | if (aspect > 0.0) |
| 1628 | g3_SetAspectRatio(aspect); |
| 1629 | } |
| 1630 | |
| 1631 | // Initialize force feedback effects (if we can) |
| 1632 | ForceInit(); |
| 1633 | |
| 1634 | if (!editor) { |
| 1635 | tUIInitInfo uiinit; |
| 1636 | uiinit.window_font = SMALL_FONT; |
| 1637 | uiinit.w = 640; |
| 1638 | uiinit.h = 480; |
| 1639 | ui_Init(Descent, &uiinit); |
| 1640 | ui_UseCursor("StdCursor.ogf"); |
| 1641 | |
| 1642 | NewUIInit(); |
| 1643 | InitControls(); |
| 1644 | |
| 1645 | atexit(CloseControls); |
| 1646 | atexit(ui_Close); |
| 1647 | } |
| 1648 | } |
| 1649 | |
| 1650 | ////////////////////////////////////////////////////////////////////////////// |
| 1651 | static float Init_messagebar_portion = 0.0f, Init_messagebar_offset = 0.0f; |
no test coverage detected