59 |
|
|
60 |
|
|
61 |
|
constructor TAccess_OniArchive.Create(DatFilename: String; ConnectionID: Integer; var Msg: TStatusMessages); |
62 |
– |
type |
63 |
– |
THeader = packed record |
64 |
– |
Ident: array[0..$13] of Byte; |
65 |
– |
Files: Integer; |
66 |
– |
NamedFiles: Integer; |
67 |
– |
Extensions: Integer; |
68 |
– |
DataAddr: Integer; |
69 |
– |
DataSize: Integer; |
70 |
– |
NamesAddr: Integer; |
71 |
– |
NamesSize: Integer; |
72 |
– |
Ident2: array[0..$F] of Byte; |
73 |
– |
end; |
74 |
– |
TFilesMap = array of packed record |
75 |
– |
Extension: array[0..$3] of Char; |
76 |
– |
DataAddr: Integer; |
77 |
– |
NameAddr: Integer; |
78 |
– |
FileSize: Integer; |
79 |
– |
FileType: LongWord; |
80 |
– |
end; |
81 |
– |
TNamedFilesMap = array of packed record |
82 |
– |
FileNumber: Integer; |
83 |
– |
blubb: Integer; |
84 |
– |
end; |
62 |
|
const |
63 |
|
header_ident1_pc: array[0..$13] of Byte = |
64 |
|
($1F, $27, $DC, $33, $DF, $BC, $03, $00, $31, $33, $52, $56, $40, $00, |
226 |
|
name := fields.Strings[2]; |
227 |
|
extension := fields.Strings[0]; |
228 |
|
end; |
229 |
+ |
if SortType in [ST_ExtNameAsc, ST_ExtNameDesc] then |
230 |
+ |
begin |
231 |
+ |
id := fields.Strings[2]; |
232 |
+ |
name := fields.Strings[1]; |
233 |
+ |
extension := fields.Strings[0]; |
234 |
+ |
end; |
235 |
|
end; |
236 |
|
|
237 |
|
begin |
245 |
|
begin |
246 |
|
if (NoEmptyFiles = False) or ((Fdat_files[i].FileType and $02) = 0) then |
247 |
|
begin |
248 |
< |
if AppSettings.FilenumbersAsHex then |
266 |
< |
id := IntToHex(Fdat_files[i].ID, 4) |
267 |
< |
else |
268 |
< |
id := FormatNumber(Fdat_files[i].ID, 5, '0'); |
248 |
> |
id := FormatNumber(Fdat_files[i].ID, 5, '0'); |
249 |
|
name := Fdat_files[i].Name; |
250 |
|
extension := Fdat_files[i].Extension; |
251 |
|
|
253 |
|
ST_IDAsc, ST_IDDesc: list.Add(id + ';' + name + ';' + extension); |
254 |
|
ST_NameAsc, ST_NameDesc: list.Add(name + ';' + id + ';' + extension); |
255 |
|
ST_ExtAsc, ST_ExtDesc: list.Add(extension + ';' + id + ';' + name); |
256 |
+ |
ST_ExtNameAsc, ST_ExtNameDesc: list.Add(name + ';' + extension + ';' + id); |
257 |
|
end; |
258 |
|
end; |
259 |
|
end; |
262 |
|
if list.Count > 0 then |
263 |
|
begin |
264 |
|
fields := TStringList.Create; |
265 |
< |
if SortType in [ST_IDAsc, ST_NameAsc, ST_ExtAsc] then |
265 |
> |
if SortType in [ST_IDAsc, ST_NameAsc, ST_ExtAsc, ST_ExtNameAsc] then |
266 |
|
for i := 0 to list.Count - 1 do |
267 |
|
begin |
268 |
|
getfields; |