This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Calc(const CalcStr: string): string; | |
var | |
v : Variant; | |
begin | |
v := CreateOleObject('MSScriptControl.ScriptControl'); | |
v.Language := 'JScript'; | |
Result := v.Eval(CalcStr); | |
v := Unassigned; | |
end; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type | |
TSHA1Digest = array [0..4] of LongWord; | |
TSHA1Block = array [0..63] of Byte; | |
TSHA1Context = record | |
State : TSHA1Digest; | |
Block : TSHA1Block; | |
Len : Int64; | |
Pos : LongInt; | |
end; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type | |
TMD5Digest = array [0..3] of LongWord; | |
TMD5Block = array [0..63] of Byte; | |
TMD5Context = record | |
State : TMD5Digest; | |
Block : TMD5Block; | |
Len : Int64; | |
Pos : LongInt; | |
end; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unit unzip; | |
// based on C++ core "tiny inflate" by Joergen Ibsen / Jibz | |
// http://www.ibsensoftware.com/ | |
interface | |
type | |
TByteArray = array [Word] of Byte; | |
TWordArray = array [Word] of Word; | |
PByteArray = ^TByteArray; | |
PWordArray = ^TWordArray; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unit xml; | |
interface | |
type | |
TXMLParam = record | |
Name : WideString; | |
Value : WideString; | |
end; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
procedure Resample(const Data: PByteArray; const Width, Height: LongInt; out OutData: PByteArray; const OutWidth, OutHeight: LongInt); | |
var | |
i, j : LongInt; | |
f : array [0..1] of LongWord; | |
Row : array [0..1] of PByteArray; | |
Pix : array [0..3] of PByteArray; | |
p : array [0..1] of PLongArray; | |
Step : LongInt; | |
Buf : PByteArray; | |
begin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function LoadGIF(const Stream: TStream; out Data: PByteArray; out Width, Height: LongInt): Boolean; | |
procedure DecompressLZW(InitCodeSize: Byte; Source, Dest: Pointer; PackedSize, UnpackedSize: LongInt); | |
const | |
NoLZWCode = 4096; | |
var | |
I: LongInt; | |
Data, Bits, Code : LongWord; | |
SourcePtr : ^Byte; | |
InCode : LongWord; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function LoadPNG(const Stream: TStream; out Data: PByteArray; out Width, Height: LongInt): Boolean; | |
const | |
IHDR = $52444849; | |
IDAT = $54414449; | |
IEND = $444E4549; | |
PLTE = $45544C50; | |
tRNS = $534E5274; | |
var | |
i, j : LongInt; | |
Bits : Byte; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function LoadJPG(const Stream: TStream; out Data: PByteArray; out Width, Height: LongInt): Boolean; | |
type | |
THuffmanTable = record | |
Bits : array [0..15] of Byte; | |
HVal : array [Byte] of Byte; | |
Size : array [Byte] of Byte; | |
Code : array [Byte] of Word; | |
end; | |
TQTable = array [0..63] of Single; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
constructor TTexture.Create(const FileName: string); | |
type | |
TLoadFormat = (lfNULL, lfDXT1c, lfDXT1a, lfDXT3, lfDXT5, lfA8, lfL8, lfAL8, | |
lfBGRA8, lfBGR8, lfBGR5A1, lfBGR565, lfBGRA4, lfR16F, lfR32F, | |
lfGR16F, lfGR32F, lfBGRA16F, lfBGRA32F); | |
TDDS = record | |
dwMagic : LongWord; | |
dwSize : LongInt; | |
dwFlags : LongWord; | |
dwHeight : LongWord; |
OlderNewer