Changeset 182 for trunk


Ignore:
Timestamp:
Dec 26, 2019, 12:09:50 AM (5 years ago)
Author:
chronos
Message:
  • Added: Support for bigger map tile size.
Location:
trunk
Files:
4 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/IsoEngine.pas

    r170 r182  
    8989
    9090  // sprites indexes
    91   spDeadLands = 2 * TerrainIconCols + 6;
     91  spRow2 = 2 * TerrainIconCols + 6;
    9292  spBlink1 = 1 * TerrainIconCols + 8;
    9393  spBlink2 = 2 * TerrainIconCols + 8;
     
    107107  spPollution = 12 * TerrainIconCols + 6;
    108108  spFortBack = 12 * TerrainIconCols + 7;
     109  spMinerals = 12 * TerrainIconCols + 8;
    109110  spRiver = 13 * TerrainIconCols;
     111  spRiverMouths = 15 * TerrainIconCols;
     112  spGrid = 15 * TerrainIconCols + 6;
    110113  spJungle = 18 * TerrainIconCols;
     114  spCanalMouths = 20 * TerrainIconCols;
    111115
    112116var
     
    137141  i, x, y, xSrc, ySrc, HGrTerrainNew, HGrCitiesNew, age, size: integer;
    138142  LandMore, OceanMore, DitherMask, Mask24: TBitmap;
    139   MaskLine: array [0 .. 32 * 3 - 1] of TPixelPointer; // 32 = assumed maximum for yyt
     143  MaskLine: array [0 .. 50 * 3 - 1] of TPixelPointer; // 32 = assumed maximum for yyt
    140144  Border: boolean;
    141145begin
     
    422426  Borders := TBitmap.Create;
    423427  Borders.PixelFormat := pf24bit;
    424   Borders.SetSize(xxt * 2,(yyt * 2) * nPl);
     428  Borders.SetSize(xxt * 2, (yyt * 2) * nPl);
    425429  Borders.Canvas.FillRect(0, 0, Borders.Width, Borders.Height);
    426430  BordersOK := 0;
     
    876880  end
    877881  else if Tile and fDeadLands <> 0 then
    878     TSprite(x, y, spDeadLands);
     882    TSprite(x, y, spRow2);
    879883
    880884  if ShowObjects then
     
    898902    for Dir := 0 to 3 do
    899903      if Conn and (1 shl Dir) <> 0 then { river mouths }
    900         TSprite(x, y, 15 * TerrainIconCols + Dir);
     904        TSprite(x, y, spRiverMouths + Dir);
    901905    if ShowObjects then
    902906    begin
     
    904908      for Dir := 0 to 7 do
    905909        if Conn and (1 shl Dir) <> 0 then { canal mouths }
    906           TSprite(x, y, 20 * TerrainIconCols + 1 + Dir);
     910          TSprite(x, y, spCanalMouths + 1 + Dir);
    907911    end
    908912  end;
     
    11121116    end;
    11131117  end;
    1114   if Tile and fDeadLands <> 0 then
    1115     TSprite(x, y, (12 + Tile shr 25 and 3) * TerrainIconCols + 8);
     1118  if (Tile and fDeadLands) <> 0 then
     1119    TSprite(x, y, spMinerals + (Tile shr 25 and 3) * TerrainIconCols);
    11161120
    11171121  if Options and (1 shl moEditMode) <> 0 then
     
    11311135        1 + yyt + 15 * (yyt * 3 + 1))
    11321136    else
    1133       TSprite(x, y, 6 + TerrainIconCols * 15, xxt <> 33);
     1137      TSprite(x, y, spGrid, xxt <> 33);
    11341138
    11351139  if FoW and (Tile and fObserved = 0) then
  • trunk/LocalPlayer/Term.lfm

    r90 r182  
    11object MainScreen: TMainScreen
    22  Left = 231
    3   Height = 480
     3  Height = 600
    44  Top = 190
    5   Width = 800
     5  Width = 1000
    66  HorzScrollBar.Visible = False
    77  VertScrollBar.Visible = False
    88  Caption = 'C-evo'
    9   ClientHeight = 480
    10   ClientWidth = 800
     9  ClientHeight = 600
     10  ClientWidth = 1000
    1111  Color = clBtnFace
    12   Constraints.MinHeight = 480
    13   Constraints.MinWidth = 800
     12  Constraints.MinHeight = 600
     13  Constraints.MinWidth = 1000
     14  DesignTimePPI = 120
    1415  Font.Color = clWindowText
    15   Font.Height = -13
     16  Font.Height = -16
    1617  Font.Name = 'MS Sans Serif'
    1718  KeyPreview = True
     
    3031  OnShow = FormShow
    3132  Position = poDefault
    32   LCLVersion = '1.6.0.4'
     33  LCLVersion = '2.0.6.0'
    3334  WindowState = wsMaximized
    3435  object UnitBtn: TButtonB
    3536    Tag = 14
    36     Left = 208
    37     Height = 25
    38     Top = 384
    39     Width = 25
     37    Left = 260
     38    Height = 31
     39    Top = 480
     40    Width = 31
    4041    Visible = False
    4142    Down = False
     
    4647  object MapBtn0: TButtonC
    4748    Tag = 51
    48     Left = 16
    49     Height = 12
    50     Top = 304
    51     Width = 12
     49    Left = 20
     50    Height = 15
     51    Top = 380
     52    Width = 15
    5253    Visible = False
    5354    Down = False
     
    5859  object MapBtn1: TButtonC
    5960    Tag = 291
    60     Left = 16
    61     Height = 12
    62     Top = 320
    63     Width = 12
     61    Left = 20
     62    Height = 15
     63    Top = 400
     64    Width = 15
    6465    Visible = False
    6566    Down = False
     
    7071  object MapBtn4: TButtonC
    7172    Tag = 1028
    72     Left = 16
    73     Height = 12
    74     Top = 368
    75     Width = 12
     73    Left = 20
     74    Height = 15
     75    Top = 460
     76    Width = 15
    7677    Visible = False
    7778    Down = False
     
    8283  object MapBtn5: TButtonC
    8384    Tag = 1328
    84     Left = 16
    85     Height = 12
    86     Top = 384
    87     Width = 12
     85    Left = 20
     86    Height = 15
     87    Top = 480
     88    Width = 15
    8889    Visible = False
    8990    Down = False
     
    9495  object MapBtn6: TButtonC
    9596    Tag = 1541
    96     Left = 16
    97     Height = 12
    98     Top = 400
    99     Width = 12
     97    Left = 20
     98    Height = 15
     99    Top = 500
     100    Width = 15
    100101    Visible = False
    101102    Down = False
     
    106107  object TerrainBtn: TButtonB
    107108    Tag = 28
    108     Left = 240
    109     Height = 25
    110     Top = 384
    111     Width = 25
     109    Left = 300
     110    Height = 31
     111    Top = 480
     112    Width = 31
    112113    Visible = False
    113114    Down = False
     
    118119  object UnitInfoBtn: TButtonB
    119120    Tag = 15
    120     Left = 176
    121     Height = 25
    122     Top = 384
    123     Width = 25
     121    Left = 220
     122    Height = 31
     123    Top = 480
     124    Width = 31
    124125    Visible = False
    125126    Down = False
     
    129130  end
    130131  object EOT: TEOTButton
    131     Left = 712
    132     Height = 48
    133     Top = 368
    134     Width = 48
     132    Left = 890
     133    Height = 60
     134    Top = 460
     135    Width = 60
    135136    Visible = False
    136137    Down = False
     
    141142  object MenuArea: TArea
    142143    Left = 2
    143     Height = 36
     144    Height = 45
    144145    Top = 1
    145     Width = 36
     146    Width = 45
    146147  end
    147148  object TreasuryArea: TArea
    148     Left = 208
    149     Height = 36
     149    Left = 260
     150    Height = 45
    150151    Top = 1
    151     Width = 164
     152    Width = 205
    152153  end
    153154  object ResearchArea: TArea
    154     Left = 384
    155     Height = 36
     155    Left = 480
     156    Height = 45
    156157    Top = 1
    157     Width = 240
     158    Width = 300
    158159  end
    159160  object ManagementArea: TArea
    160     Left = 704
    161     Height = 40
    162     Top = 312
    163     Width = 56
     161    Left = 880
     162    Height = 50
     163    Top = 390
     164    Width = 70
    164165  end
    165166  object MovieSpeed1Btn: TButtonB
    166167    Tag = 256
    167     Left = 384
    168     Height = 25
    169     Top = 384
    170     Width = 25
     168    Left = 480
     169    Height = 31
     170    Top = 480
     171    Width = 31
    171172    Visible = False
    172173    Down = False
     
    177178  object MovieSpeed2Btn: TButtonB
    178179    Tag = 512
    179     Left = 416
    180     Height = 25
    181     Top = 384
    182     Width = 25
     180    Left = 520
     181    Height = 31
     182    Top = 480
     183    Width = 31
    183184    Visible = False
    184185    Down = False
     
    189190  object MovieSpeed3Btn: TButtonB
    190191    Tag = 768
    191     Left = 448
    192     Height = 25
    193     Top = 384
    194     Width = 25
     192    Left = 560
     193    Height = 31
     194    Top = 480
     195    Width = 31
    195196    Visible = False
    196197    Down = False
     
    201202  object MovieSpeed4Btn: TButtonB
    202203    Tag = 1024
    203     Left = 480
    204     Height = 25
    205     Top = 384
    206     Width = 25
     204    Left = 600
     205    Height = 31
     206    Top = 480
     207    Width = 31
    207208    Visible = False
    208209    Down = False
     
    215216    Interval = 50
    216217    OnTimer = Timer1Timer
    217     left = 8
    218     top = 48
     218    left = 10
     219    top = 60
    219220  end
    220221  object GamePopup: TPopupMenu
    221222    AutoPopup = False
    222     left = 40
    223     top = 48
     223    left = 50
     224    top = 60
    224225    object mHelp: TMenuItem
    225226      Tag = 7
     
    452453          RadioItem = True
    453454          OnClick = mNormalTilesClick
     455        end
     456        object mBigTiles: TMenuItem
     457          Caption = '90px'
     458          RadioItem = True
     459          OnClick = mBigTilesClick
    454460        end
    455461      end
     
    580586  object UnitPopup: TPopupMenu
    581587    AutoPopup = False
    582     left = 104
    583     top = 48
     588    left = 130
     589    top = 60
    584590    object mdisband: TMenuItem
    585591      Tag = 72
     
    663669  object StatPopup: TPopupMenu
    664670    AutoPopup = False
    665     left = 72
    666     top = 48
     671    left = 90
     672    top = 60
    667673    object mUnitStat: TMenuItem
    668674      Tag = 9
     
    719725  end
    720726  object EditPopup: TPopupMenu
    721     left = 168
    722     top = 48
     727    left = 210
     728    top = 60
    723729    object mCreateUnit: TMenuItem
    724730      Tag = 47
     
    726732  end
    727733  object TerrainPopup: TPopupMenu
    728     left = 136
    729     top = 48
     734    left = 170
     735    top = 60
    730736    object mtrans: TMenuItem
    731737      Tag = 273
  • trunk/LocalPlayer/Term.pas

    r173 r182  
    2626
    2727  TMainScreen = class(TDrawDlg)
     28    mBigTiles: TMenuItem;
    2829    Timer1: TTimer;
    2930    GamePopup: TPopupMenu;
     
    218219    procedure mSmallTilesClick(Sender: TObject);
    219220    procedure mNormalTilesClick(Sender: TObject);
     221    procedure mBigTilesClick(Sender: TObject);
    220222    procedure GrWallBtnDownChanged(Sender: TObject);
    221223    procedure BareBtnDownChanged(Sender: TObject);
     
    14891491        MiniColors[x, y] := GrExt[HGrSystem].Data.Canvas.Pixels[66 + x, 67 + y];
    14901492    IsoEngine.Init(InitEnemyModel);
    1491     if not IsoEngine.ApplyTileSize(xxt, yyt) and ((xxt <> 48) or (yyt <> 24))
     1493    if not IsoEngine.ApplyTileSize(xxt, yyt) and ((xxt <> 48) or (yyt <> 24) or (xxt <> 72))
    14921494    then
    14931495      ApplyTileSize(48, 24);
     
    73247326    mSmallTiles.Checked := xxt = 33;
    73257327    mNormalTiles.Checked := xxt = 48;
     7328    mBigTiles.Checked := xxt = 72;
    73267329  end
    73277330  else if Popup = StatPopup then
     
    79937996end;
    79947997
     7998procedure TMainScreen.mBigTilesClick(Sender: TObject);
     7999begin
     8000  SetTileSize(72, 36);
     8001end;
     8002
    79958003procedure TMainScreen.SetTileSize(x, y: integer);
    79968004var
  • trunk/Packages/CevoComponents/ScreenTools.pas

    r173 r182  
    466466
    467467    xmax := Source.Width - 1; // allows 4-byte access even for last pixel
    468     if xmax > 970 then
    469       xmax := 970;
     468    // Why there was that limit?
     469    //if xmax > 970 then
     470    //  xmax := 970;
    470471
    471472    GrExt[nGrExt].Data := Source;
Note: See TracChangeset for help on using the changeset viewer.