Changeset 21 for trunk/UCore.pas
- Timestamp:
- Sep 27, 2011, 11:01:18 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UCore.pas
r19 r21 76 76 public 77 77 Id: Integer; 78 Enabled: Boolean; 78 79 Engine: TEngine; 79 80 Position: TPoint; … … 82 83 Name: string; 83 84 Keys: TPlayerKeys; 84 Tanks: TListObject; 85 Bullets: TListObject; // TList <TBullet>85 Tanks: TListObject; // TListObject<TTank> 86 Bullets: TListObject; // TListObject<TBullet> 86 87 Energy: Real; 87 88 LastEnergy: Real; … … 153 154 FSystemThread: TSystemThread; 154 155 IntfImage: TLazIntfImage; 156 ClearBackground: Boolean; 155 157 function GetPlayerCount: Integer; 156 158 procedure SetActive(const AValue: Boolean); … … 163 165 Keyboard: TKeyboard; 164 166 World: TWorld; 165 Players: T ObjectList; //<TPlayer>167 Players: TListObject; // TListObject<TPlayer> 166 168 Lock: TCriticalSection; 167 169 constructor Create; … … 900 902 BytePerPixel := RawImage.Description.BitsPerPixel div 8; 901 903 BytePerRow := RawImage.Description.BytesPerLine; 902 FillChar(RawImage.Data^, Bitmap.Height * BytePerRow, 0); 904 if ClearBackground then begin 905 FillChar(RawImage.Data^, Bitmap.Height * BytePerRow, 0); 906 ClearBackground := False; 907 end; 903 908 904 909 if (FBitmap.Width / FBitmapLower.Width) < (FBitmap.Height / FBitmapLower.Height) then … … 983 988 end; 984 989 end; 990 ClearBackground := True; 985 991 Redraw; 986 992 end; … … 992 998 FBitmapLock := TCriticalSection.Create; 993 999 IntfImage := TLazIntfImage.Create(1, 1); 994 Players := T ObjectList.Create;1000 Players := TListObject.Create; 995 1001 Keyboard := TKeyboard.Create; 996 1002 World := TWorld.Create;
Note:
See TracChangeset
for help on using the changeset viewer.