- Changed TLandscape.FOpenRequests to use TBits instead of a boolean array
This commit is contained in:
parent
69a5b97b64
commit
f888443ed0
|
@ -140,7 +140,7 @@ type
|
||||||
FOnStaticDeleted: TStaticChangedEvent;
|
FOnStaticDeleted: TStaticChangedEvent;
|
||||||
FOnStaticElevated: TStaticChangedEvent;
|
FOnStaticElevated: TStaticChangedEvent;
|
||||||
FOnStaticHued: TStaticChangedEvent;
|
FOnStaticHued: TStaticChangedEvent;
|
||||||
FOpenRequests: array of Boolean;
|
FOpenRequests: TBits;
|
||||||
{ Methods }
|
{ Methods }
|
||||||
function GetMapBlock(AX, AY: Word): TMapBlock;
|
function GetMapBlock(AX, AY: Word): TMapBlock;
|
||||||
function GetMapCell(AX, AY: Word): TMapCell;
|
function GetMapCell(AX, AY: Word): TMapCell;
|
||||||
|
@ -505,9 +505,8 @@ begin
|
||||||
FOnStaticHued := nil;
|
FOnStaticHued := nil;
|
||||||
FOnStaticInserted := nil;
|
FOnStaticInserted := nil;
|
||||||
|
|
||||||
SetLength(FOpenRequests, FWidth * FHeight); //TODO : TBits?
|
FOpenRequests := TBits.Create(FWidth * FHeight);
|
||||||
for blockID := 0 to Length(FOpenRequests) - 1 do
|
FOpenRequests.Clearall;
|
||||||
FOpenRequests[blockID] := False;
|
|
||||||
|
|
||||||
RegisterPacketHandler($04, TPacketHandler.Create(0, @OnBlocksPacket));
|
RegisterPacketHandler($04, TPacketHandler.Create(0, @OnBlocksPacket));
|
||||||
RegisterPacketHandler($06, TPacketHandler.Create(8, @OnDrawMapPacket));
|
RegisterPacketHandler($06, TPacketHandler.Create(8, @OnDrawMapPacket));
|
||||||
|
|
Loading…
Reference in New Issue