X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_playermodel.pas;h=9e42436ec5a4440f619ec289298c2cf20444f451;hb=a0b4df67e96c6b5e55e95269a87975df67692e6b;hp=3c121dba7854435f9a2e5d6a5cc4419b82f72a40;hpb=a6271e37492b08be8791fdc0b452f42e04c86d16;p=d2df-sdl.git diff --git a/src/game/g_playermodel.pas b/src/game/g_playermodel.pas index 3c121db..9e42436 100644 --- a/src/game/g_playermodel.pas +++ b/src/game/g_playermodel.pas @@ -14,12 +14,13 @@ * along with this program. If not, see . *) {$INCLUDE ../shared/a_modes.inc} +{$M+} unit g_playermodel; interface uses - g_textures, g_basic, g_weapons, e_graphics, wadreader; + MAPDEF, g_textures, g_basic, g_weapons, e_graphics, wadreader; const A_STAND = 0; @@ -78,7 +79,7 @@ type TGibsArray = Array of TGibSprite; TWeaponPoints = Array [WP_FIRST + 1..WP_LAST] of Array [A_STAND..A_LAST] of - Array [D_LEFT..D_RIGHT] of Array of TPoint; + Array [D_LEFT..D_RIGHT] of Array of TDFPoint; TPlayerModel = class (TObject) private @@ -95,7 +96,7 @@ type FCurrentWeapon: Byte; FDrawWeapon: Boolean; FFlag: Byte; - FFlagPoint: TPoint; + FFlagPoint: TDFPoint; FFlagAngle: SmallInt; FFlagAnim: TAnimation; FFire: Boolean; @@ -114,11 +115,14 @@ type procedure Update(); procedure Draw(X, Y: Integer; Alpha: Byte = 0); + published property Fire: Boolean read FFire; property Direction: TDirection read FDirection write FDirection; property Animation: Byte read FCurrentAnimation; property Weapon: Byte read FCurrentWeapon; property Name: String read FName; + + public property Color: TRGB read FColor write FColor; end; @@ -141,7 +145,7 @@ type TPlayerModelInfo = record Info: TModelInfo; ModelSpeed: Array [A_STAND..A_PAIN] of Byte; - FlagPoint: TPoint; + FlagPoint: TDFPoint; FlagAngle: SmallInt; WeaponPoints: TWeaponPoints; Gibs: TGibsArray; @@ -158,10 +162,10 @@ const W_ACT_NORMAL = 0; W_ACT_FIRE = 1; - FLAG_BASEPOINT: TPoint = (X:16; Y:43); - FLAG_DEFPOINT: TPoint = (X:32; Y:16); + FLAG_BASEPOINT: TDFPoint = (X:16; Y:43); + FLAG_DEFPOINT: TDFPoint = (X:32; Y:16); FLAG_DEFANGLE = -20; - WEAPONBASE: Array [WP_FIRST + 1..WP_LAST] of TPoint = + WEAPONBASE: Array [WP_FIRST + 1..WP_LAST] of TDFPoint = ((X:8; Y:4), (X:8; Y:8), (X:16; Y:16), (X:16; Y:24), (X:16; Y:16), (X:24; Y:24), (X:16; Y:16), (X:24; Y:24), (X:16; Y:16), (X:8; Y:8)); @@ -198,7 +202,7 @@ begin end; end; -function GetPoint(var str: String; var point: TPoint): Boolean; +function GetPoint(var str: String; var point: TDFPoint): Boolean; var a, x, y: Integer; s: String; @@ -802,7 +806,7 @@ procedure TPlayerModel.Draw(X, Y: Integer; Alpha: Byte = 0); var Mirror: TMirrorType; pos, act: Byte; - p: TPoint; + p: TDFPoint; begin // Ôëàãè: if Direction = D_LEFT then