X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_playermodel.pas;h=9b67c0033f19a42d0fff2d793356da90851090f5;hb=5472594f32e33da0c66606ec9eebc8f798ef6b54;hp=dd66ccd69c4d28efd54121bf0f97ea5a852ec2ea;hpb=844441154d1220d6c83f75043300c2851ec87109;p=d2df-sdl.git diff --git a/src/game/g_playermodel.pas b/src/game/g_playermodel.pas index dd66ccd..9b67c00 100644 --- a/src/game/g_playermodel.pas +++ b/src/game/g_playermodel.pas @@ -1,3 +1,19 @@ +(* 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 g_playermodel; interface @@ -230,7 +246,7 @@ end; function g_PlayerModel_Load(FileName: string): Boolean; var ID: DWORD; - a, b, len, aa, bb, f: Integer; + a, b, len, lenpd, lenpd2, aa, bb, f: Integer; cc: TDirection; config: TConfig; pData, pData2: Pointer; @@ -252,7 +268,7 @@ begin Exit; end; - if not WAD.GetResource('TEXT', 'MODEL', pData, len) then + if not WAD.GetResource('TEXT/MODEL', pData, len) then begin WAD.Free(); Exit; @@ -357,12 +373,12 @@ begin SetLength(Gibs, ReadInt('Gibs', 'count', 0)); if (Gibs <> nil) and - (WAD.GetResource('TEXTURES', config.ReadStr('Gibs', 'resource', 'GIBS'), pData, len)) and - (WAD.GetResource('TEXTURES', config.ReadStr('Gibs', 'mask', 'GIBSMASK'), pData2, len)) then + (WAD.GetResource('TEXTURES/'+config.ReadStr('Gibs', 'resource', 'GIBS'), pData, lenpd)) and + (WAD.GetResource('TEXTURES/'+config.ReadStr('Gibs', 'mask', 'GIBSMASK'), pData2, lenpd2)) then begin for a := 0 to High(Gibs) do - if e_CreateTextureMemEx(pData, Gibs[a].ID, a*32, 0, 32, 32) and - e_CreateTextureMemEx(pData2, Gibs[a].MaskID, a*32, 0, 32, 32) then + if e_CreateTextureMemEx(pData, lenpd, Gibs[a].ID, a*32, 0, 32, 32) and + e_CreateTextureMemEx(pData2, lenpd2, Gibs[a].MaskID, a*32, 0, 32, 32) then begin Gibs[a].Rect := e_GetTextureSize2(Gibs[a].ID); with Gibs[a].Rect do