Changeset 15 for trunk


Ignore:
Timestamp:
Jan 7, 2017, 10:16:37 PM (8 years ago)
Author:
chronos
Message:
  • Fixed: Top left position of main window.
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Integrated.lpi

    r14 r15  
    142142        <Filename Value="Messg.pas"/>
    143143        <IsPartOfProject Value="True"/>
    144         <HasResources Value="True"/>
     144        <ComponentName Value="MessgDlg"/>
     145        <HasResources Value="True"/>
     146        <ResourceBaseClass Value="Form"/>
    145147      </Unit12>
    146148      <Unit13>
     
    159161        <Filename Value="Log.pas"/>
    160162        <IsPartOfProject Value="True"/>
    161         <HasResources Value="True"/>
     163        <ComponentName Value="LogDlg"/>
     164        <HasResources Value="True"/>
     165        <ResourceBaseClass Value="Form"/>
    162166      </Unit15>
    163167      <Unit16>
     
    195199        <Filename Value="LocalPlayer\MessgEx.pas"/>
    196200        <IsPartOfProject Value="True"/>
    197         <HasResources Value="True"/>
     201        <ComponentName Value="MessgExDlg"/>
     202        <HasResources Value="True"/>
     203        <ResourceBaseClass Value="Form"/>
    198204      </Unit23>
    199205      <Unit24>
     
    214220        <Filename Value="LocalPlayer\CityScreen.pas"/>
    215221        <IsPartOfProject Value="True"/>
    216         <HasResources Value="True"/>
     222        <ComponentName Value="CityDlg"/>
     223        <HasResources Value="True"/>
     224        <ResourceBaseClass Value="Form"/>
    217225      </Unit27>
    218226      <Unit28>
    219227        <Filename Value="LocalPlayer\UnitStat.pas"/>
    220228        <IsPartOfProject Value="True"/>
    221         <HasResources Value="True"/>
     229        <ComponentName Value="UnitStatDlg"/>
     230        <HasResources Value="True"/>
     231        <ResourceBaseClass Value="Form"/>
    222232      </Unit28>
    223233      <Unit29>
    224234        <Filename Value="LocalPlayer\Draft.pas"/>
    225235        <IsPartOfProject Value="True"/>
    226         <HasResources Value="True"/>
     236        <ComponentName Value="DraftDlg"/>
     237        <HasResources Value="True"/>
     238        <ResourceBaseClass Value="Form"/>
    227239      </Unit29>
    228240      <Unit30>
    229241        <Filename Value="LocalPlayer\NatStat.pas"/>
    230242        <IsPartOfProject Value="True"/>
    231         <HasResources Value="True"/>
     243        <ComponentName Value="NatStatDlg"/>
     244        <HasResources Value="True"/>
     245        <ResourceBaseClass Value="Form"/>
    232246      </Unit30>
    233247      <Unit31>
    234248        <Filename Value="LocalPlayer\Diagram.pas"/>
    235249        <IsPartOfProject Value="True"/>
    236         <HasResources Value="True"/>
     250        <ComponentName Value="DiaDlg"/>
     251        <HasResources Value="True"/>
     252        <ResourceBaseClass Value="Form"/>
    237253      </Unit31>
    238254      <Unit32>
    239255        <Filename Value="LocalPlayer\Wonders.pas"/>
    240256        <IsPartOfProject Value="True"/>
    241         <HasResources Value="True"/>
     257        <ComponentName Value="WondersDlg"/>
     258        <HasResources Value="True"/>
     259        <ResourceBaseClass Value="Form"/>
    242260      </Unit32>
    243261      <Unit33>
     
    251269        <Filename Value="LocalPlayer\CityType.pas"/>
    252270        <IsPartOfProject Value="True"/>
    253         <HasResources Value="True"/>
     271        <ComponentName Value="CityTypeDlg"/>
     272        <HasResources Value="True"/>
     273        <ResourceBaseClass Value="Form"/>
    254274      </Unit34>
    255275      <Unit35>
    256276        <Filename Value="LocalPlayer\Enhance.pas"/>
    257277        <IsPartOfProject Value="True"/>
    258         <HasResources Value="True"/>
     278        <ComponentName Value="EnhanceDlg"/>
     279        <HasResources Value="True"/>
     280        <ResourceBaseClass Value="Form"/>
    259281      </Unit35>
    260282      <Unit36>
     
    271293        <Filename Value="LocalPlayer\Battle.pas"/>
    272294        <IsPartOfProject Value="True"/>
    273         <HasResources Value="True"/>
     295        <ComponentName Value="BattleDlg"/>
     296        <HasResources Value="True"/>
     297        <ResourceBaseClass Value="Form"/>
    274298      </Unit38>
    275299      <Unit39>
     
    294318    </Target>
    295319    <SearchPaths>
    296       <IncludeFiles Value="LocalPlayer"/>
     320      <IncludeFiles Value="LocalPlayer;$(ProjOutDir)"/>
    297321      <OtherUnitFiles Value="LocalPlayer"/>
    298322      <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
  • trunk/LocalPlayer/Term.pas

    r12 r15  
    42054205      offscreen.Canvas.Font.Assign(UniFont[ftSmall]);
    42064206      rec := Rect(0, 0, MapWidth, MapHeight);
    4207       { TODO ScrollDC(offscreen.Canvas.Handle, (xwd - xw) * (xxt * 2),
    4208         (ywd - yw) * yyt, rec, rec, 0, nil);}
     4207      ScrollDC(offscreen.Canvas.Handle, (xwd - xw) * (xxt * 2),
     4208        (ywd - yw) * yyt, rec, rec, 0, nil);
    42094209      for DoInvalidate := false to FastScrolling do
    42104210      begin
     
    42124212        begin
    42134213          rec.Bottom := MapHeight - overlap;
    4214           { TODO ScrollDC(Canvas.Handle, (xwd - xw) * (xxt * 2), (ywd - yw) * yyt, rec,
    4215             rec, 0, nil);}
     4214          ScrollDC(Canvas.Handle, (xwd - xw) * (xxt * 2), (ywd - yw) * yyt, rec,
     4215            rec, 0, nil);
    42164216          ProcessOptions := prInvalidate;
    42174217        end
     
    77897789    procedure TMainScreen.mLogClick(Sender: TObject);
    77907790    begin
    7791       LogDlg.Show
     7791      LogDlg.Show;
    77927792    end;
    77937793
    77947794    procedure TMainScreen.FormShow(Sender: TObject);
    77957795    begin
    7796       Timer1.Enabled := true
     7796      Timer1.Enabled := true;
     7797      Left := 0;
     7798      Top := 0;
    77977799    end;
    77987800
    77997801    procedure TMainScreen.FormClose(Sender: TObject; var Action: TCloseAction);
    78007802    begin
    7801       Timer1.Enabled := false
     7803      Timer1.Enabled := false;
    78027804    end;
    78037805
    78047806    procedure TMainScreen.Radio(Sender: TObject);
    78057807    begin
    7806       TMenuItem(Sender).Checked := true
     7808      TMenuItem(Sender).Checked := true;
    78077809    end;
    78087810
  • trunk/Protocol.pas

    r10 r15  
    17181718
    17191719begin
    1720   // TODO assert(sizeof(TPlayerContext) = 2048);
    1721   // TODO assert(sizeof(TModel) - 2 * sizeof(LongInt) - 4 * sizeof(word)
    1722   //  = sIntSetDevModel and $F * 4);
     1720  assert(sizeof(TPlayerContext) = 2048);
     1721  assert(sizeof(TModel) - 2 * sizeof(LongInt) - 4 * sizeof(word)
     1722  = sIntSetDevModel and $F * 4);
    17231723
    17241724end.
  • trunk/ScreenTools.pas

    r14 r15  
    66uses
    77  Windows, StringTables,
    8 
    98  LCLIntf, LCLType, LMessages, Messages, SysUtils, Classes, Graphics, Controls,
    109  Forms, Menus;
     
    608607  PixelDst: ^TPixel;
    609608begin
    610   // TODO assert(Src.PixelFormat = pf8bit);
    611   // TODO assert(dst.PixelFormat = pf24bit);
     609  {TODO assert(Src.PixelFormat = pf8bit);}
     610  assert(dst.PixelFormat = pf24bit);
    612611  if xDst < 0 then
    613612  begin
  • trunk/Start.pas

    r14 r15  
    182182procedure TStartDlg.FormCreate(Sender: TObject);
    183183var
    184   x, y, i, ResolutionX, ResolutionY, ResolutionBPP, ResolutionFreq,
    185     ScreenMode: integer;
     184  x, y, i, ResolutionX, ResolutionY, ResolutionBPP, ResolutionFreq: Integer;
     185  ScreenMode: Integer;
    186186  DefaultAI, s: string;
    187187  r0, r1: HRgn;
    188188  Reg: TRegistry;
    189   FirstStart: boolean;
     189  FirstStart: Boolean;
     190  Location: TPoint;
    190191begin
    191192  Reg := TRegistry.Create;
     
    237238  begin
    238239    Reg.OpenKey('SOFTWARE\cevo\RegVer9', false);
    239     try
     240    if Reg.ValueExists('ScreenMode') then
    240241      ScreenMode := Reg.ReadInteger('ScreenMode');
    241       FullScreen := ScreenMode > 0;
    242       if Reg.ValueExists('ResolutionX') then
    243         ResolutionX := Reg.ReadInteger('ResolutionX');
    244       if Reg.ValueExists('ResolutionY') then
    245         ResolutionY := Reg.ReadInteger('ResolutionY');
    246       if Reg.ValueExists('ResolutionBPP') then
    247         ResolutionBPP := Reg.ReadInteger('ResolutionBPP');
    248       if Reg.ValueExists('ResolutionFreq') then
    249         ResolutionFreq := Reg.ReadInteger('ResolutionFreq');
    250       if ScreenMode = 2 then
    251         ChangeResolution(ResolutionX, ResolutionY, ResolutionBPP,
    252           ResolutionFreq);
    253     except
    254     end;
     242    FullScreen := ScreenMode > 0;
     243    if Reg.ValueExists('ResolutionX') then
     244      ResolutionX := Reg.ReadInteger('ResolutionX');
     245    if Reg.ValueExists('ResolutionY') then
     246      ResolutionY := Reg.ReadInteger('ResolutionY');
     247    if Reg.ValueExists('ResolutionBPP') then
     248      ResolutionBPP := Reg.ReadInteger('ResolutionBPP');
     249    if Reg.ValueExists('ResolutionFreq') then
     250      ResolutionFreq := Reg.ReadInteger('ResolutionFreq');
     251    if ScreenMode = 2 then
     252      ChangeResolution(ResolutionX, ResolutionY, ResolutionBPP,
     253        ResolutionFreq);
    255254    Reg.closekey;
    256255  end;
     
    277276  if FullScreen then
    278277  begin
    279     left := (screen.width - 800) * 3 div 8;
    280     top := screen.height - ClientHeight - (screen.height - 600) div 3;
     278    Location := Point(Screen.Width, Screen.Height);
     279    Location := Point((Screen.width - 800) * 3 div 8,
     280      Screen.height - ClientHeight - (Screen.height - 600) div 3);
     281    Left := Location.X;
     282    Top := Location.Y;
    281283
    282284    r0 := CreateRectRgn(0, 0, ClientWidth, ClientHeight);
Note: See TracChangeset for help on using the changeset viewer.