Subversion Repositories eduke32

Rev

Rev 854 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 854 Rev 886
Line 32... Line 32...
32
    int xdim, ydim, bpp;
32
    int xdim, ydim, bpp;
33
    int forcesetup;
33
    int forcesetup;
34
    int usemouse, usejoy;
34
    int usemouse, usejoy;
35
    char selectedgrp[BMAX_PATH+1];
35
    char selectedgrp[BMAX_PATH+1];
36
    int game;
36
    int game;
-
 
37
    int crcval; // for finding the grp in the list again
37
}
38
}
38
settings;
39
settings;
39
40
40
static HWND startupdlg = NULL;
41
static HWND startupdlg = NULL;
41
static HWND pages[3] =
42
static HWND pages[3] =
Line 209... Line 210...
209
            if (i != CB_ERR) i = ListBox_GetItemData((HWND)lParam, i);
210
            if (i != CB_ERR) i = ListBox_GetItemData((HWND)lParam, i);
210
            if (i != CB_ERR)
211
            if (i != CB_ERR)
211
            {
212
            {
212
                strcpy(settings.selectedgrp, ((struct grpfile*)i)->name);
213
                strcpy(settings.selectedgrp, ((struct grpfile*)i)->name);
213
                settings.game = ((struct grpfile*)i)->game;
214
                settings.game = ((struct grpfile*)i)->game;
-
 
215
                settings.crcval = ((struct grpfile*)i)->crcval;
214
            }
216
            }
215
            return TRUE;
217
            return TRUE;
216
        }
218
        }
217
        default:
219
        default:
218
            break;
220
            break;
Line 562... Line 564...
562
    if (!startupdlg || !IsWindow(startupdlg)) return 0;
564
    if (!startupdlg || !IsWindow(startupdlg)) return 0;
563
    if (IsDialogMessage(startupdlg, (MSG*)v)) return 1;
565
    if (IsDialogMessage(startupdlg, (MSG*)v)) return 1;
564
    return 0;
566
    return 0;
565
}
567
}
566
568
567
extern char *duke3dgrp;
569
extern char *duke3dgrp, *duke3dgrpstring;
568
570
569
int startwin_run(void)
571
int startwin_run(void)
570
{
572
{
571
    MSG msg;
573
    MSG msg;
572
    if (!startupdlg) return 1;
574
    if (!startupdlg) return 1;
Line 585... Line 587...
585
    settings.bpp = ud.config.ScreenBPP;
587
    settings.bpp = ud.config.ScreenBPP;
586
    settings.forcesetup = ud.config.ForceSetup;
588
    settings.forcesetup = ud.config.ForceSetup;
587
    settings.usemouse = ud.config.UseMouse;
589
    settings.usemouse = ud.config.UseMouse;
588
    settings.usejoy = ud.config.UseJoystick;
590
    settings.usejoy = ud.config.UseJoystick;
589
    settings.game = g_GameType;
591
    settings.game = g_GameType;
-
 
592
//    settings.crcval = 0;
590
    strncpy(settings.selectedgrp, duke3dgrp, BMAX_PATH);
593
    strncpy(settings.selectedgrp, duke3dgrp, BMAX_PATH);
591
    PopulateForm(-1);
594
    PopulateForm(-1);
592
595
593
    while (done < 0)
596
    while (done < 0)
594
    {
597
    {
Line 609... Line 612...
609
612
610
    SetPage(TAB_MESSAGES);
613
    SetPage(TAB_MESSAGES);
611
    EnableConfig(0);
614
    EnableConfig(0);
612
    if (done)
615
    if (done)
613
    {
616
    {
-
 
617
        int i;
-
 
618
614
        ud.config.ScreenMode = settings.fullscreen;
619
        ud.config.ScreenMode = settings.fullscreen;
615
        ud.config.ScreenWidth = settings.xdim;
620
        ud.config.ScreenWidth = settings.xdim;
616
        ud.config.ScreenHeight = settings.ydim;
621
        ud.config.ScreenHeight = settings.ydim;
617
        ud.config.ScreenBPP = settings.bpp;
622
        ud.config.ScreenBPP = settings.bpp;
618
        ud.config.ForceSetup = settings.forcesetup;
623
        ud.config.ForceSetup = settings.forcesetup;
619
        ud.config.UseMouse = settings.usemouse;
624
        ud.config.UseMouse = settings.usemouse;
620
        ud.config.UseJoystick = settings.usejoy;
625
        ud.config.UseJoystick = settings.usejoy;
621
        duke3dgrp = settings.selectedgrp;
626
        duke3dgrp = settings.selectedgrp;
622
        g_GameType = settings.game;
627
        g_GameType = settings.game;
-
 
628
-
 
629
        for (i = 0; i<numgrpfiles; i++) if (settings.crcval == grpfiles[i].crcval) break;
-
 
630
        if (i != numgrpfiles)
-
 
631
            duke3dgrpstring = (char *)grpfiles[i].name;
623
    }
632
    }
624
633
625
    if (wavedevs)
634
    if (wavedevs)
626
    {
635
    {
627
        struct audioenumdev *d, *e;
636
        struct audioenumdev *d, *e;