Example #1
0
    void SetupWad(IwadInfo info, string path)
    {
        if (info.mapInfo != null)
        {
            mapinfo = MapInfoLump.Load(engineWad.GetLumpAsText(info.mapInfo), engineWad);
        }
        Debug.Log("Merging: " + path);
        engineWad.Merge(new WadFile(path));

        wad = engineWad;

        if (info.mapnameFormat == "MAP")
        {
            mapFormat = MapFormat.MAP;
        }
        if (info.mapnameFormat == "EM")
        {
            mapFormat = MapFormat.EM;
        }
        iwadSelector = false;

        for (int i = 0; i < args.pwads.Count; i++)
        {
            wad.Merge(args.pwads[i]);
        }

        if (info.multigen != null)
        {
            wad.multigen = new MultigenParser(engineWad.GetLumpAsText(info.multigen));
        }
        Locale.Load(wad.GetLumpAsText("LOCAL_EN"));
        ItemData.Load(wad.GetLumpAsText("DOOMITEM"));
        StartGame(info);
    }
Example #2
0
    void StartGame(IwadInfo info)
    {
        mapBuilder = new DoomMapBuilder();

        if (args.runTests)
        {
            Debug.Log("Running tests...");

            // Keep a separate map builder to avoid issues building maps afterwards
            DoomMapBuilder testMapBuilder = new DoomMapBuilder();

            foreach (KeyValuePair <string, MapInfo> entry in mapinfo)
            {
                int errors = testMapBuilder.TestMap(wad, entry.Key);
                if (errors > 0)
                {
                    Debug.Log("Failed sectors in " + entry.Key + ": " + errors);
                }
            }
        }

        if (args.warp == "")
        {
            title.Build(wad);
            PlayMidi(info.titleMusic);
        }
        else
        {
            title.DisableCamera();
            menuActive = false;
            BuildMap(args.warp);
        }
        SetupMenu();
        SetupHUD();
    }
Example #3
0
 void StartGame(IwadInfo info)
 {
     if (args.warp == "")
     {
         title.Build(wad);
         PlayMidi(info.titleMusic);
     }
     else
     {
         title.DisableCamera();
         menuActive = false;
         BuildMap(args.warp);
     }
     SetupMenu();
     SetupHUD();
 }
Example #4
0
    void StartGame(IwadInfo info)
    {
        mapBuilder = new MapBuilder();

        if (args.warp == "")
        {
            title.Build(wad);
            PlayMidi(info.titleMusic);
        }
        else
        {
            title.DisableCamera();
            menuActive = false;
            BuildMap(args.warp);
        }
        menu = new DoomMenu(wad);
    }
Example #5
0
    void SetupWad(IwadInfo info)
    {
        wad = new WadFile(info.filenames[0]);
        if (info.mapnameFormat == "MAP")
        {
            mapFormat = MapFormat.MAP;
        }
        if (info.mapnameFormat == "EM")
        {
            mapFormat = MapFormat.EM;
        }
        iwadSelector = false;

        for (int i = 0; i < args.pwads.Count; i++)
        {
            wad.Merge(args.pwads[i]);
        }

        StartGame(info);
    }