home *** CD-ROM | disk | FTP | other *** search
/ Quake 'em / QUAKEEM.BIN / quake / programs / readmap / readmap.txt < prev    next >
Encoding:
Text File  |  1996-08-29  |  3.5 KB  |  120 lines

  1. 96/08/29
  2.  
  3. C version of MAP reading code.
  4.  
  5. By Cameron Newham.
  6.  
  7.  
  8. About
  9. -----
  10.  
  11. This is my release 1.0 of the C port of id Software's MAP file
  12. reader code.  I may update it.  Consider this an Alpha.
  13.  
  14. Nearly all of the algorithms and the majority of the code was
  15. taken from the source files that came with QuakeEd - id Software's
  16. Quake Editor.
  17.  
  18. As that code is foreign to me (a C++ derivative? Sorry - I've been
  19. out of broad coding for too long... too much ApplixWare and Notes
  20. <cough>), I had to translate some of it.  And you know how
  21. beginner translaters sound when you hear them on the news...
  22.  
  23. Fortunately the maths part of the code was a straight copy - so
  24. it should build the brushes correctly.
  25.  
  26.  
  27. Why?
  28. ---
  29.  
  30. Nobody else seems to have released code to read MAP files, so
  31. I thought it was about time (and I'm sure most, if not all,
  32. of the editor creators out there won't be releasing their code.
  33. Not that I blame them - the maths for converting planes into
  34. polygons is... yuk! :) ).
  35.  
  36. This is available for free use (hey - most of it is id Software's
  37. work).  I just converted it into a more readily acceptable form.
  38. Who knows, someone may even use it!
  39.  
  40. If you do know of any software source that does this - you can write
  41. and tell me that I wasted my time. :)
  42.  
  43. Originally I was going to write my own code - the parsing is the easy
  44. part, but I haven't done any serious 3D maths since Uni - nearly 10 years
  45. ago.  Making this conversion work was testing enough!
  46.  
  47.  
  48. Unpacking
  49. ---------
  50.  
  51. Unzip the file, compile it up (a sh script is included - just type
  52. "compile" on UNIX).  It should produce an executable called
  53. "readmap". This exe reads a map file called "test.map" - it's
  54. just there to show that it works.
  55.  
  56. What you do with the code is up to you.  Obvious hook points are
  57. pointed out in readmap.c.
  58.  
  59.  
  60. Problems
  61. --------
  62.  
  63. Plenty!  Any program type problems are documented in the code itself.
  64. This map reader will *only* read the header of the MAP file
  65. and the brush information (creating appropriate vertex and polygon
  66. info as it proceeds in reading the data). It *does not* currently
  67. read entities and their associated brushes.
  68.  
  69. For simple uses this should not be a problem (I achieved 100% of
  70. my current objective - to produce something that could convert
  71. planes to vertices :)
  72.  
  73. I have yet to even begin to understand the code after the point
  74. where it finishes reading brushes - if anyone can enlighten me,
  75. please do.  Not understanding the code varient id have used is
  76. my major hurdle.
  77.  
  78.  
  79. Comments
  80. --------
  81.  
  82. Please send them to me (cam@iinet.com.au).  Technical comments
  83. warmly welcomed. General comments acknowledged. Stupid comments
  84. curtly replied to.  Flames | /dev/null
  85.  
  86. I really don't want to hear that I can't code... ok?  I know
  87. I'm no Carmack, but I did my best :)  And in 24 hours too.
  88. And I put some comments in.  So settle.
  89.  
  90. I'd appreciate comments and info from people who understand
  91. the QuakeEd code/language used - I'm sort of stuck at the moment.
  92.  
  93.  
  94. Other
  95. -----
  96.  
  97. Notice how *my* readme doesn't stray off the edge of the 80 column
  98. page - unlike someone else I could mention ;)
  99.  
  100.  
  101. Acknowledgements
  102. ----------------
  103.  
  104. Thanks to John Carmack at id software for releasing the QuakeEd code
  105. without which none of this would be possible.
  106.  
  107.  
  108. Legal
  109. -----
  110.  
  111. Probably this code is covered by an id Software copyright.
  112. The algorithms may be patented (but I don't know - there is nothing
  113. in the QuakeEd docs, to my knowledge, that says anything legal).
  114.  
  115. This software conversion is pretty well untried - USE AT YOUR OWN RISK.
  116.  
  117. I take no responsibility for any loss of data or any damages incurred
  118. by the use of this software. So there!
  119.  
  120.