Help with *.arc files
Posted: Sun Feb 17, 2008 6:47 pm
The contents of this post was deleted because of possible forum rules violation.
Code: Select all
char magic[4];
uint version;
uint numFiles;
uint dirOffset;
FSeek(FileSize()-4);
uint xorValue<format=hex>;
FSeek(dirOffset);
struct Entry
{
char filename[128]; // 0 terminated
char pathname[256]; // 0 terminated
uint offset;
uint size;
uint xorValue; // the value used
} directory[numFiles];
Well, it's harder than I thought. Got to figure out all the class hierarchy relations.Rheini wrote:However, the best way to deal with arc archives is to write a program for the system.dll. All functions to modify ARC archives are available in there.
Code: Select all
namespace lexis
{
namespace system
{
class TE_DLL_API IArchive
{
public:
struct FileEntry
{
uint uk1;
uint uk2;
uint uk3;
uint uk4;
uint uk5;
uint uk6;
uint uk7;
uint uk8;
uint uk9;
uint uk10;
uint uk11;
uint uk12;
uint uk13;
uint uk14;
uint uk15;
uint offsetInFIle; // Offset of the file in the ARC0 ?!
uint filesize;
}; // ????
struct FindData {}; // ???
IArchive();
IArchive(const IArchive& rhs);
~IArchive();
string getName();
};
class TE_DLL_API ArchiveARC
{
public:
ArchiveARC();
ArchiveARC(const ArchiveARC& rhs);
~ArchiveARC();
int addFile(string name, const char* name2, uint id); // bool
uint addFolder(string name);
uint clear();
uint close();
uint findFile(string name, IArchive::FileEntry fileEntry);
void* findFileBegin(IArchive::FindData findData);
void* findFileNext(IArchive::FindData findData);
virtual uint load(const string& name);
uint open(uint id);
int readFile(const IArchive::FileEntry& fileEntry, void* destBuffer);
uint removeFile(const IArchive::FileEntry& fileEntry);
uint save(string filename);
};
class TE_DLL_API ArchiveFilter
{
public:
ArchiveFilter();
ArchiveFilter(const ArchiveFilter& rhs);
~ArchiveFilter();
IArchive* addArchive(string name);
int findFile(string name, IArchive::FileEntry& fileEntry); // bool
uint forAllArchives(int (*callbackFunc) (IArchive*,void*), void*);
IArchive* getArchive(string name);
string getExtension();
string getName();
void registerArchives(string name);
void setExtension(string ext);
void setName(string name);
};
}
}
Interfaces and vtable calls. I'm working on this game now myself.Rheini wrote:The problem is the exe doesn't use many functions, mainly just createInstance or getInstance functions.
This seems like compiler generated stuff.
So I can't really see how the ARC management code is called.
So you have knowledge about that stuff? Would you tell me where you got that from? Are there any tutorials out there (or something like that)?Rick wrote:Interfaces and vtable calls. I'm working on this game now myself.Rheini wrote:The problem is the exe doesn't use many functions, mainly just createInstance or getInstance functions.
This seems like compiler generated stuff.
So I can't really see how the ARC management code is called.
Yes I do, it's mostly from experimenting myself rather than tutorials, though I believe there is some information on vtables and such.Rheini wrote:So you have knowledge about that stuff? Would you tell me where you got that from? Are there any tutorials out there (or something like that)?
The Experiment and Experience 112 are the same game. The Experiment is the US title for Experience 112.Rheini wrote:There's another game from that developer, probably they use the same system for that one.
http://www.gamershell.com/download_22691.shtml
Probably, but what is the need when you can just use overriding the files as I mentioned earlier?qorilla wrote:Hi!
Thanks for this extractor program!
My question is, would it be possible to somehow pack new archives? I mean repacking the archive, with some changes to some files in it.
Thank you very much!