Changeset 52


Ignore:
Timestamp:
Dec 20, 2021, 7:47:26 PM (2 years ago)
Author:
chronos
Message:
  • Modified: Renamed forms to start their name with Form prefix.
  • Fixed: Drawing game scene.
Location:
trunk
Files:
14 added
12 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormNewGame.lfm

    r47 r52  
    11object FormNewGame: TFormNewGame
    2   Left = 579
    3   Height = 542
    4   Top = 226
    5   Width = 846
     2  Left = 479
     3  Height = 650
     4  Top = 392
     5  Width = 1015
    66  Caption = 'New game'
    7   ClientHeight = 542
    8   ClientWidth = 846
    9   DesignTimePPI = 120
     7  ClientHeight = 650
     8  ClientWidth = 1015
     9  DesignTimePPI = 144
    1010  OnCreate = FormCreate
    1111  OnDestroy = FormDestroy
    1212  OnShow = FormShow
    13   LCLVersion = '2.0.2.0'
     13  LCLVersion = '2.0.12.0'
    1414  object ButtonStart: TButton
    15     Left = 740
    16     Height = 31
    17     Top = 500
    18     Width = 94
     15    Left = 888
     16    Height = 37
     17    Top = 600
     18    Width = 113
    1919    Anchors = [akRight, akBottom]
    2020    Caption = 'Start'
     
    2424  end
    2525  object ButtonCancel: TButton
    26     Left = 630
    27     Height = 31
    28     Top = 500
    29     Width = 94
     26    Left = 756
     27    Height = 37
     28    Top = 600
     29    Width = 113
    3030    Anchors = [akRight, akBottom]
    3131    Caption = 'Cancel'
     
    3535  end
    3636  object Label1: TLabel
    37     Left = 10
    38     Height = 20
    39     Top = 8
    40     Width = 49
     37    Left = 12
     38    Height = 25
     39    Top = 10
     40    Width = 59
    4141    Caption = 'Players:'
    4242    ParentColor = False
     
    4444  end
    4545  object ListView1: TListView
    46     Left = 10
    47     Height = 460
    48     Top = 30
    49     Width = 368
     46    Left = 12
     47    Height = 552
     48    Top = 36
     49    Width = 442
    5050    Anchors = [akTop, akLeft, akBottom]
    5151    Checkboxes = True
     
    5353      item
    5454        Caption = 'Name'
    55         Width = 188
     55        Width = 226
    5656      end   
    5757      item
    5858        Caption = 'Color'
    59         Width = 62
     59        Width = 74
    6060      end   
    6161      item
    6262        Caption = 'Controls'
    63         Width = 189
     63        Width = 227
    6464      end>
    6565    OwnerData = True
     
    7575  end
    7676  object ColorButton1: TColorButton
    77     Left = 634
    78     Height = 31
    79     Top = 112
    80     Width = 94
     77    Left = 761
     78    Height = 37
     79    Top = 134
     80    Width = 113
    8181    BorderWidth = 2
    8282    ButtonColorSize = 16
     
    8686  end
    8787  object Label2: TLabel
    88     Left = 500
    89     Height = 20
    90     Top = 116
    91     Width = 51
     88    Left = 600
     89    Height = 25
     90    Top = 139
     91    Width = 62
    9292    Caption = 'Color 1:'
    9393    ParentColor = False
     
    9595  end
    9696  object GroupBox1: TGroupBox
    97     Left = 490
    98     Height = 243
    99     Top = 208
    100     Width = 340
     97    Left = 588
     98    Height = 292
     99    Top = 250
     100    Width = 408
    101101    Caption = 'Control keys'
    102     ClientHeight = 218
    103     ClientWidth = 336
     102    ClientHeight = 262
     103    ClientWidth = 404
    104104    ParentFont = False
    105105    TabOrder = 3
    106106    object EditUp: TEdit
    107       Left = 108
    108       Height = 28
     107      Left = 130
     108      Height = 33
    109109      Top = 2
    110       Width = 100
     110      Width = 120
    111111      OnChange = EditUpChange
    112112      OnKeyDown = EditUpKeyDown
     
    115115    end
    116116    object Label3: TLabel
    117       Left = 8
    118       Height = 20
    119       Top = 12
    120       Width = 22
     117      Left = 10
     118      Height = 25
     119      Top = 14
     120      Width = 27
    121121      Caption = 'Up:'
    122122      ParentColor = False
     
    124124    end
    125125    object Label4: TLabel
    126       Left = 8
    127       Height = 20
    128       Top = 52
    129       Width = 42
     126      Left = 10
     127      Height = 25
     128      Top = 62
     129      Width = 51
    130130      Caption = 'Down:'
    131131      ParentColor = False
     
    133133    end
    134134    object EditDown: TEdit
    135       Left = 108
    136       Height = 28
    137       Top = 40
    138       Width = 100
     135      Left = 130
     136      Height = 33
     137      Top = 48
     138      Width = 120
    139139      OnChange = EditDownChange
    140140      OnKeyDown = EditDownKeyDown
     
    143143    end
    144144    object Label5: TLabel
    145       Left = 8
    146       Height = 20
    147       Top = 92
    148       Width = 28
     145      Left = 10
     146      Height = 25
     147      Top = 110
     148      Width = 33
    149149      Caption = 'Left:'
    150150      ParentColor = False
     
    152152    end
    153153    object EditLeft: TEdit
    154       Left = 108
    155       Height = 28
    156       Top = 82
    157       Width = 100
     154      Left = 130
     155      Height = 33
     156      Top = 98
     157      Width = 120
    158158      OnChange = EditLeftChange
    159159      OnKeyDown = EditLeftKeyDown
     
    162162    end
    163163    object Label6: TLabel
    164       Left = 8
    165       Height = 20
    166       Top = 132
    167       Width = 38
     164      Left = 10
     165      Height = 25
     166      Top = 158
     167      Width = 46
    168168      Caption = 'Right:'
    169169      ParentColor = False
     
    171171    end
    172172    object EditRight: TEdit
    173       Left = 108
    174       Height = 28
    175       Top = 122
    176       Width = 100
     173      Left = 130
     174      Height = 33
     175      Top = 146
     176      Width = 120
    177177      OnChange = EditRightChange
    178178      OnKeyDown = EditRightKeyDown
     
    181181    end
    182182    object Label7: TLabel
    183       Left = 8
    184       Height = 20
    185       Top = 172
    186       Width = 42
     183      Left = 10
     184      Height = 25
     185      Top = 206
     186      Width = 52
    187187      Caption = 'Shoot:'
    188188      ParentColor = False
     
    190190    end
    191191    object EditShoot: TEdit
    192       Left = 108
    193       Height = 28
    194       Top = 162
    195       Width = 100
     192      Left = 130
     193      Height = 33
     194      Top = 194
     195      Width = 120
    196196      OnChange = EditShootChange
    197197      OnKeyDown = EditShootKeyDown
     
    201201  end
    202202  object EditName: TEdit
     203    Left = 720
     204    Height = 33
     205    Top = 36
     206    Width = 264
     207    OnChange = EditNameChange
     208    ParentFont = False
     209    TabOrder = 4
     210  end
     211  object Label8: TLabel
    203212    Left = 600
    204     Height = 28
    205     Top = 30
    206     Width = 220
    207     OnChange = EditNameChange
    208     ParentFont = False
    209     TabOrder = 4
    210   end
    211   object Label8: TLabel
    212     Left = 500
    213     Height = 20
    214     Top = 40
    215     Width = 43
     213    Height = 25
     214    Top = 48
     215    Width = 51
    216216    Caption = 'Name:'
    217217    ParentColor = False
     
    219219  end
    220220  object Label9: TLabel
    221     Left = 500
    222     Height = 20
    223     Top = 145
    224     Width = 51
     221    Left = 600
     222    Height = 25
     223    Top = 174
     224    Width = 62
    225225    Caption = 'Color 2:'
    226226    ParentColor = False
     
    228228  end
    229229  object ColorButton2: TColorButton
    230     Left = 634
    231     Height = 31
    232     Top = 145
    233     Width = 94
     230    Left = 761
     231    Height = 37
     232    Top = 174
     233    Width = 113
    234234    BorderWidth = 2
    235235    ButtonColorSize = 16
     
    239239  end
    240240  object CheckBoxEnabled: TCheckBox
    241     Left = 504
    242     Height = 24
    243     Top = 80
    244     Width = 78
     241    Left = 605
     242    Height = 29
     243    Top = 96
     244    Width = 93
    245245    Caption = 'Enabled'
    246246    OnChange = CheckBoxEnabledChange
     247    ParentFont = False
    247248    TabOrder = 5
    248249  end
  • trunk/Languages/Tunneler.cs.po

    r51 r52  
    1010"Content-Transfer-Encoding: 8bit\n"
    1111"Language: cs\n"
    12 "X-Generator: Poedit 2.2\n"
     12"X-Generator: Poedit 3.0\n"
    1313
    14 #: tdebugform.caption
    15 msgctxt "tdebugform.caption"
     14#: tformdebug.caption
     15#, fuzzy
     16msgctxt "tformdebug.caption"
    1617msgid "Debug"
    1718msgstr "Ladění"
     19
     20#: tformgameresult.caption
     21#, fuzzy
     22msgctxt "tformgameresult.caption"
     23msgid "Game result"
     24msgstr "VÃœsledek hry"
     25
     26#: tformmain.aabout.caption
     27#, fuzzy
     28msgctxt "tformmain.aabout.caption"
     29msgid "About"
     30msgstr "O aplikaci"
     31
     32#: tformmain.aexit.caption
     33#, fuzzy
     34msgctxt "tformmain.aexit.caption"
     35msgid "Exit"
     36msgstr "Odejít"
     37
     38#: tformmain.afullscreen.caption
     39#, fuzzy
     40msgctxt "tformmain.afullscreen.caption"
     41msgid "Fullscreen mode"
     42msgstr "ReÅŸim celé obrazovky"
     43
     44#: tformmain.anewgame.caption
     45#, fuzzy
     46msgctxt "tformmain.anewgame.caption"
     47msgid "New game"
     48msgstr "Nová hra"
     49
     50#: tformmain.ashowmap.caption
     51#, fuzzy
     52msgctxt "tformmain.ashowmap.caption"
     53msgid "Show map"
     54msgstr "Ukázat mapu"
     55
     56#: tformmain.ashowrawimagedesc.caption
     57#, fuzzy
     58msgctxt "tformmain.ashowrawimagedesc.caption"
     59msgid "Show RawImage Description"
     60msgstr "Ukázat popis RawImage"
     61
     62#: tformmain.caption
     63#, fuzzy
     64msgctxt "tformmain.caption"
     65msgid "Tunneler"
     66msgstr "Tunneler"
     67
     68#: tformmain.menuitem1.caption
     69#, fuzzy
     70msgctxt "tformmain.menuitem1.caption"
     71msgid "Game"
     72msgstr "Hra"
     73
     74#: tformmain.menuitem4.caption
     75#, fuzzy
     76msgctxt "tformmain.menuitem4.caption"
     77msgid "View"
     78msgstr "Zobrazení"
     79
     80#: tformmain.menuitem7.caption
     81msgctxt "tformmain.menuitem7.caption"
     82msgid "Help"
     83msgstr ""
     84
     85#: tformmap.caption
     86#, fuzzy
     87msgctxt "tformmap.caption"
     88msgid "Map"
     89msgstr "Mapa"
    1890
    1991#: tformnewgame.buttoncancel.caption
     
    34106#: tformnewgame.checkboxenabled.caption
    35107msgid "Enabled"
    36 msgstr ""
     108msgstr "Povoleno"
    37109
    38110#: tformnewgame.groupbox1.caption
     
    101173msgstr "Ovládání"
    102174
    103 #: tgameresultform.caption
    104 msgid "Game result"
    105 msgstr "VÃœsledek hry"
    106 
    107 #: tmainform.aabout.caption
    108 msgctxt "tmainform.aabout.caption"
    109 msgid "About"
    110 msgstr "O aplikaci"
    111 
    112 #: tmainform.aexit.caption
    113 msgid "Exit"
    114 msgstr "Odejít"
    115 
    116 #: tmainform.afullscreen.caption
    117 msgid "Fullscreen mode"
    118 msgstr "ReÅŸim celé obrazovky"
    119 
    120 #: tmainform.anewgame.caption
    121 msgctxt "TMAINFORM.ANEWGAME.CAPTION"
    122 msgid "New game"
    123 msgstr "Nová hra"
    124 
    125 #: tmainform.ashowmap.caption
    126 msgid "Show map"
    127 msgstr "Ukázat mapu"
    128 
    129 #: tmainform.ashowrawimagedesc.caption
    130 msgid "Show RawImage Description"
    131 msgstr "Ukázat popis RawImage"
    132 
    133 #: tmainform.caption
    134 msgctxt "tmainform.caption"
    135 msgid "Tunneler"
    136 msgstr "Tunneler"
    137 
    138 #: tmainform.menuitem1.caption
    139 msgid "Game"
    140 msgstr "Hra"
    141 
    142 #: tmainform.menuitem4.caption
    143 msgid "View"
    144 msgstr "Zobrazení"
    145 
    146 #: tmapform.caption
    147 msgid "Map"
    148 msgstr "Mapa"
    149 
    150175#: uengine.splayer
    151176msgctxt "uengine.splayer"
     
    153178msgstr "Hráč"
    154179
    155 #: umainform.sround
     180#: uformmain.sround
     181#, fuzzy
     182msgctxt "uformmain.sround"
    156183msgid "%0:s of %1:s"
    157184msgstr "%0:s z %1:s"
  • trunk/Languages/Tunneler.po

    r51 r52  
    22msgstr "Content-Type: text/plain; charset=UTF-8"
    33
    4 #: tdebugform.caption
     4#: tformdebug.caption
     5msgctxt "tformdebug.caption"
    56msgid "Debug"
     7msgstr ""
     8
     9#: tformgameresult.caption
     10msgctxt "tformgameresult.caption"
     11msgid "Game result"
     12msgstr ""
     13
     14#: tformmain.aabout.caption
     15msgctxt "tformmain.aabout.caption"
     16msgid "About"
     17msgstr ""
     18
     19#: tformmain.aexit.caption
     20msgctxt "tformmain.aexit.caption"
     21msgid "Exit"
     22msgstr ""
     23
     24#: tformmain.afullscreen.caption
     25msgctxt "tformmain.afullscreen.caption"
     26msgid "Fullscreen mode"
     27msgstr ""
     28
     29#: tformmain.anewgame.caption
     30msgctxt "tformmain.anewgame.caption"
     31msgid "New game"
     32msgstr ""
     33
     34#: tformmain.ashowmap.caption
     35msgctxt "tformmain.ashowmap.caption"
     36msgid "Show map"
     37msgstr ""
     38
     39#: tformmain.ashowrawimagedesc.caption
     40msgctxt "tformmain.ashowrawimagedesc.caption"
     41msgid "Show RawImage Description"
     42msgstr ""
     43
     44#: tformmain.caption
     45msgctxt "tformmain.caption"
     46msgid "Tunneler"
     47msgstr ""
     48
     49#: tformmain.menuitem1.caption
     50msgctxt "tformmain.menuitem1.caption"
     51msgid "Game"
     52msgstr ""
     53
     54#: tformmain.menuitem4.caption
     55msgctxt "tformmain.menuitem4.caption"
     56msgid "View"
     57msgstr ""
     58
     59#: tformmain.menuitem7.caption
     60msgctxt "tformmain.menuitem7.caption"
     61msgid "Help"
     62msgstr ""
     63
     64#: tformmap.caption
     65msgctxt "tformmap.caption"
     66msgid "Map"
    667msgstr ""
    768
     
    90151msgstr ""
    91152
    92 #: tgameresultform.caption
    93 msgid "Game result"
    94 msgstr ""
    95 
    96 #: tmainform.aabout.caption
    97 msgctxt "tmainform.aabout.caption"
    98 msgid "About"
    99 msgstr ""
    100 
    101 #: tmainform.aexit.caption
    102 msgid "Exit"
    103 msgstr ""
    104 
    105 #: tmainform.afullscreen.caption
    106 msgid "Fullscreen mode"
    107 msgstr ""
    108 
    109 #: tmainform.anewgame.caption
    110 msgctxt "tmainform.anewgame.caption"
    111 msgid "New game"
    112 msgstr ""
    113 
    114 #: tmainform.ashowmap.caption
    115 msgid "Show map"
    116 msgstr ""
    117 
    118 #: tmainform.ashowrawimagedesc.caption
    119 msgid "Show RawImage Description"
    120 msgstr ""
    121 
    122 #: tmainform.caption
    123 msgctxt "tmainform.caption"
    124 msgid "Tunneler"
    125 msgstr ""
    126 
    127 #: tmainform.menuitem1.caption
    128 msgid "Game"
    129 msgstr ""
    130 
    131 #: tmainform.menuitem4.caption
    132 msgid "View"
    133 msgstr ""
    134 
    135 #: tmapform.caption
    136 msgid "Map"
    137 msgstr ""
    138 
    139153#: uengine.splayer
    140154msgctxt "uengine.splayer"
     
    142156msgstr ""
    143157
    144 #: umainform.sround
     158#: uformmain.sround
     159msgctxt "uformmain.sround"
    145160msgid "%0:s of %1:s"
    146161msgstr ""
  • trunk/UEngine.pas

    r51 r52  
    823823begin
    824824  with Engine.FBitmapLower do begin
    825     //Brush.Color := SurfaceMatterColors[smRock];
    826     //FillRect(ScreenFrame);
    827     for Y := ScreenFrame.Top to ScreenFrame.Bottom - 1 do
    828       for X := ScreenFrame.Left to ScreenFrame.Right - 1 do begin
    829         ItemsXY[X, Y] := 0;
    830       end;
    831 
    832825    Fill(CreateIndex(ScreenFrame.Left, ScreenFrame.Top),
    833826      CreateIndex(ScreenFrame.Width, ScreenFrame.Height),
    834827      Engine.World.Matters[Integer(miRock)].Color);
    835 
    836828
    837829    with Engine.World do
     
    861853    for I := ScreenFrame.Left to ScreenFrame.Right - 1 do
    862854      ItemsXY[I, 0] := $010101 * I;
    863 
    864       for Y := ScreenFrame.Top to ScreenFrame.Bottom - 1 do
    865       for X := ScreenFrame.Left to ScreenFrame.Right - 1 do begin
    866         ItemsXY[X, Y] := 0;
    867       end;
    868855  end;
    869856end;
     
    12101197  BgColor: Cardinal;
    12111198begin
    1212   if Assigned(FBitmap) then
     1199  if Assigned(FBitmap) then begin
     1200  Lock.Acquire;
     1201  Bitmap.BeginUpdate;
    12131202  try
    1214     Lock.Acquire;
    1215     Bitmap.BeginUpdate;
    12161203    {$IFDEF WINDOWS}
    12171204    Bitmap.PixelFormat := pf32bit;
     
    12211208    BytePerRow := RawImage.Description.BytesPerLine;
    12221209    if ClearBackground then begin
    1223       BgColor := TMatter(World.Matters[Integer(miBorder)]).Color;
     1210      BgColor := World.Matters[Integer(miBorder)].Color;
    12241211      BgColor := SwapBRComponent(BgColor);
    12251212      FillDWord(RawImage.Data^, Bitmap.Height * BytePerRow div 4, BgColor);
     
    12811268    end;
    12821269  finally
    1283     FBitmap.EndUpdate;
     1270    Bitmap.EndUpdate;
    12841271    Lock.Release;
     1272  end;
    12851273  end;
    12861274end;
     
    15941582  I: Integer;
    15951583  DrawStart: TDateTime;
     1584  OldCount: TBitmapTColorIndex;
    15961585begin
    15971586  if FRedrawPending then begin
     
    16001589    Lock.Acquire;
    16011590    try
    1602       //if ClearBackground then FBitmapLower.FillAll(clNavy);
     1591      // TODO: Without this (re)initialization we get range error
     1592      OldCount := FBitmapLower.Count;
     1593      FBitmapLower.Count := FBitmapLower.CreateIndex(0, 0);
     1594      FBitmapLower.Count := OldCount;
     1595
     1596      if ClearBackground then FBitmapLower.FillAll(clNavy);
    16031597      for I := 0 to Players.Count - 1 do
    16041598      if Players[I].Enabled then begin
  • trunk/tunneler.lpi

    r51 r52  
    123123      </Unit4>
    124124      <Unit5>
    125         <Filename Value="Forms/UMainForm.pas"/>
    126         <IsPartOfProject Value="True"/>
    127         <ComponentName Value="MainForm"/>
     125        <Filename Value="Forms/UFormMain.pas"/>
     126        <IsPartOfProject Value="True"/>
     127        <ComponentName Value="FormMain"/>
    128128        <HasResources Value="True"/>
    129129        <ResourceBaseClass Value="Form"/>
    130130      </Unit5>
    131131      <Unit6>
    132         <Filename Value="Forms/UMapForm.pas"/>
    133         <IsPartOfProject Value="True"/>
    134         <ComponentName Value="MapForm"/>
     132        <Filename Value="Forms/UFormMap.pas"/>
     133        <IsPartOfProject Value="True"/>
     134        <ComponentName Value="FormMap"/>
    135135        <HasResources Value="True"/>
    136136        <ResourceBaseClass Value="Form"/>
    137137      </Unit6>
    138138      <Unit7>
    139         <Filename Value="Forms/UDebugForm.pas"/>
    140         <IsPartOfProject Value="True"/>
    141         <ComponentName Value="DebugForm"/>
     139        <Filename Value="Forms/UFormDebug.pas"/>
     140        <IsPartOfProject Value="True"/>
     141        <ComponentName Value="FormDebug"/>
    142142        <HasResources Value="True"/>
    143143        <ResourceBaseClass Value="Form"/>
    144144      </Unit7>
    145145      <Unit8>
    146         <Filename Value="Forms/UGameResultForm.pas"/>
    147         <IsPartOfProject Value="True"/>
    148         <ComponentName Value="GameResultForm"/>
     146        <Filename Value="Forms/UFormGameResult.pas"/>
     147        <IsPartOfProject Value="True"/>
     148        <ComponentName Value="FormGameResult"/>
    149149        <HasResources Value="True"/>
    150150        <ResourceBaseClass Value="Form"/>
  • trunk/tunneler.lpr

    r51 r52  
    1010  Forms, TemplateGenerics, UPlatform, FileUtil, SysUtils,
    1111  Common,
    12   UFormNewGame, UMainForm, UMapForm, UGameResultForm, UCore
     12  UFormNewGame, UFormMain, UFormMap, UFormGameResult, UCore
    1313  { you can add units after this };
    1414
     
    3030  Application.Initialize;
    3131  Application.CreateForm(TCore, Core);
    32   Application.CreateForm(TMainForm, MainForm);
    33   Application.CreateForm(TMapForm, MapForm);
    34   Application.CreateForm(TFormNewGame, FormNewGame);
    35   Application.CreateForm(TGameResultForm, GameResultForm);
     32  Application.CreateForm(TFormMain, FormMain);
     33  Application.CreateForm(TFormMap, FormMap);
    3634  {$IFDEF DEBUG}
    3735  {$ENDIF}
Note: See TracChangeset for help on using the changeset viewer.