Subversion Repositories eduke32

Rev

Rev 4948 | Rev 5005 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4948 Rev 4989
Line 366... Line 366...
366
            initprintf("Using \"%s\" as main GRP file\n", g_grpNamePtr);
366
            initprintf("Using \"%s\" as main GRP file\n", g_grpNamePtr);
367
        }
367
        }
368
    }
368
    }
369
}
369
}
370
370
371
void G_ExtPreStartupWindow(void)
371
void G_ScanGroups(void)
372
{
372
{
373
    ScanGroups();
373
    ScanGroups();
374
    {
374
375
        // try and identify the 'defaultgamegrp' in the set of GRPs.
375
    // try and identify the 'defaultgamegrp' in the set of GRPs.
376
        // if it is found, set up the environment accordingly for the game it represents.
376
    // if it is found, set up the environment accordingly for the game it represents.
377
        // if it is not found, choose the first GRP from the list
377
    // if it is not found, choose the first GRP from the list
378
        struct grpfile *fg, *first = NULL;
378
    struct grpfile *fg, *first = NULL;
379
379
Line 405... Line 405...
405
            g_gameType = first->game;
405
        g_gameType = first->game;
406
            g_gameNamePtr = listgrps->name;
406
        g_gameNamePtr = listgrps->name;
407
        }
407
    }
408
        else if (!fg) g_gameNamePtr = NULL;
408
    else if (!fg) g_gameNamePtr = NULL;
409
    }
409
}
410
}
-
 
411
410
412
void G_ExtPostStartupWindow(int32_t autoload)
411
void G_LoadGroups(int32_t autoload)
413
{
412
{
414
    if (g_modDir[0] != '/')
413
    if (g_modDir[0] != '/')
415
    {
414
    {
416
        char cwd[BMAX_PATH];
415
        char cwd[BMAX_PATH];
417
416
Line 423... Line 422...
423
        {
422
        {
424
            Bsprintf(cwd,"%s/%s",cwd,g_modDir);
423
            Bsprintf(cwd, "%s/%s", cwd, g_modDir);
425
            if (!Bstrcmp(g_rootDir, cwd))
424
            if (!Bstrcmp(g_rootDir, cwd))
426
            {
425
            {
427
                if (addsearchpath(cwd) == -2)
426
                if (addsearchpath(cwd) == -2)
428
                    if (Bmkdir(cwd,S_IRWXU) == 0) addsearchpath(cwd);
427
                    if (Bmkdir(cwd, S_IRWXU) == 0)
-
 
428
                        addsearchpath(cwd);
429
            }
429
            }
430
        }
430
        }
431
431
432
#ifdef USE_OPENGL
432
#ifdef USE_OPENGL
433
        Bsprintf(cwd,"%s/%s",g_modDir,TEXCACHEFILE);
433
        Bsprintf(cwd, "%s/%s", g_modDir, TEXCACHEFILE);
Line 436... Line 436...
436
    }
436
    }
437
437
438
    if (g_usingAddon)
438
    if (g_usingAddon)
439
        G_LoadAddon();
439
        G_LoadAddon();
440
440
441
    {
-
 
442
        int32_t i;
441
    int32_t i;
443
        const char *grpfile = G_GrpFile();
442
    const char *grpfile = G_GrpFile();
444
443
445
        if (g_dependencyCRC)
444
    if (g_dependencyCRC)
446
        {
445
    {
Line 464... Line 463...
464
            G_LoadGroupsInDir("autoload");
463
        G_LoadGroupsInDir("autoload");
465
464
466
            if (i != -1)
465
        if (i != -1)
467
                G_DoAutoload(grpfile);
466
            G_DoAutoload(grpfile);
468
        }
467
    }
469
    }
-
 
470
468
471
    if (g_modDir[0] != '/')
469
    if (g_modDir[0] != '/')
472
        G_LoadGroupsInDir(g_modDir);
470
        G_LoadGroupsInDir(g_modDir);
473
471
474
    if (g_defNamePtr == NULL)
472
    if (g_defNamePtr == NULL)
Line 482... Line 480...
482
        }
480
        }
483
    }
481
    }
484
482
485
    loaddefinitions_game(G_DefFile(), TRUE);
483
    loaddefinitions_game(G_DefFile(), TRUE);
486
484
487
    {
-
 
488
        struct strllist *s;
485
    struct strllist *s;
489
486
490
        pathsearchmode = 1;
487
    pathsearchmode = 1;
491
        while (CommandGrps)
488
    while (CommandGrps)
492
        {
489
    {
Line 508... Line 505...
508
            Bfree(CommandGrps);
505
        Bfree(CommandGrps);
509
            CommandGrps = s;
506
        CommandGrps = s;
510
        }
507
    }
511
        pathsearchmode = 0;
508
    pathsearchmode = 0;
512
    }
509
}
513
}
-
 
514
510
515
#ifdef _WIN32
511
#ifdef _WIN32
516
const char * G_GetInstallPath(int32_t insttype)
512
const char * G_GetInstallPath(int32_t insttype)
517
{
513
{
518
    static char spath[NUMINSTPATHS][BMAX_PATH];
514
    static char spath[NUMINSTPATHS][BMAX_PATH];