Changeset 590 for trunk/Database.pas
- Timestamp:
- Jul 24, 2024, 10:25:56 PM (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Database.pas
r558 r590 7 7 8 8 uses 9 SysUtils, Protocol, CmdList ;9 SysUtils, Protocol, CmdList, Map; 10 10 11 11 const … … 120 120 function MapGeneratorAvailable: Boolean; 121 121 procedure CreateElevation; 122 procedure CreateMap( preview: Boolean);122 procedure CreateMap(Preview: Boolean); 123 123 procedure InitMapEditor; 124 124 procedure ReleaseMapEditor; … … 970 970 end; 971 971 972 procedure CreateMap( preview: Boolean);972 procedure CreateMap(Preview: Boolean); 973 973 const 974 974 ShHiHills = 6; { of land } … … 1089 1089 1090 1090 var 1091 X, Y, N, Dir, plus, Count, Loc0, Loc1, bLand, bHills, bMountains, V8: Integer;1091 X, Y, N, Dir, Plus, Count, Loc0, Loc1, bLand, bHills, bMountains, V8: Integer; 1092 1092 CopyFrom: array [0 .. lxmax * lymax - 1] of Integer; 1093 1093 Adjacent: TVicinity8Loc; … … 1095 1095 begin 1096 1096 FillChar(RealMap, MapSize * SizeOf(Cardinal), 0); 1097 plus := 0;1097 Plus := 0; 1098 1098 bMountains := 256; 1099 while plus < MapSize * LandMass * ShMountains div 10000 do1099 while Plus < MapSize * LandMass * ShMountains div 10000 do 1100 1100 begin 1101 1101 Dec(bMountains); 1102 Inc( plus, ElCount[bMountains]);1103 end; 1104 Count := plus;1105 plus := 0;1102 Inc(Plus, ElCount[bMountains]); 1103 end; 1104 Count := Plus; 1105 Plus := 0; 1106 1106 bHills := bMountains; 1107 while plus < MapSize * LandMass * ShHiHills div 10000 do1107 while Plus < MapSize * LandMass * ShHiHills div 10000 do 1108 1108 begin 1109 1109 Dec(bHills); 1110 Inc( plus, ElCount[bHills]);1111 end; 1112 Inc(Count, plus);1110 Inc(Plus, ElCount[bHills]); 1111 end; 1112 Inc(Count, Plus); 1113 1113 bLand := bHills; 1114 1114 while Count < MapSize * LandMass div 100 do … … 1144 1144 end; 1145 1145 1146 if not preview then1147 begin 1148 plus := 36 * 56 * 20 * ShTestRiver div (LandMass * 100);1149 if plus > MapSize then1150 plus := MapSize;1146 if not Preview then 1147 begin 1148 Plus := 36 * 56 * 20 * ShTestRiver div (LandMass * 100); 1149 if Plus > MapSize then 1150 Plus := MapSize; 1151 1151 Loc0 := DelphiRandom(MapSize); 1152 for N := 0 to plus - 1 do1152 for N := 0 to Plus - 1 do 1153 1153 begin 1154 1154 if (RealMap[Loc0] and fTerrain >= fGrass) and (Loc0 >= lx) and … … 1267 1267 ($F shl 27); 1268 1268 1269 if not preview then1269 if not Preview then 1270 1270 begin 1271 1271 FindContinents; … … 1941 1941 // cix=-2 - don't search city, don't calculate city benefits, just government of player p 1942 1942 var 1943 p0, Tile, special: Integer;1943 p0, Tile, Special: Integer; 1944 1944 begin 1945 1945 with Info do … … 1971 1971 end; // no city found here 1972 1972 1973 special := Tile and fSpecial and ResourceMask[P] shr 5;1973 Special := Tile and fSpecial and ResourceMask[P] shr 5; 1974 1974 with Terrain[Tile and fTerrain] do 1975 1975 begin 1976 Food := FoodRes[ special];1977 Prod := ProdRes[ special];1978 Trade := TradeRes[ special];1979 if ( special > 0) and (Tile and fTerrain <> fGrass) and1976 Food := FoodRes[Special]; 1977 Prod := ProdRes[Special]; 1978 Trade := TradeRes[Special]; 1979 if (Special > 0) and (Tile and fTerrain <> fGrass) and 1980 1980 (RW[P].NatBuilt[imSpacePort] > 0) then 1981 1981 begin // GeoSat effect
Note:
See TracChangeset
for help on using the changeset viewer.