Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: Common/BGRABitmap/bgrafilters.pas
- ===================================================================
- --- Common/BGRABitmap/bgrafilters.pas (revision 6392)
- +++ Common/BGRABitmap/bgrafilters.pas (working copy)
- @@ -93,7 +93,7 @@
- end;
- var
- - xb, yb: integer;
- + xb, yb: longint;
- diag1, diag2, h1, h2, v1, v2: TSmartDiff;
- c: TBGRAPixel;
- temp, median: TBGRACustomBitmap;
- @@ -203,10 +203,10 @@
- //same color?
- if diag1.cd < 0.3 then
- begin
- - c := MergeBGRA(bmp.GetPixel(xb, yb), bmp.GetPixel(xb + 1, yb + 1));
- + c := MergeBGRA(bmp.GetPixel(longint(xb), longint(yb)), bmp.GetPixel(longint(xb + 1), longint(yb + 1)));
- //restore
- Result.SetPixel(xb * 3 + 2, yb * 3 + 2, bmp.GetPixel(xb, yb));
- - Result.SetPixel(xb * 3 + 3, yb * 3 + 3, bmp.GetPixel(xb + 1, yb + 1));
- + Result.SetPixel(xb * 3 + 3, yb * 3 + 3, bmp.GetPixel(longint(xb + 1), longint(yb + 1)));
- if (diag1.sd < h1.sd) and (diag1.sd < v2.sd) then
- Result.SetPixel(xb * 3 + 3, yb * 3 + 2, c);
- @@ -245,8 +245,8 @@
- const
- nbpix = 8;
- var
- - yb, xb: integer;
- - dx, dy, n, j: integer;
- + yb, xb: longint;
- + dx, dy, n, j: longint;
- a_pixels: array[0..nbpix - 1] of TBGRAPixel;
- sumR, sumG, sumB, sumA, RGBdiv, nbA: cardinal;
- tempPixel, refPixel: TBGRAPixel;
- @@ -276,7 +276,7 @@
- for dx := -1 to 1 do
- if (dx <> 0) or (dy <> 0) then
- begin
- - a_pixels[n] := bmp.GetPixel(xb + dx, yb + dy);
- + a_pixels[n] := bmp.GetPixel(longint(xb + dx), longint(yb + dy));
- Inc(n);
- end;
- @@ -644,10 +644,10 @@
- for xb := bounds.Left to bounds.Right - 1 do
- begin
- c[0] := bmp.getPixel(xb, yb);
- - c[1] := bmp.getPixel(xb + idx1, yb + idy1);
- - c[2] := bmp.getPixel(xb + idx2, yb + idy2);
- - c[3] := bmp.getPixel(xb + idx3, yb + idy3);
- - c[4] := bmp.getPixel(xb + idx4, yb + idy4);
- + c[1] := bmp.getPixel(longint(xb + idx1), longint(yb + idy1));
- + c[2] := bmp.getPixel(longint(xb + idx2), longint(yb + idy2));
- + c[3] := bmp.getPixel(longint(xb + idx3), longint(yb + idy3));
- + c[4] := bmp.getPixel(longint(xb + idx4), longint(yb + idy4));
- sumR := 0;
- sumG := 0;
- @@ -1392,7 +1392,7 @@
- for dy := -1 to 1 do
- for dx := -1 to 1 do
- begin
- - a_pixels[n] := bmp.GetPixel(xb + dx, yb + dy);
- + a_pixels[n] := bmp.GetPixel(longint(xb + dx), longint(yb + dy));
- if a_pixels[n].alpha = 0 then
- a_pixels[n] := BGRAPixelTransparent;
- Inc(n);
- Index: Common/KromUtils.pas
- ===================================================================
- --- Common/KromUtils.pas (revision 6392)
- +++ Common/KromUtils.pas (working copy)
- @@ -519,19 +519,24 @@
- function Adler32CRC(S: TMemoryStream): Cardinal;
- var
- - i, A, B: Cardinal;
- + i, A, B, OP: Cardinal;
- + buf: byte;
- begin
- A := 1;
- B := 0; // A is initialized to 1, B to 0
- -
- + // remember original position
- + OP := S.Position;
- + S.Position := 0;
- // We need to MOD B within cos it may overflow in files larger than 65kb, A overflows with files larger than 16mb
- if S.Size <> 0 then
- for i := 0 to S.Size - 1 do
- begin
- - inc(A, pbyte(Cardinal(S.Memory) + i)^);
- + S.Read(buf, SizeOf(byte)); // increases position
- + inc(A, buf);
- B := (B + A) mod 65521; // 65521 (the largest prime number smaller than 2^16)
- end;
- A := A mod 65521;
- + S.Position := OP;
- Result := B + A shl 16; // reverse order for smaller numbers
- end;
- Index: Utils/RXXPacker/RXXPacker.dpr
- ===================================================================
- --- Utils/RXXPacker/RXXPacker.dpr (revision 6392)
- +++ Utils/RXXPacker/RXXPacker.dpr (working copy)
- @@ -1,7 +1,7 @@
- program RXXPacker;
- {$I ..\..\KaM_Remake.inc}
- uses
- - Forms,
- + Forms, lazopenglcontext,
- {$IFDEF FPC}Interfaces,{$ENDIF}
- RXXPackerForm in 'RXXPackerForm.pas' {RXXForm1},
- KM_PNG in '..\..\src\KM_PNG.pas',
- Index: Utils/RXXPacker/RXXPacker.lpi
- ===================================================================
- --- Utils/RXXPacker/RXXPacker.lpi (revision 6392)
- +++ Utils/RXXPacker/RXXPacker.lpi (working copy)
- @@ -29,22 +29,23 @@
- <FormatVersion Value="1"/>
- </local>
- </RunParams>
- - <RequiredPackages Count="1">
- + <RequiredPackages Count="2">
- <Item1>
- + <PackageName Value="LazOpenGLContext"/>
- + </Item1>
- + <Item2>
- <PackageName Value="LCL"/>
- - </Item1>
- + </Item2>
- </RequiredPackages>
- - <Units Count="13">
- + <Units Count="18">
- <Unit0>
- <Filename Value="RXXPacker.dpr"/>
- <IsPartOfProject Value="True"/>
- <UnitName Value="RXXPacker"/>
- - <EditorIndex Value="6"/>
- <WindowIndex Value="0"/>
- <TopLine Value="1"/>
- <CursorPos X="46" Y="16"/>
- - <UsageCount Value="31"/>
- - <Loaded Value="True"/>
- + <UsageCount Value="33"/>
- <DefaultSyntaxHighlighter Value="Delphi"/>
- </Unit0>
- <Unit1>
- @@ -54,13 +55,10 @@
- <HasResources Value="True"/>
- <ResourceBaseClass Value="Form"/>
- <UnitName Value="RXXPackerForm"/>
- - <EditorIndex Value="0"/>
- <WindowIndex Value="0"/>
- - <TopLine Value="1"/>
- - <CursorPos X="48" Y="13"/>
- - <UsageCount Value="31"/>
- - <Loaded Value="True"/>
- - <LoadedDesigner Value="True"/>
- + <TopLine Value="115"/>
- + <CursorPos X="29" Y="189"/>
- + <UsageCount Value="33"/>
- <DefaultSyntaxHighlighter Value="Delphi"/>
- </Unit1>
- <Unit2>
- @@ -75,13 +73,10 @@
- <Unit3>
- <Filename Value="..\..\KM_ResourceSprites.pas"/>
- <UnitName Value="KM_ResourceSprites"/>
- - <IsVisibleTab Value="True"/>
- - <EditorIndex Value="7"/>
- <WindowIndex Value="0"/>
- <TopLine Value="401"/>
- <CursorPos X="110" Y="430"/>
- <UsageCount Value="15"/>
- - <Loaded Value="True"/>
- <DefaultSyntaxHighlighter Value="Delphi"/>
- </Unit3>
- <Unit4>
- @@ -104,12 +99,10 @@
- <Unit6>
- <Filename Value="..\..\Common\pngimage\zlibpas.pas"/>
- <UnitName Value="zlibpas"/>
- - <EditorIndex Value="5"/>
- <WindowIndex Value="0"/>
- <TopLine Value="24"/>
- <CursorPos X="38" Y="39"/>
- <UsageCount Value="15"/>
- - <Loaded Value="True"/>
- <DefaultSyntaxHighlighter Value="Delphi"/>
- </Unit6>
- <Unit7>
- @@ -124,45 +117,37 @@
- <Unit8>
- <Filename Value="..\..\KM_ResourceSpritesEdit.pas"/>
- <UnitName Value="KM_ResourceSpritesEdit"/>
- - <EditorIndex Value="3"/>
- <WindowIndex Value="0"/>
- <TopLine Value="400"/>
- <CursorPos X="64" Y="421"/>
- <UsageCount Value="15"/>
- - <Loaded Value="True"/>
- <DefaultSyntaxHighlighter Value="Delphi"/>
- </Unit8>
- <Unit9>
- <Filename Value="..\..\Common\KM_PNG.pas"/>
- <UnitName Value="KM_PNG"/>
- - <EditorIndex Value="1"/>
- <WindowIndex Value="0"/>
- <TopLine Value="1"/>
- <CursorPos X="43" Y="7"/>
- <UsageCount Value="15"/>
- - <Loaded Value="True"/>
- <DefaultSyntaxHighlighter Value="Delphi"/>
- </Unit9>
- <Unit10>
- <Filename Value="..\..\Common\BGRABitmap\bgradefaultbitmap.pas"/>
- <UnitName Value="BGRADefaultBitmap"/>
- - <EditorIndex Value="2"/>
- <WindowIndex Value="0"/>
- - <TopLine Value="22"/>
- + <TopLine Value="1"/>
- <CursorPos X="1" Y="1"/>
- <UsageCount Value="15"/>
- - <Loaded Value="True"/>
- <DefaultSyntaxHighlighter Value="Delphi"/>
- </Unit10>
- <Unit11>
- <Filename Value="..\..\Common\BGRABitmap\bgrabitmaptypes.pas"/>
- <UnitName Value="BGRABitmapTypes"/>
- - <EditorIndex Value="4"/>
- <WindowIndex Value="0"/>
- - <TopLine Value="106"/>
- - <CursorPos X="3" Y="39"/>
- + <TopLine Value="228"/>
- + <CursorPos X="15" Y="238"/>
- <UsageCount Value="12"/>
- - <Loaded Value="True"/>
- <DefaultSyntaxHighlighter Value="Delphi"/>
- </Unit11>
- <Unit12>
- @@ -174,127 +159,176 @@
- <UsageCount Value="10"/>
- <DefaultSyntaxHighlighter Value="Delphi"/>
- </Unit12>
- + <Unit13>
- + <Filename Value="..\..\Common\BGRABitmap\bgrafilters.pas"/>
- + <UnitName Value="BGRAFilters"/>
- + <WindowIndex Value="0"/>
- + <TopLine Value="1385"/>
- + <CursorPos X="74" Y="1395"/>
- + <UsageCount Value="10"/>
- + <DefaultSyntaxHighlighter Value="Delphi"/>
- + </Unit13>
- + <Unit14>
- + <Filename Value="..\..\..\..\..\usr\share\fpcsrc\packages\fcl-image\src\fpimage.pp"/>
- + <UnitName Value="FPimage"/>
- + <WindowIndex Value="0"/>
- + <TopLine Value="90"/>
- + <CursorPos X="16" Y="112"/>
- + <UsageCount Value="10"/>
- + </Unit14>
- + <Unit15>
- + <Filename Value="..\..\src\KM_Render.pas"/>
- + <UnitName Value="KM_Render"/>
- + <WindowIndex Value="0"/>
- + <TopLine Value="1"/>
- + <CursorPos X="35" Y="6"/>
- + <UsageCount Value="10"/>
- + <DefaultSyntaxHighlighter Value="Delphi"/>
- + </Unit15>
- + <Unit16>
- + <Filename Value="..\..\Common\KromUtils.pas"/>
- + <UnitName Value="KromUtils"/>
- + <IsVisibleTab Value="True"/>
- + <EditorIndex Value="0"/>
- + <WindowIndex Value="0"/>
- + <TopLine Value="519"/>
- + <CursorPos X="1" Y="536"/>
- + <UsageCount Value="11"/>
- + <Loaded Value="True"/>
- + <DefaultSyntaxHighlighter Value="Delphi"/>
- + </Unit16>
- + <Unit17>
- + <Filename Value="..\..\src\res\KM_ResHouses.pas"/>
- + <UnitName Value="KM_ResHouses"/>
- + <EditorIndex Value="1"/>
- + <WindowIndex Value="0"/>
- + <TopLine Value="778"/>
- + <CursorPos X="27" Y="798"/>
- + <UsageCount Value="11"/>
- + <Loaded Value="True"/>
- + <DefaultSyntaxHighlighter Value="Delphi"/>
- + </Unit17>
- </Units>
- <JumpHistory Count="30" HistoryIndex="29">
- <Position1>
- - <Filename Value="..\..\Common\BGRABitmap\bgradefaultbitmap.pas"/>
- - <Caret Line="631" Column="20" TopLine="596"/>
- + <Filename Value="..\..\Common\KromUtils.pas"/>
- + <Caret Line="529" Column="1" TopLine="516"/>
- </Position1>
- <Position2>
- - <Filename Value="..\..\Common\BGRABitmap\bgradefaultbitmap.pas"/>
- - <Caret Line="633" Column="22" TopLine="598"/>
- + <Filename Value="..\..\Common\KromUtils.pas"/>
- + <Caret Line="539" Column="20" TopLine="519"/>
- </Position2>
- <Position3>
- - <Filename Value="..\..\Common\BGRABitmap\bgradefaultbitmap.pas"/>
- - <Caret Line="3621" Column="49" TopLine="3586"/>
- + <Filename Value="..\..\Common\KromUtils.pas"/>
- + <Caret Line="525" Column="1" TopLine="519"/>
- </Position3>
- <Position4>
- - <Filename Value="..\..\Common\BGRABitmap\bgradefaultbitmap.pas"/>
- - <Caret Line="1" Column="1" TopLine="1"/>
- + <Filename Value="..\..\Common\KromUtils.pas"/>
- + <Caret Line="526" Column="1" TopLine="519"/>
- </Position4>
- <Position5>
- - <Filename Value="..\..\KM_ResourceSprites.pas"/>
- - <Caret Line="389" Column="21" TopLine="368"/>
- + <Filename Value="..\..\Common\KromUtils.pas"/>
- + <Caret Line="528" Column="1" TopLine="519"/>
- </Position5>
- <Position6>
- - <Filename Value="..\..\KM_ResourceSprites.pas"/>
- - <Caret Line="388" Column="29" TopLine="368"/>
- + <Filename Value="..\..\Common\KromUtils.pas"/>
- + <Caret Line="529" Column="1" TopLine="519"/>
- </Position6>
- <Position7>
- - <Filename Value="..\..\Common\KM_PNG.pas"/>
- - <Caret Line="1" Column="1" TopLine="1"/>
- + <Filename Value="..\..\Common\KromUtils.pas"/>
- + <Caret Line="531" Column="1" TopLine="519"/>
- </Position7>
- <Position8>
- - <Filename Value="..\..\Common\KM_PNG.pas"/>
- - <Caret Line="41" Column="10" TopLine="20"/>
- + <Filename Value="..\..\Common\KromUtils.pas"/>
- + <Caret Line="532" Column="1" TopLine="519"/>
- </Position8>
- <Position9>
- - <Filename Value="..\..\Common\KM_PNG.pas"/>
- - <Caret Line="1" Column="1" TopLine="1"/>
- + <Filename Value="..\..\Common\KromUtils.pas"/>
- + <Caret Line="534" Column="1" TopLine="519"/>
- </Position9>
- <Position10>
- - <Filename Value="..\..\Common\KM_PNG.pas"/>
- - <Caret Line="54" Column="7" TopLine="20"/>
- + <Filename Value="..\..\Common\KromUtils.pas"/>
- + <Caret Line="535" Column="1" TopLine="519"/>
- </Position10>
- <Position11>
- - <Filename Value="..\..\Common\KM_PNG.pas"/>
- - <Caret Line="41" Column="26" TopLine="14"/>
- + <Filename Value="..\..\Common\KromUtils.pas"/>
- + <Caret Line="536" Column="1" TopLine="519"/>
- </Position11>
- <Position12>
- - <Filename Value="..\..\Common\KM_PNG.pas"/>
- - <Caret Line="40" Column="53" TopLine="20"/>
- + <Filename Value="..\..\Common\KromUtils.pas"/>
- + <Caret Line="532" Column="1" TopLine="519"/>
- </Position12>
- <Position13>
- - <Filename Value="..\..\Common\KM_PNG.pas"/>
- - <Caret Line="39" Column="27" TopLine="20"/>
- + <Filename Value="..\..\Common\KromUtils.pas"/>
- + <Caret Line="534" Column="1" TopLine="519"/>
- </Position13>
- <Position14>
- - <Filename Value="..\..\Common\BGRABitmap\bgradefaultbitmap.pas"/>
- - <Caret Line="1" Column="1" TopLine="22"/>
- + <Filename Value="..\..\Common\KromUtils.pas"/>
- + <Caret Line="535" Column="1" TopLine="519"/>
- </Position14>
- <Position15>
- - <Filename Value="..\..\Common\BGRABitmap\bgrabitmaptypes.pas"/>
- - <Caret Line="1" Column="1" TopLine="10"/>
- + <Filename Value="..\..\Common\KromUtils.pas"/>
- + <Caret Line="536" Column="1" TopLine="519"/>
- </Position15>
- <Position16>
- - <Filename Value="..\..\Common\KM_PNG.pas"/>
- - <Caret Line="39" Column="27" TopLine="20"/>
- + <Filename Value="..\..\Common\KromUtils.pas"/>
- + <Caret Line="532" Column="1" TopLine="519"/>
- </Position16>
- <Position17>
- - <Filename Value="..\..\Common\KM_PNG.pas"/>
- - <Caret Line="41" Column="30" TopLine="20"/>
- + <Filename Value="..\..\Common\KromUtils.pas"/>
- + <Caret Line="534" Column="1" TopLine="519"/>
- </Position17>
- <Position18>
- - <Filename Value="..\..\Common\KM_PNG.pas"/>
- - <Caret Line="1" Column="1" TopLine="1"/>
- + <Filename Value="..\..\Common\KromUtils.pas"/>
- + <Caret Line="535" Column="1" TopLine="519"/>
- </Position18>
- <Position19>
- - <Filename Value="..\..\Common\KM_PNG.pas"/>
- - <Caret Line="41" Column="56" TopLine="20"/>
- + <Filename Value="..\..\Common\KromUtils.pas"/>
- + <Caret Line="536" Column="1" TopLine="519"/>
- </Position19>
- <Position20>
- - <Filename Value="..\..\Common\KM_PNG.pas"/>
- - <Caret Line="104" Column="36" TopLine="77"/>
- + <Filename Value="..\..\Common\KromUtils.pas"/>
- + <Caret Line="532" Column="1" TopLine="519"/>
- </Position20>
- <Position21>
- - <Filename Value="..\..\Common\KM_PNG.pas"/>
- - <Caret Line="43" Column="66" TopLine="20"/>
- + <Filename Value="..\..\Common\KromUtils.pas"/>
- + <Caret Line="534" Column="1" TopLine="519"/>
- </Position21>
- <Position22>
- - <Filename Value="..\..\KM_ResourceSpritesEdit.pas"/>
- - <Caret Line="28" Column="80" TopLine="25"/>
- + <Filename Value="..\..\Common\KromUtils.pas"/>
- + <Caret Line="535" Column="1" TopLine="519"/>
- </Position22>
- <Position23>
- - <Filename Value="..\..\KM_ResourceSpritesEdit.pas"/>
- - <Caret Line="5" Column="1" TopLine="1"/>
- + <Filename Value="..\..\Common\KromUtils.pas"/>
- + <Caret Line="536" Column="1" TopLine="519"/>
- </Position23>
- <Position24>
- - <Filename Value="..\..\KM_ResourceSprites.pas"/>
- - <Caret Line="447" Column="72" TopLine="415"/>
- + <Filename Value="..\..\Common\KromUtils.pas"/>
- + <Caret Line="532" Column="1" TopLine="519"/>
- </Position24>
- <Position25>
- - <Filename Value="..\..\KM_ResourceSprites.pas"/>
- - <Caret Line="689" Column="1" TopLine="668"/>
- + <Filename Value="..\..\Common\KromUtils.pas"/>
- + <Caret Line="534" Column="1" TopLine="519"/>
- </Position25>
- <Position26>
- - <Filename Value="..\..\KM_ResourceSprites.pas"/>
- - <Caret Line="465" Column="75" TopLine="432"/>
- + <Filename Value="..\..\Common\KromUtils.pas"/>
- + <Caret Line="535" Column="1" TopLine="519"/>
- </Position26>
- <Position27>
- - <Filename Value="..\..\KM_ResourceSpritesEdit.pas"/>
- - <Caret Line="268" Column="3" TopLine="300"/>
- + <Filename Value="..\..\Common\KromUtils.pas"/>
- + <Caret Line="536" Column="1" TopLine="519"/>
- </Position27>
- <Position28>
- - <Filename Value="..\..\KM_ResourceSprites.pas"/>
- - <Caret Line="192" Column="64" TopLine="171"/>
- + <Filename Value="..\..\Common\KromUtils.pas"/>
- + <Caret Line="532" Column="1" TopLine="519"/>
- </Position28>
- <Position29>
- - <Filename Value="..\..\KM_ResourceSprites.pas"/>
- - <Caret Line="372" Column="1" TopLine="361"/>
- + <Filename Value="..\..\Common\KromUtils.pas"/>
- + <Caret Line="534" Column="1" TopLine="519"/>
- </Position29>
- <Position30>
- - <Filename Value="..\..\KM_ResourceSprites.pas"/>
- - <Caret Line="374" Column="3" TopLine="353"/>
- + <Filename Value="..\..\Common\KromUtils.pas"/>
- + <Caret Line="535" Column="1" TopLine="519"/>
- </Position30>
- </JumpHistory>
- </ProjectOptions>
- Index: Utils/RXXPacker/RXXPackerForm.lfm
- ===================================================================
- --- Utils/RXXPacker/RXXPackerForm.lfm (revision 6392)
- +++ Utils/RXXPacker/RXXPackerForm.lfm (working copy)
- @@ -14,12 +14,12 @@
- OnCreate = FormCreate
- OnDestroy = FormDestroy
- Position = poDesktopCenter
- - LCLVersion = '0.9.30.2'
- + LCLVersion = '1.0.8.0'
- object Label1: TLabel
- Left = 16
- Height = 14
- Top = 176
- - Width = 32
- + Width = 38
- Caption = 'Label1'
- ParentColor = False
- end
- @@ -41,6 +41,8 @@
- Anchors = [akTop, akLeft, akRight, akBottom]
- ItemHeight = 0
- MultiSelect = True
- + ScrollWidth = 255
- TabOrder = 1
- + TopIndex = -1
- end
- end
- Index: Utils/RXXPacker/RXXPackerForm.pas
- ===================================================================
- --- Utils/RXXPacker/RXXPackerForm.pas (revision 6392)
- +++ Utils/RXXPacker/RXXPackerForm.pas (working copy)
- @@ -3,7 +3,8 @@
- interface
- uses
- Classes, Controls, Dialogs,
- - ExtCtrls, Forms, Graphics, Spin, StdCtrls, SysUtils, TypInfo, Windows,
- + ExtCtrls, Forms, Graphics, Spin, StdCtrls, SysUtils, TypInfo,
- + LclIntf, // GetTickCount
- {$IFDEF FPC} LResources, {$ENDIF}
- KM_Defaults, KM_Log, KM_Pics, KM_ResPalettes, KM_ResSprites, KM_ResSpritesEdit;
- @@ -34,7 +35,7 @@
- var
- RT: TRXType;
- begin
- - ExeDir := ExtractFilePath(Application.ExeName) + '..\..\';
- + ExeDir := ExtractFilePath(Application.ExeName) + '..' + PathDelim + '..' + PathDelim;
- Caption := 'RXX Packer (' + GAME_REVISION + ')';
- @@ -42,7 +43,7 @@
- gLog := TKMLog.Create(ExeDir + 'RXXPacker.log');
- fPalettes := TKMPalettes.Create;
- - fPalettes.LoadPalettes(ExeDir + 'data\gfx\');
- + fPalettes.LoadPalettes(ExeDir + 'data' + PathDelim + 'gfx' + PathDelim);
- for RT := Low(TRXType) to High(TRXType) do
- ListBox1.Items.Add(GetEnumName(TypeInfo(TRXType), Integer(RT)));
- @@ -89,8 +90,8 @@
- btnPackRXX.Enabled := False;
- Tick := GetTickCount;
- - Assert(DirectoryExists(ExeDir + 'SpriteResource\'),
- - 'Cannot find ' + ExeDir + 'SpriteResource\ folder.'+#10#13+
- + Assert(DirectoryExists(ExeDir + 'SpriteResource' + PathDelim),
- + 'Cannot find ' + ExeDir + 'SpriteResource' + PathDelim + ' folder.'+#10#13+
- 'Please make sure this folder exists.');
- for I := 0 to ListBox1.Items.Count - 1 do
- @@ -97,10 +98,10 @@
- if ListBox1.Selected[I] then
- begin
- RT := TRXType(I);
- - RXName := ExeDir + 'SpriteResource\' + RXInfo[RT].FileName + '.rx';
- + RXName := ExeDir + 'SpriteResource' + PathDelim + RXInfo[RT].FileName + '.rx';
- Assert((RT = rxTiles) or FileExists(RXName),
- 'Cannot find ' + RXName + ' file.'+#10#13+
- - 'Please copy the file from your KaM\data\gfx\res\ folder.');
- + 'Please copy the file from your KaM' + PathDelim + 'data' + PathDelim + 'gfx' + PathDelim + 'res' + PathDelim + ' folder.');
- SpritePack := TKMSpritePackEdit.Create(RT, fPalettes);
- try
- @@ -108,11 +109,11 @@
- if RT <> rxTiles then
- begin
- SpritePack.LoadFromRXFile(RXName);
- - SpritePack.OverloadFromFolder(ExeDir + 'SpriteResource\');
- + SpritePack.OverloadFromFolder(ExeDir + 'SpriteResource' + PathDelim);
- end
- else
- - if DirectoryExists(ExeDir + 'SpriteResource\') then
- - SpritePack.LoadFromFolder(ExeDir + 'SpriteResource\');
- + if DirectoryExists(ExeDir + 'SpriteResource' + PathDelim) then
- + SpritePack.LoadFromFolder(ExeDir + 'SpriteResource' + PathDelim);
- //Tiles must stay the same size as they can't use pivots
- if RT <> rxTiles then
- @@ -132,7 +133,7 @@
- // SpritePack.SoftWater(nil);
- //Save
- - SpritePack.SaveToRXXFile(ExeDir + 'Data\Sprites\' + RXInfo[RT].FileName + '.rxx');
- + SpritePack.SaveToRXXFile(ExeDir + 'Data' + PathDelim + 'Sprites' + PathDelim + RXInfo[RT].FileName + '.rxx');
- //Generate alpha shadows for the following sprite packs
- if RT in [rxHouses,rxUnits,rxGui,rxTrees] then
- @@ -174,7 +175,7 @@
- else
- SpritePack.SoftenShadows;
- - SpritePack.SaveToRXXFile(ExeDir + 'Data\Sprites\' + RXInfo[RT].FileName + '_a.rxx');
- + SpritePack.SaveToRXXFile(ExeDir + 'Data' + PathDelim + 'Sprites' + PathDelim + RXInfo[RT].FileName + '_a.rxx');
- end;
- finally
- SpritePack.Free;
- Index: src/KM_Render.pas
- ===================================================================
- --- src/KM_Render.pas (revision 6392)
- +++ src/KM_Render.pas (working copy)
- @@ -282,4 +282,4 @@
- end;
- -end.
- +end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement