hedgewars/uLand.pas
changeset 102 c45643d3fd78
parent 89 f9db56409a86
child 107 b08ce0293a51
equal deleted inserted replaced
101:f568cc72ea8c 102:c45643d3fd78
    41      LandSurface: PSDL_Surface;
    41      LandSurface: PSDL_Surface;
    42 
    42 
    43 procedure GenMap;
    43 procedure GenMap;
    44 
    44 
    45 implementation
    45 implementation
    46 uses uConsole, uStore, uMisc, uConsts, uRandom, uTeams, uIO, uLandTemplates, uLandObjects, uSHA;
    46 uses uConsole, uStore, uMisc, uConsts, uRandom, uTeams, uIO, uLandTemplates, uLandObjects;
    47 
    47 
    48 type TPixAr = record
    48 type TPixAr = record
    49               Count: Longword;
    49               Count: Longword;
    50               ar: array[0..Pred(cMaxEdgePoints)] of TPoint;
    50               ar: array[0..Pred(cMaxEdgePoints)] of TPoint;
    51               end;
    51               end;
    52 
    52 
    53 procedure LogLandDigest;
    53 procedure LogLandDigest;
    54 var ctx: TSHA1Context;
    54 //var ctx: TSHA1Context;
    55     dig: TSHA1Digest;
    55 //    dig: TSHA1Digest;
    56 begin
    56 begin
    57 SHA1Init(ctx);
    57 //SHA1Init(ctx);
    58 SHA1Update(ctx, @Land, sizeof(Land));
    58 //SHA1Update(ctx, @Land, sizeof(Land));
    59 dig:= SHA1Final(ctx);
    59 //dig:= SHA1Final(ctx);
    60 {$IFDEF DEBUGFILE}
    60 {$IFDEF DEBUGFILE}
    61 AddFileLog('SHA1 Land digest: {'+inttostr(dig.LongWords[0])+':'
    61 //AddFileLog('SHA1 Land digest: {'+inttostr(dig.LongWords[0])+':'
    62            +inttostr(dig.LongWords[1])+':'+inttostr(dig.LongWords[2])+':'
    62 //           +inttostr(dig.LongWords[1])+':'+inttostr(dig.LongWords[2])+':'
    63            +inttostr(dig.LongWords[3])+':'+inttostr(dig.LongWords[4])+'}');
    63 //           +inttostr(dig.LongWords[3])+':'+inttostr(dig.LongWords[4])+'}');
    64 {$ENDIF}
    64 {$ENDIF}
    65 end;
    65 end;
    66 
    66 
    67 procedure DrawBezierEdge(var pa: TPixAr; Color: Longword);
    67 procedure DrawBezierEdge(var pa: TPixAr; Color: Longword);
    68 var x, y, i: integer;
    68 var x, y, i: integer;