1 /* $Id: gamemine.h,v 1.6 2003-10-10 09:36:35 btb Exp $ */
3 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
4 SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
5 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
6 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
7 IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
8 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
9 FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
10 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
11 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
12 COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
17 * Header for gamemine.c
20 * Revision 1.1 1995/05/16 15:57:02 allender
23 * Revision 2.0 1995/02/27 11:28:50 john
24 * New version 2.0, which has no anonymous unions, builds with
25 * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
27 * Revision 1.15 1994/11/17 11:39:34 matt
28 * Ripped out code to load old mines
30 * Revision 1.14 1994/10/19 16:46:40 matt
31 * Made tmap overrides for robots remap texture numbers
33 * Revision 1.13 1994/09/23 22:14:37 matt
34 * Took out obsolete structure fields
36 * Revision 1.12 1994/07/22 12:36:32 matt
37 * Cleaned up editor/game interactions some more.
39 * Revision 1.11 1994/06/01 11:21:37 yuan
40 * Added controlcentertriggers to the gamesave.
42 * Revision 1.10 1994/05/10 12:14:26 yuan
43 * Game save/load... Demo levels 1-5 added...
44 * High scores fixed...
46 * Revision 1.9 1994/05/04 18:25:05 yuan
47 * Working on gamesave.
49 * Revision 1.8 1994/05/03 15:53:27 yuan
50 * Readded structure field groups for backward compatibility...
52 * Revision 1.7 1994/05/03 11:36:26 yuan
53 * Stabilizing gamesave stuff.
55 * Revision 1.6 1994/04/28 11:01:32 yuan
56 * Added objects in structure.
58 * Revision 1.5 1994/04/06 18:30:03 john
59 * Added Refueling segments.
61 * Revision 1.4 1994/03/17 18:06:53 yuan
62 * Removed switch code... Now we just have Walls, Triggers, and Links...
64 * Revision 1.3 1994/03/01 18:12:24 yuan
65 * Wallswitches, triggers, and more!
67 * Revision 1.2 1994/02/10 15:36:01 matt
68 * Various changes to make editor compile out.
70 * Revision 1.1 1994/02/09 17:11:45 matt
80 #define MINE_VERSION 20 // Current version expected
81 #define COMPATIBLE_VERSION 16 // Oldest version that can safely be loaded.
84 ushort fileinfo_signature;
85 ushort fileinfo_version;
87 }; // Should be same as first two fields below...
90 ushort fileinfo_signature;
91 ushort fileinfo_version;
93 int header_offset; // Stuff common to game & editor
95 int editor_offset; // Editor specific stuff
100 int newseg_verts_offset;
101 int newseg_verts_howmany;
102 int newseg_verts_sizeof;
116 int triggers_howmany;
121 int object_offset; // Object info
124 int unused_offset; // was: doors_offset
125 int unused_howmamy; // was: doors_howmany
126 int unused_sizeof; // was: doors_sizeof
127 short level_shake_frequency, level_shake_duration;
128 // Shakes every level_shake_frequency seconds
129 // for level_shake_duration seconds (on average, random). In 16ths second.
130 int secret_return_segment;
131 vms_matrix secret_return_orient;
133 int dl_indices_offset;
134 int dl_indices_howmany;
135 int dl_indices_sizeof;
137 int delta_light_offset;
138 int delta_light_howmany;
139 int delta_light_sizeof;
142 int segment2_howmany;
154 int newsegment_offset;
166 extern struct mtfi mine_top_fileinfo; // Should be same as first two fields below...
167 extern struct mfi mine_fileinfo;
168 extern struct mh mine_header;
169 extern struct me mine_editor;
171 // returns 1 if error, else 0
172 int game_load_mine(char * filename);
174 // loads from an already-open file
175 // returns 0=everything ok, 1=old version, -1=error
176 int load_mine_data(CFILE *LoadFile);
177 int load_mine_data_compiled(CFILE *LoadFile);
179 extern short tmap_xlate_table[];
180 extern fix Level_shake_frequency, Level_shake_duration;
181 extern int Secret_return_segment;
182 extern vms_matrix Secret_return_orient;
184 /* stuff for loading descent.pig of descent 1 */
185 extern short convert_d1_tmap_num(short d1_tmap_num);
186 extern int d1_tmap_num_unique(short d1_tmap_num); //is d1_tmap_num's texture only in d1?
188 #endif /* _GAMEMINE_H */