DEADSOFTWARE

AddResource: Fix non-ANSI encoding
[d2df-editor.git] / src / editor / f_addresource_texture.pas
index 1402b13328d1469f0033c5112bc7aced072c49cb..6c3840d627d290c4dd44f1261a09c24a7f377031 100644 (file)
@@ -240,9 +240,7 @@ var
   ii:         PByte;
   Width,
   Height:     Integer;
-  ColorDepth: Integer;
-  ImageSize:  Integer;
-  i, x, y:    Integer;
+  x, y:       Integer;
   BitMap:     TBitMap;
 
 begin
@@ -254,8 +252,6 @@ begin
 
   Width  := img.width;
   Height := img.height;
-  ColorDepth := 24;
-  ImageSize  := Width*Height*(ColorDepth div 8);
 
   BitMap := TBitMap.Create();
   BitMap.PixelFormat := pf24bit;
@@ -492,7 +488,7 @@ begin
   for i := 0 to lbResourcesList.Count-1 do
     if lbResourcesList.Selected[i] then
     begin
-      AddTexture(utf2win(cbWADlist.Text), utf2win(cbSectionsList.Text),
+      AddTexture(cbWADlist.Text, utf2win(cbSectionsList.Text),
                  utf2win(lbResourcesList.Items[i]), False);
       lbResourcesList.Selected[i] := False;
     end;