- Changed TLandscape.FOpenRequests to use TBits instead of a boolean array

This commit is contained in:
Andreas Schneider 2009-10-02 18:18:59 +02:00
parent 69a5b97b64
commit f888443ed0
1 changed files with 4 additions and 5 deletions

View File

@ -140,7 +140,7 @@ type
FOnStaticDeleted: TStaticChangedEvent;
FOnStaticElevated: TStaticChangedEvent;
FOnStaticHued: TStaticChangedEvent;
FOpenRequests: array of Boolean;
FOpenRequests: TBits;
{ Methods }
function GetMapBlock(AX, AY: Word): TMapBlock;
function GetMapCell(AX, AY: Word): TMapCell;
@ -505,9 +505,8 @@ begin
FOnStaticHued := nil;
FOnStaticInserted := nil;
SetLength(FOpenRequests, FWidth * FHeight); //TODO : TBits?
for blockID := 0 to Length(FOpenRequests) - 1 do
FOpenRequests[blockID] := False;
FOpenRequests := TBits.Create(FWidth * FHeight);
FOpenRequests.Clearall;
RegisterPacketHandler($04, TPacketHandler.Create(0, @OnBlocksPacket));
RegisterPacketHandler($06, TPacketHandler.Create(8, @OnDrawMapPacket));