Subversion Repositories eduke32

Rev

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

Rev 234 Rev 241
Line 7... Line 7...
7
7
8
#include "build.h"
8
#include "build.h"
9
#include "winlayer.h"
9
#include "winlayer.h"
10
#include "compat.h"
10
#include "compat.h"
11
11
12
#include "startdlg.h"
12
#include "grpscan.h"
13
13
14
#define WIN32_LEAN_AND_MEAN
14
#define WIN32_LEAN_AND_MEAN
15
#include <windows.h>
15
#include <windows.h>
16
#include <windowsx.h>
16
#include <windowsx.h>
17
#define _WIN32_IE 0x0300
17
#define _WIN32_IE 0x0300
Line 115... Line 115...
115
        char buf[128+BMAX_PATH];
115
        char buf[128+BMAX_PATH];
116
116
117
        hwnd = GetDlgItem(pages[TAB_GAME], IDGDATA);
117
        hwnd = GetDlgItem(pages[TAB_GAME], IDGDATA);
118
118
119
        for (fg = foundgrps; fg; fg=fg->next) {
119
        for (fg = foundgrps; fg; fg=fg->next) {
120
            for (i = 0; i<numgrpfiles; i++)
-
 
121
                if (fg->crcval == grpfiles[i].crcval) break;
120
            for (i = 0; i<numgrpfiles; i++) if (fg->crcval == grpfiles[i].crcval) break;
122
            if (i == numgrpfiles) continue;     // unrecognised grp file
121
            if (i == numgrpfiles) continue;     // unrecognised grp file
123
-
 
124
            Bsprintf(buf, "%s\t%s", grpfiles[i].name, fg->name);
122
            Bsprintf(buf, "%s\t%s", grpfiles[i].name, fg->name);
125
                        fg->game = grpfiles[i].game;
-
 
126
            j = ListBox_AddString(hwnd, buf);
123
            j = ListBox_AddString(hwnd, buf);
127
            ListBox_SetItemData(hwnd, j, (LPARAM)fg);
124
            ListBox_SetItemData(hwnd, j, (LPARAM)fg);
128
            if (!Bstrcasecmp(fg->name, settings.selectedgrp)) ListBox_SetCurSel(hwnd, j);
125
            if (!Bstrcasecmp(fg->name, settings.selectedgrp)) ListBox_SetCurSel(hwnd, j);
129
        }
126
        }
130
    }
127
    }
Line 501... Line 498...
501
    MSG msg;
498
    MSG msg;
502
    if (!startupdlg) return 1;
499
    if (!startupdlg) return 1;
503
500
504
    done = -1;
501
    done = -1;
505
502
506
    ScanGroups();
-
 
507
#ifdef JFAUD
503
#ifdef JFAUD
508
    EnumAudioDevs(&wavedevs, NULL, NULL);
504
    EnumAudioDevs(&wavedevs, NULL, NULL);
509
#endif
505
#endif
510
    SetPage(TAB_CONFIG);
506
    SetPage(TAB_CONFIG);
511
    EnableConfig(1);
507
    EnableConfig(1);
Line 515... Line 511...
515
    settings.ydim = ScreenHeight;
511
    settings.ydim = ScreenHeight;
516
    settings.bpp = ScreenBPP;
512
    settings.bpp = ScreenBPP;
517
    settings.forcesetup = ForceSetup;
513
    settings.forcesetup = ForceSetup;
518
    settings.usemouse = UseMouse;
514
    settings.usemouse = UseMouse;
519
    settings.usejoy = UseJoystick;
515
    settings.usejoy = UseJoystick;
520
        settings.game = namversion;
516
    settings.game = gametype;
521
    strncpy(settings.selectedgrp, duke3dgrp, BMAX_PATH);
517
    strncpy(settings.selectedgrp, duke3dgrp, BMAX_PATH);
522
    PopulateForm(-1);
518
    PopulateForm(-1);
523
519
524
    while (done < 0) {
520
    while (done < 0) {
525
        switch (GetMessage(&msg, NULL, 0,0)) {
521
        switch (GetMessage(&msg, NULL, 0,0)) {
Line 542... Line 538...
542
        ScreenBPP = settings.bpp;
538
        ScreenBPP = settings.bpp;
543
        ForceSetup = settings.forcesetup;
539
        ForceSetup = settings.forcesetup;
544
        UseMouse = settings.usemouse;
540
        UseMouse = settings.usemouse;
545
        UseJoystick = settings.usejoy;
541
        UseJoystick = settings.usejoy;
546
        duke3dgrp = settings.selectedgrp;
542
        duke3dgrp = settings.selectedgrp;
547
                namversion = settings.game;
543
        gametype = settings.game;
548
    }
544
    }
549
545
550
    if (wavedevs) {
546
    if (wavedevs) {
551
        struct audioenumdev *d, *e;
547
        struct audioenumdev *d, *e;
552
        free(wavedevs->drvs);
548
        free(wavedevs->drvs);