Changeset 3
- Timestamp:
- Jan 27, 2016, 10:32:48 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 7 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Dune2.lpi
r2 r3 27 27 <SearchPaths> 28 28 <IncludeFiles Value="$(ProjOutDir)"/> 29 <OtherUnitFiles Value=" Packages/TemplateGenerics"/>29 <OtherUnitFiles Value="Forms"/> 30 30 <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/> 31 31 </SearchPaths> … … 82 82 </Item4> 83 83 </RequiredPackages> 84 <Units Count=" 4">84 <Units Count="10"> 85 85 <Unit0> 86 86 <Filename Value="Dune2.lpr"/> … … 91 91 <IsPartOfProject Value="True"/> 92 92 <ComponentName Value="FormMain"/> 93 <HasResources Value="True"/> 93 94 <ResourceBaseClass Value="Form"/> 94 95 </Unit1> … … 97 98 <IsPartOfProject Value="True"/> 98 99 <ComponentName Value="Core"/> 100 <HasResources Value="True"/> 99 101 <ResourceBaseClass Value="DataModule"/> 100 102 </Unit2> … … 103 105 <IsPartOfProject Value="True"/> 104 106 </Unit3> 107 <Unit4> 108 <Filename Value="UGame.pas"/> 109 <IsPartOfProject Value="True"/> 110 </Unit4> 111 <Unit5> 112 <Filename Value="UFile1.pas"/> 113 <IsPartOfProject Value="True"/> 114 </Unit5> 115 <Unit6> 116 <Filename Value="UEngFile.pas"/> 117 <IsPartOfProject Value="True"/> 118 </Unit6> 119 <Unit7> 120 <Filename Value="Forms/UFormLog.pas"/> 121 <IsPartOfProject Value="True"/> 122 <ComponentName Value="FormLog"/> 123 <ResourceBaseClass Value="Form"/> 124 </Unit7> 125 <Unit8> 126 <Filename Value="UShpFile.pas"/> 127 <IsPartOfProject Value="True"/> 128 </Unit8> 129 <Unit9> 130 <Filename Value="UFormat80.pas"/> 131 <IsPartOfProject Value="True"/> 132 </Unit9> 105 133 </Units> 106 134 </ProjectOptions> … … 117 145 <Parsing> 118 146 <SyntaxOptions> 147 <SyntaxMode Value="Delphi"/> 119 148 <CStyleOperator Value="False"/> 120 149 <IncludeAssertionCode Value="True"/> -
trunk/Dune2.lpr
r2 r3 8 8 {$ENDIF}{$ENDIF} 9 9 Interfaces, // this includes the LCL widgetset 10 Forms, UFormMain, UCore, UPakFile, CoolStreaming, Common, TemplateGenerics 10 Forms, UFormMain, UCore, UPakFile, CoolStreaming, Common, TemplateGenerics, 11 UGame, UFile1, UEngFile, UFormLog, UShpFile, UFormat80 11 12 { you can add units after this }; 12 13 … … 18 19 Application.CreateForm(TCore, Core); 19 20 Application.CreateForm(TFormMain, FormMain); 21 Application.CreateForm(TFormLog, FormLog); 20 22 Application.Run; 21 23 end. -
trunk/Forms/UFormMain.lfm
r2 r3 1 1 object FormMain: TFormMain 2 Left = 5783 Height = 6464 Top = 3095 Width = 9852 Left = 333 3 Height = 1074 4 Top = 151 5 Width = 1420 6 6 Caption = 'Dune 2' 7 ClientHeight = 6468 ClientWidth = 9857 ClientHeight = 1074 8 ClientWidth = 1420 9 9 OnActivate = FormActivate 10 OnKeyPress = FormKeyPress 10 11 LCLVersion = '1.7' 12 WindowState = wsMaximized 11 13 object PaintBox1: TPaintBox 12 14 Left = 0 13 Height = 64615 Height = 1074 14 16 Top = 0 15 Width = 98517 Width = 1420 16 18 Align = alClient 17 19 OnClick = PaintBox1Click 20 OnPaint = PaintBox1Paint 18 21 end 19 22 end -
trunk/Forms/UFormMain.pas
r2 r3 16 16 PaintBox1: TPaintBox; 17 17 procedure FormActivate(Sender: TObject); 18 procedure FormKeyPress(Sender: TObject; var Key: char); 18 19 procedure PaintBox1Click(Sender: TObject); 20 procedure PaintBox1Paint(Sender: TObject); 19 21 private 20 22 Initialized: Boolean; … … 40 42 end; 41 43 44 procedure TFormMain.PaintBox1Paint(Sender: TObject); 45 begin 46 Core.Game.Paint(PaintBox1.Canvas); 47 end; 48 42 49 procedure TFormMain.FormActivate(Sender: TObject); 43 50 begin … … 45 52 Initialized := True; 46 53 Core.Init; 54 end; 55 end; 56 57 procedure TFormMain.FormKeyPress(Sender: TObject; var Key: char); 58 begin 59 Caption := IntToStr(Ord(Key)); 60 if Key = #63 then begin 61 Inc(Core.Game.IW); 62 core.Game.LoadData; 63 PaintBox1.Repaint; 64 end; 65 if Key = #41 then begin 66 Dec(Core.Game.IW); 67 core.Game.LoadData; 68 PaintBox1.Repaint; 47 69 end; 48 70 end; -
trunk/Packages/Common
-
Property svn:ignore
set to
lib
-
Property svn:ignore
set to
-
trunk/Packages/Common/UCommon.pas
r2 r3 12 12 type 13 13 TArrayOfByte = array of Byte; 14 TArrayOfInteger = array of Integer; 15 TArrayOfWord = array of Word; 14 16 TArrayOfString = array of string; 15 17 TExceptionEvent = procedure(Sender: TObject; E: Exception) of object; -
trunk/Packages/CoolStreaming
-
Property svn:ignore
set to
lib
-
Property svn:ignore
set to
-
trunk/Packages/CoolStreaming/UStreamHelper.pas
r2 r3 114 114 Result := 0; 115 115 FStream.ReadBuffer(Result, SizeOf(Cardinal)); 116 if SwapData then Result := Swap (Result);116 if SwapData then Result := SwapEndian(Result); 117 117 end; 118 118 … … 121 121 Result := 0; 122 122 FStream.ReadBuffer(Result, SizeOf(Int64)); 123 if SwapData then Result := Swap (Result);123 if SwapData then Result := SwapEndian(Result); 124 124 end; 125 125 … … 298 298 Result := 0; 299 299 FStream.ReadBuffer(Result, SizeOf(Word)); 300 if SwapData then Result := Swap (Result);300 if SwapData then Result := SwapEndian(Result); 301 301 end; 302 302 … … 358 358 procedure TStreamHelper.WriteCardinal(Data: Cardinal); 359 359 begin 360 if SwapData then Data := Swap (Data);360 if SwapData then Data := SwapEndian(Data); 361 361 Write(Data, SizeOf(Cardinal)); 362 362 end; … … 364 364 procedure TStreamHelper.WriteInt64(Data: Int64); 365 365 begin 366 if SwapData then Data := Swap (Data);366 if SwapData then Data := SwapEndian(Data); 367 367 Write(Data, SizeOf(Int64)); 368 368 end; … … 415 415 procedure TStreamHelper.WriteWord(Data: Word); 416 416 begin 417 if SwapData then Data := Swap (Data);417 if SwapData then Data := SwapEndian(Data); 418 418 Write(Data, SizeOf(Word)); 419 419 end; -
trunk/Packages/TemplateGenerics
-
Property svn:ignore
set to
lib
-
Property svn:ignore
set to
-
trunk/UCore.lfm
r2 r3 1 1 object Core: TCore 2 2 OnCreate = DataModuleCreate 3 OnDestroy = DataModuleDestroy 3 4 OldCreateOrder = False 4 5 Height = 349 5 HorizontalOffset = 6296 VerticalOffset = 2666 HorizontalOffset = 1692 7 VerticalOffset = 323 7 8 Width = 364 8 9 end -
trunk/UCore.pas
r2 r3 6 6 7 7 uses 8 Classes, SysUtils, FileUtil, UPakFile, UFindFile ;8 Classes, SysUtils, FileUtil, UPakFile, UFindFile, UGame; 9 9 10 10 type … … 14 14 TCore = class(TDataModule) 15 15 procedure DataModuleCreate(Sender: TObject); 16 procedure DataModuleDestroy(Sender: TObject); 16 17 private 17 18 procedure ExtractPakFiles; 18 19 public 20 Game: TGame; 19 21 procedure Init; 20 22 end; … … 34 36 procedure TCore.DataModuleCreate(Sender: TObject); 35 37 begin 38 Game := TGame.Create; 39 end; 36 40 41 procedure TCore.DataModuleDestroy(Sender: TObject); 42 begin 43 FreeAndNil(Game); 37 44 end; 38 45 … … 60 67 begin 61 68 // ExtractPakFiles 69 Game.IW := $20; 70 Game.LoadData; 62 71 end; 63 72
Note:
See TracChangeset
for help on using the changeset viewer.