- Fixed TNormals to use GLfloat
This commit is contained in:
parent
12a28c79b2
commit
7adf94010a
|
@ -38,8 +38,9 @@ uses
|
||||||
UCacheManager;
|
UCacheManager;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
TGlVector3f = array[0..2] of GLfloat;
|
||||||
PNormals = ^TNormals;
|
PNormals = ^TNormals;
|
||||||
TNormals = array[0..3] of Tvector3_single;
|
TNormals = array[0..3] of TGlVector3f;
|
||||||
PRadarBlock = ^TRadarBlock;
|
PRadarBlock = ^TRadarBlock;
|
||||||
TRadarBlock = array[0..7, 0..7] of Word;
|
TRadarBlock = array[0..7, 0..7] of Word;
|
||||||
|
|
||||||
|
@ -313,6 +314,13 @@ begin
|
||||||
Result := (AX shl 16) or AY;
|
Result := (AX shl 16) or AY;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
operator := (AVector: Tvector3_single) GLVector: TGlVector3f;
|
||||||
|
begin
|
||||||
|
GLVector[0] := AVector.data[0];
|
||||||
|
GLVector[1] := AVector.data[1];
|
||||||
|
GLVector[2] := AVector.data[2];
|
||||||
|
end;
|
||||||
|
|
||||||
{ TLandTextureManager }
|
{ TLandTextureManager }
|
||||||
|
|
||||||
constructor TLandTextureManager.Create;
|
constructor TLandTextureManager.Create;
|
||||||
|
@ -1028,8 +1036,10 @@ begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLandscape.GetNormals(AX, AY: Word; var ANormals: TNormals);
|
procedure TLandscape.GetNormals(AX, AY: Word; var ANormals: TNormals);
|
||||||
|
type
|
||||||
|
_Normals = array[0..3] of Tvector3_single;
|
||||||
var
|
var
|
||||||
cells: array[0..2, 0..2] of TNormals;
|
cells: array[0..2, 0..2] of _Normals;
|
||||||
north, west, south, east: Tvector3_single;
|
north, west, south, east: Tvector3_single;
|
||||||
i, j: Integer;
|
i, j: Integer;
|
||||||
|
|
||||||
|
@ -1038,7 +1048,7 @@ var
|
||||||
Result := AVector / AVector.length;
|
Result := AVector / AVector.length;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function GetPlainNormals(X, Y: SmallInt): TNormals;
|
function GetPlainNormals(X, Y: SmallInt): _Normals;
|
||||||
var
|
var
|
||||||
cell: TMapCell;
|
cell: TMapCell;
|
||||||
north, west, south, east: ShortInt;
|
north, west, south, east: ShortInt;
|
||||||
|
|
Loading…
Reference in New Issue