summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 61cdecb)
raw | patch | inline | side by side (parent: 61cdecb)
author | binarymaster <x86corez@gmail.com> | |
Tue, 26 Sep 2017 15:19:51 +0000 (18:19 +0300) | ||
committer | binarymaster <x86corez@gmail.com> | |
Tue, 26 Sep 2017 15:19:51 +0000 (18:19 +0300) |
index 9211205ecde998b2a9d2542c6ecc963bd2040556..9eea7180818843a5581e452b2be08036792ea845 100644 (file)
Height: Integer;
ColorDepth: Integer;
ImageSize: Integer;
- I, x, y: Integer;
+ x, y: Integer;
BitMap: TBitMap;
TextureData: Pointer;
index 1402b13328d1469f0033c5112bc7aced072c49cb..f3b3fade582900933aa608f587fe3c23e9479b12 100644 (file)
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;
diff --git a/src/editor/f_main.pas b/src/editor/f_main.pas
index ab72ebed255b1f37ebdc343f7d1b789e295fd384..2216151be62ac733692ba26562c2dfebd06c9a35 100644 (file)
--- a/src/editor/f_main.pas
+++ b/src/editor/f_main.pas
cmd, mapWAD, mapToRun: String;
opt: LongWord;
time: Integer;
- lpMsgBuf: PChar;
begin
// Сохраняем временную карту:
time := 0;
diff --git a/src/editor/g_map.pas b/src/editor/g_map.pas
index 237c247b58e1c6ca14acaf0307c28803eae5e736..0a97da7d911e29672ea2b28cc708ee8070da762a 100644 (file)
--- a/src/editor/g_map.pas
+++ b/src/editor/g_map.pas
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
index 52a1e9213d77d85ee12d94f93410fd4f13fbe0af..6055678f343d8e55dafc2c24ff518c666d21863b 100644 (file)
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;
index e68fd21bcdee1c7d63ced3b086fb58abf80cd09d..d2183553cb10fbe67272913c96002f72b0fbff0a 100644 (file)
--- a/src/shared/WADEDITOR.pas
+++ b/src/shared/WADEDITOR.pas
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