Skip to content

Commit

Permalink
Версия 0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
devapromix committed Jun 11, 2022
1 parent 0a3691c commit 73e5d85
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Sources/Game/TransportTycoon.City.pas
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ implementation
function TCity.AirportCost: Integer;
begin
if (FAirport < 5) then
Result := (FAirport + 1) * 1000
Result := (FAirport + 1) * 8000
else
Result := 0;
end;
Expand Down
1 change: 1 addition & 0 deletions Sources/Game/TransportTycoon.Game.pas
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ TGame = class(TObject)
public const
MaxLoan = 200000;
StartMoney = MaxLoan div 2;
Version = '0.1';
public
IsClearLand: Boolean;
IsPause: Boolean;
Expand Down
8 changes: 3 additions & 5 deletions Sources/Scenes/TransportTycoon.Scene.BuildInCity.pas
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ implementation
TransportTycoon.Game,
TransportTycoon.City;

{ TSceneBuildInCity }

procedure TSceneBuildInCity.Render;
var
C: TCity;
Expand All @@ -34,7 +32,7 @@ procedure TSceneBuildInCity.Render;
begin
DrawMap(Self.Width, Self.Height - 1);

DrawFrame(10, 7, 60, 15);
DrawFrame(15, 7, 50, 15);

C := Game.Map.City[Game.Map.CurrentCity];
DrawTitle('BUILD IN ' + C.Name);
Expand All @@ -44,7 +42,7 @@ procedure TSceneBuildInCity.Render;
S := '';
if C.Airport < 5 then
S := ' ($' + IntToStr(C.AirportCost) + ')';
DrawButton(12, 11, F, 'A', 'Build ' + AirportSizeStr[N] + S);
DrawButton(17, 11, F, 'A', 'Build ' + AirportSizeStr[N] + S);

AddButton(19, 'Esc', 'Close');

Expand All @@ -62,7 +60,7 @@ procedure TSceneBuildInCity.Update(var Key: Word);
19:
Key := TK_ESCAPE;
end;
if (MX >= 12) and (MX <= 67) then
if (MX >= 17) and (MX <= 62) then
case MY of
11:
Key := TK_A;
Expand Down
3 changes: 2 additions & 1 deletion Sources/TransportTycoon.dpr
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ var
begin
Randomize;
terminal_open();
terminal_set('window: size=80x30, title="Transport Tycoon";');
terminal_set('window: size=80x30, title="Transport Tycoon v.'
+ Game.Version + '";');
terminal_set('input: filter={keyboard, mouse+}');
Scenes := TScenes.Create;
Scenes.SetScene(scMainMenu);
Expand Down

0 comments on commit 73e5d85

Please sign in to comment.