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

Function Descent3

Descent3/descent.cpp:445–520  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

443int16_t Proxy_port = 80;
444
445void Descent3() {
446 int type;
447
448#ifdef _DEBUG
449 type = DEVELOPMENT_VERSION;
450#else
451 type = RELEASE_VERSION;
452#endif
453#ifdef BETA
454 type |= BETA_VERSION;
455#endif
456#ifdef DEMO
457 type |= DEMO_VERSION;
458#endif
459
460 ProgramVersion(type, D3_MAJORVER, D3_MINORVER, D3_BUILD);
461
462 // Catch cfile errors
463 try {
464 // Init a bunch of stuff
465 InitD3Systems1(false);
466
467 int proxyarg = FindArg("-httpproxy");
468 if (proxyarg) {
469 strcpy(Proxy_server, GameArgs[proxyarg + 1]);
470
471 char *port = strchr(Proxy_server, ':');
472 if (port) {
473 // terminate the hostname
474 *port = 0;
475 // Increment to the first character of the port name
476 port++;
477 // get the port number
478 Proxy_port = atoi(port);
479 }
480 }
481 // Show intro & loading screens if not dedicated server
482 if (!Dedicated_server) {
483 SetScreenMode(SM_CINEMATIC);
484
485 // Show the intro movie
486 if (!FindArg("-nointro")) {
487 // Intros to be played
488 const std::vector<std::filesystem::path> intros = {
489 "dolby1.mv8",
490 "intro.mve",
491 };
492
493 for (auto const &intro : intros) {
494 PlayMovie(std::filesystem::path(Base_directory) / "movies" / intro);
495 }
496 }
497
498 SetScreenMode(SM_MENU);
499 // Show the intro screen
500 IntroScreen();
501 }
502

Callers 1

runMethod · 0.85

Calls 12

ProgramVersionFunction · 0.85
InitD3Systems1Function · 0.85
SetScreenModeFunction · 0.85
PlayMovieFunction · 0.85
IntroScreenFunction · 0.85
InitD3Systems2Function · 0.85
SetFunctionModeFunction · 0.85
MainLoopFunction · 0.85
ddio_DeleteLockFileFunction · 0.85
SaveGameSettingsFunction · 0.85
ErrorFunction · 0.85
FindArgFunction · 0.70

Tested by

no test coverage detected