MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / InitGameSystems

Function InitGameSystems

Descent3/init.cpp:1612–1648  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1610}
1611
1612void 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//////////////////////////////////////////////////////////////////////////////
1651static float Init_messagebar_portion = 0.0f, Init_messagebar_offset = 0.0f;

Callers 1

InitD3Systems2Function · 0.85

Calls 10

SetInitMessageLengthFunction · 0.85
TelComInitFunction · 0.85
InitFrameTimeFunction · 0.85
g3_SetAspectRatioFunction · 0.85
ForceInitFunction · 0.85
ui_InitFunction · 0.85
ui_UseCursorFunction · 0.85
NewUIInitFunction · 0.85
InitControlsFunction · 0.85
FindArgFunction · 0.70

Tested by

no test coverage detected