index f9ebe0a83fc499ab110bf1718250b61d94178f0a..195b22d52ead5396cb72fba75ef7e3dc2b56ebc4 100644 (file)
unit f_addresource_texture;
-{$MODE Delphi}
+{$INCLUDE ../shared/a_modes.inc}
interface
uses
LCLIntf, LCLType, LMessages, SysUtils, Variants, Classes,
Graphics, Controls, Forms, Dialogs, f_addresource,
- StdCtrls, ExtCtrls;
+ StdCtrls, ExtCtrls, utils;
type
TAddTextureForm = class (TAddResourceForm)
AddTextureForm: TAddTextureForm;
function IsAnim(Res: String): Boolean;
-function GetFrame(Res: String; var Data: Pointer;
+function GetFrame(Res: String; var Data: Pointer; var DataLen: Integer;
var Width, Height: Word): Boolean;
implementation
uses
- BinEditor, WADEDITOR, f_main, g_textures, WADSTRUCT, CONFIG, g_map,
+ BinEditor, WADEDITOR, WADSTRUCT, f_main, g_textures, CONFIG, g_map,
g_language;
type
Result := ok;
end;
-function GetFrame(Res: String; var Data: Pointer;
+function GetFrame(Res: String; var Data: Pointer; var DataLen: Integer;
var Width, Height: Word): Boolean;
var
AnimWAD: Pointer;
Exit;
end;
+ DataLen := Len;
+
Height := config.ReadInt('', 'frameheight', 0);
Width := config.ReadInt('', 'framewidth', 0);
for i := 0 to lbResourcesList.Count-1 do
if lbResourcesList.Selected[i] then
begin
- AddTexture(cbWADlist.Text, cbSectionsList.Text,
- lbResourcesList.Items[i], False);
+ AddTexture(utf2win(cbWADlist.Text), utf2win(cbSectionsList.Text),
+ utf2win(lbResourcesList.Items[i]), False);
lbResourcesList.Selected[i] := False;
end;
end;