ionpacker.bas

来自「超级C&C有没有搞错,VB还能编出这种即时策略游戏来!没错,这就是我们的超级C&」· BAS 代码 · 共 53 行

BAS
53
字号
Attribute VB_Name = "Module1"
Const VERS = "V0.04"
Global Const CompilerData$ = "Packed with IonPacker " & VERS & "for Jump-Point: Ion."
Global Const VersionFile$ = "Version.Dat"
Global Const OutputFile$ = "Original.Ion"
Global Const InternalFile$ = "Internal.Jps"
Sub Main()
'On Error GoTo ERRRR
Open OutputFile$ For Output As #1
Open VersionFile$ For Input As #2
  Line Input #2, a$
  Print #1, "GAME-VERSION: " & a$
Close #2

Open InternalFile$ For Input As #2
  Line Input #2, a$
  Print #1, a$
Close #2
Call PrintFile("ObjectImprints.Dat")
Call PrintFile("GraphicLibs.Dat")
Call PrintFile("PictureDefs.Dat")
Call PrintFile("Sprites.Dat")
Call PrintFile("Units.Dat")
Call PrintFile("Music.Dat")
Call PrintFile("Sound.Dat")
Call PrintFile("TerrainProfiles.Dat")
Print #1, "[COMMENTS]"
Print #1, "CompilerComment: " & CompilerData$ & " Packaged on: " & Date & ", " & Time
Print #1, "[ENDOFLIBRARY]"
Close #1
MsgBox "Package Successful."
Exit Sub
ERRRR:
MsgBox "Packager Failed"

End
End Sub
Sub PrintFile(FileName$)
Open FileName$ For Input As #2
Line Input #2, a$ 'get rid of the version info
Print #1, "[FILE]"
Print #1, "Filename: " & UCase$(FileName$)
Print #1, "Version: " & a$
Print #1, "-------------------------------"
Do
  Line Input #2, a$
  If a$ = "[ENDOFFILE]" Then Exit Do
  Print #1, a$
Loop
Print #1, "[ENDOFFILE]"
Close #2
End Sub

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?