home *** CD-ROM | disk | FTP | other *** search
/ Amiga ACS 1998 #6 / amigaacscoverdisc1998-061998.iso / games / descent / source / main / gamemine.h < prev    next >
C/C++ Source or Header  |  1998-06-08  |  5KB  |  159 lines

  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-1998 PARALLAX SOFTWARE CORPORATION.  ALL RIGHTS RESERVED.
  12. */
  13. /*
  14.  * $Source: f:/miner/source/main/rcs/gamemine.h $
  15.  * $Revision: 2.0 $
  16.  * $Author: john $
  17.  * $Date: 1995/02/27 11:28:50 $
  18.  * 
  19.  * Header for gamemine.c
  20.  * 
  21.  * $Log: gamemine.h $
  22.  * Revision 2.0  1995/02/27  11:28:50  john
  23.  * New version 2.0, which has no anonymous unions, builds with
  24.  * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
  25.  * 
  26.  * Revision 1.15  1994/11/17  11:39:34  matt
  27.  * Ripped out code to load old mines
  28.  * 
  29.  * Revision 1.14  1994/10/19  16:46:40  matt
  30.  * Made tmap overrides for robots remap texture numbers
  31.  * 
  32.  * Revision 1.13  1994/09/23  22:14:37  matt
  33.  * Took out obsolete structure fields
  34.  * 
  35.  * Revision 1.12  1994/07/22  12:36:32  matt
  36.  * Cleaned up editor/game interactions some more.
  37.  * 
  38.  * Revision 1.11  1994/06/01  11:21:37  yuan
  39.  * Added controlcentertriggers to the gamesave.
  40.  * 
  41.  * Revision 1.10  1994/05/10  12:14:26  yuan
  42.  * Game save/load... Demo levels 1-5 added...
  43.  * High scores fixed...
  44.  * 
  45.  * Revision 1.9  1994/05/04  18:25:05  yuan
  46.  * Working on gamesave.
  47.  * 
  48.  * Revision 1.8  1994/05/03  15:53:27  yuan
  49.  * Readded structure field groups for backward compatibility...
  50.  * 
  51.  * Revision 1.7  1994/05/03  11:36:26  yuan
  52.  * Stabilizing gamesave stuff.
  53.  * 
  54.  * Revision 1.6  1994/04/28  11:01:32  yuan
  55.  * Added objects in structure.
  56.  * 
  57.  * Revision 1.5  1994/04/06  18:30:03  john
  58.  * Added Refueling segments.
  59.  * 
  60.  * Revision 1.4  1994/03/17  18:06:53  yuan
  61.  * Removed switch code... Now we just have Walls, Triggers, and Links...
  62.  * 
  63.  * Revision 1.3  1994/03/01  18:12:24  yuan
  64.  * Wallswitches, triggers, and more!
  65.  * 
  66.  * Revision 1.2  1994/02/10  15:36:01  matt
  67.  * Various changes to make editor compile out.
  68.  * 
  69.  * Revision 1.1  1994/02/09  17:11:45  matt
  70.  * Initial revision
  71.  * 
  72.  * 
  73.  */
  74.  
  75.  
  76.  
  77. #ifndef _GAMEMINE_H
  78. #define _GAMEMINE_H
  79.  
  80. #define MINE_VERSION                    17    // Current version expected
  81. #define COMPATIBLE_VERSION         16 // Oldest version that can safely be loaded.
  82.  
  83. struct mtfi {
  84.     ushort  fileinfo_signature;
  85.     ushort  fileinfo_version;
  86.     int     fileinfo_sizeof;
  87. };    // Should be same as first two fields below...
  88.  
  89. struct mfi {
  90.     ushort    fileinfo_signature;
  91.     ushort    fileinfo_version;
  92.     int        fileinfo_sizeof;
  93.     int        header_offset;          // Stuff common to game & editor
  94.     int        header_size;
  95.     int        editor_offset;   // Editor specific stuff
  96.     int        editor_size;
  97.     int        segment_offset;
  98.     int        segment_howmany;
  99.     int        segment_sizeof;
  100.     int        newseg_verts_offset;
  101.     int        newseg_verts_howmany;
  102.     int        newseg_verts_sizeof;
  103.     int        group_offset;
  104.     int        group_howmany;
  105.     int        group_sizeof;
  106.     int        vertex_offset;
  107.     int        vertex_howmany;
  108.     int        vertex_sizeof;
  109.     int        texture_offset;
  110.     int        texture_howmany;
  111.     int        texture_sizeof;
  112.     int        walls_offset;
  113.     int        walls_howmany;
  114.     int        walls_sizeof;
  115.     int        triggers_offset;
  116.     int        triggers_howmany;
  117.     int        triggers_sizeof;
  118.     int        links_offset;
  119.     int        links_howmany;
  120.     int        links_sizeof;
  121.     int        object_offset;                // Object info
  122.     int          object_howmany;        
  123.     int          object_sizeof;  
  124.     int          unused_offset;            //was: doors_offset
  125.     int        unused_howmamy;        //was: doors_howmany
  126.     int        unused_sizeof;            //was: doors_sizeof
  127. };
  128.  
  129. struct mh {
  130.     int     num_vertices;
  131.     int     num_segments;
  132. };
  133.  
  134. struct me {
  135.     int     current_seg;
  136.     int     newsegment_offset;
  137.     int     newsegment_size;
  138.     int     Curside;
  139.     int     Markedsegp;
  140.     int     Markedside;
  141.     int      Groupsegp[10];
  142.     int       Groupside[10];
  143.     int      num_groups;
  144.     int       current_group;
  145. //    int      num_objects;
  146. };
  147.  
  148. extern struct mtfi mine_top_fileinfo;    // Should be same as first two fields below...
  149. extern struct mfi mine_fileinfo;
  150. extern struct mh mine_header;
  151. extern struct me mine_editor;
  152.  
  153. // returns 1 if error, else 0
  154. int game_load_mine(char * filename);
  155.  
  156. extern short tmap_xlate_table[];
  157.  
  158. #endif
  159.