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

Function mng_LoadTableFiles

manage/manage.cpp:632–673  ·  view source on GitHub ↗

Loads our tables

Source from the content-addressed store, hash-verified

630}
631// Loads our tables
632int mng_LoadTableFiles(int show_progress) {
633 if (Network_up) {
634 LockList = (mngs_Pagelock *)mem_malloc(MAX_LOCKLIST_ELEMENTS * sizeof(mngs_Pagelock));
635 Num_locklist = mng_GetListOfLocks(LockList, MAX_LOCKLIST_ELEMENTS, TableUser);
636 OldFiles = (old_file *)mem_malloc(MAX_OLDFILE_ELEMENTS * sizeof(old_file));
637 Num_old_files = 0;
638 ASSERT(OldFiles);
639#if defined(WIN32)
640 if (TableTimeThreshold.dwHighDateTime != -1)
641 BuildOldFileList(TableTimeThreshold);
642#endif
643
644 Starting_editor = 1;
645 }
646 int ret1, ret2;
647 if (Fast_load_trick && !FindArg("-filter"))
648 Network_up = 0;
649
650 ret1 = mng_LoadNetPages(show_progress);
651 if (Fast_load_trick) {
652 Network_up = 1;
653 Fast_load_trick = 0;
654 }
655 ret2 = mng_LoadLocalPages();
656 if (Network_up) {
657 Starting_editor = 0;
658 Num_locklist = 0;
659 Num_old_files = 0;
660 mem_free(OldFiles);
661 mem_free(LockList);
662#ifndef RELEASE
663#if defined(WIN32)
664 remove("c:\\edload");
665#endif
666#endif
667 }
668 RemapEverything();
669
670 if (!ret1 || !ret2)
671 return 0;
672 return 1;
673}
674// This is for initting tables on STAND_ALONE, if the network is down, or if
675// the user doesn't want network support
676int mng_InitLocalTables() {

Callers 1

InitD3Systems2Function · 0.85

Calls 6

mng_GetListOfLocksFunction · 0.85
BuildOldFileListFunction · 0.85
mng_LoadNetPagesFunction · 0.85
mng_LoadLocalPagesFunction · 0.85
RemapEverythingFunction · 0.85
FindArgFunction · 0.50

Tested by

no test coverage detected