2019-04-10 05:23:38 +02:00
|
|
|
library libbsarch;
|
|
|
|
|
|
|
|
|
|
uses
|
|
|
|
|
Math,
|
|
|
|
|
Classes,
|
|
|
|
|
Types,
|
|
|
|
|
SysUtils,
|
2019-04-15 04:16:36 +02:00
|
|
|
wbStreams,
|
|
|
|
|
wbBSArchive;
|
2019-04-10 05:23:38 +02:00
|
|
|
|
2019-04-17 01:36:22 +02:00
|
|
|
type
|
|
|
|
|
TwbBSResultCode = (
|
|
|
|
|
BSA_RESULT_NONE = 0,
|
|
|
|
|
BSA_RESULT_EXCEPTION = -1
|
|
|
|
|
);
|
|
|
|
|
TwbBSResultMessage = packed record
|
|
|
|
|
code: ShortInt;
|
|
|
|
|
text: array[0..1023] of WideChar;
|
|
|
|
|
end;
|
|
|
|
|
TwbBSResultMessageBuffer = packed record
|
|
|
|
|
buffer: TwbBSResultBuffer;
|
|
|
|
|
message: TwbBSResultMessage;
|
|
|
|
|
end;
|
|
|
|
|
|
2019-04-10 05:23:38 +02:00
|
|
|
{Shared}
|
|
|
|
|
|
2019-04-17 01:36:22 +02:00
|
|
|
function string_to_cstring(
|
|
|
|
|
aString: String;
|
|
|
|
|
const aStringBufferSize: Cardinal;
|
|
|
|
|
const aStringBuffer: PChar
|
|
|
|
|
): Integer; stdcall;
|
2019-04-10 05:23:38 +02:00
|
|
|
begin
|
|
|
|
|
Result := Min(aStringBufferSize, Length(AString));
|
|
|
|
|
if (aStringBuffer <> nil) and (Result > 0) then
|
2019-04-17 01:36:22 +02:00
|
|
|
Move(AString[1], aStringBuffer^, Result * SizeOf(WideChar));
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
function string_to_cstring_end(
|
|
|
|
|
aString: String;
|
|
|
|
|
const aStringBufferSize: Cardinal;
|
|
|
|
|
const aStringBuffer: PChar
|
|
|
|
|
): Integer; stdcall;
|
|
|
|
|
begin
|
|
|
|
|
Result := Min(aStringBufferSize - 1, Length(AString));
|
|
|
|
|
if (aStringBuffer <> nil) and (Result > 0) then
|
|
|
|
|
begin
|
|
|
|
|
Move(AString[1], aStringBuffer^, Result * SizeOf(WideChar));
|
|
|
|
|
aStringBuffer[Result] := #0;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure exception_handler(E: Exception; var Result: TwbBSResultMessage); stdcall;
|
|
|
|
|
begin
|
|
|
|
|
Result.code := ShortInt(BSA_RESULT_EXCEPTION);
|
|
|
|
|
string_to_cstring_end(E.Message, Length(Result.text), Result.text);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure buffer_exception_handler(E: Exception; var Result: TwbBSResultMessageBuffer); stdcall;
|
|
|
|
|
begin
|
|
|
|
|
Result.buffer.size := 0;
|
|
|
|
|
Result.buffer.data := nil;
|
|
|
|
|
Result.message.code := ShortInt(BSA_RESULT_EXCEPTION);
|
|
|
|
|
string_to_cstring_end(E.Message, Length(Result.message.text), Result.message.text);
|
2019-04-10 05:23:38 +02:00
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
{BSA File List}
|
|
|
|
|
|
2019-04-15 04:16:36 +02:00
|
|
|
function bsa_entry_list_create:Pointer; stdcall;
|
2019-04-10 05:23:38 +02:00
|
|
|
begin
|
2019-04-17 01:36:22 +02:00
|
|
|
try
|
|
|
|
|
Result := TwbBSEntryList.Create;
|
|
|
|
|
except
|
|
|
|
|
Result := nil;
|
|
|
|
|
end;
|
2019-04-10 05:23:38 +02:00
|
|
|
end;
|
|
|
|
|
|
2019-04-17 01:36:22 +02:00
|
|
|
function bsa_entry_list_free(obj: Pointer): TwbBSResultMessage; stdcall;
|
2019-04-10 05:23:38 +02:00
|
|
|
begin
|
2019-04-17 01:36:22 +02:00
|
|
|
Result.code := Ord(BSA_RESULT_NONE);
|
|
|
|
|
try
|
|
|
|
|
TwbBSEntryList(obj).Clear();
|
|
|
|
|
TwbBSEntryList(obj).free;
|
|
|
|
|
except
|
|
|
|
|
on E: Exception do
|
|
|
|
|
exception_handler(E, Result);
|
|
|
|
|
end;
|
2019-04-10 05:23:38 +02:00
|
|
|
end;
|
|
|
|
|
|
2019-04-17 01:36:22 +02:00
|
|
|
function bsa_entry_list_count(obj: Pointer): Integer; stdcall;
|
2019-04-10 05:23:38 +02:00
|
|
|
begin
|
2019-04-17 01:36:22 +02:00
|
|
|
try
|
|
|
|
|
Result := TwbBSEntryList(obj).Count;
|
|
|
|
|
except
|
|
|
|
|
Result := Ord(BSA_RESULT_EXCEPTION);
|
|
|
|
|
end;
|
2019-04-10 05:23:38 +02:00
|
|
|
end;
|
|
|
|
|
|
2019-04-17 01:36:22 +02:00
|
|
|
function bsa_entry_list_add(obj: Pointer; const aEntryString: PChar): TwbBSResultMessage; stdcall;
|
2019-04-10 05:23:38 +02:00
|
|
|
begin
|
2019-04-17 01:36:22 +02:00
|
|
|
Result.code := Ord(BSA_RESULT_NONE);
|
|
|
|
|
try
|
|
|
|
|
TwbBSEntryList(obj).Add(String(aEntryString));
|
|
|
|
|
except
|
|
|
|
|
on E: Exception do
|
|
|
|
|
exception_handler(E, Result);
|
|
|
|
|
end;
|
2019-04-10 05:23:38 +02:00
|
|
|
end;
|
|
|
|
|
|
2019-04-17 01:36:22 +02:00
|
|
|
function bsa_entry_list_get(obj: Pointer; const aIndex: Cardinal; const aStringBufferSize: Cardinal; const aStringBuffer: PChar): Integer; stdcall;
|
2019-04-10 05:23:38 +02:00
|
|
|
begin
|
2019-04-17 01:36:22 +02:00
|
|
|
try
|
|
|
|
|
Result := string_to_cstring_end(TwbBSEntryList(obj).Strings[aIndex], aStringBufferSize, aStringBuffer);
|
|
|
|
|
except
|
|
|
|
|
Result := Integer(BSA_RESULT_EXCEPTION);
|
|
|
|
|
end;
|
2019-04-10 05:23:38 +02:00
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
{BSArchive}
|
|
|
|
|
|
2019-04-15 04:16:36 +02:00
|
|
|
function bsa_create:Pointer; stdcall;
|
2019-04-10 05:23:38 +02:00
|
|
|
begin
|
2019-04-17 01:36:22 +02:00
|
|
|
try
|
|
|
|
|
Result := TwbBSArchive.Create;
|
|
|
|
|
except
|
|
|
|
|
Result := nil;
|
|
|
|
|
end;
|
2019-04-10 05:23:38 +02:00
|
|
|
end;
|
|
|
|
|
|
2019-04-17 01:36:22 +02:00
|
|
|
function bsa_free(obj: Pointer): TwbBSResultMessage; stdcall;
|
2019-04-10 05:23:38 +02:00
|
|
|
begin
|
2019-04-17 01:36:22 +02:00
|
|
|
Result.code := Ord(BSA_RESULT_NONE);
|
|
|
|
|
try
|
|
|
|
|
TwbBSArchive(obj).free;
|
|
|
|
|
except
|
|
|
|
|
on E: Exception do
|
|
|
|
|
exception_handler(E, Result);
|
|
|
|
|
end;
|
2019-04-10 05:23:38 +02:00
|
|
|
end;
|
|
|
|
|
|
2019-04-17 01:36:22 +02:00
|
|
|
function bsa_load_from_file(obj: Pointer; const aFileName: PChar): TwbBSResultMessage; stdcall;
|
2019-04-10 05:23:38 +02:00
|
|
|
begin
|
2019-04-17 01:36:22 +02:00
|
|
|
Result.code := Ord(BSA_RESULT_NONE);
|
|
|
|
|
try
|
|
|
|
|
TwbBSArchive(obj).LoadFromFile(String(aFileName));
|
|
|
|
|
except
|
|
|
|
|
on E: Exception do
|
|
|
|
|
exception_handler(E, Result);
|
|
|
|
|
end;
|
2019-04-10 05:23:38 +02:00
|
|
|
end;
|
|
|
|
|
|
2019-04-17 01:36:22 +02:00
|
|
|
function bsa_create_archive(obj: Pointer; const aFileName: PChar; aType: TBSArchiveType; aFileList: TwbBSEntryList): TwbBSResultMessage; stdcall;
|
2019-04-10 05:23:38 +02:00
|
|
|
begin
|
2019-04-17 01:36:22 +02:00
|
|
|
Result.code := Ord(BSA_RESULT_NONE);
|
|
|
|
|
try
|
|
|
|
|
TwbBSArchive(obj).CreateArchiveCompat(String(aFileName), aType, aFileList);
|
|
|
|
|
except
|
|
|
|
|
on E: Exception do
|
|
|
|
|
exception_handler(E, Result);
|
|
|
|
|
end;
|
2019-04-10 05:23:38 +02:00
|
|
|
end;
|
|
|
|
|
|
2019-04-17 01:36:22 +02:00
|
|
|
function bsa_save(obj: Pointer): TwbBSResultMessage; stdcall;
|
2019-04-10 05:23:38 +02:00
|
|
|
begin
|
2019-04-17 01:36:22 +02:00
|
|
|
Result.code := Ord(BSA_RESULT_NONE);
|
|
|
|
|
try
|
|
|
|
|
TwbBSArchive(obj).Save;
|
|
|
|
|
except
|
|
|
|
|
on E: Exception do
|
|
|
|
|
exception_handler(E, Result);
|
|
|
|
|
end;
|
2019-04-10 05:23:38 +02:00
|
|
|
end;
|
|
|
|
|
|
2019-04-17 01:36:22 +02:00
|
|
|
function bsa_add_file_from_disk(obj: Pointer; const aRootDir, aFileName: PChar): TwbBSResultMessage; stdcall;
|
2019-04-10 05:23:38 +02:00
|
|
|
begin
|
2019-04-17 01:36:22 +02:00
|
|
|
Result.code := Ord(BSA_RESULT_NONE);
|
|
|
|
|
try
|
|
|
|
|
TwbBSArchive(obj).AddFile(String(aRootDir), String(aFileName));
|
|
|
|
|
except
|
|
|
|
|
on E: Exception do
|
|
|
|
|
exception_handler(E, Result);
|
|
|
|
|
end;
|
2019-04-10 05:23:38 +02:00
|
|
|
end;
|
|
|
|
|
|
2019-04-17 01:36:22 +02:00
|
|
|
function bsa_add_file_from_memory(obj: Pointer; const aFileName: PChar; const aSize: Cardinal; const aData: PByte): TwbBSResultMessage; stdcall;
|
2019-04-10 05:23:38 +02:00
|
|
|
begin
|
2019-04-17 01:36:22 +02:00
|
|
|
Result.code := Ord(BSA_RESULT_NONE);
|
|
|
|
|
try
|
|
|
|
|
TwbBSArchive(obj).AddFileCompat(String(aFileName), aSize, aData);
|
|
|
|
|
except
|
|
|
|
|
on E: Exception do
|
|
|
|
|
exception_handler(E, Result);
|
|
|
|
|
end;
|
2019-04-10 05:23:38 +02:00
|
|
|
end;
|
|
|
|
|
|
2019-04-15 04:16:36 +02:00
|
|
|
function bsa_find_file_record(obj: Pointer; const aFileName: PChar): Pointer; stdcall;
|
2019-04-10 05:23:38 +02:00
|
|
|
begin
|
2019-04-17 01:36:22 +02:00
|
|
|
try
|
|
|
|
|
Result := TwbBSArchive(obj).FindFileRecord(String(aFileName));
|
|
|
|
|
except
|
|
|
|
|
Result := nil
|
|
|
|
|
end;
|
2019-04-10 05:23:38 +02:00
|
|
|
end;
|
|
|
|
|
|
2019-04-17 01:36:22 +02:00
|
|
|
function bsa_extract_file_data_by_record(obj: Pointer; aFileRecord: Pointer): TwbBSResultMessageBuffer; stdcall;
|
2019-04-10 05:23:38 +02:00
|
|
|
begin
|
2019-04-17 01:36:22 +02:00
|
|
|
Result.message.code := Ord(BSA_RESULT_NONE);
|
|
|
|
|
try
|
|
|
|
|
Result.buffer := TwbBSArchive(obj).ExtractFileDataCompat(aFileRecord);
|
|
|
|
|
except
|
|
|
|
|
on E: Exception do
|
|
|
|
|
buffer_exception_handler(E, Result);
|
|
|
|
|
end;
|
2019-04-10 05:23:38 +02:00
|
|
|
end;
|
|
|
|
|
|
2019-04-17 01:36:22 +02:00
|
|
|
function bsa_extract_file_data_by_filename(obj: Pointer; const aFileName: PChar): TwbBSResultMessageBuffer; stdcall;
|
2019-04-10 05:23:38 +02:00
|
|
|
begin
|
2019-04-17 01:36:22 +02:00
|
|
|
Result.message.code := Ord(BSA_RESULT_NONE);
|
|
|
|
|
try
|
|
|
|
|
Result.buffer := TwbBSArchive(obj).ExtractFileDataCompat(String(aFileName));
|
|
|
|
|
except
|
|
|
|
|
on E: Exception do
|
|
|
|
|
buffer_exception_handler(E, Result);
|
|
|
|
|
end;
|
2019-04-10 05:23:38 +02:00
|
|
|
end;
|
|
|
|
|
|
2019-04-17 01:36:22 +02:00
|
|
|
function bsa_file_data_free(obj: Pointer; fileDataResult: TwbBSResultMessageBuffer): TwbBSResultMessage; stdcall;
|
2019-04-10 05:23:38 +02:00
|
|
|
begin
|
2019-04-17 01:36:22 +02:00
|
|
|
Result.code := Ord(BSA_RESULT_NONE);
|
|
|
|
|
try
|
|
|
|
|
TwbBSArchive(obj).ReleaseFileDataCompat(fileDataResult.buffer);
|
|
|
|
|
except
|
|
|
|
|
on E: Exception do
|
|
|
|
|
exception_handler(E, Result);
|
|
|
|
|
end;
|
2019-04-10 05:23:38 +02:00
|
|
|
end;
|
|
|
|
|
|
2019-04-17 01:36:22 +02:00
|
|
|
function bsa_extract_file(obj: Pointer; const aFileName, aSaveAs: PChar): TwbBSResultMessage; stdcall;
|
2019-04-10 05:23:38 +02:00
|
|
|
begin
|
2019-04-17 01:36:22 +02:00
|
|
|
Result.code := Ord(BSA_RESULT_NONE);
|
|
|
|
|
try
|
|
|
|
|
TwbBSArchive(obj).ExtractFile(String(aFileName), String(aSaveAs));
|
|
|
|
|
except
|
|
|
|
|
on E: Exception do
|
|
|
|
|
exception_handler(E, Result);
|
|
|
|
|
end;
|
2019-04-10 05:23:38 +02:00
|
|
|
end;
|
|
|
|
|
|
2019-04-17 01:36:22 +02:00
|
|
|
function bsa_iterate_files(obj: Pointer; aProc: TBSFileIterationProcCompat; aContext: Pointer): TwbBSResultMessage; stdcall;
|
2019-04-10 05:23:38 +02:00
|
|
|
begin
|
2019-04-17 01:36:22 +02:00
|
|
|
Result.code := Ord(BSA_RESULT_NONE);
|
|
|
|
|
try
|
|
|
|
|
TwbBSArchive(obj).IterateFilesCompat(aProc, aContext);
|
|
|
|
|
except
|
|
|
|
|
on E: Exception do
|
|
|
|
|
exception_handler(E, Result);
|
|
|
|
|
end;
|
2019-04-10 05:23:38 +02:00
|
|
|
end;
|
|
|
|
|
|
2019-04-15 04:16:36 +02:00
|
|
|
function bsa_file_exists(obj: Pointer; const aFileName: string): Boolean; stdcall;
|
2019-04-10 05:23:38 +02:00
|
|
|
begin
|
2019-04-17 01:36:22 +02:00
|
|
|
try
|
|
|
|
|
Result := TwbBSArchive(obj).FileExists(aFileName);
|
|
|
|
|
except
|
|
|
|
|
Result := False;
|
|
|
|
|
end;
|
2019-04-10 05:23:38 +02:00
|
|
|
end;
|
|
|
|
|
|
2019-04-17 01:36:22 +02:00
|
|
|
function bsa_get_resource_list(obj: Pointer; const aEntryResultList: TwbBSEntryList; aFolder: PChar): TwbBSResultMessage; stdcall;
|
2019-04-10 05:23:38 +02:00
|
|
|
begin
|
2019-04-17 01:36:22 +02:00
|
|
|
Result.code := Ord(BSA_RESULT_NONE);
|
|
|
|
|
try
|
|
|
|
|
TwbBSArchive(obj).ResourceListCompat(aEntryResultList, String(aFolder));
|
|
|
|
|
except
|
|
|
|
|
on E: Exception do
|
|
|
|
|
exception_handler(E, Result);
|
|
|
|
|
end;
|
2019-04-10 05:23:38 +02:00
|
|
|
end;
|
|
|
|
|
|
2019-04-17 01:36:22 +02:00
|
|
|
function bsa_resolve_hash(obj: Pointer; const aHash: UInt64; const aEntryResultList: TwbBSEntryList): TwbBSResultMessage; stdcall;
|
2019-04-10 05:23:38 +02:00
|
|
|
begin
|
2019-04-17 01:36:22 +02:00
|
|
|
Result.code := Ord(BSA_RESULT_NONE);
|
|
|
|
|
try
|
|
|
|
|
TwbBSArchive(obj).ResolveHashCompat(aHash, aEntryResultList);
|
|
|
|
|
except
|
|
|
|
|
on E: Exception do
|
|
|
|
|
exception_handler(E, Result);
|
|
|
|
|
end;
|
|
|
|
|
end;
|
2019-04-10 05:23:38 +02:00
|
|
|
|
2019-04-17 01:36:22 +02:00
|
|
|
function bsa_close(obj: Pointer): TwbBSResultMessage; stdcall;
|
2019-04-10 05:23:38 +02:00
|
|
|
begin
|
2019-04-17 01:36:22 +02:00
|
|
|
Result.code := Ord(BSA_RESULT_NONE);
|
|
|
|
|
try
|
|
|
|
|
TwbBSArchive(obj).Close;
|
|
|
|
|
except
|
|
|
|
|
on E: Exception do
|
|
|
|
|
exception_handler(E, Result);
|
|
|
|
|
end;
|
2019-04-10 05:23:38 +02:00
|
|
|
end;
|
|
|
|
|
|
2019-04-15 04:16:36 +02:00
|
|
|
function bsa_filename_get(obj: Pointer; const aStringBufferSize: Cardinal; const aStringBuffer: PChar): Cardinal; stdcall;
|
2019-04-10 05:23:38 +02:00
|
|
|
begin
|
2019-04-17 01:36:22 +02:00
|
|
|
Result := string_to_cstring_end(TwbBSArchive(obj).FileName, aStringBufferSize, aStringBuffer);
|
2019-04-10 05:23:38 +02:00
|
|
|
end;
|
|
|
|
|
|
2019-04-15 04:16:36 +02:00
|
|
|
function bsa_archive_type_get(obj: Pointer): TBSArchiveType; stdcall;
|
2019-04-10 05:23:38 +02:00
|
|
|
begin
|
|
|
|
|
Result := TwbBSArchive(obj).ArchiveType;
|
|
|
|
|
end;
|
|
|
|
|
|
2019-04-15 04:16:36 +02:00
|
|
|
function bsa_version_get(obj: Pointer): Cardinal; stdcall;
|
2019-04-10 05:23:38 +02:00
|
|
|
begin
|
|
|
|
|
Result := TwbBSArchive(obj).Version;
|
|
|
|
|
end;
|
|
|
|
|
|
2019-04-15 04:16:36 +02:00
|
|
|
function bsa_format_name_get(obj: Pointer; const aStringBufferSize: Cardinal; const aStringBuffer: PChar): Cardinal; stdcall;
|
2019-04-10 05:23:38 +02:00
|
|
|
begin
|
2019-04-17 01:36:22 +02:00
|
|
|
Result := string_to_cstring_end(TwbBSArchive(obj).FormatName, aStringBufferSize, aStringBuffer);
|
2019-04-10 05:23:38 +02:00
|
|
|
end;
|
|
|
|
|
|
2019-04-15 04:16:36 +02:00
|
|
|
function bsa_file_count_get(obj: Pointer): Cardinal; stdcall;
|
2019-04-10 05:23:38 +02:00
|
|
|
begin
|
|
|
|
|
Result := TwbBSArchive(obj).FileCount;
|
|
|
|
|
end;
|
|
|
|
|
|
2019-04-15 04:16:36 +02:00
|
|
|
function bsa_archive_flags_get(obj: Pointer): Cardinal; stdcall;
|
2019-04-10 05:23:38 +02:00
|
|
|
begin
|
|
|
|
|
Result := TwbBSArchive(obj).ArchiveFlags;
|
|
|
|
|
end;
|
|
|
|
|
|
2019-04-15 04:16:36 +02:00
|
|
|
procedure bsa_archive_flags_set(obj: Pointer; flags: Cardinal); stdcall;
|
2019-04-10 05:23:38 +02:00
|
|
|
begin
|
|
|
|
|
TwbBSArchive(obj).ArchiveFlags := flags;
|
|
|
|
|
end;
|
|
|
|
|
|
2019-04-15 04:16:36 +02:00
|
|
|
function bsa_file_flags_get(obj: Pointer): Cardinal; stdcall;
|
2019-04-10 05:23:38 +02:00
|
|
|
begin
|
|
|
|
|
Result := TwbBSArchive(obj).FileFlags;
|
|
|
|
|
end;
|
|
|
|
|
|
2019-04-15 04:16:36 +02:00
|
|
|
procedure bsa_file_flags_set(obj: Pointer; flags: Cardinal); stdcall;
|
2019-04-10 05:23:38 +02:00
|
|
|
begin
|
|
|
|
|
TwbBSArchive(obj).FileFlags := flags;
|
|
|
|
|
end;
|
|
|
|
|
|
2019-04-15 04:16:36 +02:00
|
|
|
function bsa_compress_get(obj: Pointer): Boolean; stdcall;
|
2019-04-10 05:23:38 +02:00
|
|
|
begin
|
|
|
|
|
Result := TwbBSArchive(obj).Compress;
|
|
|
|
|
end;
|
|
|
|
|
|
2019-04-15 04:16:36 +02:00
|
|
|
procedure bsa_compress_set(obj: Pointer; compress: Boolean); stdcall;
|
2019-04-10 05:23:38 +02:00
|
|
|
begin
|
|
|
|
|
TwbBSArchive(obj).Compress := compress;
|
|
|
|
|
end;
|
|
|
|
|
|
2019-04-15 04:16:36 +02:00
|
|
|
function bsa_share_data_get(obj: Pointer): Boolean; stdcall;
|
2019-04-10 05:23:38 +02:00
|
|
|
begin
|
|
|
|
|
Result := TwbBSArchive(obj).ShareData;
|
|
|
|
|
end;
|
|
|
|
|
|
2019-04-15 04:16:36 +02:00
|
|
|
procedure bsa_share_data_set(obj: Pointer; shareData: Boolean); stdcall;
|
2019-04-10 05:23:38 +02:00
|
|
|
begin
|
|
|
|
|
TwbBSArchive(obj).ShareData := shareData;
|
|
|
|
|
end;
|
|
|
|
|
|
2019-04-15 04:16:36 +02:00
|
|
|
procedure bsa_file_dds_info_callback_set(obj: Pointer; aProc: TBSFileDDSInfoProcCompat); stdcall;
|
2019-04-10 05:23:38 +02:00
|
|
|
begin
|
|
|
|
|
TwbBSArchive(obj).DDSInfoProc := aProc;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
exports
|
|
|
|
|
bsa_entry_list_create,
|
|
|
|
|
bsa_entry_list_free,
|
|
|
|
|
bsa_entry_list_count,
|
|
|
|
|
bsa_entry_list_add,
|
|
|
|
|
bsa_entry_list_get,
|
|
|
|
|
|
|
|
|
|
bsa_filename_get,
|
|
|
|
|
bsa_archive_type_get,
|
|
|
|
|
bsa_version_get,
|
|
|
|
|
bsa_format_name_get,
|
|
|
|
|
bsa_file_count_get,
|
|
|
|
|
bsa_archive_flags_get,
|
|
|
|
|
bsa_archive_flags_set,
|
|
|
|
|
bsa_file_flags_get,
|
|
|
|
|
bsa_file_flags_set,
|
|
|
|
|
bsa_compress_get,
|
|
|
|
|
bsa_compress_set,
|
|
|
|
|
bsa_share_data_get,
|
|
|
|
|
bsa_share_data_set,
|
|
|
|
|
bsa_file_dds_info_callback_set,
|
|
|
|
|
|
|
|
|
|
bsa_close,
|
|
|
|
|
bsa_resolve_hash,
|
|
|
|
|
bsa_get_resource_list,
|
|
|
|
|
bsa_file_exists,
|
|
|
|
|
bsa_iterate_files,
|
|
|
|
|
bsa_extract_file,
|
|
|
|
|
bsa_file_data_free,
|
|
|
|
|
bsa_extract_file_data_by_filename,
|
|
|
|
|
bsa_extract_file_data_by_record,
|
|
|
|
|
bsa_find_file_record,
|
|
|
|
|
bsa_add_file_from_memory,
|
|
|
|
|
bsa_add_file_from_disk,
|
|
|
|
|
bsa_save,
|
|
|
|
|
bsa_create_archive,
|
|
|
|
|
bsa_load_from_file,
|
|
|
|
|
bsa_create,
|
|
|
|
|
bsa_free
|
|
|
|
|
;
|
|
|
|
|
end.
|