Changeset 147 for oup/current
- Timestamp:
- Apr 1, 2007, 6:15:47 PM (18 years ago)
- Location:
- oup/current
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
oup/current/Global/RawList.pas
r146 r147 142 142 links: Integer; 143 143 Data: TStream; 144 begin 144 read: Integer; 145 char: Byte; 146 foundzeros: Byte; 147 begin 148 SetLength(Result, 0); 149 145 150 ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $18, 4, @baselink); 146 151 ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $1C, 4, @links); … … 148 153 begin 149 154 ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $20 + (links - 1) * 4, 4, @lastlink); 150 // SetLength(Data, lastlink + 1024);151 155 Data := nil; 152 156 TAccess_OniArchive(ConManager.Connection[ConnectionID]).LoadRawOffset( 153 157 False, baselink, lastlink + 1024, Data); 154 // TOniDataDat(connection).LoadRawOffset(False, baselink, lastlink + 1024, Data); 155 // connection.LoadRawFile(fileid,$1C,baselink,lastlink+1024,False,@data[0]); 156 raise ENotImplemented.Create('RawList.SUBT'); 157 end; 158 { 159 k := 0; 160 for j := 0 to 1024 do 161 begin 162 if (Data[lastlink + j] = $00) or (j = 1024) then 158 159 foundzeros := 0; 160 repeat 161 read := Data.Read(char, 1); 162 if (read > 0) and (char = 0) then 163 163 begin 164 if j < 1024 then 165 begin 166 if k = 0 then 167 begin 168 k := 1; 169 end 170 else 171 begin 172 SetLength(Result, 1); 173 Result[0].src_offset := $18; 174 Result[0].raw_addr := baselink; 175 Result[0].raw_size := lastlink + j; 176 Break; 177 end; 178 end; 164 Inc(foundzeros); 179 165 end; 180 end; 181 end; 182 } 166 until (read = 0) or (foundzeros = 2); 167 168 if foundzeros = 2 then 169 begin 170 SetLength(Result, 1); 171 Result[0].SrcID := FileID; 172 Result[0].SrcOffset := $18; 173 Result[0].RawAddr := baselink; 174 Result[0].RawSize := Data.Position; 175 Result[0].LocSep := False; 176 end; 177 end; 183 178 end; 184 179
Note:
See TracChangeset
for help on using the changeset viewer.