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

Function DemoMission

Descent3/Mission.cpp:777–881  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

775}
776#if (defined(OEM) || defined(DEMO))
777bool DemoMission(int mode = 0) {
778 tMission *msn = &Current_mission;
779 tLevelNode *lvls = (tLevelNode *)mem_malloc(sizeof(tLevelNode) * 5);
780 msn->cur_level = 1;
781 msn->num_levels = 1;
782 msn->levels = lvls;
783
784 msn->multiplayable = true;
785 msn->singleplayable = true;
786
787 memset(lvls, 0, sizeof(tLevelNode) * msn->num_levels);
788 strncpy(msn->author, "Outrage", MSN_NAMELEN - 1);
789 if (!mode) {
790 strcpy(msn->name, "Descent 3: Sol Ascent");
791 msn->num_levels = 5;
792 memset(lvls, 0, sizeof(tLevelNode) * msn->num_levels);
793#ifdef DEMO
794 msn->multiplayable = false;
795 strcpy(msn->name, "Descent 3: Demo2");
796 msn->num_levels = 1;
797 msn->filename = mem_strdup("d3demo.mn3");
798#else
799 strcpy(msn->name, "Descent 3: Sol Ascent");
800 msn->num_levels = 5;
801 msn->filename = mem_strdup("d3oem.mn3");
802#endif
803 // strncpy(lvls[0].name, "Search for Sweitzer", MSN_NAMELEN-1);
804 lvls[0].flags = LVLFLAG_BRIEFING | LVLFLAG_SCORE;
805 lvls[0].filename = mem_strdup("level1.d3l");
806 lvls[0].briefname = mem_strdup("level1.brf");
807 lvls[0].score = mem_strdup("level1.omf");
808 lvls[0].progress = mem_strdup("l1load.ogf");
809 lvls[0].moviename = mem_strdup("level1.mve");
810#ifndef DEMO
811 // strncpy(lvls[0].name, "Into the Heart of the Ship", MSN_NAMELEN-1);
812 lvls[1].flags = LVLFLAG_BRIEFING | LVLFLAG_SCORE;
813 lvls[1].filename = mem_strdup("level3.d3l");
814 lvls[1].briefname = mem_strdup("level2o.brf");
815 lvls[1].score = mem_strdup("level3.omf");
816 lvls[1].progress = mem_strdup("l3load.ogf");
817 // strncpy(lvls[0].name, "The Nomad Caves", MSN_NAMELEN-1);
818 lvls[2].flags = LVLFLAG_BRIEFING | LVLFLAG_SCORE;
819 lvls[2].filename = mem_strdup("level6.d3l");
820 lvls[2].briefname = mem_strdup("level3o.brf");
821 lvls[2].score = mem_strdup("level6.omf");
822 lvls[2].progress = mem_strdup("l6load.ogf");
823 // strncpy(lvls[0].name, "The Transmode Virus", MSN_NAMELEN-1);
824 lvls[3].flags = LVLFLAG_BRIEFING | LVLFLAG_SCORE;
825 lvls[3].filename = mem_strdup("level7.d3l");
826 lvls[3].briefname = mem_strdup("level4o.brf");
827 lvls[3].score = mem_strdup("level7.omf");
828 lvls[3].progress = mem_strdup("l7load.ogf");
829 // strncpy(lvls[0].name, "The Rescue", MSN_NAMELEN-1);
830 lvls[4].flags = LVLFLAG_BRIEFING | LVLFLAG_SCORE;
831 lvls[4].filename = mem_strdup("level11.d3l");
832 lvls[4].briefname = mem_strdup("level5o.brf");
833 lvls[4].score = mem_strdup("level11.omf");
834 lvls[4].progress = mem_strdup("l11load.ogf");

Callers 1

LoadMissionFunction · 0.85

Calls 2

mn3_OpenFunction · 0.85
InitMissionScriptFunction · 0.85

Tested by

no test coverage detected