- Timestamp:
- Jan 30, 2016, 12:15:16 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Dune2.lpi
r3 r4 82 82 </Item4> 83 83 </RequiredPackages> 84 <Units Count="1 0">84 <Units Count="11"> 85 85 <Unit0> 86 86 <Filename Value="Dune2.lpr"/> … … 128 128 </Unit8> 129 129 <Unit9> 130 <Filename Value="U Format80.pas"/>130 <Filename Value="UDecode.pas"/> 131 131 <IsPartOfProject Value="True"/> 132 132 </Unit9> 133 <Unit10> 134 <Filename Value="UWsaFile.pas"/> 135 <IsPartOfProject Value="True"/> 136 </Unit10> 133 137 </Units> 134 138 </ProjectOptions> -
trunk/Dune2.lpr
r3 r4 9 9 Interfaces, // this includes the LCL widgetset 10 10 Forms, UFormMain, UCore, UPakFile, CoolStreaming, Common, TemplateGenerics, 11 UGame, UFile1, UEngFile, UFormLog, UShpFile, U Format8011 UGame, UFile1, UEngFile, UFormLog, UShpFile, UDecode 12 12 { you can add units after this }; 13 13 -
trunk/UGame.pas
r3 r4 6 6 7 7 uses 8 Classes, SysUtils, Graphics, UFile1, UEngFile, UShpFile, UFormat80, Types; 8 Classes, SysUtils, Graphics, UFile1, UEngFile, UShpFile, UDecode, Types, 9 UWsaFile; 9 10 10 11 type … … 26 27 procedure LoadUnits; 27 28 procedure LoadUnitsFile(FileName: string); 29 procedure LoadWsa; 28 30 public 29 31 Bitmap: TBitmap; … … 258 260 LoadUnitsFile('extracted/DUNE.PAK/PIECES.SHP'); 259 261 LoadUnitsFile('extracted/DUNE.PAK/SHAPES.SHP'); 260 261 end; 262 262 end; 263 264 procedure TGame.LoadWsa; 265 var 266 F: TWsaFile; 267 begin 268 F := TWsaFile.Create; 269 F.Open('extracted/DUNE.PAK/WIN1.WSA'); 270 F.Free; 271 end; 263 272 264 273 procedure TGame.LoadData; … … 269 278 //LoadTexts; 270 279 LoadUnits; 280 LoadWSA; 271 281 end; 272 282 -
trunk/UShpFile.pas
r3 r4 6 6 7 7 uses 8 Classes, SysUtils, Contnrs, Graphics, U Format80, Types;8 Classes, SysUtils, Contnrs, Graphics, UDecode, Types; 9 9 10 10 type … … 39 39 implementation 40 40 41 function Format20(Source: TByteDynArray): TByteDynArray;42 var43 D: Byte;44 Count: Integer;45 SourceIndex: Integer;46 DestIndex: Integer;47 begin48 SourceIndex := 0;49 DestIndex := 0;50 SetLength(Result, Length(Source));51 while SourceIndex < Length(Source) do begin52 D := Source[SourceIndex];53 Inc(SourceIndex);54 if D = 0 then begin55 if SourceIndex >= Length(Source) then56 Break;57 Count := Source[SourceIndex];58 if Count = 0 then Break;59 Inc(SourceIndex);60 if (DestIndex + Count) >= Length(Result) then61 SetLength(Result, DestIndex + Count + 1);62 FillChar(Result[DestIndex], Count, 0);63 Inc(DestIndex, Count);64 end else begin65 if DestIndex >= Length(Result) then66 SetLength(Result, DestIndex + 1);67 Result[DestIndex] := D;68 Inc(DestIndex);69 end;70 end;71 end;72 41 73 42 { TShpFileItem }
Note:
See TracChangeset
for help on using the changeset viewer.