X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fsheditor%2FWADEDITOR_full.pas;h=4c61f454d8c1c021d51f7a147959cbc666b22c70;hb=refs%2Fheads%2Fbuffers;hp=e9b2c3f5c36195deaeb2d764cf84943f6927e6c7;hpb=ac201b02f10ef558087d50f6b03b4519ab567558;p=d2df-sdl.git diff --git a/src/sheditor/WADEDITOR_full.pas b/src/sheditor/WADEDITOR_full.pas index e9b2c3f..4c61f45 100644 --- a/src/sheditor/WADEDITOR_full.pas +++ b/src/sheditor/WADEDITOR_full.pas @@ -1,3 +1,18 @@ +(* Copyright (C) DooM 2D:Forever Developers + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + *) {$MODE DELPHI} unit WADEDITOR_full; @@ -633,7 +648,7 @@ begin else begin TempData := GetMemory(FResTable[i].Length); - CopyMemory(TempData, Pointer(LongWord(FResData)+FResTable[i].Address+6+ + CopyMemory(TempData, Pointer(NativeUInt(FResData)+FResTable[i].Address+6+ LongWord(SizeOf(TWADHeaderRec_1)+SizeOf(TResourceTableRec_1)*Length(FResTable))), FResTable[i].Length); DecompressBuf(TempData, FResTable[i].Length, 0, pData, OutBytes); @@ -795,19 +810,19 @@ begin Exit; end; - CopyMemory(@FVersion, Pointer(LongWord(Data)+5), 1); + CopyMemory(@FVersion, Pointer(NativeUInt(Data)+5), 1); if FVersion <> DFWAD_VERSION then begin FLastError := DFWAD_ERROR_WRONGVERSION; Exit; end; - CopyMemory(@FHeader, Pointer(LongWord(Data)+6), SizeOf(TWADHeaderRec_1)); + CopyMemory(@FHeader, Pointer(NativeUInt(Data)+6), SizeOf(TWADHeaderRec_1)); SetLength(FResTable, FHeader.RecordsCount); if FResTable <> nil then begin - CopyMemory(@FResTable[0], Pointer(LongWord(Data)+6+SizeOf(TWADHeaderRec_1)), + CopyMemory(@FResTable[0], Pointer(NativeUInt(Data)+6+SizeOf(TWADHeaderRec_1)), SizeOf(TResourceTableRec_1)*FHeader.RecordsCount); for a := 0 to High(FResTable) do