This commit is contained in:
1 parent
3d5edaa086
commit
27cf50da27
4 files changed
+345
-12
No files matched your search
@@ -802,7 +802,8 @@ begin
|
||||
try
|
||||
decompressionStream.Read(rxxCount, 4);
|
||||
|
||||
gLog.AddTime(RX_INFO[fRT].FileName + ' - %d', [rxxCount]);
|
||||
if gLog <> nil then
|
||||
gLog.AddTime(RX_INFO[fRT].FileName + ' - %d', [rxxCount]);
|
||||
|
||||
if rxxCount = 0 then
|
||||
Exit;
|
||||
@@ -1722,7 +1723,8 @@ var
|
||||
begin
|
||||
Assert(not aLegacyGeneration or (aSprites = nil));
|
||||
|
||||
gLog.AddTime('GenerateTerrainTransitions started. Legacy = ' + BoolToStr(aLegacyGeneration, True));
|
||||
if gLog <> nil then
|
||||
gLog.AddTime('GenerateTerrainTransitions started. Legacy = ' + BoolToStr(aLegacyGeneration, True));
|
||||
|
||||
if aLegacyGeneration then
|
||||
begin
|
||||
@@ -1734,7 +1736,8 @@ begin
|
||||
*Integer(High(TKMTileMaskType))*(Integer(High(TKMTileMaskSubType)) + 1);
|
||||
SetLength(fGenTerrainToTerKindLegacy, genTilesCntTemp);
|
||||
FillChar(fGenTerrainToTerKindLegacy[0], SizeOf(fGenTerrainToTerKindLegacy[0])*GenTilesCntTemp, #0);
|
||||
gLog.AddTime('Legacy: TexId = %d GenTilesCntTemp = %d', [texId, genTilesCntTemp]);
|
||||
if gLog <> nil then
|
||||
gLog.AddTime('Legacy: TexId = %d GenTilesCntTemp = %d', [texId, genTilesCntTemp]);
|
||||
end
|
||||
else
|
||||
begin
|
||||
@@ -1747,7 +1750,8 @@ begin
|
||||
SetLength(fGenTerrainToTerKind, genTilesCnt);
|
||||
aSprites.Allocate(texId + genTilesCnt);
|
||||
FillChar(fGenTerrainToTerKind[0], SizeOf(fGenTerrainToTerKind[0])*GenTilesCnt, #0);
|
||||
gLog.AddTime('TexId = %d GenTilesCnt = %d', [texId, genTilesCnt]);
|
||||
if gLog <> nil then
|
||||
gLog.AddTime('TexId = %d GenTilesCnt = %d', [texId, genTilesCnt]);
|
||||
end;
|
||||
|
||||
generatedMasks := TDictionary<Integer, TKMMaskFullType>.Create;
|
||||
@@ -1858,21 +1862,25 @@ begin
|
||||
if aLegacyGeneration then
|
||||
begin
|
||||
SetLength(fGenTerrainToTerKindLegacy, texId - fGenTexIdStartILegacy);
|
||||
gLog.AddTime('TexId = %d; TexId - fGenTexIdStartILegacy = %d; uniqueTex = %d; totalTex = %d', [texId, texId - fGenTexIdStartILegacy, uniqueTex, totalTex]);
|
||||
if gLog <> nil then
|
||||
gLog.AddTime('TexId = %d; TexId - fGenTexIdStartILegacy = %d; uniqueTex = %d; totalTex = %d', [texId, texId - fGenTexIdStartILegacy, uniqueTex, totalTex]);
|
||||
end
|
||||
else
|
||||
begin
|
||||
// There could be usused place in arrays, as we could use same mask image for different purposes
|
||||
aSprites.Allocate(texId);
|
||||
SetLength(fGenTerrainToTerKind, texId - fGenTexIdStartI);
|
||||
gLog.AddTime('TexId = %d; TexId - fGenTexIdStartI = %d; uniqueTex = %d; totalTex = %d', [texId, texId - fGenTexIdStartI, uniqueTex, totalTex]);
|
||||
if gLog <> nil then
|
||||
gLog.AddTime('TexId = %d; TexId - fGenTexIdStartI = %d; uniqueTex = %d; totalTex = %d', [texId, texId - fGenTexIdStartI, uniqueTex, totalTex]);
|
||||
end;
|
||||
|
||||
finally
|
||||
gLog.AddTime('GeneratedMasks cnt = ' + IntToStr(generatedMasks.Count));
|
||||
if gLog <> nil then
|
||||
gLog.AddTime('GeneratedMasks cnt = ' + IntToStr(generatedMasks.Count));
|
||||
generatedMasks.Free;
|
||||
end;
|
||||
gLog.AddTime('GenerateTerrainTransitions Done');
|
||||
if gLog <> nil then
|
||||
gLog.AddTime('GenerateTerrainTransitions Done');
|
||||
end;
|
||||
|
||||
|
||||
@@ -2031,7 +2039,8 @@ function TKMResSprites.LoadSprites(aRT: TRXType; aAlphaShadows: Boolean): Boolea
|
||||
var
|
||||
alphaReference, normalReference: string;
|
||||
begin
|
||||
gLog.AddTime('Load Sprites started');
|
||||
if gLog <> nil then
|
||||
gLog.AddTime('Load Sprites started');
|
||||
Result := False;
|
||||
if aRT = rxTiles then
|
||||
begin
|
||||
@@ -2072,7 +2081,8 @@ begin
|
||||
// 'Sprites' folder name confused some of the players, cause there is already data/Sprites folder
|
||||
fSprites[aRT].OverloadRXDataFromFolder(ExeDir + 'Modding graphics' + PathDelim, nil);
|
||||
|
||||
gLog.AddTime('Load Sprites Done');
|
||||
if gLog <> nil then
|
||||
gLog.AddTime('Load Sprites Done');
|
||||
|
||||
// Generate terrain transitions
|
||||
if aRT = rxTiles then
|
||||
|
||||
Reference in new issue
Block a user