home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / jpi / ionpacke.bas < prev    next >
Encoding:
BASIC Source File  |  1998-01-19  |  1.4 KB  |  53 lines

  1. Attribute VB_Name = "Module1"
  2. Const VERS = "V0.04"
  3. Global Const CompilerData$ = "Packed with IonPacker " & VERS & "for Jump-Point: Ion."
  4. Global Const VersionFile$ = "Version.Dat"
  5. Global Const OutputFile$ = "Original.Ion"
  6. Global Const InternalFile$ = "Internal.Jps"
  7. Sub Main()
  8. 'On Error GoTo ERRRR
  9. Open OutputFile$ For Output As #1
  10. Open VersionFile$ For Input As #2
  11.   Line Input #2, a$
  12.   Print #1, "GAME-VERSION: " & a$
  13. Close #2
  14.  
  15. Open InternalFile$ For Input As #2
  16.   Line Input #2, a$
  17.   Print #1, a$
  18. Close #2
  19. Call PrintFile("ObjectImprints.Dat")
  20. Call PrintFile("GraphicLibs.Dat")
  21. Call PrintFile("PictureDefs.Dat")
  22. Call PrintFile("Sprites.Dat")
  23. Call PrintFile("Units.Dat")
  24. Call PrintFile("Music.Dat")
  25. Call PrintFile("Sound.Dat")
  26. Call PrintFile("TerrainProfiles.Dat")
  27. Print #1, "[COMMENTS]"
  28. Print #1, "CompilerComment: " & CompilerData$ & " Packaged on: " & Date & ", " & Time
  29. Print #1, "[ENDOFLIBRARY]"
  30. Close #1
  31. MsgBox "Package Successful."
  32. Exit Sub
  33. ERRRR:
  34. MsgBox "Packager Failed"
  35.  
  36. End
  37. End Sub
  38. Sub PrintFile(FileName$)
  39. Open FileName$ For Input As #2
  40. Line Input #2, a$ 'get rid of the version info
  41. Print #1, "[FILE]"
  42. Print #1, "Filename: " & UCase$(FileName$)
  43. Print #1, "Version: " & a$
  44. Print #1, "-------------------------------"
  45. Do
  46.   Line Input #2, a$
  47.   If a$ = "[ENDOFFILE]" Then Exit Do
  48.   Print #1, a$
  49. Loop
  50. Print #1, "[ENDOFFILE]"
  51. Close #2
  52. End Sub
  53.