Changeset 170


Ignore:
Timestamp:
Jun 15, 2019, 4:07:03 PM (5 years ago)
Author:
chronos
Message:
Location:
trunk
Files:
1 added
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/CityScreen.pas

    r150 r170  
    9090
    9191uses
    92   Select, Messg, MessgEx, Help, Tribes, Directories, Math;
     92  Select, Messg, MessgEx, Help, Tribes, Directories, Math, PixelPointer;
    9393
    9494{$R *.lfm}
  • trunk/LocalPlayer/Help.pas

    r166 r170  
    107107
    108108uses
    109   Directories, ClientTools, Term, Tribes, Inp, Messg;
     109  Directories, ClientTools, Term, Tribes, Inp, Messg, PixelPointer;
    110110
    111111{$R *.lfm}
  • trunk/LocalPlayer/IsoEngine.pas

    r154 r170  
    77  Protocol, ClientTools, ScreenTools, Tribes,
    88{$IFNDEF SCR}Term, {$ENDIF}
    9   LCLIntf, LCLType, SysUtils, Classes, Graphics;
     9  LCLIntf, LCLType, SysUtils, Classes, Graphics, PixelPointer;
    1010
    1111type
  • trunk/LocalPlayer/MessgEx.pas

    r111 r170  
    7373
    7474uses
    75   ClientTools, BaseWin, Term, Help, UnitStat, Tribes,
     75  ClientTools, BaseWin, Term, Help, UnitStat, Tribes, PixelPointer,
    7676  IsoEngine, Diagram;
    7777
  • trunk/LocalPlayer/TechTree.pas

    r111 r170  
    3030  TechTreeDlg: TTechTreeDlg;
    3131
     32
    3233implementation
    3334
    3435uses
    35   Directories;
     36  Directories, PixelPointer;
    3637
    3738{$R *.lfm}
  • trunk/LocalPlayer/Term.pas

    r166 r170  
    463463uses
    464464  Directories, IsoEngine, CityScreen, Draft, MessgEx, Select, CityType, Help,
    465   UnitStat, Log, Diagram, NatStat, Wonders, Enhance, Nego,
     465  UnitStat, Log, Diagram, NatStat, Wonders, Enhance, Nego, PixelPointer,
    466466  Battle, Rates, TechTree, Registry;
    467467
  • trunk/LocalPlayer/Wonders.pas

    r156 r170  
    3838
    3939uses
    40   Term, ClientTools, Help, Tribes;
     40  Term, ClientTools, Help, Tribes, PixelPointer;
    4141
    4242{$R *.lfm}
  • trunk/Packages/CevoComponents/CevoComponents.lpk

    r166 r170  
    3737    <Description Value="C-evo components"/>
    3838    <Version Major="1" Minor="2"/>
    39     <Files Count="13">
     39    <Files Count="14">
    4040      <Item1>
    4141        <Filename Value="Area.pas"/>
     
    9696        <Filename Value="BaseWin.pas"/>
    9797        <HasRegisterProc Value="True"/>
     98        <UnitName Value="BaseWin"/>
    9899      </Item13>
     100      <Item14>
     101        <Filename Value="PixelPointer.pas"/>
     102        <UnitName Value="PixelPointer"/>
     103      </Item14>
    99104    </Files>
    100105    <RequiredPkgs Count="2">
  • trunk/Packages/CevoComponents/CevoComponents.pas

    r166 r170  
    1010uses
    1111  Area, ButtonA, ButtonB, ButtonC, ButtonN, EOTButton, ButtonBase, DrawDlg,
    12   Sound, BaseWin, LazarusPackageIntf;
     12  Sound, BaseWin, PixelPointer, LazarusPackageIntf;
    1313
    1414implementation
  • trunk/Packages/CevoComponents/ScreenTools.pas

    r167 r170  
    1616    clPage, clCover: TColor;
    1717  end;
    18 
    19   TColor32 = type cardinal;
    20   TColor32Component = (ccBlue, ccGreen, ccRed, ccAlpha);
    21   TPixel32 = packed record
    22     case integer of
    23       0: (B, G, R, A: byte);
    24       1: (ARGB: TColor32);
    25       2: (Planes: array[0..3] of byte);
    26       3: (Components: array[TColor32Component] of byte);
    27   end;
    28   PPixel32 = ^TPixel32;
    29 
    30   { TPixelPointer }
    31 
    32   TPixelPointer = record
    33     Base: PPixel32;
    34     Pixel: PPixel32;
    35     Line: PPixel32;
    36     RelLine: PPixel32;
    37     BytesPerPixel: integer;
    38     BytesPerLine: integer;
    39     procedure NextLine; inline; // Move pointer to start of new base line
    40     procedure NextPixel; inline; // Move pointer to next pixel
    41     procedure SetXY(X, Y: integer); inline; // Set pixel position relative to base
    42     procedure SetX(X: integer); inline; // Set horizontal pixel position relative to base
    43     procedure Init(Bitmap: TRasterImage; BaseX: integer = 0; BaseY: integer = 0); inline;
    44   end;
    45   PPixelPointer = ^TPixelPointer;
    4618
    4719{$IFDEF WINDOWS}
     
    218190
    219191uses
    220   Directories, Sound, Registry;
     192  Directories, Sound, Registry, PixelPointer;
    221193
    222194var
     
    14291401end;
    14301402
    1431 { TPixelPointer }
    1432 
    1433 procedure TPixelPointer.NextLine; inline;
    1434 begin
    1435   Line := Pointer(Line) + BytesPerLine;
    1436   Pixel := Line;
    1437 end;
    1438 
    1439 procedure TPixelPointer.NextPixel; inline;
    1440 begin
    1441   Pixel := Pointer(Pixel) + BytesPerPixel;
    1442 end;
    1443 
    1444 procedure TPixelPointer.SetXY(X, Y: Integer); inline;
    1445 begin
    1446   Line := Pointer(Base) + Y * BytesPerLine;
    1447   SetX(X);
    1448 end;
    1449 
    1450 procedure TPixelPointer.SetX(X: Integer); inline;
    1451 begin
    1452   Pixel := Pointer(Line) + X * BytesPerPixel;
    1453 end;
    1454 
    1455 procedure TPixelPointer.Init(Bitmap: TRasterImage; BaseX: Integer = 0;
    1456   BaseY: integer = 0); inline;
    1457 begin
    1458   BytesPerLine := Bitmap.RawImage.Description.BytesPerLine;
    1459   BytesPerPixel := Bitmap.RawImage.Description.BitsPerPixel shr 3;
    1460   Base := PPixel32(Bitmap.RawImage.Data + BaseX * BytesPerPixel + BaseY * BytesPerLine);
    1461   SetXY(0, 0);
    1462 end;
    1463 
    14641403procedure LoadPhrases;
    14651404begin
  • trunk/Start.pas

    r169 r170  
    155155
    156156uses
    157   Directories, Direct, ScreenTools, Inp, Back, Locale;
     157  Directories, Direct, ScreenTools, Inp, Back, Locale, PixelPointer;
    158158
    159159{$R *.lfm}
Note: See TracChangeset for help on using the changeset viewer.