Height: Integer;
ColorDepth: Integer;
ImageSize: Integer;
- I, x, y: Integer;
+ x, y: Integer;
BitMap: TBitMap;
TextureData: Pointer;
ii: PByte;
Width,
Height: Integer;
- ColorDepth: Integer;
- ImageSize: Integer;
- i, x, y: Integer;
+ x, y: Integer;
BitMap: TBitMap;
begin
Width := img.width;
Height := img.height;
- ColorDepth := 24;
- ImageSize := Width*Height*(ColorDepth div 8);
BitMap := TBitMap.Create();
BitMap.PixelFormat := pf24bit;
cmd, mapWAD, mapToRun: String;
opt: LongWord;
time: Integer;
- lpMsgBuf: PChar;
begin
// Сохраняем временную карту:
time := 0;
begin
Result := False;
+ PanelID := DWORD(-1);
case ObjectType of
OBJECT_PANEL:
begin
WAD := nil;
+ textures := nil;
+ panels := nil;
+ items := nil;
+ areas := nil;
+ monsters := nil;
+ triggers := nil;
+ PanelTable := nil;
+ MonsterTable := nil;
// Открываем WAD, если надо:
if Res <> '' then
var
Texture: GLuint;
fmt: GLenum;
- buf: PByte;
- f, c: Integer;
begin
tex.width := Width;
tex.height := Height;
function LoadTextureMem (pData: Pointer; dataSize: LongInt; var Texture: GLTexture; var pWidth, pHeight: Word; Fmt: PWord=nil): Boolean;
var
- image, ii: PByte;
- width, height: Integer;
- imageSize: Integer;
img: TImageData;
- x, y: Integer;
- clr: TColor32Rec;
begin
result := false;
pWidth := 0;
function LoadTextureMemEx (pData: Pointer; dataSize: LongInt; var Texture: GLTexture; fX, fY, fWidth, fHeight: Word; Fmt: PWord=nil): Boolean;
var
image, ii: PByte;
- width, height: Integer;
imageSize: Integer;
img: TImageData;
x, y: Integer;
P := OutBuf;
Inc(OutBytes, 256);
ReallocMem(OutBuf, OutBytes);
- strm.next_out := PByteF(Integer(OutBuf) + (Integer(strm.next_out) - Integer(P)));
+ strm.next_out := PByteF(PtrUInt(OutBuf + (strm.next_out - P)));
strm.avail_out := 256;
end;
finally