Changeset 19
- Timestamp:
- Sep 27, 2011, 10:16:41 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UCore.pas
r17 r19 7 7 uses 8 8 Dialogs, Classes, SysUtils, Contnrs, Graphics, SpecializedMatrix, SpecializedList, 9 IntfGraphics, FPImage, LCLType, SpecializedBitmap, GraphType, Math, URectangle; 9 IntfGraphics, FPImage, LCLType, SpecializedBitmap, GraphType, Math, URectangle, 10 Syncobjs, UThreading; 10 11 11 12 const … … 126 127 end; 127 128 129 { TSystemThread } 130 131 TSystemThread = class(TListedThread) 132 Engine: TEngine; 133 procedure Execute; override; 134 end; 135 136 { TDrawThread } 137 138 TDrawThread = class(TListedThread) 139 Engine: TEngine; 140 procedure Execute; override; 141 end; 142 128 143 { TEngine } 129 144 130 145 TEngine = class 131 146 private 147 FActive: Boolean; 132 148 FBitmap: TBitmap; 149 FBitmapLock: TCriticalSection; 133 150 FRedrawPending: Boolean; 134 151 FBitmapLower: TBitmapTColor; 152 FDrawThread: TDrawThread; 153 FSystemThread: TSystemThread; 135 154 IntfImage: TLazIntfImage; 136 155 function GetPlayerCount: Integer; 156 procedure SetActive(const AValue: Boolean); 137 157 procedure SetBitmap(const AValue: TBitmap); 138 158 procedure SetPlayerCount(const AValue: Integer); 139 159 procedure Redraw; 140 160 function IsInsideHouses(Pos: TPoint): Boolean; 161 procedure DoDrawToBitmap; 141 162 public 142 163 Keyboard: TKeyboard; 143 164 World: TWorld; 144 165 Players: TObjectList; // <TPlayer> 166 Lock: TCriticalSection; 145 167 constructor Create; 146 168 destructor Destroy; override; … … 148 170 procedure Tick; 149 171 procedure Draw; 172 procedure NewGame; 150 173 property PlayerCount: Integer read GetPlayerCount write SetPlayerCount; 151 174 property Bitmap: TBitmap read FBitmap write SetBitmap; 152 pro cedure NewGame;175 property Active: Boolean read FActive write SetActive; 153 176 end; 154 177 … … 171 194 function SwapBRComponent(Value: Integer): Integer; inline; 172 195 196 173 197 implementation 174 198 … … 179 203 TFastBitmapPixelComponents(Result).R := TFastBitmapPixelComponents(Value).B; 180 204 TFastBitmapPixelComponents(Result).B := TFastBitmapPixelComponents(Value).R; 205 end; 206 207 { TSystemThread } 208 209 procedure TSystemThread.Execute; 210 begin 211 repeat 212 Engine.Tick; 213 Sleep(50); 214 until Terminated; 215 end; 216 217 { TDrawThread } 218 219 procedure TDrawThread.Execute; 220 begin 221 repeat 222 Engine.Draw; 223 Sleep(50); 224 until Terminated; 181 225 end; 182 226 … … 580 624 function TPlayer.ShowTankProc(Item1, Item2: Byte): Byte; 581 625 begin 582 if Item2 > 0 then Result := Item2 else Result := Item1; 626 if Item2 > 0 then Result := Item2 627 else Result := Item1; 583 628 end; 584 629 … … 596 641 with Engine.World do begin 597 642 Surface.Merge(Surface.CreateIndex(Position.X - TTank(Tanks[Direction]).Image.Count.X div 2, 598 Position.Y - TTank(Tanks[Direction]).Image.Count.Y div 2), TTank(Tanks[Direction]).Image, ShowTankProc); 643 Position.Y - TTank(Tanks[Direction]).Image.Count.Y div 2), 644 TTank(Tanks[Direction]).Image, ShowTankProc); 599 645 end; 600 646 end; … … 761 807 end; 762 808 809 procedure TEngine.SetActive(const AValue: Boolean); 810 begin 811 if FActive = AValue then Exit; 812 FActive := AValue; 813 if AValue then begin 814 FDrawThread := TDrawThread.Create(True); 815 FDrawThread.Engine := Self; 816 FDrawThread.FreeOnTerminate := False; 817 FDrawThread.Name := 'Draw'; 818 FDrawThread.Start; 819 FSystemThread := TSystemThread.Create(True); 820 FSystemThread.Engine := Self; 821 FSystemThread.FreeOnTerminate := False; 822 FSystemThread.Name := 'Engine'; 823 FSystemThread.Start; 824 end else begin 825 FreeAndNil(FDrawThread); 826 FreeAndNil(FSystemThread); 827 end; 828 end; 829 763 830 procedure TEngine.SetBitmap(const AValue: TBitmap); 764 831 begin … … 805 872 end; 806 873 807 procedure TEngine.ResizePlayerFrames; 808 var 809 HorizFrameCount: Integer; 810 VertFrameCount: Integer; 811 I: Integer; 812 begin 813 if Assigned(FBitmapLower) then begin 814 if Players.Count > 1 then begin 815 if Players.Count > 2 then VertFrameCount := 2 816 else VertFrameCount := 1; 817 HorizFrameCount := Round(Players.Count / VertFrameCount); 818 end else begin 819 VertFrameCount := 1; 820 HorizFrameCount := 1; 821 end; 822 FBitmapLower.Count := FBitmapLower.CreateIndex(80 * HorizFrameCount, 60 * VertFrameCount); 823 for I := 0 to Players.Count - 1 do begin 824 TPlayer(Players[I]).ScreenFrame.AsTRect := Rect( 825 (I mod HorizFrameCount) * (FBitmapLower.Count.X div HorizFrameCount), 826 (I div HorizFrameCount) * (FBitmapLower.Count.Y div VertFrameCount), 827 ((I mod HorizFrameCount) + 1) * (FBitmapLower.Width div HorizFrameCount), 828 ((I div HorizFrameCount) + 1) * (FBitmapLower.Height div VertFrameCount)); 829 end; 830 end; 831 Redraw; 832 end; 833 834 constructor TEngine.Create; 835 begin 836 FBitmapLower := TBitmapTColor.Create; 837 IntfImage := TLazIntfImage.Create(1, 1); 838 Players := TObjectList.Create; 839 Keyboard := TKeyboard.Create; 840 World := TWorld.Create; 841 World.Engine := Self; 842 Redraw; 843 end; 844 845 destructor TEngine.Destroy; 846 begin 847 FBitmapLower.Free; 848 IntfImage.Free; 849 Players.Free; 850 Keyboard.Free; 851 World.Free; 852 inherited Destroy; 853 end; 854 855 procedure TEngine.Tick; 856 var 857 I: Integer; 858 begin 859 for I := 0 to Players.Count - 1 do begin 860 TPlayer(Players[I]).Control; 861 TPlayer(Players[I]).Tick; 862 end; 863 end; 864 865 procedure TEngine.Draw; 874 procedure TEngine.DoDrawToBitmap; 866 875 var 867 876 I: Integer; … … 885 894 TargetWidth: Integer; 886 895 begin 896 if Assigned(FBitmap) then 897 try 898 Bitmap.BeginUpdate; 899 RawImage := Bitmap.RawImage; 900 BytePerPixel := RawImage.Description.BitsPerPixel div 8; 901 BytePerRow := RawImage.Description.BytesPerLine; 902 FillChar(RawImage.Data^, Bitmap.Height * BytePerRow, 0); 903 904 if (FBitmap.Width / FBitmapLower.Width) < (FBitmap.Height / FBitmapLower.Height) then 905 Ratio := FBitmap.Width / FBitmapLower.Width 906 else Ratio := FBitmap.Height / FBitmapLower.Height; 907 908 // Preserve aspect ratio 909 TargetWidth := Trunc(FBitmapLower.Width * Ratio); 910 TargetHeight := Trunc(FBitmapLower.Height * Ratio); 911 912 Shift.X := Trunc((Bitmap.Width - TargetWidth) / 2); 913 Shift.Y := Trunc((Bitmap.Height - TargetHeight) / 2); 914 915 XDiv := TargetWidth div FBitmapLower.Width; 916 XMod := TargetWidth mod FBitmapLower.Width; 917 YDiv := TargetHeight div FBitmapLower.Height; 918 YMod := TargetHeight mod FBitmapLower.Height; 919 920 PixelRowPtr := PInteger(RawImage.Data + BytePerRow * Shift.Y); 921 YAcc := FBitmapLower.Height div 2; 922 for Y := 0 to FBitmapLower.Height - 1 do begin 923 SubPixelSizeY := YDiv; 924 Inc(YAcc, YMod); 925 if YAcc >= FBitmapLower.Height then begin 926 Dec(YAcc, FBitmapLower.Height); 927 Inc(SubPixelSizeY); 928 end; 929 930 PixelPtr := PixelRowPtr + Shift.X; 931 XAcc := FBitmapLower.Width div 2; 932 for X := 0 to FBitmapLower.Width - 1 do begin 933 SubPixelSizeX := XDiv; 934 Inc(XAcc, XMod); 935 if XAcc >= FBitmapLower.Width then begin 936 Dec(XAcc, FBitmapLower.Width); 937 Inc(SubPixelSizeX); 938 end; 939 940 Color := SwapBRComponent(FBitmapLower.Pixels[X, Y]); 941 942 // Draw large pixel 943 SubPixelRowPtr := PixelPtr; 944 for PixelY := 0 to SubPixelSizeY - 1 do begin 945 SubPixelPtr := SubPixelRowPtr; 946 for PixelX := 0 to SubPixelSizeX - 1 do begin 947 SubPixelPtr^ := Color; 948 Inc(PByte(SubPixelPtr), BytePerPixel); 949 end; 950 Inc(PByte(SubPixelRowPtr), BytePerRow); 951 end; 952 Inc(PByte(PixelPtr), BytePerPixel * SubPixelSizeX); 953 end; 954 Inc(PByte(PixelRowPtr), BytePerRow * SubPixelSizeY); 955 end; 956 finally 957 FBitmap.EndUpdate; 958 end; 959 end; 960 961 procedure TEngine.ResizePlayerFrames; 962 var 963 HorizFrameCount: Integer; 964 VertFrameCount: Integer; 965 I: Integer; 966 begin 967 if Assigned(FBitmapLower) then begin 968 if Players.Count > 1 then begin 969 if Players.Count > 2 then VertFrameCount := 2 970 else VertFrameCount := 1; 971 HorizFrameCount := Round(Players.Count / VertFrameCount); 972 end else begin 973 VertFrameCount := 1; 974 HorizFrameCount := 1; 975 end; 976 FBitmapLower.Count := FBitmapLower.CreateIndex(80 * HorizFrameCount, 60 * VertFrameCount); 977 for I := 0 to Players.Count - 1 do begin 978 TPlayer(Players[I]).ScreenFrame.AsTRect := Rect( 979 (I mod HorizFrameCount) * (FBitmapLower.Count.X div HorizFrameCount), 980 (I div HorizFrameCount) * (FBitmapLower.Count.Y div VertFrameCount), 981 ((I mod HorizFrameCount) + 1) * (FBitmapLower.Width div HorizFrameCount), 982 ((I div HorizFrameCount) + 1) * (FBitmapLower.Height div VertFrameCount)); 983 end; 984 end; 985 Redraw; 986 end; 987 988 constructor TEngine.Create; 989 begin 990 Lock := TCriticalSection.Create; 991 FBitmapLower := TBitmapTColor.Create; 992 FBitmapLock := TCriticalSection.Create; 993 IntfImage := TLazIntfImage.Create(1, 1); 994 Players := TObjectList.Create; 995 Keyboard := TKeyboard.Create; 996 World := TWorld.Create; 997 World.Engine := Self; 998 Redraw; 999 end; 1000 1001 destructor TEngine.Destroy; 1002 begin 1003 Active := False; 1004 FBitmapLower.Free; 1005 FBitmapLock.Free; 1006 IntfImage.Free; 1007 Players.Free; 1008 Keyboard.Free; 1009 World.Free; 1010 Lock.Free; 1011 inherited Destroy; 1012 end; 1013 1014 procedure TEngine.Tick; 1015 var 1016 I: Integer; 1017 begin 1018 try 1019 Lock.Acquire; 1020 for I := 0 to Players.Count - 1 do begin 1021 TPlayer(Players[I]).Control; 1022 TPlayer(Players[I]).Tick; 1023 end; 1024 finally 1025 Lock.Release; 1026 end; 1027 end; 1028 1029 procedure TEngine.Draw; 1030 var 1031 I: Integer; 1032 begin 887 1033 if FRedrawPending then 888 1034 begin 889 1035 FRedrawPending := False; 890 //FBitmapLower.FillAll(0);891 for I := 0 to Players.Count - 1 do begin892 TPlayer(Players[I]).Paint;893 end;894 895 if Assigned(FBitmap) then896 1036 try 897 Bitmap.BeginUpdate; 898 RawImage := Bitmap.RawImage; 899 BytePerPixel := RawImage.Description.BitsPerPixel div 8; 900 BytePerRow := RawImage.Description.BytesPerLine; 901 //FillChar(RawImage.Data^, Bitmap.Height * BytePerRow, 0); 902 903 if (FBitmap.Width / FBitmapLower.Width) < (FBitmap.Height / FBitmapLower.Height) then 904 Ratio := FBitmap.Width / FBitmapLower.Width 905 else Ratio := FBitmap.Height / FBitmapLower.Height; 906 907 // Preserve aspect ratio 908 TargetWidth := Trunc(FBitmapLower.Width * Ratio); 909 TargetHeight := Trunc(FBitmapLower.Height * Ratio); 910 911 Shift.X := Trunc((Bitmap.Width - TargetWidth) / 2); 912 Shift.Y := Trunc((Bitmap.Height - TargetHeight) / 2); 913 914 XDiv := TargetWidth div FBitmapLower.Width; 915 XMod := TargetWidth mod FBitmapLower.Width; 916 YDiv := TargetHeight div FBitmapLower.Height; 917 YMod := TargetHeight mod FBitmapLower.Height; 918 919 PixelRowPtr := PInteger(RawImage.Data + BytePerRow * Shift.Y); 920 YAcc := FBitmapLower.Height div 2; 921 for Y := 0 to FBitmapLower.Height - 1 do begin 922 SubPixelSizeY := YDiv; 923 Inc(YAcc, YMod); 924 if YAcc >= FBitmapLower.Height then begin 925 Dec(YAcc, FBitmapLower.Height); 926 Inc(SubPixelSizeY); 927 end; 928 929 PixelPtr := PixelRowPtr + Shift.X; 930 XAcc := FBitmapLower.Width div 2; 931 for X := 0 to FBitmapLower.Width - 1 do begin 932 SubPixelSizeX := XDiv; 933 Inc(XAcc, XMod); 934 if XAcc >= FBitmapLower.Width then begin 935 Dec(XAcc, FBitmapLower.Width); 936 Inc(SubPixelSizeX); 937 end; 938 939 Color := SwapBRComponent(FBitmapLower.Pixels[X, Y]); 940 941 // Draw large pixel 942 SubPixelRowPtr := PixelPtr; 943 for PixelY := 0 to SubPixelSizeY - 1 do begin 944 SubPixelPtr := SubPixelRowPtr; 945 for PixelX := 0 to SubPixelSizeX - 1 do begin 946 SubPixelPtr^ := Color; 947 Inc(PByte(SubPixelPtr), BytePerPixel); 948 end; 949 Inc(PByte(SubPixelRowPtr), BytePerRow); 950 end; 951 Inc(PByte(PixelPtr), BytePerPixel * SubPixelSizeX); 952 end; 953 Inc(PByte(PixelRowPtr), BytePerRow * SubPixelSizeY); 1037 Lock.Acquire; 1038 //FBitmapLower.FillAll(0); 1039 for I := 0 to Players.Count - 1 do begin 1040 TPlayer(Players[I]).Paint; 954 1041 end; 955 1042 finally 956 FBitmap.EndUpdate; 957 end; 1043 Lock.Release; 1044 end; 1045 Synchronize(DoDrawToBitmap); 958 1046 end; 959 1047 end; -
trunk/UMainForm.lfm
r18 r19 5 5 Width = 514 6 6 Caption = 'Tunneler' 7 ClientHeight = 3 937 ClientHeight = 389 8 8 ClientWidth = 514 9 9 Menu = MainMenu1 … … 18 18 object StatusBar1: TStatusBar 19 19 Left = 0 20 Height = 2021 Top = 37 320 Height = 17 21 Top = 372 22 22 Width = 514 23 23 Panels = < … … 47 47 object Image1: TImage 48 48 Left = 0 49 Height = 37 349 Height = 372 50 50 Top = 0 51 51 Width = 514 -
trunk/UMainForm.pas
r18 r19 80 80 Drawing := True; 81 81 StartTime := NowPrecise; 82 Engine.Draw;82 //Engine.Draw; 83 83 DrawDuration := NowPrecise - StartTime; 84 StatusBar1.Panels[1].Text := IntToStr(TPlayer(Engine.Players[0]).Position.X) + ', ' + 85 IntToStr(TPlayer(Engine.Players[0]).Position.Y) + ' ' + 86 IntToStr(TPlayer(Engine.Players[0]).Direction); 87 StatusBar1.Panels[2].Text := FloatToStr(RoundTo(DrawDuration / OneMillisecond, -2)); 88 StatusBar1.Panels[3].Text := IntToStr(TPlayer(Engine.Players[0]).Bullets.Count); 84 try 85 Engine.Lock.Acquire; 86 StatusBar1.Panels[1].Text := IntToStr(TPlayer(Engine.Players[0]).Position.X) + ', ' + 87 IntToStr(TPlayer(Engine.Players[0]).Position.Y) + ' ' + 88 IntToStr(TPlayer(Engine.Players[0]).Direction); 89 StatusBar1.Panels[2].Text := FloatToStr(RoundTo(DrawDuration / OneMillisecond, -2)); 90 StatusBar1.Panels[3].Text := IntToStr(TPlayer(Engine.Players[0]).Bullets.Count); 91 finally 92 Engine.Lock.Release; 93 end; 89 94 finally 90 95 Drawing := False; … … 94 99 procedure TMainForm.TimerEngineTickTimer(Sender: TObject); 95 100 begin 96 Engine.Tick;101 //Engine.Tick; 97 102 end; 98 103 … … 138 143 end; 139 144 Engine.NewGame; 145 Engine.Active := True; 140 146 Image1Resize(Self); 141 147 end; -
trunk/tunneler.lpi
r18 r19 33 33 <Item1> 34 34 <PackageName Value="LCLBase"/> 35 <MinVersion Major="1" Valid="True" Release="1"/>35 <MinVersion Major="1" Release="1" Valid="True"/> 36 36 </Item1> 37 37 <Item2> … … 42 42 </Item3> 43 43 </RequiredPackages> 44 <Units Count=" 59">44 <Units Count="60"> 45 45 <Unit0> 46 46 <Filename Value="tunneler.lpr"/> … … 50 50 <TopLine Value="1"/> 51 51 <CursorPos X="15" Y="4"/> 52 <UsageCount Value=" 85"/>52 <UsageCount Value="92"/> 53 53 </Unit0> 54 54 <Unit1> … … 58 58 <ResourceBaseClass Value="Form"/> 59 59 <UnitName Value="UMainForm"/> 60 <IsVisibleTab Value="True"/> 61 <EditorIndex Value="5"/> 62 <WindowIndex Value="0"/> 63 <TopLine Value="89"/> 64 <CursorPos X="48" Y="102"/> 65 <UsageCount Value="85"/> 60 <EditorIndex Value="9"/> 61 <WindowIndex Value="0"/> 62 <TopLine Value="75"/> 63 <CursorPos X="28" Y="91"/> 64 <UsageCount Value="92"/> 66 65 <Loaded Value="True"/> 67 66 <LoadedDesigner Value="True"/> … … 71 70 <IsPartOfProject Value="True"/> 72 71 <UnitName Value="UCore"/> 72 <IsVisibleTab Value="True"/> 73 73 <EditorIndex Value="0"/> 74 74 <WindowIndex Value="0"/> 75 <TopLine Value="87 8"/>76 <CursorPos X=" 32" Y="395"/>77 <UsageCount Value=" 85"/>75 <TopLine Value="879"/> 76 <CursorPos X="5" Y="902"/> 77 <UsageCount Value="92"/> 78 78 <Loaded Value="True"/> 79 79 </Unit2> … … 84 84 <TopLine Value="35"/> 85 85 <CursorPos X="20" Y="51"/> 86 <UsageCount Value=" 8"/>86 <UsageCount Value="7"/> 87 87 </Unit3> 88 88 <Unit4> … … 92 92 <TopLine Value="52"/> 93 93 <CursorPos X="18" Y="57"/> 94 <UsageCount Value=" 7"/>94 <UsageCount Value="6"/> 95 95 </Unit4> 96 96 <Unit5> … … 100 100 <TopLine Value="1"/> 101 101 <CursorPos X="61" Y="11"/> 102 <UsageCount Value="2 2"/>102 <UsageCount Value="21"/> 103 103 </Unit5> 104 104 <Unit6> … … 107 107 <TopLine Value="19"/> 108 108 <CursorPos X="4" Y="36"/> 109 <UsageCount Value="1 4"/>109 <UsageCount Value="13"/> 110 110 </Unit6> 111 111 <Unit7> … … 115 115 <TopLine Value="2417"/> 116 116 <CursorPos X="3" Y="2459"/> 117 <UsageCount Value=" 10"/>117 <UsageCount Value="9"/> 118 118 </Unit7> 119 119 <Unit8> … … 122 122 <TopLine Value="548"/> 123 123 <CursorPos X="22" Y="552"/> 124 <UsageCount Value=" 8"/>124 <UsageCount Value="7"/> 125 125 </Unit8> 126 126 <Unit9> … … 129 129 <TopLine Value="34"/> 130 130 <CursorPos X="1" Y="54"/> 131 <UsageCount Value=" 6"/>131 <UsageCount Value="5"/> 132 132 </Unit9> 133 133 <Unit10> … … 137 137 <TopLine Value="1314"/> 138 138 <CursorPos X="42" Y="1327"/> 139 <UsageCount Value=" 10"/>139 <UsageCount Value="9"/> 140 140 </Unit10> 141 141 <Unit11> 142 142 <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericMatrix.inc"/> 143 <WindowIndex Value="0"/> 144 <TopLine Value="152"/> 145 <CursorPos X="1" Y="158"/> 146 <UsageCount Value="34"/> 143 <EditorIndex Value="4"/> 144 <WindowIndex Value="0"/> 145 <TopLine Value="154"/> 146 <CursorPos X="3" Y="156"/> 147 <UsageCount Value="38"/> 148 <Loaded Value="True"/> 147 149 </Unit11> 148 150 <Unit12> … … 152 154 <TopLine Value="16"/> 153 155 <CursorPos X="22" Y="33"/> 154 <UsageCount Value=" 20"/>156 <UsageCount Value="19"/> 155 157 </Unit12> 156 158 <Unit13> … … 159 161 <TopLine Value="16"/> 160 162 <CursorPos X="19" Y="32"/> 161 <UsageCount Value=" 8"/>163 <UsageCount Value="7"/> 162 164 </Unit13> 163 165 <Unit14> … … 167 169 <TopLine Value="54"/> 168 170 <CursorPos X="3" Y="70"/> 169 <UsageCount Value="1 1"/>171 <UsageCount Value="10"/> 170 172 </Unit14> 171 173 <Unit15> … … 174 176 <TopLine Value="10"/> 175 177 <CursorPos X="21" Y="13"/> 176 <UsageCount Value="2 3"/>178 <UsageCount Value="22"/> 177 179 </Unit15> 178 180 <Unit16> … … 181 183 <TopLine Value="783"/> 182 184 <CursorPos X="3" Y="785"/> 183 <UsageCount Value=" 5"/>185 <UsageCount Value="4"/> 184 186 </Unit16> 185 187 <Unit17> … … 188 190 <TopLine Value="498"/> 189 191 <CursorPos X="11" Y="515"/> 190 <UsageCount Value=" 9"/>192 <UsageCount Value="8"/> 191 193 </Unit17> 192 194 <Unit18> … … 196 198 <TopLine Value="665"/> 197 199 <CursorPos X="27" Y="682"/> 198 <UsageCount Value=" 7"/>200 <UsageCount Value="6"/> 199 201 </Unit18> 200 202 <Unit19> … … 203 205 <TopLine Value="112"/> 204 206 <CursorPos X="10" Y="114"/> 205 <UsageCount Value=" 7"/>207 <UsageCount Value="6"/> 206 208 </Unit19> 207 209 <Unit20> … … 211 213 <TopLine Value="1035"/> 212 214 <CursorPos X="15" Y="1052"/> 213 <UsageCount Value=" 6"/>215 <UsageCount Value="5"/> 214 216 </Unit20> 215 217 <Unit21> … … 218 220 <TopLine Value="3003"/> 219 221 <CursorPos X="3" Y="3010"/> 220 <UsageCount Value=" 6"/>222 <UsageCount Value="5"/> 221 223 </Unit21> 222 224 <Unit22> … … 225 227 <TopLine Value="392"/> 226 228 <CursorPos X="1" Y="411"/> 227 <UsageCount Value=" 6"/>229 <UsageCount Value="5"/> 228 230 </Unit22> 229 231 <Unit23> … … 232 234 <TopLine Value="85"/> 233 235 <CursorPos X="10" Y="102"/> 234 <UsageCount Value=" 8"/>236 <UsageCount Value="7"/> 235 237 </Unit23> 236 238 <Unit24> … … 239 241 <TopLine Value="157"/> 240 242 <CursorPos X="3" Y="159"/> 241 <UsageCount Value=" 8"/>243 <UsageCount Value="7"/> 242 244 </Unit24> 243 245 <Unit25> 244 246 <Filename Value="../../../lazarus/lcl/interfaces/gtk2/gtk2winapi.inc"/> 245 247 <WindowIndex Value="0"/> 246 <TopLine Value=" 9107"/>247 <CursorPos X="1 " Y="9124"/>248 <UsageCount Value=" 6"/>248 <TopLine Value="4360"/> 249 <CursorPos X="19" Y="4365"/> 250 <UsageCount Value="13"/> 249 251 </Unit25> 250 252 <Unit26> … … 253 255 <TopLine Value="4226"/> 254 256 <CursorPos X="1" Y="4254"/> 255 <UsageCount Value=" 6"/>257 <UsageCount Value="5"/> 256 258 </Unit26> 257 259 <Unit27> … … 261 263 <ResourceBaseClass Value="Form"/> 262 264 <UnitName Value="UMapForm"/> 263 <EditorIndex Value=" 4"/>265 <EditorIndex Value="8"/> 264 266 <WindowIndex Value="0"/> 265 267 <TopLine Value="6"/> 266 268 <CursorPos X="20" Y="39"/> 267 <UsageCount Value=" 64"/>269 <UsageCount Value="71"/> 268 270 <Loaded Value="True"/> 269 271 </Unit27> … … 273 275 <TopLine Value="858"/> 274 276 <CursorPos X="1" Y="875"/> 275 <UsageCount Value=" 7"/>277 <UsageCount Value="6"/> 276 278 </Unit28> 277 279 <Unit29> … … 280 282 <TopLine Value="2102"/> 281 283 <CursorPos X="1" Y="2119"/> 282 <UsageCount Value=" 7"/>284 <UsageCount Value="6"/> 283 285 </Unit29> 284 286 <Unit30> … … 287 289 <TopLine Value="58"/> 288 290 <CursorPos X="14" Y="75"/> 289 <UsageCount Value="1 6"/>291 <UsageCount Value="15"/> 290 292 </Unit30> 291 293 <Unit31> … … 294 296 <TopLine Value="1"/> 295 297 <CursorPos X="34" Y="12"/> 296 <UsageCount Value="1 2"/>298 <UsageCount Value="11"/> 297 299 </Unit31> 298 300 <Unit32> … … 302 304 <TopLine Value="3131"/> 303 305 <CursorPos X="42" Y="3148"/> 304 <UsageCount Value="1 7"/>306 <UsageCount Value="16"/> 305 307 </Unit32> 306 308 <Unit33> … … 310 312 <TopLine Value="104"/> 311 313 <CursorPos X="3" Y="91"/> 312 <UsageCount Value=" 8"/>314 <UsageCount Value="7"/> 313 315 </Unit33> 314 316 <Unit34> … … 317 319 <TopLine Value="325"/> 318 320 <CursorPos X="3" Y="327"/> 319 <UsageCount Value=" 8"/>321 <UsageCount Value="7"/> 320 322 </Unit34> 321 323 <Unit35> … … 325 327 <TopLine Value="173"/> 326 328 <CursorPos X="5" Y="190"/> 327 <UsageCount Value=" 9"/>329 <UsageCount Value="8"/> 328 330 </Unit35> 329 331 <Unit36> 330 332 <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericBitmap.inc"/> 331 <WindowIndex Value="0"/> 332 <TopLine Value="25"/> 333 <CursorPos X="14" Y="25"/> 334 <UsageCount Value="21"/> 333 <EditorIndex Value="3"/> 334 <WindowIndex Value="0"/> 335 <TopLine Value="1"/> 336 <CursorPos X="20" Y="26"/> 337 <UsageCount Value="25"/> 338 <Loaded Value="True"/> 335 339 </Unit36> 336 340 <Unit37> 337 341 <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Specialized/SpecializedBitmap.pas"/> 338 342 <UnitName Value="SpecializedBitmap"/> 339 <WindowIndex Value="0"/> 340 <TopLine Value="3"/> 341 <CursorPos X="22" Y="20"/> 342 <UsageCount Value="10"/> 343 <EditorIndex Value="2"/> 344 <WindowIndex Value="0"/> 345 <TopLine Value="47"/> 346 <CursorPos X="22" Y="21"/> 347 <UsageCount Value="14"/> 348 <Loaded Value="True"/> 343 349 </Unit37> 344 350 <Unit38> … … 348 354 <TopLine Value="91"/> 349 355 <CursorPos X="19" Y="107"/> 350 <UsageCount Value=" 10"/>356 <UsageCount Value="9"/> 351 357 </Unit38> 352 358 <Unit39> … … 355 361 <TopLine Value="1"/> 356 362 <CursorPos X="1" Y="1"/> 357 <UsageCount Value=" 9"/>363 <UsageCount Value="8"/> 358 364 </Unit39> 359 365 <Unit40> … … 362 368 <TopLine Value="158"/> 363 369 <CursorPos X="23" Y="175"/> 364 <UsageCount Value=" 8"/>370 <UsageCount Value="7"/> 365 371 </Unit40> 366 372 <Unit41> … … 370 376 <TopLine Value="1"/> 371 377 <CursorPos X="9" Y="69"/> 372 <UsageCount Value=" 8"/>378 <UsageCount Value="7"/> 373 379 </Unit41> 374 380 <Unit42> … … 378 384 <TopLine Value="1"/> 379 385 <CursorPos X="1" Y="1"/> 380 <UsageCount Value=" 8"/>386 <UsageCount Value="7"/> 381 387 </Unit42> 382 388 <Unit43> … … 386 392 <TopLine Value="1"/> 387 393 <CursorPos X="14" Y="20"/> 388 <UsageCount Value=" 8"/>394 <UsageCount Value="7"/> 389 395 </Unit43> 390 396 <Unit44> … … 392 398 <IsPartOfProject Value="True"/> 393 399 <UnitName Value="UPlatform"/> 394 <UsageCount Value=" 44"/>400 <UsageCount Value="51"/> 395 401 </Unit44> 396 402 <Unit45> … … 400 406 <TopLine Value="929"/> 401 407 <CursorPos X="5" Y="932"/> 402 <UsageCount Value="1 3"/>408 <UsageCount Value="12"/> 403 409 </Unit45> 404 410 <Unit46> … … 408 414 <TopLine Value="1"/> 409 415 <CursorPos X="50" Y="5"/> 410 <UsageCount Value="1 2"/>416 <UsageCount Value="11"/> 411 417 </Unit46> 412 418 <Unit47> … … 416 422 <TopLine Value="1"/> 417 423 <CursorPos X="36" Y="15"/> 418 <UsageCount Value=" 8"/>424 <UsageCount Value="7"/> 419 425 </Unit47> 420 426 <Unit48> … … 423 429 <TopLine Value="330"/> 424 430 <CursorPos X="35" Y="338"/> 425 <UsageCount Value="1 7"/>431 <UsageCount Value="16"/> 426 432 </Unit48> 427 433 <Unit49> … … 431 437 <TopLine Value="58"/> 432 438 <CursorPos X="5" Y="75"/> 433 <UsageCount Value=" 9"/>439 <UsageCount Value="8"/> 434 440 </Unit49> 435 441 <Unit50> … … 437 443 <IsPartOfProject Value="True"/> 438 444 <UnitName Value="URectangle"/> 439 <EditorIndex Value=" 3"/>445 <EditorIndex Value="7"/> 440 446 <WindowIndex Value="0"/> 441 447 <TopLine Value="120"/> 442 448 <CursorPos X="44" Y="150"/> 443 <UsageCount Value=" 29"/>449 <UsageCount Value="36"/> 444 450 <Loaded Value="True"/> 445 451 </Unit50> … … 449 455 <TopLine Value="147"/> 450 456 <CursorPos X="10" Y="84"/> 451 <UsageCount Value="1 2"/>457 <UsageCount Value="11"/> 452 458 </Unit51> 453 459 <Unit52> … … 457 463 <TopLine Value="520"/> 458 464 <CursorPos X="35" Y="531"/> 459 <UsageCount Value="1 1"/>465 <UsageCount Value="10"/> 460 466 </Unit52> 461 467 <Unit53> … … 463 469 <IsPartOfProject Value="True"/> 464 470 <UnitName Value="UPersistentForm"/> 465 <EditorIndex Value=" 1"/>471 <EditorIndex Value="5"/> 466 472 <WindowIndex Value="0"/> 467 473 <TopLine Value="69"/> 468 474 <CursorPos X="3" Y="90"/> 469 <UsageCount Value="2 2"/>475 <UsageCount Value="29"/> 470 476 <Loaded Value="True"/> 471 477 </Unit53> … … 474 480 <IsPartOfProject Value="True"/> 475 481 <UnitName Value="UApplicationInfo"/> 476 <EditorIndex Value=" 2"/>477 <WindowIndex Value="0"/> 478 <TopLine Value=" 42"/>479 <CursorPos X=" 29" Y="58"/>480 <UsageCount Value="2 2"/>482 <EditorIndex Value="6"/> 483 <WindowIndex Value="0"/> 484 <TopLine Value="1"/> 485 <CursorPos X="70" Y="42"/> 486 <UsageCount Value="29"/> 481 487 <Loaded Value="True"/> 482 488 </Unit54> … … 485 491 <IsPartOfProject Value="True"/> 486 492 <UnitName Value="URegistry"/> 487 <UsageCount Value="2 1"/>493 <UsageCount Value="28"/> 488 494 </Unit55> 489 495 <Unit56> … … 492 498 <TopLine Value="71"/> 493 499 <CursorPos X="10" Y="84"/> 494 <UsageCount Value=" 10"/>500 <UsageCount Value="9"/> 495 501 </Unit56> 496 502 <Unit57> … … 499 505 <TopLine Value="167"/> 500 506 <CursorPos X="3" Y="169"/> 501 <UsageCount Value=" 10"/>507 <UsageCount Value="9"/> 502 508 </Unit57> 503 509 <Unit58> … … 506 512 <TopLine Value="466"/> 507 513 <CursorPos X="17" Y="470"/> 508 <UsageCount Value=" 10"/>514 <UsageCount Value="9"/> 509 515 </Unit58> 516 <Unit59> 517 <Filename Value="Common/UThreading.pas"/> 518 <IsPartOfProject Value="True"/> 519 <UnitName Value="UThreading"/> 520 <EditorIndex Value="1"/> 521 <WindowIndex Value="0"/> 522 <TopLine Value="79"/> 523 <CursorPos X="13" Y="95"/> 524 <UsageCount Value="20"/> 525 <Loaded Value="True"/> 526 </Unit59> 510 527 </Units> 511 <JumpHistory Count=" 16" HistoryIndex="15">528 <JumpHistory Count="30" HistoryIndex="29"> 512 529 <Position1> 513 <Filename Value="U MainForm.pas"/>514 <Caret Line=" 191" Column="29" TopLine="175"/>530 <Filename Value="UCore.pas"/> 531 <Caret Line="970" Column="1" TopLine="946"/> 515 532 </Position1> 516 533 <Position2> 517 <Filename Value="U MainForm.pas"/>518 <Caret Line=" 188" Column="5" TopLine="180"/>534 <Filename Value="UCore.pas"/> 535 <Caret Line="973" Column="1" TopLine="946"/> 519 536 </Position2> 520 537 <Position3> 521 <Filename Value="U MainForm.pas"/>522 <Caret Line=" 191" Column="45" TopLine="181"/>538 <Filename Value="UCore.pas"/> 539 <Caret Line="930" Column="1" TopLine="924"/> 523 540 </Position3> 524 541 <Position4> 525 <Filename Value=" Common/UPersistentForm.pas"/>526 <Caret Line="9 0" Column="3" TopLine="69"/>542 <Filename Value="UCore.pas"/> 543 <Caret Line="931" Column="1" TopLine="924"/> 527 544 </Position4> 528 545 <Position5> 529 <Filename Value="U MainForm.pas"/>530 <Caret Line=" 10" Column="36" TopLine="1"/>546 <Filename Value="UCore.pas"/> 547 <Caret Line="932" Column="1" TopLine="924"/> 531 548 </Position5> 532 549 <Position6> 533 <Filename Value="U MainForm.pas"/>534 <Caret Line="9 9" Column="54" TopLine="86"/>550 <Filename Value="UCore.pas"/> 551 <Caret Line="933" Column="1" TopLine="924"/> 535 552 </Position6> 536 553 <Position7> 537 <Filename Value="U MainForm.pas"/>538 <Caret Line=" 46" Column="30" TopLine="29"/>554 <Filename Value="UCore.pas"/> 555 <Caret Line="934" Column="1" TopLine="924"/> 539 556 </Position7> 540 557 <Position8> 541 <Filename Value="U MainForm.pas"/>542 <Caret Line=" 147" Column="22" TopLine="145"/>558 <Filename Value="UCore.pas"/> 559 <Caret Line="933" Column="1" TopLine="924"/> 543 560 </Position8> 544 561 <Position9> 545 <Filename Value="U MainForm.pas"/>546 <Caret Line=" 246" Column="1" TopLine="229"/>562 <Filename Value="UCore.pas"/> 563 <Caret Line="934" Column="1" TopLine="924"/> 547 564 </Position9> 548 565 <Position10> 549 <Filename Value="U MainForm.pas"/>550 <Caret Line=" 230" Column="63" TopLine="220"/>566 <Filename Value="UCore.pas"/> 567 <Caret Line="933" Column="1" TopLine="924"/> 551 568 </Position10> 552 569 <Position11> 553 570 <Filename Value="UCore.pas"/> 554 <Caret Line=" 895" Column="41" TopLine="882"/>571 <Caret Line="934" Column="1" TopLine="924"/> 555 572 </Position11> 556 573 <Position12> 557 574 <Filename Value="UCore.pas"/> 558 <Caret Line=" 895" Column="39" TopLine="888"/>575 <Caret Line="933" Column="1" TopLine="924"/> 559 576 </Position12> 560 577 <Position13> 561 578 <Filename Value="UCore.pas"/> 562 <Caret Line="9 47" Column="36" TopLine="924"/>579 <Caret Line="934" Column="1" TopLine="924"/> 563 580 </Position13> 564 581 <Position14> 565 582 <Filename Value="UCore.pas"/> 566 <Caret Line=" 895" Column="40" TopLine="876"/>583 <Caret Line="937" Column="1" TopLine="924"/> 567 584 </Position14> 568 585 <Position15> 569 586 <Filename Value="UCore.pas"/> 570 <Caret Line=" 894" Column="24" TopLine="876"/>587 <Caret Line="939" Column="1" TopLine="924"/> 571 588 </Position15> 572 589 <Position16> 573 <Filename Value="U Core.pas"/>574 <Caret Line="1 51" Column="25" TopLine="138"/>590 <Filename Value="UMainForm.pas"/> 591 <Caret Line="123" Column="3" TopLine="121"/> 575 592 </Position16> 593 <Position17> 594 <Filename Value="UCore.pas"/> 595 <Caret Line="161" Column="28" TopLine="153"/> 596 </Position17> 597 <Position18> 598 <Filename Value="UCore.pas"/> 599 <Caret Line="939" Column="1" TopLine="906"/> 600 </Position18> 601 <Position19> 602 <Filename Value="UCore.pas"/> 603 <Caret Line="895" Column="1" TopLine="874"/> 604 </Position19> 605 <Position20> 606 <Filename Value="UCore.pas"/> 607 <Caret Line="175" Column="57" TopLine="151"/> 608 </Position20> 609 <Position21> 610 <Filename Value="UCore.pas"/> 611 <Caret Line="823" Column="39" TopLine="811"/> 612 </Position21> 613 <Position22> 614 <Filename Value="UCore.pas"/> 615 <Caret Line="1047" Column="11" TopLine="1030"/> 616 </Position22> 617 <Position23> 618 <Filename Value="UCore.pas"/> 619 <Caret Line="161" Column="17" TopLine="154"/> 620 </Position23> 621 <Position24> 622 <Filename Value="UCore.pas"/> 623 <Caret Line="876" Column="21" TopLine="876"/> 624 </Position24> 625 <Position25> 626 <Filename Value="Common/UThreading.pas"/> 627 <Caret Line="338" Column="1" TopLine="321"/> 628 </Position25> 629 <Position26> 630 <Filename Value="UCore.pas"/> 631 <Caret Line="223" Column="42" TopLine="205"/> 632 </Position26> 633 <Position27> 634 <Filename Value="Common/UThreading.pas"/> 635 <Caret Line="338" Column="10" TopLine="321"/> 636 </Position27> 637 <Position28> 638 <Filename Value="Common/UThreading.pas"/> 639 <Caret Line="337" Column="3" TopLine="330"/> 640 </Position28> 641 <Position29> 642 <Filename Value="UCore.pas"/> 643 <Caret Line="175" Column="53" TopLine="150"/> 644 </Position29> 645 <Position30> 646 <Filename Value="UCore.pas"/> 647 <Caret Line="221" Column="3" TopLine="189"/> 648 </Position30> 576 649 </JumpHistory> 577 650 </ProjectOptions> … … 598 671 </CompilerOptions> 599 672 <Debugging> 673 <BreakPoints Count="1"> 674 <Item1> 675 <Kind Value="bpkSource"/> 676 <Source Value="UCore.pas"/> 677 <Line Value="825"/> 678 </Item1> 679 </BreakPoints> 600 680 <Exceptions Count="3"> 601 681 <Item1> -
trunk/tunneler.lpr
r18 r19 4 4 5 5 uses 6 {$DEFINE UseCThreads} 6 7 {$IFDEF UNIX}{$IFDEF UseCThreads} 7 8 cthreads, … … 9 10 Interfaces, // this includes the LCL widgetset 10 11 Forms, UMainForm, UCore, TemplateGenerics, UMapForm, UPlatform, 11 UApplicationInfo, URectangle, UPersistentForm, URegistry 12 UApplicationInfo, URectangle, UPersistentForm, URegistry, UThreading 12 13 { you can add units after this }; 13 14
Note:
See TracChangeset
for help on using the changeset viewer.