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

Function InitD3Systems1

Descent3/init.cpp:1815–1901  ·  view source on GitHub ↗

Initialiaze everything before data load

Source from the content-addressed store, hash-verified

1813uint16_t PXOPort = 0;
1814// Initialiaze everything before data load
1815void InitD3Systems1(bool editor) {
1816#if defined(RELEASE)
1817 SetDebugBreakHandlers(NULL, NULL);
1818#else
1819 SetDebugBreakHandlers(D3DebugStopHandler, D3DebugResumeHandler);
1820#endif
1821
1822 Init_in_editor = editor;
1823
1824 // Gamespy command to specify the port to listen on
1825 int gameportarg = FindArg("+host");
1826 if (!gameportarg) {
1827 gameportarg = FindArg("-useport");
1828 }
1829 if (gameportarg) {
1830 Gameport = atoi(GameArgs[gameportarg + 1]);
1831 }
1832
1833 int pxoportarg = FindArg("-pxoport");
1834 if (pxoportarg)
1835 PXOPort = atoi(GameArgs[pxoportarg + 1]);
1836
1837 // perform user i/o system initialization
1838 INIT_MESSAGE(("Initializing I/O system."));
1839 InitIOSystems(editor);
1840
1841 // load the string table
1842 InitStringTable();
1843
1844 INIT_MESSAGE(("Initializing GFX"));
1845 InitGraphics(editor);
1846
1847 // initialize data structures
1848 InitObjectInfo();
1849 InitVClips();
1850 InitRooms();
1851
1852 // initialize lighting systems
1853 InitLightmapInfo();
1854 InitSpecialFaces();
1855 InitDynamicLighting();
1856
1857 // Initialize missions
1858 InitMission();
1859
1860 // Initializes the ship structure
1861 InitShips();
1862
1863 // Initializes the fvi structures for quicker operation
1864 InitFVI();
1865
1866 // Initializes the matcens
1867 InitMatcens();
1868
1869 // This function needs be called before ANY 3d stuff can get done. I mean it.
1870 InitMathTables();
1871
1872 // Initialize a random seed.

Callers 2

OnCreateClientMethod · 0.85
Descent3Function · 0.85

Calls 15

SetDebugBreakHandlersFunction · 0.85
InitIOSystemsFunction · 0.85
InitStringTableFunction · 0.85
InitGraphicsFunction · 0.85
InitObjectInfoFunction · 0.85
InitVClipsFunction · 0.85
InitRoomsFunction · 0.85
InitLightmapInfoFunction · 0.85
InitSpecialFacesFunction · 0.85
InitDynamicLightingFunction · 0.85
InitMissionFunction · 0.85
InitShipsFunction · 0.85

Tested by

no test coverage detected