Changeset 21 for trunk/UCore.pas


Ignore:
Timestamp:
Sep 27, 2011, 11:01:18 PM (13 years ago)
Author:
george
Message:
  • Moved: Forms to subdirectory.
  • Added: Preliminary multi language support.
  • Added: New game customization form.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UCore.pas

    r19 r21  
    7676  public
    7777    Id: Integer;
     78    Enabled: Boolean;
    7879    Engine: TEngine;
    7980    Position: TPoint;
     
    8283    Name: string;
    8384    Keys: TPlayerKeys;
    84     Tanks: TListObject;
    85     Bullets: TListObject; // TList<TBullet>
     85    Tanks: TListObject; // TListObject<TTank>
     86    Bullets: TListObject; // TListObject<TBullet>
    8687    Energy: Real;
    8788    LastEnergy: Real;
     
    153154    FSystemThread: TSystemThread;
    154155    IntfImage: TLazIntfImage;
     156    ClearBackground: Boolean;
    155157    function GetPlayerCount: Integer;
    156158    procedure SetActive(const AValue: Boolean);
     
    163165    Keyboard: TKeyboard;
    164166    World: TWorld;
    165     Players: TObjectList; // <TPlayer>
     167    Players: TListObject; // TListObject<TPlayer>
    166168    Lock: TCriticalSection;
    167169    constructor Create;
     
    900902    BytePerPixel := RawImage.Description.BitsPerPixel div 8;
    901903    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;
    903908
    904909    if (FBitmap.Width / FBitmapLower.Width) < (FBitmap.Height / FBitmapLower.Height) then
     
    983988    end;
    984989  end;
     990  ClearBackground := True;
    985991  Redraw;
    986992end;
     
    992998  FBitmapLock := TCriticalSection.Create;
    993999  IntfImage := TLazIntfImage.Create(1, 1);
    994   Players := TObjectList.Create;
     1000  Players := TListObject.Create;
    9951001  Keyboard := TKeyboard.Create;
    9961002  World := TWorld.Create;
Note: See TracChangeset for help on using the changeset viewer.