- Fixed some range violations
This commit is contained in:
parent
bfe71ae93f
commit
086e6dbb7b
|
@ -444,6 +444,9 @@
|
||||||
</SyntaxOptions>
|
</SyntaxOptions>
|
||||||
</Parsing>
|
</Parsing>
|
||||||
<CodeGeneration>
|
<CodeGeneration>
|
||||||
|
<Checks>
|
||||||
|
<RangeChecks Value="True"/>
|
||||||
|
</Checks>
|
||||||
<Optimizations>
|
<Optimizations>
|
||||||
<OptimizationLevel Value="0"/>
|
<OptimizationLevel Value="0"/>
|
||||||
</Optimizations>
|
</Optimizations>
|
||||||
|
|
|
@ -188,8 +188,8 @@ type
|
||||||
FMaxStaticID: Cardinal;
|
FMaxStaticID: Cardinal;
|
||||||
{ Methods }
|
{ Methods }
|
||||||
function GetMapBlock(AX, AY: Word): TMapBlock;
|
function GetMapBlock(AX, AY: Word): TMapBlock;
|
||||||
function GetMapCell(AX, AY: Word): TMapCell;
|
function GetMapCell(AX, AY: Integer): TMapCell;
|
||||||
function GetNormals(AX, AY: Word): TNormals;
|
function GetNormals(AX, AY: Integer): TNormals;
|
||||||
function GetStaticBlock(AX, AY: Word): TSeperatedStaticBlock;
|
function GetStaticBlock(AX, AY: Word): TSeperatedStaticBlock;
|
||||||
function GetStaticList(AX, AY: Word): TStaticItemList;
|
function GetStaticList(AX, AY: Word): TStaticItemList;
|
||||||
{ Events }
|
{ Events }
|
||||||
|
@ -207,9 +207,9 @@ type
|
||||||
property Height: Word read FHeight;
|
property Height: Word read FHeight;
|
||||||
property CellWidth: Word read FCellWidth;
|
property CellWidth: Word read FCellWidth;
|
||||||
property CellHeight: Word read FCellHeight;
|
property CellHeight: Word read FCellHeight;
|
||||||
property MapCell[X, Y: Word]: TMapCell read GetMapCell;
|
property MapCell[X, Y: Integer]: TMapCell read GetMapCell;
|
||||||
property StaticList[X, Y: Word]: TStaticItemList read GetStaticList;
|
property StaticList[X, Y: Word]: TStaticItemList read GetStaticList;
|
||||||
property Normals[X, Y: Word]: TNormals read GetNormals;
|
property Normals[X, Y: Integer]: TNormals read GetNormals;
|
||||||
property MaxStaticID: Cardinal read FMaxStaticID;
|
property MaxStaticID: Cardinal read FMaxStaticID;
|
||||||
property OnChange: TLandscapeChangeEvent read FOnChange write FOnChange;
|
property OnChange: TLandscapeChangeEvent read FOnChange write FOnChange;
|
||||||
property OnMapChanged: TMapChangedEvent read FOnMapChanged write FOnMapChanged;
|
property OnMapChanged: TMapChangedEvent read FOnMapChanged write FOnMapChanged;
|
||||||
|
@ -661,7 +661,7 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TLandscape.GetMapCell(AX, AY: Word): TMapCell;
|
function TLandscape.GetMapCell(AX, AY: Integer): TMapCell;
|
||||||
var
|
var
|
||||||
block: TMapBlock;
|
block: TMapBlock;
|
||||||
begin
|
begin
|
||||||
|
@ -674,7 +674,7 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TLandscape.GetNormals(AX, AY: Word): TNormals;
|
function TLandscape.GetNormals(AX, AY: Integer): TNormals;
|
||||||
begin
|
begin
|
||||||
GetNormals(AX, AY, Result);
|
GetNormals(AX, AY, Result);
|
||||||
end;
|
end;
|
||||||
|
|
|
@ -60,7 +60,7 @@ implementation
|
||||||
|
|
||||||
type
|
type
|
||||||
PWordArray = ^TWordArray;
|
PWordArray = ^TWordArray;
|
||||||
TWordArray = array[0..16383] of Word;
|
TWordArray = array[0..(MaxInt div SizeOf(Word) - 1)] of Word;
|
||||||
|
|
||||||
constructor TArt.Create(AData: TStream; AIndex: TGenericIndex; AArtType: TArtType);
|
constructor TArt.Create(AData: TStream; AIndex: TGenericIndex; AArtType: TArtType);
|
||||||
begin
|
begin
|
||||||
|
|
Loading…
Reference in New Issue