home *** CD-ROM | disk | FTP | other *** search
/ Home Edutainment Collection 4: Games & Extensions / Aztech-HomeEdutainmentCollection-Vol4-3DGamesExtensions.iso / dhacked / dehack4.bas < prev    next >
BASIC Source File  |  1994-06-13  |  2KB  |  56 lines

  1. ' DEHACK - Doom Exe HACK
  2. ' by Matt Fell (matt.burnett@acebbs.com)
  3. ' written 6/13/94
  4. '
  5. ' DEHACK 4 - The SPRITE NAME LIST
  6. '
  7. ' These crude programs extract information from the DOOM.EXE or DOOM.WAD
  8. ' files and store it into a TXT file, suitable for perusing or printing.
  9. ' If you want to print the results, you might have to reformat it. Please
  10. ' don't waste reams of paper. Thanks.
  11. ' All of these only work on the 1.2 registered doom.exe, because I use
  12. ' simple byte offset numbers, not search strings.
  13. '
  14. ' IMPORTANT: If you don't like typing pathnames, modify the next section,
  15. ' un-comment it, and remove or comment-out the input section.
  16.  
  17. ' infile$ = "c:\doom\doom.exe"
  18. ' outfile$ = "c:\-\doom\12\dehack4.txt"
  19.  
  20. CLS
  21. PRINT "Enter the full pathname to your DOOM.EXE file, then the full pathname"
  22. PRINT "to where you want the textfile to be (in an already existing directory)"
  23. PRINT "e.g. 'c:\doom\doom.exe' and 'c:\doom\txt\dehack4.txt'"
  24. PRINT "Note: modify the program with built-in pathnames, and skip this!"
  25. PRINT
  26. INPUT infile$
  27. INPUT outfile$
  28.  
  29. OPEN infile$ FOR BINARY AS 1
  30. OPEN outfile$ FOR OUTPUT AS 2
  31.  
  32. DIM prefix AS STRING * 4
  33.  
  34. PRINT #2, "The 'Sprite Name List' contained in DOOM.EXE version 1.2 2-17-94"
  35. PRINT #2, "List-maker program written by Matt Fell (matt.burnett@acebbs.com)"
  36. PRINT #2, "=========================================================================="
  37. PRINT #2, "At offset 555524 ($87a04) are 105 4-byte integers, which are offsets from"
  38. PRINT #2, "the start of the data segment (455700 = $6f414) to the four-byte 'prefixes'"
  39. PRINT #2, "for the sprite names to be found in DOOM.WAD"
  40. PRINT #2, "The first column below is the sprite number, and the second column is the"
  41. PRINT #2, "sprites name or prefix."
  42. PRINT #2, "=========================================================================="
  43.  
  44. pointer& = 555525               ' this is for 1.2 doom
  45.  
  46. FOR i& = 0 TO 104
  47. PRINT #2, USING "####"; i&;
  48. PRINT #2, " ",
  49. GET #1, pointer& + i& * 4, offset&
  50. GET #1, 455701 + offset&, prefix$
  51. PRINT #2, prefix$
  52. NEXT i&
  53.  
  54. END
  55.  
  56.