GAMEMINE.H 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  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. #ifndef _GAMEMINE_H
  75. #define _GAMEMINE_H
  76. #define MINE_VERSION 17 // Current version expected
  77. #define COMPATIBLE_VERSION 16 // Oldest version that can safely be loaded.
  78. struct mtfi {
  79. ushort fileinfo_signature;
  80. ushort fileinfo_version;
  81. int fileinfo_sizeof;
  82. }; // Should be same as first two fields below...
  83. struct mfi {
  84. ushort fileinfo_signature;
  85. ushort fileinfo_version;
  86. int fileinfo_sizeof;
  87. int header_offset; // Stuff common to game & editor
  88. int header_size;
  89. int editor_offset; // Editor specific stuff
  90. int editor_size;
  91. int segment_offset;
  92. int segment_howmany;
  93. int segment_sizeof;
  94. int newseg_verts_offset;
  95. int newseg_verts_howmany;
  96. int newseg_verts_sizeof;
  97. int group_offset;
  98. int group_howmany;
  99. int group_sizeof;
  100. int vertex_offset;
  101. int vertex_howmany;
  102. int vertex_sizeof;
  103. int texture_offset;
  104. int texture_howmany;
  105. int texture_sizeof;
  106. int walls_offset;
  107. int walls_howmany;
  108. int walls_sizeof;
  109. int triggers_offset;
  110. int triggers_howmany;
  111. int triggers_sizeof;
  112. int links_offset;
  113. int links_howmany;
  114. int links_sizeof;
  115. int object_offset; // Object info
  116. int object_howmany;
  117. int object_sizeof;
  118. int unused_offset; //was: doors_offset
  119. int unused_howmamy; //was: doors_howmany
  120. int unused_sizeof; //was: doors_sizeof
  121. };
  122. struct mh {
  123. int num_vertices;
  124. int num_segments;
  125. };
  126. struct me {
  127. int current_seg;
  128. int newsegment_offset;
  129. int newsegment_size;
  130. int Curside;
  131. int Markedsegp;
  132. int Markedside;
  133. int Groupsegp[10];
  134. int Groupside[10];
  135. int num_groups;
  136. int current_group;
  137. // int num_objects;
  138. };
  139. extern struct mtfi mine_top_fileinfo; // Should be same as first two fields below...
  140. extern struct mfi mine_fileinfo;
  141. extern struct mh mine_header;
  142. extern struct me mine_editor;
  143. // returns 1 if error, else 0
  144. int game_load_mine(char * filename);
  145. extern short tmap_xlate_table[];
  146. #endif