这次的CG不是我解的,我还没时间做解码器,这是从朋友那搞的,据他说这也是从别人那搞得!?二手货??
在下重新整理了一番,现放送给诸位:
带源连接,今晚有效!马上就能找到我!!
请点击下载:
Vagrants CG.zip请点击下载:
Vagrants CG.zip请尽快下载,后天我又要出远门,要不就只有等到过完元旦了……
听说很多人再找CG的解码器,不过一直没有现成的下,我曾经用VC做过一个,不过
后来可能e.go的文件存储格式改了,后面的游戏就解不了了!我现在又懒得装98和
VC,.Net的书正在看,关于文件的那一章还没看到,所以还没重新编解码器,罪过!
在下太懒了!!!:D
不过以前看见有人用DELPHI编的,在下是学C系列的,C++/VC/C#,就是没学DELPHI,
大致意思能明白,格式就不懂了!谁懂的编译一下看看,这个好像只是主体部分吧!
谁做出来了就麻烦共享一下吧!!
program Project1;
uses
Forms,
Unit1 in 'Unit1.pas' {Form1};
{$R *.res}
begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.
.................
Unit1.dfm
.................
object Form1: TForm1
Left = 372
Top = 175
Width = 253
Height = 361
Caption = 'MFA'#25991#20214#35299#21253#22120
Color = clBtnFace
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
OldCreateOrder = False
Position = poScreenCenter
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 12
object ListBox1: TListBox
Left = 8
Top = 8
Width = 233
Height = 281
ItemHeight = 12
TabOrder = 0
end
object Button1: TButton
Left = 24
Top = 304
Width = 75
Height = 25
Caption = #25171#24320#25991#20214
TabOrder = 1
onClick = Button1Click
end
object Button2: TButton
Left = 152
Top = 304
Width = 75
Height = 25
Caption = #20840#37096#35299#21253
TabOrder = 2
onClick = Button2Click
end
object OpenDialog1: TOpenDialog
Left = 40
Top = 64
end
end
................
Unit1.pas
................
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
ListBox1: TListBox;
Button1: TButton;
Button2: TButton;
OpenDialog1: TOpenDialog;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
Tre = packed record
offsets,sizes:integer;
names:array [0..254] of char;
end;
var
Form1: TForm1;
info:array of tre;
hsiz,p:integer;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
k:tfilestream;
i:integer;
fs:tstringlist;
begin
if form1.OpenDialog1.Execute then
begin
form1.ListBox1.Clear;
fs:=tstringlist.Create;
p:=0;
i:=0;
hsiz:=0;
k:=tfilestream.Create(form1.OpenDialog1.FileName,fmopenread);
k.Read(hsiz,4);
while k.Position
begin
setlength(info,p+1);
inc(p);
k.Read(i,4);
k.Position:=k.Position+4;
fillchar(info[p-1].names,length(info[p-1].names),0);
k.Read(info[p-1],i-8);
fs.Add(strpas(info[p-1].names));
end;
form1.ListBox1.Items:=fs;
fs.Free;
k.Free;
form1.Button2.Enabled:=true;
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
var
path:string;
i:integer;
opfile:tfilestream;
sfile:tmemorystream;
begin
opfile:=tfilestream.Create(form1.OpenDialog1.FileName,fmopenread);
sfile:=tmemorystream.Create;
path:=form1.OpenDialog1.FileName;
delete(path,length(path)-3,4);
path:=path+'\';
mkdir(form1.OpenDialog1.FileName);
for i:=0 to form1.ListBox1.Count-1 do
begin
sfile.Clear;
opfile.Position:=info
.offsets;
sfile.CopyFrom(opfile,info.sizes);
ForceDirectories(ExtractFileDir(path+form1.ListBox1.Items.Strings));
sfile.SaveToFile(path+form1.ListBox1.Items.Strings);
end;
sfile.Free;
opfile.Free;
MessageBox(0, PChar('解压缩完成,文件解压缩到了'+path+'路径下!'), '提示',
MB_OK + MB_ICONINFORMATION + MB_TOPMOST);
end;
end.