]> icculus.org git repositories - btb/d2x.git/blob - main/gamemine.h
Enable d1x-style hud_message
[btb/d2x.git] / main / gamemine.h
1 /*
2 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
3 SOFTWARE CORPORATION ("PARALLAX").  PARALLAX, IN DISTRIBUTING THE CODE TO
4 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
5 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
6 IN USING, DISPLAYING,  AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
7 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
8 FREE PURPOSES.  IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
9 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES.  THE END-USER UNDERSTANDS
10 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.  
11 COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION.  ALL RIGHTS RESERVED.
12 */
13
14
15
16 #ifndef _GAMEMINE_H
17 #define _GAMEMINE_H
18
19 #define MINE_VERSION                                    20      // Current version expected
20 #define COMPATIBLE_VERSION              16 // Oldest version that can safely be loaded.
21
22 struct mtfi {
23         ushort  fileinfo_signature;
24         ushort  fileinfo_version;
25         int     fileinfo_sizeof;
26 };    // Should be same as first two fields below...
27
28 struct mfi {
29         ushort  fileinfo_signature;
30         ushort  fileinfo_version;
31         int             fileinfo_sizeof;
32         int             header_offset;          // Stuff common to game & editor
33         int             header_size;
34         int             editor_offset;   // Editor specific stuff
35         int             editor_size;
36         int             segment_offset;
37         int             segment_howmany;
38         int             segment_sizeof;
39         int             newseg_verts_offset;
40         int             newseg_verts_howmany;
41         int             newseg_verts_sizeof;
42         int             group_offset;
43         int             group_howmany;
44         int             group_sizeof;
45         int             vertex_offset;
46         int             vertex_howmany;
47         int             vertex_sizeof;
48         int             texture_offset;
49         int             texture_howmany;
50         int             texture_sizeof;
51         int             walls_offset;
52         int             walls_howmany;
53         int             walls_sizeof;
54         int             triggers_offset;
55         int             triggers_howmany;
56         int             triggers_sizeof;
57         int             links_offset;
58         int             links_howmany;
59         int             links_sizeof;
60         int             object_offset;                          // Object info
61         int             object_howmany;         
62         int             object_sizeof;  
63         int             unused_offset;                  //was: doors_offset
64         int             unused_howmamy;         //was: doors_howmany
65         int             unused_sizeof;                  //was: doors_sizeof
66         short           level_shake_frequency, level_shake_duration;    //      Shakes every level_shake_frequency seconds
67                                                                                                                                                         // for level_shake_duration seconds (on average, random).  In 16ths second.
68         int             secret_return_segment;
69         vms_matrix      secret_return_orient;
70
71         int             dl_indices_offset;
72         int             dl_indices_howmany;
73         int             dl_indices_sizeof;
74
75         int             delta_light_offset;
76         int             delta_light_howmany;
77         int             delta_light_sizeof;
78
79         int             segment2_offset;
80         int             segment2_howmany;
81         int             segment2_sizeof;
82
83 };
84
85 struct mh {
86         int     num_vertices;
87         int     num_segments;
88 };
89
90 struct me {
91         int     current_seg;
92         int     newsegment_offset;
93         int     newsegment_size;
94         int     Curside;
95         int     Markedsegp;
96         int     Markedside;
97         int       Groupsegp[10];
98         int       Groupside[10];
99         int       num_groups;
100         int       current_group;
101 //      int       num_objects;
102 };
103
104 extern struct mtfi mine_top_fileinfo;    // Should be same as first two fields below...
105 extern struct mfi mine_fileinfo;
106 extern struct mh mine_header;
107 extern struct me mine_editor;
108
109 // returns 1 if error, else 0
110 int game_load_mine(char * filename);
111
112 extern short tmap_xlate_table[];
113 extern fix Level_shake_frequency, Level_shake_duration;
114 extern int Secret_return_segment;
115 extern vms_matrix Secret_return_orient;
116 #endif