Changeset 288


Ignore:
Timestamp:
Feb 26, 2021, 9:43:24 PM (3 years ago)
Author:
chronos
Message:
  • Added: Supported more key bindings.
  • Fixed: Wrong default binding for NoOrder (space key).
  • Modified: Pushed trunk version to 1.3.0.
  • Modified: Update readme.txt with information for development.
Location:
trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/GameServer.pas

    r274 r288  
    1010
    1111const
    12   Version = $010200;
     12  Version = $010300;
    1313  FirstAICompatibleVersion = $000D00;
    1414  FirstBookCompatibleVersion = $010103;
  • trunk/Install/deb/debian/changelog

    r55 r288  
    1 c-evo (1.2.0-0) precise; urgency=low
     1c-evo (1.3.0-0) precise; urgency=low
    22
    3   * Original version 1.0.0 packaged with lazdebian
     3  * Original version 1.3.0 packaged with lazdebian
    44
    55 -- Chronos <robie@centrum.cz>  Sun, 17 Dec 2016 00:51:08 +0100
  • trunk/Install/deb/debian/control

    r173 r288  
    33Section: devel
    44Priority: optional
    5 Standards-Version: 1.0.0
     5Standards-Version: 1.3.0
    66Build-Depends: fpc, lazarus, lcl, lcl-utils, debhelper (>= 8)
    77
  • trunk/Install/rpm/c-evo.spec

    r176 r288  
    11Name:           c-evo
    2 Version:        1.2.0
     2Version:        1.3.0
    33Release:        1%{?dist}
    44Summary:        Empire building game
  • trunk/Install/win/Common.iss

    r240 r288  
    33
    44#define MyAppName "C-evo"
    5 #define MyAppVersion "1.2.0"
     5#define MyAppVersion "1.3.0"
    66#define MyAppPublisher "Chronosoft"
    77#define MyAppPublisherShort "Chronosoft"
  • trunk/Integrated.lpi

    r261 r288  
    320320        <Filename Value="Settings.pas"/>
    321321        <IsPartOfProject Value="True"/>
    322         <ComponentName Value="LocaleDlg"/>
     322        <ComponentName Value="SettingsDlg"/>
    323323        <HasResources Value="True"/>
    324324        <ResourceBaseClass Value="Form"/>
  • trunk/LocalPlayer/TechTree.pas

    r257 r288  
    132132  NewHeight: Integer;
    133133const
    134   TransparentColor = $7F007F;
     134  TransparentColor: Cardinal = $7F007F;
    135135begin
    136136  if Image = nil then begin
  • trunk/LocalPlayer/Term.lfm

    r232 r288  
    11object MainScreen: TMainScreen
    2   Left = 231
     2  Left = 169
    33  Height = 480
    4   Top = 190
     4  Top = 596
    55  Width = 800
    66  HorzScrollBar.Visible = False
     
    1212  Constraints.MinHeight = 480
    1313  Constraints.MinWidth = 800
     14  DesignTimePPI = 144
    1415  Font.Color = clWindowText
    1516  Font.Height = -13
     
    3031  OnShow = FormShow
    3132  Position = poDefault
    32   PixelsPerInch = 96
     33  LCLVersion = '2.0.12.0'
    3334  Scaled = False
    34   LCLVersion = '1.6.0.4'
    3535  WindowState = wsMaximized
    3636  object UnitBtn: TButtonB
     
    217217    Interval = 50
    218218    OnTimer = Timer1Timer
    219     left = 8
    220     top = 48
     219    Left = 8
     220    Top = 48
    221221  end
    222222  object GamePopup: TPopupMenu
    223223    AutoPopup = False
    224     left = 40
    225     top = 48
     224    Left = 40
     225    Top = 48
    226226    object mHelp: TMenuItem
    227227      Tag = 7
     
    459459          RadioItem = True
    460460          OnClick = mBigTilesClick
    461         end             
     461        end
    462462      end
    463463      object mSound: TMenuItem
     
    587587  object UnitPopup: TPopupMenu
    588588    AutoPopup = False
    589     left = 104
    590     top = 48
     589    Left = 104
     590    Top = 48
    591591    object mdisband: TMenuItem
    592592      Tag = 72
     
    670670  object StatPopup: TPopupMenu
    671671    AutoPopup = False
    672     left = 72
    673     top = 48
     672    Left = 72
     673    Top = 48
    674674    object mUnitStat: TMenuItem
    675675      Tag = 9
     
    726726  end
    727727  object EditPopup: TPopupMenu
    728     left = 168
    729     top = 48
     728    Left = 168
     729    Top = 48
    730730    object mCreateUnit: TMenuItem
    731731      Tag = 47
     
    733733  end
    734734  object TerrainPopup: TPopupMenu
    735     left = 136
    736     top = 48
     735    Left = 136
     736    Top = 48
    737737    object mtrans: TMenuItem
    738738      Tag = 273
  • trunk/LocalPlayer/Term.pas

    r263 r288  
    283283    procedure OnEOT(var Msg: TMessage); message WM_EOT;
    284284    procedure SoundPreload(Check: integer);
     285    procedure UpdateKeyShortcuts;
    285286  public
    286287    UsedOffscreenWidth, UsedOffscreenHeight: integer;
     
    34043405  i, j: integer;
    34053406begin
     3407  UpdateKeyShortcuts;
     3408
    34063409  MainFormKeyDown := FormKeyDown;
    34073410  BaseWin.CreateOffscreen(Offscreen);
     
    36173620  CanClose := Closable;
    36183621  if not Closable and idle and (me = 0) and (ClientMode < scContact) then
    3619     MenuClick(mResign)
     3622    MenuClick(mResign);
    36203623end;
    36213624
     
    36303633procedure TMainScreen.OnEOT(var Msg: TMessage);
    36313634begin
    3632   EndTurn
     3635  EndTurn;
    36333636end;
    36343637
     
    36383641  begin
    36393642    MessgExDlg.CancelMovie;
    3640     Server(sBreak, me, 0, nil^)
     3643    Server(sBreak, me, 0, nil^);
    36413644  end
    36423645  else if ClientMode < 0 then
     
    36473650  begin
    36483651    Jump[pTurn] := 0;
    3649     StartRunning := false
     3652    StartRunning := false;
    36503653  end
    36513654  else
    3652     EndTurn
     3655    EndTurn;
    36533656end;
    36543657
     
    64406443end;
    64416444
     6445procedure TMainScreen.UpdateKeyShortcuts;
     6446begin
     6447  mHelp.ShortCut := BHelp.ShortCut;
     6448  mUnitStat.ShortCut := BUnitStat.ShortCut;
     6449  mCityStat.ShortCut := BCityStat.ShortCut;
     6450  mScienceStat.ShortCut := BScienceStat.ShortCut;
     6451  mEUnitStat.ShortCut := BEUnitStat.ShortCut;;
     6452  mDiagram.ShortCut := BDiagram.ShortCut;
     6453  mWonders.ShortCut := BWonders.ShortCut;
     6454  mShips.ShortCut := BShips.ShortCut;
     6455  mNations.ShortCut := BNations.ShortCut;
     6456  mEmpire.ShortCut := BEmpire.ShortCut;
     6457  mResign.ShortCut := BResign.ShortCut;
     6458  mRandomMap.ShortCut := BRandomMap.ShortCut;
     6459  mDisband.ShortCut := BDisbandUnit.ShortCut;
     6460  mFort.ShortCut := BFortify.ShortCut;
     6461  mCentre.ShortCut := BCenterUnit.ShortCut;
     6462  mStay.ShortCut := BStay.ShortCut;
     6463  mNoOrders.ShortCut := BNoOrders.ShortCut;
     6464  mTechTree.ShortCut := BTechTree.ShortCut;
     6465  mWait.ShortCut := BWait.ShortCut;
     6466  mJump.ShortCut := BJump.ShortCut;;
     6467end;
     6468
    64426469procedure TMainScreen.FormKeyDown(Sender: TObject; var Key: word;
    64436470  Shift: TShiftState);
     
    65136540    end
    65146541  end else if Shift = [ssCtrl] then begin
     6542    if ShortCut = BJump.ShortCut then MenuClick(mJump);
    65156543    case char(Key) of
    6516       'J': MenuClick(mJump);
    65176544      'K': mShowClick(mDebugMap);
    65186545      'L': mShowClick(mLocCodes);
     
    65426569      '4': MapBtnClick(MapBtn5);
    65436570      '5': MapBtnClick(MapBtn6);
    6544       'T': MenuClick(mTechTree);
    6545       'W': MenuClick(mWait);
    65466571    end;
     6572    if ShortCut = BTechTree.ShortCut then MenuClick(mTechTree)
     6573    else if ShortCut = BWait.ShortCut then MenuClick(mWait);
    65476574  end;
    65486575
  • trunk/Packages/CevoComponents/ScreenTools.pas

    r286 r288  
    9191function SetMainTextureByAge(Age: integer): boolean;
    9292procedure LoadPhrases;
    93 procedure Texturize(Dest, Texture: TBitmap; TransparentColor: Integer);
     93procedure Texturize(Dest, Texture: TBitmap; TransparentColor: Cardinal);
    9494procedure DarkenImage(Bitmap: TBitmap; Change: Integer);
    9595function ScaleToNative(Value: Integer): Integer;
     
    12481248  i, r, g, b: Integer;
    12491249begin
    1250   begin
    1251     for i := 0 to 15 do
    1252     begin // gradient
    1253       r := Color and $FF + Brightness[i];
    1254       if r < 0 then
    1255         r := 0
    1256       else if r >= 256 then
    1257         r := 255;
    1258       g := Color shr 8 and $FF + Brightness[i];
    1259       if g < 0 then
    1260         g := 0
    1261       else if g >= 256 then
    1262         g := 255;
    1263       b := Color shr 16 and $FF + Brightness[i];
    1264       if b < 0 then
    1265         b := 0
    1266       else if b >= 256 then
    1267         b := 255;
    1268       ca.Pen.Color := r + g shl 8 + b shl 16;
    1269       ca.MoveTo(x + dx * i, y + dy * i);
    1270       ca.LineTo(x + dx * i + Width, y + dy * i + Height);
    1271     end;
    1272     ca.Pen.Color := $000000;
    1273     ca.MoveTo(x + 1, y + 16 * dy + Height);
    1274     ca.LineTo(x + 16 * dx + Width, y + 16 * dy + Height);
    1275     ca.LineTo(x + 16 * dx + Width, y);
    1276   end;
     1250  for i := 0 to Length(Brightness) - 1 do begin // gradient
     1251    r := Color and $FF + Brightness[i];
     1252    if r < 0 then
     1253      r := 0
     1254    else if r >= 256 then
     1255      r := 255;
     1256    g := Color shr 8 and $FF + Brightness[i];
     1257    if g < 0 then
     1258      g := 0
     1259    else if g >= 256 then
     1260      g := 255;
     1261    b := Color shr 16 and $FF + Brightness[i];
     1262    if b < 0 then
     1263      b := 0
     1264    else if b >= 256 then
     1265      b := 255;
     1266    ca.Pen.Color := r + g shl 8 + b shl 16;
     1267    ca.MoveTo(x + dx * i, y + dy * i);
     1268    ca.LineTo(x + dx * i + Width, y + dy * i + Height);
     1269  end;
     1270  ca.Pen.Color := $000000;
     1271  ca.MoveTo(x + 1, y + 16 * dy + Height);
     1272  ca.LineTo(x + 16 * dx + Width, y + 16 * dy + Height);
     1273  ca.LineTo(x + 16 * dx + Width, y);
    12771274end;
    12781275
     
    15501547end;
    15511548
    1552 procedure Texturize(Dest, Texture: TBitmap; TransparentColor: Integer);
     1549procedure Texturize(Dest, Texture: TBitmap; TransparentColor: Cardinal);
    15531550var
    15541551  SrcPixel, DstPixel: TPixelPointer;
  • trunk/Packages/CevoComponents/Sound.pas

    r287 r288  
    6868{$R *.lfm}
    6969
     70{$IFDEF LINUX}
    7071resourcestring
    7172  SUnableToPlay = 'PlayStyle=%s: Unable to play %s Message:%s';
    7273  SPlayCommandNotWork = 'The play command %s does not work on your system';
     74{$ENDIF}
    7375
    7476constructor TSound.Create(const FileName: string);
  • trunk/UKeyBindings.pas

    r264 r288  
    4545  BStay: TKeyBinding;
    4646  BNoOrders: TKeyBinding;
     47  BTechTree: TKeyBinding;
     48  BWait: TKeyBinding;
     49  BJump: TKeyBinding;
    4750
    4851
     
    8285  I: Integer;
    8386  KeyBinding: TKeyBinding;
    84   N: Integer;
    8587begin
    8688  Lines := TStringList.Create;
     
    138140  BCenterUnit := AddItem('CenterUnit', 'Center', 'C');
    139141  BStay := AddItem('Stay', 'Stay', 'S');
    140   BNoOrders := AddItem('NoOrders', 'No orders', ShortCut(VK_SPACE, []));
     142  BNoOrders := AddItem('NoOrders', 'No orders', 'Space');
     143  BTechTree := AddItem('TechTree', 'Tech tree', 'T');
     144  BWait := AddItem('Wait', 'Wait', 'W');
     145  BJump := AddItem('Jump', 'Jump 20 turns', 'Ctrl+J');
    141146end;
    142147
  • trunk/readme.txt

    r183 r288  
    1 C-evo 1.2.0 sources ported to Lazarus/FPC
     1C-evo 1.3.0 Horizons
     2========================
    23
    3 * Used development environment: Lazarus 2.0.8 (https://www.lazarus-ide.org/)
     4* Developed with: Lazarus 2.0.12 (https://www.lazarus-ide.org/)
    45* Supported platforms: Windows and Linux
    56* Supported architectures: 32-bit and 64-bit x86
    67
    7 =Code changes to original source=
     8= Code changes to original source =
    89
    910* Converted from Delphi to Lazarus
     
    1819* Design time components converted to Lazarus package (cevocomponenets.lpk)
    1920
    20 =Original readme content=
     21= Development =
     22
     23* Home page: https://app.zdechov.net/c-evo/
     24* Source code: https://svn.zdechov.net/c-evo/
     25* Developed in [http://www.lazarus-ide.org/ Lazarus/FPC] 2.0.12
     26* To build new Windows installer run Install/build.bat. InnoSetup (http://www.jrsoftware.org/isdl.php) needs to be installed).
     27
     28== Release new version ==
     29
     30* Update version in GameServer.pas Version constant.
     31* Update version in Install\win\Common.iss MyAppVersion define.
     32* Update version in Install\rpm\c-evo.spec Version field.
     33* Update version in Install\deb\control Standards-Version field.
     34* Build all binary installer packages and put them into bin directory.
     35
     36= Original readme content =
    2137
    2238The C-evo sources
Note: See TracChangeset for help on using the changeset viewer.