Ignore:
Timestamp:
Mar 18, 2021, 9:46:52 PM (4 years ago)
Author:
chronos
Message:
  • Added: Graphic set can now load dimensions of its graphic set items from a file. This effort should help with elimination of hardcoded graphic items dimensions in graphics sets. Gradually all graphic sets should have description of their items.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/Tribes.pas

    r313 r314  
    55
    66uses
    7   Protocol, ScreenTools, LazFileUtils, Classes, Graphics, SysUtils, Global;
     7  Protocol, ScreenTools, LazFileUtils, Classes, Graphics, SysUtils, Global,
     8  UGraphicSet;
    89
    910type
     
    1415
    1516  TModelPicture = record
    16     HGr: TGrExtDescr;
     17    HGr: TGraphicSet;
    1718    pix: Integer;
    1819    xShield: Integer;
     
    2930
    3031  TTribe = class
    31     symHGr: TGrExtDescr;
     32    symHGr: TGraphicSet;
    3233    sympix: Integer;
    33     faceHGr: TGrExtDescr;
     34    faceHGr: TGraphicSet;
    3435    facepix: Integer;
    35     cHGr: TGrExtDescr;
     36    cHGr: TGraphicSet;
    3637    cpix: Integer;
    3738    // symbol and city graphics
     
    6263var
    6364  Tribe: array [0 .. nPl - 1] of TTribe;
    64   HGrStdUnits: TGrExtDescr;
     65  HGrStdUnits: TGraphicSet;
    6566
    6667procedure Init;
     
    7071procedure FindStdModelPicture(Code: Integer; var pix: Integer; var Name: string);
    7172function GetTribeInfo(FileName: string; var Name: string; var Color: TColor): Boolean;
    72 procedure FindPosition(HGr: TGrExtDescr; x, y, xmax, ymax: Integer; Mark: TColor;
     73procedure FindPosition(HGr: TGraphicSet; x, y, xmax, ymax: Integer; Mark: TColor;
    7374  var xp, yp: Integer);
    7475
     
    8283  TChosenModelPictureInfo = record
    8384    Hash: Integer;
    84     HGr: TGrExtDescr;
     85    HGr: TGraphicSet;
    8586    pix: Integer;
    8687    ModelName: ShortString;
     
    328329end;
    329330
    330 procedure FindPosition(HGr: TGrExtDescr; x, y, xmax, ymax: Integer; Mark: TColor;
     331procedure FindPosition(HGr: TGraphicSet; x, y, xmax, ymax: Integer; Mark: TColor;
    331332  var xp, yp: Integer);
    332333begin
     
    560561  i: Integer;
    561562  Cnt: Integer;
    562   HGr: TGrExtDescr;
     563  HGr: TGraphicSet;
    563564  Used: Integer;
    564565  LeastUsed: Integer;
Note: See TracChangeset for help on using the changeset viewer.