home *** CD-ROM | disk | FTP | other *** search
/ Quake 'em / QUAKEEM.BIN / quake / programs / quip01 / qspecs10.txt < prev    next >
Encoding:
Text File  |  1996-02-29  |  5.5 KB  |  146 lines

  1. -----------------------------------------------------------------------
  2. My Quake Specs, v1.0                     written by Denis Moeller, 2/96
  3.                           e-mail: tic@rendsburg.netsurf.de, #irc: panza
  4. -----------------------------------------------------------------------
  5. Quake, Copyright (C) 1996 id Software, inc.
  6. Logo and likenesses are trademarks of id Software, inc.
  7. -----------------------------------------------------------------------
  8.  
  9. Quake is the new  incredible game by id software, these Specs are based 
  10. upon the testversion, released by id software in february 1996. 
  11. Since this  testversion was  released to test  Network Play,  Sound and
  12. Graphic Engine on many different machines it is likely that id software
  13. does not wish that this  version of Quake  is altered nor edited in any
  14. way. Therefore  I am  not  responsible  for  any  damage  or  copyright 
  15. violations due to the usage of the information this textfile contains.
  16.  
  17. -----------------------------------------------------------------------
  18. Quick Overview
  19.  
  20. All codes, type-names etc.  are based  upon C-style.  Don't blame me if 
  21. some info here is obsolete, wrong or missing.  This is just the stuff I 
  22. found  out while  programming 'quip'.  I don't think I'll add any stuff
  23. here, someone else can do 'real' Specs. I don't care.
  24.  
  25. The testversion  of Quake uses  one big file to store all the necessary 
  26. data files.  It contains several sounds (WAV files),  sprites, 3D-model 
  27. files, level-data and wall textures.
  28. This file is called ID1.PAK and is a simple collection of all resources
  29. with an internal directory.  Several of the files stored  in there have
  30. their own structure, some are collections of files again.
  31.  
  32. -----------------------------------
  33. PAK-file format:
  34.  
  35. The first 4 bytes are the identification bytes, they should be 'PACK'.
  36. The  next  long int  value  is  the  offset (DirPos) to  the  directory 
  37. counting from the beginning of the file.  The following  long int gives 
  38. you the  size (DirLen) of  the  directory.  Each entry in the directory 
  39. consists of 64 bytes, to get the number of entries simply do this: 
  40.  
  41.     Entries = DirLen / 64.
  42.  
  43. An entry in the directory looks like this:
  44.  
  45. typedef struct {
  46.     char EntryName[56];    
  47.     long EntryPos, EntryLen;
  48. } Entry;
  49.  
  50. EntryName contains the full path and name of the file stored.
  51.  
  52. As I said,  the PAK file is just a collection of a few different files,
  53. which have their own format. I'll list them right now.
  54.  
  55. WAV-files:
  56. ----------
  57. This is quite easy. It's a WAV-file, which contains digitized sounds.
  58.  
  59. SPR-files:
  60. ----------
  61. These files contain sprites (which will probably obsolete when the full
  62. version of Quake comes out).  Mostly there are more than  one sprite in 
  63. one file, either the entire animation (e.g.torches) or  different sizes
  64. of the sprite. As you might see, I did not get into this that well.
  65.  
  66. The Header of this SPR-files looks like this:
  67.  
  68. typedef struct {
  69.     char id[4];
  70.     char unknown[36];
  71. } Header;
  72.  
  73. Each sprite following right after this header has its own header:
  74.  
  75. typedef struct {
  76.     long dunno;
  77.     char unknown[dunno * 4];
  78.     long offset1, offset2;
  79.     long x, y;
  80. } SpriteHeader;
  81.  
  82. The actual sprite-gfx-data follows this header,  the size of this block
  83. is calculated like this: 
  84.  
  85.      Size = x * y
  86.  
  87. That's all I know about the sprites -  oh I nearly forgot:  the palette
  88. of these sprites is different than the normal game-palette. I could not
  89. find a good palette to display 'em right.
  90.  
  91. MDL-files:
  92. ----------
  93. Well, these files are even more strange. I think they contain the data 
  94. for the 3D-models. No more info here.
  95.  
  96. WAD-files:
  97. ----------
  98. Yes, the PAK-file contains  one WAD-file.  Though, it's not exactly the
  99. WAD-format of Doom. It contains graphics resources and a palette.
  100.  
  101. The first 4 bytes are for identification. It should contain 'WAD2'.
  102. The next 2 long values give us the number of entries in the WAD and the
  103. position of the directory relative to the beginning of the file.
  104. For each entry in the directory are 32 bytes:
  105.  
  106. typedef struct {
  107.   long EntryPos, EntryLen;
  108.   long dummy1, dummy2;
  109.   char EntryName[16];
  110. } Entry;
  111.  
  112. Yes, the name is 16 bytes  long - pretty  shitty for using filenames in
  113. good old DOS... 
  114.  
  115. The gfx in this WAD are very easy to read, no compression here.  Mostly
  116. the first 2 long values of an Entry  are X and Y of the picture.  Well,
  117. sometimes not (e.g. CONBACK, straight picture data, 320x200 here).  The 
  118. picture data follows, line by line.
  119.  
  120. I think there is one  picture with  chars in it too,  but didn't bother 
  121. displaying it yet. Btw, the transparent color in all pictures is 255.
  122.  
  123. RC-files:
  124. ---------
  125. Quake's control-files. No more info here, pretty easy though.
  126.  
  127. BSP-files:
  128. ----------
  129. These are the most  interesting files stored here,  they contain levels
  130. (e.g.TEST1.BSP)  or other  (still unknown) stuff.  Each BSP-file has 14
  131. entries, which can be level-data,  scripts for levels, wall-textures or
  132. some unknown stuff.
  133.  
  134. The first  long int is always 0x17 - kinda identification.  Right after 
  135. this the directory  of the SPR-file  is saved.  Two long ints for every
  136. entry are in here - giving the position and length.
  137.  
  138. That's it for now. If someone wants to correct, add or change the stuff
  139. I wrote here - go ahead, I'm not the guy for writing Specs anyway. :)
  140.  
  141.  
  142. 2/29/96, denis moeller
  143. -----------------------------------------------------------------------
  144. This is the end. 
  145. -----------------------------------------------------------------------
  146.