Subversion Repositories eduke32

Rev

Rev 4747 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4747 Rev 5062
1
//-------------------------------------------------------------------------
1
//-------------------------------------------------------------------------
2
/*
2
/*
3
Copyright (C) 2010 EDuke32 developers and contributors
3
Copyright (C) 2010 EDuke32 developers and contributors
4

4

5
This file is part of EDuke32.
5
This file is part of EDuke32.
6

6

7
EDuke32 is free software; you can redistribute it and/or
7
EDuke32 is free software; you can redistribute it and/or
8
modify it under the terms of the GNU General Public License version 2
8
modify it under the terms of the GNU General Public License version 2
9
as published by the Free Software Foundation.
9
as published by the Free Software Foundation.
10

10

11
This program is distributed in the hope that it will be useful,
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14

14

15
See the GNU General Public License for more details.
15
See the GNU General Public License for more details.
16

16

17
You should have received a copy of the GNU General Public License
17
You should have received a copy of the GNU General Public License
18
along with this program; if not, write to the Free Software
18
along with this program; if not, write to the Free Software
19
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
19
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
20
*/
20
*/
21
//-------------------------------------------------------------------------
21
//-------------------------------------------------------------------------
22
22
23
#ifndef grpscan_h_
23
#ifndef grpscan_h_
24
#define grpscan_h_
24
#define grpscan_h_
25
25
26
#define MAXLISTNAMELEN 32
26
#define MAXLISTNAMELEN 32
27
27
28
// List of internally-known GRP files
28
// List of internally-known GRP files
29
#define NUMGRPFILES 15
-
 
30
-
 
31
#define DUKE13_CRC  (int32_t)0xBBC9CE44
29
#define DUKE13_CRC  (int32_t)0xBBC9CE44
32
#define DUKEKR_CRC  (int32_t)0xAA4F6A40
30
#define DUKEKR_CRC  (int32_t)0xAA4F6A40
33
#define DUKE15_CRC  (int32_t)0xFD3DCFF1
31
#define DUKE15_CRC  (int32_t)0xFD3DCFF1
34
#define DUKEPP_CRC  (int32_t)0xF514A6AC
32
#define DUKEPP_CRC  (int32_t)0xF514A6AC
35
#define DUKE099_CRC (int32_t)0x02F18900
33
#define DUKE099_CRC (int32_t)0x02F18900
36
#define DUKE10_CRC  (int32_t)0xA28AA589
34
#define DUKE10_CRC  (int32_t)0xA28AA589
37
#define DUKE11_CRC  (int32_t)0x912E1E8D
35
#define DUKE11_CRC  (int32_t)0x912E1E8D
38
#define DUKESW_CRC  (int32_t)0x983AD923
36
#define DUKESW_CRC  (int32_t)0x983AD923
39
#define DUKEMD_CRC  (int32_t)0xC5F71561
37
#define DUKEMD_CRC  (int32_t)0xC5F71561
-
 
38
#define DUKEDC13_CRC (int32_t)0xA9242158
-
 
39
#define DUKEDCPP_CRC (int32_t)0xB79D997F
40
#define DUKEDC_CRC  (int32_t)0xA8CF80DA
40
#define DUKEDC_CRC  (int32_t)0xA8CF80DA
-
 
41
#define VACA13_CRC  (int32_t)0x4A2DBB62
-
 
42
#define VACAPP_CRC  (int32_t)0x2F4FCCEE
-
 
43
#define VACA15_CRC  (int32_t)0xB62B42FD
41
#define DUKECB_CRC  (int32_t)0x18F01C5B
44
#define DUKECB_CRC  (int32_t)0x18F01C5B
42
#define DUKENW_CRC  (int32_t)0xF1CAE8E4
45
#define DUKENW_CRC  (int32_t)0xF1CAE8E4
43
#define NAM_CRC     (int32_t)0x75C1F07B
46
#define NAM_CRC     (int32_t)0x75C1F07B
44
#define NAPALM_CRC  (int32_t)0x3DE1589A
47
#define NAPALM_CRC  (int32_t)0x3DE1589A
45
#define WW2GI_CRC   (int32_t)0x907B82BF
48
#define WW2GI_CRC   (int32_t)0x907B82BF
46
49
47
enum addon_t {
50
enum addon_t {
48
    ADDON_NONE,
51
    ADDON_NONE,
49
    ADDON_DUKEDC,
52
    ADDON_DUKEDC,
50
    ADDON_NWINTER,
53
    ADDON_NWINTER,
51
    ADDON_CARIBBEAN,
54
    ADDON_CARIBBEAN,
52
    NUMADDONS
55
    NUMADDONS
53
};
56
};
54
57
55
typedef struct grpfile {
58
typedef struct grpfile {
56
        char *name;
59
        char *name;
57
        int32_t crcval;
60
        int32_t crcval;
58
        int32_t size;
61
        int32_t size;
59
        int32_t game;
62
        int32_t game;
60
    int32_t dependency;
63
    int32_t dependency;
61
    char *scriptname;
64
    char *scriptname;
62
    char *defname;
65
    char *defname;
-
 
66
    void (*postprocessing)(void);
63
        struct grpfile *next;
67
        struct grpfile *next;
64
} grpfile_type;
68
} grpfile_type;
65
69
66
// extern struct grpfile grpfiles[NUMGRPFILES];
-
 
67
extern struct grpfile internalgrpfiles[NUMGRPFILES];
70
extern struct grpfile internalgrpfiles[];
68
extern struct grpfile *foundgrps;
71
extern struct grpfile *foundgrps;
69
extern struct grpfile *listgrps;
72
extern struct grpfile *listgrps;
70
73
71
extern struct grpfile * FindGroup(int32_t crcval);
74
extern struct grpfile * FindGroup(int32_t crcval);
72
int32_t ScanGroups(void);
75
int32_t ScanGroups(void);
73
void FreeGroups(void);
76
void FreeGroups(void);
74
77
75
#endif
78
#endif
76
 
79